Browse Source

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

master_hella_20240701
gaojs 6 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) => { 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

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

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

Loading…
Cancel
Save