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