From 9cfb96f2c32ab0ea72317a095da8fa153d42ebee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= <2178503051@qq.com> Date: Thu, 28 May 2026 15:25:03 +0800 Subject: [PATCH] =?UTF-8?q?feat(mes/qc/inspection/task):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=B7=A5=E5=8D=95=E9=99=84=E4=BB=B6=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- klp-ui/src/views/mes/qc/inspection/task.vue | 47 ++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/klp-ui/src/views/mes/qc/inspection/task.vue b/klp-ui/src/views/mes/qc/inspection/task.vue index b5c10cfa..b2c67be5 100644 --- a/klp-ui/src/views/mes/qc/inspection/task.vue +++ b/klp-ui/src/views/mes/qc/inspection/task.vue @@ -112,6 +112,13 @@ --> + + + @@ -376,6 +391,7 @@ import { listInspectionItemTemplate } from "@/api/mes/qc/inspectionItemTemplate" import { SchemeSelect } from "@/components/KLPService"; import CoilSelector from "@/components/CoilSelector/index.vue"; import CurrentCoilNo from "@/components/KLPService/Renderer/CurrentCoilNo.vue"; +import FileUpload from "@/components/FileUpload"; import { listCoilByIds, listMaterialCoil } from "@/api/wms/coil"; export default { @@ -389,7 +405,8 @@ export default { components: { SchemeSelect, CoilSelector, - CurrentCoilNo + CurrentCoilNo, + FileUpload }, data() { return { @@ -471,6 +488,11 @@ export default { enterCoilNoLoading: false, selectedEnterCoilNos: [], tempEnterCoilNo: '', + attachmentOpen: false, + attachmentTitle: '', + attachmentLoading: false, + attachmentTaskRow: null, + attachmentFiles: '', }; }, computed: { @@ -869,6 +891,29 @@ export default { }; this.resetForm("itemForm"); }, + getAttachmentCount(row) { + if (!row.attachmentFiles) return 0; + return row.attachmentFiles.split(',').filter(f => f).length; + }, + handleAttachment(row) { + this.attachmentTaskRow = row; + this.attachmentTitle = `附件管理 - ${row.taskCode}`; + this.attachmentFiles = row.attachmentFiles || ''; + this.attachmentOpen = true; + }, + submitAttachment() { + this.attachmentLoading = true; + updateInspectionTask({ + taskId: this.attachmentTaskRow.taskId, + attachmentFiles: this.attachmentFiles + }).then(() => { + this.$modal.msgSuccess('附件保存成功'); + this.attachmentTaskRow.attachmentFiles = this.attachmentFiles; + this.attachmentOpen = false; + }).finally(() => { + this.attachmentLoading = false; + }); + }, } };