diff --git a/src/views/eam/equipmentInspectionMain/equipmentInspectionMain.data.ts b/src/views/eam/equipmentInspectionMain/equipmentInspectionMain.data.ts index 8c84665ed..433e9dbb1 100644 --- a/src/views/eam/equipmentInspectionMain/equipmentInspectionMain.data.ts +++ b/src/views/eam/equipmentInspectionMain/equipmentInspectionMain.data.ts @@ -9,6 +9,7 @@ import * as BasicFaultTypeApi from "@/api/eam/basicFaultType"; // 表单校验 export const EquipmentInspectionMainRules = reactive({ + type: [required], number: [required], sources: [required], equipmentCode: [required], @@ -18,6 +19,7 @@ export const EquipmentInspectionMainRules = reactive({ startTime: [required], endTime: [required], status: [required], + workshopCode: [required], }) export const EquipmentInspectionMain = useCrudSchemas(reactive([ @@ -35,6 +37,7 @@ export const EquipmentInspectionMain = useCrudSchemas(reactive([ field: 'number', sort: 'custom', isSearch: true, + isForm:false, }, { label: '来源字典', @@ -43,6 +46,7 @@ export const EquipmentInspectionMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.EAM_INSPECTION_SOURCES, dictClass: 'string', isSearch: false, + isForm:false, }, { label: '描述', @@ -53,6 +57,14 @@ export const EquipmentInspectionMain = useCrudSchemas(reactive([ isForm: false, isDetail:false, }, + { + label: '设备类别', + field: 'type', + dictType: DICT_TYPE.DEVICE_TYPE, + dictClass: 'string', + sort: 'custom', + isSearch: false, + }, { label: '设备编号', field: 'equipmentCode', @@ -78,20 +90,14 @@ export const EquipmentInspectionMain = useCrudSchemas(reactive([ } } }, - { - label: '设备类别', - field: 'type', - dictType: DICT_TYPE.DEVICE_TYPE, - dictClass: 'string', - sort: 'custom', - isSearch: true, - isSearch: false, - }, { label: '是否拍照', field: 'isPictures', sort: 'custom', isSearch: true, + isForm: true, + dictType: DICT_TYPE.FALSE_OR_TRUE, + dictClass: 'string', form: { component: 'Radio' }, @@ -101,6 +107,7 @@ export const EquipmentInspectionMain = useCrudSchemas(reactive([ field: 'planNumber', sort: 'custom', isSearch: true, + isForm: false, }, { label: '计划开始时间', @@ -108,6 +115,7 @@ export const EquipmentInspectionMain = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm: false, search: { component: 'DatePicker', componentProps: { @@ -130,6 +138,7 @@ export const EquipmentInspectionMain = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm: false, search: { component: 'DatePicker', componentProps: { @@ -152,6 +161,7 @@ export const EquipmentInspectionMain = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm: false, search: { component: 'DatePicker', componentProps: { @@ -174,6 +184,7 @@ export const EquipmentInspectionMain = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm: false, search: { component: 'DatePicker', componentProps: { @@ -195,18 +206,21 @@ export const EquipmentInspectionMain = useCrudSchemas(reactive([ field: 'classType', sort: 'custom', isSearch: false, + isForm: false, }, { label: '验证人', field: 'verifyer', sort: 'custom', isSearch: false, + isForm: false, }, { label: '验证内容', field: 'verifyContent', sort: 'custom', isSearch: false, + isForm: false, }, { label: '验证时间', @@ -214,6 +228,7 @@ export const EquipmentInspectionMain = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm: false, search: { component: 'DatePicker', componentProps: { @@ -235,12 +250,14 @@ export const EquipmentInspectionMain = useCrudSchemas(reactive([ field: 'maintenancer', sort: 'custom', isSearch: false, + isForm: false, }, { label: '巡检人电话', field: 'maintenancePhone', sort: 'custom', isSearch: false, + isForm: false, }, { label: '完成时间', @@ -248,6 +265,7 @@ export const EquipmentInspectionMain = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm: false, search: { component: 'DatePicker', componentProps: { @@ -270,6 +288,7 @@ export const EquipmentInspectionMain = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm: false, search: { component: 'DatePicker', componentProps: { diff --git a/src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts b/src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts index 84ff87a3c..979140258 100644 --- a/src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts +++ b/src/views/eam/equipmentMaintenanceMain/equipmentMaintenanceMain.data.ts @@ -19,6 +19,7 @@ export const EquipmentMaintenanceMainRules = reactive({ planStartTime: [required], planEndTime: [required], status: [required], + workshopCode: [required], }) export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ @@ -45,6 +46,7 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ field: 'number', sort: 'custom', isSearch: true, + isForm: false, }, { label: '来源字典', @@ -55,6 +57,15 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ isSearch: false, isForm: true, }, + { + label: '设备类别', + field: 'type', + dictType: DICT_TYPE.DEVICE_TYPE, + dictClass: 'string', + sort: 'custom', + isSearch: true, + isSearch: false, + }, { label: '设备编号', field: 'equipmentCode', @@ -80,15 +91,6 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ } } }, - { - label: '设备类别', - field: 'type', - dictType: DICT_TYPE.DEVICE_TYPE, - dictClass: 'string', - sort: 'custom', - isSearch: true, - isSearch: false, - }, { label: '故障类型', field: 'faultType', @@ -115,6 +117,7 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ field: 'planNumber', sort: 'custom', isSearch: true, + isForm: false, }, { label: '计划开始时间', @@ -166,6 +169,7 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm:false, search: { component: 'DatePicker', componentProps: { @@ -188,6 +192,7 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm:false, search: { component: 'DatePicker', componentProps: { @@ -209,18 +214,21 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ field: 'classType', sort: 'custom', isSearch: false, + isForm:false, }, { label: '验证人', field: 'verifyer', sort: 'custom', isSearch: false, + isForm:false, }, { label: '验证内容', field: 'verifyContent', sort: 'custom', isSearch: false, + isForm:false, }, { label: '验证时间', @@ -228,6 +236,7 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm:false, search: { component: 'DatePicker', componentProps: { @@ -249,12 +258,14 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ field: 'maintenancer', sort: 'custom', isSearch: false, + isForm:false, }, { label: '保养人联系电话', field: 'maintenancePhone', sort: 'custom', isSearch: false, + isForm:false, }, { label: '完成时间', @@ -262,6 +273,7 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm:false, search: { component: 'DatePicker', componentProps: { @@ -337,6 +349,7 @@ export const EquipmentMaintenanceMain = useCrudSchemas(reactive([ field: 'factoryAreaCode', sort: 'custom', isSearch: false, + isForm:false, }, { label: '车间编号', diff --git a/src/views/eam/equipmentMaintenanceMain/finishForm1.vue b/src/views/eam/equipmentMaintenanceMain/finishForm1.vue index 34f04c3ce..025d5aaff 100644 --- a/src/views/eam/equipmentMaintenanceMain/finishForm1.vue +++ b/src/views/eam/equipmentMaintenanceMain/finishForm1.vue @@ -64,8 +64,6 @@ const formData = ref({ verifyer: '', verifyContent: '', verifyTime: '', - maintenancer: '', - maintenancePhone: '', }) const formRules = reactive({ verifyer: [ @@ -79,12 +77,6 @@ const formRules = reactive({ verifyTime: [ { required: true, message: '验证时间不能为空', trigger: 'blur' }, ], - maintenancer: [ - { required: true, message: '保养人ID不能为空', trigger: 'blur' }, - ], - maintenancePhone: [ - { required: true, message: '保养人电话不能为空', trigger: 'blur' }, - ], }) const basicFormRef = ref() // 表单 Ref diff --git a/src/views/eam/equipmentMaintenanceMain/index.vue b/src/views/eam/equipmentMaintenanceMain/index.vue index a644987de..a170a2af5 100644 --- a/src/views/eam/equipmentMaintenanceMain/index.vue +++ b/src/views/eam/equipmentMaintenanceMain/index.vue @@ -138,7 +138,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ - //defaultButtons.defaultAddBtn({hasPermi:'eam:equipmentMaintenanceMain:create'}), // 新增 + defaultButtons.defaultAddBtn({hasPermi:'eam:equipmentMaintenanceMain:create'}), // 新增 //defaultButtons.defaultImportBtn({hasPermi:'eam:equipmentMaintenanceMain:import'}), // 导入 defaultButtons.defaultExportBtn({hasPermi:'eam:equipmentMaintenanceMain:export'}), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 @@ -235,11 +235,9 @@ const basicFormRef = ref() const openForm = (type: string, row?: any) => { if(type == "create"){ EquipmentMaintenanceMain.allSchemas.formSchema.forEach((item) => { - if(item.field == 'number'){ - item.componentProps.disabled = false - } - if(item.field == 'planNumber'){ - item.componentProps.disabled = false + if(item.field == 'sources'){ + item.value = '1'; + item.componentProps.disabled = true } if(item.field == 'status'){ item.value = '3'; @@ -248,10 +246,7 @@ const openForm = (type: string, row?: any) => { }) }else{ EquipmentMaintenanceMain.allSchemas.formSchema.forEach((item) => { - if(item.field == 'number'){ - item.componentProps.disabled = true - } - if(item.field == 'planNumber'){ + if(item.field == 'sources'){ item.componentProps.disabled = true } if(item.field == 'status'){ diff --git a/src/views/eam/equipmentReportRepairRequest/equipmentReportRepairRequest.data.ts b/src/views/eam/equipmentReportRepairRequest/equipmentReportRepairRequest.data.ts index 3099abca8..93b558fc9 100644 --- a/src/views/eam/equipmentReportRepairRequest/equipmentReportRepairRequest.data.ts +++ b/src/views/eam/equipmentReportRepairRequest/equipmentReportRepairRequest.data.ts @@ -4,6 +4,8 @@ import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; import {Workshop} from "@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data"; import * as WorkshopApi from "@/api/wms/workshop"; import {dateFormatter} from '@/utils/formatTime' +import {BasicFaultType} from "@/views/eam/basicFaultType/basicFaultType.data"; +import * as BasicFaultTypeApi from "@/api/eam/basicFaultType"; // 表单校验 export const EquipmentReportRepairRequestRules = reactive({ @@ -16,6 +18,8 @@ export const EquipmentReportRepairRequestRules = reactive({ shutDown:[required], repairPhone:[required], available:[required], + workshopCode:[required], + faultType:[required], }) export const EquipmentReportRepairRequest = useCrudSchemas(reactive([ @@ -72,9 +76,22 @@ export const EquipmentReportRepairRequest = useCrudSchemas(reactive([ @@ -31,6 +34,7 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ field: 'number', sort: 'custom', isSearch: true, + isForm:false, }, { label: '来源字典', @@ -39,6 +43,7 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.EAM_SPOTCHECK_SOURCES, dictClass: 'string', isSearch: false, + isForm:false, }, { label: '点检描述', @@ -49,6 +54,14 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ isForm: false, isDetail:false, }, + { + label: '设备类别', + field: 'type', + dictType: DICT_TYPE.DEVICE_TYPE, + dictClass: 'string', + sort: 'custom', + isSearch: false, + }, { label: '设备编号', field: 'equipmentCode', @@ -74,20 +87,12 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ } } }, - { - label: '设备类别', - field: 'type', - dictType: DICT_TYPE.DEVICE_TYPE, - dictClass: 'string', - sort: 'custom', - isSearch: true, - isSearch: false, - }, { label: '点检计划工单号', field: 'planNumber', sort: 'custom', isSearch: true, + isForm: false, }, { label: '计划开始时间', @@ -95,6 +100,7 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm: false, search: { component: 'DatePicker', componentProps: { @@ -117,6 +123,7 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm: false, search: { component: 'DatePicker', componentProps: { @@ -139,6 +146,7 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm: false, search: { component: 'DatePicker', componentProps: { @@ -161,6 +169,7 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm: false, search: { component: 'DatePicker', componentProps: { @@ -203,6 +212,7 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ field: 'verifyer', sort: 'custom', isSearch: false, + isForm: false, form: { component: 'InputNumber', value: 0 @@ -213,6 +223,7 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ field: 'verifyContent', sort: 'custom', isSearch: false, + isForm: false, }, { label: '验证时间', @@ -220,6 +231,7 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm: false, search: { component: 'DatePicker', componentProps: { @@ -241,12 +253,14 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ field: 'maintenancer', sort: 'custom', isSearch: false, + isForm: false, }, { label: '点检人电话', field: 'maintenancePhone', sort: 'custom', isSearch: false, + isForm: false, }, { label: '完成时间', @@ -254,6 +268,7 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm: false, search: { component: 'DatePicker', componentProps: { @@ -276,6 +291,7 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm: false, search: { component: 'DatePicker', componentProps: { @@ -293,10 +309,12 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ }, }, { - label: '是否拍照1否0是', + label: '是否拍照', field: 'isPictures', sort: 'custom', isSearch: true, + dictType: DICT_TYPE.FALSE_OR_TRUE, + dictClass: 'string', form: { component: 'Radio' }, @@ -347,6 +365,7 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ field: 'classType', sort: 'custom', isSearch: false, + isForm: false, }, { label: '所属厂区编号', @@ -440,6 +459,7 @@ export const EquipmentSpotCheckMain = useCrudSchemas(reactive([ field: 'remark', sort: 'custom', isSearch: true, + isForm: true, }, { label: '地点ID', diff --git a/src/views/eam/maintenance/maintenance.data.ts b/src/views/eam/maintenance/maintenance.data.ts index 9bfea7d37..028fc96d7 100644 --- a/src/views/eam/maintenance/maintenance.data.ts +++ b/src/views/eam/maintenance/maintenance.data.ts @@ -10,11 +10,13 @@ import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/w // 表单校验 export const MaintenanceRules = reactive({ name: [required], + type: [required], equipmentCode: [required], optionCode: [required], cycle: [required], startTime: [required], endTime: [required], + workshopCode: [required], }) export const Maintenance = useCrudSchemas(reactive([ @@ -164,12 +166,14 @@ export const Maintenance = useCrudSchemas(reactive([ field: 'approver', sort: 'custom', isSearch: false, + isForm: false, }, { label: '审核内容', field: 'approveContent', sort: 'custom', isSearch: false, + isForm: false, }, { label: '审核时间', @@ -177,6 +181,7 @@ export const Maintenance = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm: false, search: { component: 'DatePicker', componentProps: { diff --git a/src/views/eam/planInspection/index.vue b/src/views/eam/planInspection/index.vue index 5ad07790f..1eef0e612 100644 --- a/src/views/eam/planInspection/index.vue +++ b/src/views/eam/planInspection/index.vue @@ -196,7 +196,7 @@ const openForm = (type: string, row?: any) => { }else{ PlanInspection.allSchemas.formSchema.forEach((item) => { if(item.field == 'status'){ - item.componentProps.disabled = false + item.componentProps.disabled = true } }) } diff --git a/src/views/eam/planInspection/planInspection.data.ts b/src/views/eam/planInspection/planInspection.data.ts index a9bb8ef8c..23ceae4ec 100644 --- a/src/views/eam/planInspection/planInspection.data.ts +++ b/src/views/eam/planInspection/planInspection.data.ts @@ -10,6 +10,7 @@ import * as WorkshopApi from "@/api/wms/workshop"; // 表单校验 export const PlanInspectionRules = reactive({ + type: [required], number: [required], name: [required], equipmentCode: [required], @@ -17,6 +18,7 @@ export const PlanInspectionRules = reactive({ cycle: [required], startTime: [required], endTime: [required], + workshopCode: [required], }) export const PlanInspection = useCrudSchemas(reactive([ @@ -166,12 +168,14 @@ export const PlanInspection = useCrudSchemas(reactive([ field: 'approver', sort: 'custom', isSearch: false, + isForm: false, }, { label: '审核内容', field: 'approveContent', sort: 'custom', isSearch: false, + isForm: false, }, { label: '审核时间', @@ -179,6 +183,7 @@ export const PlanInspection = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm: false, search: { component: 'DatePicker', componentProps: { diff --git a/src/views/eam/planSpotCheck/index.vue b/src/views/eam/planSpotCheck/index.vue index cf19403c8..9dae3f7bd 100644 --- a/src/views/eam/planSpotCheck/index.vue +++ b/src/views/eam/planSpotCheck/index.vue @@ -197,7 +197,7 @@ const openForm = (type: string, row?: any) => { }else{ PlanSpotCheck.allSchemas.formSchema.forEach((item) => { if(item.field == 'status'){ - item.componentProps.disabled = false + item.componentProps.disabled = true } }) } diff --git a/src/views/eam/planSpotCheck/planSpotCheck.data.ts b/src/views/eam/planSpotCheck/planSpotCheck.data.ts index 26636766a..4c94aefcb 100644 --- a/src/views/eam/planSpotCheck/planSpotCheck.data.ts +++ b/src/views/eam/planSpotCheck/planSpotCheck.data.ts @@ -9,6 +9,7 @@ import * as WorkshopApi from "@/api/wms/workshop"; // 表单校验 export const PlanSpotCheckRules = reactive({ + type: [required], number: [required], name: [required], equipmentCode: [required], @@ -16,6 +17,7 @@ export const PlanSpotCheckRules = reactive({ cycle: [required], startTime: [required], endTime: [required], + workshopCode: [required], }) export const PlanSpotCheck = useCrudSchemas(reactive([ @@ -165,12 +167,14 @@ export const PlanSpotCheck = useCrudSchemas(reactive([ field: 'approver', sort: 'custom', isSearch: false, + isForm: false, }, { label: '审核内容', field: 'approveContent', sort: 'custom', isSearch: false, + isForm: false, }, { label: '审核时间', @@ -178,6 +182,7 @@ export const PlanSpotCheck = useCrudSchemas(reactive([ sort: 'custom', formatter: dateFormatter, isSearch: false, + isForm: false, search: { component: 'DatePicker', componentProps: {