From d8870ea6a0c904368299125464245038020132a7 Mon Sep 17 00:00:00 2001 From: caolc <572275724@qq.com> Date: Thu, 16 Mar 2023 13:34:31 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- package.json | 2 +- src/api/order.js | 8 +- src/views/order/components/billOfLading.vue | 345 +++++++++++--------- src/views/order/index.vue | 24 +- src/views/product/index.vue | 3 +- vue.config.js | 2 +- 7 files changed, 214 insertions(+), 172 deletions(-) diff --git a/.env.development b/.env.development index 096b594..825862c 100644 --- a/.env.development +++ b/.env.development @@ -1,4 +1,4 @@ ENV = 'development' VUE_APP_BASE_API = '/api' -VUE_APP_ENV = 'development' +VUE_APP_ENV = 'production' diff --git a/package.json b/package.json index 71c4192..ccaab1a 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "bcryptjs": "^2.4.3", "better-scroll": "1.8.0", "clipboard": "^2.0.11", - "core-js": "3.6.5", + "core-js": "^3.29.1", "crypto-js": "^4.1.1", "element-ui": "^2.15.12", "js-cookie": "2.2.0", diff --git a/src/api/order.js b/src/api/order.js index 5c9f211..988a89e 100644 --- a/src/api/order.js +++ b/src/api/order.js @@ -15,6 +15,10 @@ const billSave = (params) => { const update = (params) => { return request.putJson("/oil-refinery/xoilRefineryDelivery/update", params); }; +//取消提货单 +const cancel = (params) => { + return request.putJson("/oil-refinery/xoilRefineryOrder/update", params); +}; //查看订单信息 const findByOrderId = (id) => { return request.get(`/oil-refinery/xoilRefineryDelivery/findByOrderId/${id}`); @@ -36,6 +40,7 @@ const orderLock = (params) => { + export default { getByPage, findDeliveryByOrderId, @@ -44,5 +49,6 @@ export default { update, deleteBill, orderSuccess, - orderLock + orderLock, + cancel }; diff --git a/src/views/order/components/billOfLading.vue b/src/views/order/components/billOfLading.vue index 2837988..3450950 100644 --- a/src/views/order/components/billOfLading.vue +++ b/src/views/order/components/billOfLading.vue @@ -1,12 +1,6 @@ @@ -254,7 +254,6 @@ export default { pageSize: 10, total: 0, params: { - }, }, oilCompanyMatch: {}, @@ -355,14 +354,18 @@ export default { this.controlWindows.add = true; }, //提货单 - async billOfLading(row){ + async billOfLading(row,selectIndex){ this.controlWindows.addInfo.title = ""; - await order.findDeliveryByOrderId(row.id).then((res) => { + if(!selectIndex||selectIndex==1){ + await order.findDeliveryByOrderId(row.id).then((res) => { this.billData.list = res.data }); - await order.findByOrderId(row.id).then((res) => { - this.billData.orderInfo = res.data + } + if(!selectIndex||selectIndex==2){ + await order.findByOrderId(row.id).then((res) => { + this.billData.orderInfo = Object.assign(res.data,{id:row.id}) }); + } this.controlWindows.addInfo = row this.controlWindows.bill = true }, @@ -372,8 +375,11 @@ export default { this.controlWindows.detail = true; }, //订单锁定 - deleteRow(row) { - order.orderLock({id:row.id}).then((res) => { + deleteRow(row,type) { + let api = type&&type=='delete'?'cancel':'orderLock'; + let data = {id:row.id}; + (api=='cancel')&&(data['orderStatus']='CANCELED'); + order[api](data).then((res) => { if(res.code == 20000){ this.getByPage() } diff --git a/src/views/product/index.vue b/src/views/product/index.vue index 3e976d1..1568f33 100644 --- a/src/views/product/index.vue +++ b/src/views/product/index.vue @@ -238,7 +238,8 @@ export default { }, //table list getByPage() { - serve.getByPage(this.parameter).then((res) => { + let data = Object.assign(this.parameter,{enableMark: 'ENABLE'}); + serve.getByPage(data).then((res) => { this.tableData = res.data.list; this.parameter.total = res.data.totalCount; }); diff --git a/vue.config.js b/vue.config.js index ed16263..cf6a33e 100644 --- a/vue.config.js +++ b/vue.config.js @@ -30,7 +30,7 @@ module.exports = { [process.env.VUE_APP_BASE_API]: { // target: `https://3816t6291y.oicp.vip`, // target: 'https://6l438d1757.zicp.fun', - target: "http://192.168.0.23:38080", + target: "http://uat.xingoil.com/adminapi", changeOrigin: true, pathRewrite: { ["^" + process.env.VUE_APP_BASE_API]: "",