From f1ff27e72013b5c89de241d4d3ab11244aa91e15 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期三, 12 十一月 2025 17:30:14 +0800
Subject: [PATCH] fix: 四流

---
 src/views/StatisticalReport/RewardStatistics.vue |  163 ++++++++++--------------------------------------------
 1 files changed, 31 insertions(+), 132 deletions(-)

diff --git a/src/views/StatisticalReport/RewardStatistics.vue b/src/views/StatisticalReport/RewardStatistics.vue
index c7e00e7..1aa7b2d 100644
--- a/src/views/StatisticalReport/RewardStatistics.vue
+++ b/src/views/StatisticalReport/RewardStatistics.vue
@@ -20,17 +20,6 @@
       </div>
       <ProTableQueryFilterBar @on-reset="reset">
         <template #query>
-          <QueryFilterItem tip-content="鐢虫姤鏈堜唤">
-            <FieldDatePicker
-              v-model="extraParamState.months"
-              type="months"
-              clearable
-              placeholder="璇烽�夋嫨鐢虫姤鏈堜唤"
-              format="YYYY-MM"
-              value-format="YYYY-MM"
-              @change="getList()"
-            ></FieldDatePicker>
-          </QueryFilterItem>
           <QueryFilterItem>
             <FieldSelect
               v-model="extraParamState.industrialParkId"
@@ -41,6 +30,18 @@
               clearable
               @change="getList()"
             />
+          </QueryFilterItem>
+          <QueryFilterItem tip-content="鐢虫姤鏈堜唤">
+            <FieldDatePicker
+              v-model="extraParamState.months"
+              type="months"
+              clearable
+              placeholder="璇烽�夋嫨鐢虫姤鏈堜唤"
+              format="YYYY-MM"
+              value-format="YYYY-MM"
+              @change="getList()"
+              :disabled-date="disabledDate"
+            ></FieldDatePicker>
           </QueryFilterItem>
           <QueryFilterItem>
             <SearchInput
@@ -53,7 +54,13 @@
           </QueryFilterItem>
         </template>
         <template #btn>
-          <el-button @click="handleExport()" icon="Download" type="primary">瀵煎嚭</el-button>
+          <el-button
+            v-if="checkSubModuleItemShow('pageButton', 'exportBtn')"
+            @click="handleExport()"
+            icon="Download"
+            type="primary"
+            >瀵煎嚭</el-button
+          >
         </template>
       </ProTableQueryFilterBar>
       <ProTableV2 v-bind="proTableProps" :columns="column" :show-operation-column="false">
@@ -133,127 +140,13 @@
 import EnterpriseWithdrawalDetailDialog from './components/EnterpriseWithdrawalDetailDialog.vue';
 import BalanceDetailDialog from './components/BalanceDetailDialog.vue';
 import { EnumParkRewardStatisticsDetailScene } from '@/constants';
+import { useRewardStatisticsMonths } from './hooks';
 
 defineOptions({
   name: 'RewardStatistics',
 });
 
-const column = defineColumns([
-  {
-    id: '1',
-    enCode: 'enterpriseName',
-    name: '浼佷笟鍚嶇О',
-    width: 250,
-  },
-  {
-    id: '2',
-    enCode: 'societyCreditCode',
-    name: '淇$敤浠g爜',
-    width: 200,
-  },
-  {
-    id: '3',
-    enCode: 'industrialParkName',
-    name: '鎵�灞炲洯鍖�',
-    width: 200,
-  },
-  {
-    id: '4',
-    enCode: 'contact',
-    name: '鑱旂郴浜�',
-    width: 150,
-  },
-  {
-    id: '5',
-    enCode: 'contactPhone',
-    name: '鑱旂郴鏂瑰紡',
-    width: 120,
-  },
-  {
-    id: '6',
-    enCode: 'month',
-    name: '鐢虫姤鏈堜唤',
-    width: 120,
-  },
-  {
-    id: '7',
-    enCode: 'batchNo',
-    name: '鐢虫姤鎵规鍙�',
-    width: 150,
-  },
-  {
-    id: '8',
-    enCode: 'sumFinanceAmount',
-    name: '璐㈡斂鎷ㄤ粯閲戦',
-    width: 120,
-  },
-  {
-    id: '9',
-    enCode: 'sumFinanceAmountBtn',
-    name: '璐㈡斂鎷ㄤ粯鏄庣粏',
-    width: 120,
-  },
-  {
-    id: '10',
-    enCode: 'sumTransferAmount',
-    name: '骞冲彴鎷ㄤ粯閲戦',
-    width: 120,
-  },
-  {
-    id: '11',
-    enCode: 'sumTransferAmountBtn',
-    name: '骞冲彴鎷ㄤ粯鏄庣粏',
-    width: 120,
-  },
-  {
-    id: '12',
-    enCode: 'sumRechargeAmount',
-    name: '浼佷笟鍏呭�兼�婚',
-    width: 120,
-  },
-  {
-    id: '13',
-    enCode: 'sumRechargeAmountBtn',
-    name: '浼佷笟鍏呭�兼槑缁�',
-    width: 120,
-  },
-  {
-    id: '14',
-    enCode: 'sumTradeAmount',
-    name: '浼佷笟娑堣垂鎬婚',
-    width: 120,
-  },
-  {
-    id: '15',
-    enCode: 'sumTradeAmountBtn',
-    name: '浼佷笟娑堣垂鏄庣粏',
-    width: 120,
-  },
-  {
-    id: '16',
-    enCode: 'sumDrawWithAmount',
-    name: '浼佷笟鎻愮幇鎬婚',
-    width: 120,
-  },
-  {
-    id: '17',
-    enCode: 'sumDrawWithAmountBtn',
-    name: '浼佷笟鎻愮幇鏄庣粏',
-    width: 120,
-  },
-  {
-    id: '18',
-    enCode: 'amount',
-    name: '璐︽埛浣欓',
-    width: 120,
-  },
-  {
-    id: '19',
-    enCode: 'amountBtn',
-    name: '浣欓鏄庣粏',
-    width: 120,
-  },
-]);
+const { checkSubModuleItemShow, column, operationBtns } = useAccess({});
 
 const BaseState = {
   loading: true,
@@ -289,14 +182,15 @@
       //   Message.errorMessage('璇烽�夋嫨鏈堜唤');
       //   return;
       // }
-      if (!extraParamState.months.length) {
-        Message.errorMessage('璇烽�夋嫨鏈堜唤');
-        return;
-      }
       if (!extraParamState.industrialParkId) {
         Message.errorMessage('璇烽�夋嫨鍥尯');
         return;
       }
+      if (!extraParamState.months.length) {
+        Message.errorMessage('璇烽�夋嫨鏈堜唤');
+        return;
+      }
+
       let params: API.GetRewardStatisticsInput = {
         pageModel: {
           rows: pageSize,
@@ -358,6 +252,11 @@
   }
 );
 
+const { disabledDate } = useRewardStatisticsMonths({
+  industrialParkId: toRef(extraParamState, 'industrialParkId'),
+  enabled: computed(() => !!extraParamState.industrialParkId),
+});
+
 const handleExport = _.debounce(
   async () => {
     if (!extraParamState.month) {

--
Gitblit v1.9.1