fix bug
This commit is contained in:
		| @ -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 @@ | ||||
|         <sv label="货主">{{ i?.goodsResource?.shipperAppUserName }} </sv> | ||||
|         <sv label="所属项目">{{ i?.goodsResource?.enterpriseProjectName }}</sv> | ||||
|         <sv label="服务类型">{{ i?.goodsResource?.serviceTypeLabel }}</sv> | ||||
|         <sv label="录单员">{{ i?.createUserName }} /{{ i?.createUserPhone }} </sv> | ||||
|         <sv label="录单员">{{ i?.createUserName || i?.goodsResource?.createUserName }} /{{ i?.createUserPhone || i?.goodsResource?.createUserPhone }} </sv> | ||||
|         <sv label="调度员">{{ i?.goodsResource?.dispatchName }}/{{ i?.goodsResource?.dispatchPhone }} </sv> | ||||
|         <sv label="外部订单号">{{ i?.externalBillCode }}</sv> | ||||
|         <sv label="货源编号">{{ i?.resourceCode }} </sv> | ||||
|         <sv label="运单号">{{ i?.wayBillId }}</sv> | ||||
|         <sv label="承诺付款天数">{{ i?.goodsResource?.dispatchName }}</sv> | ||||
|       </div> | ||||
|  | ||||
|       <nz-tabset style="margin-top: 15px"> | ||||
|         <nz-tab nzTitle="装卸货信息" (nzClick)="goDistance(distannce1)"> </nz-tab> | ||||
|         <nz-tab nzTitle="基本信息" (nzClick)="goDistance(distannce2)"> </nz-tab> | ||||
|         <nz-tab nzTitle="运费信息" (nzClick)="goDistance(distannce3)"> </nz-tab> | ||||
|         <!-- <nz-tab nzTitle="运费信息" (nzClick)="goDistance(distannce3)"> </nz-tab> --> | ||||
|         <nz-tab nzTitle="附件信息" (nzClick)="goDistance(distannce4)"> </nz-tab> | ||||
|         <nz-tab nzTitle="轨迹信息" (nzClick)="goDistance(distannce5)"> </nz-tab> | ||||
|       </nz-tabset> | ||||
| @ -223,17 +227,17 @@ | ||||
|           {{ i?.driverCarModelLabel }},{{ i?.driverCarLengthLabel }}米,{{ i?.driverCarWeight }}吨  | ||||
|         </ng-template> | ||||
|  | ||||
|         <ng-template sf-template="loadPlanTime" let-item let-ui="ui"> | ||||
|         <ng-template sf-template="loadTime" let-item let-ui="ui"> | ||||
|           <nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" [(ngModel)]="loadTime"></nz-date-picker> | ||||
|         </ng-template> | ||||
|         <ng-template sf-template="unloadPlanTime" let-item let-ui="ui"> | ||||
|         <ng-template sf-template="unloadTime" let-item let-ui="ui"> | ||||
|           <nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" [(ngModel)]="unloadTime"></nz-date-picker> | ||||
|         </ng-template> | ||||
|       </sf> | ||||
| </nz-card> | ||||
|  | ||||
| <nz-card nzTitle="运费信息" #distannce3> | ||||
|   <st #st [data]="i?.billExpenseDetails" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }"> | ||||
|   <st #st [data]="billExpenses" [columns]="logColumns" [ps]="0" [page]="{ show: false, showSize: false }"> | ||||
|     <ng-template st-row="price" let-item let-index="index"> | ||||
|       {{ item.price | currency }} | ||||
|     </ng-template> | ||||
| @ -295,11 +299,11 @@ | ||||
|           <div style="margin-top: 8px">请上传图片</div> | ||||
|         </div> | ||||
|       </nz-upload> | ||||
|       <nz-modal [nzVisible]="previewVisible1" [nzContent]="modalContent" [nzFooter]="null" (nzOnCancel)="previewVisible1 = false"> | ||||
|       <!-- <nz-modal [nzVisible]="previewVisible1" [nzContent]="modalContent" [nzFooter]="null" (nzOnCancel)="previewVisible1 = false"> | ||||
|         <ng-template #modalContent> | ||||
|           <img [src]="previewImage1" [ngStyle]="{ width: '100%' }" /> | ||||
|         </ng-template> | ||||
|       </nz-modal> | ||||
|       </nz-modal> --> | ||||
|     </sv> | ||||
|     <sv label="备注"> | ||||
|       {{ i?.goodsResource?.remarks }} | ||||
|  | ||||
| @ -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); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user