diff --git a/src/views/eam/device/deviceAccounts/deviceAccounts.data.ts b/src/views/eam/device/deviceAccounts/deviceAccounts.data.ts index 4572f2f..58897b7 100644 --- a/src/views/eam/device/deviceAccounts/deviceAccounts.data.ts +++ b/src/views/eam/device/deviceAccounts/deviceAccounts.data.ts @@ -98,9 +98,9 @@ export const DeviceAccounts = useCrudSchemas(reactive([ component: 'Select', }, isTable: false, + isTableForm: false, + isDetail: false, isForm: false, - isTableForm: true, - isDetail: true, }, { label: '设备类型', @@ -313,6 +313,9 @@ export const DeviceAccounts = useCrudSchemas(reactive([ type: 'datetime', valueFormat: 'x' } + }, + detail: { + dateFormat: 'YYYY-MM-DD' } }, { diff --git a/src/views/eam/device/deviceAccounts/index.vue b/src/views/eam/device/deviceAccounts/index.vue index 4dd5854..5fbf0d1 100644 --- a/src/views/eam/device/deviceAccounts/index.vue +++ b/src/views/eam/device/deviceAccounts/index.vue @@ -238,7 +238,7 @@ const userListAll = await UserApi.getSimpleUserList() const supplierList = await SupplierApi.getSupplierNoPage({}) row.factoryAreaNumberDetail = factoryDeptList.find((account) => account.id == row.factoryAreaNumber)?.name - row.principalDetail = userListAll.find((account) => account.id == row.maintenance)?.nickname + row.principalDetail = userListAll.find((account) => account.id == row.principal)?.nickname row.supplierNumberDetail = supplierList.find((account) => account.number == row.supplierNumber)?.name itemCodeRow.value = row.number tabsExtend.value = 1 diff --git a/src/views/eam/device/deviceRepair/deviceRepair.data.ts b/src/views/eam/device/deviceRepair/deviceRepair.data.ts index 5cc6410..1dc71e9 100644 --- a/src/views/eam/device/deviceRepair/deviceRepair.data.ts +++ b/src/views/eam/device/deviceRepair/deviceRepair.data.ts @@ -153,7 +153,7 @@ export const DeviceRepair = useCrudSchemas(reactive([ }, { label: '工单来源', - field: 'orderSourceType', + field: 'sourceType', sort: 'custom', isSearch: false, isForm: false, diff --git a/src/views/eam/device/deviceRepair/index.vue b/src/views/eam/device/deviceRepair/index.vue index 4a42397..379d862 100644 --- a/src/views/eam/device/deviceRepair/index.vue +++ b/src/views/eam/device/deviceRepair/index.vue @@ -90,7 +90,7 @@ const viewKey = ref(0) routeName.value = route.name const tableColumns = ref(DeviceRepair.allSchemas.tableColumns) const factoryAreaNumber = ref(''); -const type = ref(''); +const type = ref('DEVICE'); // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef) => { nextTick(() => { @@ -182,11 +182,7 @@ const buttonTableClick = async (val, row) => { const basicFormRef = ref() const basicFormViewRef = ref() const openForm = (type: string, row?: any) => { - // if(type == 'create'){ - // DeviceRepair.allSchemas.formSchema.find(item => { - // return item.field == 'type' - // }).value = 'DEVICE' - // } + if (type == 'view') { showView.value = true urls.value = row.filePathList diff --git a/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts b/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts index 2ebd392..c160f1b 100644 --- a/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts +++ b/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts @@ -224,20 +224,9 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive([ isSearch: false, isTableForm: false, isForm: false, - isDetail: false, - table: { - width: '200', + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - }, - { - label: '接单时间', - field: 'receivingTimeDetail', - sort: 'custom', - isSearch: false, - isDetail: true, - isTableForm: false, - isForm: false, - isTable: false, table: { width: '200', }, @@ -381,20 +370,9 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive([ isSearch: false, isTableForm: false, isForm: false, - isDetail: false, - table: { - width: '200', + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - }, - { - label: '完成时间', - field: 'completionTimeDetail', - sort: 'custom', - isTable: false, - isSearch: false, - isTableForm: false, - isForm: false, - isDetail: true, table: { width: '200', }, @@ -457,20 +435,9 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive([ isSearch: false, isTableForm: false, isForm: false, - isDetail: false, - table: { - width: '200', + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - }, - { - label: '确认时间', - field: 'applyTimeDetail', - sort: 'custom', - isTable: false, - isSearch: false, - isTableForm: false, - isForm: false, - isDetail: true, table: { width: '200', }, @@ -533,24 +500,26 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive([ isSearch: false, isTableForm: false, isForm: false, - isDetail: false, - table: { - width: '200', + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - }, - { - label: '验证时间', - field: 'verifyTimeDetail', - sort: 'custom', - isSearch: false, - isTableForm: false, - isForm: false, - isDetail: true, - isTable: false, table: { width: '200', }, }, + // { + // label: '验证时间', + // field: 'verifyTimeDetail', + // sort: 'custom', + // isSearch: false, + // isTableForm: false, + // isForm: false, + // isDetail: true, + // isTable: false, + // table: { + // width: '200', + // }, + // }, { label: '操作', field: 'action', diff --git a/src/views/eam/device/devicemaintenancejob/index.vue b/src/views/eam/device/devicemaintenancejob/index.vue index 1c33c88..33c352f 100644 --- a/src/views/eam/device/devicemaintenancejob/index.vue +++ b/src/views/eam/device/devicemaintenancejob/index.vue @@ -733,6 +733,9 @@ const buttonTableClick = async (val, row) => { /** 添加/修改操作 */ const openForm = async (type: string, row?: any) => { + if(type == 'update'){ + row.classes = String(row.classes) + } tableData.value = [] // 重置明细数据 await DeviceAccountsApi.getDeviceAccountsNoPage({}).then(res => { DeviceMaintenanceMain.allSchemas.formSchema.find(item => { diff --git a/src/views/eam/device/techRepair/index.vue b/src/views/eam/device/techRepair/index.vue index cd1d322..8ca2fb2 100644 --- a/src/views/eam/device/techRepair/index.vue +++ b/src/views/eam/device/techRepair/index.vue @@ -90,7 +90,7 @@ const viewKey = ref(0) routeName.value = route.name const tableColumns = ref(DeviceRepair.allSchemas.tableColumns) const factoryAreaNumber = ref(''); -const type = ref(''); +const type = ref('TECH'); // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef) => { nextTick(() => { diff --git a/src/views/eam/device/techmaintenancejob/index.vue b/src/views/eam/device/techmaintenancejob/index.vue index b2875dd..ff00409 100644 --- a/src/views/eam/device/techmaintenancejob/index.vue +++ b/src/views/eam/device/techmaintenancejob/index.vue @@ -693,6 +693,9 @@ const openForm = async (type: string, row?: any) => { return item.field == 'type' }).value = 'TECH' } + if(type == 'update'){ + row.classes = String(row.classes) + } tableData.value = [] // 重置明细数据 await DeviceAccountsApi.getDeviceAccountsNoPage({}).then(res => { DeviceMaintenanceMain.allSchemas.formSchema.find(item => { diff --git a/src/views/eam/device/techmaintenancejob/techMaintenanceMain.data.ts b/src/views/eam/device/techmaintenancejob/techMaintenanceMain.data.ts index 5414f44..2f1ad3f 100644 --- a/src/views/eam/device/techmaintenancejob/techMaintenanceMain.data.ts +++ b/src/views/eam/device/techmaintenancejob/techMaintenanceMain.data.ts @@ -212,20 +212,9 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive([ isSearch: false, isTableForm: false, isForm: false, - isDetail: false, - table: { - width: '200', + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - }, - { - label: '接单时间', - field: 'receivingTimeDetail', - sort: 'custom', - isSearch: false, - isDetail: true, - isTableForm: false, - isForm: false, - isTable: false, table: { width: '200', }, @@ -370,20 +359,9 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive([ isSearch: false, isTableForm: false, isForm: false, - isDetail: false, - table: { - width: '200', + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - }, - { - label: '完成时间', - field: 'completionTimeDetail', - sort: 'custom', - isTable: false, - isSearch: false, - isTableForm: false, - isForm: false, - isDetail: true, table: { width: '200', }, @@ -446,20 +424,9 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive([ isSearch: false, isTableForm: false, isForm: false, - isDetail: false, - table: { - width: '200', + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - }, - { - label: '确认时间', - field: 'applyTimeDetail', - sort: 'custom', - isTable: false, - isSearch: false, - isTableForm: false, - isForm: false, - isDetail: true, table: { width: '200', }, @@ -522,20 +489,9 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive([ isSearch: false, isTableForm: false, isForm: false, - isDetail: false, - table: { - width: '200', + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - }, - { - label: '验证时间', - field: 'verifyTimeDetail', - sort: 'custom', - isSearch: false, - isTableForm: false, - isForm: false, - isDetail: true, - isTable: false, table: { width: '200', }, @@ -615,19 +571,19 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive([ field: 'maintenances', sort: 'custom', isDetail: false, - // formatter: (_: Recordable, __: TableColumn, cellValue) => { - // let cellValueList = [] - // if (Array.isArray(cellValue)) { - // cellValueList = cellValue - // } else { - // cellValueList = cellValue ? cellValue.split(',') : []; - // } - // // const cellValueList = cellValue ? cellValue.split(',') : []; - // return userListAll - // .filter(item => cellValueList.includes(item.id.toString())) - // .map(item => item.nickname) - // .join(','); - // }, + formatter: (_: Recordable, __: TableColumn, cellValue) => { + let cellValueList = [] + if (Array.isArray(cellValue)) { + cellValueList = cellValue + } else { + cellValueList = cellValue ? cellValue.split(',') : []; + } + // const cellValueList = cellValue ? cellValue.split(',') : []; + return userListAll + .filter(item => cellValueList.includes(item.id.toString())) + .map(item => item.nickname) + .join(','); + }, isTable:true, tableForm: { type: 'Select', diff --git a/src/views/eam/mold/moldRepair/index.vue b/src/views/eam/mold/moldRepair/index.vue index 5b2881b..09c0d09 100644 --- a/src/views/eam/mold/moldRepair/index.vue +++ b/src/views/eam/mold/moldRepair/index.vue @@ -82,7 +82,7 @@ routeName.value = route.name const tableColumns = ref(MoldRepair.allSchemas.tableColumns) const factoryAreaNumber = ref(''); -const type = ref(''); +const type = ref('MOLD'); // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef) => { nextTick(() => { diff --git a/src/views/eam/mold/moldRepair/moldRepair.data.ts b/src/views/eam/mold/moldRepair/moldRepair.data.ts index a8aa6db..c7c46ed 100644 --- a/src/views/eam/mold/moldRepair/moldRepair.data.ts +++ b/src/views/eam/mold/moldRepair/moldRepair.data.ts @@ -154,7 +154,7 @@ export const MoldRepair = useCrudSchemas(reactive([ }, { label: '工单来源', - field: 'orderSourceType', + field: 'sourceType', sort: 'custom', dictType: DICT_TYPE.ORDER_SOURCE_TYPE, dictClass: 'string', diff --git a/src/views/eam/mold/moldmaintenancejob/index.vue b/src/views/eam/mold/moldmaintenancejob/index.vue index f90e649..21ff132 100644 --- a/src/views/eam/mold/moldmaintenancejob/index.vue +++ b/src/views/eam/mold/moldmaintenancejob/index.vue @@ -547,6 +547,9 @@ const buttonTableClick = async (val, row) => { /** 添加/修改操作 */ const openForm = async (type: string, row?: any) => { + if(type == 'update'){ + row.classes = String(row.classes) + } await MoldAccountsApi.getMoldAccountsNoPage({}).then(res => { MoldMaintenanceMain.allSchemas.formSchema.find(item => { return item.field === 'deviceNumber' diff --git a/src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts b/src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts index 9c827be..ef29868 100644 --- a/src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts +++ b/src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts @@ -201,6 +201,18 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive([ isTable: false, isTableForm: false, }, + { + label: '工单来源', + field: 'sourceType', + sort: 'custom', + isSearch: false, + isForm: false, + dictType: DICT_TYPE.ORDER_SOURCE_TYPE, + dictClass: 'string', + table: { + width: '150', + }, + }, { label: '接单人', field: 'maintenance', @@ -259,20 +271,9 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive([ isSearch: false, isTableForm: false, isForm: false, - isDetail: false, - table: { - width: '200', + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - }, - { - label: '接单时间', - field: 'receivingTimeDetail', - sort: 'custom', - isSearch: false, - isDetail: true, - isTableForm: false, - isForm: false, - isTable: false, table: { width: '200', }, @@ -366,20 +367,9 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive([ isSearch: false, isTableForm: false, isForm: false, - isDetail: false, - table: { - width: '200', + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - }, - { - label: '完成时间', - field: 'completionTimeDetail', - sort: 'custom', - isTable: false, - isSearch: false, - isTableForm: false, - isForm: false, - isDetail: true, table: { width: '200', }, @@ -442,20 +432,9 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive([ isSearch: false, isTableForm: false, isForm: false, - isDetail: false, - table: { - width: '200', + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - }, - { - label: '确认时间', - field: 'applyTimeDetail', - sort: 'custom', - isTable: false, - isSearch: false, - isTableForm: false, - isForm: false, - isDetail: true, table: { width: '200', }, @@ -518,20 +497,9 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive([ isSearch: false, isTableForm: false, isForm: false, - isDetail: false, - table: { - width: '200', + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - }, - { - label: '验证时间', - field: 'verifyTimeDetail', - sort: 'custom', - isSearch: false, - isTableForm: false, - isForm: false, - isDetail: true, - isTable: false, table: { width: '200', },