Explorar o código

feat(subsidyReview): add export functionality for subsidy review

- Introduced an export button to allow users to download subsidy review data based on current filters.
- Updated page configuration to include an export URL and implemented the `handleExport` method for data export.
- Enhanced the user interface by adding the export button next to the batch audit button.
ylong hai 1 mes
pai
achega
bbd13b677f

+ 17 - 1
src/views/finance/subsidyReview/index.vue

@@ -51,6 +51,16 @@
                 >
                     批量审核
                 </el-button>
+                <el-button
+                    type="success"
+                    plain
+                    @click="handleExport"
+                    v-permission="'order:orderCompensationLog:exportList'"
+                    style="margin-left: 12px"
+                    :icon="DownloadOutlined"
+                >
+                    导出
+                </el-button>
             </template>
 
             <template #type="{ row }">
@@ -126,7 +136,7 @@
     import LogDialog from './components/log-dialog.vue';
     import BatchAudit from './components/batch-audit.vue';
     import { ElMessage } from 'element-plus';
-    import { rowKey } from 'element-plus/es/components/table-v2/src/common';
+    import { DownloadOutlined } from '@/components/icons';
     defineOptions({ name: 'SubsidyReview' });
 
     const { proxy } = getCurrentInstance();
@@ -207,6 +217,7 @@
 
     const pageConfig = reactive({
         pageUrl: '/order/orderCompensationLog/pagelist',
+        exportUrl: '/order/orderCompensationLog/exportList',
         fileName: '补贴审核',
         cacheKey: 'subsidyReview',
         rowKey: 'id',
@@ -221,6 +232,11 @@
         pageRef.value?.reload(where);
     }
 
+    // 导出(带当前筛选:userId/type/status/startTime/endTime)
+    function handleExport() {
+        pageRef.value?.exportData('补贴审核');
+    }
+
     // 审核
     const handleAudit = (row) => {
         // 使用批量审核的弹窗,传入单个ID

+ 1 - 1
src/views/mallOrder/refund/components/refund-detail-dialog.vue

@@ -541,7 +541,7 @@
                     "
                     >备注</el-button
                 >
-                <el-button @click="handleRefuse" :disabled="!canOperate">{{
+                <el-button @click="handleRefuse">{{
                     isRefundOnly ? '拒绝退款申请' : '拒绝退货申请'
                 }}</el-button>
                 <el-button @click="handleAgree" :disabled="!canOperate">{{