From 501deed682d4406662a70fe6fd1228b1f9c442ff Mon Sep 17 00:00:00 2001 From: lixuan Date: Wed, 22 Feb 2023 17:48:35 +0800 Subject: [PATCH] xiugai --- src/api/order.js | 13 +- src/views/order/components/billOfLading.vue | 14 ++- src/views/order/index.vue | 124 ++++++++++++++------ src/views/product/components/create.vue | 11 +- 4 files changed, 111 insertions(+), 51 deletions(-) diff --git a/src/api/order.js b/src/api/order.js index fc830fe..ce65aeb 100644 --- a/src/api/order.js +++ b/src/api/order.js @@ -27,6 +27,15 @@ const deleteBill = (params) => { const orderSuccess = (params) => { return request.postJson("/oil-refinery/xoilRefineryOrder/orderSuccess", params); }; +//订单锁定 +const orderLock = (params) => { + return request.postJson("/oil-refinery/xoilRefineryOrder/orderLock", params); +}; +//确认下单 +const orderComplete = (params) => { + return request.postJson("/oil_refinery/xoilRefineryOrder/orderComplete", params); +}; + @@ -39,5 +48,7 @@ export default { findByOrderId, update, deleteBill, - orderSuccess + orderSuccess, + orderLock, + orderComplete }; diff --git a/src/views/order/components/billOfLading.vue b/src/views/order/components/billOfLading.vue index a59f308..63554ec 100644 --- a/src/views/order/components/billOfLading.vue +++ b/src/views/order/components/billOfLading.vue @@ -162,7 +162,7 @@ export default { orderTagType(val){ switch(val){ case 'SUBMITED': return '订单提交' - case 'ORDER_LOCKED': return '下单中' + case 'ORDER_LOCKED': return '订单锁定' case 'ORDER_SUCCESS': return '下单成功' case 'DELIVERING': return '提货中' case 'COMPLETE': return '提货单完成' @@ -262,7 +262,7 @@ export default { case 'COMPLETE': return {orderLabel:'订单完成',label:'提货完成',info:'提货完成',type:'success',type1:'info',orderType:'success'} case 'CANCELED': return {orderLabel:'订单取消',label:'订单取消',info:'订单取消',type:'info',type1:'dark',orderType:'info'} } - return {label:val?val:'暂无数据',type:'info'} + return {label:val?val:'暂无数据',info:val?val:'暂无数据',type:'info'} }, //创建修改提货单弹窗 billAdd(e,index){ @@ -337,15 +337,19 @@ export default { submit() { this.quantity = 0 this.billData.list.forEach(element => { - this.quantity += element.accDeliveryQuantity + if(element.accDeliveryQuantity){ + this.quantity += element.accDeliveryQuantity + }else{ + this.$message.error('提货单异常') + throw new Error() + } }); this.$confirm('确定下单?', '提示', { type: 'success' }).then(() => { let data={ id:this.controlWindows.addInfo.id, actQuantity:this.quantity, - customerId:this.controlWindows.addInfo.customerId } - order.orderSuccess(data).then((res) => { + order.orderComplete(data).then((res) => { if (res.code === 20000) { this.$message.success(res.msg); this.closeWindow(); diff --git a/src/views/order/index.vue b/src/views/order/index.vue index 74ead96..8c6180b 100644 --- a/src/views/order/index.vue +++ b/src/views/order/index.vue @@ -1,7 +1,13 @@ @@ -177,8 +189,10 @@