From 02090fcfb4a09151959850363ba45faf62b08f81 Mon Sep 17 00:00:00 2001 From: "SERVERM-0FVHDNN\\Administrator" <942005050@qq.com> Date: Thu, 30 Mar 2023 16:03:59 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fe/PC/src/mixins/mixins.js | 12 +++++++----- fe/PC/src/utils/request.js | 3 ++- fe/PC/src/views/basicData/BomManage/Bom.vue | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/fe/PC/src/mixins/mixins.js b/fe/PC/src/mixins/mixins.js index 9b32dcd01..5daf230f7 100644 --- a/fe/PC/src/mixins/mixins.js +++ b/fe/PC/src/mixins/mixins.js @@ -227,18 +227,19 @@ export const mixins = { fd.append("file", formFile[0]) postImport(fd, _uploadURL, _isSpecial).then(res => { + const headers = JSON.parse(res.headers) // 判断是否有错误记录 - if (res.errorNum > 0) { - that.$alert('发现导入错误数据共:' + res.errorNum + '条', '错误报告', { + if (headers.result.ErrorNum > 0) { + that.$alert('发现导入错误数据共:' + headers.result.ErrorNum + '条', '错误报告', { confirmButtonText: '下载错误报告', callback: action => { if (action == 'confirm') { - that.blob(res.bytes, menuName + '错误报告') + that.blob(res, menuName + '错误报告') } } }) - } else if (res.exceptionMessage != null) { - that.$alert('错误信息:' + res.exceptionMessage, '错误', { + } else if (headers.result.ExceptionMessage != null) { + that.$alert('错误信息:' + headers.result.ExceptionMessage, '错误', { confirmButtonText: '确定', callback: action => { } @@ -259,6 +260,7 @@ export const mixins = { that.displayDialog.importDialog = false; that.paging() }).catch(err => { + that.$errorMsg('导入过程中发生错误!请联系管理员!') that.Loading.importLoading = false that.FormRemove(val[0]); that.displayDialog.importDialog = false; diff --git a/fe/PC/src/utils/request.js b/fe/PC/src/utils/request.js index 167f73186..58180b04e 100644 --- a/fe/PC/src/utils/request.js +++ b/fe/PC/src/utils/request.js @@ -57,9 +57,10 @@ service.interceptors.response.use( */ response => { const res = response.data - console.log(response) if(response.headers['content-disposition']){ res.disposition = response.headers['content-disposition'] + } else if (response.headers['x-response']) { + res.headers = response.headers['x-response'] } // if the custom code is not 20000, it is judged as an error. // if (res.code !== 20000) { diff --git a/fe/PC/src/views/basicData/BomManage/Bom.vue b/fe/PC/src/views/basicData/BomManage/Bom.vue index 9124f64a2..ea9d8045d 100644 --- a/fe/PC/src/views/basicData/BomManage/Bom.vue +++ b/fe/PC/src/views/basicData/BomManage/Bom.vue @@ -156,7 +156,7 @@ export default { focus: (type,val) => { return this.getFilterList(type, val, "basedata/Item-Basic")}, searchButton: (val) => { this.showSerarchPage(val, 'basedata/Item-Basic', 'ItemBasic', '物料选择', this.CreateFormData) }, colSpan: 12 }, { type: "input", label: "子物料用量", prop: 'componentQty', colSpan: 12, validType:'pointNumber' }, - { type: "input", label: "子物料用量单位", prop: 'componentUom', colSpan: 12 }, + { type: "input", label: "子物料用量单位", prop: 'componentUom', disabled:"true", colSpan: 12 }, { type: "dateTime", label: "开始时间", prop: "beginTime", colSpan: 12 }, { type: "dateTime", label: "结束时间", prop: "endTime", colSpan: 12 }, { type: "input", label: "ERP工序", prop: "erpOp", colSpan: 12 }, From c893dbac8e76f27036df9a0ce89cae303494af3d Mon Sep 17 00:00:00 2001 From: "SERVERM-0FVHDNN\\Administrator" <942005050@qq.com> Date: Thu, 30 Mar 2023 18:03:06 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96=E8=A1=A58=E5=B0=8F=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/currenDescriptions/index.vue | 7 ++--- fe/PC/src/components/currenTable/index.vue | 5 ++-- fe/PC/src/components/umyTable/index.vue | 8 ++--- fe/PC/src/utils/formatTime.js | 30 +++++++++++++++++++ 4 files changed, 36 insertions(+), 14 deletions(-) diff --git a/fe/PC/src/components/currenDescriptions/index.vue b/fe/PC/src/components/currenDescriptions/index.vue index e9a96eb04..829b3d40a 100644 --- a/fe/PC/src/components/currenDescriptions/index.vue +++ b/fe/PC/src/components/currenDescriptions/index.vue @@ -66,6 +66,7 @@