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 @@