Files
admin-vben5/apps/web-antd/src/views/property/ceremonialServe/data.ts

282 lines
5.2 KiB
TypeScript
Raw Normal View History

2025-06-18 11:03:42 +08:00
import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
export const querySchema: FormSchemaGetter = () => [
{
component: 'Input',
fieldName: 'classificationId',
label: '分类id',
},
{
component: 'Input',
fieldName: 'roomBookId',
label: '预订id',
},
{
component: 'Input',
fieldName: 'serveNum',
label: '服务数量',
},
{
component: 'Select',
componentProps: {
},
fieldName: 'serveType',
label: '服务分类',
},
{
component: 'Input',
fieldName: 'serveName',
label: '产品名称',
},
{
component: 'RadioGroup',
componentProps: {
buttonStyle: 'solid',
optionType: 'button',
},
fieldName: 'serveStatus',
label: '预订状态',
},
{
component: 'Input',
fieldName: 'createById',
label: '创建人id',
},
{
component: 'Input',
fieldName: 'updateById',
label: '更新人id',
},
{
component: 'Input',
fieldName: 'confirmId',
label: '确认人id',
},
{
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
fieldName: 'beginTime',
label: '服务开始时间',
},
{
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
fieldName: 'endTime',
label: '服务结束时间',
},
{
component: 'Input',
fieldName: 'servePrice',
label: '服务总价格',
},
{
component: 'Input',
fieldName: 'dataStauts',
label: '数据状态',
},
{
component: 'Input',
fieldName: 'serveImage',
label: '产品图片',
},
{
component: 'Input',
fieldName: 'sort',
label: '排序',
},
];
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
// export const columns: () => VxeGridProps['columns'] = () => [
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
title: 'id',
field: 'id',
},
{
title: '分类id',
field: 'classificationId',
},
{
title: '预订id',
field: 'roomBookId',
},
{
title: '服务数量',
field: 'serveNum',
},
{
title: '服务分类',
field: 'serveType',
},
{
title: '产品名称',
field: 'serveName',
},
{
title: '预订状态',
field: 'serveStatus',
},
{
title: '创建人id',
field: 'createById',
},
{
title: '更新人id',
field: 'updateById',
},
{
title: '确认人id',
field: 'confirmId',
},
{
title: '服务开始时间',
field: 'beginTime',
},
{
title: '服务结束时间',
field: 'endTime',
},
{
title: '服务总价格',
field: 'servePrice',
},
{
title: '数据状态',
field: 'dataStauts',
},
{
title: '产品图片',
field: 'serveImage',
},
{
title: '排序',
field: 'sort',
},
{
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: 'classificationId',
component: 'Input',
},
{
label: '预订id',
fieldName: 'roomBookId',
component: 'Input',
},
{
label: '服务数量',
fieldName: 'serveNum',
component: 'Input',
},
{
label: '服务分类',
fieldName: 'serveType',
component: 'Select',
componentProps: {
},
},
{
label: '产品名称',
fieldName: 'serveName',
component: 'Input',
},
{
label: '预订状态',
fieldName: 'serveStatus',
component: 'RadioGroup',
componentProps: {
buttonStyle: 'solid',
optionType: 'button',
},
},
{
label: '创建人id',
fieldName: 'createById',
component: 'Input',
},
{
label: '更新人id',
fieldName: 'updateById',
component: 'Input',
},
{
label: '确认人id',
fieldName: 'confirmId',
component: 'Input',
},
{
label: '服务开始时间',
fieldName: 'beginTime',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
},
{
label: '服务结束时间',
fieldName: 'endTime',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
},
{
label: '服务总价格',
fieldName: 'servePrice',
component: 'Input',
},
{
label: '数据状态',
fieldName: 'dataStauts',
component: 'Input',
},
{
label: '产品图片',
fieldName: 'serveImage',
component: 'ImageUpload',
componentProps: {
// accept: 'image/*', // 可选拓展名或者mime类型 ,拼接
// maxCount: 1, // 最大上传文件数 默认为1 为1会绑定为string而非string[]类型
},
},
{
label: '排序',
fieldName: 'sort',
component: 'Input',
},
];