|
|
@ -825,9 +825,9 @@ const buttonTableClick = async (val, row) => { |
|
|
|
/** 添加/修改操作 */ |
|
|
|
const openForm = async (type: string, row?: number) => { |
|
|
|
|
|
|
|
|
|
|
|
formRef.value.open(type, row, masterParmas.value) |
|
|
|
emit('detailOpenForm', type, row) |
|
|
|
|
|
|
|
if(type == "create"){ |
|
|
|
EquipmentMaintenanceDetail.allSchemas.formSchema.forEach((item) => { |
|
|
|
if(item.field == 'peoples'){ |
|
|
@ -843,7 +843,6 @@ const openForm = async (type: string, row?: number) => { |
|
|
|
} |
|
|
|
if(item.field == 'completionTime'){ |
|
|
|
item.componentProps.disabled = true |
|
|
|
EquipmentMaintenanceDetailRules.completionTime[0].required = false |
|
|
|
} |
|
|
|
if(item.field == 'result'){ |
|
|
|
item.componentProps.disabled = true |
|
|
@ -858,8 +857,12 @@ const openForm = async (type: string, row?: number) => { |
|
|
|
} |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
row.peoples = row.peoples.toString() |
|
|
|
row.estimatedMinutes = row.estimatedMinutes.toString() |
|
|
|
row.actualMinutes = row.actualMinutes.toString() |
|
|
|
EquipmentMaintenanceDetail.allSchemas.formSchema.forEach((item) => { |
|
|
|
if(item.field == 'peoples'){ |
|
|
|
console.log(item); |
|
|
|
item.componentProps.disabled = false |
|
|
|
EquipmentMaintenanceDetailRules.peoples[0].required = true |
|
|
|
} |
|
|
@ -872,7 +875,6 @@ const openForm = async (type: string, row?: number) => { |
|
|
|
} |
|
|
|
if(item.field == 'completionTime'){ |
|
|
|
item.componentProps.disabled = false |
|
|
|
EquipmentMaintenanceDetailRules.completionTime[0].required = true |
|
|
|
} |
|
|
|
if(item.field == 'result'){ |
|
|
|
item.componentProps.disabled = false |
|
|
|