Files
admin-vben5/apps/web-antd/src/views/property/ceremonialserveRoombooking/data.ts
2025-06-18 16:50:58 +08:00

92 lines
1.8 KiB
TypeScript

import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
export const querySchema: FormSchemaGetter = () => [
{
component: 'Input',
fieldName: 'ceremonialServeId',
label: '服务id',
},
{
component: 'Input',
fieldName: 'roomBookingId',
label: '预订id',
},
{
component: 'Input',
fieldName: 'totalPrice',
label: '服务和预订总价格',
},
{
component: 'Input',
fieldName: 'searchValue',
label: '搜索值',
},
];
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
// export const columns: () => VxeGridProps['columns'] = () => [
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
title: '服务id',
field: 'ceremonialServeId',
},
{
title: '预订id',
field: 'roomBookingId',
},
{
title: '服务和预订总价格',
field: 'totalPrice',
},
{
title: '搜索值',
field: 'searchValue',
},
{
field: 'action',
fixed: 'right',
slots: { default: 'action' },
title: '操作',
width: 180,
},
];
export const modalSchema: FormSchemaGetter = () => [
{
label: 'id',
fieldName: 'id',
component: 'Input',
dependencies: {
show: () => false,
triggerFields: [''],
},
},
{
label: '服务id',
fieldName: 'ceremonialServeId',
component: 'Input',
rules: 'required',
},
{
label: '预订id',
fieldName: 'roomBookingId',
component: 'Input',
rules: 'required',
},
{
label: '服务和预订总价格',
fieldName: 'totalPrice',
component: 'Input',
rules: 'required',
},
{
label: '搜索值',
fieldName: 'searchValue',
component: 'Input',
rules: 'required',
},
];