From 144b9d9670db38dd927c1f7703bddaa1c70fda4f Mon Sep 17 00:00:00 2001 From: Zy <1448159279@qq.com> Date: Wed, 19 Aug 2026 08:48:36 +0800 Subject: [PATCH] =?UTF-8?q?8/19=20=E6=9C=88=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- src/api/system/report/aging/index.ts | 10 - src/api/system/report/dailyFeeReport/type.ts | 162 +++---------- src/api/system/report/monthFeeReport/index.ts | 10 + src/api/system/report/monthFeeReport/type.ts | 75 +++++++ src/components/Pagination/index.vue | 2 +- src/utils/xlsx.ts | 59 ++--- src/views/system/Activity/addActivity.vue | 2 +- src/views/system/Decoration/addDecoration.vue | 2 +- src/views/system/houseUse/index.vue | 11 - .../inspection/Item/addInspectionItem.vue | 5 +- src/views/system/report/arrears.vue | 2 +- src/views/system/report/arrearsTrend.vue | 2 +- src/views/system/report/dailyFeeReport.vue | 118 ++++++---- src/views/system/report/detailed.vue | 8 +- src/views/system/report/monthFeeReport.vue | 212 ++++++++++++++++++ src/views/system/report/paidInExpenses.vue | 2 +- .../system/report/prepaidBalanceDetail.vue | 2 +- src/views/system/resident/addResident.vue | 2 +- 19 files changed, 455 insertions(+), 235 deletions(-) create mode 100644 src/api/system/report/monthFeeReport/index.ts create mode 100644 src/api/system/report/monthFeeReport/type.ts create mode 100644 src/views/system/report/monthFeeReport.vue 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/aging/index.ts b/src/api/system/report/aging/index.ts index 1757b1e..a855fe0 100644 --- a/src/api/system/report/aging/index.ts +++ b/src/api/system/report/aging/index.ts @@ -18,13 +18,3 @@ export const getDetailList = (query): Promise => { params: query }); }; - - -export const getDetailList = (query): Promise => { - return request({ - url: '/agingAnalysis/detail', - method: 'get', - params: query - }); -}; - diff --git a/src/api/system/report/dailyFeeReport/type.ts b/src/api/system/report/dailyFeeReport/type.ts index 9886dec..ea5c81f 100644 --- a/src/api/system/report/dailyFeeReport/type.ts +++ b/src/api/system/report/dailyFeeReport/type.ts @@ -1,135 +1,35 @@ -/** - * 每日缴费记录列表 - * - * RListDailyFeeReportVo - */ export type Response = { - code?: number; - data?: DailyFeeReportVo[]; - msg?: string; + code: number; + rows: Datum[]; + total: number; + msg: string; }; -/** - * org.community.report.domain.vo.DailyFeeReportVo - * - * DailyFeeReportVo - */ -export type DailyFeeReportVo = { - /** - * 卡表 - */ - cardMeter?: number; - /** - * 现金类-现金 - */ - cashAmount?: number; - /** - * 押金 - */ - deposit?: number; - /** - * 押金抵顶 - */ - depositAmount?: number; - /** - * 预缴类-减免优惠 - */ - discountAmount?: number; - /** - * 电费 - */ - electricFee?: number; - /** - * 代收生活垃圾处理费-截止时间 - */ - garbageEndTime?: string; - /** - * 代收生活垃圾处理费-金额 - */ - garbageFee?: number; - /** - * 代收生活垃圾处理费-开始时间 - */ - garbageStartTime?: string; - /** - * 经办人 - */ - handler?: string; - /** - * 其他 - */ - otherAmount?: number; - /** - * 车位服务费-截止时间 - */ - parkingEndTime?: string; - /** - * 车位服务费-金额 - */ - parkingFee?: number; - /** - * 车位服务费-开始时间 - */ - parkingStartTime?: string; - /** - * 日期 - */ - payTime?: string; - /** - * 物业服务费-余额 - */ - propertyBalance?: number; - /** - * 物业服务费-截止时间 - */ - propertyEndTime?: string; - /** - * 预缴类-房产抵顶 - */ - propertyOffsetAmount?: number; - /** - * 物业服务费-开始时间 - */ - propertyStartTime?: string; - /** - * 备注 - */ - remark?: string; - /** - * 户主姓名 - */ - residentName?: string; - /** - * 现金类-转账 - */ - transferAmount?: number; - /** - * 现金类-银联 - */ - unionPayAmount?: number; - /** - * 房号 - */ - unitNo?: string; - /** - * 使用费-截止时间 - */ - usageEndTime?: string; - /** - * 使用费-金额 - */ - usageFee?: number; - /** - * 使用费-开始时间 - */ - usageStartTime?: string; - /** - * 水费 - */ - waterFee?: number; - /** - * 微信商户 - */ - wechatAmount?: number; - [property: string]: any; +export type Datum = { + alipayAmount: string; + cashAmount: string; + chargeTypeAmounts: ChargeTypeAmounts; + deposit: string; + depositAmount: string; + discountAmount: string; + electricFee: string; + handler: null | string; + houseName: string; + payTime: string; + propertyOffsetAmount: string; + remark: null; + residentName: string; + transferAmount: string; + unionPayAmount: string; + waterFee: string; + wechatAmount: string; + yiDangFuAmount: string; +}; + +export type ChargeTypeAmounts = { + [property: string]: { + amount?: string; + endDate?: string; + startDate?: string; + }; }; diff --git a/src/api/system/report/monthFeeReport/index.ts b/src/api/system/report/monthFeeReport/index.ts new file mode 100644 index 0000000..0568d7e --- /dev/null +++ b/src/api/system/report/monthFeeReport/index.ts @@ -0,0 +1,10 @@ +import request from '@/utils/request'; +import { MonthFeeReportQueryForm, Response } from '@/api/system/report/monthFeeReport/type'; + +export const getMonthFeeReportList = (data: MonthFeeReportQueryForm = {}): Promise => { + return request({ + url: '/chargeMonthlyReport/list', + method: 'GET', + params: data + }); +}; diff --git a/src/api/system/report/monthFeeReport/type.ts b/src/api/system/report/monthFeeReport/type.ts new file mode 100644 index 0000000..184e41f --- /dev/null +++ b/src/api/system/report/monthFeeReport/type.ts @@ -0,0 +1,75 @@ + +export type MonthFeeReportQueryForm = { + /** + * 房屋用途类型 + */ + buildingIds?: string; + /** + * 月收费率区间 + */ + monthRate?: string; + /** + * 本月应收区间 + */ + monthReceivable?: string; + /** + * 本月未收区间 + */ + monthUnpaid?: string; + /** + * 当前页码 + */ + pageNum?: number; + /** + * 每页条数 + */ + pageSize?: number; + /** + * 综合欠收区间 + */ + totalArrears?: string; + /** + * 综合预收区间 + */ + totalPrepaid?: string; + /** + * 小区ID + */ + villageId?: string; + /** + * 年收费率区间 + */ + yearRate?: string; + /** + * 本年应收区间 + */ + yearReceivable?: string; + /** + * 本年未收区间 + */ + yearUnpaid?: string; +}; +export type Response = { + code: number; + msg: string; + rows: Row[]; + total: number; +}; + +export type Row = { + buildingId: BuildingId; + buildingName: string; + monthRate: string; + monthReceivable: string; + monthReceived: string; + monthUnpaid: string; + totalArrears: string; + totalPrepaid: string; + yearRate: string; + yearReceivable: string; + yearReceived: string; + yearUnpaid: string; + [property: string]: any; +}; + +export type BuildingId = number | string; diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue index bcbdb74..388d78b 100644 --- a/src/components/Pagination/index.vue +++ b/src/components/Pagination/index.vue @@ -27,7 +27,7 @@ const props = defineProps({ pageSizes: { type: Array, default: () => [10, 20, 30, 50, 100] }, // 移动端页码按钮的数量端默认值5 pagerCount: propTypes.number.def(document.body.clientWidth < 992 ? 5 : 7), - layout: propTypes.string.def('sizes, prev, pager, next, jumper'), + layout: propTypes.string.def('total, sizes, prev, pager, next, jumper'), background: propTypes.bool.def(true), autoScroll: propTypes.bool.def(true), hidden: propTypes.bool.def(false), diff --git a/src/utils/xlsx.ts b/src/utils/xlsx.ts index 8f9107a..b8bdc5d 100644 --- a/src/utils/xlsx.ts +++ b/src/utils/xlsx.ts @@ -75,34 +75,36 @@ export function exportToExcel(data: any[], columns: ColumnConfig[], filename: st for (let R = range.s.r; R <= range.e.r; ++R) { for (let C = range.s.c; C <= range.e.c; ++C) { const cellAddress = XLSX.utils.encode_cell({ r: R, c: C }); - if (worksheet[cellAddress]) { - const isHeader = R < headerRows; - worksheet[cellAddress].s = { - fill: isHeader - ? { - fgColor: { rgb: 'bec4cb' }, - patternType: 'solid' - } - : undefined, - font: isHeader - ? { - color: { rgb: 'FFFFFF' }, - bold: true, - sz: 11 - } - : undefined, - border: { - top: { style: 'thin', color: { rgb: '000000' } }, - bottom: { style: 'thin', color: { rgb: '000000' } }, - left: { style: 'thin', color: { rgb: '000000' } }, - right: { style: 'thin', color: { rgb: '000000' } } - }, - alignment: { - horizontal: 'center', - vertical: 'center' - } - }; + // ✅ 确保单元格存在(即使没有内容也要创建,以便设置边框) + if (!worksheet[cellAddress]) { + worksheet[cellAddress] = { t: 's', v: '' }; } + const isHeader = R < headerRows; + worksheet[cellAddress].s = { + fill: isHeader + ? { + fgColor: { rgb: 'bec4cb' }, + patternType: 'solid' + } + : undefined, + font: isHeader + ? { + color: { rgb: 'FFFFFF' }, + bold: true, + sz: 11 + } + : undefined, + border: { + top: { style: 'thin', color: { rgb: '000000' } }, + bottom: { style: 'thin', color: { rgb: '000000' } }, + left: { style: 'thin', color: { rgb: '000000' } }, + right: { style: 'thin', color: { rgb: '000000' } } + }, + alignment: { + horizontal: 'center', + vertical: 'center' + } + }; } } @@ -143,6 +145,9 @@ export function exportToExcel(data: any[], columns: ColumnConfig[], filename: st /** * 根据 spanMethod 回调计算需要合并的单元格范围 + * @param data + * @param columns + * @param spanMethod * @param headerRows 表头行数(数据行需要偏移) */ function calculateMergesBySpanMethod(data: any[], columns: ColumnConfig[], spanMethod: SpanMethodCallback, headerRows: number = 1): XLSX.Range[] { diff --git a/src/views/system/Activity/addActivity.vue b/src/views/system/Activity/addActivity.vue index 42de67b..4167ab1 100644 --- a/src/views/system/Activity/addActivity.vue +++ b/src/views/system/Activity/addActivity.vue @@ -98,7 +98,7 @@
- + (填 0 代表 不限制名额
diff --git a/src/views/system/Decoration/addDecoration.vue b/src/views/system/Decoration/addDecoration.vue index 902c112..8946934 100644 --- a/src/views/system/Decoration/addDecoration.vue +++ b/src/views/system/Decoration/addDecoration.vue @@ -104,7 +104,7 @@ const rules = { decorationDeposit: [ { required: true, message: '请输入装修押金', trigger: 'blur' }, { - validator: (rule, val, callback) => { + validator: (_: any, val: string, callback: (arg0?: Error) => any) => { if (val === '' || val === null) { return callback(new Error('请输入装修押金')); } diff --git a/src/views/system/houseUse/index.vue b/src/views/system/houseUse/index.vue index 4c076ee..9554937 100644 --- a/src/views/system/houseUse/index.vue +++ b/src/views/system/houseUse/index.vue @@ -185,17 +185,6 @@ const handleDelete = async (row?: HouseUseTypeVO) => { await getList(); }; -/** 导出按钮操作 */ -const handleExport = () => { - proxy?.download( - 'houseUseType/houseUseType/export', - { - ...queryParams.value - }, - `houseUseType_${new Date().getTime()}.xlsx` - ); -}; - onMounted(() => { getList(); }); diff --git a/src/views/system/inspection/Item/addInspectionItem.vue b/src/views/system/inspection/Item/addInspectionItem.vue index 7654182..547bb4f 100644 --- a/src/views/system/inspection/Item/addInspectionItem.vue +++ b/src/views/system/inspection/Item/addInspectionItem.vue @@ -25,7 +25,6 @@ import { ref } from 'vue'; import PageHeader from '@/components/Pageheader/index.vue'; import { addItem, getItem, updateItem } from '@/api/system/InspectionItem'; -const { proxy } = getCurrentInstance() as ComponentInternalInstance; const router = useRouter(); const route = useRoute(); @@ -59,12 +58,12 @@ const submitForm = () => { formRef.value?.validate(async (valid: boolean) => { if (valid) { if (userid.value) { - updateItem(form.value).then((res) => { + updateItem(form.value).then(() => { ElMessage.success('编辑成功'); cancelForm(); }); } else { - addItem(form.value).then((res) => { + addItem(form.value).then(() => { ElMessage.success('添加成功'); cancelForm(); }); diff --git a/src/views/system/report/arrears.vue b/src/views/system/report/arrears.vue index c5c5f31..bfa93ec 100644 --- a/src/views/system/report/arrears.vue +++ b/src/views/system/report/arrears.vue @@ -363,7 +363,7 @@ onMounted(() => { /* 深度穿透修改表格行背景 */ :deep(.bg-dark td) { - background-color: #e8f4ff !important; + background-color: #f5f7fa !important; } /* hover 悬浮保留深色 */ :deep(.bg-dark:hover td) { diff --git a/src/views/system/report/arrearsTrend.vue b/src/views/system/report/arrearsTrend.vue index cabcef1..e2344e2 100644 --- a/src/views/system/report/arrearsTrend.vue +++ b/src/views/system/report/arrearsTrend.vue @@ -132,7 +132,7 @@ function getChartTypeList() { }); } -/** 查询电抄记录列表 */ +/** 查询电抄记录列表 ╬╬╬2╬«2╬╬╬╬22╬╬╬╬╬*/ const getList = async () => { loading.value = true; const search = { ...queryParams.value }; diff --git a/src/views/system/report/dailyFeeReport.vue b/src/views/system/report/dailyFeeReport.vue index 6a80855..0da4bd2 100644 --- a/src/views/system/report/dailyFeeReport.vue +++ b/src/views/system/report/dailyFeeReport.vue @@ -33,9 +33,9 @@ - - - -