edit
This commit is contained in:
@ -20,7 +20,7 @@ module.exports = {
|
|||||||
// }
|
// }
|
||||||
'//api': {
|
'//api': {
|
||||||
target: {
|
target: {
|
||||||
host: 'tms-api-test.eascs.com',
|
host: 'tms-api-dev.eascs.com',
|
||||||
protocol: 'https:',
|
protocol: 'https:',
|
||||||
port: 443
|
port: 443
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
import { Component, ViewChild } from '@angular/core';
|
import { Component, ViewChild } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st';
|
import { STComponent, STColumn, STRequestOptions, STChange } from '@delon/abc/st';
|
||||||
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form';
|
import { SFComponent, SFSchema, SFDateWidgetSchema, SFAutoCompleteWidgetSchema, SFSelectWidgetSchema } from '@delon/form';
|
||||||
import { NzModalService } from 'ng-zorro-antd/modal';
|
import { NzModalService } from 'ng-zorro-antd/modal';
|
||||||
|
import { of } from 'rxjs';
|
||||||
import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component';
|
import { AddCollectionInvoiceModalComponent } from 'src/app/routes/ticket-management/components/input-invoice/add-collection-invoice-modal/add-collection-invoice-modal.component';
|
||||||
|
|
||||||
import { PartnerListService } from '../../services/partner-list.service';
|
import { PartnerListService } from '../../services/partner-list.service';
|
||||||
@ -241,11 +242,22 @@ export class PartnerListComponent {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
title: '渠道销售',
|
title: '渠道销售',
|
||||||
ui: {
|
ui: {
|
||||||
placeholder: '请输入姓名或者手机号',
|
widget: 'select',
|
||||||
|
searchDebounceTime: 300,
|
||||||
|
searchLoadingText: '搜索中...',
|
||||||
|
allowClear: true,
|
||||||
visibleIf: {
|
visibleIf: {
|
||||||
expand: (value: boolean) => value
|
expand: (value: boolean) => value
|
||||||
|
},
|
||||||
|
onSearch: (q: any) => {
|
||||||
|
let str = q.replace(/^\s+|\s+$/g, '');
|
||||||
|
if (str) {
|
||||||
|
return this.service.getChannel({ enterpriseName: str }).toPromise();
|
||||||
|
} else {
|
||||||
|
return of([]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
} as SFSelectWidgetSchema
|
||||||
},
|
},
|
||||||
partnerType: {
|
partnerType: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
|||||||
@ -176,21 +176,23 @@ export class ShipperBaseService extends BaseService {
|
|||||||
getEnterpriceList(params = { enterpriseName: '' }, containerAll = false) {
|
getEnterpriceList(params = { enterpriseName: '' }, containerAll = false) {
|
||||||
let str = params.enterpriseName.replace(/^\s+|\s+$/g, '');
|
let str = params.enterpriseName.replace(/^\s+|\s+$/g, '');
|
||||||
if (str) {
|
if (str) {
|
||||||
return this.request(this.$api_enterpriceList, params).pipe(
|
return this.request(this.$api_enterpriceList, params)
|
||||||
map((res: any) => {
|
.pipe(
|
||||||
if (!res) {
|
map((res: any) => {
|
||||||
return [];
|
if (!res) {
|
||||||
}
|
return [];
|
||||||
const list = res.map((item: any) => {
|
}
|
||||||
return { label: item.enterpriseName, value: item.id };
|
const list = res.map((item: any) => {
|
||||||
});
|
return { label: item.enterpriseName, value: item.id };
|
||||||
const obj = [];
|
});
|
||||||
if (containerAll) {
|
const obj = [];
|
||||||
obj.push({ label: '全部', value: '' });
|
if (containerAll) {
|
||||||
}
|
obj.push({ label: '全部', value: '' });
|
||||||
return [...obj, ...list];
|
}
|
||||||
})
|
return [...obj, ...list];
|
||||||
).toPromise();;
|
})
|
||||||
|
)
|
||||||
|
.toPromise();
|
||||||
} else {
|
} else {
|
||||||
return of([]);
|
return of([]);
|
||||||
}
|
}
|
||||||
@ -291,14 +293,15 @@ export class ShipperBaseService extends BaseService {
|
|||||||
* 获取渠道销售管理集合
|
* 获取渠道销售管理集合
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
getChannel() {
|
getChannel(params = {}, containerAll = false) {
|
||||||
const params = {};
|
|
||||||
return this.request(this.$api_get_channel, params, 'POST').pipe(
|
return this.request(this.$api_get_channel, params, 'POST').pipe(
|
||||||
map(res => {
|
map(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
return res.map((m: any) => {
|
const obj = [];
|
||||||
return { label: `${m.employeeVO?.empName}/${m.employeeVO?.mobile}`, value: m.id };
|
if (containerAll) {
|
||||||
});
|
obj.push({ label: '全部', value: '' });
|
||||||
|
}
|
||||||
|
return [...obj, ...res.map((m: any) => ({ label: `${m.employeeVO?.empName}/${m.employeeVO?.mobile}`, value: m.id }))];
|
||||||
} else {
|
} else {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user