Commit b9b17c9e2061d8fadb87adf8c73a6506a5024639
1 parent
5870b43f
v1.9 解决优惠申请导出bug
Showing
1 changed file
with
17 additions
and
2 deletions
src/views/fee/applyRoomDiscountManageList.vue
| @@ -118,7 +118,7 @@ | @@ -118,7 +118,7 @@ | ||
| 118 | </template> | 118 | </template> |
| 119 | 119 | ||
| 120 | <script> | 120 | <script> |
| 121 | -import { getDict } from '@/api/community/communityApi' | 121 | +import { getDict,getCommunityId } from '@/api/community/communityApi' |
| 122 | import { queryApplyRoomDiscount, queryApplyRoomDiscountType } from '@/api/fee/applyRoomDiscountManageApi' | 122 | import { queryApplyRoomDiscount, queryApplyRoomDiscountType } from '@/api/fee/applyRoomDiscountManageApi' |
| 123 | import AddApplyRoomDiscount from '@/components/fee/addApplyRoomDiscount' | 123 | import AddApplyRoomDiscount from '@/components/fee/addApplyRoomDiscount' |
| 124 | import EditApplyRoomDiscount from '@/components/fee/editApplyRoomDiscount' | 124 | import EditApplyRoomDiscount from '@/components/fee/editApplyRoomDiscount' |
| @@ -160,6 +160,7 @@ export default { | @@ -160,6 +160,7 @@ export default { | ||
| 160 | this.getList() | 160 | this.getList() |
| 161 | this.getApplyTypes() | 161 | this.getApplyTypes() |
| 162 | this.getDictData() | 162 | this.getDictData() |
| 163 | + this.searchForm.communityId = getCommunityId() | ||
| 163 | }, | 164 | }, |
| 164 | methods: { | 165 | methods: { |
| 165 | async getList() { | 166 | async getList() { |
| @@ -250,8 +251,22 @@ export default { | @@ -250,8 +251,22 @@ export default { | ||
| 250 | handleOpenDiscountType() { | 251 | handleOpenDiscountType() { |
| 251 | this.$router.push('/views/fee/discountType') | 252 | this.$router.push('/views/fee/discountType') |
| 252 | }, | 253 | }, |
| 253 | - handleExport() { | 254 | + async handleExport() { |
| 254 | // 导出逻辑 | 255 | // 导出逻辑 |
| 256 | + try { | ||
| 257 | + const params = { | ||
| 258 | + ...this.searchForm, | ||
| 259 | + communityId: this.searchForm.communityId, | ||
| 260 | + pagePath: 'applyRoomDiscount' | ||
| 261 | + } | ||
| 262 | + | ||
| 263 | + await exportData(params) | ||
| 264 | + this.$message.success(this.$t('reportFeeSummary.exportSuccess')) | ||
| 265 | + this.$router.push('/pages/property/downloadTempFile?tab=下载中心') | ||
| 266 | + } catch (error) { | ||
| 267 | + console.error('Failed to export:', error) | ||
| 268 | + this.$message.error(this.$t('reportFeeSummary.exportFailed')) | ||
| 269 | + } | ||
| 255 | }, | 270 | }, |
| 256 | handleSuccess() { | 271 | handleSuccess() { |
| 257 | this.getList() | 272 | this.getList() |