From e5b0436a27ce2de1c229bc2addb604c5b34ecbe4 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 11 Mar 2022 09:36:53 +0800 Subject: [PATCH 1/6] fix bug --- .../vehicle/components/audit/detail/detail.component.ts | 7 ++++++- .../vehicle/components/list/detail/detail.component.ts | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/app/routes/vehicle/components/audit/detail/detail.component.ts b/src/app/routes/vehicle/components/audit/detail/detail.component.ts index b2dc3bba..af375c4f 100644 --- a/src/app/routes/vehicle/components/audit/detail/detail.component.ts +++ b/src/app/routes/vehicle/components/audit/detail/detail.component.ts @@ -129,7 +129,6 @@ export class VehicleComponentsAuditDetailComponent implements OnInit { } save() { - this.isEdit = false; this.detailData.driverLicenseRegisterTime = EADateUtil.yearToDate(this.detailData?.driverLicenseRegisterTime); this.detailData.driverLicenseEndTime = EADateUtil.yearToDate(this.detailData?.driverLicenseEndTime); @@ -139,9 +138,15 @@ export class VehicleComponentsAuditDetailComponent implements OnInit { this.detailData.roadTransportStartTime = EADateUtil.yearToDate(this.detailData?.roadTransportStartTime); this.detailData.roadTransportEndTime = EADateUtil.yearToDate(this.detailData?.roadTransportEndTime); + console.log(this.detailData.roadTransportStartTime) + if((this.detailData.roadTransportStartTime > this.detailData.roadTransportEndTime) || (this.detailData.driverLicenseRegisterTime > this.detailData.driverLicenseEndTime)) { + this.service.msgSrv.error('发证日期起始不能大于结束日期!') + return; + } this.service.request(this.service.$api_get_update_audit, this.detailData).subscribe(res => { if (res) { this.getDetailList(); + this.isEdit = false; this.service.msgSrv.success('修改成功!'); } }); diff --git a/src/app/routes/vehicle/components/list/detail/detail.component.ts b/src/app/routes/vehicle/components/list/detail/detail.component.ts index 880d69ea..a07c9e7d 100644 --- a/src/app/routes/vehicle/components/list/detail/detail.component.ts +++ b/src/app/routes/vehicle/components/list/detail/detail.component.ts @@ -249,7 +249,6 @@ export class VehicleComponentsListDetailComponent implements OnInit { } save() { - this.isEdit = false; console.log(this.detailData); this.detailData.driverLicenseRegisterTime = EADateUtil.yearToDate(this.detailData?.driverLicenseRegisterTime); @@ -261,10 +260,16 @@ export class VehicleComponentsListDetailComponent implements OnInit { this.detailData.roadTransportEndTime = EADateUtil.yearToDate(this.detailData?.roadTransportEndTime); console.log(this.detailData); + console.log(this.detailData.roadTransportStartTime) + if((this.detailData.roadTransportStartTime > this.detailData.roadTransportEndTime) || (this.detailData.driverLicenseRegisterTime > this.detailData.driverLicenseEndTime)) { + this.service.msgSrv.error('发证日期起始不能大于结束日期!') + return; + } this.service.request(this.service.$api_get_update, this.detailData).subscribe(res => { console.log(res); if (res) { this.getDetailList(); + this.isEdit = false; this.service.msgSrv.success('修改成功!'); } }); From d499b524f7b84e5308985b8d20b49ce2053b99fc Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 11 Mar 2022 09:53:53 +0800 Subject: [PATCH 2/6] fix bug --- .../vehicle/confir-receipt/confir-receipt.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.html b/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.html index 0ee649ed..f08ba3c6 100644 --- a/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.html +++ b/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-15 13:17:42 * @LastEditors : Shiming - * @LastEditTime : 2022-03-09 15:24:55 + * @LastEditTime : 2022-03-11 09:53:23 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\confir-receipt\\confir-receipt.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -33,7 +33,7 @@ -
{{ dataInfo?.driverName|| '-' }} / {{dataInfo?.driverTelephone || '-' }}/ {{ dataInfo?.carNo || '-' }}
+
{{ dataInfo?.driverName|| '-' }} / {{dataInfo?.driverPhone || '-' }}/ {{ dataInfo?.carNo || '-' }}
{{ i?.payeeName || '-'}} / {{ i?.payeePhone || '-'}}
From ae22b93ac7162b036352bb93c235907b1c7249ec Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 11 Mar 2022 10:18:57 +0800 Subject: [PATCH 3/6] fix bug --- .../vehicle-detail-change.component.html | 22 ++--- .../vehicle-detail-change.component.ts | 80 ++++++++----------- 2 files changed, 48 insertions(+), 54 deletions(-) diff --git a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html index 80c958f5..54af4f0e 100644 --- a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html +++ b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-23 13:39:58 * @LastEditors : Shiming - * @LastEditTime : 2022-03-08 14:59:55 + * @LastEditTime : 2022-03-11 10:18:18 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -33,14 +33,18 @@ {{ i?.goodsResource?.shipperAppUserName }} {{ i?.goodsResource?.enterpriseProjectName }} {{ i?.goodsResource?.serviceTypeLabel }} - {{ i?.createUserName }} /{{ i?.createUserPhone }} + {{ i?.createUserName || i?.goodsResource?.createUserName }} /{{ i?.createUserPhone || i?.goodsResource?.createUserPhone }} {{ i?.goodsResource?.dispatchName }}/{{ i?.goodsResource?.dispatchPhone }} + {{ i?.externalBillCode }} + {{ i?.resourceCode }} + {{ i?.wayBillId }} + {{ i?.goodsResource?.dispatchName }} - + @@ -223,17 +227,17 @@ {{ i?.driverCarModelLabel }},{{ i?.driverCarLengthLabel }}米,{{ i?.driverCarWeight }}吨 - + - + - + {{ item.price | currency }} @@ -243,7 +247,7 @@
总计:{{ i?.totalAmount | currency }} (运费{{ i?.totalFreight | currency }}, - 附加费{{ i?.totalSurcharge | currency }},附加费率{{ (i?.totalRate * 100).toFixed(2) }}%) + 附加费{{ i?.totalSurcharge | currency }},附加费率{{ (i?.totalRate * 100).toFixed(2)}}% )
收款人:{{ i?.payeeName }}/{{ i?.payeePhone }}
@@ -295,11 +299,11 @@
请上传图片
- +
{{ i?.goodsResource?.remarks }} diff --git a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts index bcf4bf56..ec7d8113 100644 --- a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts +++ b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-23 13:39:58 * @LastEditors : Shiming - * @LastEditTime : 2022-03-08 16:12:17 + * @LastEditTime : 2022-03-11 10:11:31 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -52,6 +52,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { dirverPhone: any; // 货源单设置回显 dirverBankCard: any; // 货源单设置回显 listImagUrls: any[] = []; // 货源单设置回显 + billExpenses: any[] = []; //运费信息表格信息 dirvingMessage = []; attObj: any; totalObj: any; @@ -120,10 +121,9 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { this.initData(); this.initSF3(); this.initSF4(); + this.initSF(); } initSF() { - console.log(this.i); - console.log(this.i.billStatus == '4' || this.i.billStatus == '3'); this.schema = { properties: { loadingLadingBillFilePath: { @@ -332,22 +332,22 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { initData() { this.service.request(this.service.$api_get_getWholeBillDetail, { id: this.id }).subscribe(res => { console.log(res); + console.log(JSON.stringify(res)); if (res) { this.i = res; - this.approvalLsit = res.scheduleVOList; - this.attObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'ATT')[0]; - this.totalObj = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TOTAL')[0]; + // this.initSF(); + this.approvalLsit = res?.scheduleVOList; + this.billExpenses = this.i?.billExpenseDetails?.filter( + (data: any) => data.expenseCode === 'PRE' || data.expenseCode === 'RECE' || data.expenseCode === 'BACK' + ); this.approvalLsit.map((item: any, key: any) => { - console.log(item); if (item.displayStatus === 'HIDE') { - delete this.approvalLsit[key]; + delete this?.approvalLsit?.[key]; } }); - this.initSF(); // 对装货凭证进行初始化 let arr: any = []; res?.receiptFilePath.forEach((element: any, index: any) => { - console.log(index); arr.push({ url: element, status: 'done', @@ -365,7 +365,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { if (this.sf3data.goodsTypeName === '其它') { this.sf3data.goodsName1 = res?.goodsInfoList[0]?.goodsName || ''; } - this.changeGoodsType(this.sf3data.goodsTypeId, { label: this.sf3data.goodsTypeName, value: this.sf3data.goodsTypeId }); + this.changeGoodsType(this.sf3data?.goodsTypeId, { label: this.sf3data?.goodsTypeName, value: this.sf3data?.goodsTypeId }); // 对装卸货信息进行初始化 res?.unLoadingPlaceList.forEach((element: any) => { if (element.type === 1 || element.type === '1') { @@ -405,16 +405,16 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { } }); // 对装货凭证进行初始化 - if (res.loadingLadingBillFilePath) { + if (res?.loadingLadingBillFilePath) { this.formData = { loadingLadingBillFilePath: [ { uid: 'logo', name: 'LOGO', status: 'done', - url: res.loadingLadingBillFilePath, + url: res?.loadingLadingBillFilePath, response: { - url: res.loadingLadingBillFilePath + url: res?.loadingLadingBillFilePath } } ], @@ -423,9 +423,9 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { uid: 'logo', name: 'LOGO', status: 'done', - url: res.loadingPeopleVehiclesGoodsFilePath, + url: res?.loadingPeopleVehiclesGoodsFilePath, response: { - url: res.loadingPeopleVehiclesGoodsFilePath + url: res?.loadingPeopleVehiclesGoodsFilePath } } ], @@ -434,9 +434,9 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { uid: 'logo', name: 'LOGO', status: 'done', - url: res.unloadingLadingBillFilePath, + url: res?.unloadingLadingBillFilePath, response: { - url: res.unloadingLadingBillFilePath + url: res?.unloadingLadingBillFilePath } } ], @@ -445,23 +445,23 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { uid: 'logo', name: 'LOGO', status: 'done', - url: res.unloadingPeopleVehiclesGoodsFilePath, + url: res?.unloadingPeopleVehiclesGoodsFilePath, response: { - url: res.unloadingPeopleVehiclesGoodsFilePath + url: res?.unloadingPeopleVehiclesGoodsFilePath } } ] }; } // 发车时间到车时间初始化 - this.loadTime = res.loadTime; - this.unloadTime = res.unloadTime; - this.dirvingMessage = res.billExpenseDetails; + this.loadTime = res?.loadTime; + this.unloadTime = res?.unloadTime; + this.dirvingMessage = res?.billExpenseDetails; // 计算里程,时间 if (this.startInfo?.[0]?.area && this.endInfo?.[0]?.area) { this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { - this.totalDistance = res.distance; - this.totalTime = res.time; + this.totalDistance = res?.distance; + this.totalTime = res?.time; }); } } @@ -480,8 +480,8 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { let imgList: any = []; if (this.listImagUrls.length > 0) { this.listImagUrls?.forEach((res: any) => { - if (res.url) { - imgList.push(res.url); + if (res?.url) { + imgList.push(res?.url); } }); } @@ -515,9 +515,6 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { ':' + this.addPreZero(c.getSeconds()); } - console.log('dirvingMessage=>>>>>>' + this.dirvingMessage); - console.log(this.dirvingMessage); - console.log(this.st._data); const params = { id: this.id, unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo], @@ -554,9 +551,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { ? this.sf.value?.unloadingPeopleVehiclesGoodsFilePath.data.fullFilePath : this.sf.value?.unloadingPeopleVehiclesGoodsFilePath?.url }; - console.log(params); this.service.request(this.service.$api_set_modifyWholeOrder, params).subscribe((res: any) => { - console.log(res); if (res) { this.service.msgSrv.success('修改成功!'); this.router.navigate(['/order-management/vehicle/vehicle-detail/', this.id], { relativeTo: this.ar }); @@ -575,9 +570,6 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { // -------------------装卸货信息处理 // 打开地图 openMap(type: string, index: number, address: string) { - console.log(type); - console.log(index); - const modalRef = this.modalService.create({ nzTitle: '', nzComponentParams: { selectedAddress: address }, @@ -611,8 +603,8 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { if (this.startInfo[0]?.area && this.endInfo[0]?.area) { this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe((res: any) => { - this.totalDistance = res.distance; - this.totalTime = res.time; + this.totalDistance = res?.distance; + this.totalTime = res?.time; }); } } @@ -839,7 +831,6 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { case 'done': let fileList = [...info.fileList]; // 2. Read from response and show file link - console.log(fileList); fileList = fileList.map((file: any) => { if (file.response) { file.url = file.response.data.fullFilePath; @@ -890,7 +881,6 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { elf['elementRef'].nativeElement.scrollIntoView({ behavior: 'smooth', block: 'start', inline: 'start' }); // elf['elementRef'].nativeElement.className = 'target-fix' } - console.log(elf); } // 装卸货地址互换 swapAddress() { @@ -924,8 +914,8 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { // 计算里程,时间 if (this.startInfo[0]?.area && this.endInfo[0]?.area) { this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { - this.totalDistance = res.distance; - this.totalTime = res.time; + this.totalDistance = res?.distance; + this.totalTime = res?.time; }); } } @@ -933,7 +923,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { getTrajectory(){ this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => { if (res) { - const points = res.trackArray; + const points = res?.trackArray; let list :any[] = []; points?.forEach((item: any) => { list.push({ @@ -942,7 +932,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { }); }); this.mapList = list; - this.addressItems = res.cityArray; + this.addressItems = res?.cityArray; if(this.addressItems && this.addressItems.length > 0){ this.addressItems.forEach(item => { item.vinOutTime = this.getLocalTime(item.vinOutTime); @@ -956,7 +946,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { getDriverTrajectory(){ this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => { if (res) { - const points = res.tracks; + const points = res?.tracks; let list :any[] = []; points?.forEach((item: any) => { list.push({ @@ -965,7 +955,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { }); }); this.mapList = list; - this.addressItems = [...res.enclosureDataAppTrack]; + this.addressItems = [...res?.enclosureDataAppTrack]; if(this.addressItems && this.addressItems.length > 0){ this.addressItems.forEach(item => { item.vinOutTime = this.getLocalTime(item.gtm); From 688fd03a92c02f154d8a3bbef0833ed95aa05b69 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 11 Mar 2022 10:22:48 +0800 Subject: [PATCH 4/6] fix bug --- .../vehicle-detail-change.component.html | 2 +- .../vehicle-detail-change/vehicle-detail-change.component.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html index 54af4f0e..687bf114 100644 --- a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html +++ b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-23 13:39:58 * @LastEditors : Shiming - * @LastEditTime : 2022-03-11 10:18:18 + * @LastEditTime : 2022-03-11 10:19:38 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> diff --git a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts index ec7d8113..b4c9c65b 100644 --- a/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts +++ b/src/app/routes/order-management/components/vehicle-detail-change/vehicle-detail-change.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-23 13:39:58 * @LastEditors : Shiming - * @LastEditTime : 2022-03-11 10:11:31 + * @LastEditTime : 2022-03-11 10:21:33 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -820,6 +820,8 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { if (!file.url && !file.preview) { file.preview = await getBase64(file.originFileObj!); } + console.log('888888888'); + this.previewImage1 = file.url || file.preview; this.previewVisible1 = true; }; From d0f418adc44904f7616872ac5d6704154cdcfd8d Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 11 Mar 2022 10:28:48 +0800 Subject: [PATCH 5/6] fix bug --- .../sys-setting/components/network-freight/new/new.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 6ed3a65e..f5b4d4bf 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 @@ -626,7 +626,7 @@ export class NetworkFreightNewComponent implements OnInit { } } }, - required: ['website', 'bankAccount'] + required: ['website', 'costRate'] }; } } From bacba43fd240fedac8f3382693d9ff849d91b1cb Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 11 Mar 2022 10:37:48 +0800 Subject: [PATCH 6/6] fix bug --- .../model/import-supply/import-supply.component.html | 4 ++-- .../model/import-supply/import-supply.component.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/routes/supply-management/model/import-supply/import-supply.component.html b/src/app/routes/supply-management/model/import-supply/import-supply.component.html index b7a8d5f2..fd35818d 100644 --- a/src/app/routes/supply-management/model/import-supply/import-supply.component.html +++ b/src/app/routes/supply-management/model/import-supply/import-supply.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-03 11:10:14 * @LastEditors : Shiming - * @LastEditTime : 2022-03-07 11:03:11 + * @LastEditTime : 2022-03-11 10:35:44 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\model\\import-supply\\import-supply.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -12,7 +12,7 @@ - +