feat: 车辆收费、水电抄表、排版管理页面

This commit is contained in:
fyy
2025-07-19 17:26:49 +08:00
parent 5be03ab8c5
commit ad2c9aed05
15 changed files with 1483 additions and 163 deletions

View File

@@ -1,53 +1,10 @@
import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
import { getDictOptions } from '#/utils/dict';
import { costItemSettingList } from '#/api/property/costManagement/costItemSetting';
import {meterReadingTypeList} from '#/api/property/costManagement/meterReadingType';
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',
@@ -60,21 +17,22 @@ export const querySchema: FormSchemaGetter = () => [
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
title: '主键',
title: '序号',
field: 'id',
slots: {
default: ({ rowIndex }) => {
return (rowIndex + 1).toString();
},
},
},
{
title: '费用类型id',
title: '费用类型',
field: 'itemId',
},
{
title: '抄表类型id',
title: '抄表类型',
field: 'meterTypeId',
},
{
title: '对象名称',
field: 'objName',
},
{
title: '本期度数',
field: 'curDegrees',
@@ -95,10 +53,6 @@ export const columns: VxeGridProps['columns'] = [
title: '备注',
field: 'remark',
},
{
title: '搜索值',
field: 'searchValue',
},
{
field: 'action',
fixed: 'right',
@@ -119,22 +73,66 @@ export const modalSchema: FormSchemaGetter = () => [
},
},
{
label: '费用类型id',
fieldName: 'itemId',
component: 'Input',
label: '抄表地址',
fieldName: 'location',
component: 'TreeSelect',
rules: 'required',
},
{
label: '抄表类型id',
label: '费用类型',
fieldName: 'costType',
component: 'Select',
rules: 'required',
componentProps: () => ({
options: getDictOptions('wy_cbfylx'),
}),
},
{
label: '收费项目',
fieldName: 'costItemsId',
component: 'ApiSelect',
rules: 'required',
// componentProps: (values)=>{
// const disabled = values.costType === undefined;
// return {
// api: async ()=>{
// console.log(values);
// const rows = await costItemSettingList({pageSize:1000000000,pageNum:1,costType:values.costType});
// return rows;
// },
// resultField:'rows',
// labelField:'chargeItem',
// valueField: 'id',
// disabled,
// }
// }
},
{
label: '抄表类型',
fieldName: 'meterTypeId',
component: 'Input',
component: 'ApiSelect',
rules: 'required',
// componentProps:(values)=>{
// const disabled = values.costType === undefined;
// return {
// api: async()=>{
// const rows = await meterReadingTypeList({pageSize:1000000000,pageNum:1,costType:values.costType=='5'?0:1});
// return rows;
// },
// resultField:'rows',
// labelField:'name',
// valueField: 'id',
// disabled
// }
// }
},
{
label: '对象名称',
fieldName: 'objName',
{
label: '上期度数',
fieldName: 'preDegrees',
component: 'Input',
rules: 'required',
disabled: true,
},
{
label: '本期度数',
@@ -142,12 +140,6 @@ export const modalSchema: FormSchemaGetter = () => [
component: 'Input',
rules: 'required',
},
{
label: '上期度数',
fieldName: 'preDegrees',
component: 'Input',
rules: 'required',
},
{
label: '上期读表时间',
fieldName: 'preReadingTime',
@@ -175,9 +167,4 @@ export const modalSchema: FormSchemaGetter = () => [
fieldName: 'remark',
component: 'Textarea',
},
{
label: '搜索值',
fieldName: 'searchValue',
component: 'Input',
},
];