8/19 报表-租赁管理
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户" prop="customerName">
|
||||
<el-input v-model.trim="queryParams.customerName"></el-input>
|
||||
<el-input v-model.trim="queryParams.customerName" placeholder="请输入客户姓名"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div>
|
||||
@@ -153,49 +153,62 @@ const resetQuery = () => {
|
||||
handleQuery();
|
||||
};
|
||||
/** 导出Excel */
|
||||
const handleExport = () => {
|
||||
const handleExport = async () => {
|
||||
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;
|
||||
const search = { ...queryParams.value, pageNum: undefined, pageSize: undefined };
|
||||
// 移除空字符串字段
|
||||
Object.keys(search).forEach((key) => {
|
||||
if (search[key] === '-1') {
|
||||
search[key] = undefined;
|
||||
}
|
||||
}, 100);
|
||||
});
|
||||
loading.value = true;
|
||||
try {
|
||||
// const res = await getPrepaidBalanceDetailList(search);
|
||||
// ArrearsDetailList.value = [...res.rows];
|
||||
// 显示加载提示
|
||||
// 使用 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);
|
||||
} catch (error) {
|
||||
loading.value = false;
|
||||
proxy?.$modal.msgError('导出失败,请重试');
|
||||
}
|
||||
};
|
||||
onMounted(() => {
|
||||
getList();
|
||||
|
||||
Reference in New Issue
Block a user