Commit a2e5ee0148727f49c76623bbaf37b532785bbdef
1 parent
d5f60d46
v1.9 优化车辆费用导入模版没法导出的bug
Showing
1 changed file
with
16 additions
and
9 deletions
src/components/fee/exportCarFeeImportExcel.vue
| @@ -39,7 +39,9 @@ | @@ -39,7 +39,9 @@ | ||
| 39 | </template> | 39 | </template> |
| 40 | 40 | ||
| 41 | <script> | 41 | <script> |
| 42 | -import { listParkingAreas, listFeeConfigs, exportCarFeeExcel } from '@/api/fee/carCreateFeeApi' | 42 | +import { listParkingAreas, listFeeConfigs } from '@/api/fee/carCreateFeeApi' |
| 43 | +import { exportData } from '@/api/fee/exportFeeImportExcelApi' | ||
| 44 | +import { getCommunityId } from '@/api/community/communityApi' | ||
| 43 | 45 | ||
| 44 | export default { | 46 | export default { |
| 45 | name: 'ExportCarFeeImportExcel', | 47 | name: 'ExportCarFeeImportExcel', |
| @@ -112,16 +114,21 @@ export default { | @@ -112,16 +114,21 @@ export default { | ||
| 112 | }, | 114 | }, |
| 113 | async handleExport() { | 115 | async handleExport() { |
| 114 | try { | 116 | try { |
| 115 | - const paIds = this.selectedParkingAreas.join(',') | ||
| 116 | - const configIds = this.selectedConfigs.join(',') | ||
| 117 | - | ||
| 118 | - await exportCarFeeExcel({ | ||
| 119 | - paIds, | ||
| 120 | - configIds | 117 | + const params = { |
| 118 | + paIds: this.selectedParkingAreas.join(','), | ||
| 119 | + configIds: this.selectedConfigs.join(','), | ||
| 120 | + communityId: getCommunityId(), | ||
| 121 | + type: '2002', | ||
| 122 | + pagePath: 'exportCreateFeeTemplate' | ||
| 123 | + } | ||
| 124 | + exportData(params).then(response => { | ||
| 125 | + this.$message.success(response.msg) | ||
| 126 | + if (response.code === 0) { | ||
| 127 | + this.visible = false | ||
| 128 | + this.$router.push('/pages/property/downloadTempFile?tab=下载中心') | ||
| 129 | + } | ||
| 121 | }) | 130 | }) |
| 122 | 131 | ||
| 123 | - this.$message.success(this.$t('common.operationSuccess')) | ||
| 124 | - this.visible = false | ||
| 125 | } catch (error) { | 132 | } catch (error) { |
| 126 | this.$message.error(this.$t('common.exportError')) | 133 | this.$message.error(this.$t('common.exportError')) |
| 127 | } | 134 | } |