diff --git a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html index 46fcc4e5..ac075761 100644 --- a/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html +++ b/src/app/routes/order-management/components/bulk-detail-change/bulk-detail-change.component.html @@ -296,20 +296,20 @@ {{ i?.supplementaryInformationVO?.stateReceipt ? '是' : '否' }} - + {{ i?.supplementaryInformationVO?.receiptType === '1' ? '电子回单' : '纸质回单' }} - {{ i?.supplementaryInformationVO?.receiptUserName }} / {{ i?.supplementaryInformationVO?.phon }} - + {{ i?.supplementaryInformationVO?.receiptUserName }} / {{ i?.supplementaryInformationVO?.phon }} + {{ i?.supplementaryInformationVO?.area }} - + {{ i?.supplementaryInformationVO?.address }} - + {{ i?.supplementaryInformationVO?.stateReceipt ? '是' : '否' }} - + {{ i?.supplementaryInformationVO?.receiptType === '1' ? '电子回单' : '纸质回单' }} - {{ i?.supplementaryInformationVO?.receiptUserName }} / {{ i?.supplementaryInformationVO?.phon }} - + {{ i?.supplementaryInformationVO?.receiptUserName }} / {{ i?.supplementaryInformationVO?.phon }} + {{ i?.supplementaryInformationVO?.area }} - + {{ i?.supplementaryInformationVO?.address }} - + diff --git a/src/app/routes/order-management/components/complaint/complaint.component.html b/src/app/routes/order-management/components/complaint/complaint.component.html index e4563026..8e73a262 100644 --- a/src/app/routes/order-management/components/complaint/complaint.component.html +++ b/src/app/routes/order-management/components/complaint/complaint.component.html @@ -4,13 +4,19 @@ * @Author : Shiming * @Date : 2022-01-12 10:52:50 * @LastEditors : Shiming - * @LastEditTime : 2022-02-23 15:27:52 + * @LastEditTime : 2022-03-10 11:13:18 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\complaint\\complaint.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> - + + + + + + +
diff --git a/src/app/routes/order-management/components/complaint/complaint.component.ts b/src/app/routes/order-management/components/complaint/complaint.component.ts index c4e50bdc..0bd36347 100644 --- a/src/app/routes/order-management/components/complaint/complaint.component.ts +++ b/src/app/routes/order-management/components/complaint/complaint.component.ts @@ -23,24 +23,16 @@ export class OrderManagementComplaintComponent implements OnInit { _$expand = false; channelId: any; resourceStatus: any; + selectedMainTabStatus = '1'; @ViewChild('st') private readonly st!: STComponent; @ViewChild('sf', { static: false }) sf!: SFComponent; @ViewChild('sfView', { static: false }) sfView!: SFComponent; columns: STColumn[] = []; - datass: any = [ - { - one: '1', - two: '1', - three: '1', - id: 1 - }, - { - one: '2', - two: '2', - three: '2', - id: 2 - }, -]; + selectedIndex: number = 0; + mainTabs = [ + { name: '投诉', status: '1' }, + { name: '被投诉', status: '2' }, + ] tabs = [ { name: '全部', type: 0, @@ -62,7 +54,11 @@ export class OrderManagementComplaintComponent implements OnInit { public service: OrderManagementService, private modal: NzModalService, private router: Router - ) { } + ) { if (this.selectedIndex === 0) { + this.selectedMainTabStatus = '1'; + } else if (this.selectedIndex === 1) { + this.selectedMainTabStatus = '2'; + }} /** * 查询参数 @@ -72,6 +68,9 @@ export class OrderManagementComplaintComponent implements OnInit { if(this.resourceStatus) { a.complaintStatus = this.resourceStatus } + if(this.selectedMainTabStatus) { + a.complaintType = this.selectedMainTabStatus + } const params: any = Object.assign({}, this.sf?.value || {}); delete params._$expand; return { @@ -155,7 +154,14 @@ export class OrderManagementComplaintComponent implements OnInit { className: 'text-center', width: '120px', index: 'complaintStatusLabel' - }, { + }, + { + title: '处理人', + className: 'text-center', + width: '200px', + index:'handlePartyLabel' + }, + { title: '处理结果', className: 'text-center', width: '170px', @@ -240,6 +246,19 @@ export class OrderManagementComplaintComponent implements OnInit { this.st.load(); }, 500); } + /** + * 切换投诉与被投诉tab + */ + selectMainTab(e: any) { + console.log(this.selectedIndex); + this.selectedMainTabStatus = e?.status; + this.initST(); + this.initSF(); + setTimeout(() => { + this.st.load(1); + }) + } + /** * 导入货源 */ diff --git a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html index 0b55fc05..75078c62 100644 --- a/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/order-management/components/vehicle-detail/vehicle-detail.component.html @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-28 14:42:03 * @LastEditors : Shiming - * @LastEditTime : 2022-03-09 13:38:21 + * @LastEditTime : 2022-03-09 10:33:44 * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail\\vehicle-detail.component.html * Copyright (C) 2022 huzhenhong. All rights reserved. --> @@ -48,8 +48,8 @@ {{ i?.goodsResource?.dispatchName }}/{{ i?.goodsResource?.dispatchPhone }} {{ i?.externalBillCode }} {{ i?.resourceCode }} - {{ i?.wayBillCode }} - {{ i?.paymentDays }} + {{ i?.wayBillId }} + {{ i?.goodsResource?.dispatchName }}
@@ -203,7 +203,7 @@
- +
diff --git a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html index e28c5d69..ac00d884 100644 --- a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html @@ -155,19 +155,19 @@ {{ i?.supplementaryInformationVO?.stateReceipt ? '是' : '否' }} - + {{ i?.supplementaryInformationVO?.receiptTypeLabel }} - + {{ i?.supplementaryInformationVO?.receiptUserName ? i?.supplementaryInformationVO?.receiptUserName + '/' : '' }} {{ i?.supplementaryInformationVO?.phon }} - + {{ i?.supplementaryInformationVO?.area }} - + {{ i?.supplementaryInformationVO?.address }} - + {{ i?.supplementaryInformationVO?.remarks }}
diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts index df0cc433..80830828 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 @@ -648,6 +648,10 @@ export class SupplyManagementBulkPublishComponent implements OnInit { this.service.msgSrv.warning('请完善必填项!'); return; } + if (this.totalDistance <= 0) { + this.service.msgSrv.warning('起终点相同,请重新选择装卸货地址!'); + return; + } // 校验各个输入限定值 if ( this.sf4.value?.weight > this.limitValues?.maxWeight || diff --git a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts index a0b0328c..b4fbcb67 100644 --- a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts @@ -580,6 +580,10 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { this.service.msgSrv.warning('请完善必填项!'); return; } + if (this.totalDistance <= 0) { + this.service.msgSrv.warning('起终点相同,请重新选择装卸货地址!'); + return; + } // 校验各个输入限定值 if (this.sf4.value.weight > this.limitValues.maxWeight || this.sf4.value.volume > this.limitValues.maxVolume || this.sf4.value.number > this.limitValues.maxTrainNumber) { this.service.msgSrv.error(`当前货物核载信息已超出限定值【${this.limitValues.maxWeight}吨、${this.limitValues.maxVolume}方、${this.limitValues.maxTrainNumber}车】`); 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 a1e6d848..a7cacb12 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 @@ -41,7 +41,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { maxPiece: 99999, maxDays: 999, intervalDays: 999, - maxTimes: 999 + maxTimes: 5 }; sf1data: any; // 货源单设置回显 sf3data: any; // 货源单设置回显 @@ -147,6 +147,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { title: '货主', type: 'string', maxLength: 30, + readOnly: this.PageStatus == '整车修改' ? true : false, ui: { widget: 'select', // serverSearch: true, @@ -177,6 +178,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { enterpriseProjectId: { type: 'string', title: '项目', + readOnly: this.PageStatus == '整车修改' ? true : false, ui: { widget: 'select', placeholder: '请选择' @@ -189,7 +191,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { widget: 'text' } }, - + externalResourceCode: { type: 'string', title: '外部货源号', @@ -211,10 +213,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { type: 'string', title: '调度员手机号', maxLength: 30, - ui: { + ui: { placeholder: '请输入' } - }, + } // dispatchId: { // type: 'string', // title: '调度员', @@ -249,7 +251,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { }, $enterpriseProjectId: { grid: { span: 12 } - }, + } }; } initSF3() { @@ -320,7 +322,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } } }, - required: ['goodsTypeId', 'goodsName', 'goodsNameId','goodsName1'] + required: ['goodsTypeId', 'goodsName', 'goodsNameId', 'goodsName1'] }; this.ui3 = { '*': { @@ -347,7 +349,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { title: '', ui: { widget: 'custom', - placeholder: '请输入', + placeholder: '请输入' } }, number: { @@ -355,7 +357,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { title: '', ui: { widget: 'custom', - placeholder: '请输入', + placeholder: '请输入' } }, carModel: { @@ -408,7 +410,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { params: { dictKey: 'insure:packaged:goods' }, containsAllLabel: false, validator: val => { - if (this.sf5?.value?.insuranceType && this.sf5?.value?.insuranceType !=='3' && this.isEmpty(val)) { + if (this.sf5?.value?.insuranceType && this.sf5?.value?.insuranceType !== '3' && this.isEmpty(val)) { return [{ keyword: 'required', message: '必填项' }]; } else { return []; @@ -422,14 +424,14 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { ui: { widget: 'custom', validator: val => { - if (this.sf5?.value?.insuranceType && this.sf5?.value?.insuranceType !=='3' && this.isEmpty(val)) { + if (this.sf5?.value?.insuranceType && this.sf5?.value?.insuranceType !== '3' && this.isEmpty(val)) { return [{ keyword: 'required', message: '必填项' }]; } else { return []; } } } - }, + } }, required: ['weight', 'carModel', 'carLength'] }; @@ -454,13 +456,13 @@ export class SupplyManagementOnecarPublishComponent 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); } } @@ -492,7 +494,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { insurancePremium: { type: 'string', title: '服务包费用', - readOnly:true, + readOnly: true, ui: { visibleIf: { insuranceType: (value: string) => value !== '3' } } @@ -519,11 +521,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { widget: 'custom', visibleIf: { insuranceType: (value: string) => value === '1' } } - }, - - + } }, - required: [ 'insurancePremium'] + required: ['insurancePremium'] }; this.ui5 = { '*': { @@ -746,7 +746,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { }); } addStartInfo() { - if (this.startInfo.length < 5) { + if (this.startInfo.length < this.limitValues.maxTimes) { const controlId = this.startInfo.length; this.startInfo.push({ detailedAddress: '', @@ -800,7 +800,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.validateForm1.removeControl(`loadPhone${index}`); } addEndInfo() { - if (this.endInfo.length < 5) { + if (this.endInfo.length < this.limitValues.maxTimes) { const controlId = this.endInfo.length; this.endInfo.push({ detailedAddress: '', @@ -864,7 +864,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { nzComponentParams: { status: 'new', url: this.service.$api_save_assign_whole, - params: item, + params: item }, nzFooter: null }); @@ -895,10 +895,22 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.sf5.validator({ emitError: true }); this.sf6.validator({ emitError: true }); this.sf7.validator({ emitError: true }); - if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid || !this.sf4.valid || !this.sf5.valid || !this.sf6.valid || !this.sf7.valid) { + if ( + this.validateForm1.invalid || + !this.sf3.valid || + !this.sf1.valid || + !this.sf4.valid || + !this.sf5.valid || + !this.sf6.valid || + !this.sf7.valid + ) { this.service.msgSrv.warning('请完善必填项!'); return; } + if (this.totalDistance <= 0) { + this.service.msgSrv.warning('起终点相同,请重新选择装卸货地址!'); + return; + } if (this.validateForm1.value.loadingTime < new Date()) { this.service.msgSrv.warning('装货时间必须大于当前时间!'); return; @@ -979,7 +991,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { { expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '' } ]; // 从“再下一单”过来,将所有的子参数内的id都删除 - if ((this.PageStatus === '整车下一单')) { + if (this.PageStatus === '整车下一单') { LoadingList.forEach((ele: any) => { delete ele.id; }); @@ -1003,15 +1015,15 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { paymentDays: this.sf7.value.paymentDays, estimatedKilometers: this.totalDistance, estimatedTravelTime: this.totalTime, - insurancePackagedGoods:this.sf4.value.insurancePackagedGoods, - goodsValue:this.sf4.value.goodsValue, + insurancePackagedGoods: this.sf4.value.insurancePackagedGoods, + goodsValue: this.sf4.value.goodsValue }; const modalRef = this.modalService.create({ nzTitle: '运输协议', nzContent: TranAgreementComponent, nzWidth: 900, nzFooter: null, - nzComponentParams: { object: params, shipperName: this.shipperName,type:'onecar' } + nzComponentParams: { object: params, shipperName: this.shipperName, type: 'onecar' } }); modalRef.afterClose.subscribe(result => { if (result) { @@ -1136,7 +1148,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { enterpriseInfoId: res?.enterpriseInfoId, dispatchPhone: res?.dispatchPhone, dispatchName: res?.dispatchName, - externalResourceCode: res?.externalResourceCode, + externalResourceCode: res?.externalResourceCode }; if (this.PageStatus === '整车修改') { this.sf1data.id = res?.id; @@ -1207,14 +1219,14 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required)); } - // 计算里程,时间 - 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(); //计算保费金额 - }); - } + // 计算里程,时间 + 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(); //计算保费金额 + }); + } }); this.sf3data = { @@ -1248,7 +1260,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { carModel: res?.goodsInfoVOList[0]?.carModel?.split(',') || [], carLength: res?.goodsInfoVOList[0]?.carLength?.split(',') || [], goodsValue: res?.goodsValue || '', - insurancePackagedGoods: res?.insurancePackagedGoods || '', + insurancePackagedGoods: res?.insurancePackagedGoods || '' }; if (this.PageStatus === '整车修改') { this.sf4data.id = res?.goodsInfoVOList[0]?.id; @@ -1257,7 +1269,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { this.sf5data = { insuranceType: res?.insuranceType || '', insurancePremium: res?.insurancePremium || '', - insuranceRate: res?.insuranceRate || '', + insuranceRate: res?.insuranceRate || '' }; this.sf6data = { stateReceipt: res?.stateReceipt, @@ -1323,14 +1335,14 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { 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(); //计算保费金额 - }); - } + // 计算里程,时间 + 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(); //计算保费金额 + }); + } } }); } @@ -1384,8 +1396,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } // 计算保价费金额 getInsurersPrice(insuranceType = this.sf5.value.insuranceType) { - console.log(this.totalDistance) - if ( insuranceType !=='3' && this.sf4.value?.goodsValue >= 50000 && this.totalDistance > 0 ) { + console.log(this.totalDistance); + if (insuranceType !== '3' && this.sf4.value?.goodsValue >= 50000 && this.totalDistance > 0) { const params = { insuranceType, goodsValue: this.sf4.value.goodsValue, @@ -1395,7 +1407,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { if (res) { this.sf5.setValue('/insurancePremium', res.insurancePremium); this.sf5.setValue('/insuranceRate', res.insuranceRate); - }else{ + } else { this.sf5.setValue('/insurancePremium', null); this.sf5.setValue('/insuranceRate', null); } 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 a8290682..312a5e7d 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 @@ -109,7 +109,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { maxPiece: 99999, maxDays: 999, intervalDays: 999, - maxTimes: 999 + maxTimes: 5 }; formatterRmb = (value: number): string => { @@ -208,10 +208,10 @@ export class SupplyManagementReleasePublishComponent implements OnInit { type: 'string', title: '调度员手机号', maxLength: 30, - ui: { + ui: { placeholder: '请输入' } - }, + } }, required: ['shipperAppUserId', 'enterpriseProjectId', 'enterpriseInfoName'] }; @@ -329,7 +329,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { title: '', ui: { widget: 'custom', - placeholder: '请输入', + placeholder: '请输入' } }, number: { @@ -337,7 +337,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { title: '', ui: { widget: 'custom', - placeholder: '请输入', + placeholder: '请输入' } }, carModel: { @@ -390,7 +390,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { params: { dictKey: 'insure:packaged:goods' }, containsAllLabel: false, validator: val => { - if (this.sf5?.value?.insuranceType && this.sf5?.value?.insuranceType !=='3' && this.isEmpty(val)) { + if (this.sf5?.value?.insuranceType && this.sf5?.value?.insuranceType !== '3' && this.isEmpty(val)) { return [{ keyword: 'required', message: '必填项' }]; } else { return []; @@ -404,14 +404,14 @@ export class SupplyManagementReleasePublishComponent implements OnInit { ui: { widget: 'custom', validator: val => { - if (this.sf5?.value?.insuranceType && this.sf5?.value?.insuranceType !=='3' && this.isEmpty(val)) { + if (this.sf5?.value?.insuranceType && this.sf5?.value?.insuranceType !== '3' && this.isEmpty(val)) { return [{ keyword: 'required', message: '必填项' }]; } else { return []; } } } - }, + } }, required: ['weight', 'carModel', 'carLength'] }; @@ -436,14 +436,14 @@ 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 { - console.log(tag) + } else { + console.log(tag); this.getInsurersPrice(tag); } } @@ -475,7 +475,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { insurancePremium: { type: 'string', title: '服务包费用', - readOnly:true, + readOnly: true, ui: { visibleIf: { insuranceType: (value: string) => value !== '3' } } @@ -502,11 +502,9 @@ export class SupplyManagementReleasePublishComponent implements OnInit { widget: 'custom', visibleIf: { insuranceType: (value: string) => value === '1' } } - }, - - + } }, - required: [ 'insurancePremium'] + required: ['insurancePremium'] }; this.ui5 = { '*': { @@ -528,7 +526,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit { }; } - initSF6() { this.schema6 = { properties: { @@ -767,7 +764,10 @@ export class SupplyManagementReleasePublishComponent implements OnInit { } // 添加 删除发货卸货地址 addStartInfo() { - if (this.startInfo.length < 5) { + console.log(this.startInfo.length); + console.log(this.limitValues.maxTimes); + + if (this.startInfo.length < this.limitValues.maxTimes) { const controlId = this.startInfo.length; this.startInfo.push({ detailedAddress: '', @@ -782,11 +782,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit { }); this.validateForm1.addControl(`loadAddress${controlId}`, new FormControl(null, Validators.required)); this.validateForm1.addControl(`loadName${controlId}`, new FormControl(null, Validators.required)); - this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl(`loadPhone${controlId}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')])); } } // 添加 删除发货卸货地址 - subStartInfo(_event: any, index: number) { + subStartInfo(event: any, index: number) { this.startInfo.splice(index, 1); this.validateForm1.removeControl(`loadAddress${index}`); this.validateForm1.removeControl(`loadName${index}`); @@ -794,7 +794,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { } // 添加 删除发货卸货地址 addEndInfo() { - if (this.addEndInfo.length < 5) { + if (this.endInfo.length < this.limitValues.maxTimes) { const controlId = this.endInfo.length; this.endInfo.push({ detailedAddress: '', @@ -809,11 +809,14 @@ export class SupplyManagementReleasePublishComponent implements OnInit { }); this.validateForm1.addControl(`unloadAddress${controlId}`, new FormControl(null, Validators.required)); this.validateForm1.addControl(`unloadName${controlId}`, new FormControl(null, Validators.required)); - this.validateForm1.addControl(`unloadPhone${controlId}`, new FormControl(null, Validators.required)); + this.validateForm1.addControl( + `unloadPhone${controlId}`, + new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]) + ); } } // 添加 删除发货卸货地址 - subEndInfo(_event: any, index: number) { + subEndInfo(event: any, index: number) { this.endInfo.splice(index, 1); this.validateForm1.removeControl(`unloadAddress${index}`); this.validateForm1.removeControl(`unloadName${index}`); @@ -851,12 +854,24 @@ export class SupplyManagementReleasePublishComponent implements OnInit { this.sf5.validator({ emitError: true }); this.sf6.validator({ emitError: true }); this.sf7.validator({ emitError: true }); - console.log(!this.sf1.valid) - console.log(this.sf1.value) - if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid || !this.sf4.valid || !this.sf5.valid || !this.sf6.valid || !this.sf7.valid) { + console.log(!this.sf1.valid); + console.log(this.sf1.value); + if ( + this.validateForm1.invalid || + !this.sf3.valid || + !this.sf1.valid || + !this.sf4.valid || + !this.sf5.valid || + !this.sf6.valid || + !this.sf7.valid + ) { this.service.msgSrv.warning('请完善必填项!'); return; } + if (this.totalDistance <= 0) { + this.service.msgSrv.warning('起终点相同,请重新选择装卸货地址!'); + return; + } if (this.validateForm1.value.loadingTime < new Date()) { this.service.msgSrv.warning('装货时间必须大于当前时间!'); return; @@ -949,8 +964,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit { paymentDays: this.sf7.value.paymentDays, estimatedKilometers: this.totalDistance, estimatedTravelTime: this.totalTime, - insurancePackagedGoods:this.sf4.value.insurancePackagedGoods, - goodsValue:this.sf4.value.goodsValue, + insurancePackagedGoods: this.sf4.value.insurancePackagedGoods, + goodsValue: this.sf4.value.goodsValue }; console.log(params); const modalRef = this.modalService.create({ @@ -958,11 +973,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit { nzContent: TranAgreementComponent, nzWidth: 900, nzFooter: null, - nzComponentParams: { object: params ,shipperName: this.shipperName,type:'onecar'} + nzComponentParams: { object: params, shipperName: this.shipperName, type: 'onecar' } }); modalRef.afterClose.subscribe(result => { if (result) { - this.submit(submitType, params, ); + this.submit(submitType, params); } }); } @@ -1082,14 +1097,14 @@ export class SupplyManagementReleasePublishComponent implements OnInit { 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(); //计算保费金额 - }); - } + // 计算里程,时间 + 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(); //计算保费金额 + }); + } } }); } @@ -1164,20 +1179,20 @@ export class SupplyManagementReleasePublishComponent implements OnInit { 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]?.detailedAddress && this.endInfo[0]?.detailedAddress) { - this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => { - this.totalDistance = res.distance; - this.totalTime = res.time; - this.getInsurersPrice(); //计算保费金额 - }); - } + // 计算里程,时间 + 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(); //计算保费金额 + }); + } } // 计算保价费金额 getInsurersPrice(insuranceType = this.sf5.value?.insuranceType) { - console.log(insuranceType) - console.log(this.totalDistance) - if ( insuranceType !=='3' && this.sf4.value?.goodsValue >= 50000 && this.totalDistance > 0 ) { + console.log(insuranceType); + console.log(this.totalDistance); + if (insuranceType !== '3' && this.sf4.value?.goodsValue >= 50000 && this.totalDistance > 0) { const params = { insuranceType, goodsValue: this.sf4.value.goodsValue, @@ -1187,7 +1202,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { if (res) { this.sf5.setValue('/insurancePremium', res.insurancePremium); this.sf5.setValue('/insuranceRate', res.insuranceRate); - }else{ + } else { this.sf5.setValue('/insurancePremium', null); this.sf5.setValue('/insuranceRate', null); } 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 407b3261..0ac169c4 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-03-08 14:05:09 + * @LastEditTime : 2022-03-10 10:27:21 * @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\tran-agreement\\tran-agreement.component.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -66,23 +66,23 @@ export class TranAgreementComponent { 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, // 发货地址 + 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}件`, //托运量 + 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,// 回单付 + 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}天`, // 承诺支付运费时间 + paymentTime:`到货后${this.object?.paymentDays || ''}天`, // 承诺支付运费时间 year:new Date().getFullYear() || '', // 签约年份 month:new Date().getMonth()+1 || '', // 签约月份 day:new Date().getDate() || '', // 签约日期 @@ -100,15 +100,15 @@ export class TranAgreementComponent { carrierName:this.object?.enterpriseInfoName || '', //承运人 shipperLegalPersonName:this.enterpriseInfo.legalPersonName || '', //托运法定代表人 carrierLegalPersonName:this.enterpriseInfo.netLegalPersonName || '', //承运法定代表人 - consignorInfo: `${this.object.unLoadingPlaceDTOList[0].appUserName} ${this.object.unLoadingPlaceDTOList[0].contractTelephone}`, // 发货信息 + 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}`, // 收货信息 + 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, // 收货地址 + 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}车`, //托运量 + consignmentVolume:`${this.object?.goodsInfoDTOList?.[0]?.weight|| '-'}吨/${this.object?.goodsInfoDTOList?.[0]?.volume || '-'}方/${this.object.goodsInfoDTOList?.[0]?.number || '-'}车`, //托运量 transporterInfo:'', //运输方信息 freightAmount:'', // 订单运费金额(元) pre:'', //预付 @@ -116,7 +116,7 @@ export class TranAgreementComponent { back:'',// 回单付 lunarKnot:'', total:'', // 合计(元) - paymentTime:`到货后${this.object.paymentDays}天`, // 承诺支付运费时间 + paymentTime:`到货后${this.object?.paymentDays || ''}天`, // 承诺支付运费时间 year:new Date().getFullYear() || '', // 签约年份 month:new Date().getMonth()+1 || '', // 签约月份 day:new Date().getDate() || '', // 签约日期 diff --git a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html index 5249b461..3cc5d4fb 100644 --- a/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/supply-management/components/vehicle-detail/vehicle-detail.component.html @@ -199,13 +199,15 @@ {{ i?.supplementaryInformationVO?.stateReceipt ? '是' : '否' }} - + {{ i?.supplementaryInformationVO?.receiptType === '1' ? '电子回单' : '纸质回单' }} - + {{ i?.supplementaryInformationVO?.receiptUserName || '-' }} / {{ i?.supplementaryInformationVO?.phon || '-' }} + + {{ i?.supplementaryInformationVO?.area }} - + {{ i?.supplementaryInformationVO?.address }} diff --git a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts index 4fdcc546..aac4fc47 100644 --- a/src/app/routes/supply-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/supply-management/components/vehicle/vehicle.component.ts @@ -180,15 +180,15 @@ export class SupplyManagementVehicleComponent implements OnInit { type: 'primary', onClick: () => { this.service.request(this.service.$api_getFailUploadGoodsOperateResource, result.ids).subscribe((res: any) => { - if(res) { + if (res) { console.log(res); } - }) + }); console.log(111); } - }, + } ] - }) + }); } }); } @@ -252,7 +252,7 @@ export class SupplyManagementVehicleComponent implements OnInit { * 审核通过按钮 */ handleOK(value: any) { - if (this.auditMany === false) { + if (this.auditMany === false) { const params: any = { id: this.auditID, remarks: this.sfFre.value.remarks @@ -508,7 +508,7 @@ export class SupplyManagementVehicleComponent implements OnInit { width: '180px', className: 'text-left' }, - + { title: '项目名称', index: 'enterpriseProjectName', @@ -576,7 +576,7 @@ export class SupplyManagementVehicleComponent implements OnInit { title: '创建时间', width: '200px', index: 'createTime', - className: 'text-left', + className: 'text-left' }, { title: '审核状态', @@ -606,7 +606,7 @@ export class SupplyManagementVehicleComponent implements OnInit { { text: '修改货源', click: _record => this.amend(_record), - iif: item => item.resourceStatus === '1' , + iif: item => item.resourceStatus === '1' && item.insurancePayment !== 'Y', acl: { ability: ['SUPPLY-INDEX-vehicleModificationSupply'] } }, // { @@ -636,12 +636,12 @@ export class SupplyManagementVehicleComponent implements OnInit { } ]; } - // 导出 - exportFire() { - this.service.request(this.service.$api_asyncExportWholeList, this.reqParams ).subscribe((res: any) => { - if(res) { - this.service.msgSrv.success('导出成功,请去下载中心下载!') + // 导出 + exportFire() { + this.service.request(this.service.$api_asyncExportWholeList, this.reqParams).subscribe((res: any) => { + if (res) { + this.service.msgSrv.success('导出成功,请去下载中心下载!'); } - }) + }); } } diff --git a/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html index 3bcec474..72952e4a 100644 --- a/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html @@ -1,7 +1,7 @@ + + + {{ item.price | currency }} + + + {{ item.surcharge | currency }} + + +
+ 总计:{{ i?.totalAmount | currency }} (运费{{ i?.totalFreight | currency }}, + 附加费{{ i?.totalSurcharge | currency }},附加费率{{ (i?.totalRate * 100).toFixed(2)}}% ) +
+
收款人:{{ i?.payeeName }}/{{ i?.payeePhone }}
@@ -170,22 +183,22 @@ {{i?.receiptType == 1 ?'是':'否'}} - + {{i?.receiptTypeLabel}} - + {{i?.receiptUser}}{{ i?.receiptUserPhone ? ' /' + i?.receiptUserPhone : ''}} - + {{i?.receiptPlace}} - + {{i?.receiptAddress}} - + @@ -193,21 +206,22 @@ +
- +
- - + +
- +
- + diff --git a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts index 421e6348..c9013093 100644 --- a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts +++ b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-12-03 15:31:52 - * @LastEditTime : 2022-03-02 16:26:15 + * @LastEditTime : 2022-03-10 16:10:51 * @LastEditors : Shiming * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\vehicle-detail\\vehicle-detail.component.ts @@ -26,18 +26,32 @@ export class WaybillManagementVehicleDetailComponent implements OnInit { id = this.route.snapshot.params.id; MapList: any[]=[]; + trajectory = 'car'; + mapList:any[] = []; //地图点位数据组 + addressItems:any[] = []; //打点地址数据组 i: any; totalObj: any; attObj: any; isVisible = false; imges: any; unLoadingPlaceVOList: any = []; - logColumns: STColumn[] = [ + logColumns2: STColumn[] = [ { title: '时间', index: 'vinOutTime' }, - { title: '地点', index: 'cityName' }, + { title: '地点', index: 'cityName' } + ]; + billExpenses: any[] = []; //运费信息表格信息 + logColumns: STColumn[] = [ + { title: '款项', index: 'costCodeLabel' }, + { title: '小计(元)', render: 'price' }, + { title: '运输费(元)', render: 'price' }, + { title: '附加费(元)', render: 'surcharge' }, + { title: '支付时间', index: 'paymentTime' }, + { + title: '支付状态', + className: 'text-center', + index: 'paymentStatusLabel', + } ]; - trajectory = 'car'; - addressItems: any[] = []; //打点地址数据组 constructor( private route: ActivatedRoute, @@ -50,7 +64,7 @@ export class WaybillManagementVehicleDetailComponent implements OnInit { ngOnInit(): void { this.initData() - this.MapInit() + this.getTrajectory() } initData() { const params = { @@ -62,8 +76,10 @@ export class WaybillManagementVehicleDetailComponent implements OnInit { this.unLoadingPlaceVOList.push(...res.dischargePlace) console.log(this.unLoadingPlaceVOList) this.i = res; - this.attObj = this.i?.billExpenseDetailVOList?.filter((data: any) => data.expenseCode === 'ATT')[0]; - this.totalObj = this.i?.billExpenseDetailVOList?.filter((data: any) => data.expenseCode === 'TOTAL')[0]; + this.billExpenses = this.i?.billExpenseDetailVOList?.filter( + (data: any) => data.costCode === 'PRE' || data.costCode === 'RECE' || data.costCode === 'BACK' + ); + this.i.scheduleVOList = this.i?.scheduleVOList?.filter((data: any) => data.displayStatus !== 'HIDE'); }) } @@ -130,29 +146,60 @@ goDistance(elf: NzCardComponent) { }); } - // 获取轨迹 - MapInit() { - this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => { - if (res) { - const points = res.trackArray; - let list :any[] = []; - points?.forEach((item: any) => { - list.push({ - name: item.hgt, - lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] - }); + + // 获取车辆轨迹 + getTrajectory(){ + this.service.request(this.service.$api_get_getTrajectory, { id: this.id }).subscribe(res => { + if (res) { + const points = res.trackArray; + let list :any[] = []; + points?.forEach((item: any) => { + list.push({ + name: item.hgt, + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + }); + }); + this.mapList = list; + this.addressItems = res.cityArray; + if(this.addressItems && this.addressItems.length > 0){ + this.addressItems.forEach(item => { + item.vinOutTime = this.getLocalTime(item.vinOutTime); }); - this.MapList = list; - this.addressItems = res.parkArray; - if(this.addressItems && this.addressItems.length > 0){ - this.addressItems.forEach(item => { - item.vinOutTime = this.getLocalTime(item.vinOutTime); - }); - } } - }); + } + }); + } + + // 获取司机轨迹 + getDriverTrajectory(){ + this.service.request(this.service.$api_get_getAppDriverPosition, { id: this.id }).subscribe(res => { + if (res) { + const points = res.tracks; + let list :any[] = []; + points?.forEach((item: any) => { + list.push({ + name: item.hgt, + lnglat: [Number((Number(item.lon) / 600000).toFixed(6)), Number((Number(item.lat) / 600000).toFixed(6))] + }); + }); + this.mapList = list; + this.addressItems = [...res.enclosureDataAppTrack]; + if(this.addressItems && this.addressItems.length > 0){ + this.addressItems.forEach(item => { + item.vinOutTime = this.getLocalTime(item.gtm); + item.cityName = item.appAdress; + }); + } + } + }); + } + trajectoryChange(event:any){ + if(event ==='car'){ + this.getTrajectory() + }else if(event ==='driver'){ + this.getDriverTrajectory(); } - + } getLocalTime(time: any) { return format(new Date(parseInt(time)), 'yyyy-MM-dd HH:mm:ss'); }