This commit is contained in:
wangshiming
2022-04-21 15:48:47 +08:00
parent 9fb4be63ff
commit 72cacd590e
2 changed files with 50 additions and 42 deletions

View File

@ -932,6 +932,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.service.msgSrv.warning('装货时间必须大于当前时间!');
return;
}
console.log(this.validateForm1.value.loadingTime);
console.log(new Date());
if (this.validateForm1.value.loadingTime > this.validateForm1.value.unloadingTime) {
this.service.msgSrv.warning('装货时间不能大于卸货时间!');
return;
@ -956,25 +959,25 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
return;
}
const getFreightParms = { carLengthKeys: this.sf4.value.carLength, km: this.totalDistance };
this.service.request(this.service.$api_getFreight, getFreightParms).subscribe(res => {
if (this.sf7.value.subtotal > res.maxPrice) {
this.service.msgSrv.error(`运费过高,请调整录入`);
return;
} else if (this.sf7.value.subtotal > res.ewPrice) {
this.modalService.confirm({
nzTitle: '',
nzContent: `您的录入的运费过高,可能会影响支付,请仔细确认`,
nzOkText: '继续',
nzCancelText: '取消',
nzOnOk: () => {
this.agreementConfirm(submitType);
}
});
} else {
this.agreementConfirm(submitType);
}
});
// const getFreightParms = { carLengthKeys: this.sf4.value.carLength, km: this.totalDistance };
// this.service.request(this.service.$api_getFreight, getFreightParms).subscribe(res => {
// if (this.sf7.value.subtotal > res.maxPrice) {
// this.service.msgSrv.error(`运费过高,请调整录入`);
// return;
// } else if (this.sf7.value.subtotal > res.ewPrice) {
// this.modalService.confirm({
// nzTitle: '',
// nzContent: `您的录入的运费过高,可能会影响支付,请仔细确认`,
// nzOkText: '继续',
// nzCancelText: '取消',
// nzOnOk: () => {
// this.agreementConfirm(submitType);
// }
// });
// } else {
// this.agreementConfirm(submitType);
// }
// });
}
// 提交前协议弹窗
agreementConfirm(submitType?: string) {