mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 13:26:39 +08:00
v1.9 优化群里网友反馈的报表部分查询条件bug
This commit is contained in:
parent
7b1e3831c3
commit
baee472144
@ -35,6 +35,23 @@ export function exportData(params) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询楼栋列表
|
||||
export function queryFloors(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
params.communityId = getCommunityId()
|
||||
request({
|
||||
url: '/floor.queryFloors',
|
||||
method: 'get',
|
||||
params
|
||||
}).then(response => {
|
||||
const res = response.data
|
||||
resolve(res.apiFloorDataVoList || [])
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// 查询单元列表
|
||||
export function queryUnits(params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
@ -45,7 +62,7 @@ export function queryUnits(params) {
|
||||
params
|
||||
}).then(response => {
|
||||
const res = response.data
|
||||
resolve(res)
|
||||
resolve(res || [])
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
})
|
||||
|
||||
@ -205,5 +205,10 @@ export default [
|
||||
name: '/pages/property/itemReleaseFinish',
|
||||
component: () => import('@/views/resource/itemReleaseFinishList.vue')
|
||||
},
|
||||
{
|
||||
path: '/views/resource/printPurchaseApply',
|
||||
name: '/views/resource/printPurchaseApply',
|
||||
component: () => import('@/views/resource/printPurchaseApply.vue')
|
||||
},
|
||||
|
||||
]
|
||||
@ -17,13 +17,13 @@
|
||||
<el-select v-model="searchForm.unitId" :placeholder="$t('reportNoFeeRoom.search.unit')"
|
||||
@change="handleUnitChange" style="width:100%">
|
||||
<el-option v-for="item in units" :key="item.unitId"
|
||||
:label="`${item.unitNum}${$t('reportNoFeeRoom.search.unit')}`" :value="item.unitId" />
|
||||
:label="`${item.unitNum}`" :value="item.unitId" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="searchForm.roomId" :placeholder="$t('reportNoFeeRoom.search.room')" style="width:100%">
|
||||
<el-option v-for="item in rooms" :key="item.roomId"
|
||||
:label="`${item.roomNum}${$t('reportNoFeeRoom.search.room')}`" :value="item.roomId" />
|
||||
:label="`${item.roomNum}`" :value="item.roomId" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
|
||||
@ -1,75 +1,71 @@
|
||||
<template>
|
||||
<div class="report-owner-pay-fee-container animated fadeInRight">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-card>
|
||||
<div slot="header" class="flex justify-between">
|
||||
<span>{{ $t('reportOwnerPayFee.queryCondition') }}</span>
|
||||
<div style="float: right;">
|
||||
<el-button type="text" @click="_moreCondition()">
|
||||
{{ reportOwnerPayFeeInfo.moreCondition ? $t('common.hide') : $t('common.more') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-select v-model="reportOwnerPayFeeInfo.conditions.feeTypeCd"
|
||||
:placeholder="$t('reportOwnerPayFee.selectFeeType')" @change="_changeReporficientFeeTypeCd"
|
||||
style="width:100%">
|
||||
<el-option v-for="(item, index) in reportOwnerPayFeeInfo.feeTypeCds" :key="index" :label="item.name"
|
||||
:value="item.statusCd">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="reportOwnerPayFeeInfo.conditions.configId"
|
||||
:placeholder="$t('reportOwnerPayFee.selectFeeItem')" style="width:100%">
|
||||
<el-option v-for="(item, index) in reportOwnerPayFeeInfo.feeConfigDtos" :key="index" :label="item.feeName"
|
||||
:value="item.configId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-input v-model="reportOwnerPayFeeInfo.conditions.roomName"
|
||||
:placeholder="$t('reportOwnerPayFee.inputRoomNum')" @input="_meterInputRoom">
|
||||
<input-search-room slot="append" ref="inputSearchRoom"></input-search-room>
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-input v-model="reportOwnerPayFeeInfo.conditions.ownerName"
|
||||
:placeholder="$t('reportOwnerPayFee.inputOwnerName')" @input="_meterInputOwner">
|
||||
<input-search-owner slot="append" ref="inputSearchOwner"></input-search-owner>
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary" @click="_queryMethod">
|
||||
<i class="el-icon-search"></i>
|
||||
{{ $t('common.search') }}
|
||||
</el-button>
|
||||
<el-button @click="_resetMethod">
|
||||
<i class="el-icon-refresh"></i>
|
||||
{{ $t('common.reset') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" v-show="reportOwnerPayFeeInfo.moreCondition">
|
||||
<el-col :span="4">
|
||||
<el-input v-model="reportOwnerPayFeeInfo.conditions.pfYear"
|
||||
:placeholder="$t('reportOwnerPayFee.inputYear')">
|
||||
</el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-top:20px;">
|
||||
<el-card>
|
||||
<div slot="header" class="flex justify-between">
|
||||
<span>{{ $t('reportOwnerPayFee.queryCondition') }}</span>
|
||||
<div style="float: right;">
|
||||
<el-button type="text" @click="_moreCondition()">
|
||||
{{ reportOwnerPayFeeInfo.moreCondition ? $t('common.hide') : $t('common.more') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-select v-model="reportOwnerPayFeeInfo.conditions.feeTypeCd"
|
||||
:placeholder="$t('reportOwnerPayFee.selectFeeType')" @change="_changeReporficientFeeTypeCd"
|
||||
style="width:100%">
|
||||
<el-option v-for="(item, index) in reportOwnerPayFeeInfo.feeTypeCds" :key="index" :label="item.name"
|
||||
:value="item.statusCd">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="reportOwnerPayFeeInfo.conditions.configId"
|
||||
:placeholder="$t('reportOwnerPayFee.selectFeeItem')" style="width:100%">
|
||||
<el-option v-for="(item, index) in reportOwnerPayFeeInfo.feeConfigDtos" :key="index" :label="item.feeName"
|
||||
:value="item.configId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-input v-model="reportOwnerPayFeeInfo.conditions.roomName"
|
||||
:placeholder="$t('reportOwnerPayFee.inputRoomNum')">
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-input v-model="reportOwnerPayFeeInfo.conditions.ownerName"
|
||||
:placeholder="$t('reportOwnerPayFee.inputOwnerName')">
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary" @click="_queryMethod">
|
||||
<i class="el-icon-search"></i>
|
||||
{{ $t('common.search') }}
|
||||
</el-button>
|
||||
<el-button @click="_resetMethod">
|
||||
<i class="el-icon-refresh"></i>
|
||||
{{ $t('common.reset') }}
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" v-show="reportOwnerPayFeeInfo.moreCondition">
|
||||
<el-col :span="4">
|
||||
<el-input v-model="reportOwnerPayFeeInfo.conditions.pfYear" :placeholder="$t('reportOwnerPayFee.inputYear')">
|
||||
</el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-row style="">
|
||||
<el-col :span="24">
|
||||
<el-card>
|
||||
<div slot="header" class="flex justify-between">
|
||||
<div>
|
||||
<span>{{ $t('reportOwnerPayFee.paymentDetails') }}</span>
|
||||
<el-tooltip class="item" effect="dark" :content="$t('reportOwnerPayFee.paymentDetailsTip')" placement="top">
|
||||
<el-tooltip class="item" effect="dark" :content="$t('reportOwnerPayFee.paymentDetailsTip')"
|
||||
placement="top">
|
||||
<i class="el-icon-info" style="cursor:pointer;"></i>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@ -113,15 +109,11 @@
|
||||
<script>
|
||||
import { queryReportOwnerPayFee, listFeeConfigs } from '@/api/report/reportOwnerPayFeeApi'
|
||||
import { getDict } from '@/api/community/communityApi'
|
||||
import InputSearchRoom from '@/components/report/InputSearchRoom'
|
||||
import InputSearchOwner from '@/components/report/InputSearchOwner'
|
||||
import { getCommunityId } from '@/api/community/communityApi'
|
||||
|
||||
export default {
|
||||
name: 'ReportOwnerPayFeeList',
|
||||
components: {
|
||||
InputSearchRoom,
|
||||
InputSearchOwner
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -218,8 +210,8 @@ export default {
|
||||
valid: '1'
|
||||
}
|
||||
|
||||
const { data } = await listFeeConfigs(params)
|
||||
this.reportOwnerPayFeeInfo.feeConfigDtos = data
|
||||
const { feeConfigs } = await listFeeConfigs(params)
|
||||
this.reportOwnerPayFeeInfo.feeConfigDtos = feeConfigs
|
||||
} catch (error) {
|
||||
console.error('获取收费项失败:', error)
|
||||
}
|
||||
|
||||
@ -9,19 +9,19 @@
|
||||
<el-col :span="24">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="4">
|
||||
<el-input v-model="conditions.floorName" :placeholder="$t('reportPayFeeDeposit.search.floorName')"
|
||||
class="search-item">
|
||||
<el-button slot="append" icon="el-icon-search" @click="openChooseFloor">
|
||||
{{ $t('reportPayFeeDeposit.search.choose') }}
|
||||
</el-button>
|
||||
</el-input>
|
||||
<el-select v-model="conditions.floorId" :placeholder="$t('reportPayFeeDeposit.search.floorName')"
|
||||
@change="handleFloorChange" class="search-item" style="width:100%">
|
||||
<el-option :label="$t('reportPayFeeDeposit.search.floorName')" value=""></el-option>
|
||||
<el-option v-for="item in floors" :key="item.floorId" :label="item.floorName" :value="item.floorId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="conditions.unitId" :placeholder="$t('reportPayFeeDeposit.search.unit')"
|
||||
class="search-item" style="width:100%">
|
||||
<el-option :label="$t('reportPayFeeDeposit.search.unitPlaceholder')" value=""></el-option>
|
||||
<el-option v-for="(unit, index) in roomUnits" :key="index"
|
||||
:label="unit.unitNum + $t('reportPayFeeDeposit.search.unit')" :value="unit.unitId">
|
||||
:label="unit.unitNum" :value="unit.unitId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
@ -213,30 +213,22 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<!-- 选择楼栋组件 -->
|
||||
<search-floor ref="searchFloor" @chooseFloor="handleChooseFloor"></search-floor>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCommunityId } from '@/api/community/communityApi'
|
||||
import { getDict } from '@/api/community/communityApi'
|
||||
import { queryPayFeeDeposit, exportData } from '@/api/report/reportPayFeeDepositApi'
|
||||
import SearchFloor from '@/components/room/searchFloor'
|
||||
import { queryPayFeeDeposit, queryFloors, queryUnits, exportData } from '@/api/report/reportPayFeeDepositApi'
|
||||
|
||||
export default {
|
||||
name: 'ReportPayFeeDepositList',
|
||||
components: {
|
||||
SearchFloor
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
communityId: '',
|
||||
conditions: {
|
||||
floorId: '',
|
||||
floorName: '',
|
||||
roomNum: '',
|
||||
unitId: '',
|
||||
feeId: '',
|
||||
@ -256,6 +248,7 @@ export default {
|
||||
states: [],
|
||||
payerObjTypes: [],
|
||||
detailStates: [],
|
||||
floors: [],
|
||||
roomUnits: [],
|
||||
sumTotal: {
|
||||
unpaidfeeAmount: 0,
|
||||
@ -289,7 +282,8 @@ export default {
|
||||
await Promise.all([
|
||||
this.getDictData('pay_fee', 'state'),
|
||||
this.getDictData('pay_fee', 'payer_obj_type'),
|
||||
this.getDictData('pay_fee_detail', 'state')
|
||||
this.getDictData('pay_fee_detail', 'state'),
|
||||
this.loadFloors()
|
||||
])
|
||||
this.listFees()
|
||||
} catch (error) {
|
||||
@ -331,17 +325,45 @@ export default {
|
||||
this.loading = false
|
||||
}
|
||||
},
|
||||
async loadFloors() {
|
||||
try {
|
||||
const params = {
|
||||
page: 1,
|
||||
row: 100,
|
||||
communityId: this.communityId
|
||||
}
|
||||
const data = await queryFloors(params)
|
||||
this.floors = data
|
||||
} catch (error) {
|
||||
console.error('加载楼栋数据失败:', error)
|
||||
}
|
||||
},
|
||||
async loadUnits(floorId) {
|
||||
try {
|
||||
const res = await this.$api.unit.queryUnits({
|
||||
const params = {
|
||||
floorId,
|
||||
communityId: this.communityId
|
||||
})
|
||||
this.roomUnits = res.data || []
|
||||
communityId: this.communityId,
|
||||
page: 1,
|
||||
row: 100
|
||||
}
|
||||
const data = await queryUnits(params)
|
||||
this.roomUnits = data || []
|
||||
} catch (error) {
|
||||
console.error('获取单元列表失败:', error)
|
||||
}
|
||||
},
|
||||
async handleFloorChange(floorId) {
|
||||
try {
|
||||
this.conditions.unitId = ''
|
||||
this.roomUnits = []
|
||||
|
||||
if (!floorId) return
|
||||
|
||||
await this.loadUnits(floorId)
|
||||
} catch (error) {
|
||||
console.error('楼栋变化处理失败:', error)
|
||||
}
|
||||
},
|
||||
queryMethod() {
|
||||
this.page.current = 1
|
||||
this.listFees()
|
||||
@ -349,7 +371,6 @@ export default {
|
||||
resetMethod() {
|
||||
this.conditions = {
|
||||
floorId: '',
|
||||
floorName: '',
|
||||
roomNum: '',
|
||||
unitId: '',
|
||||
feeId: '',
|
||||
@ -364,6 +385,7 @@ export default {
|
||||
page: 1,
|
||||
row: 10
|
||||
}
|
||||
this.roomUnits = []
|
||||
this.listFees()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
@ -374,14 +396,6 @@ export default {
|
||||
this.page.current = val
|
||||
this.listFees()
|
||||
},
|
||||
openChooseFloor() {
|
||||
this.$refs.searchFloor.open()
|
||||
},
|
||||
handleChooseFloor(floor) {
|
||||
this.conditions.floorId = floor.floorId
|
||||
this.conditions.floorName = floor.floorName
|
||||
this.loadUnits(floor.floorId)
|
||||
},
|
||||
async exportFee() {
|
||||
try {
|
||||
this.conditions.pagePath = 'reportPayFeeDeposit'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user