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

115 lines
2.4 KiB
TypeScript
Raw Normal View History

2025-07-18 19:48:05 +08:00
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 },
{
2025-08-26 11:25:01 +08:00
title: '费用类型',
field: 'costType',
slots: {
default: ({ row }) => {
return renderDict(row.costType, 'pro_expense_type');
},
},
2025-07-18 19:48:05 +08:00
},
{
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: '审核状态',
fieldName: 'state',
2025-07-19 14:02:58 +08:00
component: 'RadioGroup',
2025-07-18 19:48:05 +08:00
componentProps: {
2025-07-19 14:02:58 +08:00
options: [
{ label: '已审核', value: '1' },
{ label: '已驳回', value: '2' },
],
// options: getDictOptions('cost_review_status'),
2025-07-18 19:48:05 +08:00
},
2025-07-19 14:02:58 +08:00
rules: 'required',
2025-07-18 19:48:05 +08:00
},
];