From 85a0cd528d82f1b602c136e9b8220621fcb2b8dc Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Mon, 30 Dec 2024 15:46:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ImportForm/src/ImportForm.vue | 8 ++- .../eam/basic/classType/classType.data.ts | 52 ++++++++++++++----- src/views/eam/basic/classType/index.vue | 13 ++++- .../deviceInternalAudit.data.ts | 50 +++++++++--------- .../eam/device/deviceInternalAudit/index.vue | 10 +++- .../deviceSpotInspectionRecordMain.data.ts | 5 +- .../deviceMaintainOrderMain.data.ts | 13 +++-- .../eam/item/transaction/transaction.data.ts | 2 + .../moldSpotInspectionRecordMain.data.ts | 5 +- .../moldMaintainOrderMain.data.ts | 13 +++-- 10 files changed, 123 insertions(+), 48 deletions(-) diff --git a/src/components/ImportForm/src/ImportForm.vue b/src/components/ImportForm/src/ImportForm.vue index 75e95b3..4071282 100644 --- a/src/components/ImportForm/src/ImportForm.vue +++ b/src/components/ImportForm/src/ImportForm.vue @@ -55,7 +55,7 @@ -
+
([ { - label: '维修工角色编号', + label: '维修工角色', field: 'workerRoleId', sort: 'custom', + isForm: false, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return roleList.find((item) => item.id == cellValue)?.name + }, + }, + { + label: '维修工角色', + field: 'workerRoleName', + sort: 'custom', form: { // labelMessage: '信息提示说明!!!', componentProps: { @@ -80,13 +89,22 @@ export const ClassType = useCrudSchemas(reactive([ ] } }, + isDetail: false, + isTable: false, + isTableForm: false, + }, + { + label: '工程师角色', + field: 'engineerRoleId', + sort: 'custom', + isForm: false, formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return roleList.find((item) => item.id == cellValue)?.name + return roleList.find((account) => account.id == cellValue)?.name }, }, { - label: '工程师角色编号', - field: 'engineerRoleId', + label: '工程师角色', + field: 'engineerRoleName', sort: 'custom', form: { // labelMessage: '信息提示说明!!!', @@ -106,9 +124,9 @@ export const ClassType = useCrudSchemas(reactive([ ] } }, - formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return roleList.find((account) => account.id == cellValue)?.name - }, + isDetail: false, + isTable: false, + isTableForm: false, }, { label: '班组类型', @@ -127,10 +145,11 @@ export const ClassType = useCrudSchemas(reactive([ sort: 'custom', }, { - label: '所属厂区编号', + label: '所属厂区', field: 'factoryAreaNumber', isSearch: true, sort: 'custom', + isForm: false, search: { show: true, component: 'Select', @@ -143,6 +162,16 @@ export const ClassType = useCrudSchemas(reactive([ filterable: true, } }, + //给列表用的 + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return FactoryAreaNoPage.find((account) => account.id == cellValue)?.name + }, + }, + { + label: '所属厂区', + field: 'factoryAreaName', + isSearch: true, + sort: 'custom', form: { // labelMessage: '信息提示说明!!!', componentProps: { @@ -161,10 +190,9 @@ export const ClassType = useCrudSchemas(reactive([ ] } }, - //给列表用的 - formatter: (_: Recordable, __: TableColumn, cellValue: number) => { - return FactoryAreaNoPage.find((account) => account.id == cellValue)?.name - }, + isDetail: false, + isTable: false, + isTableForm: false, }, { label: '创建时间', diff --git a/src/views/eam/basic/classType/index.vue b/src/views/eam/basic/classType/index.vue index d8c3521..c94e73a 100644 --- a/src/views/eam/basic/classType/index.vue +++ b/src/views/eam/basic/classType/index.vue @@ -80,7 +80,18 @@ const tableColumns = ref(ClassType.allSchemas.tableColumns) const searchTableSuccess = (formField, searchField, val, formRef) => { nextTick(() => { const setV = {} - setV[formField] = val[0][searchField] + if (formField == 'workerRoleName') { + setV['workerRoleId'] = val[0][searchField] + setV['workerRoleName'] = val[0]['name'] + } else if (formField == 'engineerRoleName') { + setV['engineerRoleId'] = val[0][searchField] + setV['engineerRoleName'] = val[0]['name'] + } else if (formField == 'factoryAreaName') { + setV['factoryAreaNumber'] = val[0][searchField] + setV['factoryAreaName'] = val[0]['name'] + } else { + setV[formField] = val[0][searchField] + } formRef.setValues(setV) }) } diff --git a/src/views/eam/device/deviceInternalAudit/deviceInternalAudit.data.ts b/src/views/eam/device/deviceInternalAudit/deviceInternalAudit.data.ts index c4ecebc..18eca4c 100644 --- a/src/views/eam/device/deviceInternalAudit/deviceInternalAudit.data.ts +++ b/src/views/eam/device/deviceInternalAudit/deviceInternalAudit.data.ts @@ -278,31 +278,31 @@ export const DeviceInternalAudit = useCrudSchemas(reactive([ sort: 'custom', isSearch: false, }, - { - label: '是否可用', - field: 'available', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isSearch: false, - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - tableForm: { - type: 'Select', - inactiveValue: 'FALSE', - disabled: true - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - } - }, + // { + // label: '是否可用', + // field: 'available', + // dictType: DICT_TYPE.TRUE_FALSE, + // dictClass: 'string', + // isSearch: false, + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // tableForm: { + // type: 'Select', + // inactiveValue: 'FALSE', + // disabled: true + // }, + // form: { + // component: 'Switch', + // value: 'TRUE', + // componentProps: { + // inactiveValue: 'FALSE', + // activeValue: 'TRUE' + // } + // } + // }, { label: '创建时间', field: 'createTime', diff --git a/src/views/eam/device/deviceInternalAudit/index.vue b/src/views/eam/device/deviceInternalAudit/index.vue index 64f9355..1da3997 100644 --- a/src/views/eam/device/deviceInternalAudit/index.vue +++ b/src/views/eam/device/deviceInternalAudit/index.vue @@ -54,7 +54,15 @@ - +