From 6355242663f21bb699dbdc2d7b019c4facb888ea Mon Sep 17 00:00:00 2001 From: yejiaxing <591141169@qq.com> Date: Tue, 30 Jan 2024 11:47:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/dict.ts | 2 +- src/views/system/dept/DeptForm.vue | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 62c18db..740e000 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -277,7 +277,7 @@ export enum DICT_TYPE { DEVICE_MOLD_TYPE = 'device_mold_type', // 设备/模具类型 TRANSACTION_TYPE = 'transaction_Type', // 事务类型 RESULT = 'result', // 事务类型 - REQUEST_APPLY = 'class_type', // 班组类型 + CLASS_TYPE = 'class_type', // 班组类型 } diff --git a/src/views/system/dept/DeptForm.vue b/src/views/system/dept/DeptForm.vue index 5410185..b4ad191 100644 --- a/src/views/system/dept/DeptForm.vue +++ b/src/views/system/dept/DeptForm.vue @@ -51,9 +51,9 @@ - - - + diff --git a/src/views/eam/item/transaction/transaction.data.ts b/src/views/eam/item/transaction/transaction.data.ts new file mode 100644 index 0000000..04054bf --- /dev/null +++ b/src/views/eam/item/transaction/transaction.data.ts @@ -0,0 +1,102 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' + +// 表单校验 +export const Rules = reactive({ + itemNumber: [required], + locationNumber: [required], + inventoryAction: [required], + businessType: [required], + uom: [required], +}) + +export const Transaction = useCrudSchemas(reactive([ + + { + label: '事务编号', + field: 'number', + sort: 'custom', + isSearch: true, + }, + + { + label: '备件编号', + field: 'itemNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '库位编码', + field: 'locationNumber', + sort: 'custom', + isSearch: true, + }, + { + label: '事务类型', + field: 'transactionType', + sort: 'custom', + dictType: DICT_TYPE.TRANSACTION_TYPE, + dictClass: 'string', + isSearch: false, + isTable: true, + table: { + width: 150 + }, + tableForm: { + type: 'Select' + } + }, + { + label: '库存动作', + field: 'inventoryAction', + sort: 'custom', + dictType: DICT_TYPE.INVENTORY_ACTION, + dictClass: 'string', + isSearch: false, + isTable: true, + table: { + width: 150 + }, + tableForm: { + type: 'Select' + } + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + isSearch: true, + form: { + component: 'Select' + }, + }, + { + label: '库存状态', + field: 'inventoryStatus', + sort: 'custom', + isSearch: true, + form: { + component: 'Radio' + }, + }, + { + label: '计量单位', + field: 'uom', + sort: 'custom', + isSearch: true, + }, + { + label: '数量', + field: 'qty', + sort: 'custom', + isSearch: true, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +]))