From ae9332a44b1028271163d5f0aaa9c8cb13f2dc5e Mon Sep 17 00:00:00 2001 From: "YEJIAXING-PC\\lenovo" <591141169@qq.com> Date: Fri, 16 May 2025 17:31:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/eam/basic/item/item.data.ts | 677 +++++++++--------- .../item/adjustRecord/adjustRecord.data.ts | 35 + .../applicationRecordMain.data.ts | 35 + .../eam/item/countRecord/countRecord.data.ts | 54 +- .../countadjustPlan/countadjustPlan.data.ts | 36 + .../countadjustWork/countadjustWork.data.ts | 35 + .../item/itemAccounts/itemAccounts.data.ts | 35 + .../item/itemApplyMain/itemApplyMain.data.ts | 57 +- .../itemMaintenance/itemMaintenance.data.ts | 51 +- .../item/itemOrderMain/itemOrderMain.data.ts | 37 +- .../itemOutLocation/itemOutLocation.data.ts | 44 +- .../eam/item/itemUseRecordMain/index.vue | 2 +- .../itemUseRecordMain.data.ts | 261 ++++--- .../replaceItemDes/replaceItemDes.data.ts | 42 +- 14 files changed, 858 insertions(+), 543 deletions(-) diff --git a/src/views/eam/basic/item/item.data.ts b/src/views/eam/basic/item/item.data.ts index 942a1e3..e59e7ec 100644 --- a/src/views/eam/basic/item/item.data.ts +++ b/src/views/eam/basic/item/item.data.ts @@ -16,370 +16,375 @@ export const ItemRules = reactive({ { required: true, message: '请选择备件单位', trigger: 'blur' }, { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], - classification: [ - { required: true, message: '请选择备件分类', trigger: 'blur' }, - ], - describes: [ - { max: 600, message: '不得超过600个字符', trigger: 'blur' } - ], + classification: [{ required: true, message: '请选择备件分类', trigger: 'blur' }], + describes: [{ max: 600, message: '不得超过600个字符', trigger: 'blur' }] }) -export const Item = useCrudSchemas(reactive([ - { - label: '备件编号', - field: 'number', - sort: 'custom', - isSearch: true, - isForm: true, - table: { - width: 180, - fixed: 'left' - }, - }, - { - label: '备件名称', - field: 'name', - sort: 'custom', - isSearch: true, - table: { - width: 110, +export const Item = useCrudSchemas( + reactive([ + { + label: '备件编号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: true, + table: { + width: 180, + fixed: 'left' + } }, - }, - { - label: '规格', - field: 'specifications', - sort: 'custom', - }, - { - label: '是否常储', - field: 'isConstant', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isSearch: false, - isTable: true, - sort: 'custom', - table: { - width: 110, + { + label: '备件名称', + field: 'name', + sort: 'custom', + isSearch: true, + table: { + width: 110 + } }, - tableForm: { - type: 'Select', - inactiveValue: 'FALSE', - disabled: true + { + label: '规格', + field: 'specifications', + sort: 'custom' }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { + { + label: '是否常储', + field: 'isConstant', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: false, + isTable: true, + sort: 'custom', + table: { + width: 110 + }, + tableForm: { + type: 'Select', inactiveValue: 'FALSE', - activeValue: 'TRUE' + disabled: true + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } - } - }, - { - label: '科目', - field: 'subject', - sort: 'custom', - dictType: DICT_TYPE.ITEM_SUBJECT, - dictClass: 'string', - isSearch: false, - isTable: true, - tableForm: { - type: 'Select' - } - }, + }, + { + label: '科目', + field: 'subject', + sort: 'custom', + dictType: DICT_TYPE.ITEM_SUBJECT, + dictClass: 'string', + isSearch: false, + isTable: true, + tableForm: { + type: 'Select' + } + }, - { - label: '科目代码', - field: 'subjectCode', - sort: 'custom', - isTable: true, - }, - { - label: '单位', - field: 'uom', - sort: 'custom', - dictType: DICT_TYPE.UOM, - dictClass: 'string', - isSearch: false, - isTable: true, - tableForm: { - type: 'Select' - } - }, - { - label: '类别', - field: 'category', - sort: 'custom', - dictType: DICT_TYPE.ITEM_CATEGORY, - dictClass: 'string', - isSearch: false, - isTable: true, - tableForm: { - type: 'Select' - } - }, - { - label: '备件分类', - field: 'classification', - sort: 'custom', - dictType: DICT_TYPE.CLASSIFICATION, - dictClass: 'string', - isSearch: false, - isTable: true, - tableForm: { - type: 'Select' - } - }, - { - label: '区域', - field: 'region', - sort: 'custom', - dictType: DICT_TYPE.ITEM_REGION, - dictClass: 'string', - isSearch: false, - isTable: true, - tableForm: { - type: 'Select' - } - }, - { - label: '采购方式', - field: 'purchaseWay', - sort: 'custom', - dictType: DICT_TYPE.PURCHASE_WAY, - dictClass: 'string', - isSearch: false, - isTable: true, - tableForm: { - type: 'Select' - } - }, - { - label: '物料类型', - field: 'itemType', - sort: 'custom', - isSearch: true, - table: { - width: 110, + { + label: '科目代码', + field: 'subjectCode', + sort: 'custom', + isTable: true + }, + { + label: '单位', + field: 'uom', + sort: 'custom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isSearch: false, + isTable: true, + tableForm: { + type: 'Select' + } + }, + { + label: '类别', + field: 'category', + sort: 'custom', + dictType: DICT_TYPE.ITEM_CATEGORY, + dictClass: 'string', + isSearch: false, + isTable: true, + tableForm: { + type: 'Select' + } }, - }, - { - label: '单价', - field: 'singlePrice', - sort: 'custom', - }, - { - label: '重采购点', - field: 'reprocurement', - sort: 'custom', - table: { - width: 110, + { + label: '备件分类', + field: 'classification', + sort: 'custom', + dictType: DICT_TYPE.CLASSIFICATION, + dictClass: 'string', + isSearch: false, + isTable: true, + tableForm: { + type: 'Select' + } }, - form: { - component: 'InputNumber', - value: 0 + { + label: '区域', + field: 'region', + sort: 'custom', + dictType: DICT_TYPE.ITEM_REGION, + dictClass: 'string', + isSearch: false, + isTable: true, + tableForm: { + type: 'Select' + } }, - }, - { - label: '安全库存', - field: 'safetyStock', - sort: 'custom', - isSearch: false, - isForm: true, - table: { - width: 110, + { + label: '采购方式', + field: 'purchaseWay', + sort: 'custom', + dictType: DICT_TYPE.PURCHASE_WAY, + dictClass: 'string', + isSearch: false, + isTable: true, + tableForm: { + type: 'Select' + } }, - form: { - component: 'InputNumber', - value: 0, + { + label: '物料类型', + field: 'itemType', + sort: 'custom', + isSearch: true, + table: { + width: 110 + } }, - }, - { - label: '成本中心', - field: 'cost', - sort: 'custom', - table: { - width: 110, + { + label: '单价', + field: 'singlePrice', + sort: 'custom' }, - }, - { - label: '采购员', - field: 'purchaser', - sort: 'custom', - table: { - width: 100, + { + label: '重采购点', + field: 'reprocurement', + sort: 'custom', + table: { + width: 110 + }, + form: { + component: 'InputNumber', + value: 0 + } }, - }, - { - label: '财务', - field: 'financer', - sort: 'custom', - }, - { - label: '是否以旧换新', - field: 'isRadeIn', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isSearch: false, - isTable: true, - sort: 'custom', - table: { - width: 140 + { + label: '安全库存', + field: 'safetyStock', + sort: 'custom', + isSearch: false, + isForm: true, + table: { + width: 110 + }, + form: { + component: 'InputNumber', + value: 0 + } }, - tableForm: { - type: 'Select', - inactiveValue: 'FALSE', - disabled: true + { + label: '成本中心', + field: 'cost', + sort: 'custom', + table: { + width: 110 + } }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + { + label: '采购员', + field: 'purchaser', + sort: 'custom', + table: { + width: 100 } - } - }, - { - label: '是否框架协议', - field: 'isFramework', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isSearch: false, - isTable: true, - sort: 'custom', - table: { - width: 140 }, - tableForm: { - type: 'Select', - inactiveValue: 'FALSE', - disabled: true + { + label: '财务', + field: 'financer', + sort: 'custom' }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { + { + label: '是否以旧换新', + field: 'isRadeIn', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: false, + isTable: true, + sort: 'custom', + table: { + width: 140 + }, + tableForm: { + type: 'Select', inactiveValue: 'FALSE', - activeValue: 'TRUE' + 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', - sort: 'custom', - formatter: dateFormatter, - isForm: false, - table: { - width: 170 }, - }, - { - label: '描述', - field: 'describes', - sort: 'custom', - form: { - component: 'Input', - componentProps: { - type: 'textarea', + { + label: '是否框架协议', + field: 'isFramework', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: false, + isTable: true, + sort: 'custom', + table: { + width: 140 + }, + tableForm: { + type: 'Select', + inactiveValue: 'FALSE', + disabled: true }, - colProps: { - span: 24, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } } - } - }, - // { - // label: '图片', - // field: 'upload', - // isTable: true, - // }, - // { - // label: '文件', - // field: 'filePathListView', - // sort: 'custom', - // isTable: false, - // table: { - // }, - // form: { - // component: 'UploadFile', - // componentProps: { - // } - // } - // }, - { - label: '文件', - field: 'attachmentFileList', - sort: 'custom', - isTable: false, - isForm: true, - table: { }, - form: { - component: 'UploadImgs', - colProps: { - span: 24 + // { + // 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: 'describes', + sort: 'custom', + form: { + component: 'Input', + componentProps: { + type: 'textarea' + }, + colProps: { + span: 24 + } + } + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + table: { + width: 170 + } + }, + // { + // label: '图片', + // field: 'upload', + // isTable: true, + // }, + // { + // label: '文件', + // field: 'filePathListView', + // sort: 'custom', + // isTable: false, + // table: { + // }, + // form: { + // component: 'UploadFile', + // componentProps: { + // } + // } + // }, + { + label: '文件', + field: 'attachmentFileList', + sort: 'custom', + isTable: false, + isForm: true, + table: {}, + form: { + component: 'UploadImgs', + colProps: { + span: 24 + } + } + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 200, + fixed: 'right' } } - }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 200, - fixed: 'right' - } - } -])) + ]) +) -export const ItemSearchTable = useCrudSchemas(reactive([ - { - label: '备件编号', - field: 'number', - sort: 'custom', - isSearch: true, - isForm: false, - table: { - fixed: 'left' +export const ItemSearchTable = useCrudSchemas( + reactive([ + { + label: '备件编号', + field: 'number', + sort: 'custom', + isSearch: true, + isForm: false, + table: { + fixed: 'left' + } }, - }, - { - label: '备件名称', - field: 'name', - sort: 'custom', - isSearch: true, - table: { + { + label: '备件名称', + field: 'name', + sort: 'custom', + isSearch: true, + table: {} }, - }, - { - label: '数量', - field: 'qty', - sort: 'custom', - } -])) + { + label: '数量', + field: 'qty', + sort: 'custom' + } + ]) +) diff --git a/src/views/eam/item/adjustRecord/adjustRecord.data.ts b/src/views/eam/item/adjustRecord/adjustRecord.data.ts index d2d470e..c2a8cab 100644 --- a/src/views/eam/item/adjustRecord/adjustRecord.data.ts +++ b/src/views/eam/item/adjustRecord/adjustRecord.data.ts @@ -26,6 +26,41 @@ export const AdjustRecordMain = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false + }, + { + 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')] + } + } + }, // { // label: '操作', // field: 'action', diff --git a/src/views/eam/item/applicationRecord/applicationRecordMain.data.ts b/src/views/eam/item/applicationRecord/applicationRecordMain.data.ts index d5ea0eb..184d00c 100644 --- a/src/views/eam/item/applicationRecord/applicationRecordMain.data.ts +++ b/src/views/eam/item/applicationRecord/applicationRecordMain.data.ts @@ -115,6 +115,41 @@ export const ApplicationRecordMain = useCrudSchemas(reactive([ disabled: true } }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false + }, + { + 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')] + } + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/item/countRecord/countRecord.data.ts b/src/views/eam/item/countRecord/countRecord.data.ts index 348201e..aff8c34 100644 --- a/src/views/eam/item/countRecord/countRecord.data.ts +++ b/src/views/eam/item/countRecord/countRecord.data.ts @@ -59,25 +59,41 @@ export const CountRecordMain = useCrudSchemas(reactive([ type: 'Select' } }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isSearch: false, - 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')] - } - }, - isForm: false, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - } - }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false + }, + { + 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')] + } + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/item/countadjustPlan/countadjustPlan.data.ts b/src/views/eam/item/countadjustPlan/countadjustPlan.data.ts index eb32bb5..0ce8ff5 100644 --- a/src/views/eam/item/countadjustPlan/countadjustPlan.data.ts +++ b/src/views/eam/item/countadjustPlan/countadjustPlan.data.ts @@ -1,6 +1,7 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { LocationArea, LocationAreaRules } from '../../basic/locationArea/locationArea.data' import * as LocationAreaApi from '@/api/eam/basic/locationArea' +import { dateFormatter } from '@/utils/formatTime' // 表单校验 export const CountadjustPlanRules = reactive({ @@ -93,6 +94,41 @@ export const CountadjustPlan = useCrudSchemas(reactive([ } } }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false + }, + { + 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')] + } + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/item/countadjustWork/countadjustWork.data.ts b/src/views/eam/item/countadjustWork/countadjustWork.data.ts index 896944f..84e09b5 100644 --- a/src/views/eam/item/countadjustWork/countadjustWork.data.ts +++ b/src/views/eam/item/countadjustWork/countadjustWork.data.ts @@ -35,6 +35,41 @@ export const CountJobMain = useCrudSchemas(reactive([ isForm: false, isSearch: false, }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false + }, + { + 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')] + } + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/item/itemAccounts/itemAccounts.data.ts b/src/views/eam/item/itemAccounts/itemAccounts.data.ts index 2f74467..f2727ff 100644 --- a/src/views/eam/item/itemAccounts/itemAccounts.data.ts +++ b/src/views/eam/item/itemAccounts/itemAccounts.data.ts @@ -531,6 +531,41 @@ export const ItemAccounts = useCrudSchemas( }, isForm: false }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false + }, + { + 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')] + } + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts b/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts index d211fc5..cc03e59 100644 --- a/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts +++ b/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts @@ -90,29 +90,40 @@ export const ItemApplyMain = useCrudSchemas(reactive([ dictType: DICT_TYPE.CENTER_SUBJECT_MAP_DEPT, }, { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isTable: true, - table: { - width: 180, - }, - 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')] - } - }, - isForm: false, - detail: { - width: 180, - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - }, + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false + }, + { + 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')] + } + } + }, { label: '操作', diff --git a/src/views/eam/item/itemMaintenance/itemMaintenance.data.ts b/src/views/eam/item/itemMaintenance/itemMaintenance.data.ts index 29f6ffe..50f7b23 100644 --- a/src/views/eam/item/itemMaintenance/itemMaintenance.data.ts +++ b/src/views/eam/item/itemMaintenance/itemMaintenance.data.ts @@ -64,22 +64,6 @@ export const ItemMaintenance = useCrudSchemas(reactive([ } } }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isSearch: false, - 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')] - } - }, - isForm: false, - }, { label: '维修原因', field: 'reasons', @@ -110,6 +94,41 @@ export const ItemMaintenance = useCrudSchemas(reactive([ } } }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false + }, + { + 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')] + } + } + }, // { // label: '操作', // field: 'action', diff --git a/src/views/eam/item/itemOrderMain/itemOrderMain.data.ts b/src/views/eam/item/itemOrderMain/itemOrderMain.data.ts index b5e4adf..78bb70a 100644 --- a/src/views/eam/item/itemOrderMain/itemOrderMain.data.ts +++ b/src/views/eam/item/itemOrderMain/itemOrderMain.data.ts @@ -1,5 +1,5 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' -import { dateFormatter2 } from '@/utils/formatTime' +import { dateFormatter } from '@/utils/formatTime' import { Item } from '@/views/eam/basic/item/item.data' import * as ItemApi from '@/api/eam/basic/item' import { validateHanset, validateEmail } from '@/utils/validator' @@ -140,6 +140,41 @@ export const ItemOrderMain = useCrudSchemas(reactive([ } } }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false + }, + { + 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')] + } + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/item/itemOutLocation/itemOutLocation.data.ts b/src/views/eam/item/itemOutLocation/itemOutLocation.data.ts index 3aaf4ac..07c7700 100644 --- a/src/views/eam/item/itemOutLocation/itemOutLocation.data.ts +++ b/src/views/eam/item/itemOutLocation/itemOutLocation.data.ts @@ -50,15 +50,41 @@ export const ItemOutLocation = useCrudSchemas(reactive([ sort: 'custom', isSearch: false, }, - - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isTable: true, - isForm: false - }, +{ + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false + }, + { + 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')] + } + } + }, { label: '操作', field: 'action', diff --git a/src/views/eam/item/itemUseRecordMain/index.vue b/src/views/eam/item/itemUseRecordMain/index.vue index 5ad3047..c44773a 100644 --- a/src/views/eam/item/itemUseRecordMain/index.vue +++ b/src/views/eam/item/itemUseRecordMain/index.vue @@ -117,7 +117,7 @@ // 列表头部按钮 const HeadButttondata = [ // defaultButtons.defaultAddBtn({hasPermi:'item:itemUseRecordMain:create'}), // 新增 - // defaultButtons.defaultExportBtn(null), // 导出 + defaultButtons.defaultExportBtn(null), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 diff --git a/src/views/eam/item/itemUseRecordMain/itemUseRecordMain.data.ts b/src/views/eam/item/itemUseRecordMain/itemUseRecordMain.data.ts index 27edbbe..fd9e1f9 100644 --- a/src/views/eam/item/itemUseRecordMain/itemUseRecordMain.data.ts +++ b/src/views/eam/item/itemUseRecordMain/itemUseRecordMain.data.ts @@ -8,160 +8,159 @@ const { t } = useI18n() // 国际化 /** * @returns {Array} 备件申请主表 */ -export const ItemUseRecordMain = useCrudSchemas(reactive([ - { - label: '收货单编号', - field: 'number', - sort: 'custom', - isSearch: true, - table: { - fixed: 'left' +export const ItemUseRecordMain = useCrudSchemas( + reactive([ + { + label: '收货单编号', + field: 'number', + sort: 'custom', + isSearch: true, + table: { + fixed: 'left' + } + }, + { + label: '关联工单', + field: 'associatedNumber', + sort: 'custom' }, - }, - { - label: '关联工单', - field: 'associatedNumber', - sort: 'custom', - }, { - label: '库存动作', - field: 'inventoryAction', - sort: 'custom', - dictType: DICT_TYPE.INVENTORY_ACTION, - dictClass: 'string', - isSearch: false, - isTable: true, - tableForm: { - type: 'Select' - } - }, - { - label: '操作者', - field: 'creator', - sort: 'custom', - isSearch: false + label: '库存动作', + field: 'inventoryAction', + sort: 'custom', + dictType: DICT_TYPE.INVENTORY_ACTION, + dictClass: 'string', + isSearch: false, + isTable: true, + tableForm: { + type: 'Select' + } + }, + { + label: '操作者', + field: 'creator', + sort: 'custom', + isSearch: false + }, + { + label: '操作时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - { - 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')] - } + sort: 'custom', + isTable: true, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' } }, - // { - // label: '操作', - // field: 'action', - // isDetail: false, - // isForm: false, - // table: { - // width: 200, - // fixed: 'right' - // } - // } -])) + 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')] + } + } + } + // { + // label: '操作', + // field: 'action', + // isDetail: false, + // isForm: false, + // table: { + // width: 200, + // fixed: 'right' + // } + // } + ]) +) //表单校验 export const ItemUseRecordMainRules = reactive({ - number: [ - required, - { max: 20, message: '请输入收货订单号', trigger: 'blur' }, - ] + number: [required, { max: 20, message: '请输入收货订单号', trigger: 'blur' }] }) /** * @returns {Array} 备件申请子表 */ -export const ItemInLocationInaccount = 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 ItemInLocationInaccount = 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: 'locationNumber', - sort: 'custom', - isForm: false, - isSearch: true, - table: { - width: 180, + { + label: '库位编号', + field: 'locationNumber', + sort: 'custom', + isForm: false, + isSearch: true, + table: { + width: 180 + } }, - }, - { - label: '入库类型', - field: 'type', - sort: 'custom', - isSearch: true, - dictType: DICT_TYPE.ITEM_OUT_IN_TYPE, - dictClass: 'string', - form: { - component: 'Select' - } - }, - { - label: '数量', - field: 'qty', - sort: 'custom', - table: { - width: 150 + { + label: '入库类型', + field: 'type', + sort: 'custom', + isSearch: true, + dictType: DICT_TYPE.ITEM_OUT_IN_TYPE, + dictClass: 'string', + form: { + component: 'Select' + } }, - 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 } - }, -])) + ]) +) //表单校验 export const ItemInLocationInaccountRules = reactive({ - itemNumber: [ - { required: true, message: '请输入备件编号', trigger: 'blur' }, - ], - + itemNumber: [{ required: true, message: '请输入备件编号', trigger: 'blur' }] }) diff --git a/src/views/eam/item/replaceItemDes/replaceItemDes.data.ts b/src/views/eam/item/replaceItemDes/replaceItemDes.data.ts index 050d569..73a90d9 100644 --- a/src/views/eam/item/replaceItemDes/replaceItemDes.data.ts +++ b/src/views/eam/item/replaceItemDes/replaceItemDes.data.ts @@ -62,13 +62,41 @@ export const ReplaceItemDes = useCrudSchemas(reactive([ } } }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isForm: false - }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + isSearch: false + }, + { + 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')] + } + } + }, { label: '操作', field: 'action',