Browse Source

Merge branch 'feat/v20241227-联盟卡消费记录导出' into dev

GuYun-D 3 months ago
parent
commit
f1ecc30b2e

+ 1 - 2
src/views/business/alliance/components/Buyers.vue

@@ -1,8 +1,7 @@
 <template>
   <div class="join-shop-list-container">
-    {{ cardName }}
     <div style="display: flex; justify-content: flex-end; margin-bottom: 20px">
-      <el-button @click="handleExport" :loading="isExportLoading" size="mini" type="primary">导出excel</el-button>
+      <el-button  :disabled="!list || !list.length" @click="handleExport" :loading="isExportLoading" size="mini" type="primary">导出excel</el-button>
     </div>
     <!-- 查询结果 -->
     <el-table v-loading="listLoading" element-loading-text="正在查询中..." :data="list" v-bind="{ stripe: true, size: 'small', border: true, highlightCurrentRow: true }">

+ 3 - 3
src/views/business/alliance/components/ConsumptionDialog.vue

@@ -2,7 +2,7 @@
   <el-dialog :close-on-click-modal="false" title="消费记录" :visible.sync="consumptionDialogVisible" width="60%" append-to-body>
     <div class="join-shop-list-container">
       <div style="display: flex; justify-content: flex-end; margin-bottom: 20px">
-        <el-button @click="handleExport" :loading="isExportLoading" size="mini" type="primary">导出excel</el-button>
+        <el-button :disabled="!list || !list.length" @click="handleExport" :loading="isExportLoading" size="mini" type="primary">导出excel</el-button>
       </div>
       <!-- 查询结果 -->
       <el-table v-loading="listLoading" element-loading-text="正在查询中..." :data="list" v-bind="{ stripe: true, size: 'small', border: true, highlightCurrentRow: true }">
@@ -47,7 +47,7 @@
 
 <script>
 import { getConsumptionRecordByUserIdAndAllianceCardIdApi, exportConsumptionRecordByUserIdAndAllianceCardIdApi } from '@/api/business'
-import {exportExcel} from '../utils'
+import { exportExcel } from '../utils'
 
 export default {
   data() {
@@ -63,7 +63,7 @@ export default {
       },
       consumptionDialogVisible: false,
       isExportLoading: false,
-      memberName: ""
+      memberName: ''
     }
   },