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

优化提单制作

parent dab4ac79
......@@ -195,14 +195,14 @@ export default {
this.getBillList();
}
},
handleCommand(type, row) {
async handleCommand(type, row) {
this.handleType = type;
switch (type) {
case "previewBill":
this.getBill(row);
break;
case "makeBill":
this.makeBill(row);
await this.makeBill(row);
break;
case "queryBill":
this.getBill(row);
......@@ -236,9 +236,10 @@ export default {
this.$set(this.dialogCfg, "width", "1200px");
this.$set(this.dialogCfg, "visible", true);
},
makeBill(row) {
async makeBill(row) {
let api = this.type != 'air' ? makeBillService : makeAirBillService;
api({
let loading = this.$loading()
await api({
orderId: row.orderId,
shipmentId: this.shipmentObj.id,
}).then((res) => {
......@@ -249,6 +250,10 @@ export default {
billContent,
orderNo: this.currRow.orderNo,
};
}).catch(() => {
throw new Error('制作提单失败')
}).finally(() => {
loading.close()
});
},
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