feat:出库记录
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
2025-08-04 17:27:37 +08:00
parent 28295b283e
commit 98d6dd0d9b
9 changed files with 391 additions and 296 deletions

View File

@@ -2,65 +2,65 @@ import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
import { renderDict } from "#/utils/render";
import { DictEnum } from '@vben/constants';
import {getDictOptions} from "#/utils/dict";
export const querySchema: FormSchemaGetter = () => [
// {
// component: 'Input',
// fieldName: 'assetId',
// label: '资产id',
// },
// {
// component: 'Input',
// fieldName: 'userId',
// label: '领用人id',
// },
// {
// component: 'Input',
// fieldName: 'number',
// label: '数量',
// },
{
component: 'Input',
fieldName: 'assetId',
label: '资产id',
},
{
component: 'Input',
fieldName: 'userId',
label: '领用人id',
},
{
component: 'Input',
fieldName: 'number',
label: '数量',
},
{
component: 'Input',
component: 'Select',
componentProps:{
options:getDictOptions(DictEnum.WY_ZCSHZT)
},
fieldName: 'state',
label: '状态',
},
{
component: 'Input',
fieldName: 'acceptanceUserId',
label: '审批人id',
},
{
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
fieldName: 'acceptanceTime',
label: '审批时间',
},
{
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
fieldName: 'applicationTime',
label: '申请时间',
label: '领用状态',
},
// {
// component: 'Input',
// fieldName: 'acceptanceUserId',
// label: '审批人id',
// },
// {
// component: 'DatePicker',
// componentProps: {
// showTime: true,
// format: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'YYYY-MM-DD HH:mm:ss',
// },
// fieldName: 'acceptanceTime',
// label: '审批时间',
// },
// {
// component: 'DatePicker',
// componentProps: {
// showTime: true,
// format: 'YYYY-MM-DD HH:mm:ss',
// valueFormat: 'YYYY-MM-DD HH:mm:ss',
// },
// fieldName: 'applicationTime',
// label: '申请时间',
// },
];
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
// export const columns: () => VxeGridProps['columns'] = () => [
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
title: '主键',
field: 'id',
},
{
title: '资产',
field: 'assetName',
@@ -74,7 +74,11 @@ export const columns: VxeGridProps['columns'] = [
field: 'number',
},
{
title: '状态',
title: '申请时间',
field: 'applicationTime',
},
{
title: '领用状态',
field: 'state',
slots: {
default: ({ row }) => {
@@ -90,14 +94,6 @@ export const columns: VxeGridProps['columns'] = [
title: '审批时间',
field: 'acceptanceTime',
},
{
title: '申请时间',
field: 'applicationTime',
},
{
title: '创建时间',
field: 'createTime',
},
{
field: 'action',
fixed: 'right',
@@ -118,19 +114,25 @@ export const modalSchema: FormSchemaGetter = () => [
},
},
{
label: '资产id',
label: '资产',
fieldName: 'assetId',
component: 'Select',
rules:'selectRequired'
},
{
label: '领用人id',
label: '领用人',
fieldName: 'userId',
component: 'Select',
rules:'selectRequired'
},
{
label: '数量',
fieldName: 'number',
component: 'Input',
component: 'InputNumber',
componentProps:{
min:1,
},
rules:'required'
},
// {
// label: '状态',