This commit is contained in:
bb_pan 2025-11-28 15:40:08 +08:00
parent c7f07d2586
commit 82b511b50b
1 changed files with 33 additions and 27 deletions

View File

@ -398,33 +398,33 @@ export default {
{ label: '规格型号', prop: 'typeName' }, { label: '规格型号', prop: 'typeName' },
{ label: '计量单位', prop: 'unitName' }, { label: '计量单位', prop: 'unitName' },
{ label: '工具编码', prop: 'toolCode' }, { label: '工具编码', prop: 'toolCode' },
{ // {
label: "工具状态", // label: "",
prop: "status", // prop: "status",
width: 120, // width: 120,
render: (h, { row }) => { // render: (h, { row }) => {
const statusOptions = { // const statusOptions = {
0: { text: "在库", type: "success" }, // 0: { text: "", type: "success" },
1: { text: "在用", type: "info" }, // 1: { text: "", type: "info" },
2: { text: "在修", type: "warning" }, // 2: { text: "", type: "warning" },
3: { text: "已报废", type: "danger" }, // 3: { text: "", type: "danger" },
}; // };
const option = statusOptions[row.status] || { // const option = statusOptions[row.status] || {
text: "未知状态", // text: "",
type: "", // type: "",
}; // };
return h( // return h(
"el-tag", // "el-tag",
{ // {
props: { // props: {
type: option.type, // type: option.type,
size: "mini", // size: "mini",
}, // },
}, // },
option.text // option.text
); // );
}, // },
}, // },
{ label: '下次检验时间', prop: 'nextCheckDate' }, { label: '下次检验时间', prop: 'nextCheckDate' },
{ label: '生产厂家', prop: 'supplierName', width: 200 }, { label: '生产厂家', prop: 'supplierName', width: 200 },
{ label: '出厂日期', prop: 'productionDate' }, { label: '出厂日期', prop: 'productionDate' },
@ -595,6 +595,12 @@ export default {
// //
const statusMap = { 0: '在库', 1: '在用', 2: '在修', 3: '已报废' } const statusMap = { 0: '在库', 1: '在用', 2: '在修', 3: '已报废' }
this.dialogForm.statusName = statusMap[this.dialogForm.status] || '未知状态' this.dialogForm.statusName = statusMap[this.dialogForm.status] || '未知状态'
if (!this.dialogForm.propertyVoList || this.dialogForm.propertyVoList.length === 0) {
this.dialogForm.propertyVoList.push({
propertyName: '',
propertyValue: '',
})
}
// fileList // fileList
if (!Array.isArray(this.dialogForm.fileList)) { if (!Array.isArray(this.dialogForm.fileList)) {
this.dialogForm.fileList = this.dialogForm.fileList ? this.dialogForm.fileList = this.dialogForm.fileList ?