feat: 初始化车辆收费、水电抄表页面

This commit is contained in:
fyy
2025-07-18 11:05:17 +08:00
parent 3389a864d1
commit a5a657a96c
14 changed files with 1765 additions and 48 deletions

View File

@@ -0,0 +1,183 @@
import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
export const querySchema: FormSchemaGetter = () => [
{
component: 'Input',
fieldName: 'itemId',
label: '费用类型id',
},
{
component: 'Input',
fieldName: 'meterTypeId',
label: '抄表类型id',
},
{
component: 'Input',
fieldName: 'objName',
label: '对象名称',
},
{
component: 'Input',
fieldName: 'curDegrees',
label: '本期度数',
},
{
component: 'Input',
fieldName: 'preDegrees',
label: '上期度数',
},
{
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
fieldName: 'preReadingTime',
label: '上期读表时间',
},
{
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
fieldName: 'curReadingTime',
label: '本期读表时间',
},
{
component: 'Input',
fieldName: 'searchValue',
label: '搜索值',
},
];
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
// export const columns: () => VxeGridProps['columns'] = () => [
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
title: '主键',
field: 'id',
},
{
title: '费用类型id',
field: 'itemId',
},
{
title: '抄表类型id',
field: 'meterTypeId',
},
{
title: '对象名称',
field: 'objName',
},
{
title: '本期度数',
field: 'curDegrees',
},
{
title: '上期度数',
field: 'preDegrees',
},
{
title: '上期读表时间',
field: 'preReadingTime',
},
{
title: '本期读表时间',
field: 'curReadingTime',
},
{
title: '备注',
field: 'remark',
},
{
title: '搜索值',
field: 'searchValue',
},
{
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: 'itemId',
component: 'Input',
rules: 'required',
},
{
label: '抄表类型id',
fieldName: 'meterTypeId',
component: 'Input',
rules: 'required',
},
{
label: '对象名称',
fieldName: 'objName',
component: 'Input',
rules: 'required',
},
{
label: '本期度数',
fieldName: 'curDegrees',
component: 'Input',
rules: 'required',
},
{
label: '上期度数',
fieldName: 'preDegrees',
component: 'Input',
rules: 'required',
},
{
label: '上期读表时间',
fieldName: 'preReadingTime',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
rules: 'required',
},
{
label: '本期读表时间',
fieldName: 'curReadingTime',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
rules: 'required',
},
{
label: '备注',
fieldName: 'remark',
component: 'Textarea',
},
{
label: '搜索值',
fieldName: 'searchValue',
component: 'Input',
},
];