Commit baee4721446417950308bf1fcba051f0ea7ae6f6

Authored by wuxw
1 parent 7b1e3831

v1.9 优化群里网友反馈的报表部分查询条件bug

src/api/report/reportPayFeeDepositApi.js
@@ -35,6 +35,23 @@ export function exportData(params) { @@ -35,6 +35,23 @@ export function exportData(params) {
35 }) 35 })
36 } 36 }
37 37
  38 +// 查询楼栋列表
  39 +export function queryFloors(params) {
  40 + return new Promise((resolve, reject) => {
  41 + params.communityId = getCommunityId()
  42 + request({
  43 + url: '/floor.queryFloors',
  44 + method: 'get',
  45 + params
  46 + }).then(response => {
  47 + const res = response.data
  48 + resolve(res.apiFloorDataVoList || [])
  49 + }).catch(error => {
  50 + reject(error)
  51 + })
  52 + })
  53 +}
  54 +
38 // 查询单元列表 55 // 查询单元列表
39 export function queryUnits(params) { 56 export function queryUnits(params) {
40 return new Promise((resolve, reject) => { 57 return new Promise((resolve, reject) => {
@@ -45,7 +62,7 @@ export function queryUnits(params) { @@ -45,7 +62,7 @@ export function queryUnits(params) {
45 params 62 params
46 }).then(response => { 63 }).then(response => {
47 const res = response.data 64 const res = response.data
48 - resolve(res) 65 + resolve(res || [])
49 }).catch(error => { 66 }).catch(error => {
50 reject(error) 67 reject(error)
51 }) 68 })
src/router/resourceRouter.js
@@ -205,5 +205,10 @@ export default [ @@ -205,5 +205,10 @@ export default [
205 name: '/pages/property/itemReleaseFinish', 205 name: '/pages/property/itemReleaseFinish',
206 component: () => import('@/views/resource/itemReleaseFinishList.vue') 206 component: () => import('@/views/resource/itemReleaseFinishList.vue')
207 }, 207 },
  208 + {
  209 + path: '/views/resource/printPurchaseApply',
  210 + name: '/views/resource/printPurchaseApply',
  211 + component: () => import('@/views/resource/printPurchaseApply.vue')
  212 + },
208 213
209 ] 214 ]
210 \ No newline at end of file 215 \ No newline at end of file
src/views/report/reportNoFeeRoomList.vue
@@ -17,13 +17,13 @@ @@ -17,13 +17,13 @@
17 <el-select v-model="searchForm.unitId" :placeholder="$t('reportNoFeeRoom.search.unit')" 17 <el-select v-model="searchForm.unitId" :placeholder="$t('reportNoFeeRoom.search.unit')"
18 @change="handleUnitChange" style="width:100%"> 18 @change="handleUnitChange" style="width:100%">
19 <el-option v-for="item in units" :key="item.unitId" 19 <el-option v-for="item in units" :key="item.unitId"
20 - :label="`${item.unitNum}${$t('reportNoFeeRoom.search.unit')}`" :value="item.unitId" /> 20 + :label="`${item.unitNum}`" :value="item.unitId" />
21 </el-select> 21 </el-select>
22 </el-col> 22 </el-col>
23 <el-col :span="4"> 23 <el-col :span="4">
24 <el-select v-model="searchForm.roomId" :placeholder="$t('reportNoFeeRoom.search.room')" style="width:100%"> 24 <el-select v-model="searchForm.roomId" :placeholder="$t('reportNoFeeRoom.search.room')" style="width:100%">
25 <el-option v-for="item in rooms" :key="item.roomId" 25 <el-option v-for="item in rooms" :key="item.roomId"
26 - :label="`${item.roomNum}${$t('reportNoFeeRoom.search.room')}`" :value="item.roomId" /> 26 + :label="`${item.roomNum}`" :value="item.roomId" />
27 </el-select> 27 </el-select>
28 </el-col> 28 </el-col>
29 <el-col :span="4"> 29 <el-col :span="4">
src/views/report/reportOwnerPayFeeList.vue
1 <template> 1 <template>
2 <div class="report-owner-pay-fee-container animated fadeInRight"> 2 <div class="report-owner-pay-fee-container animated fadeInRight">
3 - <el-row>  
4 - <el-col :span="24">  
5 - <el-card>  
6 - <div slot="header" class="flex justify-between">  
7 - <span>{{ $t('reportOwnerPayFee.queryCondition') }}</span>  
8 - <div style="float: right;">  
9 - <el-button type="text" @click="_moreCondition()">  
10 - {{ reportOwnerPayFeeInfo.moreCondition ? $t('common.hide') : $t('common.more') }}  
11 - </el-button>  
12 - </div>  
13 - </div>  
14 - <el-row :gutter="20">  
15 - <el-col :span="4">  
16 - <el-select v-model="reportOwnerPayFeeInfo.conditions.feeTypeCd"  
17 - :placeholder="$t('reportOwnerPayFee.selectFeeType')" @change="_changeReporficientFeeTypeCd"  
18 - style="width:100%">  
19 - <el-option v-for="(item, index) in reportOwnerPayFeeInfo.feeTypeCds" :key="index" :label="item.name"  
20 - :value="item.statusCd">  
21 - </el-option>  
22 - </el-select>  
23 - </el-col>  
24 - <el-col :span="4">  
25 - <el-select v-model="reportOwnerPayFeeInfo.conditions.configId"  
26 - :placeholder="$t('reportOwnerPayFee.selectFeeItem')" style="width:100%">  
27 - <el-option v-for="(item, index) in reportOwnerPayFeeInfo.feeConfigDtos" :key="index" :label="item.feeName"  
28 - :value="item.configId">  
29 - </el-option>  
30 - </el-select>  
31 - </el-col>  
32 - <el-col :span="4">  
33 - <el-input v-model="reportOwnerPayFeeInfo.conditions.roomName"  
34 - :placeholder="$t('reportOwnerPayFee.inputRoomNum')" @input="_meterInputRoom">  
35 - <input-search-room slot="append" ref="inputSearchRoom"></input-search-room>  
36 - </el-input>  
37 - </el-col>  
38 - <el-col :span="4">  
39 - <el-input v-model="reportOwnerPayFeeInfo.conditions.ownerName"  
40 - :placeholder="$t('reportOwnerPayFee.inputOwnerName')" @input="_meterInputOwner">  
41 - <input-search-owner slot="append" ref="inputSearchOwner"></input-search-owner>  
42 - </el-input>  
43 - </el-col>  
44 - <el-col :span="4">  
45 - <el-button type="primary" @click="_queryMethod">  
46 - <i class="el-icon-search"></i>  
47 - {{ $t('common.search') }}  
48 - </el-button>  
49 - <el-button @click="_resetMethod">  
50 - <i class="el-icon-refresh"></i>  
51 - {{ $t('common.reset') }}  
52 - </el-button>  
53 - </el-col>  
54 - </el-row>  
55 - <el-row :gutter="20" v-show="reportOwnerPayFeeInfo.moreCondition">  
56 - <el-col :span="4">  
57 - <el-input v-model="reportOwnerPayFeeInfo.conditions.pfYear"  
58 - :placeholder="$t('reportOwnerPayFee.inputYear')">  
59 - </el-input>  
60 - </el-col>  
61 - </el-row>  
62 - </el-card>  
63 - </el-col>  
64 - </el-row>  
65 3
66 - <el-row style="margin-top:20px;"> 4 + <el-card>
  5 + <div slot="header" class="flex justify-between">
  6 + <span>{{ $t('reportOwnerPayFee.queryCondition') }}</span>
  7 + <div style="float: right;">
  8 + <el-button type="text" @click="_moreCondition()">
  9 + {{ reportOwnerPayFeeInfo.moreCondition ? $t('common.hide') : $t('common.more') }}
  10 + </el-button>
  11 + </div>
  12 + </div>
  13 + <el-row :gutter="20">
  14 + <el-col :span="4">
  15 + <el-select v-model="reportOwnerPayFeeInfo.conditions.feeTypeCd"
  16 + :placeholder="$t('reportOwnerPayFee.selectFeeType')" @change="_changeReporficientFeeTypeCd"
  17 + style="width:100%">
  18 + <el-option v-for="(item, index) in reportOwnerPayFeeInfo.feeTypeCds" :key="index" :label="item.name"
  19 + :value="item.statusCd">
  20 + </el-option>
  21 + </el-select>
  22 + </el-col>
  23 + <el-col :span="4">
  24 + <el-select v-model="reportOwnerPayFeeInfo.conditions.configId"
  25 + :placeholder="$t('reportOwnerPayFee.selectFeeItem')" style="width:100%">
  26 + <el-option v-for="(item, index) in reportOwnerPayFeeInfo.feeConfigDtos" :key="index" :label="item.feeName"
  27 + :value="item.configId">
  28 + </el-option>
  29 + </el-select>
  30 + </el-col>
  31 + <el-col :span="4">
  32 + <el-input v-model="reportOwnerPayFeeInfo.conditions.roomName"
  33 + :placeholder="$t('reportOwnerPayFee.inputRoomNum')">
  34 + </el-input>
  35 + </el-col>
  36 + <el-col :span="4">
  37 + <el-input v-model="reportOwnerPayFeeInfo.conditions.ownerName"
  38 + :placeholder="$t('reportOwnerPayFee.inputOwnerName')">
  39 + </el-input>
  40 + </el-col>
  41 + <el-col :span="4">
  42 + <el-button type="primary" @click="_queryMethod">
  43 + <i class="el-icon-search"></i>
  44 + {{ $t('common.search') }}
  45 + </el-button>
  46 + <el-button @click="_resetMethod">
  47 + <i class="el-icon-refresh"></i>
  48 + {{ $t('common.reset') }}
  49 + </el-button>
  50 + </el-col>
  51 + </el-row>
  52 + <el-row :gutter="20" v-show="reportOwnerPayFeeInfo.moreCondition">
  53 + <el-col :span="4">
  54 + <el-input v-model="reportOwnerPayFeeInfo.conditions.pfYear" :placeholder="$t('reportOwnerPayFee.inputYear')">
  55 + </el-input>
  56 + </el-col>
  57 + </el-row>
  58 + </el-card>
  59 +
  60 +
  61 + <el-row style="">
67 <el-col :span="24"> 62 <el-col :span="24">
68 <el-card> 63 <el-card>
69 <div slot="header" class="flex justify-between"> 64 <div slot="header" class="flex justify-between">
70 <div> 65 <div>
71 <span>{{ $t('reportOwnerPayFee.paymentDetails') }}</span> 66 <span>{{ $t('reportOwnerPayFee.paymentDetails') }}</span>
72 - <el-tooltip class="item" effect="dark" :content="$t('reportOwnerPayFee.paymentDetailsTip')" placement="top"> 67 + <el-tooltip class="item" effect="dark" :content="$t('reportOwnerPayFee.paymentDetailsTip')"
  68 + placement="top">
73 <i class="el-icon-info" style="cursor:pointer;"></i> 69 <i class="el-icon-info" style="cursor:pointer;"></i>
74 </el-tooltip> 70 </el-tooltip>
75 </div> 71 </div>
@@ -113,15 +109,11 @@ @@ -113,15 +109,11 @@
113 <script> 109 <script>
114 import { queryReportOwnerPayFee, listFeeConfigs } from '@/api/report/reportOwnerPayFeeApi' 110 import { queryReportOwnerPayFee, listFeeConfigs } from '@/api/report/reportOwnerPayFeeApi'
115 import { getDict } from '@/api/community/communityApi' 111 import { getDict } from '@/api/community/communityApi'
116 -import InputSearchRoom from '@/components/report/InputSearchRoom'  
117 -import InputSearchOwner from '@/components/report/InputSearchOwner'  
118 import { getCommunityId } from '@/api/community/communityApi' 112 import { getCommunityId } from '@/api/community/communityApi'
119 113
120 export default { 114 export default {
121 name: 'ReportOwnerPayFeeList', 115 name: 'ReportOwnerPayFeeList',
122 components: { 116 components: {
123 - InputSearchRoom,  
124 - InputSearchOwner  
125 }, 117 },
126 data() { 118 data() {
127 return { 119 return {
@@ -218,8 +210,8 @@ export default { @@ -218,8 +210,8 @@ export default {
218 valid: '1' 210 valid: '1'
219 } 211 }
220 212
221 - const { data } = await listFeeConfigs(params)  
222 - this.reportOwnerPayFeeInfo.feeConfigDtos = data 213 + const { feeConfigs } = await listFeeConfigs(params)
  214 + this.reportOwnerPayFeeInfo.feeConfigDtos = feeConfigs
223 } catch (error) { 215 } catch (error) {
224 console.error('获取收费项失败:', error) 216 console.error('获取收费项失败:', error)
225 } 217 }
src/views/report/reportPayFeeDepositList.vue
@@ -9,19 +9,19 @@ @@ -9,19 +9,19 @@
9 <el-col :span="24"> 9 <el-col :span="24">
10 <el-row :gutter="20"> 10 <el-row :gutter="20">
11 <el-col :span="4"> 11 <el-col :span="4">
12 - <el-input v-model="conditions.floorName" :placeholder="$t('reportPayFeeDeposit.search.floorName')"  
13 - class="search-item">  
14 - <el-button slot="append" icon="el-icon-search" @click="openChooseFloor">  
15 - {{ $t('reportPayFeeDeposit.search.choose') }}  
16 - </el-button>  
17 - </el-input> 12 + <el-select v-model="conditions.floorId" :placeholder="$t('reportPayFeeDeposit.search.floorName')"
  13 + @change="handleFloorChange" class="search-item" style="width:100%">
  14 + <el-option :label="$t('reportPayFeeDeposit.search.floorName')" value=""></el-option>
  15 + <el-option v-for="item in floors" :key="item.floorId" :label="item.floorName" :value="item.floorId">
  16 + </el-option>
  17 + </el-select>
18 </el-col> 18 </el-col>
19 <el-col :span="4"> 19 <el-col :span="4">
20 <el-select v-model="conditions.unitId" :placeholder="$t('reportPayFeeDeposit.search.unit')" 20 <el-select v-model="conditions.unitId" :placeholder="$t('reportPayFeeDeposit.search.unit')"
21 class="search-item" style="width:100%"> 21 class="search-item" style="width:100%">
22 <el-option :label="$t('reportPayFeeDeposit.search.unitPlaceholder')" value=""></el-option> 22 <el-option :label="$t('reportPayFeeDeposit.search.unitPlaceholder')" value=""></el-option>
23 <el-option v-for="(unit, index) in roomUnits" :key="index" 23 <el-option v-for="(unit, index) in roomUnits" :key="index"
24 - :label="unit.unitNum + $t('reportPayFeeDeposit.search.unit')" :value="unit.unitId"> 24 + :label="unit.unitNum" :value="unit.unitId">
25 </el-option> 25 </el-option>
26 </el-select> 26 </el-select>
27 </el-col> 27 </el-col>
@@ -213,30 +213,22 @@ @@ -213,30 +213,22 @@
213 </el-col> 213 </el-col>
214 </el-row> 214 </el-row>
215 </el-card> 215 </el-card>
216 -  
217 - <!-- 选择楼栋组件 -->  
218 - <search-floor ref="searchFloor" @chooseFloor="handleChooseFloor"></search-floor>  
219 </div> 216 </div>
220 </template> 217 </template>
221 218
222 <script> 219 <script>
223 import { getCommunityId } from '@/api/community/communityApi' 220 import { getCommunityId } from '@/api/community/communityApi'
224 import { getDict } from '@/api/community/communityApi' 221 import { getDict } from '@/api/community/communityApi'
225 -import { queryPayFeeDeposit, exportData } from '@/api/report/reportPayFeeDepositApi'  
226 -import SearchFloor from '@/components/room/searchFloor' 222 +import { queryPayFeeDeposit, queryFloors, queryUnits, exportData } from '@/api/report/reportPayFeeDepositApi'
227 223
228 export default { 224 export default {
229 name: 'ReportPayFeeDepositList', 225 name: 'ReportPayFeeDepositList',
230 - components: {  
231 - SearchFloor  
232 - },  
233 data() { 226 data() {
234 return { 227 return {
235 loading: false, 228 loading: false,
236 communityId: '', 229 communityId: '',
237 conditions: { 230 conditions: {
238 floorId: '', 231 floorId: '',
239 - floorName: '',  
240 roomNum: '', 232 roomNum: '',
241 unitId: '', 233 unitId: '',
242 feeId: '', 234 feeId: '',
@@ -256,6 +248,7 @@ export default { @@ -256,6 +248,7 @@ export default {
256 states: [], 248 states: [],
257 payerObjTypes: [], 249 payerObjTypes: [],
258 detailStates: [], 250 detailStates: [],
  251 + floors: [],
259 roomUnits: [], 252 roomUnits: [],
260 sumTotal: { 253 sumTotal: {
261 unpaidfeeAmount: 0, 254 unpaidfeeAmount: 0,
@@ -289,7 +282,8 @@ export default { @@ -289,7 +282,8 @@ export default {
289 await Promise.all([ 282 await Promise.all([
290 this.getDictData('pay_fee', 'state'), 283 this.getDictData('pay_fee', 'state'),
291 this.getDictData('pay_fee', 'payer_obj_type'), 284 this.getDictData('pay_fee', 'payer_obj_type'),
292 - this.getDictData('pay_fee_detail', 'state') 285 + this.getDictData('pay_fee_detail', 'state'),
  286 + this.loadFloors()
293 ]) 287 ])
294 this.listFees() 288 this.listFees()
295 } catch (error) { 289 } catch (error) {
@@ -331,17 +325,45 @@ export default { @@ -331,17 +325,45 @@ export default {
331 this.loading = false 325 this.loading = false
332 } 326 }
333 }, 327 },
  328 + async loadFloors() {
  329 + try {
  330 + const params = {
  331 + page: 1,
  332 + row: 100,
  333 + communityId: this.communityId
  334 + }
  335 + const data = await queryFloors(params)
  336 + this.floors = data
  337 + } catch (error) {
  338 + console.error('加载楼栋数据失败:', error)
  339 + }
  340 + },
334 async loadUnits(floorId) { 341 async loadUnits(floorId) {
335 try { 342 try {
336 - const res = await this.$api.unit.queryUnits({ 343 + const params = {
337 floorId, 344 floorId,
338 - communityId: this.communityId  
339 - })  
340 - this.roomUnits = res.data || [] 345 + communityId: this.communityId,
  346 + page: 1,
  347 + row: 100
  348 + }
  349 + const data = await queryUnits(params)
  350 + this.roomUnits = data || []
341 } catch (error) { 351 } catch (error) {
342 console.error('获取单元列表失败:', error) 352 console.error('获取单元列表失败:', error)
343 } 353 }
344 }, 354 },
  355 + async handleFloorChange(floorId) {
  356 + try {
  357 + this.conditions.unitId = ''
  358 + this.roomUnits = []
  359 +
  360 + if (!floorId) return
  361 +
  362 + await this.loadUnits(floorId)
  363 + } catch (error) {
  364 + console.error('楼栋变化处理失败:', error)
  365 + }
  366 + },
345 queryMethod() { 367 queryMethod() {
346 this.page.current = 1 368 this.page.current = 1
347 this.listFees() 369 this.listFees()
@@ -349,7 +371,6 @@ export default { @@ -349,7 +371,6 @@ export default {
349 resetMethod() { 371 resetMethod() {
350 this.conditions = { 372 this.conditions = {
351 floorId: '', 373 floorId: '',
352 - floorName: '',  
353 roomNum: '', 374 roomNum: '',
354 unitId: '', 375 unitId: '',
355 feeId: '', 376 feeId: '',
@@ -364,6 +385,7 @@ export default { @@ -364,6 +385,7 @@ export default {
364 page: 1, 385 page: 1,
365 row: 10 386 row: 10
366 } 387 }
  388 + this.roomUnits = []
367 this.listFees() 389 this.listFees()
368 }, 390 },
369 handleSizeChange(val) { 391 handleSizeChange(val) {
@@ -374,14 +396,6 @@ export default { @@ -374,14 +396,6 @@ export default {
374 this.page.current = val 396 this.page.current = val
375 this.listFees() 397 this.listFees()
376 }, 398 },
377 - openChooseFloor() {  
378 - this.$refs.searchFloor.open()  
379 - },  
380 - handleChooseFloor(floor) {  
381 - this.conditions.floorId = floor.floorId  
382 - this.conditions.floorName = floor.floorName  
383 - this.loadUnits(floor.floorId)  
384 - },  
385 async exportFee() { 399 async exportFee() {
386 try { 400 try {
387 this.conditions.pagePath = 'reportPayFeeDeposit' 401 this.conditions.pagePath = 'reportPayFeeDeposit'