fix bug
This commit is contained in:
@ -576,22 +576,22 @@ export class orderManagementVoucherViewComponent implements OnInit {
|
|||||||
openlaod(value: any) {
|
openlaod(value: any) {
|
||||||
if (value === 1) {
|
if (value === 1) {
|
||||||
// 逻辑: 先判断电子提货单是否已生成,文件为空则触发签署文件,再查询是否签署成功,成功则退出,刷新页面,再次点击为预览
|
// 逻辑: 先判断电子提货单是否已生成,文件为空则触发签署文件,再查询是否签署成功,成功则退出,刷新页面,再次点击为预览
|
||||||
|
let time = 10
|
||||||
|
setInterval (function () {
|
||||||
|
time-=1
|
||||||
|
}, 1000); //反复执行函数本身
|
||||||
|
const modal = this.modalService.success({
|
||||||
|
nzTitle: '电子装货单签署中!',
|
||||||
|
nzContent: `
|
||||||
|
请等待${time}秒后自动关闭
|
||||||
|
`
|
||||||
|
});
|
||||||
if (!this.datas?.loadingElectronicsLadingBillFilePath) {
|
if (!this.datas?.loadingElectronicsLadingBillFilePath) {
|
||||||
this.service.request(this.service.$api_createBillTakeGoods, [this.datas?.id]).subscribe(res => {
|
this.service.request(this.service.$api_createBillTakeGoods, [this.datas?.id]).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
switch (res[0]?.esignFlowStatus) {
|
switch (res[0]?.esignFlowStatus) {
|
||||||
case 1:
|
case 1:
|
||||||
case '1':
|
case '1':
|
||||||
let time = 5
|
|
||||||
setInterval (function () {
|
|
||||||
time-=1
|
|
||||||
}, 1000); //反复执行函数本身
|
|
||||||
const modal = this.modalService.success({
|
|
||||||
nzTitle: '电子装货单签署中!',
|
|
||||||
nzContent: `
|
|
||||||
请等待${time}秒后自动关闭
|
|
||||||
`
|
|
||||||
});
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.service.request(this.service.$api_getBillTakeEsignFile, [this.datas?.id]).subscribe(res => {
|
this.service.request(this.service.$api_getBillTakeEsignFile, [this.datas?.id]).subscribe(res => {
|
||||||
if(res[0]?.esignFlowStatus == '2') {
|
if(res[0]?.esignFlowStatus == '2') {
|
||||||
@ -600,11 +600,15 @@ export class orderManagementVoucherViewComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
modal.destroy()
|
modal.destroy()
|
||||||
}, 5000);
|
}, 10000);
|
||||||
return ;
|
return ;
|
||||||
case 2:
|
case 2:
|
||||||
|
modal.destroy()
|
||||||
return;
|
return;
|
||||||
|
case 13:
|
||||||
|
this.service.msgSrv.error('签署异常!')
|
||||||
|
modal.destroy()
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -617,22 +621,23 @@ export class orderManagementVoucherViewComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 逻辑: 先判断电子提货单是否已生成,文件为空则触发签署文件,再查询是否签署成功,成功则退出,刷新页面,再次点击为预览
|
// 逻辑: 先判断电子提货单是否已生成,文件为空则触发签署文件,再查询是否签署成功,成功则退出,刷新页面,再次点击为预览
|
||||||
|
let time = 10
|
||||||
|
setInterval (function () {
|
||||||
|
time-=1
|
||||||
|
}, 1000); //反复执行函数本身
|
||||||
|
const modal = this.modalService.success({
|
||||||
|
nzTitle: '电子卸货单签署中!',
|
||||||
|
nzContent: `
|
||||||
|
请等待${time}秒后自动关闭
|
||||||
|
`
|
||||||
|
});
|
||||||
if (!this.datas?.unloadingElectronicsLadingBillFilePath) {
|
if (!this.datas?.unloadingElectronicsLadingBillFilePath) {
|
||||||
this.service.request(this.service.$api_createBillDischargeGoods, [this.datas?.id]).subscribe(res => {
|
this.service.request(this.service.$api_createBillDischargeGoods, [this.datas?.id]).subscribe(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
switch (res[0]?.esignFlowStatus) {
|
switch (res[0]?.esignFlowStatus) {
|
||||||
case 1:
|
case 1:
|
||||||
case '1':
|
case '1':
|
||||||
let time = 5
|
|
||||||
setInterval (function () {
|
|
||||||
time-=1
|
|
||||||
}, 1000); //反复执行函数本身
|
|
||||||
const modal = this.modalService.success({
|
|
||||||
nzTitle: '电子卸货单签署中!',
|
|
||||||
nzContent: `
|
|
||||||
请等待${time}秒后自动关闭
|
|
||||||
`
|
|
||||||
});
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.service.request(this.service.$api_getBillDischargeEsignFile, [this.datas?.id]).subscribe(res => {
|
this.service.request(this.service.$api_getBillDischargeEsignFile, [this.datas?.id]).subscribe(res => {
|
||||||
if(res[0]?.esignFlowStatus == '2') {
|
if(res[0]?.esignFlowStatus == '2') {
|
||||||
@ -641,7 +646,7 @@ export class orderManagementVoucherViewComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
modal.destroy()
|
modal.destroy()
|
||||||
}, 5000);
|
}, 10000);
|
||||||
|
|
||||||
return ;
|
return ;
|
||||||
case 2:
|
case 2:
|
||||||
|
|||||||
@ -932,6 +932,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
this.service.msgSrv.warning('装货时间必须大于当前时间!');
|
this.service.msgSrv.warning('装货时间必须大于当前时间!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
console.log(this.validateForm1.value.loadingTime);
|
||||||
|
console.log(new Date());
|
||||||
|
|
||||||
if (this.validateForm1.value.loadingTime > this.validateForm1.value.unloadingTime) {
|
if (this.validateForm1.value.loadingTime > this.validateForm1.value.unloadingTime) {
|
||||||
this.service.msgSrv.warning('装货时间不能大于卸货时间!');
|
this.service.msgSrv.warning('装货时间不能大于卸货时间!');
|
||||||
return;
|
return;
|
||||||
@ -956,25 +959,25 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const getFreightParms = { carLengthKeys: this.sf4.value.carLength, km: this.totalDistance };
|
// const getFreightParms = { carLengthKeys: this.sf4.value.carLength, km: this.totalDistance };
|
||||||
this.service.request(this.service.$api_getFreight, getFreightParms).subscribe(res => {
|
// this.service.request(this.service.$api_getFreight, getFreightParms).subscribe(res => {
|
||||||
if (this.sf7.value.subtotal > res.maxPrice) {
|
// if (this.sf7.value.subtotal > res.maxPrice) {
|
||||||
this.service.msgSrv.error(`运费过高,请调整录入`);
|
// this.service.msgSrv.error(`运费过高,请调整录入`);
|
||||||
return;
|
// return;
|
||||||
} else if (this.sf7.value.subtotal > res.ewPrice) {
|
// } else if (this.sf7.value.subtotal > res.ewPrice) {
|
||||||
this.modalService.confirm({
|
// this.modalService.confirm({
|
||||||
nzTitle: '',
|
// nzTitle: '',
|
||||||
nzContent: `您的录入的运费过高,可能会影响支付,请仔细确认`,
|
// nzContent: `您的录入的运费过高,可能会影响支付,请仔细确认`,
|
||||||
nzOkText: '继续',
|
// nzOkText: '继续',
|
||||||
nzCancelText: '取消',
|
// nzCancelText: '取消',
|
||||||
nzOnOk: () => {
|
// nzOnOk: () => {
|
||||||
this.agreementConfirm(submitType);
|
// this.agreementConfirm(submitType);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
this.agreementConfirm(submitType);
|
// this.agreementConfirm(submitType);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
// 提交前协议弹窗
|
// 提交前协议弹窗
|
||||||
agreementConfirm(submitType?: string) {
|
agreementConfirm(submitType?: string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user