From 758841f36b85716da1c179deef106d2c99503afd Mon Sep 17 00:00:00 2001
From: sen <sen@qq.com>
Date: 星期二, 31 三月 2026 13:36:30 +0800
Subject: [PATCH] 添加应收账单导出

---
 ui/admin-ui3/src/hooks/usePagePlus.ts |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/ui/admin-ui3/src/hooks/usePagePlus.ts b/ui/admin-ui3/src/hooks/usePagePlus.ts
index e943f24..f00eede 100644
--- a/ui/admin-ui3/src/hooks/usePagePlus.ts
+++ b/ui/admin-ui3/src/hooks/usePagePlus.ts
@@ -43,10 +43,11 @@
             params = opts.getBeginListFunc!(params)
         }
         pageF.loading = true;
+        const queryParams = filterEmptyParams(opts.queryParams.value);
         opts.getListApi!({ 
             pageNum: page.currentPage, 
             pageSize: page.pageSize, 
-            ...Object.assign(params ? params : {}, opts.queryParams.value) 
+            ...Object.assign(params ? params : {}, queryParams) 
         }).then((res: any) => {
             tableData.value = res.rows || [];
             pageF.loading = false;
@@ -167,8 +168,8 @@
      * 瀵煎嚭
      */
     const handleExport =()=>{
-        console.log(opts.queryParams.value)
-        opts.exportApi!(opts.queryParams.value);
+        const queryParams = filterEmptyParams(opts.queryParams.value);
+        opts.exportApi!(queryParams);
     }
     const handleDelete  = () =>{
         if ( !(pageF?.ids)|| pageF?.ids?.length === 0) {
@@ -201,6 +202,20 @@
         }
 
     }
+    /**
+ * 杩囨护绌哄瓧绗︿覆鍙傛暟
+ */
+const filterEmptyParams = (params: any) => {
+    const result: any = {};
+    for (const key in params) {
+        const val = params[key];
+        // 杩囨护绌哄瓧绗︿覆銆乶ull銆乽ndefined
+        if (val !== '' && val !== null && val !== undefined) {
+            result[key] = val;
+        }
+    }
+    return result;
+};
     return {
         pageF,
         tableData,

--
Gitblit v1.8.0