From 82b511b50b19308e2df876daf7b85c7d773fe6dc Mon Sep 17 00:00:00 2001 From: bb_pan Date: Fri, 28 Nov 2025 15:40:08 +0800 Subject: [PATCH] =?UTF-8?q?=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../toolsManage/codeToolsLedger/index.vue | 60 ++++++++++--------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/src/views/toolsManage/codeToolsLedger/index.vue b/src/views/toolsManage/codeToolsLedger/index.vue index 3eb66c21..75dc2f47 100644 --- a/src/views/toolsManage/codeToolsLedger/index.vue +++ b/src/views/toolsManage/codeToolsLedger/index.vue @@ -398,33 +398,33 @@ export default { { label: '规格型号', prop: 'typeName' }, { label: '计量单位', prop: 'unitName' }, { label: '工具编码', prop: 'toolCode' }, - { - label: "工具状态", - prop: "status", - width: 120, - render: (h, { row }) => { - const statusOptions = { - 0: { text: "在库", type: "success" }, - 1: { text: "在用", type: "info" }, - 2: { text: "在修", type: "warning" }, - 3: { text: "已报废", type: "danger" }, - }; - const option = statusOptions[row.status] || { - text: "未知状态", - type: "", - }; - return h( - "el-tag", - { - props: { - type: option.type, - size: "mini", - }, - }, - option.text - ); - }, - }, + // { + // label: "工具状态", + // prop: "status", + // width: 120, + // render: (h, { row }) => { + // const statusOptions = { + // 0: { text: "在库", type: "success" }, + // 1: { text: "在用", type: "info" }, + // 2: { text: "在修", type: "warning" }, + // 3: { text: "已报废", type: "danger" }, + // }; + // const option = statusOptions[row.status] || { + // text: "未知状态", + // type: "", + // }; + // return h( + // "el-tag", + // { + // props: { + // type: option.type, + // size: "mini", + // }, + // }, + // option.text + // ); + // }, + // }, { label: '下次检验时间', prop: 'nextCheckDate' }, { label: '生产厂家', prop: 'supplierName', width: 200 }, { label: '出厂日期', prop: 'productionDate' }, @@ -595,6 +595,12 @@ export default { // 处理状态名称 const statusMap = { 0: '在库', 1: '在用', 2: '在修', 3: '已报废' } this.dialogForm.statusName = statusMap[this.dialogForm.status] || '未知状态' + if (!this.dialogForm.propertyVoList || this.dialogForm.propertyVoList.length === 0) { + this.dialogForm.propertyVoList.push({ + propertyName: '', + propertyValue: '', + }) + } // 确保fileList是数组格式 if (!Array.isArray(this.dialogForm.fileList)) { this.dialogForm.fileList = this.dialogForm.fileList ?