115 lines
2.4 KiB
TypeScript
115 lines
2.4 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: 'costType',
|
|
slots: {
|
|
default: ({ row }) => {
|
|
return renderDict(row.costType, 'pro_expense_type');
|
|
},
|
|
},
|
|
},
|
|
{
|
|
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',
|
|
component: 'RadioGroup',
|
|
componentProps: {
|
|
options: [
|
|
{ label: '已审核', value: '1' },
|
|
{ label: '已驳回', value: '2' },
|
|
],
|
|
// options: getDictOptions('cost_review_status'),
|
|
},
|
|
rules: 'required',
|
|
},
|
|
];
|