diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index 831eb70..fa89661 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -372,11 +372,11 @@ const open = async (type: string, row?: any, masterParmas?: any) => { if (masterParmas) { if (!row) { row = { - maintenanceNumber: masterParmas.maintenanceNumber, + number: masterParmas.number, } } } - if (row?.id || row?.maintenanceNumber) { + if (row?.id || row?.number) { formLoading.value = true try { nextTick(() => { diff --git a/src/views/eam/device/deviceMaintainPlan/deviceMaintainPlan.data.ts b/src/views/eam/device/deviceMaintainPlan/deviceMaintainPlan.data.ts index 4ba599d..f1311f9 100644 --- a/src/views/eam/device/deviceMaintainPlan/deviceMaintainPlan.data.ts +++ b/src/views/eam/device/deviceMaintainPlan/deviceMaintainPlan.data.ts @@ -7,7 +7,6 @@ export const DeviceMaintainPlanRules = reactive({ name: [required], maintenanceType: [required], type: [required], - concurrencyStamp: [required], }) export const DeviceMaintainPlan = useCrudSchemas(reactive([ diff --git a/src/views/eam/device/deviceinspectionjob/deviceInspectionMain.data.ts b/src/views/eam/device/deviceinspectionjob/deviceInspectionMain.data.ts index 1ede60f..c9c6d4b 100644 --- a/src/views/eam/device/deviceinspectionjob/deviceInspectionMain.data.ts +++ b/src/views/eam/device/deviceinspectionjob/deviceInspectionMain.data.ts @@ -26,8 +26,7 @@ export const DeviceInspectionMainRules = reactive({ describes: [ ], maintenancePhone: [ - { max: 11, message: '不得超过11个字符', trigger: 'blur' }, - { validator:validateHanset, message: '请输入数字格式', trigger: 'blur'} + { validator:validateHanset, message: '输入电话格式不正确', trigger: 'blur'} ], status: [required], type: [required], diff --git a/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts b/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts index 05eb457..9f3a3f9 100644 --- a/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts +++ b/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts @@ -5,11 +5,13 @@ import { useUserStore } from '@/store/modules/user' import { selecUserByType } from '@/api/system/dept' import { ItemSearchTable } from '../../basic/item/item.data' import * as ItemApi from '@/api/eam/basic/item' +import * as UserApi from '@/api/system/user' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' const userStore = useUserStore() const factoryList = await selectAllFactoryArea() const deviceList = await DeviceAccountsApi.getDeviceAccountsNoPage({}) const userList = await selecUserByType({ classType: 'DEVICE', factoryAreaNumber: '', flag: 1 }) +const userListAll = await UserApi.getSimpleUserList() const deviceTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE).filter(item => item.value != 'MOLD') const deviceMoldTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE) // 表单校验 @@ -123,13 +125,17 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive([ table: { width: '150', }, + api: () => userListAll, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userListAll.find((account) => account.id == cellValue)?.nickname + }, form: { component: 'Select', - api: () => userList, + api: () => userListAll, componentProps: { disabled: true, optionsAlias: { - labelField: 'name', + labelField: 'nickname', valueField: 'id' }, placeholder: "请先选择设备" @@ -206,6 +212,9 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive([ }, form: { component: 'Input', + componentProps: { + type: 'textarea', + } }, }, @@ -222,6 +231,18 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive([ ])) export const DeviceMaintenanceDetail = useCrudSchemas(reactive([ + { + label: '维修编号', + field: 'number', + sort: 'custom', + isSearch: false, + form: { + component: 'Input', + componentProps: { + disabled: true + } + }, + }, { label: '故障描述', field: 'describes', @@ -229,6 +250,13 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive([ table: { }, isSearch: false, + form: { + component: 'Input', + componentProps: { + type: 'textarea', + } + + }, }, { label: '故障真因', @@ -237,6 +265,13 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive([ table: { }, isSearch: false, + form: { + component: 'Input', + componentProps: { + type: 'textarea', + } + + }, }, { label: '解决措施', @@ -245,6 +280,13 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive([ table: { }, isSearch: false, + form: { + component: 'Input', + componentProps: { + type: 'textarea', + } + + }, }, { label: '维修人', @@ -346,9 +388,17 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive([ ])) // 表单校验 export const DeviceMaintenanceDetailRules = reactive({ - describes: [required], - describes1: [required], - workOut: [required], - maintenance: [required], - itemNumbers: [required], + describes: [ + required, + { max: 200, message: '不得超过200个字符', trigger: 'blur' }, + ], + describes1: [ + required, + { max: 200, message: '不得超过200个字符', trigger: 'blur' }, + ], + workOut: [ + required, + { max: 200, message: '不得超过200个字符', trigger: 'blur' }, + ], + maintenances: [required], }) \ No newline at end of file diff --git a/src/views/eam/device/devicemaintenancejob/index.vue b/src/views/eam/device/devicemaintenancejob/index.vue index fd9e1e9..e1ea247 100644 --- a/src/views/eam/device/devicemaintenancejob/index.vue +++ b/src/views/eam/device/devicemaintenancejob/index.vue @@ -55,12 +55,13 @@ :tableData="tableData" :apiUpdate="DeviceMaintenanceMainApi.updateDeviceMaintenanceMain" :apiCreate="DeviceMaintenanceMainApi.createDeviceMaintenanceMain" - :isBusiness="true" + :isBusiness="false" @onChange="onChange" @handleAddTable="handleAddTable" @handleDeleteTable="handleDeleteTable" @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" + @success="submitForm" :isSearchTableItem="true" /> @@ -365,6 +366,7 @@ const searchFormClick = (searchData) => { // 接单 function acceptOrder(row) { DeviceMaintenanceMainApi.orderStepChange(row) + getList() } // 转办 function turnOrder() {} @@ -464,7 +466,7 @@ const detailSubmitForm= async (formType,data,getList,formRef,tableList) => { try { let data1 = { id:data.id, - maintenanceNumber:data.maintenanceNumber, + number:data.number, describes:data.describes, describes1:data.describes1, itemNumbers:data.itemNumbers,