Commit 4b18b42b authored by dragondean@qq.com's avatar dragondean@qq.com

优化提单制作

parent dab4ac79
...@@ -195,14 +195,14 @@ export default { ...@@ -195,14 +195,14 @@ export default {
this.getBillList(); this.getBillList();
} }
}, },
handleCommand(type, row) { async handleCommand(type, row) {
this.handleType = type; this.handleType = type;
switch (type) { switch (type) {
case "previewBill": case "previewBill":
this.getBill(row); this.getBill(row);
break; break;
case "makeBill": case "makeBill":
this.makeBill(row); await this.makeBill(row);
break; break;
case "queryBill": case "queryBill":
this.getBill(row); this.getBill(row);
...@@ -236,9 +236,10 @@ export default { ...@@ -236,9 +236,10 @@ export default {
this.$set(this.dialogCfg, "width", "1200px"); this.$set(this.dialogCfg, "width", "1200px");
this.$set(this.dialogCfg, "visible", true); this.$set(this.dialogCfg, "visible", true);
}, },
makeBill(row) { async makeBill(row) {
let api = this.type != 'air' ? makeBillService : makeAirBillService; let api = this.type != 'air' ? makeBillService : makeAirBillService;
api({ let loading = this.$loading()
await api({
orderId: row.orderId, orderId: row.orderId,
shipmentId: this.shipmentObj.id, shipmentId: this.shipmentObj.id,
}).then((res) => { }).then((res) => {
...@@ -249,6 +250,10 @@ export default { ...@@ -249,6 +250,10 @@ export default {
billContent, billContent,
orderNo: this.currRow.orderNo, orderNo: this.currRow.orderNo,
}; };
}).catch(() => {
throw new Error('制作提单失败')
}).finally(() => {
loading.close()
}); });
}, },
getBill(row) { getBill(row) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment