Просмотр исходного кода

fix 修改提现管理数据统计随搜索条件变化

ylong 2 месяцев назад
Родитель
Сommit
76ff9daf4c

+ 1 - 0
src/views/finance/withdrawal/components/page-search.vue

@@ -60,6 +60,7 @@
     const searchRef = ref(null);
     const searchRef = ref(null);
     /** 搜索 */
     /** 搜索 */
     const search = (data) => {
     const search = (data) => {
+        delete data.timeRange;
         emit('search', { ...data });
         emit('search', { ...data });
     };
     };
 </script>
 </script>

+ 6 - 2
src/views/finance/withdrawal/index.vue

@@ -196,9 +196,9 @@
     });
     });
 
 
     // 获取统计数据
     // 获取统计数据
-    async function fetchStatistics() {
+    async function fetchStatistics(where) {
         try {
         try {
-            const res = await request.get('/sys/finance/withdrawSum');
+            const res = await request.get('/sys/finance/withdrawSum', { params: where });
             if (res.data.code === 200) {
             if (res.data.code === 200) {
                 Object.assign(statistics, res.data.data);
                 Object.assign(statistics, res.data.data);
             }
             }
@@ -325,6 +325,10 @@
     //刷新表格
     //刷新表格
     function reload(where) {
     function reload(where) {
         pageRef.value?.reload(where);
         pageRef.value?.reload(where);
+
+        // 刷新统计数据
+        console.log('刷新统计数据', where);
+        fetchStatistics(where);
     }
     }
 
 
     //审核
     //审核