From 3ac387e502e269073b9d70485fea3464edc61bf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=99=E8=BF=90=E6=A8=A1?= <1724894114@qq.com> Date: Tue, 10 Dec 2024 21:05:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9D=83=E9=99=90=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E3=80=81=E5=A2=9E=E5=8A=A0=E5=BA=93=E5=AD=98=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 16 ++++----- src/api/model/orders.js | 23 +++++++++++- src/components/scExport/index.vue | 7 ++-- src/components/scImport/index.vue | 2 +- src/components/scTable/index.vue | 6 +++- src/style/fix.scss | 5 +-- src/views/order/inventoryList/index.vue | 47 ++++++++++++------------- src/views/order/orderList/index.vue | 2 +- src/views/setting/role/dataTree.vue | 8 ++--- 9 files changed, 69 insertions(+), 47 deletions(-) diff --git a/.env.production b/.env.production index 6f8ae33..3198248 100644 --- a/.env.production +++ b/.env.production @@ -5,15 +5,15 @@ NODE_ENV = production VUE_APP_TITLE = 象纬云科 # 测试环境 - VUE_APP_API_BASEURL = https://dev.api.linkwing.com/api/v1 - VUE_APP_API_DEV = https://dev.api.linkwing.com/api/v1 - VUE_APP_WS_URL = wss://dev.api.linkwing.com/wss - VUE_APP_WSS_URL = wss://dev.api.linkwing.com/wss +# VUE_APP_API_BASEURL = https://dev.api.linkwing.com/api/v1 +# VUE_APP_API_DEV = https://dev.api.linkwing.com/api/v1 +# VUE_APP_WS_URL = wss://dev.api.linkwing.com/wss +# VUE_APP_WSS_URL = wss://dev.api.linkwing.com/wss # 线上环境 # 接口地址 # WS地址 -# VUE_APP_API_BASEURL = https://prod.api.linkwing.com/api/v1 -# VUE_APP_API_DEV = https://prod.api.linkwing.com/api/v1 -# VUE_APP_WS_URL = wss://prod.api.linkwing.com/wss -# VUE_APP_WSS_URL = wss://prod.api.linkwing.com/wss + VUE_APP_API_BASEURL = https://prod.api.linkwing.com/api/v1 + VUE_APP_API_DEV = https://prod.api.linkwing.com/api/v1 + VUE_APP_WS_URL = wss://prod.api.linkwing.com/wss + VUE_APP_WSS_URL = wss://prod.api.linkwing.com/wss diff --git a/src/api/model/orders.js b/src/api/model/orders.js index 67b374f..f3778ff 100644 --- a/src/api/model/orders.js +++ b/src/api/model/orders.js @@ -263,7 +263,28 @@ export default { post: async function (params) { return await http.post(this.url,params); } - } + }, + import:{ + url: `${config.API_URL}/inventory.import`, + name: "库存导入", + post: async function (params) { + return await http.post(this.url,params,{'Content-Type': 'multipart/form-data'}); + } + }, + template:{ + url: `${config.API_URL}/stock.import.template`, + name: "库存导入模版", + post: async function (params) { + return await http.get(this.url,params,{responseType: 'arraybuffer'}); + } + }, + export:{ + url: `${config.API_URL}/inventory.export`, + name: "库存导出", + post: async function (params) { + return await http.post(this.url,params); + } + }, }, out:{ list:{ diff --git a/src/components/scExport/index.vue b/src/components/scExport/index.vue index ffd97b7..68c7ff1 100644 --- a/src/components/scExport/index.vue +++ b/src/components/scExport/index.vue @@ -47,7 +47,7 @@ export default { }, methods:{ getWsResult(res){ - if(res.data && (res.data.type == 6 || res.data.type == 7 || res.data.type == 8 || res.data.type == 11 || res.data.type == 19 || res.data.type == 20 || res.data.type == 29 || res.data.type == 30 || res.data.type == 32 || res.data.type == 33 || res.data.type == 34 || res.data.type == 43)){ + if(res.data && (res.data.type == 6 || res.data.type == 7 || res.data.type == 8 || res.data.type == 11 || res.data.type == 19 || res.data.type == 20 || res.data.type == 29 || res.data.type == 30 || res.data.type == 32 || res.data.type == 33 || res.data.type == 34 || res.data.type == 40 || res.data.type == 43)){ let item = { type:res.data.type, type_desc:res.data.type_desc, @@ -89,9 +89,12 @@ export default { case 34: this.list[10] = item; break; - default: + case 40: this.list[11] = item; break; + default: + this.list[12] = item; + break; } if(res.data && res.data.status == 1100){ diff --git a/src/components/scImport/index.vue b/src/components/scImport/index.vue index d4860a0..856c55f 100644 --- a/src/components/scImport/index.vue +++ b/src/components/scImport/index.vue @@ -108,7 +108,7 @@ export default { }, methods:{ getWsResult(res){ - if(res.data && (res.data.type == 4 || res.data.type == 5 || res.data.type == 10 || res.data.type == 17 || res.data.type == 18 || res.data.type == 28 || res.data.type == 31 || res.data.type == 42)){ + if(res.data && (res.data.type == 4 || res.data.type == 5 || res.data.type == 10 || res.data.type == 17 || res.data.type == 18 || res.data.type == 27 || res.data.type == 28 || res.data.type == 31 || res.data.type == 42)){ this.importInfo = res.data; this.progressShow = true; if(res.data.status == 0){ diff --git a/src/components/scTable/index.vue b/src/components/scTable/index.vue index 7be0354..d3b6b86 100644 --- a/src/components/scTable/index.vue +++ b/src/components/scTable/index.vue @@ -10,7 +10,7 @@