From 9c21cabd45798a3d6575b6e0bb475e1934a23efc Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 24 Mar 2022 14:49:48 +0800 Subject: [PATCH] fix bug --- .../network-freight.component.ts | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts b/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts index 1ff042b0..5456947b 100644 --- a/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts +++ b/src/app/routes/sys-setting/components/network-freight/network-freight.component.ts @@ -466,8 +466,26 @@ export class NetworkFreightComponent implements OnInit { } }); } + if(this.NCStatus) { + this.getNcSetData() + } this.isVisibleTicket = true; } + getNcSetData() { + const List: any = []; + console.log(99999); + this.service.request(this.service.$api_get_crmCustomer, { id: this.ticketItem.crmCustomerId }).subscribe((res: any) => { + console.log(res); + if (res) { + List.push({ label: res.customerName, value: res.id }); + console.log(List); + + this.sfNC.getProperty('/crmCustomerId')!.schema.enum = List; + this.sfNC.getProperty('/crmCustomerId')!.widget.reset(List); + this.sfNC.setValue('/crmCustomerId', res?.id); + } + }); + } getProvinceData(value: any) { this.service.http.post(this.service.$api_getRegionDetailByCode, { regionCode: value }).subscribe(res => { let enterpriseAddressCode: any = []; @@ -661,10 +679,10 @@ export class NetworkFreightComponent implements OnInit { this.NCStatus = false; this.taxStatus = false; } else if (value.name === 'NC设置'){ + this.getNcSetData() this.NCStatus = true; this.TicketStatus = false; this.taxStatus = false; - } } // 新增