From 72a3dcff0eef8e8f9c4add650021a640ecdb2a97 Mon Sep 17 00:00:00 2001 From: MrZhai Date: Tue, 8 Mar 2022 16:09:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=A2=9E=E5=8A=A0=E8=AF=B7=E6=B1=82=E5=A4=B4=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/FileResource.vue | 6 ++++++ src/views/basic/CorpImport.vue | 6 ++++++ src/views/basic/CorpSelect.vue | 2 +- src/views/basic/UdIInfoSelect.vue | 2 +- src/views/basic/UdiInfoImport.vue | 7 +++++++ src/views/basic/UdiinfoExport.vue | 5 +---- src/views/basic/basicCompany.vue | 10 ++++++++++ src/views/basic/invWarehouse.vue | 9 ++++++++- src/views/thrsys/ThrCorpSelect.vue | 2 +- src/views/thrsys/ThrOrderImport.vue | 7 ++++++- src/views/thrsys/ThrProductsSelect.vue | 2 +- src/views/thrsys/UdplatGoodsImport.vue | 6 ++++++ src/views/userManage/param/systemPDFModule.vue | 6 ++++++ src/views/userManage/param/systemPDFTemplate.vue | 7 +++++++ src/views/userManage/register.vue | 6 ++++++ .../userManage/suppliersEnterpriseBasicAddCert.vue | 6 ++++++ src/views/userManage/suppliersRegistrationBasic.vue | 8 ++++++++ src/views/warehouse/companyAddCert.vue | 6 ++++++ src/views/warehouse/companyAddSalesman.vue | 8 ++++++++ 19 files changed, 101 insertions(+), 10 deletions(-) diff --git a/src/components/common/FileResource.vue b/src/components/common/FileResource.vue index 6a67383..7a9efaa 100644 --- a/src/components/common/FileResource.vue +++ b/src/components/common/FileResource.vue @@ -18,6 +18,7 @@ :action="uploadUrl" :on-success="handleSuccess" :on-error="handleError" + :headers="headers" :data="uploadData" :name="uploadData.uploadName" :accept="uploadData.exts" @@ -148,6 +149,7 @@ export default { uploadVisible: false, isIcon: true, // 是否以图标形式展示(列表 or 图标) total: 0, + headers: {}, lists: [], tagLists: [], uploadData: { @@ -410,6 +412,10 @@ export default { if (this.token && this.token !== "" && this.token !== "undefined") { this.uploadData.token = this.token; } + this.headers = { + ADMIN_ID: store.getters.adminId, + ADMIN_TOKEN: store.getters.token, + }; }, computed: {} }; diff --git a/src/views/basic/CorpImport.vue b/src/views/basic/CorpImport.vue index 8d2232d..059648f 100644 --- a/src/views/basic/CorpImport.vue +++ b/src/views/basic/CorpImport.vue @@ -22,6 +22,7 @@ :action="uploadFileUrl" multiple :limit="3" + :headers="headers" :data="uploadData" :show-file-list="false" :on-success="handleChange" @@ -134,6 +135,7 @@ }, corpImportDetailVisible: false, checked: false, + headers: {}, list: [], detailList: [], thirdSys: [], @@ -278,6 +280,10 @@ created() { this.getBasicThirdSys(); this.getList(); + this.headers = { + ADMIN_ID: store.getters.adminId, + ADMIN_TOKEN: store.getters.token, + }; }, }; diff --git a/src/views/basic/CorpSelect.vue b/src/views/basic/CorpSelect.vue index 500cb19..cceabaa 100644 --- a/src/views/basic/CorpSelect.vue +++ b/src/views/basic/CorpSelect.vue @@ -472,7 +472,7 @@ if (response.code == 20000) { this.$message({ type: "success", - message: "导出成功,后台正在生成Excel文件,请稍后刷新查看!", + message: "导出成功,后台正在生成udi文件,请稍后刷新查看!", }); } else { this.$message({ diff --git a/src/views/basic/UdIInfoSelect.vue b/src/views/basic/UdIInfoSelect.vue index 8eab92d..29decd7 100644 --- a/src/views/basic/UdIInfoSelect.vue +++ b/src/views/basic/UdIInfoSelect.vue @@ -663,7 +663,7 @@ export default { if (response.code == 20000) { this.$message({ type: "success", - message: "导出成功,后台正在生成Excel文件,请稍后刷新查看!", + message: "导出成功,后台正在生成udi文件,请稍后刷新查看!", }); } else { this.$message({ diff --git a/src/views/basic/UdiInfoImport.vue b/src/views/basic/UdiInfoImport.vue index 17b7a9c..0ab2322 100644 --- a/src/views/basic/UdiInfoImport.vue +++ b/src/views/basic/UdiInfoImport.vue @@ -23,6 +23,7 @@ :action="uploadFileUrl" multiple :limit="3" + :headers="headers" :data="uploadData" :show-file-list="false" :on-success="handleChange" @@ -125,6 +126,7 @@ import {filterDetail, filterLog, deleteLog, downloadSmp} from "../../api/basic/udiinfolog"; import {getBasicThirdSys} from "../../api/basic/basicThirdSys"; import udiInfoImportDetail from "./UdiInfoImportDetail"; + import store from "@/store"; export default { data() { @@ -139,6 +141,7 @@ }, udiImportDetailVisible: false, checked: false, + headers: {}, list: [], detailList: [], thirdSys: [], @@ -302,6 +305,10 @@ created() { this.getBasicThirdSys(); this.getList(); + this.headers = { + ADMIN_ID: store.getters.adminId, + ADMIN_TOKEN: store.getters.token, + }; }, }; diff --git a/src/views/basic/UdiinfoExport.vue b/src/views/basic/UdiinfoExport.vue index f9018fe..ca0535f 100644 --- a/src/views/basic/UdiinfoExport.vue +++ b/src/views/basic/UdiinfoExport.vue @@ -99,6 +99,7 @@ import axios from "axios"; import {filterLog, downloadLog, deleteLog} from "../../api/basic/udiInfoExport"; import udiInfoSelect from "./UdIInfoSelect"; + import store from "@/store"; export default { data() { @@ -178,7 +179,6 @@ this.udiImportDetailVisible = true; }, downloadExcel(row) { - axios.get("./config.json").then(res => { let baseUrl = res.data.BASE_URL; let href = baseUrl + "/udiwms/products/exportLog/download" + "?genKey=" + row.genKey; @@ -196,10 +196,7 @@ a.click(); this.getList(); }); - }); - - }, cancelDialog(val) { diff --git a/src/views/basic/basicCompany.vue b/src/views/basic/basicCompany.vue index 07cc122..4b8dea4 100644 --- a/src/views/basic/basicCompany.vue +++ b/src/views/basic/basicCompany.vue @@ -386,6 +386,7 @@ :data="{type:'image1'}" :auto-upload="true" :show-file-list="false" + :headers="headers" >
导入业务单据 @@ -176,6 +176,7 @@ }, udiImportDetailVisible: false, checked: false, + headers: {}, list: [], detailList: [], thirdSys: [], @@ -417,6 +418,10 @@ this.getBasicThirdSys(); this.getBusType(); this.getList(); + this.headers = { + ADMIN_ID: store.getters.adminId, + ADMIN_TOKEN: store.getters.token, + }; }, }; diff --git a/src/views/thrsys/ThrProductsSelect.vue b/src/views/thrsys/ThrProductsSelect.vue index ee870cc..3ca1007 100644 --- a/src/views/thrsys/ThrProductsSelect.vue +++ b/src/views/thrsys/ThrProductsSelect.vue @@ -405,7 +405,7 @@ export default { if (response.code == 20000) { this.$message({ type: "success", - message: "导出成功,后台正在生成Excel文件,请稍后刷新查看!", + message: "导出成功,后台正在生成udi文件,请稍后刷新查看!", }); this.$emit("cancelDialog", true); } else { diff --git a/src/views/thrsys/UdplatGoodsImport.vue b/src/views/thrsys/UdplatGoodsImport.vue index 66a0275..7467d6c 100644 --- a/src/views/thrsys/UdplatGoodsImport.vue +++ b/src/views/thrsys/UdplatGoodsImport.vue @@ -26,6 +26,7 @@ :show-file-list="false" :on-success="handleChange" :file-list="fileList" + :headers="headers" > 导入产品信息 @@ -140,6 +141,7 @@ export default { udiImportDetailVisible: false, thrProductsSelectVisible: false, checked: false, + headers: {}, list: [], detailList: [], thirdSys: [], @@ -350,6 +352,10 @@ export default { created() { this.getBasicThirdSys(); // this.getList(); + this.headers = { + ADMIN_ID: store.getters.adminId, + ADMIN_TOKEN: store.getters.token, + }; }, }; diff --git a/src/views/userManage/param/systemPDFModule.vue b/src/views/userManage/param/systemPDFModule.vue index 73e1d10..7561694 100644 --- a/src/views/userManage/param/systemPDFModule.vue +++ b/src/views/userManage/param/systemPDFModule.vue @@ -244,6 +244,7 @@ :on-preview="uploadHandlePreview" :on-remove="uploadHandleRemove" :limit="1" + :headers="headers" :on-exceed="uploadHandleExceed" accept=".jasper" :on-change="uploadOnchange" @@ -380,6 +381,7 @@ export default { page: 1, limit: 20 }, + headers: {}, list: [], total: 0, moduleQuery: { @@ -856,6 +858,10 @@ export default { this.getPDFModuleNameList(); this.getModuleList(); this.uploadUrl = BASE_URL + "/udiwms/upload/pdf/template"; + this.headers = { + ADMIN_ID: store.getters.adminId, + ADMIN_TOKEN: store.getters.token, + }; } }; diff --git a/src/views/userManage/param/systemPDFTemplate.vue b/src/views/userManage/param/systemPDFTemplate.vue index 3e8fa3a..583ab65 100644 --- a/src/views/userManage/param/systemPDFTemplate.vue +++ b/src/views/userManage/param/systemPDFTemplate.vue @@ -181,6 +181,7 @@ ref="uploadJasper" :action="this.uploadUrl" :limit="1" + :headers="headers" :on-exceed="uploadHandleExceed" accept=".jasper" :on-change="uploadOnchange" @@ -207,6 +208,7 @@ class="upload-demo" ref="uploadJrxml" :action="this.uploadJrxmlUrl" + :headers="headers" :limit="1" :on-exceed="uploadJrxmlHandleExceed" accept=".jrxml" @@ -332,6 +334,7 @@ export default { page: 1, limit: 20 }, + headers: {}, list: [], total: 0, moduleQuery: { @@ -809,6 +812,10 @@ export default { this.getModuleList(); this.uploadUrl = BASE_URL + "/udiwms/upload/pdf/template/jasper"; this.uploadJrxmlUrl = BASE_URL + "/udiwms/upload/pdf/template/jrxml"; + this.headers = { + ADMIN_ID: store.getters.adminId, + ADMIN_TOKEN: store.getters.token, + }; } }; diff --git a/src/views/userManage/register.vue b/src/views/userManage/register.vue index a604e31..c792f88 100644 --- a/src/views/userManage/register.vue +++ b/src/views/userManage/register.vue @@ -382,6 +382,7 @@ :action="this.uploadUrl" :on-preview="uploadHandlePreview" :on-remove="uploadHandleRemove" + :headers="headers" :limit="1" :on-exceed="uploadHandleExceed" accept=".jpg,.png" @@ -546,6 +547,7 @@ export default { checkCompanyNameStatus: false, licenseUrl: null, }, + headers: {}, uploadUrl: null, fileUrl: null, isTimer: false, @@ -610,6 +612,10 @@ export default { this.uploadUrl = BASE_URL + "/udiwms/upload/register/file"; this.fileUrl = BASE_URL + "/udiwms/image/register/file/getImage?type=image1&name="; // this.getData(); + this.headers = { + ADMIN_ID: store.getters.adminId, + ADMIN_TOKEN: store.getters.token, + }; }, methods: { onSubmit(formName) { diff --git a/src/views/userManage/suppliersEnterpriseBasicAddCert.vue b/src/views/userManage/suppliersEnterpriseBasicAddCert.vue index 9566dc0..56a2c74 100644 --- a/src/views/userManage/suppliersEnterpriseBasicAddCert.vue +++ b/src/views/userManage/suppliersEnterpriseBasicAddCert.vue @@ -64,6 +64,7 @@ :on-preview="uploadHandlePreview" :on-remove="uploadHandleRemove" :limit="1" + :headers="headers" :on-exceed="uploadHandleExceed" accept=".jpg,.png" :on-change="uploadOnchange" @@ -116,6 +117,7 @@ export default { loading: false, uploadUrl: "", fileList: [], + headers: {}, }; }, components: { @@ -203,6 +205,10 @@ export default { }, created() { this.uploadUrl = BASE_URL + "/udiwms/upload/register/file"; + this.headers = { + ADMIN_ID: store.getters.adminId, + ADMIN_TOKEN: store.getters.token, + }; }, }; diff --git a/src/views/userManage/suppliersRegistrationBasic.vue b/src/views/userManage/suppliersRegistrationBasic.vue index 7ead997..104e2a7 100644 --- a/src/views/userManage/suppliersRegistrationBasic.vue +++ b/src/views/userManage/suppliersRegistrationBasic.vue @@ -340,6 +340,7 @@ :on-preview="uploadHandlePreview" :on-remove="uploadHandleRemove" :limit="1" + :headers="headers" :on-exceed="uploadHandleExceed" accept=".jpg,.png" :on-change="uploadOnchange" @@ -362,6 +363,7 @@ :on-preview="uploadHandlePreview" :on-remove="uploadHandleRemove" :limit="1" + :headers="headers" :on-exceed="uploadHandleExceed" accept=".jpg,.png" :on-change="uploadOnchange" @@ -421,6 +423,7 @@ export default { specification: "", }, loading: false, + headers: {}, classesDisplay: false, selectedOptions: [], selectedOptions2: [], @@ -506,6 +509,11 @@ export default { this.inputQuery.enterpriseId = this.enterpriseId; this.uploadUrl = BASE_URL + "/udiwms/upload/register/file"; this.fileUrl = BASE_URL + "/udiwms/image/register/file/getImage?type=image4&name="; + + this.headers = { + ADMIN_ID: store.getters.adminId, + ADMIN_TOKEN: store.getters.token, + }; }, components: { draggable, diff --git a/src/views/warehouse/companyAddCert.vue b/src/views/warehouse/companyAddCert.vue index 5da7cdb..11e742a 100644 --- a/src/views/warehouse/companyAddCert.vue +++ b/src/views/warehouse/companyAddCert.vue @@ -64,6 +64,7 @@ :on-preview="uploadHandlePreview" :on-remove="uploadHandleRemove" :limit="1" + :headers="headers" :on-exceed="uploadHandleExceed" accept=".jpg,.png" :on-change="uploadOnchange" @@ -115,6 +116,7 @@ export default { loading: false, uploadUrl: "", fileList: [], + headers: {}, }; }, components: { @@ -202,6 +204,10 @@ export default { }, created() { this.uploadUrl = BASE_URL + "/udiwms/upload/register/file"; + this.headers = { + ADMIN_ID: store.getters.adminId, + ADMIN_TOKEN: store.getters.token, + }; }, }; diff --git a/src/views/warehouse/companyAddSalesman.vue b/src/views/warehouse/companyAddSalesman.vue index 4cf6c45..83e1cdb 100644 --- a/src/views/warehouse/companyAddSalesman.vue +++ b/src/views/warehouse/companyAddSalesman.vue @@ -76,6 +76,7 @@ ref="upload" :action="this.uploadUrl" :limit="1" + :headers="headers" :on-exceed="uploadHandleExceed" accept=".jpg,.png" :on-change="uploadOnchange" @@ -106,6 +107,7 @@ ref="upload2" :action="this.uploadUrl" :limit="1" + :headers="headers" :on-exceed="uploadHandleExceed" accept=".jpg,.png" :on-change="uploadOnchange" @@ -180,6 +182,7 @@ export default { fileList2: [], hiddenAdd: false, hiddenAdd2: false, + headers: {}, }; }, components: { @@ -319,6 +322,11 @@ export default { this.hiddenAdd = false; } } + + this.headers = { + ADMIN_ID: store.getters.adminId, + ADMIN_TOKEN: store.getters.token, + }; }, };