From edbe3b94540a56bfd658cbe488eed13f1cf4a3e9 Mon Sep 17 00:00:00 2001 From: itcast Date: Mon, 22 Dec 2025 17:50:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equipmentInput/add.vue | 5 ++- .../equipmentInput/index.vue | 45 +++++++++++-------- src/views/search/lease/index.vue | 2 +- src/views/system/project/index.vue | 2 +- 4 files changed, 33 insertions(+), 21 deletions(-) diff --git a/src/views/EquipmentEntryApply/equipmentInput/add.vue b/src/views/EquipmentEntryApply/equipmentInput/add.vue index 08e178f7..0097992a 100644 --- a/src/views/EquipmentEntryApply/equipmentInput/add.vue +++ b/src/views/EquipmentEntryApply/equipmentInput/add.vue @@ -243,7 +243,7 @@ 0) { this.propertyVoList.forEach((item) => { + if (item.propertyValue === '' || item.propertyValue === null || item.propertyValue === undefined) { + item.propertyValue = null; + } if (item.inputType == 3) { item.propertyValue = item.propertyValue.split(',') } diff --git a/src/views/EquipmentEntryApply/equipmentInput/index.vue b/src/views/EquipmentEntryApply/equipmentInput/index.vue index 7a66264f..5a8dc9d9 100644 --- a/src/views/EquipmentEntryApply/equipmentInput/index.vue +++ b/src/views/EquipmentEntryApply/equipmentInput/index.vue @@ -736,6 +736,7 @@ export default { this.isAddVisible = this.$route.query.isAddVisible && JSON.parse(this.$route.query.isAddVisible) this.isApprovalVisible = this.$route.query.isApprovalVisible && JSON.parse(this.$route.query.isApprovalVisible) if (!this.orderId) { + this.orderId='' this.pageTitle = '新增设备录入' this.submitButtonText = '提交申请' } else if (this.isAddVisible) { @@ -785,7 +786,7 @@ export default { productionDate: '', minOriginalValue: '', maxOriginalValue: '', - + orderId: '', pageNum: 1, pageSize: 10, }, @@ -973,30 +974,37 @@ export default { this.upload.isUploading = true }, // 文件上传成功处理 + // 文件上传成功处理 handleFileSuccess(response, file, fileList) { this.upload.open = false this.upload.isUploading = false this.$refs.upload.clearFiles() this.$alert( "
" + - response.msg + - '
', + response.msg + + '', '导入结果', { dangerouslyUseHTMLString: true }, ) - this.orderId = response.data || '' - this.$router - .replace({ - query: { - orderId: response.data, - isAddVisible: this.isAddVisible, - isApprovalVisible: this.isApprovalVisible, - }, - }) - .then(() => { - console.log('🚀 ~ 导入成功跳转完成') - this.getList() - }) + // 【修复1】仅在接口返回有效orderId时才更新,否则保留原来的orderId + if (response.data) { + this.orderId = response.data + this.$router + .replace({ + query: { + orderId: response.data, + isAddVisible: this.isAddVisible, + isApprovalVisible: this.isApprovalVisible, + }, + }) + .then(() => { + console.log('🚀 ~ 导入成功跳转完成') + this.getList() + }) + } else { + // 【修复2】如果没有返回orderId,直接刷新当前列表,使用已有的orderId + this.getList() + } }, handleFileSuccess2(response, file, fileList) { this.upload.open2 = false @@ -1004,11 +1012,12 @@ export default { this.$refs.upload2.clearFiles() this.$alert( "
" + - response.msg + - '
', + response.msg + + '', '导入结果', { dangerouslyUseHTMLString: true }, ) + // 【修复3】不管是否成功,都直接刷新列表,使用当前已有的orderId setTimeout(() => { this.getList() }, 200) diff --git a/src/views/search/lease/index.vue b/src/views/search/lease/index.vue index 4120ba11..8bacf7b9 100644 --- a/src/views/search/lease/index.vue +++ b/src/views/search/lease/index.vue @@ -82,7 +82,7 @@ -->
- +