diff --git a/src/app/routes/contract-management/components/contract-frame/contract-frame.component.ts b/src/app/routes/contract-management/components/contract-frame/contract-frame.component.ts index 517ec984..0a13f444 100644 --- a/src/app/routes/contract-management/components/contract-frame/contract-frame.component.ts +++ b/src/app/routes/contract-management/components/contract-frame/contract-frame.component.ts @@ -33,37 +33,37 @@ export class ContractManagementFrameComponent implements OnInit { private router: Router, public shipperservice: ShipperBaseService, private datePipe: DatePipe, - ) {} + ) { } ngOnInit(): void { this.initST(); this.initSF(); } - /** - * 查询参数 - */ - get reqParams() { - const params = { - ...this.sf?.value, - } - delete params.signTime; - delete params._$expand; - if(this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')) { - params.signTime = { - start: this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss'), - end: this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss'), - } - } - if(this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss')) { - params.effectiveEndTime = { - start: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss'), - end: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss'), - } - } - return { - ...params - }; + /** +* 查询参数 +*/ + get reqParams() { + const params = { + ...this.sf?.value, } + delete params.signTime; + delete params._$expand; + if (this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss')) { + params.signTime = { + start: this.datePipe.transform(this.sf?.value?.signTime?.[0], 'yyyy-MM-dd HH:mm:ss'), + end: this.datePipe.transform(this.sf?.value?.signTime?.[1], 'yyyy-MM-dd HH:mm:ss'), + } + } + if (this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss') && this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss')) { + params.effectiveEndTime = { + start: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[0], 'yyyy-MM-dd HH:mm:ss'), + end: this.datePipe.transform(this.sf?.value?.effectiveEndTime?.[1], 'yyyy-MM-dd HH:mm:ss'), + } + } + return { + ...params + }; + } /** * 初始化数据列表 */ @@ -91,7 +91,7 @@ export class ContractManagementFrameComponent implements OnInit { title: '合同名称', width: '100px', className: 'text-center', - index: 'templateName' + index: 'contractName' }, { title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' }, { title: '合同对象', index: 'contractObjectName', width: '120px', className: 'text-center' }, @@ -157,7 +157,7 @@ export class ContractManagementFrameComponent implements OnInit { widget: 'dict-select', containsAllLable: true, params: { dictKey: 'contract:type' }, - containAllLable:true, + containAllLable: true, } as SFSelectWidgetSchema, }, enterpriseInfoId: { @@ -210,7 +210,7 @@ export class ContractManagementFrameComponent implements OnInit { widget: 'dict-select', containsAllLable: true, params: { dictKey: 'esign:flow:status' }, - containAllLable:true, + containAllLable: true, visibleIf: { _$expand: (value: boolean) => value, }, @@ -238,9 +238,9 @@ export class ContractManagementFrameComponent implements OnInit { } } - approval(): void {} + approval(): void { } - add(): void {} + add(): void { } routeTo(item: any) { this.router.navigate(['/ticket/invoice-requested-detail/1']); diff --git a/src/app/routes/contract-management/components/contract-list/contract-list.component.html b/src/app/routes/contract-management/components/contract-list/contract-list.component.html index 2c054c6a..0876e5cf 100644 --- a/src/app/routes/contract-management/components/contract-list/contract-list.component.html +++ b/src/app/routes/contract-management/components/contract-list/contract-list.component.html @@ -30,7 +30,7 @@
+ (click)="st?.load(1)" acl [acl-ability]="['CONTRACT-INDEX-searchDetail']">查询
- + - {{ item?.contractCode }} + {{ item?.contractCode }} + - - + + diff --git a/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.html b/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.html index ff37b3f7..7246f2c3 100644 --- a/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.html +++ b/src/app/routes/contract-management/components/contract-template-frame/contract-template-frame.component.html @@ -75,7 +75,8 @@ [loading]="false" > - {{ item.templateName }} + {{ item.templateName }} + 货主 diff --git a/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.html b/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.html index 1ecef42c..235be94d 100644 --- a/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.html +++ b/src/app/routes/contract-management/components/contract-template-partner/contract-template-partner.component.html @@ -75,7 +75,8 @@ [loading]="false" > - {{ item.templateName }} + {{ item.templateName }} + diff --git a/src/app/routes/datatable/reporting/components/fund-reporting/fund-reporting.component.html b/src/app/routes/datatable/reporting/components/fund-reporting/fund-reporting.component.html index 32f56a3b..eee013ee 100644 --- a/src/app/routes/datatable/reporting/components/fund-reporting/fund-reporting.component.html +++ b/src/app/routes/datatable/reporting/components/fund-reporting/fund-reporting.component.html @@ -34,13 +34,13 @@ {{item?.verifyStatusLabel}} - {{item?.verifyStatusLabel}} + {{item?.verifyStatusLabel}} - {{item?.orderCode}} + {{item?.orderCode}} - {{item?.wayBillCode}} + {{item?.wayBillCode}}
{{item?.tolalAmount | currency }}
diff --git a/src/app/routes/datatable/reporting/components/fund-reporting/fund-reporting.component.ts b/src/app/routes/datatable/reporting/components/fund-reporting/fund-reporting.component.ts index 1b75e714..8e443762 100644 --- a/src/app/routes/datatable/reporting/components/fund-reporting/fund-reporting.component.ts +++ b/src/app/routes/datatable/reporting/components/fund-reporting/fund-reporting.component.ts @@ -163,9 +163,9 @@ export class DatatableFundReportingComponent implements OnInit { title: '本地校验', type: 'string', enum: [ - { label: '校验中', value: 0 }, - { label: '通过', value: 1 }, - { label: '不通过', value: 2 } + { label: '校验中', value: '0' }, + { label: '通过', value: '1' }, + { label: '不通过', value: '2' } ], ui: { placeholder: '请选择', @@ -465,6 +465,23 @@ export class DatatableFundReportingComponent implements OnInit { } } + routeToOrder(item: any) { + if (item.orderType === '1') { + window.open(location.origin + `/#/order-management/vehicle/vehicle-detail/${item.orderId}`); + } else { + window.open(location.origin + `/#/order-management/bulk/bulk-detail/${item.orderId}`); + } + } + + routeTowaybill(item: any) { + if (item.orderType === '1') { + window.open(location.origin + `/#/waybill-management/vehicle/vehicle-detail/${item.wayBillId}`); + + } else { + window.open(location.origin + `/#/waybill-management/bulk/bulk-detail/${item.wayBillId}`); + + } + } } diff --git a/src/app/routes/datatable/reporting/components/order-reporting/order-reporting.component.html b/src/app/routes/datatable/reporting/components/order-reporting/order-reporting.component.html index df751a97..be7285cc 100644 --- a/src/app/routes/datatable/reporting/components/order-reporting/order-reporting.component.html +++ b/src/app/routes/datatable/reporting/components/order-reporting/order-reporting.component.html @@ -49,10 +49,10 @@
- {{item?.billCode}} + {{item?.billCode}} - {{item?.wayBillCode}} + {{item?.wayBillCode}} diff --git a/src/app/routes/datatable/reporting/components/order-reporting/order-reporting.component.ts b/src/app/routes/datatable/reporting/components/order-reporting/order-reporting.component.ts index af13dbb0..0de0aa39 100644 --- a/src/app/routes/datatable/reporting/components/order-reporting/order-reporting.component.ts +++ b/src/app/routes/datatable/reporting/components/order-reporting/order-reporting.component.ts @@ -594,4 +594,22 @@ export class DatatableOrderReportingComponent implements OnInit { } } + routeToOrder(item: any) { + if (item.billType === '1') { + window.open(location.origin + `/#/order-management/vehicle/vehicle-detail/${item.orderId}`); + } else { + window.open(location.origin + `/#/order-management/bulk/bulk-detail/${item.orderId}`); + } + } + + routeTowaybill(item: any) { + if (item.billType === '1') { + window.open(location.origin + `/#/waybill-management/vehicle/vehicle-detail/${item.waybillId}`); + + } else { + window.open(location.origin + `/#/waybill-management/bulk/bulk-detail/${item.waybillId}`); + + } + } + } diff --git a/src/app/routes/datatable/reporting/components/view-track/view-track.component.ts b/src/app/routes/datatable/reporting/components/view-track/view-track.component.ts index 1cb10886..5b136434 100644 --- a/src/app/routes/datatable/reporting/components/view-track/view-track.component.ts +++ b/src/app/routes/datatable/reporting/components/view-track/view-track.component.ts @@ -50,10 +50,10 @@ export class DatatableReportingvViewTrackComponent implements OnInit { }); }); this.mapList = list; - this.addressItems = [...res.cityArray]; + this.addressItems = [...res.parkArray]; if (this.addressItems && this.addressItems.length > 0) { this.addressItems.forEach(item => { - item.vinOutTime = this.getLocalTime(item.vinOutTime); + item.parkBte = this.getLocalTime(item.parkBte); }); } } @@ -78,7 +78,7 @@ export class DatatableReportingvViewTrackComponent implements OnInit { this.addressItems = [...res.enclosureDataAppTrack]; if (this.addressItems && this.addressItems.length > 0) { this.addressItems.forEach(item => { - item.vinOutTime = item.vinOutTime ? this.getLocalTime(item.gtm) : ''; + item.parkBte = item.parkBte ? this.getLocalTime(item.parkBte) : ''; item.cityName = item.appAdress; }); } diff --git a/src/app/routes/financial-management/components/voucher-summary/voucher-summary.component.html b/src/app/routes/financial-management/components/voucher-summary/voucher-summary.component.html index bd2dffe4..0c1d57e9 100644 --- a/src/app/routes/financial-management/components/voucher-summary/voucher-summary.component.html +++ b/src/app/routes/financial-management/components/voucher-summary/voucher-summary.component.html @@ -13,12 +13,13 @@
-
+
-
+
- +
diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.less b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.less index 193ba9aa..6afafe32 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.less +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.less @@ -3,10 +3,35 @@ nz-input-number { width: 100%; } + nz-date-picker { width: 100%; } + + .sf3 { + .goods_Tips_item { + .goods_tips { + width: calc(50% - 60px); + + .ant-alert { + padding: 4px; + } + + } + + nz-form-item { + margin-bottom: 8px; + } + + // .ant-form-item-control-input-content { + // display: flex; + // justify-content: end; + // } + } + } } + + i { cursor: pointer; } @@ -34,7 +59,10 @@ padding: 24px; color: #7d7d7d; font-size: 30px; - :hover{color: #52acff;} + + :hover { + color: #52acff; + } } #container { @@ -45,6 +73,7 @@ input[type='number'] { -moz-appearance: textfield; } + input[type='number']::-webkit-inner-spin-button, input[type='number']::-webkit-outer-spin-button { margin: 0; diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts index 722bb487..abcbe7da 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts @@ -210,6 +210,17 @@ export class SupplyManagementBulkPublishComponent implements OnInit { initSF3() { this.schema3 = { properties: { + goodsTips: { + type: 'string', + title: '', + ui: { + widget: 'custom', + class: 'goods_Tips_item', + // visibleIf: { + // goodsTypeName: (value: any) => value && value === '其它' + // } + } + }, goodsTypeId: { type: 'string', title: '货物名称', @@ -271,6 +282,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit { errors: { required: '请填写货物名称' }, visibleIf: { goodsTypeName: (value: any) => value && value === '其它' + }, + blur: (value: any) => { + this.checkGoodsName(); } } } @@ -281,6 +295,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit { '*': { spanLabelFixed: 90, grid: { span: 12 } + }, + $goodsTips: { + grid: { span: 24 } } }; } @@ -583,7 +600,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit { } subStartInfo(event: any, index: number, id?: any) { if (id) { - this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => {}); + this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => { }); } this.startInfo.splice(index, 1); this.validateForm1.removeControl(`loadAddress${index}`); @@ -611,7 +628,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit { } subEndInfo(event: any, index: number, id?: any) { if (id) { - this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => {}); + this.service.request(this.service.$api_delete_Wholedeletebatch, [id]).subscribe(res => { }); } this.endInfo.splice(index, 1); this.validateForm1.removeControl(`unloadAddress${index}`); @@ -838,43 +855,43 @@ export class SupplyManagementBulkPublishComponent implements OnInit { nzContent: AmapPoiPickerComponent, nzWidth: 900, nzOnOk: item => { - if(item?.poi) { - const poi = item.poi; - const locList = poi.location.toString().split(','); - switch (type) { - case 'start': - 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.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.district + poi.name; - 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; - break; - default: - break; - } + if (item?.poi) { + const poi = item.poi; + const locList = poi.location.toString().split(','); + switch (type) { + case 'start': + 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.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.district + poi.name; + 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; + break; + default: + break; + } - 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; - }); + 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; + }); + } + return true + } else { + this.service.msgSrv.warning('请重新手动选择地址!') + return false } - return true - } else { - this.service.msgSrv.warning('请重新手动选择地址!') - return false - } } }); } @@ -1127,4 +1144,16 @@ export class SupplyManagementBulkPublishComponent implements OnInit { }; }); } + checkGoodsName() { + this.service.request(this.service.$api_checkGoodsName, this.sf3.value.goodsName1).subscribe(res => { + if (res === false) { + const modalRef = this.modalService.error({ + nzTitle: '货物名称含有违禁词,请重新输入!', + }); + modalRef.afterClose.subscribe(result => { + // this.sf3.setValue('/goodsName1', null); + }); + } + }); + } } diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html index 7eb10959..f2dc8e3b 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html @@ -11,60 +11,37 @@ -
装卸货信息预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时
+
装卸货信息预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时
- 装货地 + 装货地
- + - - + +
- 联系人 + 联系人
- + - +
@@ -81,59 +58,38 @@
- +
- 卸货地 + 卸货地
- + - - + +
- 联系人 + 联系人
- + - +
@@ -152,24 +108,20 @@
- 装货时间 + 装货时间 - +
- 卸货时间 + 卸货时间 - +
@@ -182,31 +134,40 @@
货物信息
- + + + + + + 国家法规及行政命令禁限运货物不能托运 + 《禁运物品说明》 + + +
- + - + - +
-
@@ -233,8 +194,8 @@ - ①香港、澳门、台湾、西藏、新疆不予承保,②单次运输保额仅限200万元以内,③保险详细内容及注意事项请见《保险告知函》 + ①香港、澳门、台湾、西藏、新疆不予承保,②单次运输保额仅限200万元以内,③保险详细内容及注意事项请见《保险告知函》
@@ -256,18 +217,21 @@
- + - + - + {{ i.value | currency }} @@ -276,14 +240,14 @@ {{ i.value | currency }}
-
- -
-
-  天内支付运费 -
+
+ +
+
+  天内支付运费 +
@@ -293,12 +257,12 @@
- - - + + +
diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.less b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.less index 35b08935..a29c4d5b 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.less +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.less @@ -3,10 +3,35 @@ nz-input-number { width: 100%; } + nz-date-picker { width: 94.3%; } + + .sf3 { + .goods_Tips_item { + .goods_tips { + width: calc(50% - 60px); + + .ant-alert { + padding: 4px; + } + + } + + nz-form-item { + margin-bottom: 8px; + } + + // .ant-form-item-control-input-content { + // display: flex; + // justify-content: end; + // } + } + } + } + i { cursor: pointer; } @@ -34,7 +59,10 @@ padding: 24px; color: #7d7d7d; font-size: 30px; - :hover{color: #52acff;} + + :hover { + color: #52acff; + } } #container { @@ -45,11 +73,13 @@ input[type='number'] { -moz-appearance: textfield; } + input[type='number']::-webkit-inner-spin-button, input[type='number']::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; } + .hides { margin-left: 10px; color: aqua; diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index 107e87f5..c10c6566 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -262,6 +262,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { initSF3() { this.schema3 = { properties: { + goodsTips: { + type: 'string', + title: '', + ui: { + widget: 'custom', + class: 'goods_Tips_item', + // visibleIf: { + // goodsTypeName: (value: any) => value && value === '其它' + // } + } + }, goodsTypeId: { type: 'string', title: '货物名称', @@ -323,6 +334,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { errors: { required: '请填写货物名称' }, visibleIf: { goodsTypeName: (value: any) => value && value === '其它' + }, + blur: (value: any) => { + this.checkGoodsName(); } } } @@ -333,6 +347,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { '*': { spanLabelFixed: 90, grid: { span: 12 } + }, + $goodsTips: { + grid: { span: 24 } } }; } @@ -465,10 +482,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { ) }, change: (tag: any, org: any) => { - if(tag === '3'){ + if (tag === '3') { this.sf5.setValue('/insurancePremium', null); this.sf5.setValue('/insuranceRate', null); - }else { + } else { this.getInsurersPrice(tag); } } @@ -481,7 +498,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { ui: { widget: 'custom', visibleIf: { insuranceType: (value: string) => value === '0' } - } , + }, }, type2: { type: 'string', @@ -494,7 +511,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { insurancePremium: { type: 'string', title: '服务包费用', - readOnly:true, + readOnly: true, ui: { visibleIf: { insuranceType: (value: string) => value !== '3' } } @@ -523,7 +540,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } }, }, - required: [ 'insurancePremium'] + required: ['insurancePremium'] }; this.ui5 = { '*': { @@ -733,7 +750,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.service .request( this.service.$api_getAdditionalRate + - `?shipperId=${this?.sf1?.value?.shipperAppUserId || ''}&enterpriseInfoId=${items}&resourcetype='1'` + `?shipperId=${this?.sf1?.value?.shipperAppUserId || ''}&enterpriseInfoId=${items}&resourcetype='1'` ) .subscribe(res => { if (res) { @@ -986,9 +1003,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { ]; // 运费信息 const expenseList = [ - { expenseCode: 'PRE', expenseName: '预付', price: this.sf7.value.prePay || 0, id: this.sf7data?.prePayId || '' ,resourceId: this.sf7data?.PREresourceId || '' }, - { expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '' ,resourceId: this.sf7data?.RECEresourceId || ''}, - { expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '' ,resourceId: this.sf7data?.BACKresourceId || ''} + { expenseCode: 'PRE', expenseName: '预付', price: this.sf7.value.prePay || 0, id: this.sf7data?.prePayId || '', resourceId: this.sf7data?.PREresourceId || '' }, + { expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '', resourceId: this.sf7data?.RECEresourceId || '' }, + { expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '', resourceId: this.sf7data?.BACKresourceId || '' } ]; // 从“再下一单”过来,将所有的子参数内的id都删除 if (this.PageStatus === '整车下一单') { @@ -1017,8 +1034,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { paymentDays: this.sf7.value.paymentDays, estimatedKilometers: this.totalDistance, estimatedTravelTime: this.totalTime, - subtotal :this.sf7.value.subtotal, - total:this.sf7.value.total, + subtotal: this.sf7.value.subtotal, + total: this.sf7.value.total, insurancePackagedGoods: this.sf4.value.insurancePackagedGoods, goodsValue: this.sf4.value.goodsValue }; @@ -1081,7 +1098,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { nzWidth: 900, nzOnOk: item => { console.log(item); - if(item?.poi) { + if (item?.poi) { const poi = item.poi; const locList = poi.pois; switch (type) { @@ -1106,7 +1123,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { default: break; } - + if (this.startInfo[0]?.area && this.endInfo[0]?.area) { this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe((res: any) => { this.totalDistance = res.distance; @@ -1114,10 +1131,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.getInsurersPrice(); // 计算保费金额 }); } - return true + return true } else { this.service.msgSrv.warning('请重新手动选择地址!') - return false + return false } } }); @@ -1155,7 +1172,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.totalDistance = res?.estimatedKilometers; this.totalTime = res?.estimatedTravelTime; this.sf1data = { - resourceCode:res?.resourceCode || '', + resourceCode: res?.resourceCode || '', enterpriseInfoName: res?.enterpriseInfoName, enterpriseInfoId: res?.enterpriseInfoId, dispatchPhone: res?.dispatchPhone, @@ -1423,7 +1440,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { // 计算保价费金额 getInsurersPrice(insuranceType = this.sf5.value.insuranceType) { console.log(this.totalDistance); - if (insuranceType !== '3' && this.totalDistance > 0) { + if (insuranceType !== '3' && this.totalDistance > 0) { const params = { insuranceType, goodsValue: this.sf4.value.goodsValue, @@ -1440,14 +1457,27 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { }); } } - // 运费信息价格变更 - priceChange(event:any, i:any){ - i.setValue(event); - if(event>=99999){ - this.modalService.warning({ - nzTitle: '可输入的最大金额为99999元', + // 运费信息价格变更 + priceChange(event: any, i: any) { + i.setValue(event); + if (event >= 99999) { + this.modalService.warning({ + nzTitle: '可输入的最大金额为99999元', + }); + } + this.payChange() + } + + checkGoodsName() { + this.service.request(this.service.$api_checkGoodsName, this.sf3.value.goodsName1).subscribe(res => { + if (res === false) { + const modalRef = this.modalService.error({ + nzTitle: '货物名称含有违禁词,请重新输入!', + }); + modalRef.afterClose.subscribe(result => { + // this.sf3.setValue('/goodsName1', null); }); } - this.payChange() - } + }); + } } diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts index 4b8b2798..5a261ff0 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts @@ -436,13 +436,13 @@ export class SupplyManagementReleasePublishComponent implements OnInit { map((res: any) => { return [...res]; }) - ) + ); }, change: (tag: any, org: any) => { - if(tag === '3'){ + if (tag === '3') { this.sf5.setValue('/insurancePremium', null); this.sf5.setValue('/insuranceRate', null); - }else { + } else { this.getInsurersPrice(tag); } } @@ -455,7 +455,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ui: { widget: 'custom', visibleIf: { insuranceType: (value: string) => value === '0' } - } , + } }, type2: { type: 'string', @@ -468,7 +468,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { insurancePremium: { type: 'string', title: '服务包费用', - readOnly:true, + readOnly: true, ui: { visibleIf: { insuranceType: (value: string) => value !== '3' } } @@ -495,9 +495,9 @@ export class SupplyManagementReleasePublishComponent implements OnInit { widget: 'custom', visibleIf: { insuranceType: (value: string) => value === '1' } } - }, + } }, - required: [ 'insurancePremium'] + required: ['insurancePremium'] }; this.ui5 = { '*': { @@ -562,8 +562,12 @@ export class SupplyManagementReleasePublishComponent implements OnInit { receiptUserPhone: { type: 'string', title: '联系电话', + format: 'mobile', maxLength: 11, ui: { + errors: { + format: '请输入正确联系电话格式' + }, visibleIf: { receiptType: value => value === '2' } @@ -955,8 +959,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ...this.sf6.value, expenseDTOList: expenseList, paymentDays: this.sf7.value.paymentDays, - subtotal :this.sf7.value.subtotal, - total:this.sf7.value.total, + subtotal: this.sf7.value.subtotal, + total: this.sf7.value.total, estimatedKilometers: this.totalDistance, estimatedTravelTime: this.totalTime, insurancePackagedGoods: this.sf4.value.insurancePackagedGoods, @@ -999,42 +1003,42 @@ export class SupplyManagementReleasePublishComponent implements OnInit { nzContent: AmapPoiPickerComponent, nzWidth: 900, nzOnOk: item => { - if(item?.poi) { - const poi = item.poi; - const locList = poi.pois; - switch (type) { - case 'start': - this.startInfo[index].detailedAddress = poi.formattedAddress; - 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; - break; - case 'end': - this.endInfo[index].detailedAddress = poi.formattedAddress; - 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; - break; - default: - break; + if (item?.poi) { + const poi = item.poi; + const locList = poi.pois; + switch (type) { + case 'start': + this.startInfo[index].detailedAddress = poi.formattedAddress; + 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; + break; + case 'end': + this.endInfo[index].detailedAddress = poi.formattedAddress; + 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; + break; + default: + break; + } + // 计算里程,时间 + if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) { + this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { + this.totalDistance = res.distance; + this.totalTime = res.time; + this.getInsurersPrice(); // 计算保费金额 + }); + } + return true; + } else { + this.service.msgSrv.warning('请重新手动选择地址!'); + return false; } - // 计算里程,时间 - if (this.startInfo[0]?.detailedAddress && this.endInfo[0]?.detailedAddress) { - this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { - this.totalDistance = res.distance; - this.totalTime = res.time; - this.getInsurersPrice(); // 计算保费金额 - }); - } - return true - } else { - this.service.msgSrv.warning('请重新手动选择地址!') - return false - } } }); } @@ -1193,7 +1197,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { getInsurersPrice(insuranceType = this.sf5.value?.insuranceType) { console.log(insuranceType); console.log(this.totalDistance); - if (insuranceType !== '3' && this.totalDistance > 0) { + if (insuranceType !== '3' && this.totalDistance > 0) { const params = { insuranceType, goodsValue: this.sf4.value.goodsValue, @@ -1210,14 +1214,14 @@ export class SupplyManagementReleasePublishComponent implements OnInit { }); } } - // 运费信息价格变更 - priceChange(event:any, i:any){ - i.setValue(event); - if(event>=99999){ - this.modalService.warning({ - nzTitle: '可输入的最大金额为99999元', - }); - } - this.payChange() - } + // 运费信息价格变更 + priceChange(event: any, i: any) { + i.setValue(event); + if (event >= 99999) { + this.modalService.warning({ + nzTitle: '可输入的最大金额为99999元' + }); + } + this.payChange(); + } } diff --git a/src/app/routes/supply-management/services/supply-management.service.ts b/src/app/routes/supply-management/services/supply-management.service.ts index 10cbc648..f2680cc9 100644 --- a/src/app/routes/supply-management/services/supply-management.service.ts +++ b/src/app/routes/supply-management/services/supply-management.service.ts @@ -180,6 +180,9 @@ export class SupplyManagementService extends BaseService { // 发送邀请司机短信 $api_send_msg_code = `/api/mdc/pbc/smsSend/sendInviteDriver`; + // 校验货物名称是否合规 + $api_checkGoodsName = '/api/sdc/goodsResourceShipper/checkGoodsName'; + getDictByKey(dictKey: string) { const params = { dictKey: dictKey }; return this.request(this.$api_getDictValue, params); diff --git a/src/app/routes/tax-management/components/individual-income/individual-income.component.html b/src/app/routes/tax-management/components/individual-income/individual-income.component.html index dedb0881..56db2766 100644 --- a/src/app/routes/tax-management/components/individual-income/individual-income.component.html +++ b/src/app/routes/tax-management/components/individual-income/individual-income.component.html @@ -36,7 +36,7 @@ + [req]="{ process: beforeReq }" [page]="{}" [loading]="service.http.loading" (change)="stChange($event)"> diff --git a/src/app/routes/tax-management/components/individual-income/individual-income.component.ts b/src/app/routes/tax-management/components/individual-income/individual-income.component.ts index c55b07de..15583442 100644 --- a/src/app/routes/tax-management/components/individual-income/individual-income.component.ts +++ b/src/app/routes/tax-management/components/individual-income/individual-income.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; -import { STChange, STColumn, STComponent, STData } from '@delon/abc/st'; +import { STChange, STColumn, STComponent, STData, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form'; import { ShipperBaseService } from '@shared'; import { NzModalService } from 'ng-zorro-antd/modal'; @@ -32,16 +32,15 @@ export class TaxManagementIndividualIncomeComponent implements OnInit { constructor(public service: TaxManagementService) {} - /** - * 查询参数 - */ - get reqParams() { - const params = Object.assign({}, this.sf?.value || {}, { - declareStatus: this.selectedIndex - }); - delete params._$expand; - return { ...params }; - } + beforeReq = (requestOptions: STRequestOptions) => { + Object.assign(requestOptions.body, { declareStatus: this.selectedIndex }); + if (this.sf) { + Object.assign(requestOptions.body, { ...this.sf.value }); + delete requestOptions.body._$expand; + } + this.selectedRows = []; + return requestOptions; + }; stChange(e: STChange): void { switch (e.type) { diff --git a/src/app/routes/tax-management/components/order-reporting/order-reporting.component.ts b/src/app/routes/tax-management/components/order-reporting/order-reporting.component.ts index e11afb2a..2cf91aeb 100644 --- a/src/app/routes/tax-management/components/order-reporting/order-reporting.component.ts +++ b/src/app/routes/tax-management/components/order-reporting/order-reporting.component.ts @@ -119,7 +119,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { searchLoadingText: '搜索中...', allowClear: true, onSearch: (q: any) => { - let str =q.replace(/^\s+|\s+$/g,""); + let str = q.replace(/^\s+|\s+$/g, ""); if (str) { return this.service .request(this.service.$api_enterpriceList, { enterpriseName: str }) @@ -129,7 +129,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { return of([]); } }, - + } as SFSelectWidgetSchema }, driverName: { @@ -262,7 +262,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { { title: '货主名称', index: 'shipperName', className: 'text-center', width: '180px' }, { title: '货主纳税人识别号', index: 'shipperProvinceCode', className: 'text-center', width: '180px' }, { title: '录单时间', index: 'billCreateTime', className: 'text-center', width: '250px' }, - { title: '接单时间', index: 'wayBillCreateTime', className: 'text-center', width: '200px' }, + { title: '接单时间', index: 'wayBillCreateTime', className: 'text-center', width: '200px' }, { title: '发车时间', index: 'loadTime', className: 'text-center', width: '200px' }, { title: '到车时间', index: 'unloadTime', className: 'text-center', width: '150px' }, { title: '结束时间', index: 'payeeName', className: 'text-center', width: '150px' }, @@ -308,7 +308,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { nzOkText: '确定', nzCancelText: '取消', nzOnOk: () => { - this.service.request(this.service.$api_get_recessionTaxOrder,params).subscribe((res: any) => { + this.service.request(this.service.$api_get_recessionTaxOrder, params).subscribe((res: any) => { if (res) { this.service.msgSrv.success('撤销成功'); this.search(); @@ -371,7 +371,7 @@ export class TaxManagementOrderReportingComponent implements OnInit { selectChange(item: any) { console.log(item); - + this.selectedIndex = item?.value || ''; setTimeout(() => { this.st.load(); @@ -499,5 +499,4 @@ export class TaxManagementOrderReportingComponent implements OnInit { }) } - } diff --git a/src/app/routes/tax-management/components/order-reporting/verify-result/verify-result.component.ts b/src/app/routes/tax-management/components/order-reporting/verify-result/verify-result.component.ts index ee390253..9bb45bcc 100644 --- a/src/app/routes/tax-management/components/order-reporting/verify-result/verify-result.component.ts +++ b/src/app/routes/tax-management/components/order-reporting/verify-result/verify-result.component.ts @@ -51,7 +51,7 @@ export class TaxManagementOrderVerifyResultComponent implements OnInit { beforeReq = (requestOptions: STRequestOptions) => {let a: string = ''; switch (this.subjectType) { case '0': - a = this.record?.networkTransporter; + a = this.record?.networkTransporterId; break case '1': a = this.record?.shipperId; @@ -60,7 +60,7 @@ export class TaxManagementOrderVerifyResultComponent implements OnInit { a = this.record?.driverId; break case '3': - a = this.record?.billId; + a = this.record?.wayBillId; break } Object.assign(requestOptions.body, { diff --git a/src/app/routes/ticket-management/components/etc-blacklist/etc-blacklist.component.ts b/src/app/routes/ticket-management/components/etc-blacklist/etc-blacklist.component.ts index a899ade5..381bb9db 100644 --- a/src/app/routes/ticket-management/components/etc-blacklist/etc-blacklist.component.ts +++ b/src/app/routes/ticket-management/components/etc-blacklist/etc-blacklist.component.ts @@ -237,7 +237,7 @@ export class ETCBlacklistComponent implements OnInit { } }, params5: { - title: '司机姓名', + title: '车辆所有人', type: 'string', ui: { placeholder: '请输入', diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts index 401e2a10..7700b77c 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested-detail/invoice-requested-detail.component.ts @@ -177,7 +177,7 @@ export class InvoiceRequestedDetailComponent implements OnInit { } routeToOrder(item: any) { - if (item.billType === 1) { + if (item.billType === '1') { this.router.navigate(['/order-management/vehicle/vehicle-detail/' + item.billHId]); } else { this.router.navigate(['/order-management/bulk/bulk-detail/' + item.billHId]); diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.html b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.html index 1f5cb96d..8b2f989e 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.html +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.html @@ -20,7 +20,7 @@
- +
- + \ No newline at end of file diff --git a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts index c58695a6..37898646 100644 --- a/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts +++ b/src/app/routes/ticket-management/components/invoice-requested/invoice-requested.component.ts @@ -302,6 +302,11 @@ export class InvoiceRequestedComponent { this.sf?.setValue('/expand', this._$expand); } + // 导出 + exprot() { + this.service.exportStart({ ...this.sf.value, pageSize: -1 }, this.service.$api_export_invoice_requested_page); + } + private initSF(): SFSchema { return { properties: { diff --git a/src/app/routes/ticket-management/services/ticket.service.ts b/src/app/routes/ticket-management/services/ticket.service.ts index a095e26e..df5dd9d9 100644 --- a/src/app/routes/ticket-management/services/ticket.service.ts +++ b/src/app/routes/ticket-management/services/ticket.service.ts @@ -17,6 +17,8 @@ export class TicketService extends ShipperBaseService { // 运营端查询发票申请记录 $api_get_invoice_requested_page = '/api/fcc/ficoVatappH/queryOperateVatappHList'; + // 导出发票申请记录 + $api_export_invoice_requested_page = '/api/fcc/ficoVatappH/reportOperateVatappHList'; // 获取开票申请订单明细头部信息 $api_get_invoice_requested_header_detail = '/api/fcc/ficoVatappBill/getDetailHeadByVatappHId'; // 货主/运营端获取开票申请订单明细 @@ -74,7 +76,7 @@ export class TicketService extends ShipperBaseService { // 获取分票发票抬头开票申请订单明细 $api_get_invoice_order_detail = '/api/fcc/ficoVatappBill/getDetailByVatinvHId'; // 货主/运营端获取开票申请订单明细导出 - $api_export_invoice_order_detail = '/api/fcc/ficoVatappBill/reportDetailByVatapp'; + $api_export_invoice_order_detail = '/api/fcc/ficoVatappBill/reportDetailByVatinvHId'; // 获取分票发票抬头开票申请费用明细 $api_get_invoice_cost_detail = '/api/fcc/ficoVatappFee/getDetailByVatinvHId'; // 获取分票发票明细 @@ -149,21 +151,22 @@ export class TicketService extends ShipperBaseService { if (!url) { return; } - const uA = window.navigator.userAgent; // 判断浏览器内核 - const isIE = - /msie\s|trident\/|edge\//i.test(uA) && - !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window); - const objectUrl = url; - const a = document.createElement('a'); - document.body.appendChild(a); - a.href = objectUrl; - a.download = '面单.pdf'; - if (isIE) { - // 兼容IE11无法触发下载的问题 - (navigator as any).msSaveBlob(url, a.download); - } else { - a.click(); - } - a.remove(); + this.openURL(url); + // const uA = window.navigator.userAgent; // 判断浏览器内核 + // const isIE = + // /msie\s|trident\/|edge\//i.test(uA) && + // !!('uniqueID' in document || 'documentMode' in document || 'ActiveXObject' in window || 'MSInputMethodContext' in window); + // const objectUrl = url; + // const a = document.createElement('a'); + // document.body.appendChild(a); + // a.href = objectUrl; + // a.download = '面单.pdf'; + // if (isIE) { + // // 兼容IE11无法触发下载的问题 + // (navigator as any).msSaveBlob(url, a.download); + // } else { + // a.click(); + // } + // a.remove(); } } diff --git a/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.ts b/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.ts index 375f357c..37877333 100644 --- a/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.ts +++ b/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.ts @@ -39,8 +39,8 @@ export class WaybillManagementBulkeDetailComponent implements OnInit { modalTitle:string = ''; unLoadingPlaceVOList: any = []; logColumns2: STColumn[] = [ - { title: '时间', index: 'vinOutTime' }, - { title: '地点', index: 'cityName' }, + { title: '时间', index: 'parkBte' }, + { title: '地点', index: 'parkAdr' }, ]; logColumns: STColumn[] = [ { title: '款项', index: 'costCodeLabel' }, @@ -167,14 +167,15 @@ sureArrive(item: 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))] + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], + time: item.gtm }); }); this.mapList = list; - this.addressItems = res.cityArray; + this.addressItems = res.parkArray; if(this.addressItems && this.addressItems.length > 0){ this.addressItems.forEach(item => { - item.vinOutTime = this.getLocalTime(item.vinOutTime); + item.parkBte = this.getLocalTime(item.parkBte); }); } } @@ -190,7 +191,8 @@ sureArrive(item: 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))] + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], + time: item.gtm }); }); this.mapList = list; 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 626eadc9..1b96e1f4 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 @@ -160,14 +160,15 @@ export class WaybillManagementVehicleDetailComponent implements OnInit, OnDestro points?.forEach((item: any) => { list.push({ name: item.hgt, - lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], + time: item.gtm }); }); this.mapList = list; - this.addressItems = res.cityArray; + this.addressItems = res.parkArray; if (this.addressItems && this.addressItems.length > 0) { this.addressItems.forEach(item => { - item.vinOutTime = this.getLocalTime(item.vinOutTime); + item.parkBte = this.getLocalTime(item.parkBte); }); } } @@ -183,7 +184,8 @@ export class WaybillManagementVehicleDetailComponent implements OnInit, OnDestro points?.forEach((item: any) => { list.push({ name: item.hgt, - lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))], + time: item.gtm }); }); this.mapList = list; diff --git a/src/app/shared/components/amap/amap-path-simplifier/amap-path-simplifier.component.ts b/src/app/shared/components/amap/amap-path-simplifier/amap-path-simplifier.component.ts index 1c810c67..4bda83dd 100644 --- a/src/app/shared/components/amap/amap-path-simplifier/amap-path-simplifier.component.ts +++ b/src/app/shared/components/amap/amap-path-simplifier/amap-path-simplifier.component.ts @@ -48,15 +48,18 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy @Output() readonly clcikPointEvent = new EventEmitter(); - constructor(public service: BaseService, private amapService: AmapService) {} + constructor(public service: BaseService, private amapService: AmapService) { + this.mapInit(); + } ngOnChanges(changes: SimpleChanges): void { // 路线图变更: 设置路线图, 指定路线图 if (changes?.pathList?.currentValue && this?.pathSimplifierIns) { this.setData(changes.pathList?.currentValue); this.setPathIndex(this.selectedIndex); } + // 路径信息变更: 更新路线图, 设置路线图, 指定路线图, 获取终点地址信息并标点 - if (changes?.mapList?.currentValue && this?.pathSimplifierIns && changes.mapList?.currentValue.length > 0) { + if (changes?.mapList?.currentValue) { // console.log(this.mapList); this.pathList = [ { @@ -64,22 +67,29 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy points: changes.mapList?.currentValue } ]; - this.setData(this.pathList); - this.setPathIndex(this.selectedIndex); - this.getPoiByPositon(this.mapList[this.mapList?.length - 1]?.lnglat); + if (this?.pathSimplifierIns) { + this.setData(this.pathList); + if (changes.mapList?.currentValue.length > 0) { + this.setPathIndex(this.selectedIndex); + this.getPoiByPositon('起', 'blue', this.mapList[0]?.lnglat, '时间:' + this.amapService.formatTime(this.mapList[0]?.time)); + this.getPoiByPositon( + '终', + 'red', + this.mapList[this.mapList?.length - 1]?.lnglat, + '时间:' + this.amapService.formatTime(this.mapList[this.mapList?.length - 1]?.time) + ); + } + } } // 标点列表变更: 更新标点数据, 绘画标点 if (changes?.pois?.currentValue) { - // console.log(this.pois); this._pois = changes?.pois?.currentValue; if (this?.markerList && this._pois.length > 0) { this.markerList.render(this._pois); } } } - ngOnInit(): void { - this.mapInit(); - } + ngOnInit(): void {} ngOnDestroy(): void { // 销毁地图数据 if (this.aMap) { @@ -145,6 +155,13 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy if (this.pathList.length > 0) { this.setPathIndex(this.selectedIndex); + this.getPoiByPositon('起', 'blue', this.mapList[0]?.lnglat, '时间:' + this.amapService.formatTime(this.mapList[0]?.time)); + this.getPoiByPositon( + '终', + 'red', + this.mapList[this.mapList?.length - 1]?.lnglat, + '时间:' + this.amapService.formatTime(this.mapList[this.mapList?.length - 1]?.time) + ); } this.pathSimplifierIns.on('pointClick', (e: any, info: any) => { @@ -158,7 +175,10 @@ export class AmapPathSimplifierComponent implements OnInit, OnChanges, OnDestroy position: info.pathData.points[info.pointIndex].lnglat, content: `