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 128459c0..46fcc4e5 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 @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-24 16:58:02 * @LastEditors : Shiming - * @LastEditTime : 2022-03-07 17:32:05 + * @LastEditTime : 2022-03-08 14:55:27 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -86,7 +86,7 @@ +
- +
- +
- +
- +
+ diff --git a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts index 2cf4b893..cb1494e1 100644 --- a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts +++ b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-24 16:58:02 * @LastEditors : Shiming - * @LastEditTime : 2022-03-07 17:56:10 + * @LastEditTime : 2022-03-08 19:31:50 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -41,9 +41,7 @@ function getBase64(file: File): Promise { export class OrderManagementBulkDetailChangeComponent implements OnInit { validateForm1: FormGroup; id = this.route.snapshot.params.id; - trajectory = 'car'; @ViewChild('distannce3', { static: false }) - MapList: any[]=[]; i: any= {unLoadingPlaceList:[]}; totalDistance = 0.0; //总里程 totalTime = 0.0; //路程总时间 @@ -70,16 +68,38 @@ loadTime: any; // 货源单设置回显 schema4: SFSchema = {}; isVisible = false; billExpenses: any[] = []; //运费信息表格信息 - addressItems: any[] = []; //打点地址数据组 ui4!: SFUISchema; formData: any; @ViewChild('sf', { static: false }) sf!: SFComponent; schema: SFSchema = {}; ui: SFUISchema = {}; - logColumns: STColumn[] = [ + logColumns2: STColumn[] = [ { title: '时间', index: 'vinOutTime' }, { title: '地点', index: 'cityName' }, ]; + logColumns: STColumn[] = [ + { title: '款项', index: 'expenseCodeLabel' }, + { title: '小计(元)', render: 'price' }, + { title: '运输费(元)', render: 'price' }, + { title: '附加费(元)', render: 'surcharge' }, + { title: '支付时间', index: 'paymentTime' }, + { + title: '支付状态', + className: 'text-center', + index: 'paymentStatus', + type: 'badge', + width: '120px', + badge: { + '1': { text: '待申请', color: 'warning' }, + '2': { text: '已支付', color: 'success' }, + '3': { text: '已拒绝', color: 'warning' }, + '4': { text: '申请中', color: 'warning' } + } + } + ]; + trajectory = 'car'; + mapList:any[] = []; //地图点位数据组 + addressItems:any[] = []; //打点地址数据组 constructor( private route: ActivatedRoute, private router: Router, @@ -99,10 +119,10 @@ loadTime: any; // 货源单设置回显 } ngOnInit(): void { - this.initSF(); + this.initData() this.initSF3(); this.initSF4(); - this.initData() + this.getTrajectory() } initSF() { this.schema = { @@ -110,6 +130,7 @@ loadTime: any; // 货源单设置回显 loadingLadingBillFilePath: { type: 'string', title: '装货凭证', + readOnly: this.i.billStatus !== '4' || this.i.billStatus !== '3', ui: { widget: 'upload', action: apiConf.fileUpload, @@ -148,6 +169,7 @@ loadTime: any; // 货源单设置回显 loadingPeopleVehiclesGoodsFilePath: { type: 'string', title: '', + readOnly: this.i.billStatus !== '4' || this.i.billStatus !== '3', ui: { widget: 'upload', action: apiConf.fileUpload, @@ -202,6 +224,7 @@ loadTime: any; // 货源单设置回显 unloadingLadingBillFilePath: { type: 'string', title: '卸货凭证', + readOnly: this.i.billStatus !== '4' || this.i.billStatus !== '3', ui: { widget: 'upload', action: apiConf.fileUpload, @@ -240,6 +263,7 @@ loadTime: any; // 货源单设置回显 unloadingPeopleVehiclesGoodsFilePath: { type: 'string', title: '', + readOnly: this.i.billStatus !== '4' || this.i.billStatus !== '3', ui: { widget: 'upload', action: apiConf.fileUpload, @@ -311,6 +335,7 @@ loadTime: any; // 货源单设置回显 if (res) { this.i = res; this.billExpenses = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TRA'); + this.initSF(); // 对装货凭证进行初始化 let arr : any= [] res?.receiptFilePath.forEach((element: any, index: any) => { @@ -448,6 +473,20 @@ loadTime: any; // 货源单设置回显 } // 保存修改 save() { + Object.keys(this.validateForm1.controls).forEach(key => { + this.validateForm1.controls[key].markAsDirty(); + this.validateForm1.controls[key].updateValueAndValidity(); + }); + this.sf3.validator({ emitError: true }); + this.sf4.validator({ emitError: true }); + if (this.validateForm1.invalid || !this.sf3.valid || !this.sf4.valid ) { + this.service.msgSrv.warning('请完善必填项!'); + return; + } + if ((this.sf4.value?.acceptWeight > this.i?.goodsInfoList?.[0]?.weight) || (this.sf4.value?.settlementWeight.settlementWeight > this.i?.goodsInfoList?.[0]?.weight) ) { + this.service.msgSrv.warning('装货重量/卸货重量不能大于货物重量!'); + return; + } let imgList : any= []; if(this.listImagUrls.length > 0) { this.listImagUrls?.forEach((res :any) => { @@ -513,32 +552,36 @@ loadTime: any; // 货源单设置回显 // 打开地图 // 打开地图 // 打开地图 - openMap(type: string, index: number) { + openMap(type: string, index: number, address: string) { + console.log(type); + console.log(index); + const modalRef = this.modalService.create({ nzTitle: '', + nzComponentParams: { selectedAddress: address }, nzContent: AmapPoiPickerComponent, nzWidth: 900, nzOnOk: item => { const poi = item.poi; - const locList = poi.location.toString().split(','); + const locList = poi.pois; switch (type) { case 'start': - this.startInfo[index].detailedAddress = poi.district + poi.name; + this.startInfo[index].detailedAddress = poi.formattedAddress; this.startInfo[index].longitude = locList[0]; this.startInfo[index].latitude = locList[1]; - this.startInfo[index].province = poi.cityInfo.province; - this.startInfo[index].city = poi.cityInfo.city; - this.startInfo[index].area = poi.cityInfo.district; - this.startInfo[index].address = poi.name; + this.startInfo[index].province = poi.addressComponent.province; + this.startInfo[index].city = poi.addressComponent.city; + this.startInfo[index].area = poi.addressComponent.district; + this.startInfo[index].address = poi.formattedAddress; break; case 'end': - this.endInfo[index].detailedAddress = poi.district + poi.name; + this.endInfo[index].detailedAddress = poi.formattedAddress; this.endInfo[index].longitude = locList[0]; this.endInfo[index].latitude = locList[1]; - this.endInfo[index].province = poi.cityInfo.province; - this.endInfo[index].city = poi.cityInfo.city; - this.endInfo[index].area = poi.cityInfo.district; - this.endInfo[index].address = poi.name; + this.endInfo[index].province = poi.addressComponent.province; + this.endInfo[index].city = poi.addressComponent.city; + this.endInfo[index].area = poi.addressComponent.district; + this.endInfo[index].address = poi.formattedAddress; break; default: break; @@ -879,30 +922,61 @@ 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); - }); - } } - }); - } - - getLocalTime(time: any) { - return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss'); + } + }); + } + + // 获取司机轨迹 + 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'); + } } diff --git a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html index 7dd7c9c7..b0140a97 100644 --- a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-06 20:20:26 * @LastEditors : Shiming - * @LastEditTime : 2022-03-04 14:07:44 + * @LastEditTime : 2022-03-08 14:53:01 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -204,16 +204,16 @@
- +
- +
- + diff --git a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts index ff871426..8c6b9800 100644 --- a/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts +++ b/src/app/routes/order-management/components/bulk-detail/bulk-detail.component.ts @@ -33,12 +33,33 @@ export class OrderManagementBulkeDetailComponent implements OnInit { totalObj: any; attObj: any; isVisible = false; - logColumns: STColumn[] = [ + logColumns2: STColumn[] = [ { title: '时间', index: 'vinOutTime' }, { title: '地点', index: 'cityName' }, ]; + logColumns: STColumn[] = [ + { title: '款项', index: 'expenseCodeLabel' }, + { title: '小计(元)', render: 'price' }, + { title: '运输费(元)', render: 'price' }, + { title: '附加费(元)', render: 'surcharge' }, + { title: '支付时间', index: 'paymentTime' }, + { + title: '支付状态', + className: 'text-center', + index: 'paymentStatus', + type: 'badge', + width: '120px', + badge: { + '1': { text: '待申请', color: 'warning' }, + '2': { text: '已支付', color: 'success' }, + '3': { text: '已拒绝', color: 'warning' }, + '4': { text: '申请中', color: 'warning' } + } + } + ]; trajectory = 'car'; - addressItems: any[] = []; //打点地址数据组 + mapList:any[] = []; //地图点位数据组 + addressItems:any[] = []; //打点地址数据组 constructor( private route: ActivatedRoute, private msgSrv: NzMessageService, @@ -49,7 +70,7 @@ export class OrderManagementBulkeDetailComponent implements OnInit { ngOnInit(): void { this.initData(); - this.MapInit(); + this.getTrajectory(); } initData() { @@ -103,8 +124,9 @@ export class OrderManagementBulkeDetailComponent implements OnInit { }) }); } - // 获取轨迹 - MapInit() { + + // 获取车辆轨迹 + getTrajectory(){ this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => { if (res) { const points = res.trackArray; @@ -115,8 +137,8 @@ export class OrderManagementBulkeDetailComponent implements OnInit { lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] }); }); - this.MapList = list; - this.addressItems = res.parkArray; + this.mapList = list; + this.addressItems = res.cityArray; if(this.addressItems && this.addressItems.length > 0){ this.addressItems.forEach(item => { item.vinOutTime = this.getLocalTime(item.vinOutTime); @@ -126,6 +148,36 @@ export class OrderManagementBulkeDetailComponent implements OnInit { }); } + // 获取司机轨迹 + 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'); } diff --git a/src/app/routes/order-management/components/bulk/bulk.component.ts b/src/app/routes/order-management/components/bulk/bulk.component.ts index f9493bb9..2f56ef24 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.ts +++ b/src/app/routes/order-management/components/bulk/bulk.component.ts @@ -442,11 +442,22 @@ export class OrderManagementBulkComponent implements OnInit { width: '180px', index: 'unloadingAddressArr' }, + // { + // title: '货物信息', + // className: 'text-left', + // width: '250px', + // render: 'goodsName' + // }, { title: '货物信息', + index: 'goodsName', + width: '180px', className: 'text-left', - width: '250px', - render: 'goodsName' + format: (item: any) => + `${item.goodsName}/ + ${item.goodsWeight || '0'}吨/ + ${item.goodsVolume || '0'}方/ + ${item.goodsNumber || '0'}件` }, { title: '运费单价', @@ -460,8 +471,8 @@ export class OrderManagementBulkComponent implements OnInit { width: '170px', className: 'text-left', format: (item: any) => - `${item.acceptWeight || '--'}吨/ - ${item.acceptVolume || '--'}方` + `${item.acceptWeight || '0'}吨/ + ${item.acceptVolume || '0'}方` }, { title: '结算数量', @@ -469,8 +480,8 @@ export class OrderManagementBulkComponent implements OnInit { width: '170px', className: 'text-left', format: (item: any) => - `${item.settlementWeight || '--'}吨/ - ${item.settlementVolume || '--'}方` + `${item.settlementWeight || '0'}吨/ + ${item.settlementVolume || '0'}方` }, { title: '承运司机', 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 4a7a7ae5..80c958f5 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-07 17:29:44 + * @LastEditTime : 2022-03-08 14:59:55 * @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. --> @@ -265,20 +265,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 }} - +
- +
- + +
- +
+ + + + + +
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 25cf1096..bcf4bf56 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-07 17:56:51 + * @LastEditTime : 2022-03-08 16:12:17 * @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. */ @@ -21,6 +21,7 @@ import { NzModalService } from 'ng-zorro-antd/modal'; import { NzUploadChangeParam, NzUploadFile } from 'ng-zorro-antd/upload'; import { Observable, Observer } from 'rxjs'; import { map } from 'rxjs/operators'; +import format from 'date-fns/format'; import { OrderManagementService } from '../../services/order-management.service'; function getBase64(file: File): Promise { return new Promise((resolve, reject) => { @@ -90,6 +91,13 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { } } ]; + trajectory = 'car'; + mapList:any[] = []; //地图点位数据组 + addressItems:any[] = []; //打点地址数据组 + logColumns2: STColumn[] = [ + { title: '时间', index: 'vinOutTime' }, + { title: '地点', index: 'cityName' }, + ]; constructor( private route: ActivatedRoute, private router: Router, @@ -109,18 +117,19 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { } ngOnInit(): void { - console.log(this.id); - this.initSF(); + this.initData(); this.initSF3(); this.initSF4(); - this.initData(); } initSF() { + console.log(this.i); + console.log(this.i.billStatus == '4' || this.i.billStatus == '3'); this.schema = { properties: { loadingLadingBillFilePath: { type: 'string', title: '装货凭证', + readOnly: this.i.billStatus !== '4' || this.i.billStatus !== '3', ui: { widget: 'upload', action: apiConf.fileUpload, @@ -159,6 +168,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { loadingPeopleVehiclesGoodsFilePath: { type: 'string', title: '', + readOnly: this.i.billStatus !== '4' || this.i.billStatus !== '3', ui: { widget: 'upload', action: apiConf.fileUpload, @@ -213,6 +223,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { unloadingLadingBillFilePath: { type: 'string', title: '卸货凭证', + readOnly: this.i.billStatus !== '4' || this.i.billStatus !== '3', ui: { widget: 'upload', action: apiConf.fileUpload, @@ -251,6 +262,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { unloadingPeopleVehiclesGoodsFilePath: { type: 'string', title: '', + readOnly: this.i.billStatus !== '4' || this.i.billStatus !== '3', ui: { widget: 'upload', action: apiConf.fileUpload, @@ -331,6 +343,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { delete this.approvalLsit[key]; } }); + this.initSF(); // 对装货凭证进行初始化 let arr: any = []; res?.receiptFilePath.forEach((element: any, index: any) => { @@ -759,7 +772,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { placeholder: '请输入' } }, - loadPlanTime: { + loadTime: { type: 'string', title: '发车时间', ui: { @@ -767,7 +780,7 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { placeholder: '请输入' } }, - unloadPlanTime: { + unloadTime: { type: 'string', title: '到车时间', ui: { @@ -916,4 +929,60 @@ 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; + 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); + }); + } + } + }); + } + + // 获取司机轨迹 + 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'); + } } 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 4e5150a6..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-04 17:48:27 + * @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. --> @@ -46,7 +46,7 @@ {{ i?.goodsResource?.serviceTypeLabel }} {{ i?.createUserName || i?.goodsResource?.createUserName }} /{{ i?.createUserPhone || i?.goodsResource?.createUserPhone }} {{ i?.goodsResource?.dispatchName }}/{{ i?.goodsResource?.dispatchPhone }} - {{ i?.wayBillCode }} + {{ i?.externalBillCode }} {{ i?.resourceCode }} {{ i?.wayBillId }} {{ i?.goodsResource?.dispatchName }} @@ -173,19 +173,19 @@ {{ 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 }}
- + @@ -196,19 +196,19 @@
- +
- - + +
- +
- + diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts index c8674b7b..73f75c21 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-28 14:42:03 * @LastEditors : Shiming - * @LastEditTime : 2022-03-02 16:19:31 + * @LastEditTime : 2022-03-08 14:56:43 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -23,7 +23,9 @@ import { OrderManagementService } from '../../services/order-management.service' }) export class OrderManagementVehicleDetailComponent implements OnInit { id = this.route.snapshot.params.id; - MapList: any[]=[]; + trajectory = 'car'; + mapList:any[] = []; //地图点位数据组 + addressItems:any[] = []; //打点地址数据组 i: any = { unLoadingPlaceList: [], billExpenseDetails: [], @@ -36,13 +38,30 @@ export class OrderManagementVehicleDetailComponent implements OnInit { totalObj: any; approvalLsit: any; isVisible = false; - logColumns: STColumn[] = [ + logColumns2: STColumn[] = [ { title: '时间', index: 'vinOutTime' }, { title: '地点', index: 'cityName' }, ]; - trajectory = 'car'; - addressItems: any[] = []; //打点地址数据组 - + logColumns: STColumn[] = [ + { title: '款项', index: 'expenseCodeLabel' }, + { title: '小计(元)', render: 'price' }, + { title: '运输费(元)', render: 'price' }, + { title: '附加费(元)', render: 'surcharge' }, + { title: '支付时间', index: 'paymentTime' }, + { + title: '支付状态', + className: 'text-center', + index: 'paymentStatus', + type: 'badge', + width: '120px', + badge: { + '1': { text: '待申请', color: 'warning' }, + '2': { text: '已支付', color: 'success' }, + '3': { text: '已拒绝', color: 'warning' }, + '4': { text: '申请中', color: 'warning' } + } + } + ]; constructor( private route: ActivatedRoute, private msgSrv: NzMessageService, @@ -53,7 +72,7 @@ export class OrderManagementVehicleDetailComponent implements OnInit { ngOnInit(): void { this.initData(); - this.MapInit() + this.getTrajectory() } initData() { @@ -108,8 +127,8 @@ export class OrderManagementVehicleDetailComponent implements OnInit { // elf['elementRef'].nativeElement.className = 'target-fix' } } - // 获取轨迹 - MapInit() { + // 获取车辆轨迹 + getTrajectory(){ this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => { if (res) { const points = res.trackArray; @@ -120,8 +139,8 @@ export class OrderManagementVehicleDetailComponent implements OnInit { lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] }); }); - this.MapList = list; - this.addressItems = res.parkArray; + this.mapList = list; + this.addressItems = res.cityArray; if(this.addressItems && this.addressItems.length > 0){ this.addressItems.forEach(item => { item.vinOutTime = this.getLocalTime(item.vinOutTime); @@ -131,6 +150,36 @@ export class OrderManagementVehicleDetailComponent implements OnInit { }); } + // 获取司机轨迹 + 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'); } diff --git a/src/app/routes/order-management/modal/vehicle/modify-rate/modify-rate.component.html b/src/app/routes/order-management/modal/vehicle/modify-rate/modify-rate.component.html index fa6106e2..ad382091 100644 --- a/src/app/routes/order-management/modal/vehicle/modify-rate/modify-rate.component.html +++ b/src/app/routes/order-management/modal/vehicle/modify-rate/modify-rate.component.html @@ -4,20 +4,26 @@ * @Author : Shiming * @Date : 2021-12-29 14:51:07 * @LastEditors : Shiming - * @LastEditTime : 2022-02-10 10:19:34 + * @LastEditTime : 2022-03-08 13:21:35 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\vehicle\\modify-rate\\modify-rate.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> - - - {{item?.operator}}/{{item.telephone}} + + {{ item?.oldAdditionalRate? (item?.oldAdditionalRate * 100).toFixed(2) + '%' : ''}} + + + {{ item?.oldSurcharge | currency}} + + + {{ item?.newSurcharge | currency}}