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 @@
-->
+
+
+
+ {{ getAttachmentCount(scope.row) }}个
+
+
+
+
+
+
+
+
@@ -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;
+ });
+ },
}
};