diff --git a/src/views/eam/basic/accountPeriod/accountPeriod.data.ts b/src/views/eam/basic/accountPeriod/accountPeriod.data.ts index 935a245..a53710a 100644 --- a/src/views/eam/basic/accountPeriod/accountPeriod.data.ts +++ b/src/views/eam/basic/accountPeriod/accountPeriod.data.ts @@ -1,4 +1,5 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' // 表单校验 export const AccountPeriodRules = reactive({ @@ -50,6 +51,26 @@ export const AccountPeriod = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/basic/basciYearEquipment/basciYearEquipment.data.ts b/src/views/eam/basic/basciYearEquipment/basciYearEquipment.data.ts index d86c654..6ca05f3 100644 --- a/src/views/eam/basic/basciYearEquipment/basciYearEquipment.data.ts +++ b/src/views/eam/basic/basciYearEquipment/basciYearEquipment.data.ts @@ -93,13 +93,26 @@ export const BasciYearEquipment = useCrudSchemas(reactive([ } } }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isForm: false - }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/basic/basicMonthEquipment/basicMonthEquipment.data.ts b/src/views/eam/basic/basicMonthEquipment/basicMonthEquipment.data.ts index ccde3f6..0dd060a 100644 --- a/src/views/eam/basic/basicMonthEquipment/basicMonthEquipment.data.ts +++ b/src/views/eam/basic/basicMonthEquipment/basicMonthEquipment.data.ts @@ -63,13 +63,26 @@ export const BasicMonthEquipment = useCrudSchemas(reactive([ field: 'actual', sort: 'custom', }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isForm: false, - }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/basic/classType/classType.data.ts b/src/views/eam/basic/classType/classType.data.ts index 3eb3b2e..6f641af 100644 --- a/src/views/eam/basic/classType/classType.data.ts +++ b/src/views/eam/basic/classType/classType.data.ts @@ -194,24 +194,26 @@ export const ClassType = useCrudSchemas(reactive([ isTable: false, isTableForm: false, }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isForm: false, - }, - // { - // label: '地点ID', - // field: 'siteId', - // sort: 'custom', - // }, - // { - // label: '是否可用', - // field: 'available', - // sort: 'custom', - // }, - + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/basic/costCenterMapping/costCenterMapping.data.ts b/src/views/eam/basic/costCenterMapping/costCenterMapping.data.ts index 205c57a..714dc68 100644 --- a/src/views/eam/basic/costCenterMapping/costCenterMapping.data.ts +++ b/src/views/eam/basic/costCenterMapping/costCenterMapping.data.ts @@ -76,7 +76,26 @@ export const CostCenterMapping = useCrudSchemas(reactive([ component: 'Input' } }, - + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/basic/deviceInspectionConfig/deviceInspectionConfig.data.ts b/src/views/eam/basic/deviceInspectionConfig/deviceInspectionConfig.data.ts index eed84cf..d2fd7b5 100644 --- a/src/views/eam/basic/deviceInspectionConfig/deviceInspectionConfig.data.ts +++ b/src/views/eam/basic/deviceInspectionConfig/deviceInspectionConfig.data.ts @@ -94,16 +94,27 @@ export const DeviceInspection = useCrudSchemas(reactive([ dictType: DICT_TYPE.DEVICE_MOLD_TYPE, dictClass: 'string', }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isForm: false, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - } - }, + + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', @@ -269,20 +280,27 @@ export const DeviceInspectionTwo = useCrudSchemas(reactive([ }] } }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isForm: false, - isTableForm: false, - table: { - width: 170 - }, - tableForm: { - disabled:true, - }, - }, + + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts b/src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts index 8c22715..deb6e88 100644 --- a/src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts +++ b/src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts @@ -262,16 +262,27 @@ export const DeviceMaintenance = useCrudSchemas(reactive([ // } // } // }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isForm: false, - table: { - width: 170 - }, - }, + + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/basic/deviceMaintenanceConfig/moldMaintenanceConfig.data.ts b/src/views/eam/basic/deviceMaintenanceConfig/moldMaintenanceConfig.data.ts index bc1ce87..5fee424 100644 --- a/src/views/eam/basic/deviceMaintenanceConfig/moldMaintenanceConfig.data.ts +++ b/src/views/eam/basic/deviceMaintenanceConfig/moldMaintenanceConfig.data.ts @@ -93,16 +93,27 @@ export const MoldMaintenanceConfig = useCrudSchemas(reactive([ dictType: DICT_TYPE.DEVICE_MOLD_TYPE, dictClass: 'string', }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isForm: false, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - } - }, + + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/basic/inspection/inspection.data.ts b/src/views/eam/basic/inspection/inspection.data.ts index 17e9819..87ff333 100644 --- a/src/views/eam/basic/inspection/inspection.data.ts +++ b/src/views/eam/basic/inspection/inspection.data.ts @@ -235,16 +235,27 @@ export const DeviceMoldItems = useCrudSchemas(reactive([ // } // } // }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isForm: false, - table: { - width: 170 - }, - }, + + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', @@ -332,16 +343,27 @@ export const DeviceMoldItemsTwo = useCrudSchemas(reactive([ value: false, } }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isForm: false, - table: { - width: 170 - }, - }, + + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/basic/item/item.data.ts b/src/views/eam/basic/item/item.data.ts index e59e7ec..7542bac 100644 --- a/src/views/eam/basic/item/item.data.ts +++ b/src/views/eam/basic/item/item.data.ts @@ -306,7 +306,11 @@ export const Item = useCrudSchemas( label: '创建者', field: 'creator', sort: 'custom', - isSearch: false + isSearch: false, + isForm: false, + table: { + width: 150 + } }, { label: '创建时间', diff --git a/src/views/eam/basic/location/location.data.ts b/src/views/eam/basic/location/location.data.ts index 72b955e..7474f22 100644 --- a/src/views/eam/basic/location/location.data.ts +++ b/src/views/eam/basic/location/location.data.ts @@ -143,16 +143,6 @@ export const Location = useCrudSchemas(reactive([ // } // } // }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isForm: false, - table: { - width: 170 - }, - }, { label: '描述', field: 'description', @@ -161,6 +151,26 @@ export const Location = useCrudSchemas(reactive([ width: 150 }, }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/basic/locationArea/locationArea.data.ts b/src/views/eam/basic/locationArea/locationArea.data.ts index 498dfe0..aa8130c 100644 --- a/src/views/eam/basic/locationArea/locationArea.data.ts +++ b/src/views/eam/basic/locationArea/locationArea.data.ts @@ -87,7 +87,26 @@ export const LocationArea = useCrudSchemas(reactive([ width: 150 }, }, - + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/basic/moldInspection/moldInspection.data.ts b/src/views/eam/basic/moldInspection/moldInspection.data.ts index 95d5451..1914689 100644 --- a/src/views/eam/basic/moldInspection/moldInspection.data.ts +++ b/src/views/eam/basic/moldInspection/moldInspection.data.ts @@ -181,16 +181,27 @@ export const DeviceMoldItems = useCrudSchemas(reactive([ // } // } // }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isForm: false, - table: { - width: 170 - }, - }, + + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/basic/moldInspectionConfig/moldInspectionConfig.data.ts b/src/views/eam/basic/moldInspectionConfig/moldInspectionConfig.data.ts index e9b9cf8..3fc50eb 100644 --- a/src/views/eam/basic/moldInspectionConfig/moldInspectionConfig.data.ts +++ b/src/views/eam/basic/moldInspectionConfig/moldInspectionConfig.data.ts @@ -95,16 +95,26 @@ export const DeviceInspection = useCrudSchemas(reactive([ dictType: DICT_TYPE.DEVICE_MOLD_TYPE, dictClass: 'string', }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isForm: false, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - } - }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts b/src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts index 436d4ef..5c41965 100644 --- a/src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts +++ b/src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts @@ -209,16 +209,26 @@ export const MoldMaintenance = useCrudSchemas(reactive([ // } // } // }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isForm: false, - table: { - width: 170 - }, - }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/basic/moldMaintenanceConfig/moldMaintenanceConfig.data.ts b/src/views/eam/basic/moldMaintenanceConfig/moldMaintenanceConfig.data.ts index 31967b8..c621873 100644 --- a/src/views/eam/basic/moldMaintenanceConfig/moldMaintenanceConfig.data.ts +++ b/src/views/eam/basic/moldMaintenanceConfig/moldMaintenanceConfig.data.ts @@ -94,16 +94,27 @@ export const MoldMaintenanceConfig = useCrudSchemas(reactive([ dictType: DICT_TYPE.DEVICE_MOLD_TYPE, dictClass: 'string', }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isForm: false, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - } - }, + + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/basic/supplier/supplier.data.ts b/src/views/eam/basic/supplier/supplier.data.ts index 1da72c0..e0ef7c9 100644 --- a/src/views/eam/basic/supplier/supplier.data.ts +++ b/src/views/eam/basic/supplier/supplier.data.ts @@ -78,21 +78,32 @@ export const Supplier = useCrudSchemas(reactive([ // } // } // }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isForm: false, - table: { - width: 170 - }, - }, { label: '备注', field: 'remark', sort: 'custom', }, + + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/device/deviceAccounts/deviceAccounts.data.ts b/src/views/eam/device/deviceAccounts/deviceAccounts.data.ts index 58897b7..aa2df7d 100644 --- a/src/views/eam/device/deviceAccounts/deviceAccounts.data.ts +++ b/src/views/eam/device/deviceAccounts/deviceAccounts.data.ts @@ -336,7 +336,26 @@ export const DeviceAccounts = useCrudSchemas(reactive([ isSearch: true, isForm: false, }, - + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/device/deviceMaintainPlan/deviceMaintainPlan.data.ts b/src/views/eam/device/deviceMaintainPlan/deviceMaintainPlan.data.ts index 57716bf..473b8e7 100644 --- a/src/views/eam/device/deviceMaintainPlan/deviceMaintainPlan.data.ts +++ b/src/views/eam/device/deviceMaintainPlan/deviceMaintainPlan.data.ts @@ -76,6 +76,26 @@ export const DeviceMaintainPlan = useCrudSchemas(reactive([ dictType: DICT_TYPE.DEVICE_MOLD_TYPE, dictClass: 'string', }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, // { // label: '创建时间', // field: 'createTime', diff --git a/src/views/eam/device/deviceRepair/deviceRepair.data.ts b/src/views/eam/device/deviceRepair/deviceRepair.data.ts index 7bc64f3..3c49363 100644 --- a/src/views/eam/device/deviceRepair/deviceRepair.data.ts +++ b/src/views/eam/device/deviceRepair/deviceRepair.data.ts @@ -262,6 +262,26 @@ export const DeviceRepair = useCrudSchemas(reactive([ } } }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts b/src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts index 72aec56..6b617ac 100644 --- a/src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts +++ b/src/views/eam/device/deviceSpotInspectionRecordMain/deviceSpotInspectionRecordMain.data.ts @@ -207,6 +207,26 @@ export const DeviceSpotInspectionRecordMain = useCrudSchemas(reactive([ dateFormat: 'YYYY-MM-DD HH:mm:ss' }, }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts b/src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts index 7ee4399..4226e24 100644 --- a/src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts +++ b/src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts @@ -246,6 +246,26 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive([ isTableForm: false, isForm: false, }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts b/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts index b3e208c..cecf5aa 100644 --- a/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts +++ b/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts @@ -507,6 +507,26 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive([ width: '200', }, }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, // { // label: '验证时间', // field: 'verifyTimeDetail', diff --git a/src/views/eam/device/problemSharingPlatform/problemSharingPlatform.data.ts b/src/views/eam/device/problemSharingPlatform/problemSharingPlatform.data.ts index 2277b5c..6f82a62 100644 --- a/src/views/eam/device/problemSharingPlatform/problemSharingPlatform.data.ts +++ b/src/views/eam/device/problemSharingPlatform/problemSharingPlatform.data.ts @@ -52,25 +52,26 @@ export const ProblemSharingPlatform = useCrudSchemas(reactive([ } } }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isSearch: true, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - } - }, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - isForm: false - }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: { + width: 150 + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, { label: '图片', field: 'uploadImgs', diff --git a/src/views/eam/item/itemOrderMain/itemOrderMain.data.ts b/src/views/eam/item/itemOrderMain/itemOrderMain.data.ts index 78bb70a..6a11bc7 100644 --- a/src/views/eam/item/itemOrderMain/itemOrderMain.data.ts +++ b/src/views/eam/item/itemOrderMain/itemOrderMain.data.ts @@ -8,326 +8,196 @@ const { t } = useI18n() // 国际化 /** * @returns {Array} 备件申请主表 */ -export const ItemOrderMain = useCrudSchemas(reactive([ - { - label: '收货订单编号', - field: 'number', - sort: 'custom', - isSearch: true, - table: { - width: 150, - fixed: 'left' +export const ItemOrderMain = useCrudSchemas( + reactive([ + { + label: '收货订单编号', + field: 'number', + sort: 'custom', + isSearch: true, + table: { + fixed: 'left' + } }, - }, - { - label: '电话', - field: 'phone', - sort: 'custom', - }, - { - label: '传真', - field: 'fax', - sort: 'custom', - }, - { - label: '收货员', - field: 'purchaser', - sort: 'custom', - }, - { - label: '供应商编号', - field: 'supplierNumber', - sort: 'custom', - }, - { - label: '供应商名称', - field: 'supplierName', - sort: 'custom', - }, - { - label: '供应商地址', - field: 'supplierAddress', - sort: 'custom', - }, - { - label: '发货至', - field: 'shipTo', - sort: 'custom', - }, - { - label: '开票至', - field: 'invoiceTo', - sort: 'custom', - }, - { - label: '联系人', - field: 'contacts', - sort: 'custom', - }, - { - label: '联系电话', - field: 'contactsPhone', - sort: 'custom', - }, - // { - // label: '付款方式', - // field: 'paymentType', - // sort: 'custom', - // form: { - // component: 'Select' - // }, - // }, - { - label: '注册地', - field: 'registLocation', - sort: 'custom', - }, - { - label: '开户行', - field: 'bank', - sort: 'custom', - }, - { - label: '账号', - field: 'account', - sort: 'custom', - }, - { - label: '税号', - field: 'dutyParagraph', - sort: 'custom', - }, - // { - // 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: 'FALSE', - // componentProps: { - // inactiveValue: 'FALSE', - // activeValue: 'TRUE' - // } - // } - // }, - { - label: '状态', - field: 'status', - sort: 'custom', - dictType: DICT_TYPE.IS_COMPLETE, - dictClass: 'string', - isTable: true, - isForm: true, - tableForm: { - type: 'Select' + { + label: '供应商编号', + field: 'supplierNumber', + sort: 'custom' }, - form: { - value: 'INCOMPLETE', - componentProps: { - disabled: true, - } - } - }, + { - label: '创建者', - field: 'creator', - sort: 'custom', - isSearch: false + label: '状态', + field: 'status', + sort: 'custom', + dictType: DICT_TYPE.IS_COMPLETE, + dictClass: 'string', + isTable: true, + isForm: false, + tableForm: { + type: 'Select' }, - { - label: '创建时间', - field: 'createTime', - formatter: dateFormatter, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - sort: 'custom', - isTable: true, - form: { - component: 'DatePicker', - componentProps: { - style: { width: '100%' }, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x' - } - }, - isForm: false, - isSearch: true, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - } + form: { + value: 'INCOMPLETE', + componentProps: { + disabled: true } - }, - { - label: '操作', - field: 'action', - isDetail: false, - isForm: false, - table: { - width: 200, - fixed: 'right' + } + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false, + isForm: false, + table: {} + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: {} + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 200, + fixed: 'right' + } } - } -])) + ]) +) //表单校验 export const ItemOrderMainRules = reactive({ - available: [ - { required: true, message: '请选择是否关闭', trigger: 'change' } - ], - number: [ - required, - { max: 20, message: '请输入收货订单号', trigger: 'blur' }, - ], - supplierNumber:[ - required, - { max: 20, message: '请输入供应商编号', trigger: 'blur' } - ] + available: [{ required: true, message: '请选择是否关闭', trigger: 'change' }], + number: [required, { max: 20, message: '请输入收货订单号', trigger: 'blur' }], + supplierNumber: [required, { max: 20, message: '请输入供应商编号', trigger: 'blur' }] }) /** * @returns {Array} 备件申请子表 */ -export const ItemOrderDetail = useCrudSchemas(reactive([ - { - label: '备件编号', - field: 'itemNumber', - sort: 'custom', - isSearch: true, - tableForm: { - isInpuFocusShow: true, - searchListPlaceholder: '请选择备件编号', - searchField: 'number', - searchTitle: '备件信息', - searchAllSchemas: Item.allSchemas, // 查询弹窗所需类 - searchPage: ItemApi.getItemPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false +export const ItemOrderDetail = useCrudSchemas( + reactive([ + { + label: '备件编号', + field: 'itemNumber', + sort: 'custom', + isSearch: true, + tableForm: { + isInpuFocusShow: true, + searchListPlaceholder: '请选择备件编号', + searchField: 'number', + searchTitle: '备件信息', + searchAllSchemas: Item.allSchemas, // 查询弹窗所需类 + searchPage: ItemApi.getItemPage, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + ] } - ] - }, - }, - { - label: '备件名称', - field: 'itemName', - sort: 'custom', - isSearch: true, - table: { - width: 110, }, - tableForm: { - disabled: true - } - }, - { - label: '单位', - field: 'uom', - sort: 'custom', - isSearch: true, - table: { - width: 110, + { + label: '备件名称', + field: 'itemName', + sort: 'custom', + isSearch: true, + table: { + width: 110 + }, + tableForm: { + disabled: true + } }, - }, - { - label: '订单行', - field: 'serialNumber', - sort: 'custom', - isSearch: true, - table: { - width: 110, + { + label: '单位', + field: 'uom', + sort: 'custom', + isSearch: true, + table: { + width: 110 + } }, - }, - { - label: '单价', - field: 'singlePrice', - sort: 'custom', - table: { - width: 150 + { + label: '订单行', + field: 'serialNumber', + sort: 'custom', + isSearch: true, + table: { + width: 110 + } }, - form: { - component: 'InputNumber', - componentProps: { + { + label: '单价', + field: 'singlePrice', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', min: 1, precision: 6 } }, - tableForm: { - type: 'InputNumber', - min: 1, - precision: 6 - } - }, - { - label: '订单数量', - field: 'qty', - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'InputNumber', - componentProps: { + { + label: '订单数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 1, + precision: 6 + } + }, + tableForm: { + type: 'InputNumber', min: 1, precision: 6 } }, - tableForm: { - type: 'InputNumber', - min: 1, - precision: 6 + { + label: '已收货数量', + field: 'intQuantity', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + tableForm: { + disabled: true, + type: 'InputNumber', + min: 0, + precision: 2 + } } - }, - { - label: '已收货数量', - field: 'intQuantity', - sort: 'custom', - table: { - width: 150 - }, - isForm: false, - tableForm: { - disabled: true, - type: 'InputNumber', - min: 0, - precision: 2 - }, - }, -])) + ]) +) //表单校验 export const ItemOrderDetailRules = reactive({ - singlePrice: [ - { required: true, message: '请输入备件单价', trigger: 'blur' }, - ], - serialNumber: [ - { required: true, message: '请输入订单行', trigger: 'blur' }, - ], - itemNumber: [ - { required: true, message: '请输入备件编号', trigger: 'blur' }, - ], - itemName: [ - { required: true, message: '请输入备件名称', trigger: 'blur' }, - ], - uom: [ - { required: true, message: '请输入备件单位', trigger: 'blur' }, - ], + singlePrice: [{ required: true, message: '请输入备件单价', trigger: 'blur' }], + serialNumber: [{ required: true, message: '请输入订单行', trigger: 'blur' }], + itemNumber: [{ required: true, message: '请输入备件编号', trigger: 'blur' }], + itemName: [{ required: true, message: '请输入备件名称', trigger: 'blur' }], + uom: [{ required: true, message: '请输入备件单位', trigger: 'blur' }] })