Commit 814833f5d300d7f7871a71dd9bf152704dee8336
1 parent
9d019fa6
优化费用缴费代码
Showing
21 changed files
with
719 additions
and
392 deletions
src/App.vue
src/api/fee/printOweFeeApi.js
0 → 100644
| 1 | +import request from '@/utils/request' | |
| 2 | + | |
| 3 | +// 查询欠费列表 | |
| 4 | +export function listOweFees(params) { | |
| 5 | + return new Promise((resolve, reject) => { | |
| 6 | + request({ | |
| 7 | + url: '/feeApi/listOweFees', | |
| 8 | + method: 'get', | |
| 9 | + params | |
| 10 | + }).then(response => { | |
| 11 | + const res = response.data | |
| 12 | + resolve(res) | |
| 13 | + }).catch(error => { | |
| 14 | + reject(error) | |
| 15 | + }) | |
| 16 | + }) | |
| 17 | +} | |
| 18 | + | |
| 19 | +// 查询房间信息 | |
| 20 | +export function listRoomsWhereFeeSet(params) { | |
| 21 | + return new Promise((resolve, reject) => { | |
| 22 | + request({ | |
| 23 | + url: '/fee.listRoomsWhereFeeSet', | |
| 24 | + method: 'get', | |
| 25 | + params | |
| 26 | + }).then(response => { | |
| 27 | + const res = response.data | |
| 28 | + resolve(res) | |
| 29 | + }).catch(error => { | |
| 30 | + reject(error) | |
| 31 | + }) | |
| 32 | + }) | |
| 33 | +} | |
| 34 | + | |
| 35 | +// 查询打印规范 | |
| 36 | +export function queryFeePrintSpec(params) { | |
| 37 | + return new Promise((resolve, reject) => { | |
| 38 | + request({ | |
| 39 | + url: '/feePrintSpec/queryFeePrintSpec', | |
| 40 | + method: 'get', | |
| 41 | + params | |
| 42 | + }).then(response => { | |
| 43 | + const res = response.data | |
| 44 | + resolve(res) | |
| 45 | + }).catch(error => { | |
| 46 | + reject(error) | |
| 47 | + }) | |
| 48 | + }) | |
| 49 | +} | |
| 0 | 50 | \ No newline at end of file | ... | ... |
src/api/fee/roomCreateFeeAddApi.js
| ... | ... | @@ -8,11 +8,8 @@ export function saveRoomCreateFee(data) { |
| 8 | 8 | data |
| 9 | 9 | }).then(response => { |
| 10 | 10 | const res = response.data |
| 11 | - if (res.code === 0) { | |
| 12 | 11 | resolve(res) |
| 13 | - } else { | |
| 14 | - reject(new Error(res.msg || 'Failed to save room create fee')) | |
| 15 | - } | |
| 12 | + | |
| 16 | 13 | }).catch(error => { |
| 17 | 14 | reject(error) |
| 18 | 15 | }) |
| ... | ... | @@ -27,11 +24,7 @@ export function listFeeConfigs(params) { |
| 27 | 24 | params |
| 28 | 25 | }).then(response => { |
| 29 | 26 | const res = response.data |
| 30 | - if (res.code === 0) { | |
| 31 | 27 | resolve(res) |
| 32 | - } else { | |
| 33 | - reject(new Error(res.msg || 'Failed to list fee configs')) | |
| 34 | - } | |
| 35 | 28 | }).catch(error => { |
| 36 | 29 | reject(error) |
| 37 | 30 | }) | ... | ... |
src/components/community/editCommunityArea.vue
| 1 | 1 | <template> |
| 2 | - <el-dialog :title="$t('enterCommunity.modifyCommunity')" :visible.sync="visible" width="800px" @close="resetForm"> | |
| 2 | + <el-dialog :title="$t('common.edit')" :visible.sync="visible" width="800px" @close="resetForm"> | |
| 3 | 3 | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
| 4 | 4 | <el-form-item :label="$t('enterCommunity.communityName')" prop="name"> |
| 5 | 5 | <el-input v-model="form.name" disabled /> |
| ... | ... | @@ -78,8 +78,8 @@ export default { |
| 78 | 78 | }) |
| 79 | 79 | this.visible = true |
| 80 | 80 | setTimeout(() => { |
| 81 | - this.$refs.uploadImage.setImages([community.qrCode]) | |
| 82 | - }, 500) | |
| 81 | + this.$refs.uploadImage.setImages([community.qrCode]) | |
| 82 | + }, 500) | |
| 83 | 83 | }, |
| 84 | 84 | handleQRUpdate(photosUrl) { |
| 85 | 85 | this.form.qrCode = photosUrl.length > 0 ? photosUrl[0] : '' | ... | ... |
src/components/fee/addMeterWater.vue
| 1 | 1 | <template> |
| 2 | - <el-dialog :title="$t('meterWater.addMeterReading')" :visible.sync="dialogVisible" width="50%" @close="handleClose"> | |
| 2 | + <el-dialog :title="$t('meterWater.addMeterReading')" :visible.sync="dialogVisible" width="40%" @close="handleClose"> | |
| 3 | 3 | <el-form ref="form" :model="form" :rules="rules" label-width="120px" label-position="right"> |
| 4 | 4 | <el-form-item :label="$t('meterWater.feeType')" prop="feeTypeCd"> |
| 5 | 5 | <el-select v-model="form.feeTypeCd" :placeholder="$t('meterWater.selectFeeType')" style="width: 100%" |
| ... | ... | @@ -330,4 +330,14 @@ export default { |
| 330 | 330 | color: #999; |
| 331 | 331 | margin-top: 5px; |
| 332 | 332 | } |
| 333 | +.el-form-item{ | |
| 334 | + width: 90%; | |
| 335 | + text-align: left; | |
| 336 | +} | |
| 337 | +.el-select{ | |
| 338 | + width: 100%; | |
| 339 | +} | |
| 340 | +.el-date-editor{ | |
| 341 | + width: 100%; | |
| 342 | +} | |
| 333 | 343 | </style> |
| 334 | 344 | \ No newline at end of file | ... | ... |
src/components/fee/addProxyFee.vue
| 1 | 1 | <template> |
| 2 | - <el-dialog :title="$t('addProxyFee.title')" :visible.sync="visible" width="70%" :before-close="handleClose"> | |
| 2 | + <el-dialog :title="$t('addProxyFee.title')" :visible.sync="visible" width="40%" :before-close="handleClose"> | |
| 3 | 3 | <el-form ref="form" :model="formData" label-width="120px"> |
| 4 | 4 | <el-form-item :label="$t('addProxyFee.feeType')" prop="feeTypeCd"> |
| 5 | 5 | <el-select v-model="formData.feeTypeCd" @change="handleFeeTypeChange" |
| ... | ... | @@ -278,4 +278,11 @@ export default { |
| 278 | 278 | font-size: 12px; |
| 279 | 279 | color: #909399; |
| 280 | 280 | } |
| 281 | +.el-form-item{ | |
| 282 | + width: 90%; | |
| 283 | + text-align: left; | |
| 284 | +} | |
| 285 | +.el-date-editor{ | |
| 286 | + width: 100%; | |
| 287 | +} | |
| 281 | 288 | </style> |
| 282 | 289 | \ No newline at end of file | ... | ... |
src/components/fee/roomCreateFeeAdd.vue
| 1 | 1 | <template> |
| 2 | - <el-dialog | |
| 3 | - :title="$t('roomCreateFeeAdd.title')" | |
| 4 | - :visible.sync="visible" | |
| 5 | - width="70%" | |
| 6 | - :before-close="handleClose" | |
| 7 | - > | |
| 2 | + <el-dialog :title="$t('roomCreateFeeAdd.title')" :visible.sync="visible" width="40%" :before-close="handleClose"> | |
| 8 | 3 | <el-form ref="form" :model="formData" label-width="120px"> |
| 9 | 4 | <el-form-item :label="$t('roomCreateFeeAdd.location')"> |
| 10 | - <el-input | |
| 11 | - v-model="formData.locationTypeCdName" | |
| 12 | - disabled | |
| 13 | - :placeholder="$t('roomCreateFeeAdd.locationPlaceholder')" | |
| 14 | - ></el-input> | |
| 5 | + <el-input v-model="formData.locationTypeCdName" disabled | |
| 6 | + :placeholder="$t('roomCreateFeeAdd.locationPlaceholder')"></el-input> | |
| 15 | 7 | </el-form-item> |
| 16 | - | |
| 8 | + | |
| 17 | 9 | <el-form-item :label="$t('roomCreateFeeAdd.feeType')" prop="feeTypeCd"> |
| 18 | - <el-select | |
| 19 | - v-model="formData.feeTypeCd" | |
| 20 | - @change="handleFeeTypeChange" | |
| 21 | - :placeholder="$t('roomCreateFeeAdd.feeTypePlaceholder')" | |
| 22 | - style="width: 100%" | |
| 23 | - > | |
| 10 | + <el-select v-model="formData.feeTypeCd" @change="handleFeeTypeChange" | |
| 11 | + :placeholder="$t('roomCreateFeeAdd.feeTypePlaceholder')" style="width: 100%"> | |
| 24 | 12 | <template v-for="item in feeTypeOptions"> |
| 25 | - <el-option | |
| 26 | - v-if="item.statusCd !='888800010017'" | |
| 27 | - :key="item.statusCd" | |
| 28 | - :label="item.name" | |
| 29 | - :value="item.statusCd" | |
| 30 | - ></el-option> | |
| 13 | + <el-option v-if="item.statusCd != '888800010017'" :key="item.statusCd" :label="item.name" | |
| 14 | + :value="item.statusCd"></el-option> | |
| 31 | 15 | </template> |
| 32 | 16 | </el-select> |
| 33 | 17 | </el-form-item> |
| 34 | 18 | |
| 35 | - <el-form-item | |
| 36 | - v-if="formData.feeTypeCd" | |
| 37 | - :label="$t('roomCreateFeeAdd.feeItem')" | |
| 38 | - prop="configId" | |
| 39 | - > | |
| 40 | - <el-select | |
| 41 | - v-model="formData.configId" | |
| 42 | - @change="handleConfigChange" | |
| 43 | - :placeholder="$t('roomCreateFeeAdd.feeItemPlaceholder')" | |
| 44 | - style="width: 100%" | |
| 45 | - > | |
| 46 | - <el-option | |
| 47 | - v-for="item in feeConfigOptions" | |
| 48 | - :key="item.configId" | |
| 49 | - :label="item.feeName" | |
| 50 | - :value="item.configId" | |
| 51 | - ></el-option> | |
| 19 | + <el-form-item v-if="formData.feeTypeCd" :label="$t('roomCreateFeeAdd.feeItem')" prop="configId"> | |
| 20 | + <el-select v-model="formData.configId" @change="handleConfigChange" | |
| 21 | + :placeholder="$t('roomCreateFeeAdd.feeItemPlaceholder')" style="width: 100%"> | |
| 22 | + <el-option v-for="item in feeConfigOptions" :key="item.configId" :label="item.feeName" | |
| 23 | + :value="item.configId"></el-option> | |
| 52 | 24 | </el-select> |
| 53 | 25 | </el-form-item> |
| 54 | 26 | |
| 55 | - <el-form-item | |
| 56 | - v-if="formData.computingFormula == '4004'" | |
| 57 | - :label="$t('roomCreateFeeAdd.amount')" | |
| 58 | - prop="amount" | |
| 59 | - > | |
| 60 | - <el-input | |
| 61 | - v-model="formData.amount" | |
| 62 | - :placeholder="$t('roomCreateFeeAdd.amountPlaceholder')" | |
| 63 | - ></el-input> | |
| 27 | + <el-form-item v-if="formData.computingFormula == '4004'" :label="$t('roomCreateFeeAdd.amount')" prop="amount"> | |
| 28 | + <el-input v-model="formData.amount" :placeholder="$t('roomCreateFeeAdd.amountPlaceholder')"></el-input> | |
| 64 | 29 | </el-form-item> |
| 65 | 30 | |
| 66 | 31 | <el-form-item :label="$t('roomCreateFeeAdd.startTime')" prop="startTime"> |
| 67 | - <el-date-picker | |
| 68 | - v-model="formData.startTime" | |
| 69 | - type="date" | |
| 70 | - :placeholder="$t('roomCreateFeeAdd.startTimePlaceholder')" | |
| 71 | - value-format="yyyy-MM-dd" | |
| 72 | - @change="validateStartTime" | |
| 73 | - ></el-date-picker> | |
| 32 | + <el-date-picker v-model="formData.startTime" type="date" | |
| 33 | + :placeholder="$t('roomCreateFeeAdd.startTimePlaceholder')" value-format="yyyy-MM-dd" | |
| 34 | + @change="validateStartTime"></el-date-picker> | |
| 74 | 35 | </el-form-item> |
| 75 | 36 | |
| 76 | 37 | <el-form-item :label="$t('roomCreateFeeAdd.endTime')" prop="endTime"> |
| 77 | - <el-date-picker | |
| 78 | - v-model="formData.endTime" | |
| 79 | - type="date" | |
| 80 | - :placeholder="$t('roomCreateFeeAdd.endTimePlaceholder')" | |
| 81 | - value-format="yyyy-MM-dd" | |
| 82 | - @change="validateEndTime" | |
| 83 | - ></el-date-picker> | |
| 38 | + <el-date-picker v-model="formData.endTime" type="date" :placeholder="$t('roomCreateFeeAdd.endTimePlaceholder')" | |
| 39 | + value-format="yyyy-MM-dd" @change="validateEndTime"></el-date-picker> | |
| 84 | 40 | </el-form-item> |
| 85 | 41 | |
| 86 | - <el-form-item | |
| 87 | - v-show="formData.computingFormula == '1102'" | |
| 88 | - :label="$t('roomCreateFeeAdd.rateCycle')" | |
| 89 | - prop="rateCycle" | |
| 90 | - > | |
| 91 | - <el-input | |
| 92 | - v-model="formData.rateCycle" | |
| 93 | - :placeholder="$t('roomCreateFeeAdd.rateCyclePlaceholder')" | |
| 94 | - ></el-input> | |
| 42 | + <el-form-item v-show="formData.computingFormula == '1102'" :label="$t('roomCreateFeeAdd.rateCycle')" | |
| 43 | + prop="rateCycle"> | |
| 44 | + <el-input v-model="formData.rateCycle" :placeholder="$t('roomCreateFeeAdd.rateCyclePlaceholder')"></el-input> | |
| 95 | 45 | </el-form-item> |
| 96 | 46 | |
| 97 | - <el-form-item | |
| 98 | - v-show="formData.computingFormula == '1102'" | |
| 99 | - :label="$t('roomCreateFeeAdd.rate')" | |
| 100 | - prop="rate" | |
| 101 | - > | |
| 102 | - <el-input | |
| 103 | - v-model="formData.rate" | |
| 104 | - :placeholder="$t('roomCreateFeeAdd.ratePlaceholder')" | |
| 105 | - ></el-input> | |
| 47 | + <el-form-item v-show="formData.computingFormula == '1102'" :label="$t('roomCreateFeeAdd.rate')" prop="rate"> | |
| 48 | + <el-input v-model="formData.rate" :placeholder="$t('roomCreateFeeAdd.ratePlaceholder')"></el-input> | |
| 106 | 49 | </el-form-item> |
| 107 | 50 | |
| 108 | - <el-form-item | |
| 109 | - v-show="formData.computingFormula == '1102'" | |
| 110 | - :label="$t('roomCreateFeeAdd.rateStartTime')" | |
| 111 | - prop="rateStartTime" | |
| 112 | - > | |
| 113 | - <el-date-picker | |
| 114 | - v-model="formData.rateStartTime" | |
| 115 | - type="date" | |
| 116 | - :placeholder="$t('roomCreateFeeAdd.rateStartTimePlaceholder')" | |
| 117 | - value-format="yyyy-MM-dd" | |
| 118 | - ></el-date-picker> | |
| 51 | + <el-form-item v-show="formData.computingFormula == '1102'" :label="$t('roomCreateFeeAdd.rateStartTime')" | |
| 52 | + prop="rateStartTime"> | |
| 53 | + <el-date-picker v-model="formData.rateStartTime" type="date" | |
| 54 | + :placeholder="$t('roomCreateFeeAdd.rateStartTimePlaceholder')" value-format="yyyy-MM-dd"></el-date-picker> | |
| 119 | 55 | </el-form-item> |
| 120 | 56 | </el-form> |
| 121 | 57 | |
| ... | ... | @@ -175,38 +111,38 @@ export default { |
| 175 | 111 | this.resetForm() |
| 176 | 112 | this.formData.locationObjId = room.roomId |
| 177 | 113 | this.formData.locationTypeCdName = `${room.floorNum}-${room.unitNum}-${room.roomNum}(${room.ownerName})` |
| 178 | - | |
| 114 | + | |
| 179 | 115 | if (room.roomName) { |
| 180 | 116 | this.formData.locationTypeCdName = room.roomName |
| 181 | 117 | } |
| 182 | - | |
| 118 | + | |
| 183 | 119 | this.formData.roomType = room.roomType |
| 184 | 120 | if (room.roomType === '2020602') { |
| 185 | 121 | this.formData.locationTypeCdName = `${room.floorNum}-${room.roomNum}(${room.ownerName})` |
| 186 | 122 | } |
| 187 | - | |
| 123 | + | |
| 188 | 124 | this.loadFeeTypes() |
| 189 | 125 | this.visible = true |
| 190 | 126 | }, |
| 191 | - | |
| 127 | + | |
| 192 | 128 | loadFeeTypes() { |
| 193 | 129 | getDict('pay_fee_config', 'fee_type_cd').then(data => { |
| 194 | - this.feeTypeOptions = data.filter(item => | |
| 130 | + this.feeTypeOptions = data.filter(item => | |
| 195 | 131 | item.statusCd !== '888800010015' && item.statusCd !== '888800010016' |
| 196 | 132 | ) |
| 197 | 133 | }) |
| 198 | 134 | }, |
| 199 | - | |
| 135 | + | |
| 200 | 136 | handleFeeTypeChange(value) { |
| 201 | 137 | if (value === '888800010006' || value === '888800010014') { |
| 202 | 138 | this.formData.startTime = this.$dayjs().format('YYYY-MM-DD') |
| 203 | 139 | this.formData.endTime = this.$dayjs().add(1, 'month').format('YYYY-MM-DD') |
| 204 | 140 | } |
| 205 | - | |
| 141 | + | |
| 206 | 142 | this.formData.configId = '' |
| 207 | 143 | this.loadFeeConfigs(value) |
| 208 | 144 | }, |
| 209 | - | |
| 145 | + | |
| 210 | 146 | loadFeeConfigs(feeTypeCd) { |
| 211 | 147 | listFeeConfigs({ |
| 212 | 148 | page: 1, |
| ... | ... | @@ -216,24 +152,24 @@ export default { |
| 216 | 152 | isDefault: 'F', |
| 217 | 153 | state: 'Y' |
| 218 | 154 | }).then(response => { |
| 219 | - this.feeConfigOptions = response.data.feeConfigs | |
| 155 | + this.feeConfigOptions = response.feeConfigs | |
| 220 | 156 | }) |
| 221 | 157 | }, |
| 222 | - | |
| 158 | + | |
| 223 | 159 | handleConfigChange(configId) { |
| 224 | - if (this.formData.feeTypeCd !== '888800010006' && | |
| 225 | - this.formData.feeTypeCd !== '888800010014' && | |
| 226 | - this.formData.feeFlag === '1003006') { | |
| 160 | + if (this.formData.feeTypeCd !== '888800010006' && | |
| 161 | + this.formData.feeTypeCd !== '888800010014' && | |
| 162 | + this.formData.feeFlag === '1003006') { | |
| 227 | 163 | this.formData.endTime = '' |
| 228 | 164 | } |
| 229 | - | |
| 165 | + | |
| 230 | 166 | const config = this.feeConfigOptions.find(item => item.configId === configId) |
| 231 | 167 | if (config) { |
| 232 | 168 | this.formData.feeFlag = config.feeFlag |
| 233 | 169 | this.formData.computingFormula = config.computingFormula |
| 234 | 170 | } |
| 235 | 171 | }, |
| 236 | - | |
| 172 | + | |
| 237 | 173 | validateStartTime(value) { |
| 238 | 174 | if (!this.formData.feeFlag && !this.formData.feeTypeCd) { |
| 239 | 175 | const start = new Date(value) |
| ... | ... | @@ -244,7 +180,7 @@ export default { |
| 244 | 180 | } |
| 245 | 181 | } |
| 246 | 182 | }, |
| 247 | - | |
| 183 | + | |
| 248 | 184 | validateEndTime(value) { |
| 249 | 185 | const start = new Date(this.formData.startTime) |
| 250 | 186 | const end = new Date(value) |
| ... | ... | @@ -253,23 +189,23 @@ export default { |
| 253 | 189 | this.formData.endTime = '' |
| 254 | 190 | } |
| 255 | 191 | }, |
| 256 | - | |
| 192 | + | |
| 257 | 193 | handleSubmit() { |
| 258 | 194 | this.$refs.form.validate(valid => { |
| 259 | 195 | if (!valid) return |
| 260 | - | |
| 196 | + | |
| 261 | 197 | if (this.formData.feeTypeCd !== '888800010006' && this.formData.feeFlag !== '1003006') { |
| 262 | 198 | if (!this.formData.endTime) { |
| 263 | 199 | this.$message.error(this.$t('roomCreateFeeAdd.validate.endTimeRequired')) |
| 264 | 200 | return |
| 265 | 201 | } |
| 266 | 202 | } |
| 267 | - | |
| 203 | + | |
| 268 | 204 | const params = { |
| 269 | 205 | ...this.formData, |
| 270 | 206 | communityId: getCommunityId() |
| 271 | 207 | } |
| 272 | - | |
| 208 | + | |
| 273 | 209 | saveRoomCreateFee(params).then(() => { |
| 274 | 210 | this.$message.success(this.$t('roomCreateFeeAdd.successMessage')) |
| 275 | 211 | this.$emit('success') |
| ... | ... | @@ -279,7 +215,7 @@ export default { |
| 279 | 215 | }) |
| 280 | 216 | }) |
| 281 | 217 | }, |
| 282 | - | |
| 218 | + | |
| 283 | 219 | resetForm() { |
| 284 | 220 | if (this.$refs.form) { |
| 285 | 221 | this.$refs.form.resetFields() |
| ... | ... | @@ -302,11 +238,23 @@ export default { |
| 302 | 238 | feeFlag: '' |
| 303 | 239 | } |
| 304 | 240 | }, |
| 305 | - | |
| 241 | + | |
| 306 | 242 | handleClose() { |
| 307 | 243 | this.visible = false |
| 308 | 244 | this.resetForm() |
| 309 | 245 | } |
| 310 | 246 | } |
| 311 | 247 | } |
| 312 | -</script> | |
| 313 | 248 | \ No newline at end of file |
| 249 | +</script> | |
| 250 | +<style scoped> | |
| 251 | +.el-form-item{ | |
| 252 | + width: 90%; | |
| 253 | + text-align: left; | |
| 254 | +} | |
| 255 | +.el-select{ | |
| 256 | + width: 100%; | |
| 257 | +} | |
| 258 | +.el-date-editor{ | |
| 259 | + width: 100%; | |
| 260 | +} | |
| 261 | +</style> | |
| 314 | 262 | \ No newline at end of file | ... | ... |
src/components/fee/simplifyRoomFee.vue
| ... | ... | @@ -259,9 +259,13 @@ |
| 259 | 259 | </el-col> |
| 260 | 260 | </el-row> |
| 261 | 261 | <!-- Modal Components --> |
| 262 | - <delete-fee ref="deleteFee"></delete-fee> | |
| 263 | - <edit-fee ref="editFee"></edit-fee> | |
| 264 | - <temp-import-room-fee ref="tempImportRoomFee"></temp-import-room-fee> | |
| 262 | + <delete-fee ref="deleteFee" @success="handleNotify"></delete-fee> | |
| 263 | + <edit-fee ref="editFee" @success="handleNotify"></edit-fee> | |
| 264 | + <temp-import-room-fee ref="tempImportRoomFee" @success="handleNotify"></temp-import-room-fee> | |
| 265 | + <room-create-fee-add ref="roomCreateFeeAdd" @success="handleNotify"></room-create-fee-add> | |
| 266 | + <add-meter-water ref="addMeterWater" @success="handleNotify"></add-meter-water> | |
| 267 | + <add-proxy-fee ref="addProxyFee" @success="handleNotify"></add-proxy-fee> | |
| 268 | + | |
| 265 | 269 | </div> |
| 266 | 270 | </template> |
| 267 | 271 | |
| ... | ... | @@ -274,6 +278,9 @@ import TempImportRoomFee from './tempImportRoomFee' |
| 274 | 278 | import { dateFormat } from '@/utils/dateUtil' |
| 275 | 279 | import DeleteFee from '@/components/fee/deleteFee' |
| 276 | 280 | import EditFee from '@/components/fee/editFee' |
| 281 | +import RoomCreateFeeAdd from '@/components/fee/roomCreateFeeAdd' | |
| 282 | +import AddMeterWater from '@/components/fee/addMeterWater' | |
| 283 | +import AddProxyFee from '@/components/fee/addProxyFee' | |
| 277 | 284 | |
| 278 | 285 | export default { |
| 279 | 286 | name: 'SimplifyRoomFee', |
| ... | ... | @@ -281,6 +288,9 @@ export default { |
| 281 | 288 | TempImportRoomFee, |
| 282 | 289 | DeleteFee, |
| 283 | 290 | EditFee, |
| 291 | + RoomCreateFeeAdd, | |
| 292 | + AddMeterWater, | |
| 293 | + AddProxyFee, | |
| 284 | 294 | }, |
| 285 | 295 | data() { |
| 286 | 296 | return { |
| ... | ... | @@ -395,18 +405,19 @@ export default { |
| 395 | 405 | }, |
| 396 | 406 | openRoomCreateFeeAddModal() { |
| 397 | 407 | this.simplifyRoomFeeInfo.ownerName = this.simplifyRoomFeeInfo.name |
| 398 | - this.$emit('openRoomCreateFeeAddModal', { | |
| 408 | + this.$refs.roomCreateFeeAdd.open({ | |
| 399 | 409 | isMore: false, |
| 400 | - room: this.simplifyRoomFeeInfo, | |
| 410 | + roomId: this.simplifyRoomFeeInfo.roomId, | |
| 411 | + roomName: this.simplifyRoomFeeInfo.roomName, | |
| 401 | 412 | ownerName: this.simplifyRoomFeeInfo.name |
| 402 | 413 | }) |
| 403 | 414 | }, |
| 404 | 415 | openAddMeterWaterSimplifyModal() { |
| 405 | - this.$emit('openAddMeterWaterModal', { | |
| 416 | + this.$refs.addMeterWater.open({ | |
| 406 | 417 | roomId: this.simplifyRoomFeeInfo.roomId, |
| 407 | 418 | roomName: this.simplifyRoomFeeInfo.roomName, |
| 408 | 419 | ownerName: this.simplifyRoomFeeInfo.name |
| 409 | - }) | |
| 420 | + }); | |
| 410 | 421 | }, |
| 411 | 422 | getAttrValue(attrs, specCd) { |
| 412 | 423 | const attr = attrs.find(item => item.specCd === specCd) |
| ... | ... | @@ -422,7 +433,7 @@ export default { |
| 422 | 433 | return dateFormat(fee.endTime) |
| 423 | 434 | }, |
| 424 | 435 | openProxyFeeModal() { |
| 425 | - this.$emit('openAddProxyFeeModal', { | |
| 436 | + this.$refs.addProxyFee.open({ | |
| 426 | 437 | roomId: this.simplifyRoomFeeInfo.roomId, |
| 427 | 438 | roomName: this.simplifyRoomFeeInfo.roomName, |
| 428 | 439 | ownerName: this.simplifyRoomFeeInfo.name | ... | ... |
src/components/fee/tempImportRoomFee.vue
| 1 | 1 | <template> |
| 2 | - <el-dialog | |
| 3 | - :title="$t('tempImportRoomFee.title')" | |
| 4 | - :visible.sync="dialogVisible" | |
| 5 | - width="70%" | |
| 6 | - @close="clearTempImportRoomFeeInfo" | |
| 7 | - > | |
| 8 | - <el-form :model="form" label-width="120px"> | |
| 2 | + <el-dialog :title="$t('tempImportRoomFee.title')" :visible.sync="dialogVisible" width="40%" | |
| 3 | + @close="clearTempImportRoomFeeInfo"> | |
| 4 | + <el-form :model="form" label-width="120px" class="text-left"> | |
| 9 | 5 | <el-form-item :label="$t('tempImportRoomFee.feeType')"> |
| 10 | - <el-select | |
| 11 | - v-model="form.feeTypeCd" | |
| 12 | - @change="changeFeeTypeCd" | |
| 13 | - :placeholder="$t('tempImportRoomFee.selectFeeType')" | |
| 14 | - > | |
| 15 | - <el-option | |
| 16 | - v-for="(item,index) in feeTypeCds" | |
| 17 | - :key="index" | |
| 18 | - :label="item.name" | |
| 19 | - :value="item.statusCd" | |
| 20 | - ></el-option> | |
| 6 | + <el-select v-model="form.feeTypeCd" @change="changeFeeTypeCd" | |
| 7 | + :placeholder="$t('tempImportRoomFee.selectFeeType')"> | |
| 8 | + <el-option v-for="(item, index) in feeTypeCds" :key="index" :label="item.name" | |
| 9 | + :value="item.statusCd"></el-option> | |
| 21 | 10 | </el-select> |
| 22 | 11 | </el-form-item> |
| 23 | - | |
| 12 | + | |
| 24 | 13 | <el-form-item :label="$t('tempImportRoomFee.feeObj')"> |
| 25 | - <el-input | |
| 26 | - v-model="form.objName" | |
| 27 | - disabled | |
| 28 | - :placeholder="$t('tempImportRoomFee.inputFeeObj')" | |
| 29 | - ></el-input> | |
| 14 | + <el-input v-model="form.objName" disabled :placeholder="$t('tempImportRoomFee.inputFeeObj')"></el-input> | |
| 30 | 15 | </el-form-item> |
| 31 | 16 | |
| 32 | 17 | <el-form-item :label="$t('tempImportRoomFee.feeName')" v-if="form.feeNameFlag === 'S'"> |
| 33 | - <el-select | |
| 34 | - v-model="form.configId" | |
| 35 | - :placeholder="$t('tempImportRoomFee.selectFeeItem')" | |
| 36 | - > | |
| 37 | - <el-option | |
| 38 | - v-for="(item,index) in feeConfigs" | |
| 39 | - :key="index" | |
| 40 | - :label="item.feeName" | |
| 41 | - :value="item.configId" | |
| 42 | - ></el-option> | |
| 18 | + <el-select v-model="form.configId" :placeholder="$t('tempImportRoomFee.selectFeeItem')"> | |
| 19 | + <el-option v-for="(item, index) in feeConfigs" :key="index" :label="item.feeName" | |
| 20 | + :value="item.configId"></el-option> | |
| 43 | 21 | </el-select> |
| 44 | - <span>{{$t('tempImportRoomFee.feeItemDesc')}}</span> | |
| 22 | + <span>{{ $t('tempImportRoomFee.feeItemDesc') }}</span> | |
| 45 | 23 | </el-form-item> |
| 46 | 24 | |
| 47 | 25 | <el-form-item :label="$t('tempImportRoomFee.feeName')" v-else> |
| 48 | 26 | <el-col :span="18"> |
| 49 | - <el-input | |
| 50 | - v-model="form.feeName" | |
| 51 | - :placeholder="$t('tempImportRoomFee.inputFeeName')" | |
| 52 | - ></el-input> | |
| 27 | + <el-input v-model="form.feeName" :placeholder="$t('tempImportRoomFee.inputFeeName')"></el-input> | |
| 53 | 28 | </el-col> |
| 54 | 29 | <el-col :span="6"> |
| 55 | - <el-button @click="toggleFeeNameFlag">{{$t('tempImportRoomFee.select')}}</el-button> | |
| 30 | + <el-button @click="toggleFeeNameFlag">{{ $t('tempImportRoomFee.select') }}</el-button> | |
| 56 | 31 | </el-col> |
| 57 | 32 | </el-form-item> |
| 58 | 33 | |
| 59 | 34 | <el-form-item :label="$t('tempImportRoomFee.amount')"> |
| 60 | - <el-input | |
| 61 | - v-model="form.amount" | |
| 62 | - :placeholder="$t('tempImportRoomFee.inputAmount')" | |
| 63 | - ></el-input> | |
| 35 | + <el-input v-model="form.amount" :placeholder="$t('tempImportRoomFee.inputAmount')"></el-input> | |
| 64 | 36 | </el-form-item> |
| 65 | 37 | |
| 66 | 38 | <el-form-item :label="$t('tempImportRoomFee.startTime')"> |
| 67 | - <el-date-picker | |
| 68 | - v-model="form.startTime" | |
| 69 | - type="datetime" | |
| 70 | - :placeholder="$t('tempImportRoomFee.selectStartTime')" | |
| 71 | - value-format="yyyy-MM-dd HH:mm:ss" | |
| 72 | - ></el-date-picker> | |
| 39 | + <el-date-picker v-model="form.startTime" type="datetime" :placeholder="$t('tempImportRoomFee.selectStartTime')" | |
| 40 | + value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> | |
| 73 | 41 | </el-form-item> |
| 74 | 42 | |
| 75 | 43 | <el-form-item :label="$t('tempImportRoomFee.endTime')"> |
| 76 | - <el-date-picker | |
| 77 | - v-model="form.endTime" | |
| 78 | - type="datetime" | |
| 79 | - :placeholder="$t('tempImportRoomFee.selectEndTime')" | |
| 80 | - value-format="yyyy-MM-dd HH:mm:ss" | |
| 81 | - ></el-date-picker> | |
| 44 | + <el-date-picker v-model="form.endTime" type="datetime" :placeholder="$t('tempImportRoomFee.selectEndTime')" | |
| 45 | + value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> | |
| 82 | 46 | </el-form-item> |
| 83 | 47 | </el-form> |
| 84 | 48 | |
| 85 | 49 | <div slot="footer" class="dialog-footer"> |
| 86 | - <el-button @click="dialogVisible = false">{{$t('tempImportRoomFee.cancel')}}</el-button> | |
| 87 | - <el-button type="primary" @click="saveTempImportFeeInfo">{{$t('tempImportRoomFee.submit')}}</el-button> | |
| 50 | + <el-button @click="dialogVisible = false">{{ $t('tempImportRoomFee.cancel') }}</el-button> | |
| 51 | + <el-button type="primary" @click="saveTempImportFeeInfo">{{ $t('tempImportRoomFee.submit') }}</el-button> | |
| 88 | 52 | </div> |
| 89 | 53 | </el-dialog> |
| 90 | 54 | </template> |
| ... | ... | @@ -191,7 +155,7 @@ export default { |
| 191 | 155 | }, |
| 192 | 156 | async saveTempImportFeeInfo() { |
| 193 | 157 | if (!this.validateForm()) return |
| 194 | - | |
| 158 | + | |
| 195 | 159 | try { |
| 196 | 160 | const res = await importTempData({ |
| 197 | 161 | ...this.form, |
| ... | ... | @@ -240,4 +204,12 @@ export default { |
| 240 | 204 | } |
| 241 | 205 | } |
| 242 | 206 | } |
| 243 | -</script> | |
| 244 | 207 | \ No newline at end of file |
| 208 | +</script> | |
| 209 | +<style scoped> | |
| 210 | +.el-form-item{ | |
| 211 | + width: 90%; | |
| 212 | +} | |
| 213 | +.el-date-editor{ | |
| 214 | + width: 100%; | |
| 215 | +} | |
| 216 | +</style> | |
| 245 | 217 | \ No newline at end of file | ... | ... |
src/components/fee/viewMainFee.vue
| 1 | 1 | <template> |
| 2 | 2 | <el-card class="box-card"> |
| 3 | - <div slot="header" class="clearfix"> | |
| 3 | + <div slot="header" class="flex justify-between"> | |
| 4 | 4 | <span>{{ $t('viewMainFee.feeInfo') }}</span> |
| 5 | - <el-button | |
| 6 | - type="primary" | |
| 7 | - size="small" | |
| 8 | - style="float: right; margin-left: 10px;" | |
| 9 | - @click="_openCallBackOwner" | |
| 10 | - > | |
| 5 | + <el-button type="primary" size="small" style="float: right; margin-left: 10px;" @click="_openCallBackOwner"> | |
| 11 | 6 | {{ $t('common.back') }} |
| 12 | 7 | </el-button> |
| 13 | 8 | </div> |
| 14 | - | |
| 15 | - <el-row :gutter="20"> | |
| 9 | + | |
| 10 | + <el-row :gutter="20" class="text-left"> | |
| 16 | 11 | <el-col :span="6"> |
| 17 | 12 | <div class="form-item"> |
| 18 | - <label>{{ $t('viewMainFee.feeId') }}</label> | |
| 13 | + <label>{{ $t('viewMainFee.feeId') }}:</label> | |
| 19 | 14 | <div>{{ mainFeeInfo.feeId }}</div> |
| 20 | 15 | </div> |
| 21 | 16 | </el-col> |
| 22 | 17 | <el-col :span="6"> |
| 23 | 18 | <div class="form-item"> |
| 24 | - <label>{{ $t('viewMainFee.feeFlag') }}</label> | |
| 19 | + <label>{{ $t('viewMainFee.feeFlag') }}:</label> | |
| 25 | 20 | <div>{{ mainFeeInfo.feeFlagName }}</div> |
| 26 | 21 | </div> |
| 27 | 22 | </el-col> |
| 28 | 23 | <el-col :span="6"> |
| 29 | 24 | <div class="form-item"> |
| 30 | - <label>{{ $t('viewMainFee.feeType') }}</label> | |
| 25 | + <label>{{ $t('viewMainFee.feeType') }}:</label> | |
| 31 | 26 | <div>{{ mainFeeInfo.feeTypeCdName }}</div> |
| 32 | 27 | </div> |
| 33 | 28 | </el-col> |
| 34 | 29 | <el-col :span="6"> |
| 35 | 30 | <div class="form-item"> |
| 36 | - <label>{{ $t('viewMainFee.payerObj') }}</label> | |
| 31 | + <label>{{ $t('viewMainFee.payerObj') }}:</label> | |
| 37 | 32 | <div> |
| 38 | 33 | {{ mainFeeInfo.payerObjName }} |
| 39 | - <view-room-data | |
| 40 | - v-if="mainFeeInfo.payerObjType == '3333'" | |
| 41 | - ref="viewRoomData" | |
| 42 | - /> | |
| 34 | + <view-room-data v-if="mainFeeInfo.payerObjType == '3333'" ref="viewRoomData" /> | |
| 43 | 35 | </div> |
| 44 | 36 | </div> |
| 45 | 37 | </el-col> |
| 46 | - | |
| 38 | + | |
| 47 | 39 | <el-col :span="6"> |
| 48 | 40 | <div class="form-item"> |
| 49 | - <label>{{ $t('viewMainFee.feeItem') }}</label> | |
| 41 | + <label>{{ $t('viewMainFee.feeItem') }}:</label> | |
| 50 | 42 | <div class="hand" @click="_viewFeeConfig"> |
| 51 | 43 | {{ mainFeeInfo.feeName }} |
| 52 | 44 | <view-fee-config-data ref="viewFeeConfigData" /> |
| ... | ... | @@ -55,43 +47,43 @@ |
| 55 | 47 | </el-col> |
| 56 | 48 | <el-col :span="6"> |
| 57 | 49 | <div class="form-item"> |
| 58 | - <label>{{ $t('viewMainFee.feeStatus') }}</label> | |
| 50 | + <label>{{ $t('viewMainFee.feeStatus') }}:</label> | |
| 59 | 51 | <div>{{ mainFeeInfo.stateName }}</div> |
| 60 | 52 | </div> |
| 61 | 53 | </el-col> |
| 62 | 54 | <el-col :span="6"> |
| 63 | 55 | <div class="form-item"> |
| 64 | - <label>{{ $t('viewMainFee.startTime') }}</label> | |
| 56 | + <label>{{ $t('viewMainFee.startTime') }}:</label> | |
| 65 | 57 | <div>{{ mainFeeInfo.startTime }}</div> |
| 66 | 58 | </div> |
| 67 | 59 | </el-col> |
| 68 | 60 | <el-col :span="6"> |
| 69 | 61 | <div class="form-item"> |
| 70 | - <label>{{ $t('viewMainFee.billingStartTime') }}</label> | |
| 62 | + <label>{{ $t('viewMainFee.billingStartTime') }}:</label> | |
| 71 | 63 | <div>{{ _getEndTime(mainFeeInfo) }}</div> |
| 72 | 64 | </div> |
| 73 | 65 | </el-col> |
| 74 | - | |
| 66 | + | |
| 75 | 67 | <el-col :span="6"> |
| 76 | 68 | <div class="form-item"> |
| 77 | - <label>{{ $t('viewMainFee.billingEndTime') }}</label> | |
| 69 | + <label>{{ $t('viewMainFee.billingEndTime') }}:</label> | |
| 78 | 70 | <div>{{ _getDeadlineTime(mainFeeInfo) }}</div> |
| 79 | 71 | </div> |
| 80 | 72 | </el-col> |
| 81 | 73 | <el-col :span="6" v-if="mainFeeInfo.amount != '-1.00'"> |
| 82 | 74 | <div class="form-item"> |
| 83 | - <label>{{ $t('viewMainFee.feeAmount') }}</label> | |
| 75 | + <label>{{ $t('viewMainFee.feeAmount') }}:</label> | |
| 84 | 76 | <div>{{ mainFeeInfo.amount }}</div> |
| 85 | 77 | </div> |
| 86 | 78 | </el-col> |
| 87 | 79 | <el-col :span="6"> |
| 88 | 80 | <div class="form-item"> |
| 89 | - <label>{{ $t('viewMainFee.batch') }}</label> | |
| 81 | + <label>{{ $t('viewMainFee.batch') }}:</label> | |
| 90 | 82 | <div>{{ mainFeeInfo.batchId }}</div> |
| 91 | 83 | </div> |
| 92 | 84 | </el-col> |
| 93 | - | |
| 94 | - <template v-for="(item,index) in mainFeeInfo.feeAttrs"> | |
| 85 | + | |
| 86 | + <template v-for="(item, index) in mainFeeInfo.feeAttrs"> | |
| 95 | 87 | <el-col :span="6" :key="index"> |
| 96 | 88 | <div class="form-item"> |
| 97 | 89 | <label>{{ item.specCdName }}:</label> |
| ... | ... | @@ -100,32 +92,32 @@ |
| 100 | 92 | </el-col> |
| 101 | 93 | </template> |
| 102 | 94 | </el-row> |
| 103 | - | |
| 95 | + | |
| 104 | 96 | <el-row :gutter="20" v-if="mainFeeInfo.payerObjType == '3333'"> |
| 105 | 97 | <el-col :span="6"> |
| 106 | 98 | <div class="form-item"> |
| 107 | - <label>{{ $t('viewMainFee.area') }}</label> | |
| 99 | + <label>{{ $t('viewMainFee.area') }}:</label> | |
| 108 | 100 | <div>{{ mainFeeInfo.builtUpArea }}</div> |
| 109 | 101 | </div> |
| 110 | 102 | </el-col> |
| 111 | 103 | <el-col :span="6"> |
| 112 | 104 | <div class="form-item"> |
| 113 | - <label>{{ $t('viewMainFee.unitPrice') }}</label> | |
| 105 | + <label>{{ $t('viewMainFee.unitPrice') }}:</label> | |
| 114 | 106 | <div>{{ mainFeeInfo.squarePrice }}</div> |
| 115 | 107 | </div> |
| 116 | 108 | </el-col> |
| 117 | 109 | <el-col :span="6"> |
| 118 | 110 | <div class="form-item"> |
| 119 | - <label>{{ $t('viewMainFee.additionalFee') }}</label> | |
| 111 | + <label>{{ $t('viewMainFee.additionalFee') }}:</label> | |
| 120 | 112 | <div>{{ mainFeeInfo.additionalAmount }}</div> |
| 121 | 113 | </div> |
| 122 | 114 | </el-col> |
| 123 | 115 | </el-row> |
| 124 | - | |
| 116 | + | |
| 125 | 117 | <el-row :gutter="20" v-else> |
| 126 | 118 | <el-col :span="6"> |
| 127 | 119 | <div class="form-item"> |
| 128 | - <label>{{ $t('viewMainFee.fixedFee') }}</label> | |
| 120 | + <label>{{ $t('viewMainFee.fixedFee') }}:</label> | |
| 129 | 121 | <div>{{ mainFeeInfo.additionalAmount }}</div> |
| 130 | 122 | </div> |
| 131 | 123 | </el-col> |
| ... | ... | @@ -201,11 +193,11 @@ export default { |
| 201 | 193 | page: 1, |
| 202 | 194 | row: 1 |
| 203 | 195 | }) |
| 204 | - | |
| 205 | - if (res.data && res.data.length > 0) { | |
| 206 | - Object.assign(this.mainFeeInfo, res.data[0]) | |
| 207 | - this.mainFeeInfo.feeAttrs = res.data[0].feeAttrs || [] | |
| 208 | - | |
| 196 | + | |
| 197 | + if (res.fees && res.fees.length > 0) { | |
| 198 | + Object.assign(this.mainFeeInfo, res.fees[0]) | |
| 199 | + this.mainFeeInfo.feeAttrs = res.fees[0].feeAttrs || [] | |
| 200 | + | |
| 209 | 201 | if (this.mainFeeInfo.payerObjType === '3333') { |
| 210 | 202 | this._loadRoomAndOwnerByRoomId() |
| 211 | 203 | } else if (this.mainFeeInfo.payerObjType === '6666') { |
| ... | ... | @@ -213,7 +205,7 @@ export default { |
| 213 | 205 | } else { |
| 214 | 206 | this._loadContractAndOwnerByContractId() |
| 215 | 207 | } |
| 216 | - | |
| 208 | + | |
| 217 | 209 | this.$emit('listFeeDetail', { feeId: this.mainFeeInfo.feeId }) |
| 218 | 210 | } |
| 219 | 211 | } catch (error) { |
| ... | ... | @@ -256,23 +248,21 @@ export default { |
| 256 | 248 | |
| 257 | 249 | <style scoped> |
| 258 | 250 | .form-item { |
| 259 | - margin-bottom: 20px; | |
| 260 | - | |
| 261 | - label { | |
| 262 | - display: block; | |
| 263 | - margin-bottom: 5px; | |
| 264 | - font-weight: bold; | |
| 265 | - } | |
| 266 | - | |
| 251 | + display: flex; | |
| 252 | + flex-direction: row; | |
| 253 | + justify-content: flex-start; | |
| 254 | + margin-bottom: 30px; | |
| 255 | + align-items: center; | |
| 256 | + | |
| 267 | 257 | div { |
| 268 | - padding: 8px 0; | |
| 258 | + margin-left: 10px; | |
| 269 | 259 | } |
| 270 | 260 | } |
| 271 | 261 | |
| 272 | 262 | .hand { |
| 273 | 263 | cursor: pointer; |
| 274 | 264 | color: #409EFF; |
| 275 | - | |
| 265 | + | |
| 276 | 266 | &:hover { |
| 277 | 267 | text-decoration: underline; |
| 278 | 268 | } | ... | ... |
src/i18n/feeI18n.js
| ... | ... | @@ -31,6 +31,7 @@ import { messages as payFeeOrderMessages } from '../views/fee/payFeeOrderLang' |
| 31 | 31 | import { messages as refundDepositFeeMessages } from '../views/fee/refundDepositFeeLang' |
| 32 | 32 | import { messages as createFeeByComboMessages } from '../views/fee/createFeeByComboLang' |
| 33 | 33 | import { messages as owePayFeeOrderMessages } from '../views/fee/owePayFeeOrderLang' |
| 34 | +import { messages as printOweFeeMessages } from '../views/fee/printOweFeeLang' | |
| 34 | 35 | |
| 35 | 36 | export const messages = { |
| 36 | 37 | en: { |
| ... | ... | @@ -67,6 +68,7 @@ export const messages = { |
| 67 | 68 | ...refundDepositFeeMessages.en, |
| 68 | 69 | ...createFeeByComboMessages.en, |
| 69 | 70 | ...owePayFeeOrderMessages.en, |
| 71 | + ...printOweFeeMessages.en, | |
| 70 | 72 | }, |
| 71 | 73 | zh: { |
| 72 | 74 | ...contractCreateFeeMessages.zh, |
| ... | ... | @@ -102,5 +104,6 @@ export const messages = { |
| 102 | 104 | ...refundDepositFeeMessages.zh, |
| 103 | 105 | ...createFeeByComboMessages.zh, |
| 104 | 106 | ...owePayFeeOrderMessages.zh, |
| 107 | + ...printOweFeeMessages.zh, | |
| 105 | 108 | } |
| 106 | 109 | } |
| 107 | 110 | \ No newline at end of file | ... | ... |
src/router/feeRouter.js
| ... | ... | @@ -149,5 +149,10 @@ export default [ |
| 149 | 149 | name: '/views/fee/owePayFeeOrder', |
| 150 | 150 | component: () => import('@/views/fee/owePayFeeOrderList.vue') |
| 151 | 151 | }, |
| 152 | + { | |
| 153 | + path: '/views/fee/printOweFee', | |
| 154 | + name: '/views/fee/printOweFee', | |
| 155 | + component: () => import('@/views/fee/printOweFeeList.vue') | |
| 156 | + }, | |
| 152 | 157 | |
| 153 | 158 | ] |
| 154 | 159 | \ No newline at end of file | ... | ... |
src/utils/moneyUtil.js
0 → 100644
| 1 | +export function changeNumMoneyToChinese(money) { | |
| 2 | + let cnNums = new Array("零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"); //汉字的数字 | |
| 3 | + let cnIntRadice = new Array("", "拾", "佰", "仟"); //基本单位 | |
| 4 | + let cnIntUnits = new Array("", "万", "亿", "兆"); //对应整数部分扩展单位 | |
| 5 | + let cnDecUnits = new Array("角", "分", "毫", "厘"); //对应小数部分单位 | |
| 6 | + let cnInteger = "整"; //整数金额时后面跟的字符 | |
| 7 | + let cnIntLast = "元"; //整型完以后的单位 | |
| 8 | + let maxNum = 999999999999999.9999; //最大处理的数字 | |
| 9 | + let IntegerNum; //金额整数部分 | |
| 10 | + let DecimalNum; //金额小数部分 | |
| 11 | + let ChineseStr = ""; //输出的中文金额字符串 | |
| 12 | + let parts; //分离金额后用的数组,预定义 | |
| 13 | + let Symbol = ""; //正负值标记 | |
| 14 | + if (money == "") { | |
| 15 | + return ""; | |
| 16 | + } | |
| 17 | + | |
| 18 | + money = parseFloat(money); | |
| 19 | + if (money >= maxNum) { | |
| 20 | + alert('超出最大处理数字'); | |
| 21 | + return ""; | |
| 22 | + } | |
| 23 | + if (money == 0) { | |
| 24 | + ChineseStr = cnNums[0] + cnIntLast + cnInteger; | |
| 25 | + return ChineseStr; | |
| 26 | + } | |
| 27 | + if (money < 0) { | |
| 28 | + money = -money; | |
| 29 | + Symbol = "负 "; | |
| 30 | + } | |
| 31 | + money = money.toString(); //转换为字符串 | |
| 32 | + if (money.indexOf(".") == -1) { | |
| 33 | + IntegerNum = money; | |
| 34 | + DecimalNum = ''; | |
| 35 | + } else { | |
| 36 | + parts = money.split("."); | |
| 37 | + IntegerNum = parts[0]; | |
| 38 | + DecimalNum = parts[1].substr(0, 4); | |
| 39 | + } | |
| 40 | + if (parseInt(IntegerNum, 10) > 0) { //获取整型部分转换 | |
| 41 | + var zeroCount = 0; | |
| 42 | + var IntLen = IntegerNum.length; | |
| 43 | + for (var i = 0; i < IntLen; i++) { | |
| 44 | + var n = IntegerNum.substr(i, 1); | |
| 45 | + var p = IntLen - i - 1; | |
| 46 | + var q = p / 4; | |
| 47 | + var m = p % 4; | |
| 48 | + if (n == "0") { | |
| 49 | + zeroCount++; | |
| 50 | + } else { | |
| 51 | + if (zeroCount > 0) { | |
| 52 | + ChineseStr += cnNums[0]; | |
| 53 | + } | |
| 54 | + zeroCount = 0; //归零 | |
| 55 | + ChineseStr += cnNums[parseInt(n)] + cnIntRadice[m]; | |
| 56 | + } | |
| 57 | + if (m == 0 && zeroCount < 4) { | |
| 58 | + ChineseStr += cnIntUnits[q]; | |
| 59 | + } | |
| 60 | + } | |
| 61 | + ChineseStr += cnIntLast; | |
| 62 | + //整型部分处理完毕 | |
| 63 | + } | |
| 64 | + if (DecimalNum != '') { //小数部分 | |
| 65 | + var decLen = DecimalNum.length; | |
| 66 | + for (let i = 0; i < decLen; i++) { | |
| 67 | + let n = DecimalNum.substr(i, 1); | |
| 68 | + if (n != '0') { | |
| 69 | + ChineseStr += cnNums[Number(n)] + cnDecUnits[i]; | |
| 70 | + } | |
| 71 | + } | |
| 72 | + } | |
| 73 | + if (ChineseStr == '') { | |
| 74 | + ChineseStr += cnNums[0] + cnIntLast + cnInteger; | |
| 75 | + } else if (DecimalNum == '') { | |
| 76 | + ChineseStr += cnInteger; | |
| 77 | + } | |
| 78 | + ChineseStr = Symbol + ChineseStr; | |
| 79 | + | |
| 80 | + return ChineseStr; | |
| 81 | +} | |
| 0 | 82 | \ No newline at end of file | ... | ... |
src/views/fee/createFeeByComboList.vue
| 1 | 1 | <template> |
| 2 | 2 | <div class="create-fee-by-combo-container"> |
| 3 | 3 | <el-card class="box-card"> |
| 4 | - <div slot="header" class="clearfix"> | |
| 5 | - <span>{{ createFeeByComboInfo.payerObjName }}</span> | |
| 6 | - <span>{{ $t('createFeeByCombo.title') }}</span> | |
| 4 | + <div slot="header" class="flex justify-between"> | |
| 5 | + <div> | |
| 6 | + <span>{{ createFeeByComboInfo.payerObjName }}</span> | |
| 7 | + <span>{{ $t('createFeeByCombo.title') }}</span> | |
| 8 | + </div> | |
| 7 | 9 | <div class="header-tools"> |
| 8 | 10 | <el-button type="primary" size="small" @click="_chooseFeeCombo()"> |
| 9 | 11 | <i class="el-icon-search"></i>{{ $t('createFeeByCombo.chooseFeeCombo') }} | ... | ... |
src/views/fee/feeConfigManageList.vue
| ... | ... | @@ -37,7 +37,8 @@ |
| 37 | 37 | <el-col :span="4"> |
| 38 | 38 | <el-form-item> |
| 39 | 39 | <el-select v-model="conditions.feeFlag" :placeholder="$t('feeConfigManage.selectFeeFlag')" clearable> |
| 40 | - <el-option v-for="item in feeFlags" :key="item.statusCd" :label="item.name" :value="item.statusCd" /> | |
| 40 | + <el-option v-for="item in feeFlags" :key="item.statusCd" :label="item.name" | |
| 41 | + :value="item.statusCd" /> | |
| 41 | 42 | </el-select> |
| 42 | 43 | </el-form-item> |
| 43 | 44 | </el-col> | ... | ... |
src/views/fee/owePayFeeOrderList.vue
| ... | ... | @@ -194,7 +194,7 @@ export default { |
| 194 | 194 | payType: 'common', |
| 195 | 195 | authCode: '', |
| 196 | 196 | orderId: '', |
| 197 | - printUrl: '/print.html#/pages/property/printPayFee', | |
| 197 | + printUrl: '/#/pages/fee/printPayFee', | |
| 198 | 198 | detailIds: '', |
| 199 | 199 | paymentPoolId: '' |
| 200 | 200 | }, |
| ... | ... | @@ -496,7 +496,7 @@ export default { |
| 496 | 496 | }, |
| 497 | 497 | |
| 498 | 498 | _printOwnOrder() { |
| 499 | - window.open(`/print.html#/pages/property/printOweFee?payObjId=${this.owePayFeeOrderInfo.payObjId}&payObjType=${this.owePayFeeOrderInfo.payObjType}&payObjName=${this.owePayFeeOrderInfo.roomName}`) | |
| 499 | + window.open(`/#/views/fee/printOweFee?payObjId=${this.owePayFeeOrderInfo.payObjId}&payObjType=${this.owePayFeeOrderInfo.payObjType}&payObjName=${this.owePayFeeOrderInfo.roomName}`) | |
| 500 | 500 | }, |
| 501 | 501 | |
| 502 | 502 | _printOwnOrder2() { | ... | ... |
src/views/fee/printOweFeeLang.js
0 → 100644
| 1 | +export const messages = { | |
| 2 | + en: { | |
| 3 | + printOweFee: { | |
| 4 | + paymentNotice: 'Payment Notice', | |
| 5 | + owner: 'Owner', | |
| 6 | + printTime: 'Print Time', | |
| 7 | + chargeObject: 'Charge Object', | |
| 8 | + itemName: 'Item Name', | |
| 9 | + feePeriod: 'Fee Period', | |
| 10 | + unit: 'Unit', | |
| 11 | + areaUsage: 'Area/Usage', | |
| 12 | + unitPrice: 'Unit Price', | |
| 13 | + amount: 'Amount', | |
| 14 | + amountInWords: 'Amount in Words', | |
| 15 | + noData: 'No payment notice data available' | |
| 16 | + } | |
| 17 | + }, | |
| 18 | + zh: { | |
| 19 | + printOweFee: { | |
| 20 | + paymentNotice: '缴费通知单', | |
| 21 | + owner: '业主', | |
| 22 | + printTime: '打印时间', | |
| 23 | + chargeObject: '收费对象', | |
| 24 | + itemName: '项目名称', | |
| 25 | + feePeriod: '费用期间', | |
| 26 | + unit: '单位', | |
| 27 | + areaUsage: '面积/用量', | |
| 28 | + unitPrice: '单价', | |
| 29 | + amount: '金额', | |
| 30 | + amountInWords: '大写人民币(元)', | |
| 31 | + noData: '当前没有缴费通知数据' | |
| 32 | + } | |
| 33 | + } | |
| 34 | +} | |
| 0 | 35 | \ No newline at end of file | ... | ... |
src/views/fee/printOweFeeList.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="print-owe-fee-container"> | |
| 3 | + <el-card> | |
| 4 | + <div class="text-center"> | |
| 5 | + <h1>{{ printPayFeeInfo.printName }}{{ $t('printOweFee.paymentNotice') }}</h1> | |
| 6 | + </div> | |
| 7 | + <div class="margin-top flex justify-between" style="color:#000;font-size:14px"> | |
| 8 | + <div > | |
| 9 | + {{ $t('printOweFee.owner') }}:{{ printPayFeeInfo.ownerName }} | |
| 10 | + </div> | |
| 11 | + <div> | |
| 12 | + {{ $t('printOweFee.printTime') }}:{{ printPayFeeInfo.feeTime }} | |
| 13 | + </div> | |
| 14 | + </div> | |
| 15 | + <!-- 费用明细表格(原el-table) --> | |
| 16 | + <table style="width: 100%; border-collapse: collapse; color: #000; font-size: 14px; margin-top: 10px;"> | |
| 17 | + <thead> | |
| 18 | + <tr> | |
| 19 | + <th style="border: 1px solid #dcdfe6; text-align: center;">{{$t('printOweFee.chargeObject')}}</th> | |
| 20 | + <th style="border: 1px solid #dcdfe6; text-align: center;">{{$t('printOweFee.itemName')}}</th> | |
| 21 | + <th style="border: 1px solid #dcdfe6; text-align: center;">{{$t('printOweFee.feePeriod')}}</th> | |
| 22 | + <th style="border: 1px solid #dcdfe6; text-align: center;">{{$t('printOweFee.unit')}}</th> | |
| 23 | + <th style="border: 1px solid #dcdfe6; text-align: center;">{{$t('printOweFee.areaUsage')}}</th> | |
| 24 | + <th style="border: 1px solid #dcdfe6; text-align: center;">{{$t('printOweFee.unitPrice')}}</th> | |
| 25 | + <th style="border: 1px solid #dcdfe6; text-align: center;">{{$t('printOweFee.amount')}}</th> | |
| 26 | + </tr> | |
| 27 | + </thead> | |
| 28 | + <tbody> | |
| 29 | + <tr v-for="(row, idx) in printPayFeeInfo.fees" :key="idx"> | |
| 30 | + <td style="border: 1px solid #dcdfe6; text-align: center;">{{ row.payerObjName }}</td> | |
| 31 | + <td style="border: 1px solid #dcdfe6; text-align: center;">{{ row.feeName }}</td> | |
| 32 | + <td style="border: 1px solid #dcdfe6; text-align: center;"> | |
| 33 | + <div v-if="row.preDegrees"> | |
| 34 | + {{ dateFormat(row.endTime) }}至{{ _getDeadlineTime(row) }}<br> | |
| 35 | + {{ row.preDegrees }} 至 {{ row.curDegrees }} | |
| 36 | + </div> | |
| 37 | + <div v-else> | |
| 38 | + {{ dateFormat(row.endTime) }}至{{ _getDeadlineTime(row) }} | |
| 39 | + </div> | |
| 40 | + </td> | |
| 41 | + <td style="border: 1px solid #dcdfe6; text-align: center;">元</td> | |
| 42 | + <td style="border: 1px solid #dcdfe6; text-align: center;"> | |
| 43 | + {{ row.preDegrees ? (row.curDegrees - row.preDegrees).toFixed(2) : printPayFeeInfo.builtUpArea }} | |
| 44 | + </td> | |
| 45 | + <td style="border: 1px solid #dcdfe6; text-align: center;"> | |
| 46 | + {{ row.preDegrees && row.mwPrice > 0 ? row.mwPrice : `${row.squarePrice}/${row.additionalAmount}` }} | |
| 47 | + </td> | |
| 48 | + <td style="border: 1px solid #dcdfe6; text-align: center;">{{ row.feeTotalPrice }}</td> | |
| 49 | + </tr> | |
| 50 | + <tr> | |
| 51 | + <td style="border: 1px solid #dcdfe6; text-align: center;" > | |
| 52 | + {{$t('printOweFee.amountInWords')}} | |
| 53 | + </td> | |
| 54 | + <td style="border: 1px solid #dcdfe6; text-align: center;" colspan="4"> | |
| 55 | + {{ changeNumMoneyToChinese(printPayFeeInfo.feePrices) }} | |
| 56 | + </td> | |
| 57 | + <td style="border: 1px solid #dcdfe6; text-align: center;" colspan="2"> | |
| 58 | + {{ printPayFeeInfo.feePrices }} | |
| 59 | + </td> | |
| 60 | + </tr> | |
| 61 | + <tr v-if="printPayFeeInfo.content"> | |
| 62 | + <td style="border: 1px solid #dcdfe6; width: 300px;"> | |
| 63 | + <div style="max-width: 600px;" v-html="printPayFeeInfo.content"></div> | |
| 64 | + </td> | |
| 65 | + <td style="border: 1px solid #dcdfe6; text-align: center;"> | |
| 66 | + <img :src="printPayFeeInfo.qrImg" width="150px" height="150px"> | |
| 67 | + </td> | |
| 68 | + </tr> | |
| 69 | + </tbody> | |
| 70 | + </table> | |
| 71 | + | |
| 72 | + | |
| 73 | + <div id="print-btn" class="margin-top "> | |
| 74 | + <el-button type="primary" class="float-right" @click="_printPurchaseApplyDiv"> | |
| 75 | + <i class="el-icon-printer"></i> {{ $t('common.print') }} | |
| 76 | + </el-button> | |
| 77 | + <el-button type="warning" class="float-right" style="margin-right:20px;" @click="_closePage"> | |
| 78 | + {{ $t('common.cancel') }} | |
| 79 | + </el-button> | |
| 80 | + </div> | |
| 81 | + </el-card> | |
| 82 | + </div> | |
| 83 | +</template> | |
| 84 | + | |
| 85 | +<script> | |
| 86 | +import { listOweFees, listRoomsWhereFeeSet, queryFeePrintSpec } from '@/api/fee/printOweFeeApi' | |
| 87 | +import { getCommunityId } from '@/api/community/communityApi' | |
| 88 | +import { dateFormat } from '@/utils/dateUtil' | |
| 89 | +import { changeNumMoneyToChinese } from '@/utils/moneyUtil' | |
| 90 | + | |
| 91 | +export default { | |
| 92 | + name: 'PrintOweFeeList', | |
| 93 | + data() { | |
| 94 | + return { | |
| 95 | + printPayFeeInfo: { | |
| 96 | + communityName: '', | |
| 97 | + roomName: '', | |
| 98 | + feePrices: 0.00, | |
| 99 | + fees: [], | |
| 100 | + feeTime: '', | |
| 101 | + wechatName: '', | |
| 102 | + content: '', | |
| 103 | + qrImg: '', | |
| 104 | + payObjId: '', | |
| 105 | + builtUpArea: '', | |
| 106 | + payObjType: '', | |
| 107 | + payObjName: '', | |
| 108 | + ownerName: '', | |
| 109 | + printName: '', | |
| 110 | + targetEndTime: '', | |
| 111 | + }, | |
| 112 | + printFlag: '0', | |
| 113 | + communityId: '' | |
| 114 | + } | |
| 115 | + }, | |
| 116 | + created() { | |
| 117 | + this.communityId = getCommunityId() | |
| 118 | + this._initData() | |
| 119 | + }, | |
| 120 | + methods: { | |
| 121 | + _initData() { | |
| 122 | + this.printPayFeeInfo.payObjId = this.$route.query.payObjId | |
| 123 | + this.printPayFeeInfo.payObjType = this.$route.query.payObjType | |
| 124 | + this.printPayFeeInfo.payObjName = this.$route.query.payObjName | |
| 125 | + this.printPayFeeInfo.targetEndTime = this.$route.query.targetEndTime | |
| 126 | + | |
| 127 | + this._loadOweFees() | |
| 128 | + this._printOweRoom() | |
| 129 | + | |
| 130 | + this.printPayFeeInfo.feeTime = dateFormat(new Date().getTime()) | |
| 131 | + this.printPayFeeInfo.communityName = this.communityId | |
| 132 | + | |
| 133 | + this._loadPrintSpec() | |
| 134 | + }, | |
| 135 | + _loadPrintSpec() { | |
| 136 | + const param = { | |
| 137 | + page: 1, | |
| 138 | + row: 1, | |
| 139 | + specCd: 1010, | |
| 140 | + communityId: this.communityId | |
| 141 | + } | |
| 142 | + | |
| 143 | + queryFeePrintSpec(param).then(res => { | |
| 144 | + if (res.data.length > 0) { | |
| 145 | + this.printPayFeeInfo.content = res.data[0].content | |
| 146 | + this.printPayFeeInfo.qrImg = res.data[0].qrImg | |
| 147 | + this.printPayFeeInfo.printName = res.data[0].printName | |
| 148 | + } | |
| 149 | + }).catch(err => { | |
| 150 | + console.error('请求失败:', err) | |
| 151 | + }) | |
| 152 | + }, | |
| 153 | + _printPurchaseApplyDiv() { | |
| 154 | + this.printFlag = '1' | |
| 155 | + document.getElementById("print-btn").style.display = "none" | |
| 156 | + window.print() | |
| 157 | + window.opener = null | |
| 158 | + window.close() | |
| 159 | + }, | |
| 160 | + _closePage() { | |
| 161 | + window.opener = null | |
| 162 | + window.close() | |
| 163 | + }, | |
| 164 | + _printOweRoom() { | |
| 165 | + if (this.printPayFeeInfo.payObjType !== '3333') { | |
| 166 | + return | |
| 167 | + } | |
| 168 | + const param = { | |
| 169 | + page: 1, | |
| 170 | + row: 1, | |
| 171 | + roomId: this.printPayFeeInfo.payObjId, | |
| 172 | + communityId: this.communityId | |
| 173 | + } | |
| 174 | + | |
| 175 | + listRoomsWhereFeeSet(param).then(res => { | |
| 176 | + const listRoomData = res | |
| 177 | + Object.assign(this.printPayFeeInfo, listRoomData.rooms[0]) | |
| 178 | + if (listRoomData.rooms[0].roomType === '2020602') { | |
| 179 | + this.printPayFeeInfo.roomName = `${listRoomData.rooms[0].floorNum}-${listRoomData.rooms[0].roomNum}` | |
| 180 | + } else { | |
| 181 | + this.printPayFeeInfo.roomName = `${listRoomData.rooms[0].floorNum}-${listRoomData.rooms[0].unitNum}-${listRoomData.rooms[0].roomNum}` | |
| 182 | + } | |
| 183 | + }).catch(err => { | |
| 184 | + console.error('请求失败:', err) | |
| 185 | + }) | |
| 186 | + }, | |
| 187 | + _loadOweFees() { | |
| 188 | + const param = { | |
| 189 | + page: 1, | |
| 190 | + row: 50, | |
| 191 | + communityId: this.communityId, | |
| 192 | + payObjId: this.printPayFeeInfo.payObjId, | |
| 193 | + payObjType: this.printPayFeeInfo.payObjType, | |
| 194 | + targetEndTime: this.printPayFeeInfo.targetEndTime, | |
| 195 | + } | |
| 196 | + | |
| 197 | + listOweFees(param).then(res => { | |
| 198 | + const _fees = res.data | |
| 199 | + if (_fees.length < 1) { | |
| 200 | + this.printPayFeeInfo.oweFees = [] | |
| 201 | + this.$message.warning(this.$t('printOweFee.noData')) | |
| 202 | + return | |
| 203 | + } | |
| 204 | + this.printPayFeeInfo.fees = _fees | |
| 205 | + let _totalAmount = 0.0 | |
| 206 | + this.printPayFeeInfo.fees.forEach(item => { | |
| 207 | + _totalAmount += item.feeTotalPrice | |
| 208 | + }) | |
| 209 | + _totalAmount = Math.round(_totalAmount * 100) / 100 | |
| 210 | + this.printPayFeeInfo.feePrices = _totalAmount | |
| 211 | + }).catch(err => { | |
| 212 | + console.error('请求失败:', err) | |
| 213 | + }) | |
| 214 | + }, | |
| 215 | + _getDeadlineTime(_fee) { | |
| 216 | + if (_fee.amountOwed === 0 && _fee.endTime === _fee.deadlineTime) { | |
| 217 | + return "-" | |
| 218 | + } | |
| 219 | + if (_fee.state === '2009001') { | |
| 220 | + return "-" | |
| 221 | + } | |
| 222 | + return dateFormat(_fee.deadlineTime) | |
| 223 | + }, | |
| 224 | + dateFormat, | |
| 225 | + changeNumMoneyToChinese | |
| 226 | + } | |
| 227 | +} | |
| 228 | +</script> | |
| 229 | + | |
| 230 | +<style scoped> | |
| 231 | +.print-owe-fee-container { | |
| 232 | + padding: 20px; | |
| 233 | +} | |
| 234 | + | |
| 235 | +.margin-top { | |
| 236 | + margin-top: 20px; | |
| 237 | +} | |
| 238 | + | |
| 239 | +.float-right { | |
| 240 | + float: right; | |
| 241 | +} | |
| 242 | + | |
| 243 | +.text-center { | |
| 244 | + text-align: center; | |
| 245 | +} | |
| 246 | +th{ | |
| 247 | + height: 40px; | |
| 248 | +} | |
| 249 | +td{ | |
| 250 | + height: 40px; | |
| 251 | +} | |
| 252 | +</style> | |
| 0 | 253 | \ No newline at end of file | ... | ... |
src/views/fee/printPayFeeBangTaiList.vue
| ... | ... | @@ -112,6 +112,7 @@ import { queryFeeReceipt, queryFeeReceiptDetail, queryFeePrintSpec } from '@/api |
| 112 | 112 | import { getCommunityId } from '@/api/community/communityApi' |
| 113 | 113 | import { getUserId,getUserName } from '@/api/user/userApi' |
| 114 | 114 | import { dateFormat } from '@/utils/dateUtil' |
| 115 | +import { changeNumMoneyToChinese } from '@/utils/moneyUtil' | |
| 115 | 116 | |
| 116 | 117 | export default { |
| 117 | 118 | name: 'PrintPayFeeBangTaiList', |
| ... | ... | @@ -249,11 +250,7 @@ export default { |
| 249 | 250 | if (!date) return '' |
| 250 | 251 | return dateFormat(date) |
| 251 | 252 | }, |
| 252 | - changeNumMoneyToChinese(num) { | |
| 253 | - // 这里实现数字转中文大写金额的逻辑 | |
| 254 | - // 由于实现较复杂,建议使用第三方库或自行实现 | |
| 255 | - return num // 暂时返回原值 | |
| 256 | - }, | |
| 253 | + changeNumMoneyToChinese, | |
| 257 | 254 | printPurchaseApplyDiv() { |
| 258 | 255 | this.printFlag = '1' |
| 259 | 256 | document.getElementById("print-btn").style.display = "none" | ... | ... |
src/views/fee/propertyFeeList.vue
| 1 | 1 | <template> |
| 2 | 2 | <div class="property-fee-container"> |
| 3 | - <el-card class="box-card"> | |
| 4 | - <div slot="header" class="clearfix"> | |
| 5 | - <span>{{ $t('propertyFee.title') }}</span> | |
| 6 | - </div> | |
| 7 | - | |
| 8 | - <!-- 主费用信息组件 --> | |
| 9 | - <view-main-fee | |
| 10 | - ref="viewMainFee" | |
| 11 | - :fee-name="$t('propertyFee.feeName')" | |
| 12 | - fee-type-cd="888800010001" | |
| 13 | - pay-name="propertyPay" | |
| 14 | - /> | |
| 15 | 3 | |
| 16 | - <el-card class="box-card" style="margin-top: 20px;"> | |
| 17 | - <div slot="header" class="clearfix"> | |
| 18 | - <span>{{ $t('propertyFee.paymentHistory') }}</span> | |
| 19 | - </div> | |
| 20 | - | |
| 21 | - <el-row :gutter="20"> | |
| 22 | - <el-col :span="6"> | |
| 23 | - <el-date-picker | |
| 24 | - v-model="feeDetailInfo.startTime" | |
| 25 | - type="date" | |
| 26 | - :placeholder="$t('propertyFee.selectStartTime')" | |
| 27 | - style="width: 100%;" | |
| 28 | - /> | |
| 29 | - </el-col> | |
| 30 | - <el-col :span="6"> | |
| 31 | - <el-date-picker | |
| 32 | - v-model="feeDetailInfo.endTime" | |
| 33 | - type="date" | |
| 34 | - :placeholder="$t('propertyFee.selectEndTime')" | |
| 35 | - style="width: 100%;" | |
| 36 | - /> | |
| 37 | - </el-col> | |
| 38 | - <el-col :span="12"> | |
| 39 | - <el-button type="primary" @click="queryFeeDetailMethod()"> | |
| 40 | - <i class="el-icon-search"></i> | |
| 41 | - {{ $t('propertyFee.searchNow') }} | |
| 42 | - </el-button> | |
| 43 | - <el-button type="info" @click="resetFeeDetailMethod()" style="margin-left: 20px;"> | |
| 44 | - <i class="el-icon-refresh"></i> | |
| 45 | - {{ $t('propertyFee.reset') }} | |
| 46 | - </el-button> | |
| 47 | - </el-col> | |
| 48 | - </el-row> | |
| 49 | 4 | |
| 50 | - <el-table | |
| 51 | - :data="feeDetailInfo.feeDetails" | |
| 52 | - style="width: 100%; margin-top: 20px;" | |
| 53 | - border | |
| 54 | - stripe | |
| 55 | - > | |
| 56 | - <el-table-column prop="detailId" :label="$t('propertyFee.paymentId')" align="center" /> | |
| 57 | - <el-table-column prop="cycles" :label="$t('propertyFee.cycle')" align="center" /> | |
| 58 | - <el-table-column prop="primeRateName" :label="$t('propertyFee.paymentMethod')" align="center" /> | |
| 59 | - <el-table-column :label="$t('propertyFee.receivableAmount')" align="center"> | |
| 60 | - <template slot-scope="scope"> | |
| 61 | - <span v-if="scope.row.state=='1500'">{{scope.row.payerObjName}}{{$t('propertyFee.viewInFee')}}</span> | |
| 62 | - <span v-else>{{scope.row.receivableAmount}}</span> | |
| 63 | - </template> | |
| 64 | - </el-table-column> | |
| 65 | - <el-table-column :label="$t('propertyFee.receivedAmount')" align="center"> | |
| 66 | - <template slot-scope="scope"> | |
| 67 | - {{scope.row.receivedAmount}}<br> | |
| 68 | - <div v-if="scope.row.acctAmount>0"> | |
| 69 | - {{$t('propertyFee.accountDeduction')}}: {{scope.row.acctAmount}}<br> | |
| 70 | - </div> | |
| 71 | - <div v-for="(item,index) in scope.row.payFeeDetailDiscountDtoList" :key="index"> | |
| 72 | - {{item.discountName}}: {{Math.abs(item.discountPrice)}}<br> | |
| 73 | - </div> | |
| 74 | - </template> | |
| 75 | - </el-table-column> | |
| 76 | - <el-table-column prop="createTime" :label="$t('propertyFee.paymentTime')" align="center" /> | |
| 77 | - <el-table-column :label="$t('propertyFee.startTime')" align="center"> | |
| 78 | - <template slot-scope="scope"> | |
| 79 | - {{dateFormat(scope.row.startTime)}} | |
| 80 | - </template> | |
| 81 | - </el-table-column> | |
| 82 | - <el-table-column :label="$t('propertyFee.endTime')" align="center"> | |
| 83 | - <template slot-scope="scope"> | |
| 84 | - {{dateFormat(scope.row.endTime)}} | |
| 85 | - </template> | |
| 86 | - </el-table-column> | |
| 87 | - <el-table-column prop="cashierName" :label="$t('propertyFee.cashier')" align="center" /> | |
| 88 | - <el-table-column prop="stateName" :label="$t('propertyFee.status')" align="center" /> | |
| 89 | - <el-table-column prop="remark" :label="$t('propertyFee.remark')" align="center" /> | |
| 90 | - <el-table-column :label="$t('propertyFee.operation')" align="center"> | |
| 91 | - <template slot-scope="scope"> | |
| 92 | - <el-button-group> | |
| 93 | - <el-button | |
| 94 | - v-if="scope.row.state=='1400' || scope.row.state== '1200' || scope.row.state== ''" | |
| 95 | - size="mini" | |
| 96 | - @click="_openRefundModel(scope.row)" | |
| 97 | - > | |
| 98 | - {{ $t('propertyFee.applyRefund') }} | |
| 99 | - </el-button> | |
| 100 | - <el-button | |
| 101 | - v-if="scope.row.state!='1500'" | |
| 102 | - size="mini" | |
| 103 | - @click="_openFeeDetailDiscountModal(scope.row)" | |
| 104 | - > | |
| 105 | - {{ $t('propertyFee.discount') }} | |
| 106 | - </el-button> | |
| 107 | - </el-button-group> | |
| 108 | - </template> | |
| 109 | - </el-table-column> | |
| 110 | - </el-table> | |
| 5 | + <!-- 主费用信息组件 --> | |
| 6 | + <view-main-fee ref="viewMainFee" :fee-name="$t('propertyFee.feeName')" fee-type-cd="888800010001" | |
| 7 | + pay-name="propertyPay" /> | |
| 8 | + | |
| 9 | + <el-card class="box-card" style="margin-top: 20px;"> | |
| 10 | + <div slot="header" class="flex justify-between"> | |
| 11 | + <span>{{ $t('propertyFee.paymentHistory') }}</span> | |
| 12 | + </div> | |
| 111 | 13 | |
| 112 | - <el-pagination | |
| 113 | - :current-page.sync="page.current" | |
| 114 | - :page-sizes="[10, 20, 30, 50]" | |
| 115 | - :page-size="page.size" | |
| 116 | - :total="page.total" | |
| 117 | - layout="total, sizes, prev, pager, next, jumper" | |
| 118 | - @size-change="handleSizeChange" | |
| 119 | - @current-change="handleCurrentChange" | |
| 120 | - style="margin-top: 20px;" | |
| 121 | - /> | |
| 122 | - </el-card> | |
| 14 | + <el-row :gutter="20"> | |
| 15 | + <el-col :span="6"> | |
| 16 | + <el-date-picker v-model="feeDetailInfo.startTime" type="date" :placeholder="$t('propertyFee.selectStartTime')" | |
| 17 | + style="width: 100%;" /> | |
| 18 | + </el-col> | |
| 19 | + <el-col :span="6"> | |
| 20 | + <el-date-picker v-model="feeDetailInfo.endTime" type="date" :placeholder="$t('propertyFee.selectEndTime')" | |
| 21 | + style="width: 100%;" /> | |
| 22 | + </el-col> | |
| 23 | + <el-col :span="12"> | |
| 24 | + <el-button type="primary" @click="queryFeeDetailMethod()"> | |
| 25 | + <i class="el-icon-search"></i> | |
| 26 | + {{ $t('propertyFee.searchNow') }} | |
| 27 | + </el-button> | |
| 28 | + <el-button type="info" @click="resetFeeDetailMethod()" style="margin-left: 20px;"> | |
| 29 | + <i class="el-icon-refresh"></i> | |
| 30 | + {{ $t('propertyFee.reset') }} | |
| 31 | + </el-button> | |
| 32 | + </el-col> | |
| 33 | + </el-row> | |
| 123 | 34 | |
| 124 | - <!-- 子组件 --> | |
| 125 | - <return-pay-fee ref="returnPayFee" /> | |
| 126 | - <view-fee-detail-discount ref="viewFeeDetailDiscount" /> | |
| 35 | + <el-table :data="feeDetailInfo.feeDetails" style="width: 100%; margin-top: 20px;" border stripe> | |
| 36 | + <el-table-column prop="detailId" :label="$t('propertyFee.paymentId')" align="center" /> | |
| 37 | + <el-table-column prop="cycles" :label="$t('propertyFee.cycle')" align="center" /> | |
| 38 | + <el-table-column prop="primeRateName" :label="$t('propertyFee.paymentMethod')" align="center" /> | |
| 39 | + <el-table-column :label="$t('propertyFee.receivableAmount')" align="center"> | |
| 40 | + <template slot-scope="scope"> | |
| 41 | + <span v-if="scope.row.state == '1500'">{{ scope.row.payerObjName }}{{ $t('propertyFee.viewInFee') }}</span> | |
| 42 | + <span v-else>{{ scope.row.receivableAmount }}</span> | |
| 43 | + </template> | |
| 44 | + </el-table-column> | |
| 45 | + <el-table-column :label="$t('propertyFee.receivedAmount')" align="center"> | |
| 46 | + <template slot-scope="scope"> | |
| 47 | + {{ scope.row.receivedAmount }}<br> | |
| 48 | + <div v-if="scope.row.acctAmount > 0"> | |
| 49 | + {{ $t('propertyFee.accountDeduction') }}: {{ scope.row.acctAmount }}<br> | |
| 50 | + </div> | |
| 51 | + <div v-for="(item, index) in scope.row.payFeeDetailDiscountDtoList" :key="index"> | |
| 52 | + {{ item.discountName }}: {{ Math.abs(item.discountPrice) }}<br> | |
| 53 | + </div> | |
| 54 | + </template> | |
| 55 | + </el-table-column> | |
| 56 | + <el-table-column prop="createTime" :label="$t('propertyFee.paymentTime')" align="center" /> | |
| 57 | + <el-table-column :label="$t('propertyFee.startTime')" align="center"> | |
| 58 | + <template slot-scope="scope"> | |
| 59 | + {{ dateFormat(scope.row.startTime) }} | |
| 60 | + </template> | |
| 61 | + </el-table-column> | |
| 62 | + <el-table-column :label="$t('propertyFee.endTime')" align="center"> | |
| 63 | + <template slot-scope="scope"> | |
| 64 | + {{ dateFormat(scope.row.endTime) }} | |
| 65 | + </template> | |
| 66 | + </el-table-column> | |
| 67 | + <el-table-column prop="cashierName" :label="$t('propertyFee.cashier')" align="center" /> | |
| 68 | + <el-table-column prop="stateName" :label="$t('propertyFee.status')" align="center" /> | |
| 69 | + <el-table-column prop="remark" :label="$t('propertyFee.remark')" align="center" /> | |
| 70 | + <el-table-column :label="$t('propertyFee.operation')" align="center"> | |
| 71 | + <template slot-scope="scope"> | |
| 72 | + <el-button-group> | |
| 73 | + <el-button v-if="scope.row.state == '1400' || scope.row.state == '1200' || scope.row.state == ''" | |
| 74 | + size="mini" @click="_openRefundModel(scope.row)"> | |
| 75 | + {{ $t('propertyFee.applyRefund') }} | |
| 76 | + </el-button> | |
| 77 | + <el-button v-if="scope.row.state != '1500'" size="mini" @click="_openFeeDetailDiscountModal(scope.row)"> | |
| 78 | + {{ $t('propertyFee.discount') }} | |
| 79 | + </el-button> | |
| 80 | + </el-button-group> | |
| 81 | + </template> | |
| 82 | + </el-table-column> | |
| 83 | + </el-table> | |
| 84 | + | |
| 85 | + <el-pagination :current-page.sync="page.current" :page-sizes="[10, 20, 30, 50]" :page-size="page.size" | |
| 86 | + :total="page.total" layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange" | |
| 87 | + @current-change="handleCurrentChange" style="margin-top: 20px;" /> | |
| 127 | 88 | </el-card> |
| 89 | + | |
| 90 | + <!-- 子组件 --> | |
| 91 | + <return-pay-fee ref="returnPayFee" /> | |
| 92 | + <view-fee-detail-discount ref="viewFeeDetailDiscount" /> | |
| 93 | + | |
| 128 | 94 | </div> |
| 129 | 95 | </template> |
| 130 | 96 | |
| ... | ... | @@ -163,6 +129,8 @@ export default { |
| 163 | 129 | }, |
| 164 | 130 | created() { |
| 165 | 131 | this.communityId = getCommunityId() |
| 132 | + this.feeDetailInfo.feeId = this.$route.query.feeId | |
| 133 | + this.queryFeeDetailMethod() | |
| 166 | 134 | }, |
| 167 | 135 | methods: { |
| 168 | 136 | dateFormat(date) { |
| ... | ... | @@ -179,9 +147,9 @@ export default { |
| 179 | 147 | startTime: this.feeDetailInfo.startTime, |
| 180 | 148 | endTime: this.feeDetailInfo.endTime |
| 181 | 149 | } |
| 182 | - | |
| 183 | - const { data, total, records } = await queryFeeDetail(params) | |
| 184 | - this.feeDetailInfo.feeDetails = data | |
| 150 | + | |
| 151 | + const { feeDetails, total, records } = await queryFeeDetail(params) | |
| 152 | + this.feeDetailInfo.feeDetails = feeDetails | |
| 185 | 153 | this.feeDetailInfo.total = total |
| 186 | 154 | this.feeDetailInfo.records = records |
| 187 | 155 | this.page.total = records |
| ... | ... | @@ -219,11 +187,11 @@ export default { |
| 219 | 187 | <style lang="scss" scoped> |
| 220 | 188 | .property-fee-container { |
| 221 | 189 | padding: 20px; |
| 222 | - | |
| 190 | + | |
| 223 | 191 | .box-card { |
| 224 | 192 | margin-bottom: 20px; |
| 225 | 193 | } |
| 226 | - | |
| 194 | + | |
| 227 | 195 | .clearfix { |
| 228 | 196 | font-size: 18px; |
| 229 | 197 | font-weight: bold; | ... | ... |
src/views/fee/roomCreateFeeList.vue
| ... | ... | @@ -108,9 +108,7 @@ |
| 108 | 108 | </el-row> |
| 109 | 109 | |
| 110 | 110 | |
| 111 | - <room-create-fee-add ref="roomCreateFeeAdd"></room-create-fee-add> | |
| 112 | - <add-meter-water ref="addMeterWater"></add-meter-water> | |
| 113 | - <add-proxy-fee ref="addProxyFee"></add-proxy-fee> | |
| 111 | + | |
| 114 | 112 | <export-fee-import-excel ref="exportFeeImportExcel"></export-fee-import-excel> |
| 115 | 113 | <do-import-create-fee ref="doImportCreateFee"></do-import-create-fee> |
| 116 | 114 | <download-collection-letter-order ref="downloadCollectionLetterOrder"></download-collection-letter-order> |
| ... | ... | @@ -134,9 +132,7 @@ import SimplifyRefundDeposit from '@/components/fee/simplifyRefundDeposit' |
| 134 | 132 | import FeeDetailFeeRule from '@/components/fee/feeDetailFeeRule' |
| 135 | 133 | import FeeDetailRuleBill from '@/components/fee/feeDetailRuleBill' |
| 136 | 134 | |
| 137 | -import RoomCreateFeeAdd from '@/components/fee/roomCreateFeeAdd' | |
| 138 | -import AddMeterWater from '@/components/fee/addMeterWater' | |
| 139 | -import AddProxyFee from '@/components/fee/addProxyFee' | |
| 135 | + | |
| 140 | 136 | import ExportFeeImportExcel from '@/components/fee/exportFeeImportExcel' |
| 141 | 137 | import DoImportCreateFee from '@/components/fee/doImportCreateFee' |
| 142 | 138 | import DownloadCollectionLetterOrder from '@/components/fee/downloadCollectionLetterOrder' |
| ... | ... | @@ -162,9 +158,7 @@ export default { |
| 162 | 158 | FeeDetailFeeRule, |
| 163 | 159 | FeeDetailRuleBill, |
| 164 | 160 | |
| 165 | - RoomCreateFeeAdd, | |
| 166 | - AddMeterWater, | |
| 167 | - AddProxyFee, | |
| 161 | + | |
| 168 | 162 | ExportFeeImportExcel, |
| 169 | 163 | DoImportCreateFee, |
| 170 | 164 | DownloadCollectionLetterOrder | ... | ... |