From caf0f98a0e648ec8d0d7ef58f2626e7eaa5bb05c Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 10 Mar 2022 16:11:07 +0800 Subject: [PATCH] fix bug --- .../bulk-detail-change.component.html | 10 +- .../bulk-detail/bulk-detail.component.html | 10 +- .../vehicle-detail.component.html | 8 +- .../bulk-detail/bulk-detail.component.html | 10 +- .../vehicle-detail.component.html | 6 +- .../bulk-detail/bulk-detail.component.html | 22 ++-- .../bulk-detail/bulk-detail.component.ts | 69 ++++++++++-- .../vehicle-detail.component.html | 40 ++++--- .../vehicle-detail.component.ts | 103 +++++++++++++----- 9 files changed, 195 insertions(+), 83 deletions(-) diff --git a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html index 46fcc4e5..ac075761 100644 --- a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html +++ b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html @@ -296,20 +296,20 @@ {{ i?.supplementaryInformationVO?.stateReceipt ? '是' : '否' }} - + {{ i?.supplementaryInformationVO?.receiptType === '1' ? '电子回单' : '纸质回单' }} - {{ i?.supplementaryInformationVO?.receiptUserName }} / {{ i?.supplementaryInformationVO?.phon }} - + {{ i?.supplementaryInformationVO?.receiptUserName }} / {{ i?.supplementaryInformationVO?.phon }} + {{ i?.supplementaryInformationVO?.area }} - + {{ i?.supplementaryInformationVO?.address }} - + {{ i?.supplementaryInformationVO?.stateReceipt ? '是' : '否' }} - + {{ i?.supplementaryInformationVO?.receiptType === '1' ? '电子回单' : '纸质回单' }} - {{ i?.supplementaryInformationVO?.receiptUserName }} / {{ i?.supplementaryInformationVO?.phon }} - + {{ i?.supplementaryInformationVO?.receiptUserName }} / {{ i?.supplementaryInformationVO?.phon }} + {{ i?.supplementaryInformationVO?.area }} - + {{ i?.supplementaryInformationVO?.address }} - + diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html index 0b55fc05..75078c62 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-28 14:42:03 * @LastEditors : Shiming - * @LastEditTime : 2022-03-09 13:38:21 + * @LastEditTime : 2022-03-09 10:33:44 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -48,8 +48,8 @@ {{ i?.goodsResource?.dispatchName }}/{{ i?.goodsResource?.dispatchPhone }} {{ i?.externalBillCode }} {{ i?.resourceCode }} - {{ i?.wayBillCode }} - {{ i?.paymentDays }} + {{ i?.wayBillId }} + {{ i?.goodsResource?.dispatchName }} @@ -203,7 +203,7 @@
- +
diff --git a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html index e28c5d69..ac00d884 100644 --- a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html @@ -155,19 +155,19 @@ {{ i?.supplementaryInformationVO?.stateReceipt ? '是' : '否' }} - + {{ i?.supplementaryInformationVO?.receiptTypeLabel }} - + {{ i?.supplementaryInformationVO?.receiptUserName ? i?.supplementaryInformationVO?.receiptUserName + '/' : '' }} {{ i?.supplementaryInformationVO?.phon }} - + {{ i?.supplementaryInformationVO?.area }} - + {{ i?.supplementaryInformationVO?.address }} - + {{ i?.supplementaryInformationVO?.remarks }}
diff --git a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html index 5249b461..e94f92e9 100644 --- a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html @@ -199,13 +199,13 @@ {{ i?.supplementaryInformationVO?.stateReceipt ? '是' : '否' }} - + {{ i?.supplementaryInformationVO?.receiptType === '1' ? '电子回单' : '纸质回单' }} - + {{ i?.supplementaryInformationVO?.area }} - + {{ i?.supplementaryInformationVO?.address }} diff --git a/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html index 3bcec474..72952e4a 100644 --- a/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html @@ -1,7 +1,7 @@ + + + {{ item.price | currency }} + + + {{ item.surcharge | currency }} + + +
+ 总计:{{ i?.totalAmount | currency }} (运费{{ i?.totalFreight | currency }}, + 附加费{{ i?.totalSurcharge | currency }},附加费率{{ (i?.totalRate * 100).toFixed(2)}}% ) +
+
收款人:{{ i?.payeeName }}/{{ i?.payeePhone }}
@@ -170,22 +183,22 @@ {{i?.receiptType == 1 ?'是':'否'}} - + {{i?.receiptTypeLabel}} - + {{i?.receiptUser}}{{ i?.receiptUserPhone ? ' /' + i?.receiptUserPhone : ''}} - + {{i?.receiptPlace}} - + {{i?.receiptAddress}} - + @@ -193,21 +206,22 @@ +
- +
- - + +
- +
- + diff --git a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts index 421e6348..c9013093 100644 --- a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts +++ b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-12-03 15:31:52 - * @LastEditTime : 2022-03-02 16:26:15 + * @LastEditTime : 2022-03-10 16:10:51 * @LastEditors : Shiming * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\vehicle-detail\\vehicle-detail.component.ts @@ -26,18 +26,32 @@ export class WaybillManagementVehicleDetailComponent implements OnInit { id = this.route.snapshot.params.id; MapList: any[]=[]; + trajectory = 'car'; + mapList:any[] = []; //地图点位数据组 + addressItems:any[] = []; //打点地址数据组 i: any; totalObj: any; attObj: any; isVisible = false; imges: any; unLoadingPlaceVOList: any = []; - logColumns: STColumn[] = [ + logColumns2: STColumn[] = [ { title: '时间', index: 'vinOutTime' }, - { title: '地点', index: 'cityName' }, + { title: '地点', index: 'cityName' } + ]; + billExpenses: any[] = []; //运费信息表格信息 + logColumns: STColumn[] = [ + { title: '款项', index: 'costCodeLabel' }, + { title: '小计(元)', render: 'price' }, + { title: '运输费(元)', render: 'price' }, + { title: '附加费(元)', render: 'surcharge' }, + { title: '支付时间', index: 'paymentTime' }, + { + title: '支付状态', + className: 'text-center', + index: 'paymentStatusLabel', + } ]; - trajectory = 'car'; - addressItems: any[] = []; //打点地址数据组 constructor( private route: ActivatedRoute, @@ -50,7 +64,7 @@ export class WaybillManagementVehicleDetailComponent implements OnInit { ngOnInit(): void { this.initData() - this.MapInit() + this.getTrajectory() } initData() { const params = { @@ -62,8 +76,10 @@ export class WaybillManagementVehicleDetailComponent implements OnInit { this.unLoadingPlaceVOList.push(...res.dischargePlace) console.log(this.unLoadingPlaceVOList) this.i = res; - this.attObj = this.i?.billExpenseDetailVOList?.filter((data: any) => data.expenseCode === 'ATT')[0]; - this.totalObj = this.i?.billExpenseDetailVOList?.filter((data: any) => data.expenseCode === 'TOTAL')[0]; + this.billExpenses = this.i?.billExpenseDetailVOList?.filter( + (data: any) => data.costCode === 'PRE' || data.costCode === 'RECE' || data.costCode === 'BACK' + ); + this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data: any) => data.displayStatus !== 'HIDE'); }) } @@ -130,29 +146,60 @@ goDistance(elf: NzCardComponent) { }); } - // 获取轨迹 - MapInit() { - this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => { - if (res) { - const points = res.trackArray; - let list :any[] = []; - points?.forEach((item: any) => { - list.push({ - name: item.hgt, - lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] - }); + + // 获取车辆轨迹 + getTrajectory(){ + this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => { + if (res) { + const points = res.trackArray; + let list :any[] = []; + points?.forEach((item: any) => { + list.push({ + name: item.hgt, + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + }); + }); + this.mapList = list; + this.addressItems = res.cityArray; + if(this.addressItems && this.addressItems.length > 0){ + this.addressItems.forEach(item => { + item.vinOutTime = this.getLocalTime(item.vinOutTime); }); - this.MapList = list; - this.addressItems = res.parkArray; - if(this.addressItems && this.addressItems.length > 0){ - this.addressItems.forEach(item => { - item.vinOutTime = this.getLocalTime(item.vinOutTime); - }); - } } - }); + } + }); + } + + // 获取司机轨迹 + getDriverTrajectory(){ + this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => { + if (res) { + const points = res.tracks; + let list :any[] = []; + points?.forEach((item: any) => { + list.push({ + name: item.hgt, + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + }); + }); + this.mapList = list; + this.addressItems = [...res.enclosureDataAppTrack]; + if(this.addressItems && this.addressItems.length > 0){ + this.addressItems.forEach(item => { + item.vinOutTime = this.getLocalTime(item.gtm); + item.cityName = item.appAdress; + }); + } + } + }); + } + trajectoryChange(event:any){ + if(event ==='car'){ + this.getTrajectory() + }else if(event ==='driver'){ + this.getDriverTrajectory(); } - + } getLocalTime(time: any) { return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss'); }