diff --git a/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.html b/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.html index f1b614cb..5f082c34 100644 --- a/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.html +++ b/src/app/routes/financial-management/components/cost-management/cost-management-detail/cost-management-detail.component.html @@ -61,7 +61,7 @@ {{ (costInfo?.hrvatmoney || 0) | currency }} - {{ costInfo?.hrpaymoney | currency }} + {{ costInfo?.hrmoney | currency}} @@ -84,7 +84,9 @@ {{ item.hrmoney | currency}} - {{ item.armoney | currency}} + + {{ item.armoney | currency}} + {{ item.hrmoney | currency}} {{ item.arkpmoney | currency}} diff --git a/src/app/routes/financial-management/components/payable-order/payable-order-detail/payable-order-detail.component.ts b/src/app/routes/financial-management/components/payable-order/payable-order-detail/payable-order-detail.component.ts index 25e72be4..939ea639 100644 --- a/src/app/routes/financial-management/components/payable-order/payable-order-detail/payable-order-detail.component.ts +++ b/src/app/routes/financial-management/components/payable-order/payable-order-detail/payable-order-detail.component.ts @@ -41,7 +41,7 @@ export class PayableOrderDetailComponent implements OnInit { } beforeReq = (requestOptions: STRequestOptions) => { - Object.assign(requestOptions.body, { billHId: this.billHId }); + Object.assign(requestOptions.body, { phxHId: this.billHId }); if (this.sf) { Object.assign(requestOptions.body, { ...this.sf.value, @@ -159,14 +159,14 @@ export class PayableOrderDetailComponent implements OnInit { private initST(): STColumn[] { return [ { title: '序号', render: 'no', width: 80 }, - { title: '费用号', index: 'feeHCode', width: 100 }, + { title: '费用号', index: 'feeHCode', width: 140 }, { title: '费用日期', index: 'feedate', type: 'date', width: 150 }, - { title: '订单号', index: 'billHCode', width: 100 }, + { title: '订单号', index: 'billHCode', width: 140 }, { title: '订单日期', index: 'billTime', width: 150 }, { title: '费用类型', index: 'feetype', width: 90 }, { title: '订单费用科目', index: 'billLTypeLabel', width: 100 }, { title: '费用科目', index: 'feeSubIdName', width: 140 }, - { title: '结算客户', index: 'cnoName', width: 100 }, + { title: '结算客户', index: 'cnoName', width: 140 }, { title: '已收金额', index: 'phxmoney', diff --git a/src/app/routes/financial-management/components/payable-order/payable-order.component.ts b/src/app/routes/financial-management/components/payable-order/payable-order.component.ts index 66ceac3b..65872e27 100644 --- a/src/app/routes/financial-management/components/payable-order/payable-order.component.ts +++ b/src/app/routes/financial-management/components/payable-order/payable-order.component.ts @@ -263,7 +263,7 @@ export class PayableOrderComponent implements OnInit { { text: '浏览', click: item => - this.router.navigate(['/financial-management/payable-order/detail/' + item.id], { queryParams: { billHId: item.billHId } }) + this.router.navigate(['/financial-management/payable-order/detail/' + item.id], { queryParams: { billHId: item.id } }) } ] } diff --git a/src/app/routes/financial-management/components/payment-record/payment-record.component.html b/src/app/routes/financial-management/components/payment-record/payment-record.component.html index 38aa1e2f..5d57d415 100644 --- a/src/app/routes/financial-management/components/payment-record/payment-record.component.html +++ b/src/app/routes/financial-management/components/payment-record/payment-record.component.html @@ -36,7 +36,7 @@ {{ item.orderPaymentCode }}
{{ item.paymentStatusLabel }}
- 预付:{{ item.price | currency }}
+ {{item.costName}}:{{ item.price | currency }}
附加费: {{ item.surcharge| currency }} diff --git a/src/app/routes/financial-management/components/payment-record/payment-record.component.ts b/src/app/routes/financial-management/components/payment-record/payment-record.component.ts index a6383c75..39524123 100644 --- a/src/app/routes/financial-management/components/payment-record/payment-record.component.ts +++ b/src/app/routes/financial-management/components/payment-record/payment-record.component.ts @@ -258,6 +258,7 @@ export class PaymentRecordComponent implements OnInit { }); item.surcharge = surcharge.toFixed(2); item.price = item.amountDetails?.[0]?.price || 0; + item.costName = item.amountDetails?.[0]?.costName; return ''; } }, 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 b7d92a6a..de563b7b 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-01 13:42:44 + * @LastEditTime : 2022-03-04 14:15:24 * @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. --> @@ -34,7 +34,7 @@ {{ i?.goodsResource?.shipperAppUserName }} {{i?.goodsResource?.enterpriseProjectName}} {{i?.goodsResource?.serviceTypeLabel}} - {{i?.goodsResource?.createUserName}} /{{i?.goodsResource?.createUserPhone}} + {{i?.createUserName}} /{{i?.createUserPhone}} {{i?.goodsResource?.dispatchName}}/{{i?.goodsResource?.dispatchPhone}} @@ -42,7 +42,7 @@ - + @@ -125,7 +125,8 @@
- +
@@ -177,7 +178,7 @@
-
+ @@ -205,18 +206,7 @@ - - - + {{i?.goodsInfoList?.[0]?.weight}}吨,{{i?.goodsInfoList?.[0]?.volume}}方,{{i?.goodsInfoList?.[0]?.number}}件 @@ -271,9 +261,11 @@ - -

{{i?.goodsInfoList?.[0]?.freightPrice}}{{i?.goodsInfoList?.[0]?.freightTypeLabel}}(以发货为准,保留小数)

- + +
+

{{i?.goodsInfoList?.[0]?.freightPrice}}{{i?.goodsInfoList?.[0]?.freightTypeLabel}}({{ i?.goodsInfoList?.[0]?.settlementBasisLabel ? i?.goodsInfoList?.[0]?.settlementBasisLabel + ',' :' ' }}{{i?.goodsInfoList?.[0]?.ruleLabel}})

+ + 到付 {{ item.price | currency }} @@ -288,6 +280,7 @@
收款人:{{ i?.payeeName }}/{{ i?.payeePhone }}
+ @@ -352,17 +345,23 @@
- -
-
- -
-
- -
-
+ +
+
+ + +
+
+ +
+
+ + + + + +
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 86d1ae0f..8de03795 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-02-28 12:01:57 + * @LastEditTime : 2022-03-04 14:15:21 * @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. */ @@ -22,6 +22,7 @@ import { NzUploadChangeParam, NzUploadFile } from 'ng-zorro-antd/upload'; import { Observable, Observer } from 'rxjs'; import { apiConf } from '@conf/api.conf'; import { OrderManagementService } from '../../services/order-management.service'; +import format from 'date-fns/format'; import { NzCardComponent } from 'ng-zorro-antd/card'; import { map } from 'rxjs/operators'; function getBase64(file: File): Promise { @@ -40,7 +41,9 @@ 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; //路程总时间 @@ -66,29 +69,16 @@ loadTime: any; // 货源单设置回显 @ViewChild('sf4', { static: false }) sf4!: SFComponent; schema4: SFSchema = {}; isVisible = false; + billExpenses: any[] = []; //运费信息表格信息 + addressItems: any[] = []; //打点地址数据组 ui4!: SFUISchema; formData: any; @ViewChild('sf', { static: false }) sf!: SFComponent; schema: SFSchema = {}; ui: SFUISchema = {}; logColumns: STColumn[] = [ - { title: '款项', index: 'expenseName' }, - { 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' } - } - } + { title: '时间', index: 'vinOutTime' }, + { title: '地点', index: 'cityName' }, ]; constructor( private route: ActivatedRoute, @@ -319,8 +309,7 @@ loadTime: any; // 货源单设置回显 this.service.request(this.service.$api_getBulkBillDetail, {id: this.id}).subscribe(res => { if (res) { this.i = res; - 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.billExpenses = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TRA'); // 对装货凭证进行初始化 let arr : any= [] res?.receiptFilePath.forEach((element: any, index: any) => { @@ -438,7 +427,13 @@ loadTime: any; // 货源单设置回显 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; + }); + } } }) } @@ -516,6 +511,7 @@ loadTime: any; // 货源单设置回显 // -------------------装卸货信息处理 // 打开地图 // 打开地图 + // 打开地图 openMap(type: string, index: number) { const modalRef = this.modalService.create({ nzTitle: '', @@ -523,30 +519,32 @@ loadTime: any; // 货源单设置回显 nzWidth: 900, nzOnOk: item => { const poi = item.poi; - const locList = poi.pois; + const locList = poi.location.toString().split(','); switch (type) { case 'start': - this.startInfo[index].detailedAddress = poi.formattedAddress; + this.startInfo[index].detailedAddress = poi.district + poi.name; this.startInfo[index].longitude = locList[0]; this.startInfo[index].latitude = locList[1]; - this.startInfo[index].province = poi.addressComponent.province; - this.startInfo[index].city = poi.addressComponent.city; - this.startInfo[index].area = poi.addressComponent.district; + 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; break; case 'end': - this.endInfo[index].detailedAddress = poi.formattedAddress; + this.endInfo[index].detailedAddress = poi.district + poi.name; this.endInfo[index].longitude = locList[0]; this.endInfo[index].latitude = locList[1]; - this.endInfo[index].province = poi.addressComponent.province; - this.endInfo[index].city = poi.addressComponent.city; - this.endInfo[index].area = poi.addressComponent.district; + 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; break; default: break; } if (this.startInfo[0]?.area && this.endInfo[0]?.area) { - this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { + this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe((res: any) => { this.totalDistance = res.distance; this.totalTime = res.time; }); @@ -554,7 +552,6 @@ loadTime: any; // 货源单设置回显 } }); } - initSF3() { this.schema3 = { properties: { @@ -631,94 +628,6 @@ loadTime: any; // 货源单设置回显 } }; } - initSF4() { - this.schema4 = { - properties: { - weight: { - type: 'string', - title: '货物数量', - ui: { - widget: 'custom', - placeholder: '请输入', - errors: { required: '必填项' } - } - }, - volume: { - type: 'string', - title: '', - ui: { - widget: 'custom', - placeholder: '请输入' - } - }, - number: { - type: 'string', - title: '', - ui: { - widget: 'custom', - placeholder: '请输入' - } - }, - carModel: { - type: 'string', - title: '车型/车长', - ui: { - widget: 'select', - mode: 'multiple', - maxMultipleCount:3, - placeholder: '请选择车型', - errors: { required: '请选择车型' }, - asyncData: () => this.service.getDictOptions({ dictKey: 'car:model' }), - change:(tag:any , org:any)=>{ - if(tag.includes("999")){ - this.sf4.setValue('/carModel',["999"]); - } - } - } - }, - carLength: { - type: 'string', - title: '', - ui: { - widget: 'select', - mode: 'multiple', - maxMultipleCount:3, - placeholder: '请选择车长', - errors: { required: '请选择车长' }, - asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }), - change:(tag:any , org:any)=>{ - if(tag.includes("999")){ - this.sf4.setValue('/carModel',["999"]); - } - } - } - }, - }, - required: ['weight', 'carModel', 'carLength'] - }; - this.ui4 = { - '*': { - spanLabelFixed: 90, - grid: { span: 24 } - }, - $weight: { - grid: { lg: 8, md: 12, sm: 12, xs: 24 } - }, - $volume: { - grid: { lg: 8, md: 12, sm: 12, xs: 24 } - }, - $number: { - grid: { lg: 8, md: 12, sm: 12, xs: 24 } - }, - $carModel: { - spanLabelFixed: 100, - grid: { span: 8 } - }, - $carLength: { - grid: { span: 8 } - } - }; - } changeGoodsType(value: string, data: any) { if (data.label === '其它') return; const params = { @@ -745,165 +654,143 @@ changeGoodsType(value: string, data: any) { } }); } -// initSF4() { -// this.schema4 = { -// properties: { -// weight: { -// type: 'string', -// title: '货物数量', -// ui: { -// widget: 'custom', -// placeholder: '请输入', -// errors: { required: '必填项' } -// } -// }, -// volume: { -// type: 'string', -// title: '', -// ui: { -// widget: 'custom', -// placeholder: '请输入' -// } -// }, -// number: { -// type: 'string', -// title: '', -// ui: { -// widget: 'custom', -// placeholder: '请输入' -// } -// }, -// carmand: { -// type: 'string', -// title: '用车需求', -// ui: { -// widget: 'custom', -// placeholder: '请输入' -// } -// }, -// drivers: { -// type: 'string', -// title: '承运司机', -// ui: { -// widget: 'custom', -// placeholder: '请输入' -// } -// }, -// weightModel: { -// type: 'string', -// title: '车型车长承重', -// ui: { -// widget: 'custom', -// placeholder: '请输入' -// } -// }, -// loadTime: { -// type: 'string', -// title: '发车时间', -// ui: { -// widget: 'custom', -// placeholder: '请输入' -// } -// }, -// unloadTime: { -// type: 'string', -// title: '到车时间', -// ui: { -// widget: 'custom', -// placeholder: '请输入' -// } -// }, -// acceptWeight: { -// type: 'number', -// title: '装货重量', -// minimum:0, -// maximum:99999, -// ui: { -// unit: '吨', -// placeholder: '请输入', -// grid: { -// span: 12 -// }, -// hideStep: true, -// } as SFNumberWidgetSchema -// }, -// acceptVolume: { -// type: 'number', -// title: '装货体积', -// minimum:0, -// maximum:99999, -// ui: { -// unit: '吨', -// placeholder: '请输入', -// grid: { -// span: 12 -// }, -// hideStep: true, -// } as SFNumberWidgetSchema -// }, -// settlementWeight: { -// type: 'number', -// title: '卸货重量', -// minimum:0, -// maximum:99999, -// ui: { -// unit: '吨', -// placeholder: '请输入', -// grid: { -// span: 12 -// }, -// hideStep: true, -// } as SFNumberWidgetSchema -// }, -// settlementVolume: { -// type: 'number', -// title: '卸货体积', -// minimum:0, -// maximum:99999, -// ui: { -// unit: '吨', -// placeholder: '请输入', -// grid: { -// span: 12 -// }, -// hideStep: true, -// } as SFNumberWidgetSchema -// } -// }, -// required: ['weight','loadTime','unloadTime'] -// }; -// this.ui4 = { -// '*': { -// spanLabelFixed: 90, -// grid: { span: 24 } -// }, -// $weight: { -// grid: { span: 8 } -// }, -// $volume: { -// grid: { span: 8 } -// }, -// $number: { -// grid: { span: 8 } -// }, -// $carmand: { -// grid: { span: 24 } -// }, -// $weightModel: { -// spanLabelFixed: 120, -// grid: { span: 12 } -// }, -// $drivers: { -// grid: { span: 12 } -// }, -// $loadTime: { -// grid: { span: 12 } -// }, -// $unloadTime: { -// grid: { span: 12 } -// }, -// }; -// } +initSF4() { + this.schema4 = { + properties: { + weight: { + type: 'string', + title: '货物数量', + ui: { + widget: 'custom', + placeholder: '请输入', + errors: { required: '必填项' } + } + }, + carmand: { + type: 'string', + title: '用车需求', + ui: { + widget: 'custom', + placeholder: '请输入' + } + }, + drivers: { + type: 'string', + title: '承运司机', + ui: { + widget: 'custom', + placeholder: '请输入' + } + }, + weightModel: { + type: 'string', + title: '车型车长承重', + ui: { + widget: 'custom', + placeholder: '请输入' + } + }, + loadTime: { + type: 'string', + title: '发车时间', + ui: { + widget: 'custom', + placeholder: '请输入' + } + }, + unloadTime: { + type: 'string', + title: '到车时间', + ui: { + widget: 'custom', + placeholder: '请输入' + } + }, + acceptWeight: { + type: 'number', + title: '装货重量', + minimum:0, + maximum:99999, + ui: { + unit: '吨', + placeholder: '请输入', + grid: { + span: 12 + }, + hideStep: true, + } as SFNumberWidgetSchema + }, + acceptVolume: { + type: 'number', + title: '装货体积', + minimum:0, + maximum:99999, + ui: { + unit: '吨', + placeholder: '请输入', + grid: { + span: 12 + }, + hideStep: true, + } as SFNumberWidgetSchema + }, + settlementWeight: { + type: 'number', + title: '卸货重量', + minimum:0, + maximum:99999, + ui: { + unit: '吨', + placeholder: '请输入', + grid: { + span: 12 + }, + hideStep: true, + } as SFNumberWidgetSchema + }, + settlementVolume: { + type: 'number', + title: '卸货体积', + minimum:0, + maximum:99999, + ui: { + unit: '吨', + placeholder: '请输入', + grid: { + span: 12 + }, + hideStep: true, + } as SFNumberWidgetSchema + } + }, + required: ['loadTime','unloadTime'] + }; + this.ui4 = { + '*': { + spanLabelFixed: 90, + grid: { span: 24 } + }, + $weight: { + grid: { span: 24 } + }, + $carmand: { + grid: { span: 24 } + }, + $weightModel: { + spanLabelFixed: 120, + grid: { span: 12 } + }, + $drivers: { + grid: { span: 12 } + }, + $loadTime: { + grid: { span: 12 } + }, + $unloadTime: { + grid: { span: 12 } + }, + }; +} // 处理上传图片 handlePreview1 = async (file: NzUploadFile) => { if (!file.url && !file.preview) { @@ -970,4 +857,51 @@ goDistance(elf: NzCardComponent) { elf['elementRef'].nativeElement.scrollIntoView({ behavior: 'smooth', block: 'start', inline: 'start' }); } } + // 装卸货地址互换 + swapAddress() { + let item = this.startInfo; + this.startInfo = this.endInfo; + this.endInfo = item; + + this.startInfo.forEach((element: any) => { + element.type = '1'; + }); + this.endInfo.forEach((element: any) => { + element.type = '2'; + }); + + // 计算里程,时间 + 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; + }); + } + } + // 获取轨迹 + 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))] + }); + }); + 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'); + } } 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 3fa12800..7dd7c9c7 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-02 11:14:37 + * @LastEditTime : 2022-03-04 14:07:44 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail\\bulk-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -44,7 +44,7 @@ {{ i?.goodsResource?.shipperAppUserName }} {{ i?.goodsResource?.enterpriseProjectName }} {{ i?.goodsResource?.serviceTypeLabel }} - {{ i?.goodsResource?.createUserName }} /{{ i?.goodsResource?.createUserPhone }} + {{ i?.createUserName }} /{{ i?.createUserPhone }} {{ i?.goodsResource?.dispatchName }}/{{ i?.goodsResource?.dispatchPhone }} @@ -90,7 +90,7 @@ {{ i?.unloadPlanTime }} - {{ i?.acceptWeight }}吨,{{ i?.acceptVolume }}方,{{ i?.acceptNumber }}件 + {{ i?.acceptWeight }}吨,{{ i?.acceptVolume }}方 {{ i?.acceptWeight }}吨,{{ i?.acceptVolume }}方,{{ i?.acceptNumber }}件 {{ i?.settlementWeight }}吨,{{ i?.settlementVolume }}方,{{ i?.acceptNumber }}件 @@ -135,7 +135,8 @@ -

{{i?.goodsInfoList?.[0]?.freightPrice}}{{i?.goodsInfoList?.[0]?.freightTypeLabel}}(以发货为准,保留小数)

+
+

{{i?.goodsInfoList?.[0]?.freightPrice}}{{i?.goodsInfoList?.[0]?.freightTypeLabel}}({{ i?.goodsInfoList?.[0]?.settlementBasisLabel ? i?.goodsInfoList?.[0]?.settlementBasisLabel + ',' :' ' }}{{i?.goodsInfoList?.[0]?.ruleLabel}})

到付 @@ -152,6 +153,7 @@
收款人:{{ i?.payeeName }}/{{ i?.payeePhone }}
+
@@ -164,10 +166,10 @@ - + - + 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 69355b52..ff871426 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 @@ -34,23 +34,8 @@ export class OrderManagementBulkeDetailComponent implements OnInit { attObj: any; isVisible = false; logColumns: STColumn[] = [ - { title: '款项', index: 'costName', render: 'PriceType' }, - { 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' } - } - } + { title: '时间', index: 'vinOutTime' }, + { title: '地点', index: 'cityName' }, ]; trajectory = 'car'; addressItems: any[] = []; //打点地址数据组 @@ -71,9 +56,7 @@ export class OrderManagementBulkeDetailComponent implements OnInit { this.service.request(this.service.$api_getBulkBillDetail, { id: this.id }).subscribe(res => { if (res) { this.i = res; - console.log(this.i.billExpenseDetails ) this.billExpenses = this.i?.billExpenseDetails?.filter((data: any) => data.expenseCode === 'TRA'); - console.log(this.billExpenses ) this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data:any)=>data.displayStatus !=="HIDE"); } }); 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 4652ed26..5e54ff7d 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.ts +++ b/src/app/routes/order-management/components/bulk/bulk.component.ts @@ -690,7 +690,7 @@ export class OrderManagementBulkComponent implements OnInit { }; const params2 = { businessCode: item.billCode, - passiveUserId: item.shipperAppUserId + evaluateUserId: item.shipperAppUserId }; this.service.request(this.service.$api_getBillEvaluateByShipper, params).subscribe(res => { console.log(res); 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 55731648..37eae198 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-01 13:41:57 + * @LastEditTime : 2022-03-04 10:42:33 * @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. --> @@ -75,15 +75,12 @@ - @@ -115,7 +112,8 @@
- +
@@ -128,7 +126,7 @@ { + this.totalDistance = res.distance; + this.totalTime = res.time; + }); + } } }); } @@ -553,32 +560,36 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { } // -------------------装卸货信息处理 // 打开地图 - 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; @@ -593,7 +604,6 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { } }); } - initSF3() { this.schema3 = { properties: { @@ -874,4 +884,41 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit { } console.log(elf); } + // 装卸货地址互换 + swapAddress() { + this.startInfo.forEach((element: any, index: any) => { + this.validateForm1.removeControl(`loadAddress${index}`); + this.validateForm1.removeControl(`loadName${index}`); + this.validateForm1.removeControl(`loadPhone${index}`); + }); + this.endInfo.forEach((element: any, index: any) => { + this.validateForm1.removeControl(`unloadAddress${index}`); + this.validateForm1.removeControl(`unloadName${index}`); + this.validateForm1.removeControl(`unloadPhone${index}`); + }); + + let item = this.startInfo; + this.startInfo = this.endInfo; + this.endInfo = item; + + this.startInfo.forEach((element: any, index: any) => { + element.type = '1'; + this.validateForm1.addControl(`loadAddress${index}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`loadName${index}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`loadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])); + }); + this.endInfo.forEach((element: any, index: any) => { + element.type = '2'; + this.validateForm1.addControl(`unloadAddress${index}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`unloadName${index}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`unloadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])); + }); + // 计算里程,时间 + 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; + }); + } + } } diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.ts b/src/app/routes/order-management/components/vehicle/vehicle.component.ts index 69ef767a..7e4d5bbf 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.ts @@ -664,7 +664,7 @@ resourceStatus: any; } const params2 = { businessCode: item.billCode, - passiveUserId: item.shipperAppUserId, + evaluateUserId: item.shipperAppUserId, } this.service.request(this.service.$api_getBillEvaluateByShipper, params).subscribe(res => { console.log(res) diff --git a/src/app/routes/order-management/modal/bulk/confir-receipt/confir-receipt.component.html b/src/app/routes/order-management/modal/bulk/confir-receipt/confir-receipt.component.html index b1289919..bd2b7f0e 100644 --- a/src/app/routes/order-management/modal/bulk/confir-receipt/confir-receipt.component.html +++ b/src/app/routes/order-management/modal/bulk/confir-receipt/confir-receipt.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-14 15:02:52 * @LastEditors : Shiming - * @LastEditTime : 2022-03-02 13:43:55 + * @LastEditTime : 2022-03-04 09:38:45 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\modal\\bulk\\confir-receipt\\confir-receipt.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -34,18 +34,18 @@ nzMessage="签收后不可再修改运费,请确保运费等信息准确无误 -
{{detailList?.goodsInfoVO?.weight}}吨
+
{{ detailList?.loadWeight }}吨
-
{{detailList?.goodsInfoVO?.volume}}方
+
{{ detailList?.loadVolume }}方
- + -
{{detailList?.goodsInfoVO?.volume}}吨
+
{{ detailList?.settlementWeight }}吨
-
{{detailList?.settlementVolume}}方
+
{{ detailList?.settlementVolume }}方
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 fb348ad7..fa6106e2 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 @@ -10,6 +10,16 @@ --> + + + + {{item?.operator}}/{{item.telephone}} + +
- +
\ No newline at end of file diff --git a/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts b/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts index 05977ab4..843f11d8 100644 --- a/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts +++ b/src/app/routes/supply-management/components/tran-agreement/tran-agreement.component.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-02-24 20:19:51 * @LastEditors : Shiming - * @LastEditTime : 2022-02-28 20:55:59 + * @LastEditTime : 2022-03-04 16:46:31 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\tran-agreement\\tran-agreement.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -28,41 +28,108 @@ import { SupplyManagementService } from '../../services/supply-management.servic styleUrls: ['./tran-agreement.component.less'] }) export class TranAgreementComponent { - Object: any; + enterpriseInfo:any; // 网络货运人 + type:any; + object: any; agreement:any; + envCache:any; + shipperName:any; constructor(private modal: NzModalRef,public service: SupplyManagementService,) { } ngOnInit() { - console.log(Object) - const params = { + console.log(this.object) + // 获取托运人承运人信息 + this.service.request(this.service.$api_getContractAtr,{id:this.object?.shipperAppUserId}).subscribe(res => { + if (res) { + this.enterpriseInfo = res + this.getContent(); + } + }); + + + } + + getContent() { + let params:any; + if(this.type ==='onecar'){ + + params = { contractType:'1', - parametersDTO: { - // 回单付 - back: 'dsfgffdsg', - // 发货地址 - consignorAddress: 'gfdgdfdg', - // 发货时间 - consignorDate: 'dsggdsgsfgds', - // 发货时间 - // consignorDate: '', - - }, resourceType: '1', signingObject: '1', templateType: 'MX', + parametersDTO: { + contractCode:'', + shipperLegalPersonName:this.enterpriseInfo.legalPersonName, //托运法定代表人 + carrierLegalPersonName:this.enterpriseInfo.netLegalPersonName, //承运法定代表人 + shipperName:this?.shipperName, //托运人 + carrierName:this.object?.enterpriseInfoName, //承运人 + consignorInfo: `${this.object?.unLoadingPlaceDTOList[0].appUserName} ${this.object?.unLoadingPlaceDTOList[0].contractTelephone}`, // 发货信息 + consignorAddress: this.object?.unLoadingPlaceDTOList[0].detailedAddress, // 发货地址 + consignorDate: this.object?.loadingTime, // 发货时间 + consigneeInfo: `${this.object?.unLoadingPlaceDTOList[this.object?.unLoadingPlaceDTOList.length-1].appUserName} ${this.object?.unLoadingPlaceDTOList[this.object?.unLoadingPlaceDTOList.length-1].contractTelephone}`, // 收货信息 + consigneeDate: this.object?.unloadingTime, // 收货时间 + consigneeAddress: this.object?.unLoadingPlaceDTOList[this.object?.unLoadingPlaceDTOList.length-1].detailedAddress, // 收货地址 + goodsName:this.object?.goodsInfoDTOList[0].goodsName, // 货物名称 + shippingType:'整车运输', + consignmentVolume:`${this.object?.goodsInfoDTOList[0].weight}吨/${this.object?.goodsInfoDTOList[0].volume}方/${this.object?.goodsInfoDTOList[0].number}件`, //托运量 + transporterInfo:'', //运输方信息 + freightAmount:this.object?.total, // 订单运费金额(元) + pre:this.object?.expenseDTOList?.filter((item:any) => item.expenseCode === 'PRE')[0].price, //预付 + rece:this.object?.expenseDTOList?.filter((item:any) => item.expenseCode === 'RECE')[0].price,// 到付 + back:this.object?.expenseDTOList?.filter((item:any) => item.expenseCode === 'BACK')[0].price,// 回单付 + lunarKnot:0, + total:this.object?.subtotal, // 合计(元) + paymentTime:`到货后${this.object?.paymentDays}天`, // 承诺支付运费时间 + year:new Date().getFullYear(), // 签约年份 + month:new Date().getMonth()+1, // 签约月份 + day:new Date().getDate(), // 签约日期 + } + } + } else if(this.type ==='bulk'){ + params = { + contractType:'1', + resourceType: '2', + signingObject: '1', + templateType: 'MX', + parametersDTO: { + contractCode:'', + shipperName:this?.shipperName, //托运人 + carrierName:this.object?.enterpriseInfoName, //承运人 + shipperLegalPersonName:this.enterpriseInfo.legalPersonName, //托运法定代表人 + carrierLegalPersonName:this.enterpriseInfo.netLegalPersonName, //承运法定代表人 + consignorInfo: `${this.object.unLoadingPlaceDTOList[0].appUserName} ${this.object.unLoadingPlaceDTOList[0].contractTelephone}`, // 发货信息 + consignorAddress: this.object.unLoadingPlaceDTOList[0].detailedAddress, // 发货地址 + consignorDate: '', // 发货时间 + consigneeInfo: `${this.object.unLoadingPlaceDTOList[this.object.unLoadingPlaceDTOList.length-1].appUserName} ${this.object.unLoadingPlaceDTOList[this.object.unLoadingPlaceDTOList.length-1].contractTelephone}`, // 收货信息 + consigneeDate: '', // 收货时间 + consigneeAddress: this.object.unLoadingPlaceDTOList[this.object.unLoadingPlaceDTOList.length-1].detailedAddress, // 收货地址 + goodsName:this.object.goodsInfoDTOList[0].goodsName, // 货物名称 + shippingType:'大宗运输', + consignmentVolume:`${this.object.goodsInfoDTOList[0].weight}吨/${this.object.goodsInfoDTOList[0].volume}方/${this.object.goodsInfoDTOList[0].number}车`, //托运量 + transporterInfo:'', //运输方信息 + freightAmount:'', // 订单运费金额(元) + pre:'', //预付 + rece:'',// 到付 + back:'',// 回单付 + lunarKnot:'', + total:'', // 合计(元) + paymentTime:`到货后${this.object.paymentDays}天`, // 承诺支付运费时间 + year:new Date().getFullYear(), // 签约年份 + month:new Date().getMonth()+1, // 签约月份 + day:new Date().getDate(), // 签约日期 + }, + } } console.log(params) - this.service.request(this.service.$api_getContractContent,params).subscribe((res) => { if (res) { - this.agreement = res.contractContent; } }); } - handleOk(){ this.modal.close(true); } diff --git a/src/app/routes/supply-management/components/update-price/update-price.component.html b/src/app/routes/supply-management/components/update-price/update-price.component.html index 43523177..490015a8 100644 --- a/src/app/routes/supply-management/components/update-price/update-price.component.html +++ b/src/app/routes/supply-management/components/update-price/update-price.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-03 11:10:14 * @LastEditors : Shiming - * @LastEditTime : 2022-02-16 15:02:33 + * @LastEditTime : 2022-03-04 14:37:19 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\update-price\\update-price.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -25,12 +25,15 @@

变更日志

- - - {{item.operator}}/ - {{item.telephone}} - - + + + {{item?.operator}}/{{item.telephone}} + +
{{ freightType[i?.freightType] }} 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 28c6636e..9429b4ee 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 @@ -159,10 +159,10 @@ {{ i?.insuranceTypeLabel }} - + {{ i?.goodsValue | currency }} - {{ i?.insurancePremium | currency }} 元 + {{ i?.insurancePremium | currency }} 元 @@ -213,7 +213,7 @@ diff --git a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.ts b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.ts index ce6a9c05..4edb9f14 100644 --- a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.ts +++ b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.ts @@ -53,7 +53,7 @@ export class SupplyManagementVehicleDetailComponent implements OnInit { get reqParams() { return { operateObject: this.i?.resourceCode, - operateType: 4, + operateTypeList: [4,7], }; } constructor( diff --git a/src/app/routes/supply-management/components/vehicle/vehicle.component.html b/src/app/routes/supply-management/components/vehicle/vehicle.component.html index 7baaf88d..3bae6a1a 100644 --- a/src/app/routes/supply-management/components/vehicle/vehicle.component.html +++ b/src/app/routes/supply-management/components/vehicle/vehicle.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-03-01 13:12:12 + * @LastEditTime : 2022-03-04 09:57:16 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\vehicle\\vehicle.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -31,7 +31,7 @@ [acl-ability]="['SUPPLY-INDEX-vehicleSearch']" >查询 - + - +
已选择 {{ selectedRows.length }} 条数据   开票金额总计 this.router.navigate(['/ticket/invoice-list/detail/' + item.id], { - queryParams: { expressno: item.expressno } + queryParams: { expressno: item.expressno, type: 2 } }) }, { diff --git a/src/app/routes/usercenter/components/driver/detail/detail.component.html b/src/app/routes/usercenter/components/driver/detail/detail.component.html index b70f5df7..53d25019 100644 --- a/src/app/routes/usercenter/components/driver/detail/detail.component.html +++ b/src/app/routes/usercenter/components/driver/detail/detail.component.html @@ -94,16 +94,23 @@ - - - - - + + + + - + + + + + + + + +
- + + + + - + + + + + + + + + + @@ -192,17 +215,7 @@ - - - - - - - + @@ -214,6 +227,24 @@ {{licenseDetail?.regionCodeName }} + + + + - + + + + + + + + + + + @@ -262,10 +293,10 @@ 银行结算信息 - {{ detailData?.name }} + {{ userIdentityDetail?.name }} - {{ detailData?.certificateNumber }} + {{ userIdentityDetail?.certificateNumber }} diff --git a/src/app/routes/usercenter/components/driver/detail/detail.component.ts b/src/app/routes/usercenter/components/driver/detail/detail.component.ts index df824556..bb13924b 100644 --- a/src/app/routes/usercenter/components/driver/detail/detail.component.ts +++ b/src/app/routes/usercenter/components/driver/detail/detail.component.ts @@ -312,6 +312,11 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit { return; } } + if (!licenseDetail.licenseNo || !licenseDetail.regionCode || !licenseDetail.validStartTime) { + this.service.msgSrv.warning('请完善从业资格证信息'); + return; + } + const params: any = { userId: this.route.snapshot.params.id, mobile: this.userDetail?.phone, @@ -332,27 +337,8 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit { driverDetail.validStartTime?.length === 10 ? driverDetail.validStartTime : this.datePipe.transform(driverDetail.validStartTime, 'yyyy-MM-dd') - } - // userPracticeSeniorityDTO: { - // appUserId: licenseDetail.appUserId || this.route.snapshot.params.id, - // approvalStatus: licenseDetail.approvalStatus, - // certificatePhoto: licenseDetail.certificatePhoto, - // certificatePhotoWatermark: licenseDetail.certificatePhotoWatermark, - // id: licenseDetail.id, - // licenseNo: licenseDetail.licenseNo, - // regionCode: licenseDetail.regionCode, - // validEndTime: - // licenseDetail.validEndTime?.length === 10 - // ? licenseDetail.validEndTime - // : this.datePipe.transform(licenseDetail.validEndTime, 'yyyy-MM-dd'), - // validStartTime: - // licenseDetail.validStartTime?.length === 10 - // ? licenseDetail.validStartTime - // : this.datePipe.transform(licenseDetail.validStartTime, 'yyyy-MM-dd') - // } - }; - if (licenseDetail.approvalStatus && licenseDetail.licenseNo && licenseDetail.regionCode) { - params.userPracticeSeniorityDTO = { + }, + userPracticeSeniorityDTO: { appUserId: licenseDetail.appUserId || this.route.snapshot.params.id, approvalStatus: licenseDetail.approvalStatus, certificatePhoto: licenseDetail.certificatePhoto, @@ -368,8 +354,27 @@ export class UserCenterComponentsDriverDetailComponent implements OnInit { licenseDetail.validStartTime?.length === 10 ? licenseDetail.validStartTime : this.datePipe.transform(licenseDetail.validStartTime, 'yyyy-MM-dd') - }; - } + } + }; + // if (licenseDetail.approvalStatus && licenseDetail.licenseNo && licenseDetail.regionCode) { + // params.userPracticeSeniorityDTO = { + // appUserId: licenseDetail.appUserId || this.route.snapshot.params.id, + // approvalStatus: licenseDetail.approvalStatus, + // certificatePhoto: licenseDetail.certificatePhoto, + // certificatePhotoWatermark: licenseDetail.certificatePhotoWatermark, + // id: licenseDetail.id, + // licenseNo: licenseDetail.licenseNo, + // regionCode: licenseDetail.regionCode, + // validEndTime: + // licenseDetail.validEndTime?.length === 10 + // ? licenseDetail.validEndTime + // : this.datePipe.transform(licenseDetail.validEndTime, 'yyyy-MM-dd'), + // validStartTime: + // licenseDetail.validStartTime?.length === 10 + // ? licenseDetail.validStartTime + // : this.datePipe.transform(licenseDetail.validStartTime, 'yyyy-MM-dd') + // }; + // } console.log(params); this.service.request(this.service.$api_update_driver_license, params).subscribe(res => { if (res) { diff --git a/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.ts b/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.ts index 6f115213..c9fa67f7 100644 --- a/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.ts +++ b/src/app/routes/usercenter/components/freight/freight-config/freight-config.component.ts @@ -270,21 +270,21 @@ export class FreightConfigComponent implements OnInit { { title: '货源单费率', className: 'text-right', - index: 'contractSurchargeRatio', - width: 130, - format: item => `${item.contractSurchargeRatio}%` - }, - { - title: '合同单费率', - className: 'text-right', index: 'goodsSurchargeRatio', width: 130, format: item => `${item.goodsSurchargeRatio}%` }, + { + title: '合同单费率', + className: 'text-right', + index: 'contractSurchargeRatio', + width: 130, + format: item => `${item.contractSurchargeRatio}%` + }, { title: '合同单业务量(元)', index: 'contractQuota', - width: 160, + width: 170, type: 'widget', className: 'text-right', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.contractQuota }) } @@ -292,7 +292,7 @@ export class FreightConfigComponent implements OnInit { { title: '货源单业务量(元)', index: 'goodsQuota', - width: 160, + width: 170, type: 'widget', className: 'text-right', widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.goodsQuota }) } diff --git a/src/app/routes/usercenter/usercenter-routing.module.ts b/src/app/routes/usercenter/usercenter-routing.module.ts index 3f11ed47..9754d2e4 100644 --- a/src/app/routes/usercenter/usercenter-routing.module.ts +++ b/src/app/routes/usercenter/usercenter-routing.module.ts @@ -14,19 +14,17 @@ import { UserCenterComponentsDriverDetailComponent } from './components/driver/d import { UserCenterComponentsDriverConfigComponent } from './components/driver/driver-config/driver-config.component'; import { UserCenterComponentsDriverComponent } from './components/driver/driver.component'; import { FreightComponentsEnterpriseAuditComponent } from './components/freight/enterprise-audit/enterprise-audit.component'; -import { FreightComponentsEnterpriseAuditViewComponent } from './components/freight/enterprise-audit/view/view.component'; import { FreightConfigComponent } from './components/freight/freight-config/freight-config.component'; import { FreightComponentsListDetailComponent } from './components/freight/list/detail/detail.component'; import { FreightComponentsListComponent } from './components/freight/list/list.component'; import { FreightComponentsListNewComponent } from './components/freight/list/new/new.component'; -import { FreightComponentsListViewComponent } from './components/freight/list/view/view.component'; import { FreightComponentsUserDetailComponent } from './components/freight/user/detail/detail.component'; import { FreightComponentsUserComponent } from './components/freight/user/user.component'; const routes: Routes = [ { path: 'freight/list', component: FreightComponentsListComponent, data: { guard: { ability: ['USERCENTER-FREIGHT-LIST-list'] } } }, - { path: 'freight/list/view/:id', component: FreightComponentsListViewComponent }, + // { path: 'freight/list/view/:id', component: FreightComponentsListViewComponent }, { path: 'freight/list/new', component: FreightComponentsListNewComponent, data: { guard: { ability: ['USERCENTER-FREIGHT-NEW-save'] } } }, { path: 'freight/list/detail/:id', diff --git a/src/app/routes/usercenter/usercenter.module.ts b/src/app/routes/usercenter/usercenter.module.ts index 3a0ea35c..1cc35d5b 100644 --- a/src/app/routes/usercenter/usercenter.module.ts +++ b/src/app/routes/usercenter/usercenter.module.ts @@ -12,11 +12,9 @@ import { UserCenterComponentsDriverCaptainComponent } from './components/driver/ import { UserCenterComponentsDriverDetailComponent } from './components/driver/detail/detail.component'; import { UserCenterComponentsDriverComponent } from './components/driver/driver.component'; import { FreightComponentsEnterpriseAuditComponent } from './components/freight/enterprise-audit/enterprise-audit.component'; -import { FreightComponentsEnterpriseAuditViewComponent } from './components/freight/enterprise-audit/view/view.component'; import { FreightComponentsListDetailComponent } from './components/freight/list/detail/detail.component'; import { FreightComponentsListComponent } from './components/freight/list/list.component'; import { FreightComponentsListNewComponent } from './components/freight/list/new/new.component'; -import { FreightComponentsListViewComponent } from './components/freight/list/view/view.component'; import { FreightComponentsUserDetailComponent } from './components/freight/user/detail/detail.component'; import { FreightComponentsUserComponent } from './components/freight/user/user.component'; import { UsercenterRoutingModule } from './usercenter-routing.module'; @@ -29,11 +27,11 @@ import { UserCenterComponentsDriverConfigComponent } from './components/driver/d const COMPONENTS = [ FreightComponentsListComponent, - FreightComponentsListViewComponent, + // FreightComponentsListViewComponent, FreightComponentsListNewComponent, FreightComponentsListDetailComponent, FreightComponentsEnterpriseAuditComponent, - FreightComponentsEnterpriseAuditViewComponent, + // FreightComponentsEnterpriseAuditViewComponent, FreightComponentsUserComponent, FreightComponentsUserDetailComponent, UserCenterComponentsDriverComponent, diff --git a/src/app/shared/components/amap/amap-poi-picker/amap-poi-picker.component.ts b/src/app/shared/components/amap/amap-poi-picker/amap-poi-picker.component.ts index fb9441d3..3dd17484 100644 --- a/src/app/shared/components/amap/amap-poi-picker/amap-poi-picker.component.ts +++ b/src/app/shared/components/amap/amap-poi-picker/amap-poi-picker.component.ts @@ -1,5 +1,5 @@ import AMapLoader from '@amap/amap-jsapi-loader'; -import { Component, OnInit, ViewChild } from '@angular/core'; +import { ChangeDetectorRef, Component, Input, OnInit, ViewChild } from '@angular/core'; import { amapConf } from '@conf/amap.config'; import { NzModalRef } from 'ng-zorro-antd/modal'; import { throwError } from 'rxjs'; @@ -27,7 +27,10 @@ export class AmapPoiPickerComponent implements OnInit { infoWindow: any; geocoder: any; - constructor(private modalRef: NzModalRef, private service: AmapService) {} + @Input() + selectedAddress!: string; + + constructor(private modalRef: NzModalRef, private service: AmapService, private cdr: ChangeDetectorRef) {} ngOnInit(): void { this.mapInit(); // this.PoiPicker(); @@ -77,12 +80,12 @@ export class AmapPoiPickerComponent implements OnInit { // 地图创建成功 this.aMap.on('complete', () => { + console.log('地图创建成功'); + this.cdr.detectChanges(); this.poiPickerReady(poiPicker); }); this.aMap.on('click', (e: any) => { - console.log(e); - this.selectedPOI(e.lnglat); }); }) @@ -113,12 +116,21 @@ export class AmapPoiPickerComponent implements OnInit { radius: 1000 //范围,默认:500 }); - // 获取当前定位 - this.service.getCurrentPosition().subscribe(res => { - if (res) { - this.selectedPOI(res.position); - } - }); + if (this.selectedAddress) { + this.geocoder.getLocation(this.selectedAddress, (status: any, result: any) => { + if (status === 'complete' && result.info === 'OK') { + // result中对应详细地理坐标信息 + this.selectedPOI(result.geocodes?.[0].location); + } + }); + } else { + // 获取当前定位 + this.service.getCurrentPosition().subscribe(res => { + if (res) { + this.selectedPOI(res.position); + } + }); + } //选取了某个POI poiPicker.on('poiPicked', (poiResult: any) => {