This commit is contained in:
157
apps/web-antd/src/views/property/assetManage/application/data.ts
Normal file
157
apps/web-antd/src/views/property/assetManage/application/data.ts
Normal file
@@ -0,0 +1,157 @@
|
||||
import type { FormSchemaGetter } from '#/adapter/form';
|
||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'assetId',
|
||||
label: '资产id',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'userId',
|
||||
label: '领用人id',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'number',
|
||||
label: '数量',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
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: '申请时间',
|
||||
},
|
||||
];
|
||||
|
||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||||
// export const columns: () => VxeGridProps['columns'] = () => [
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{ type: 'checkbox', width: 60 },
|
||||
{
|
||||
title: '主键',
|
||||
field: 'id',
|
||||
},
|
||||
{
|
||||
title: '资产id',
|
||||
field: 'assetId',
|
||||
},
|
||||
{
|
||||
title: '领用人id',
|
||||
field: 'userId',
|
||||
},
|
||||
{
|
||||
title: '数量',
|
||||
field: 'number',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
field: 'state',
|
||||
},
|
||||
{
|
||||
title: '审批人id',
|
||||
field: 'acceptanceUserId',
|
||||
},
|
||||
{
|
||||
title: '审批时间',
|
||||
field: 'acceptanceTime',
|
||||
},
|
||||
{
|
||||
title: '申请时间',
|
||||
field: 'applicationTime',
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
field: 'createTime',
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
fixed: 'right',
|
||||
slots: { default: 'action' },
|
||||
title: '操作',
|
||||
width: 180,
|
||||
},
|
||||
];
|
||||
|
||||
export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '主键',
|
||||
fieldName: 'id',
|
||||
component: 'Input',
|
||||
dependencies: {
|
||||
show: () => false,
|
||||
triggerFields: [''],
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '资产id',
|
||||
fieldName: 'assetId',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '领用人id',
|
||||
fieldName: 'userId',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '数量',
|
||||
fieldName: 'number',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
fieldName: 'state',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '审批人id',
|
||||
fieldName: 'acceptanceUserId',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '审批时间',
|
||||
fieldName: 'acceptanceTime',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '申请时间',
|
||||
fieldName: 'applicationTime',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
},
|
||||
},
|
||||
];
|
Reference in New Issue
Block a user