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: '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 ?