173 lines
3.5 KiB
TypeScript
173 lines
3.5 KiB
TypeScript
|
import type { FormSchemaGetter } from '#/adapter/form';
|
||
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||
|
|
||
|
import { getDictOptions } from '#/utils/dict';
|
||
|
import { renderDict } from '#/utils/render';
|
||
|
|
||
|
export const querySchema: FormSchemaGetter = () => [
|
||
|
{
|
||
|
component: 'Input',
|
||
|
fieldName: 'roomNumber',
|
||
|
label: '房屋',
|
||
|
},
|
||
|
{
|
||
|
component: 'Select',
|
||
|
componentProps: {
|
||
|
// 可选从DictEnum中获取 DictEnum.COST_REVIEW_STATUS 便于维护
|
||
|
options: getDictOptions('pro_expense_type'),
|
||
|
},
|
||
|
fieldName: 'costType',
|
||
|
label: '费用类型',
|
||
|
},
|
||
|
{
|
||
|
component: 'Select',
|
||
|
componentProps: {
|
||
|
// 可选从DictEnum中获取 DictEnum.COST_REVIEW_STATUS 便于维护
|
||
|
options: getDictOptions('cost_review_status'),
|
||
|
},
|
||
|
fieldName: 'state',
|
||
|
label: '审核状态',
|
||
|
},
|
||
|
];
|
||
|
|
||
|
export const columns: VxeGridProps['columns'] = [
|
||
|
{ type: 'checkbox', width: 60 },
|
||
|
{
|
||
|
title: '房屋',
|
||
|
field: 'roomNumber',
|
||
|
},
|
||
|
{
|
||
|
title: '费用项目',
|
||
|
field: 'chargeItem',
|
||
|
},
|
||
|
{
|
||
|
title: '付费周期',
|
||
|
field: 'chargeCycle',
|
||
|
},
|
||
|
{
|
||
|
title: '缴费开始时间',
|
||
|
field: 'startTime',
|
||
|
},
|
||
|
{
|
||
|
title: '缴费结束时间',
|
||
|
field: 'endTime',
|
||
|
},
|
||
|
{
|
||
|
title: '实付金额',
|
||
|
field: 'receivedAmount',
|
||
|
},
|
||
|
{
|
||
|
title: '应收金额',
|
||
|
field: 'receivableAmount',
|
||
|
},
|
||
|
{
|
||
|
title: '缴费时间',
|
||
|
field: 'payTime',
|
||
|
},
|
||
|
{
|
||
|
title: '审核状态',
|
||
|
field: 'state',
|
||
|
slots: {
|
||
|
default: ({ row }) => {
|
||
|
// 可选从DictEnum中获取 DictEnum.COST_REVIEW_STATUS 便于维护
|
||
|
return renderDict(row.state, 'cost_review_status');
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
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: 'houseChargeId',
|
||
|
component: 'Input',
|
||
|
rules: 'required',
|
||
|
},
|
||
|
{
|
||
|
label: '费用项目id',
|
||
|
fieldName: 'itemId',
|
||
|
component: 'Input',
|
||
|
rules: 'required',
|
||
|
},
|
||
|
{
|
||
|
label: '缴费开始时间',
|
||
|
fieldName: 'startTime',
|
||
|
component: 'DatePicker',
|
||
|
componentProps: {
|
||
|
showTime: true,
|
||
|
format: 'YYYY-MM-DD HH:mm:ss',
|
||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||
|
},
|
||
|
rules: 'required',
|
||
|
},
|
||
|
{
|
||
|
label: '缴费结束时间',
|
||
|
fieldName: 'endTime',
|
||
|
component: 'DatePicker',
|
||
|
componentProps: {
|
||
|
showTime: true,
|
||
|
format: 'YYYY-MM-DD HH:mm:ss',
|
||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||
|
},
|
||
|
rules: 'required',
|
||
|
},
|
||
|
{
|
||
|
label: '实付金额',
|
||
|
fieldName: 'receivedAmount',
|
||
|
component: 'Input',
|
||
|
},
|
||
|
{
|
||
|
label: '应收金额',
|
||
|
fieldName: 'receivableAmount',
|
||
|
component: 'Input',
|
||
|
rules: 'required',
|
||
|
},
|
||
|
{
|
||
|
label: '缴费时间',
|
||
|
fieldName: 'payTime',
|
||
|
component: 'DatePicker',
|
||
|
componentProps: {
|
||
|
showTime: true,
|
||
|
format: 'YYYY-MM-DD HH:mm:ss',
|
||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||
|
},
|
||
|
rules: 'required',
|
||
|
},
|
||
|
{
|
||
|
label: '审核状态',
|
||
|
fieldName: 'state',
|
||
|
component: 'Select',
|
||
|
componentProps: {
|
||
|
// 可选从DictEnum中获取 DictEnum.COST_REVIEW_STATUS 便于维护
|
||
|
options: getDictOptions('cost_review_status'),
|
||
|
},
|
||
|
rules: 'selectRequired',
|
||
|
},
|
||
|
{
|
||
|
label: '备注',
|
||
|
fieldName: 'remark',
|
||
|
component: 'Textarea',
|
||
|
},
|
||
|
{
|
||
|
label: '搜索值',
|
||
|
fieldName: 'searchValue',
|
||
|
component: 'Input',
|
||
|
},
|
||
|
];
|