8/13, 日报
This commit is contained in:
@@ -9,9 +9,9 @@ VITE_APP_ENV='development'
|
|||||||
# 开发环境
|
# 开发环境
|
||||||
VITE_APP_BASE_API='/dev-api'
|
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'
|
VITE_IMG_URL='http://192.168.1.222:8080'
|
||||||
|
|
||||||
|
|||||||
10
src/api/system/report/dailyFeeReport/index.ts
Normal file
10
src/api/system/report/dailyFeeReport/index.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { Response } from '@/api/system/report/dailyFeeReport/type';
|
||||||
|
|
||||||
|
export const getDailyFeeReportList = (data = {}): Promise<Response> => {
|
||||||
|
return request({
|
||||||
|
url: '/dailyFeeReport/list',
|
||||||
|
method: 'GET',
|
||||||
|
params: data
|
||||||
|
});
|
||||||
|
};
|
||||||
135
src/api/system/report/dailyFeeReport/type.ts
Normal file
135
src/api/system/report/dailyFeeReport/type.ts
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
/**
|
||||||
|
* 每日缴费记录列表
|
||||||
|
*
|
||||||
|
* RListDailyFeeReportVo
|
||||||
|
*/
|
||||||
|
export type Response = {
|
||||||
|
code?: number;
|
||||||
|
data?: DailyFeeReportVo[];
|
||||||
|
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;
|
||||||
|
};
|
||||||
10
src/api/system/report/prepaidBalanceDetail/index.ts
Normal file
10
src/api/system/report/prepaidBalanceDetail/index.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { Request, Response } from '@/api/system/report/prepaidBalance/type';
|
||||||
|
|
||||||
|
export const getPrepaidBalanceDetailList = (query: Request): Promise<Response> => {
|
||||||
|
return request({
|
||||||
|
url: '/prepaidBalance/detail',
|
||||||
|
method: 'GET',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
83
src/api/system/report/prepaidBalanceDetail/type.ts
Normal file
83
src/api/system/report/prepaidBalanceDetail/type.ts
Normal file
@@ -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;
|
||||||
|
};
|
||||||
@@ -97,8 +97,7 @@ const data = reactive({
|
|||||||
startTime: '',
|
startTime: '',
|
||||||
endTime: '',
|
endTime: '',
|
||||||
chargeTypeId: '-1'
|
chargeTypeId: '-1'
|
||||||
},
|
}
|
||||||
rule: []
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const { queryParams } = toRefs(data);
|
const { queryParams } = toRefs(data);
|
||||||
|
|||||||
@@ -94,19 +94,7 @@ const data = reactive({
|
|||||||
startDate: '',
|
startDate: '',
|
||||||
endDate: '',
|
endDate: '',
|
||||||
chargeTypeId: '-1'
|
chargeTypeId: '-1'
|
||||||
},
|
}
|
||||||
rule: [
|
|
||||||
{
|
|
||||||
validator: (_: any, value: string, callback: (arg0?: Error) => any) => {
|
|
||||||
if (value === '' || value === undefined || value === null) {
|
|
||||||
return callback();
|
|
||||||
}
|
|
||||||
if (!validator(value, 'fullFilterReg')) {
|
|
||||||
return callback(new Error('请输入正确的房号'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const { queryParams } = toRefs(data);
|
const { queryParams } = toRefs(data);
|
||||||
|
|||||||
@@ -96,8 +96,7 @@ const data = reactive({
|
|||||||
startTime: '',
|
startTime: '',
|
||||||
endTime: '',
|
endTime: '',
|
||||||
chargeTypeId: '-1'
|
chargeTypeId: '-1'
|
||||||
},
|
}
|
||||||
rule: []
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const { queryParams } = toRefs(data);
|
const { queryParams } = toRefs(data);
|
||||||
|
|||||||
251
src/views/system/report/dailyFeeReport.vue
Normal file
251
src/views/system/report/dailyFeeReport.vue
Normal file
@@ -0,0 +1,251 @@
|
|||||||
|
<template>
|
||||||
|
<div class="p-2 h-full flex flex-col">
|
||||||
|
<pageHeader></pageHeader>
|
||||||
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
|
<div class="flex justify-between">
|
||||||
|
<div>
|
||||||
|
<el-form-item label="项目" prop="chargeItemId">
|
||||||
|
<el-select v-model="queryParams.villageId" placeholder="请选择">
|
||||||
|
<el-option v-for="item in villageList" :key="item.villageId" :label="item.villageName" :value="item.villageId" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="房屋类型" prop="houseUseTypeId">
|
||||||
|
<el-select v-model="queryParams.houseUseTypeId" placeholder="请选择">
|
||||||
|
<el-option v-for="item in houseUseList" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户" prop="customerName">
|
||||||
|
<el-input v-model.trim="queryParams.customerName"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||||
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
|
||||||
|
<el-card shadow="never" class="flex-1">
|
||||||
|
<template #header>
|
||||||
|
<el-row :gutter="10" style="margin-bottom: 30px">
|
||||||
|
<el-col :span="5">
|
||||||
|
<span> 预收费用余额汇总 </span>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="18"></el-col>
|
||||||
|
<el-col :span="1">
|
||||||
|
<el-button type="primary" @click="handleExport">导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" border :data="ArrearsDetailList">
|
||||||
|
<el-table-column label="日期" align="center" prop="payTime" />
|
||||||
|
<el-table-column label="房屋信息" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-table-column label="户主" align="center" prop="residentName"></el-table-column>
|
||||||
|
<el-table-column label="房号" align="center" prop="houseName"></el-table-column>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="支付方式" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-table-column label="现金类" align="center" prop="cashAmount">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-table-column label="现金" align="center" prop="cashAmount"></el-table-column>
|
||||||
|
<el-table-column label="银联" align="center" prop="unionPayAmount"></el-table-column>
|
||||||
|
<el-table-column label="转账" align="center" prop="transferAmount"></el-table-column>
|
||||||
|
<el-table-column label="微信商户" align="center" prop="wechatAmount"></el-table-column>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="顶账类" align="center" prop="deposit">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-table-column label="押金抵顶" align="center" prop="depositAmount"></el-table-column>
|
||||||
|
<el-table-column label="减免优惠" align="center" prop="discountAmount"></el-table-column>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="水费" align="center" prop="waterFee" />
|
||||||
|
<el-table-column label="电费" align="center" prop="electricFee" />
|
||||||
|
<el-table-column label="押金" align="center" prop="deposit" />
|
||||||
|
<el-table-column label="收费项目" align="center" prop="chargeTypeAmounts">
|
||||||
|
<template #default>
|
||||||
|
<el-table-column v-for="(item, index) in rowChargeTypesList" :key="index" :label="item" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-table-column label="金额" align="center" v-if="item !== '卡表' && item !== '其他'">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.chargeTypeAmounts[item].amount }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="开始时间" align="center" v-if="item !== '卡表' && item !== '其他'">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.chargeTypeAmounts[item].amount }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="结束时间" align="center" v-if="item !== '卡表' && item !== '其他'">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.chargeTypeAmounts[item].amount }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<span v-if="item == '卡表' || item == '其他'">{{ scope.row.chargeTypeAmounts[item] }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="经办人" align="center" prop="handler" />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
</el-table>
|
||||||
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import pagination from '@/components/Pagination/index.vue';
|
||||||
|
import pageHeader from '@/components/Pageheader/index.vue';
|
||||||
|
import { getCommunitylistAPI } from '@/api/system/community';
|
||||||
|
import { ColumnConfig, exportToExcel } from '@/utils/xlsx';
|
||||||
|
import { listHouseUseType } from '@/api/system/houseUse';
|
||||||
|
import { Row } from '@/api/system/report/prepaidBalance/type';
|
||||||
|
import { getPrepaidBalanceDetailList } from '@/api/system/report/prepaidBalanceDetail';
|
||||||
|
import { getDailyFeeReportList } from '@/api/system/report/dailyFeeReport';
|
||||||
|
import { DailyFeeReportVo } from '@/api/system/report/dailyFeeReport/type';
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
const ArrearsDetailList = ref<DailyFeeReportVo[]>([]);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
|
||||||
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
|
const data = reactive({
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
villageId: '',
|
||||||
|
houseUseTypeId: '',
|
||||||
|
customerName: ''
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const { queryParams } = toRefs(data);
|
||||||
|
|
||||||
|
// 查询小区
|
||||||
|
const villageList = ref([]);
|
||||||
|
function getAllVillage() {
|
||||||
|
getCommunitylistAPI().then((res) => {
|
||||||
|
villageList.value = [...res.rows];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 房屋类型
|
||||||
|
const houseUseList = ref([]);
|
||||||
|
function getHouseUseList() {
|
||||||
|
listHouseUseType().then((res) => {
|
||||||
|
houseUseList.value = [...res.rows];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const rowChargeTypesList = ref([]);
|
||||||
|
|
||||||
|
/** 查询电抄记录列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
const search = { ...queryParams.value };
|
||||||
|
// 移除空字符串字段
|
||||||
|
Object.keys(search).forEach((key) => {
|
||||||
|
if (search[key] === '-1') {
|
||||||
|
search[key] = undefined;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
getDailyFeeReportList(search)
|
||||||
|
.then((res) => {
|
||||||
|
ArrearsDetailList.value = [...res.data];
|
||||||
|
rowChargeTypesList.value = Object.keys(res.data[0].chargeTypeAmounts);
|
||||||
|
console.log(rowChargeTypesList.value);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loading.value = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryFormRef.value?.resetFields();
|
||||||
|
queryParams.value = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
villageId: '-1',
|
||||||
|
houseUseTypeId: '',
|
||||||
|
customerName: ''
|
||||||
|
};
|
||||||
|
handleQuery();
|
||||||
|
};
|
||||||
|
/** 导出Excel */
|
||||||
|
const handleExport = () => {
|
||||||
|
if (ArrearsDetailList.value.length === 0) {
|
||||||
|
proxy?.$modal.msgWarning('没有可导出的数据');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 显示加载提示
|
||||||
|
loading.value = true;
|
||||||
|
// 使用 setTimeout 让出主线程,避免阻塞UI
|
||||||
|
setTimeout(() => {
|
||||||
|
try {
|
||||||
|
const columns: ColumnConfig[] = [
|
||||||
|
{ label: '小区名称', prop: 'villageName' },
|
||||||
|
{ label: '房屋类型', prop: 'houseTypeName' },
|
||||||
|
{ label: '户号', prop: 'houseNo' },
|
||||||
|
{ label: '客户', prop: 'customerName' },
|
||||||
|
{ label: '预收账期', prop: 'prepaidPeriod' },
|
||||||
|
{ label: '预收月份', prop: 'prepaidMonths' },
|
||||||
|
{
|
||||||
|
label: '收费项目',
|
||||||
|
prop: 'chargeItemAmounts',
|
||||||
|
children: [
|
||||||
|
...rowChargeTypesList.value.map((item) => {
|
||||||
|
return {
|
||||||
|
label: item.chargeItemName,
|
||||||
|
prop: `chargeItemAmounts.${item.chargeItemName}`
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '合计',
|
||||||
|
prop: 'totalAmount'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
exportToExcel(ArrearsDetailList.value, columns, `预收费用余额详细_${new Date().getTime()}`);
|
||||||
|
} catch (error) {
|
||||||
|
proxy?.$modal.msgError('导出失败,请重试');
|
||||||
|
console.error('导出错误:', error);
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
|
}, 100);
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
getHouseUseList();
|
||||||
|
getAllVillage();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-table {
|
||||||
|
height: calc(100% - 80px);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -118,19 +118,7 @@ const data = reactive({
|
|||||||
endTime: '',
|
endTime: '',
|
||||||
houseNo: '',
|
houseNo: '',
|
||||||
month: '-1'
|
month: '-1'
|
||||||
},
|
}
|
||||||
rule: [
|
|
||||||
{
|
|
||||||
validator: (_: any, value: string, callback: (arg0?: Error) => any) => {
|
|
||||||
if (value === '' || value === undefined || value === null) {
|
|
||||||
return callback();
|
|
||||||
}
|
|
||||||
if (!validator(value, 'fullFilterReg')) {
|
|
||||||
return callback(new Error('请输入正确的房号'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const { queryParams } = toRefs(data);
|
const { queryParams } = toRefs(data);
|
||||||
|
|||||||
@@ -94,19 +94,7 @@ const data = reactive({
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
villageId: '-1',
|
villageId: '-1',
|
||||||
chargeTypeId: '-1'
|
chargeTypeId: '-1'
|
||||||
},
|
}
|
||||||
rule: [
|
|
||||||
{
|
|
||||||
validator: (_: any, value: string, callback: (arg0?: Error) => any) => {
|
|
||||||
if (value === '' || value === undefined || value === null) {
|
|
||||||
return callback();
|
|
||||||
}
|
|
||||||
if (!validator(value, 'fullFilterReg')) {
|
|
||||||
return callback(new Error('请输入正确的房号'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const { queryParams } = toRefs(data);
|
const { queryParams } = toRefs(data);
|
||||||
|
|||||||
@@ -103,19 +103,7 @@ const data = reactive({
|
|||||||
startDate: '',
|
startDate: '',
|
||||||
endDate: '',
|
endDate: '',
|
||||||
chargeTypeId: '-1'
|
chargeTypeId: '-1'
|
||||||
},
|
}
|
||||||
rule: [
|
|
||||||
{
|
|
||||||
validator: (_: any, value: string, callback: (arg0?: Error) => any) => {
|
|
||||||
if (value === '' || value === undefined || value === null) {
|
|
||||||
return callback();
|
|
||||||
}
|
|
||||||
if (!validator(value, 'fullFilterReg')) {
|
|
||||||
return callback(new Error('请输入正确的房号'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const { queryParams } = toRefs(data);
|
const { queryParams } = toRefs(data);
|
||||||
|
|||||||
@@ -102,19 +102,7 @@ const data = reactive({
|
|||||||
startTime: '',
|
startTime: '',
|
||||||
endTime: '',
|
endTime: '',
|
||||||
chargeTypeId: '-1'
|
chargeTypeId: '-1'
|
||||||
},
|
}
|
||||||
rule: [
|
|
||||||
{
|
|
||||||
validator: (_: any, value: string, callback: (arg0?: Error) => any) => {
|
|
||||||
if (value === '' || value === undefined || value === null) {
|
|
||||||
return callback();
|
|
||||||
}
|
|
||||||
if (!validator(value, 'fullFilterReg')) {
|
|
||||||
return callback(new Error('请输入正确的房号'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const { queryParams } = toRefs(data);
|
const { queryParams } = toRefs(data);
|
||||||
|
|||||||
@@ -70,8 +70,6 @@ import pagination from '@/components/Pagination/index.vue';
|
|||||||
import pageHeader from '@/components/Pageheader/index.vue';
|
import pageHeader from '@/components/Pageheader/index.vue';
|
||||||
import { getCommunitylistAPI } from '@/api/system/community';
|
import { getCommunitylistAPI } from '@/api/system/community';
|
||||||
import { validator } from '@/utils/Reg';
|
import { validator } from '@/utils/Reg';
|
||||||
import { getPaidInExpensesReceivableList } from '@/api/system/report/paidInExpensesReceivable';
|
|
||||||
import { Detail } from '@/api/system/report/paidInExpensesReceivable/type';
|
|
||||||
import { listChargeType } from '@/api/system/ChargeType';
|
import { listChargeType } from '@/api/system/ChargeType';
|
||||||
import { ColumnConfig, exportToExcel } from '@/utils/xlsx';
|
import { ColumnConfig, exportToExcel } from '@/utils/xlsx';
|
||||||
import { getPrepaidBalanceList } from '@/api/system/report/prepaidBalance';
|
import { getPrepaidBalanceList } from '@/api/system/report/prepaidBalance';
|
||||||
@@ -79,7 +77,7 @@ import { listHouseUseType } from '@/api/system/houseUse';
|
|||||||
import { Row } from '@/api/system/report/prepaidBalance/type';
|
import { Row } from '@/api/system/report/prepaidBalance/type';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
// ╬╬╬2╬╬
|
||||||
const ArrearsDetailList = ref<Row[]>([]);
|
const ArrearsDetailList = ref<Row[]>([]);
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
const showSearch = ref(true);
|
const showSearch = ref(true);
|
||||||
@@ -93,19 +91,7 @@ const data = reactive({
|
|||||||
villageId: '',
|
villageId: '',
|
||||||
houseUseTypeId: '',
|
houseUseTypeId: '',
|
||||||
chargeTypeId: ''
|
chargeTypeId: ''
|
||||||
},
|
}
|
||||||
rule: [
|
|
||||||
{
|
|
||||||
validator: (_: any, value: string, callback: (arg0?: Error) => any) => {
|
|
||||||
if (value === '' || value === undefined || value === null) {
|
|
||||||
return callback();
|
|
||||||
}
|
|
||||||
if (!validator(value, 'fullFilterReg')) {
|
|
||||||
return callback(new Error('请输入正确的房号'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const { queryParams } = toRefs(data);
|
const { queryParams } = toRefs(data);
|
||||||
@@ -187,14 +173,8 @@ const handleExport = () => {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
try {
|
try {
|
||||||
const columns: ColumnConfig[] = [
|
const columns: ColumnConfig[] = [
|
||||||
{
|
{ label: '小区名称', prop: 'villageName' },
|
||||||
label: '小区名称',
|
{ label: '房屋类型', prop: 'houseTypeName' },
|
||||||
prop: 'villageName'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '房屋类型',
|
|
||||||
prop: 'houseTypeName'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '收费项目',
|
label: '收费项目',
|
||||||
prop: 'chargeItemAmounts',
|
prop: 'chargeItemAmounts',
|
||||||
@@ -212,7 +192,7 @@ const handleExport = () => {
|
|||||||
prop: 'totalAmount'
|
prop: 'totalAmount'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
exportToExcel(ArrearsDetailList.value, columns, `应收物业费详情_${new Date().getTime()}`);
|
exportToExcel(ArrearsDetailList.value, columns, `预收费用余额汇总_${new Date().getTime()}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
proxy?.$modal.msgError('导出失败,请重试');
|
proxy?.$modal.msgError('导出失败,请重试');
|
||||||
console.error('导出错误:', error);
|
console.error('导出错误:', error);
|
||||||
|
|||||||
211
src/views/system/report/prepaidBalanceDetail.vue
Normal file
211
src/views/system/report/prepaidBalanceDetail.vue
Normal file
@@ -0,0 +1,211 @@
|
|||||||
|
<template>
|
||||||
|
<div class="p-2 h-full flex flex-col">
|
||||||
|
<pageHeader></pageHeader>
|
||||||
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
|
<div class="flex justify-between">
|
||||||
|
<div>
|
||||||
|
<el-form-item label="项目" prop="chargeItemId">
|
||||||
|
<el-select v-model="queryParams.villageId" placeholder="请选择">
|
||||||
|
<el-option v-for="item in villageList" :key="item.villageId" :label="item.villageName" :value="item.villageId" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="房屋类型" prop="houseUseTypeId">
|
||||||
|
<el-select v-model="queryParams.houseUseTypeId" placeholder="请选择">
|
||||||
|
<el-option v-for="item in houseUseList" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="客户" prop="customerName">
|
||||||
|
<el-input v-model.trim="queryParams.customerName"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" @click="handleQuery">查询</el-button>
|
||||||
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
|
||||||
|
<el-card shadow="never" class="flex-1">
|
||||||
|
<template #header>
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="5">
|
||||||
|
<span> 预收费用余额汇总 </span>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="18"></el-col>
|
||||||
|
<el-col :span="1">
|
||||||
|
<el-button type="primary" @click="handleExport">导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" border :data="ArrearsDetailList">
|
||||||
|
<el-table-column label="区域" align="center" prop="villageName" />
|
||||||
|
<el-table-column label="房屋类型" align="center" prop="houseTypeName" />
|
||||||
|
<el-table-column label="户号" align="center" prop="houseNo" />
|
||||||
|
<el-table-column label="客户" align="center" prop="customerName" />
|
||||||
|
<el-table-column label="预收账期" align="center" prop="prepaidPeriod" />
|
||||||
|
<el-table-column label="预收月份" align="center" prop="prepaidMonths" />
|
||||||
|
<el-table-column label="收费项目" align="center" prop="chargeItemAmounts">
|
||||||
|
<template #default>
|
||||||
|
<el-table-column :label="item.chargeItemName" align="center" v-for="item in rowChargeTypesList" :key="item">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.chargeItemAmounts[item.chargeItemName] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合计" align="center" prop="totalAmount" />
|
||||||
|
</el-table>
|
||||||
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import pagination from '@/components/Pagination/index.vue';
|
||||||
|
import pageHeader from '@/components/Pageheader/index.vue';
|
||||||
|
import { getCommunitylistAPI } from '@/api/system/community';
|
||||||
|
import { ColumnConfig, exportToExcel } from '@/utils/xlsx';
|
||||||
|
import { listHouseUseType } from '@/api/system/houseUse';
|
||||||
|
import { Row } from '@/api/system/report/prepaidBalance/type';
|
||||||
|
import { getPrepaidBalanceDetailList } from '@/api/system/report/prepaidBalanceDetail';
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
const ArrearsDetailList = ref<Row[]>([]);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
|
||||||
|
const queryFormRef = ref<ElFormInstance>();
|
||||||
|
const data = reactive({
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
villageId: '',
|
||||||
|
houseUseTypeId: '',
|
||||||
|
customerName: ''
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const { queryParams } = toRefs(data);
|
||||||
|
|
||||||
|
// 查询小区
|
||||||
|
const villageList = ref([]);
|
||||||
|
function getAllVillage() {
|
||||||
|
getCommunitylistAPI().then((res) => {
|
||||||
|
villageList.value = [...res.rows];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 房屋类型
|
||||||
|
const houseUseList = ref([]);
|
||||||
|
function getHouseUseList() {
|
||||||
|
listHouseUseType().then((res) => {
|
||||||
|
houseUseList.value = [...res.rows];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const rowChargeTypesList = ref([]);
|
||||||
|
|
||||||
|
/** 查询电抄记录列表 */
|
||||||
|
const getList = async () => {
|
||||||
|
loading.value = true;
|
||||||
|
const search = { ...queryParams.value };
|
||||||
|
// 移除空字符串字段
|
||||||
|
Object.keys(search).forEach((key) => {
|
||||||
|
if (search[key] === '-1') {
|
||||||
|
search[key] = undefined;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
getPrepaidBalanceDetailList(search)
|
||||||
|
.then((res) => {
|
||||||
|
ArrearsDetailList.value = [...res.rows];
|
||||||
|
rowChargeTypesList.value = res.chargeItems;
|
||||||
|
total.value = res.total;
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loading.value = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
const handleQuery = () => {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
const resetQuery = () => {
|
||||||
|
queryFormRef.value?.resetFields();
|
||||||
|
queryParams.value = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
villageId: '-1',
|
||||||
|
houseUseTypeId: '',
|
||||||
|
customerName: ''
|
||||||
|
};
|
||||||
|
handleQuery();
|
||||||
|
};
|
||||||
|
/** 导出Excel */
|
||||||
|
const handleExport = () => {
|
||||||
|
if (ArrearsDetailList.value.length === 0) {
|
||||||
|
proxy?.$modal.msgWarning('没有可导出的数据');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 显示加载提示
|
||||||
|
loading.value = true;
|
||||||
|
// 使用 setTimeout 让出主线程,避免阻塞UI
|
||||||
|
setTimeout(() => {
|
||||||
|
try {
|
||||||
|
const columns: ColumnConfig[] = [
|
||||||
|
{ label: '小区名称', prop: 'villageName' },
|
||||||
|
{ label: '房屋类型', prop: 'houseTypeName' },
|
||||||
|
{ label: '户号', prop: 'houseNo' },
|
||||||
|
{ label: '客户', prop: 'customerName' },
|
||||||
|
{ label: '预收账期', prop: 'prepaidPeriod' },
|
||||||
|
{ label: '预收月份', prop: 'prepaidMonths' },
|
||||||
|
{
|
||||||
|
label: '收费项目',
|
||||||
|
prop: 'chargeItemAmounts',
|
||||||
|
children: [
|
||||||
|
...rowChargeTypesList.value.map((item) => {
|
||||||
|
return {
|
||||||
|
label: item.chargeItemName,
|
||||||
|
prop: `chargeItemAmounts.${item.chargeItemName}`
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '合计',
|
||||||
|
prop: 'totalAmount'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
exportToExcel(ArrearsDetailList.value, columns, `预收费用余额详细_${new Date().getTime()}`);
|
||||||
|
} catch (error) {
|
||||||
|
proxy?.$modal.msgError('导出失败,请重试');
|
||||||
|
console.error('导出错误:', error);
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
|
}, 100);
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
getHouseUseList();
|
||||||
|
getAllVillage();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-table {
|
||||||
|
height: calc(100% - 80px);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user