Explorar o código

批发端、零售店余额明细列表新增筛选字段:收支类型、事件类型

ouyang hai 1 mes
pai
achega
9ac187956c

+ 9 - 3
app-ghs/controllers/ShopYeChangeController.php

@@ -27,6 +27,14 @@ class ShopYeChangeController extends BaseController
         if (!empty($tx)) {
             $where['tx'] = $tx;
         }
+        // 事件类型
+        if (isset($get['capitalType']) && $get['capitalType'] !== '') {
+            $where['capitalType'] = (int)$get['capitalType'];
+        }
+        // 收支类型筛选:1 收入,0 支出;未传参时不筛选
+        if (isset($get['io']) && $get['io'] !== '') {
+            $where['io'] = (int)$get['io'];
+        }
         $searchTime = isset($get['searchTime']) && !empty($get['searchTime']) ? $get['searchTime'] : '';
         $startTime = $get['startTime'] ?? '';
         $endTime = $get['endTime'] ?? '';
@@ -38,7 +46,6 @@ class ShopYeChangeController extends BaseController
         }
         $list = ShopYeChangeClass::getChangeList($where);
         if ($export == 1) {
-
             ini_set('memory_limit', '2045M');
             set_time_limit(0);
             if (isset($where['addTime']) == false) {
@@ -58,5 +65,4 @@ class ShopYeChangeController extends BaseController
         }
         util::success($list);
     }
-
-}
+}

+ 8 - 0
app-hd/controllers/ShopYeChangeController.php

@@ -25,6 +25,14 @@ class ShopYeChangeController extends BaseController
         if (!empty($tx)) {
             $where['tx'] = $tx;
         }
+        // 事件类型
+        if (isset($get['capitalType']) && $get['capitalType'] !== '') {
+            $where['capitalType'] = (int)$get['capitalType'];
+        }
+        // 收支类型筛选:1 收入,0 支出;未传参时不筛选
+        if (isset($get['io']) && $get['io'] !== '') {
+            $where['io'] = (int)$get['io'];
+        }
         $list = ShopYeChangeClass::getChangeList($where);
         util::success($list);
     }