From 1454463d23cde35d1e9b8c98f701500585933277 Mon Sep 17 00:00:00 2001 From: songguoqiang <765017469@qq.com> Date: Mon, 13 May 2024 11:26:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/eam/item/itemOutLocation/index.vue | 1 + .../eam/item/transaction/transaction.data.ts | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/views/eam/item/itemOutLocation/index.vue b/src/views/eam/item/itemOutLocation/index.vue index 94ec79d..9429f2b 100644 --- a/src/views/eam/item/itemOutLocation/index.vue +++ b/src/views/eam/item/itemOutLocation/index.vue @@ -91,6 +91,7 @@ const searchTableSuccess = async(formField, searchField, val, formRef) => { setV['locationName'] = val[0]['name'] setV['itemName'] = aa.itemName setV['itemNumber'] = aa.itemNumber + setV['qty'] = aa.qty ItemOutLocation.allSchemas.formSchema.find(item => item.field == 'qty').componentProps.max = aa.qty//出库数量不能大于所有库存数 formRef.setValues(setV) }) diff --git a/src/views/eam/item/transaction/transaction.data.ts b/src/views/eam/item/transaction/transaction.data.ts index f75af8a..4d3aca3 100644 --- a/src/views/eam/item/transaction/transaction.data.ts +++ b/src/views/eam/item/transaction/transaction.data.ts @@ -1,4 +1,5 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' // 表单校验 export const Rules = reactive({ @@ -82,6 +83,22 @@ export const Transaction = useCrudSchemas(reactive([ sort: 'custom', isSearch: false, }, + { + 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: 'action',