diff --git a/.env.development b/.env.development index 2bd86fc..cd182d8 100644 --- a/.env.development +++ b/.env.development @@ -9,9 +9,9 @@ VITE_APP_ENV='development' # 开发环境 VITE_APP_BASE_API='/dev-api' # # 开发环境 接口代理地址 -VITE_APP_PROXY_API='http://192.168.1.222:8080' +#VITE_APP_PROXY_API='http://192.168.1.222:8080' # 开发环境 接口代理地址 -#VITE_APP_PROXY_API='http://192.168.1.6:8080' +VITE_APP_PROXY_API='http://192.168.1.6:8080' # 图片基础地址 VITE_IMG_URL='http://192.168.1.222:8080' diff --git a/src/api/system/report/prepaidBalance/index.ts b/src/api/system/report/prepaidBalance/index.ts new file mode 100644 index 0000000..f08103a --- /dev/null +++ b/src/api/system/report/prepaidBalance/index.ts @@ -0,0 +1,10 @@ +import request from '@/utils/request'; +import { Request, Response } from '@/api/system/report/prepaidBalance/type'; + +export const getPrepaidBalanceList = (query: Request): Promise => { + return request({ + url: '/prepaidBalance/summary', + method: 'GET', + params: query + }); +}; diff --git a/src/api/system/report/prepaidBalance/type.ts b/src/api/system/report/prepaidBalance/type.ts new file mode 100644 index 0000000..2239c80 --- /dev/null +++ b/src/api/system/report/prepaidBalance/type.ts @@ -0,0 +1,83 @@ +export type Request = { + /** + * 收费类型ID + */ + chargeTypeId?: string; + /** + * 房屋类型ID + */ + houseUseTypeId?: string; + /** + * 当前页数 + */ + pageNum?: number; + /** + * 分页大小 + */ + pageSize?: number; + /** + * 小区ID + */ + villageId?: string; +}; + +export type Response = { + /** + * 动态收费项目列头 + */ + chargeItems: ChargeItem[]; + code: number; + msg: string; + /** + * 汇总数据行列表 + */ + rows: Row[]; + /** + * 全部合计行 + */ + summary: Summary; + /** + * 总记录数 + */ + total: number; +}; + +export type ChargeItem = { + /** + * 收费项目名称 + */ + chargeItemName: string; + /** + * 收费类型ID + */ + chargeTypeId: number; +}; + +export type Row = { + /** + * 各收费项目预收余额 + */ + chargeItemAmounts?: { [key: string]: any }; + /** + * 房屋类型名称 + */ + houseTypeName?: string; + /** + * 合计金额 + */ + totalAmount?: number; + /** + * 小区名称 + */ + villageName?: string; +}; + +/** + * 全部合计行 + */ +export type Summary = { + chargeItemAmounts: { [key: string]: string }; + houseTypeName: string; + totalAmount: number; + villageName: string; +}; diff --git a/src/views/system/report/LeaseManagementDetails.vue b/src/views/system/report/LeaseManagementDetails.vue index 40ba7ec..97dcfcd 100644 --- a/src/views/system/report/LeaseManagementDetails.vue +++ b/src/views/system/report/LeaseManagementDetails.vue @@ -22,10 +22,10 @@ - + - + @@ -57,7 +57,7 @@ - + @@ -67,7 +67,7 @@ - + @@ -79,7 +79,7 @@ - + @@ -89,7 +89,7 @@ - + @@ -101,7 +101,7 @@ - + @@ -111,7 +111,7 @@ - + @@ -132,7 +132,7 @@
查询 - 重置 + 重置
收起 @@ -150,7 +150,7 @@
查询 - 重置 + 重置
收起 @@ -209,16 +209,13 @@ import pagination from '@/components/Pagination/index.vue'; import pageHeader from '@/components/Pageheader/index.vue'; import { getArrearsDetails } from '@/api/system/report/arrears/arrears'; -import { listChargeItem } from '@/api/system/SdbChargeItem'; import { getCommunitylistAPI } from '@/api/system/community'; import { OwnerArrearsDetailVo } from '@/api/system/report/arrears/type'; -import { getVillageTree } from '@/api/system/house'; import { validator } from '@/utils/Reg'; import { ColumnConfig, exportToExcel } from '@/utils/xlsx'; import { ArrowDownBold, ArrowUpBold } from '@element-plus/icons-vue'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; -// ╬╬▐╬╬&╬╬╬╬ const ArrearsDetailList = ref([]); const loading = ref(true); const showSearch = ref(true); @@ -380,72 +377,6 @@ const handleExport = () => { }, 100); }; -const handleExportAll = () => { - loading.value = true; - let reportAllList: OwnerArrearsDetailVo[] = []; - // 移除空字符串字段 - getArrearsDetails() - .then((res) => { - reportAllList = res.rows; - total.value = res.total; - reportAllList[reportAllList.length - 1].serialNumber = '合计'; - if (reportAllList.length === 0) { - proxy?.$modal.msgWarning('没有可导出的数据'); - return; - } - // 显示加载提示 - const list = updateDynamicColumns(res.rows); - loading.value = true; - // 使用 setTimeout 让出主线程,避免阻塞UI - setTimeout(() => { - try { - const columns: ColumnConfig[] = [ - { label: '序号', prop: 'serialNumber' }, - { label: '区域', prop: 'area' }, - { label: '房号', prop: 'houseNo' }, - { label: '客户', prop: 'customerName' }, - { label: '联系方式', prop: 'phone' }, - { label: '欠费月数', prop: 'arrearsMonths' }, - { label: '应收账期', prop: 'billPeriod' }, - { - label: '欠费项目', - children: [ - ...list.map((item) => { - return { label: item, prop: `chargeItemAmounts.${item}` }; - }) - ] - } - ]; - const mergeSpanMethod2 = ({ columnIndex, rowIndex }) => { - if (rowIndex === reportAllList.length - 1) { - const rowspan = 6; - if (columnIndex === 0) { - return { rowspan: 1, colspan: 1 }; - } - if (columnIndex === 1) { - return { rowspan: 1, colspan: rowspan }; - } - if (columnIndex < rowspan + 1) { - return { rowspan: 0, colspan: 0 }; - } - } - // 普通行不合并 - return { rowspan: 1, colspan: 1 }; - }; - exportToExcel(reportAllList, columns, `应收欠费明细表_${new Date().getTime()}`, mergeSpanMethod2); - } catch (error) { - proxy?.$modal.msgError('导出失败,请重试'); - console.error('导出错误:', error); - } finally { - loading.value = false; - } - }, 100); - }) - .finally(() => { - loading.value = false; - }); -}; - const mergeSpanMethod = ({ columnIndex, rowIndex }) => { if (rowIndex === ArrearsDetailList.value.length - 1) { const rowspan = 6; diff --git a/src/views/system/report/aging.vue b/src/views/system/report/aging.vue index 8c4f00a..329aeb0 100644 --- a/src/views/system/report/aging.vue +++ b/src/views/system/report/aging.vue @@ -116,7 +116,7 @@ interface SpanMethodProps { rowIndex: number; columnIndex: number; } - +// 表格区域合并 const arraySpanMethod = ({ rowIndex, columnIndex }: SpanMethodProps) => { if (rowIndex === AgingList.value.length - 1) { if (columnIndex === 0) { diff --git a/src/views/system/report/agingDetailed.vue b/src/views/system/report/agingDetailed.vue index f1511c1..52c5a28 100644 --- a/src/views/system/report/agingDetailed.vue +++ b/src/views/system/report/agingDetailed.vue @@ -82,7 +82,7 @@ import { getDetailList } from '@/api/system/report/aging'; import { AgingSummary } from '@/api/system/report/aging/type'; import type { TableColumnCtx } from 'element-plus'; import { exportToExcel } from '@/utils/xlsx'; -import { getBuildinglistAPI, getVillageTree } from '@/api/system/house'; +import { getBuildinglistAPI } from '@/api/system/house'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { com_report_age_list } = toRefs(proxy?.useDict('com_report_age_list')); @@ -111,7 +111,7 @@ interface SpanMethodProps { rowIndex: number; columnIndex: number; } - +// 月份 const arrearsMonthsList = ref([]); function getAllArrearsMonths() { arrearsMonthsList.value = Array.from({ length: 12 }, (_, i) => { @@ -121,7 +121,7 @@ function getAllArrearsMonths() { }; }); } - +// 表格区域合并 const arraySpanMethod = ({ rowIndex, columnIndex }: SpanMethodProps) => { if (rowIndex === AgingList.value.length - 1) { const rowspan = 6; diff --git a/src/views/system/report/arrearsTrend.vue b/src/views/system/report/arrearsTrend.vue index 5a6f334..a5b99d8 100644 --- a/src/views/system/report/arrearsTrend.vue +++ b/src/views/system/report/arrearsTrend.vue @@ -65,7 +65,6 @@
-账龄 + + diff --git a/src/views/system/report/chargeTrend.vue b/src/views/system/report/chargeTrend.vue index cea7007..5b68975 100644 --- a/src/views/system/report/chargeTrend.vue +++ b/src/views/system/report/chargeTrend.vue @@ -70,9 +70,7 @@ + + diff --git a/src/views/system/report/paidInExpenses.vue b/src/views/system/report/paidInExpenses.vue index 7d465bb..83affcb 100644 --- a/src/views/system/report/paidInExpenses.vue +++ b/src/views/system/report/paidInExpenses.vue @@ -92,16 +92,16 @@ const total = ref(0); const queryFormRef = ref(); const queryTime = ref([]); function handleQueryTime(val: string[]) { - queryParams.value.startTime = val[0]; - queryParams.value.endTime = val[1]; + queryParams.value.startDate = val[0]; + queryParams.value.endDate = val[1]; } const data = reactive({ queryParams: { pageNum: 1, pageSize: 10, villageId: '-1', - startTime: '', - endTime: '', + startDate: '', + endDate: '', chargeTypeId: '-1' }, rule: [ @@ -180,6 +180,7 @@ const handleQuery = () => { /** 重置按钮操作 */ const resetQuery = () => { queryFormRef.value?.resetFields(); + queryTime.value = []; handleQuery(); }; /** 导出Excel */ diff --git a/src/views/system/report/prepaidBalance.vue b/src/views/system/report/prepaidBalance.vue new file mode 100644 index 0000000..3c5423d --- /dev/null +++ b/src/views/system/report/prepaidBalance.vue @@ -0,0 +1,236 @@ + +账龄 + + +