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