From 84f5641cceeec1916fbeee6a23b3326b8f8ce67c Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 18 Feb 2022 14:56:17 +0800 Subject: [PATCH 1/3] fix bug --- .../components/network-freight/new/new.component.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/app/routes/sys-setting/components/network-freight/new/new.component.ts b/src/app/routes/sys-setting/components/network-freight/new/new.component.ts index f9100693..6cafd5b9 100644 --- a/src/app/routes/sys-setting/components/network-freight/new/new.component.ts +++ b/src/app/routes/sys-setting/components/network-freight/new/new.component.ts @@ -89,7 +89,6 @@ export class NetworkFreightNewComponent implements OnInit { constructor(private router: Router, public service: SystemService, private route: ActivatedRoute) {} ngOnInit() { - console.log(this.route.snapshot.params.id == 'undefined') if(this.route.snapshot.params.id !== 'undefined') { this.dataListInit(this.route.snapshot.params.id) this.subText = '确认编辑' @@ -101,6 +100,7 @@ export class NetworkFreightNewComponent implements OnInit { console.log(res); this.sf2FormData = res this.sf1FormData = res.enterpriseInfoVO + this.sf1FormData.legalPersonIdentityVO.isLoingDate = this.sf1FormData.legalPersonIdentityVO.validEndTime !== null ? false : true; this.sf1FormData.licensePhotoWatermark = [ { uid: -1, @@ -182,9 +182,16 @@ export class NetworkFreightNewComponent implements OnInit { delete params.enterpriseInfoDTO.legalPersonIdentityVO console.log(params); params.enterpriseInfoDTO.enterpriseAddressCode = this.sf1.value?.enterpriseAddressCode?.[2]; + if(this.route.snapshot.params.id !== 'undefined') { + params.id = this.route.snapshot.params.id + } this.service.request(this.service.$api_networkTransporter_save, params).subscribe(res => { if (res) { - this.service.msgSrv.success('网络货运人新增成功'); + if(this.route.snapshot.params.id !== 'undefined') { + this.service.msgSrv.success('修改成功'); + } else { + this.service.msgSrv.success('新增成功'); + } this.goBack(); } }); From 3b70f219e15b1c33e8d232d4e8d8fe12aaf7a855 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 18 Feb 2022 15:16:25 +0800 Subject: [PATCH 2/3] fix bug --- .../driver/add-driver/add-driver.component.ts | 11 ++++++++++- .../routes/usercenter/services/usercenter.service.ts | 8 +++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/app/routes/usercenter/components/driver/add-driver/add-driver.component.ts b/src/app/routes/usercenter/components/driver/add-driver/add-driver.component.ts index 20a4d5d3..35047ab2 100644 --- a/src/app/routes/usercenter/components/driver/add-driver/add-driver.component.ts +++ b/src/app/routes/usercenter/components/driver/add-driver/add-driver.component.ts @@ -477,6 +477,15 @@ export class CarSettleAddDriverComponent implements OnInit { } }; } + getRegionToThree() { + // 获取一、二、三级地区详情 + this.service.http.post(this.service.$api_getRegionToThree).subscribe((res) => { + if(this.sf1){ + this.sf1.getProperty('/enterpriseAddressCode')!.schema.enum = res.data; + this.sf1?.getProperty('/enterpriseAddressCode')?.widget.reset(res.data); + } + }); + } getProvinceData() { return this.service.request(this.service.$api_getRegionByCode, { regionCode: '' }).pipe( map(res => { @@ -520,7 +529,7 @@ export class CarSettleAddDriverComponent implements OnInit { if (res) { this.sf2.setValue('/licenseNo', res.certificateNumber); - //this.sf.setValue('/validStartTime', res.continuingEducationInfo); + this.sf2.setValue('/regionCode', res.addressRegionCodes?.[0]); } }); } diff --git a/src/app/routes/usercenter/services/usercenter.service.ts b/src/app/routes/usercenter/services/usercenter.service.ts index 112e3ce3..c42a9b3d 100644 --- a/src/app/routes/usercenter/services/usercenter.service.ts +++ b/src/app/routes/usercenter/services/usercenter.service.ts @@ -16,6 +16,8 @@ import { ImageViewComponent } from 'src/app/shared/components/imagelist'; providedIn: 'root' }) export class UsermanageService extends ShipperBaseService { + // 获取一、二、三级地区详情 + $api_getRegionToThree = '/api/mdc/pbc/region/getRegionToThree'; // 查询企业列表 $api_get_freight_list = '/api/mdc/cuc/enterpriseInfo/operate/list/page'; // 导出企业列表 @@ -130,10 +132,10 @@ export class UsermanageService extends ShipperBaseService { $api_driver_add = '/api/mdc/cuc/driver/add'; // 添加车队长 $api_saveCaptainr_new = '/api/mdc/userDriverExpand/saveCaptainr'; - + // 查询司机配置列表 - $api_configPage= '/api/mdc/cuc/driver/list/configPage'; - + $api_configPage = '/api/mdc/cuc/driver/list/configPage'; + constructor(public injector: Injector, private nzModalService: NzModalService, public eaCacheSrv: EACacheService) { super(injector, eaCacheSrv); } From dc5c4e44c8b940be34ad1653ea17426a0406a5b4 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 18 Feb 2022 15:24:08 +0800 Subject: [PATCH 3/3] fix bug --- .../components/driver/add-driver/add-driver.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/routes/usercenter/components/driver/add-driver/add-driver.component.ts b/src/app/routes/usercenter/components/driver/add-driver/add-driver.component.ts index 35047ab2..123da432 100644 --- a/src/app/routes/usercenter/components/driver/add-driver/add-driver.component.ts +++ b/src/app/routes/usercenter/components/driver/add-driver/add-driver.component.ts @@ -567,12 +567,12 @@ export class CarSettleAddDriverComponent implements OnInit { } submitForm() { const items: any = this.sf.value; - items.certificatePhotoFrontWatermark = this.sf.value?.certificatePhotoFrontWatermark.data.fullFilePath; - items.certificatePhotoBackWatermark = this.sf.value?.certificatePhotoBackWatermark.data.fullFilePath; + items.certificatePhotoFrontWatermark = this.sf.value?.certificatePhotoFrontWatermark?.data?.fullFilePath || this.sf.value?.certificatePhotoFrontWatermark; + items.certificatePhotoBackWatermark = this.sf.value?.certificatePhotoBackWatermark?.data?.fullFilePath || this.sf.value?.certificatePhotoBackWatermark; const items2: any = this.sf1.value; - items2.certificatePhotoWatermark = this.sf1.value?.certificatePhotoWatermark.data.fullFilePath; + items2.certificatePhotoWatermark = this.sf1.value?.certificatePhotoWatermark?.data?.fullFilePath || this.sf1.value?.certificatePhotoWatermark; const items3: any = this.sf2.value; - items3.certificatePhotoWatermark = this.sf2.value?.certificatePhotoWatermark.data.fullFilePath; + items3.certificatePhotoWatermark = this.sf2.value?.certificatePhotoWatermark?.data?.fullFilePath || this.sf2.value?.certificatePhotoWatermark; const params: any = { source: 2, mobile: this.sf.value.mobile,