Compare commits

...

2 Commits

Author SHA1 Message Date
wuxw
96574778d8 优化代码 2025-12-26 09:44:06 +08:00
wuxw
4c6155bee3 优化代码 2025-12-26 08:38:44 +08:00
3 changed files with 47 additions and 7 deletions

View File

@ -19,6 +19,8 @@ export function queryReportFeeSummary(params) {
})
}
/**
* 查询楼栋费用汇总数据
* @param {Object} params 查询参数

View File

@ -246,14 +246,52 @@ export default {
params.configIds = this.reportFeeSummaryInfo.configIds.join(',');
}
const { data } = await queryReportFeeSummary(params)
this.reportFeeSummaryInfo.fees = data
//
const queryTypes = [
'roomCount',
'feeRoomCount',
'oweRoomCount',
'hisOweFee',
'curOweFee',
'curReceivableFee',
'hisReceivedFee',
'preReceivedFee',
'receivedFee'
]
// Notify child components
this.$refs.floorFeeSummary.notify(params)
this.$refs.configFeeSummary.notify(params)
//
const mergedResult = {}
//
for (const queryType of queryTypes) {
try {
const queryParams = { ...params, queryType }
const { data } = await queryReportFeeSummary(queryParams)
if (data && data.length > 0 && data[0]) {
//
Object.assign(mergedResult, data[0])
}
} catch (error) {
console.error(`Failed to query ${queryType}:`, error)
//
const fieldName = queryType === 'roomCount' || queryType === 'feeRoomCount' || queryType === 'oweRoomCount' ? queryType : queryType
mergedResult[fieldName] = queryType.includes('Count') ? 0 : 0.00
}
}
//
this.reportFeeSummaryInfo.fees = [mergedResult]
//
if (this.$refs.floorFeeSummary) {
this.$refs.floorFeeSummary.notify(params)
}
if (this.$refs.configFeeSummary) {
this.$refs.configFeeSummary.notify(params)
}
} catch (error) {
console.error('Failed to query fee summary:', error)
this.$message.error(this.$t('reportFeeSummary.queryFailed') || '查询失败,请稍后重试')
}
},
async _loadStaffCommunitys() {

View File

@ -44,8 +44,8 @@ export default {
logo: '',
companyName:'',
loginForm: {
username: '',
passwd: '',
username: 'wuxw',
passwd: 'admin',
validateCode: ''
},
captchaUrl: '',