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/utils/request.js b/src/utils/request.js index 4a543df..d19f16c 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -22,6 +22,7 @@ service.interceptors.request.use( const JSESSIONID = utils.uuid(); config.headers["JSESSIONID"] = JSESSIONID; config.headers["token"] = utils.bcrypt(JSESSIONID); + config.headers['dataSources'] = 'WEB' if (env === "development") { return config; 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 @@ @@ -253,7 +253,8 @@ export default { currentPage: 1, pageSize: 10, total: 0, - params: {}, + params: { + }, }, oilCompanyMatch: {}, billData:[], @@ -335,6 +336,7 @@ export default { }, //table list getByPage() { + this.parameter.params.customerId=this.$store.state.user.companyId order.getByPage(this.parameter).then((res) => { this.tableData = res.data.list; this.total = res.data.totalCount; @@ -352,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 }, @@ -369,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/components/create.vue b/src/views/product/components/create.vue index 0963af9..c580c26 100644 --- a/src/views/product/components/create.vue +++ b/src/views/product/components/create.vue @@ -107,14 +107,14 @@ export default { "form.salePrice": { handler(n, o) { if(n){ - this.form.preAmount = this.form.salePrice*(this.form.preQuantity?this.form.preQuantity:0) + this.form.preAmount = (this.form.salePrice*(this.form.preQuantity?this.form.preQuantity:0)).toFixed(2) } }, }, "form.preQuantity": { handler(n, o) { if(n){ - this.form.preAmount = this.form.preQuantity*(this.form.salePrice?this.form.salePrice:0) + this.form.preAmount = (this.form.preQuantity*(this.form.salePrice?this.form.salePrice:0)).toFixed(2) } }, } 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]: "",