From a5a657a96c42cd8a6950bc7c7ef2b457459954e7 Mon Sep 17 00:00:00 2001 From: fyy <2717885210@qq.com> Date: Fri, 18 Jul 2025 11:05:17 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E8=BD=A6=E8=BE=86=E6=94=B6=E8=B4=B9=E3=80=81=E6=B0=B4=E7=94=B5?= =?UTF-8?q?=E6=8A=84=E8=A1=A8=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/property/carCharge/index.ts | 61 +++ .../src/api/property/carCharge/model.d.ts | 169 +++++++++ .../src/api/property/costMeterWater/index.ts | 61 +++ .../api/property/costMeterWater/model.d.ts | 157 ++++++++ .../carCharge/carCharge-add-modal.vue | 91 +++++ .../carCharge/carCharge-detail-modal.vue | 101 +++++ .../carCharge/carCharge-pay-modal.vue | 89 +++++ .../property/costManagement/carCharge/data.ts | 350 ++++++++++++++++++ .../costManagement/carCharge/index.vue | 173 +++++++++ .../costManagement/costItemSetting/index.vue | 46 +-- .../costMeterWater/costMeterWater-modal.vue | 101 +++++ .../costManagement/costMeterWater/data.ts | 183 +++++++++ .../costManagement/costMeterWater/index.vue | 182 +++++++++ .../maintainTaskDetail/data.ts | 49 ++- 14 files changed, 1765 insertions(+), 48 deletions(-) create mode 100644 apps/web-antd/src/api/property/carCharge/index.ts create mode 100644 apps/web-antd/src/api/property/carCharge/model.d.ts create mode 100644 apps/web-antd/src/api/property/costMeterWater/index.ts create mode 100644 apps/web-antd/src/api/property/costMeterWater/model.d.ts create mode 100644 apps/web-antd/src/views/property/costManagement/carCharge/carCharge-add-modal.vue create mode 100644 apps/web-antd/src/views/property/costManagement/carCharge/carCharge-detail-modal.vue create mode 100644 apps/web-antd/src/views/property/costManagement/carCharge/carCharge-pay-modal.vue create mode 100644 apps/web-antd/src/views/property/costManagement/carCharge/data.ts create mode 100644 apps/web-antd/src/views/property/costManagement/carCharge/index.vue create mode 100644 apps/web-antd/src/views/property/costManagement/costMeterWater/costMeterWater-modal.vue create mode 100644 apps/web-antd/src/views/property/costManagement/costMeterWater/data.ts create mode 100644 apps/web-antd/src/views/property/costManagement/costMeterWater/index.vue diff --git a/apps/web-antd/src/api/property/carCharge/index.ts b/apps/web-antd/src/api/property/carCharge/index.ts new file mode 100644 index 00000000..2eb61a11 --- /dev/null +++ b/apps/web-antd/src/api/property/carCharge/index.ts @@ -0,0 +1,61 @@ +import type { CarChargeVO, CarChargeForm, CarChargeQuery } from './model'; + +import type { ID, IDS } from '#/api/common'; +import type { PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** +* 查询费用-车辆收费列表 +* @param params +* @returns 费用-车辆收费列表 +*/ +export function carChargeList(params?: CarChargeQuery) { + return requestClient.get>('/property/carCharge/list', { params }); +} + +/** + * 导出费用-车辆收费列表 + * @param params + * @returns 费用-车辆收费列表 + */ +export function carChargeExport(params?: CarChargeQuery) { + return commonExport('/property/carCharge/export', params ?? {}); +} + +/** + * 查询费用-车辆收费详情 + * @param id id + * @returns 费用-车辆收费详情 + */ +export function carChargeInfo(id: ID) { + return requestClient.get(`/property/carCharge/${id}`); +} + +/** + * 新增费用-车辆收费 + * @param data + * @returns void + */ +export function carChargeAdd(data: CarChargeForm) { + return requestClient.postWithMsg('/property/carCharge', data); +} + +/** + * 更新费用-车辆收费 + * @param data + * @returns void + */ +export function carChargeUpdate(data: CarChargeForm) { + return requestClient.putWithMsg('/property/carCharge', data); +} + +/** + * 删除费用-车辆收费 + * @param id id + * @returns void + */ +export function carChargeRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/carCharge/${id}`); +} diff --git a/apps/web-antd/src/api/property/carCharge/model.d.ts b/apps/web-antd/src/api/property/carCharge/model.d.ts new file mode 100644 index 00000000..413ef066 --- /dev/null +++ b/apps/web-antd/src/api/property/carCharge/model.d.ts @@ -0,0 +1,169 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface CarChargeVO { + /** + * 主键 + */ + id: string | number; + + /** + * 车牌号 + */ + carNumber: string; + + /** + * 业主 + */ + personId: string | number; + + /** + * 楼层 + */ + floorId: string | number; + + /** + * 车位 + */ + location: string; + + /** + * 状态 + */ + state: string; + + /** + * 收费项目 + */ + costItemsId: string | number; + + /** + * 计费开始时间 + */ + starTime: string; + + /** + * 计费结束时间 + */ + endTime: string; + + /** + * 说明 + */ + remark: string; + + /** + * 搜索值 + */ + searchValue: string; + +} + +export interface CarChargeForm extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 车牌号 + */ + carNumber?: string; + + /** + * 业主 + */ + personId?: string | number; + + /** + * 楼层 + */ + floorId?: string | number; + + /** + * 车位 + */ + location?: string; + + /** + * 状态 + */ + state?: string; + + /** + * 收费项目 + */ + costItemsId?: string | number; + + /** + * 计费开始时间 + */ + starTime?: string; + + /** + * 计费结束时间 + */ + endTime?: string; + + /** + * 说明 + */ + remark?: string; + + /** + * 搜索值 + */ + searchValue?: string; + +} + +export interface CarChargeQuery extends PageQuery { + /** + * 车牌号 + */ + carNumber?: string; + + /** + * 业主 + */ + personId?: string | number; + + /** + * 楼层 + */ + floorId?: string | number; + + /** + * 车位 + */ + location?: string; + + /** + * 状态 + */ + state?: string; + + /** + * 收费项目 + */ + costItemsId?: string | number; + + /** + * 计费开始时间 + */ + starTime?: string; + + /** + * 计费结束时间 + */ + endTime?: string; + + /** + * 搜索值 + */ + searchValue?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/api/property/costMeterWater/index.ts b/apps/web-antd/src/api/property/costMeterWater/index.ts new file mode 100644 index 00000000..a258139e --- /dev/null +++ b/apps/web-antd/src/api/property/costMeterWater/index.ts @@ -0,0 +1,61 @@ +import type { CostMeterWaterVO, CostMeterWaterForm, CostMeterWaterQuery } from './model'; + +import type { ID, IDS } from '#/api/common'; +import type { PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** +* 查询费用-水电抄列表 +* @param params +* @returns 费用-水电抄列表 +*/ +export function costMeterWaterList(params?: CostMeterWaterQuery) { + return requestClient.get>('/property/costMeterWater/list', { params }); +} + +/** + * 导出费用-水电抄列表 + * @param params + * @returns 费用-水电抄列表 + */ +export function costMeterWaterExport(params?: CostMeterWaterQuery) { + return commonExport('/property/costMeterWater/export', params ?? {}); +} + +/** + * 查询费用-水电抄详情 + * @param id id + * @returns 费用-水电抄详情 + */ +export function costMeterWaterInfo(id: ID) { + return requestClient.get(`/property/costMeterWater/${id}`); +} + +/** + * 新增费用-水电抄 + * @param data + * @returns void + */ +export function costMeterWaterAdd(data: CostMeterWaterForm) { + return requestClient.postWithMsg('/property/costMeterWater', data); +} + +/** + * 更新费用-水电抄 + * @param data + * @returns void + */ +export function costMeterWaterUpdate(data: CostMeterWaterForm) { + return requestClient.putWithMsg('/property/costMeterWater', data); +} + +/** + * 删除费用-水电抄 + * @param id id + * @returns void + */ +export function costMeterWaterRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/costMeterWater/${id}`); +} diff --git a/apps/web-antd/src/api/property/costMeterWater/model.d.ts b/apps/web-antd/src/api/property/costMeterWater/model.d.ts new file mode 100644 index 00000000..c96b39b8 --- /dev/null +++ b/apps/web-antd/src/api/property/costMeterWater/model.d.ts @@ -0,0 +1,157 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface CostMeterWaterVO { + /** + * 主键 + */ + id: string | number; + + /** + * 费用类型id + */ + itemId: string | number; + + /** + * 抄表类型id + */ + meterTypeId: string | number; + + /** + * 对象名称 + */ + objName: string; + + /** + * 本期度数 + */ + curDegrees: string; + + /** + * 上期度数 + */ + preDegrees: string; + + /** + * 上期读表时间 + + */ + preReadingTime: string; + + /** + * 本期读表时间 + */ + curReadingTime: string; + + /** + * 备注 + */ + remark: string; + + /** + * 搜索值 + */ + searchValue: string; + +} + +export interface CostMeterWaterForm extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 费用类型id + */ + itemId?: string | number; + + /** + * 抄表类型id + */ + meterTypeId?: string | number; + + /** + * 对象名称 + */ + objName?: string; + + /** + * 本期度数 + */ + curDegrees?: string; + + /** + * 上期度数 + */ + preDegrees?: string; + + /** + * 上期读表时间 + + */ + preReadingTime?: string; + + /** + * 本期读表时间 + */ + curReadingTime?: string; + + /** + * 备注 + */ + remark?: string; + + /** + * 搜索值 + */ + searchValue?: string; + +} + +export interface CostMeterWaterQuery extends PageQuery { + /** + * 费用类型id + */ + itemId?: string | number; + + /** + * 抄表类型id + */ + meterTypeId?: string | number; + + /** + * 对象名称 + */ + objName?: string; + + /** + * 本期度数 + */ + curDegrees?: string; + + /** + * 上期度数 + */ + preDegrees?: string; + + /** + * 上期读表时间 + + */ + preReadingTime?: string; + + /** + * 本期读表时间 + */ + curReadingTime?: string; + + /** + * 搜索值 + */ + searchValue?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/views/property/costManagement/carCharge/carCharge-add-modal.vue b/apps/web-antd/src/views/property/costManagement/carCharge/carCharge-add-modal.vue new file mode 100644 index 00000000..e9c7ef28 --- /dev/null +++ b/apps/web-antd/src/views/property/costManagement/carCharge/carCharge-add-modal.vue @@ -0,0 +1,91 @@ + + + + diff --git a/apps/web-antd/src/views/property/costManagement/carCharge/carCharge-detail-modal.vue b/apps/web-antd/src/views/property/costManagement/carCharge/carCharge-detail-modal.vue new file mode 100644 index 00000000..c806339f --- /dev/null +++ b/apps/web-antd/src/views/property/costManagement/carCharge/carCharge-detail-modal.vue @@ -0,0 +1,101 @@ + + + + diff --git a/apps/web-antd/src/views/property/costManagement/carCharge/carCharge-pay-modal.vue b/apps/web-antd/src/views/property/costManagement/carCharge/carCharge-pay-modal.vue new file mode 100644 index 00000000..082e6122 --- /dev/null +++ b/apps/web-antd/src/views/property/costManagement/carCharge/carCharge-pay-modal.vue @@ -0,0 +1,89 @@ + + + diff --git a/apps/web-antd/src/views/property/costManagement/carCharge/data.ts b/apps/web-antd/src/views/property/costManagement/carCharge/data.ts new file mode 100644 index 00000000..b8862bfd --- /dev/null +++ b/apps/web-antd/src/views/property/costManagement/carCharge/data.ts @@ -0,0 +1,350 @@ +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: 'carNumber', + label: '车牌号', + }, + { + component: 'Input', + fieldName: 'personId', + label: '业主', + }, + { + component: 'Select', + componentProps: { + // 可选从DictEnum中获取 DictEnum.WY_CSZT 便于维护 + options: getDictOptions('wy_cszt'), + }, + fieldName: 'state', + label: '状态', + }, +]; + +// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 +// export const columns: () => VxeGridProps['columns'] = () => [ +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '序号', + field: 'id', + slots: { + default: ({ rowIndex }) => { + return (rowIndex + 1).toString(); + }, + }, + }, + { + title: '车牌号', + field: 'carNumber', + }, + { + title: '车位', + field: 'location', + }, + { + title: '业主', + field: 'personId', + }, + { + title: '状态', + field: 'state', + slots: { + default: ({ row }) => { + // 可选从DictEnum中获取 DictEnum.WY_CSZT 便于维护 + return renderDict(row.state, 'wy_cszt'); + }, + }, + }, + { + title: '收费项目', + field: 'costItemsId', + }, + { + title: '计费开始时间', + field: 'starTime', + }, + { + title: '计费结束时间', + field: 'endTime', + }, + { + title: '说明', + field: 'remark', + }, + { + 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: 'carNumber', + component: 'Input', + rules: 'required', + }, + { + label: '业主', + fieldName: 'personId', + component: 'Input', + }, + { + label: '楼层', + fieldName: 'floorId', + component: 'Input', + rules: 'required', + }, + { + label: '车位', + fieldName: 'location', + component: 'Input', + }, + { + label: '状态', + fieldName: 'state', + component: 'Select', + componentProps: { + // 可选从DictEnum中获取 DictEnum.WY_CSZT 便于维护 + options: getDictOptions('wy_cszt'), + }, + }, + { + label: '收费项目', + fieldName: 'costItemsId', + component: 'Input', + }, + { + label: '计费开始时间', + fieldName: 'starTime', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + }, + { + label: '计费结束时间', + fieldName: 'endTime', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + }, + { + label: '说明', + fieldName: 'remark', + component: 'Input', + }, + { + label: '搜索值', + fieldName: 'searchValue', + component: 'Input', + }, +]; +//创建 +export const addModalSchema: FormSchemaGetter = () => [ + { + label: '主键', + fieldName: 'id', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '车牌号', + fieldName: 'carNumber', + component: 'Input', + rules: 'required', + }, + // { + // label: '费用类型',//一个费用下有对各费用项目 + // fieldName: 'personId', + // component: 'Input', + // }, + { + label: '收费项目',//一个费用收费项目对应一个费用类型 + fieldName: 'costItemsId', + component: 'Input', + rules: 'required', + }, + { + label: '计费开始时间', + fieldName: 'starTime', + component: 'DatePicker', + rules: 'required', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + }, + { + label: '计费结束时间', + fieldName: 'endTime', + component: 'DatePicker', + rules:'required', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + }, + { + label: '说明', + fieldName: 'remark', + component: 'Input', + }, +]; +//缴费 +export const payModalSchema: FormSchemaGetter = () => [ + { + label: '主键', + fieldName: 'id', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '车牌号', + fieldName: 'carNumber', + component: 'Input', + rules: 'required', + }, + // { + // label: '费用类型',//一个费用下有对各费用项目 + // fieldName: 'personId', + // component: 'Input', + // }, + { + label: '收费项目',//一个费用收费项目对应一个费用类型 + fieldName: 'costItemsId', + component: 'Input', + rules: 'required', + }, + { + label: '计费开始时间', + fieldName: 'starTime', + component: 'DatePicker', + rules: 'required', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + }, + { + label: '计费结束时间', + fieldName: 'endTime', + component: 'DatePicker', + rules:'required', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + }, + { + label: '说明', + fieldName: 'remark', + component: 'Input', + }, + { + label: '支付方式', + fieldName: 'carNumber', + component: 'Input', + rules: 'required', + }, + { + label: '缴费周期', + fieldName: 'personId', + component: 'Input', + }, + { + label: '实收金额', + fieldName: 'costItemsId', + component: 'Input', + }, + { + label: '自定义周期', + fieldName: 'remark', + component: 'Input', + }, +]; +export const detailColumns: VxeGridProps['columns'] = [ + { + title: '序号', + field: 'id', + slots: { + default: ({ rowIndex }) => { + return (rowIndex + 1).toString(); + }, + }, + }, + { + title: '费用项目', + field: 'carNumber', + }, + { + title: '费用标识', + field: 'location', + }, + { + title: '应收金额', + field: 'personId', + }, + { + title: '状态', + field: 'state', + slots: { + default: ({ row }) => { + // 可选从DictEnum中获取 DictEnum.WY_CSZT 便于维护 + return renderDict(row.state, 'wy_cszt'); + }, + }, + }, + { + title: '建帐时间', + field: 'starTime', + }, + { + title: '应收时间', + field: 'endTime', + }, + { + title: '说明', + field: 'remark', + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +]; diff --git a/apps/web-antd/src/views/property/costManagement/carCharge/index.vue b/apps/web-antd/src/views/property/costManagement/carCharge/index.vue new file mode 100644 index 00000000..b2f39efc --- /dev/null +++ b/apps/web-antd/src/views/property/costManagement/carCharge/index.vue @@ -0,0 +1,173 @@ + + + diff --git a/apps/web-antd/src/views/property/costManagement/costItemSetting/index.vue b/apps/web-antd/src/views/property/costManagement/costItemSetting/index.vue index afd89df3..daaa4438 100644 --- a/apps/web-antd/src/views/property/costManagement/costItemSetting/index.vue +++ b/apps/web-antd/src/views/property/costManagement/costItemSetting/index.vue @@ -16,14 +16,14 @@ import { } from '#/adapter/vxe-table'; import { - costItemSettingExport, - costItemSettingList, - costItemSettingRemove, -} from '#/api/property/costItemSetting'; -import type { CostItemSettingForm } from '#/api/property/costItemSetting/model'; + carChargeExport, + carChargeList, + carChargeRemove, +} from '#/api/property/carCharge'; +import type { CarChargeForm } from '#/api/property/carCharge/model'; import { commonDownloadExcel } from '#/utils/file/download'; -import costItemSettingModal from './costItemSetting-modal.vue'; +import carChargeModal from './carCharge-modal.vue'; import { columns, querySchema } from './data'; const formOptions: VbenFormProps = { @@ -64,7 +64,7 @@ const gridOptions: VxeGridProps = { proxyConfig: { ajax: { query: async ({ page }, formValues = {}) => { - return await costItemSettingList({ + return await carChargeList({ pageNum: page.currentPage, pageSize: page.pageSize, ...formValues, @@ -76,7 +76,7 @@ const gridOptions: VxeGridProps = { keyField: 'id', }, // 表格全局唯一表示 保存列配置需要用到 - id: 'property-costItemSetting-index' + id: 'property-carCharge-index' }; const [BasicTable, tableApi] = useVbenVxeGrid({ @@ -84,8 +84,8 @@ const [BasicTable, tableApi] = useVbenVxeGrid({ gridOptions, }); -const [CostItemSettingModal, modalApi] = useVbenModal({ - connectedComponent: costItemSettingModal, +const [CarChargeModal, modalApi] = useVbenModal({ + connectedComponent: carChargeModal, }); function handleAdd() { @@ -93,32 +93,32 @@ function handleAdd() { modalApi.open(); } -async function handleEdit(row: Required) { +async function handleEdit(row: Required) { modalApi.setData({ id: row.id }); modalApi.open(); } -async function handleDelete(row: Required) { - await costItemSettingRemove(row.id); +async function handleDelete(row: Required) { + await carChargeRemove(row.id); await tableApi.query(); } function handleMultiDelete() { const rows = tableApi.grid.getCheckboxRecords(); - const ids = rows.map((row: Required) => row.id); + const ids = rows.map((row: Required) => row.id); Modal.confirm({ title: '提示', okType: 'danger', content: `确认删除选中的${ids.length}条记录吗?`, onOk: async () => { - await costItemSettingRemove(ids); + await carChargeRemove(ids); await tableApi.query(); }, }); } function handleDownloadExcel() { - commonDownloadExcel(costItemSettingExport, '费用项设置数据', tableApi.formApi.form.values, { + commonDownloadExcel(carChargeExport, '费用-车辆收费数据', tableApi.formApi.form.values, { fieldMappingTime: formOptions.fieldMappingTime, }); } @@ -126,11 +126,11 @@ function handleDownloadExcel() {