diff --git a/src/views/eam/equipmentInspectionMain/finishForm2.vue b/src/views/eam/equipmentInspectionMain/finishForm2.vue index 381210828..f06d450c5 100644 --- a/src/views/eam/equipmentInspectionMain/finishForm2.vue +++ b/src/views/eam/equipmentInspectionMain/finishForm2.vue @@ -2,11 +2,11 @@ - - - - - + + + + + @@ -72,16 +72,12 @@ const InputRef = ref>() const formData = ref({ id:'', number:'', - maintenancer: '', maintenancePhone: '', startTime:'', endTime:'', status:'5', }) const formRules = reactive({ - maintenancer: [ - { required: true, message: '巡检人ID不能为空', trigger: 'blur' }, - ], maintenancePhone: [ { required: true, message: '巡检人电话不能为空', trigger: 'blur' }, ], diff --git a/src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts b/src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts index 979140258..97d22bbfe 100644 --- a/src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts +++ b/src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts @@ -9,11 +9,15 @@ import * as ItemApi from "@/api/eam/relationMaintenancePlanItem"; import {validateroundNumber} from "@/utils/validator"; import {BasicFaultType} from "@/views/eam/basicFaultType/basicFaultType.data"; import * as BasicFaultTypeApi from "@/api/eam/basicFaultType"; +import {BasicMaintenanceOption} from "@/views/eam/basicMaintenanceOption/basicMaintenanceOption.data"; +import * as BasicMaintenanceOptionApi from "@/api/eam/basicMaintenanceOption"; + // 表单校验 export const EquipmentMaintenanceMainRules = reactive({ number: [required], sources: [required], + optionCode:[required], equipmentCode: [required], type: [required], planStartTime: [required], @@ -112,6 +116,28 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ } }, }, + { + label: '保养方案', + field: 'optionCode', + sort: 'custom', + isSearch: true, + isTable: false, + form: { + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择保养方案', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '保养方案信息', // 查询弹窗标题 + searchAllSchemas: BasicMaintenanceOption.allSchemas, // 查询弹窗所需类 + searchPage: BasicMaintenanceOptionApi.getBasicMaintenanceOptionPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + }, + }, { label: '保养计划工单号', field: 'planNumber', diff --git a/src/views/eam/equipmentMaintenanceMain/finishForm2.vue b/src/views/eam/equipmentMaintenanceMain/finishForm2.vue index ce49c2a4d..1e6c7b358 100644 --- a/src/views/eam/equipmentMaintenanceMain/finishForm2.vue +++ b/src/views/eam/equipmentMaintenanceMain/finishForm2.vue @@ -2,11 +2,11 @@ - - - - - + + + + + @@ -71,16 +71,12 @@ const InputRef = ref>() const formData = ref({ id:'', number:'', - maintenancer: '', maintenancePhone: '', startTime:'', endTime:'', status:'5', }) const formRules = reactive({ - maintenancer: [ - { required: true, message: '保养人ID不能为空', trigger: 'blur' }, - ], maintenancePhone: [ { required: true, message: '保养人电话不能为空', trigger: 'blur' }, ], diff --git a/src/views/eam/equipmentRepairJobMain/finishForm2.vue b/src/views/eam/equipmentRepairJobMain/finishForm2.vue index 2ce939352..bbb3582d4 100644 --- a/src/views/eam/equipmentRepairJobMain/finishForm2.vue +++ b/src/views/eam/equipmentRepairJobMain/finishForm2.vue @@ -40,11 +40,11 @@ - - - - - + + + + + @@ -102,7 +102,6 @@ const formData = ref({ level: '', startTime:'', endTime:'', - maintenancer:'', maintenancePhone:'', completeResult:'', status:'5' @@ -120,9 +119,6 @@ const formRules = reactive({ endTime: [ { required: true, message: '结束时间不能为空', trigger: 'blur' }, ], - maintenancer: [ - { required: true, message: '维修人ID不能为空', trigger: 'blur' }, - ], maintenancePhone: [ { required: true, message: '维修人电话不能为空', trigger: 'blur' }, ], diff --git a/src/views/eam/equipmentSpotCheckMain/finishForm2.vue b/src/views/eam/equipmentSpotCheckMain/finishForm2.vue index 261d2882c..242e63158 100644 --- a/src/views/eam/equipmentSpotCheckMain/finishForm2.vue +++ b/src/views/eam/equipmentSpotCheckMain/finishForm2.vue @@ -2,11 +2,11 @@ - - - - - + + + + + @@ -73,16 +73,12 @@ const InputRef = ref>() const formData = ref({ id:'', number:'', - maintenancer: '', maintenancePhone: '', startTime:'', endTime:'', status:'5', }) const formRules = reactive({ - maintenancer: [ - { required: true, message: '巡检人ID不能为空', trigger: 'blur' }, - ], maintenancePhone: [ { required: true, message: '巡检人电话不能为空', trigger: 'blur' }, ],