Browse Source

EAM ——> 保养工单子明细更新

master_hella_20240701
gaojs 4 months ago
parent
commit
02575fca7d
  1. 8
      src/views/eam/equipmentMaintenanceMain/DetailEam.vue
  2. 13
      src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts

8
src/views/eam/equipmentMaintenanceMain/DetailEam.vue

@ -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

13
src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts

@ -383,12 +383,13 @@ export const EquipmentMaintenanceDetailRules = reactive({
validator:validateroundNumber,
message: '请输入正确的正整数',
trigger: 'blur'}],
completionTime: [
{
required:false ,
message:'该项为必填项',
tagger:['blur']
}],
completionTime: [required],
// [
// {
// required:false ,
// message:'该项为必填项',
// tagger:['blur']
// }],
result: [
{
required:false ,

Loading…
Cancel
Save