This commit is contained in:
parent
c7f07d2586
commit
82b511b50b
|
|
@ -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 ?
|
||||
|
|
|
|||
Loading…
Reference in New Issue