Browse Source

报备单列表时间筛选优化

wufeng 2 years ago
parent
commit
2a41c47838

+ 1 - 1
app/abutment/controller/Filing.php

@@ -12,7 +12,7 @@ class Filing extends HomeBaseController
     //列表
     public function getList()
     {
-        $param = $this->request->only(['page' => 1, 'size' => 10, 'cat_id' => '', 'start_date' => '', 'end_date' => '', 'filingCode' => '', 'status' => '', 'good_name' => '', 'companyName' => '', 'companyCode' => '', 'orderCode' => ''], 'post');
+        $param = $this->request->only(['page' => 1, 'size' => 10, 'cat_id' => '', 'start' => '', 'end' => '', 'filingCode' => '', 'status' => '', 'good_name' => '', 'companyName' => '', 'companyCode' => '', 'orderCode' => '', 'start' => '', 'end' => ''], 'post');
 
         $param['supplierNo'] = $this->request->user['supplierNo'];
 

+ 1 - 1
app/abutment/logic/Filing.php

@@ -13,7 +13,7 @@ class Filing
 
         $where = [['is_del', '=', '0']];
         if ($data['cat_id'] != '') $where[] = ['cat_id', '=', $data['cat_id']];
-        if ($data['start_date'] != '' && $data['end_date'] != '') $where[] = ['addtime', 'between', [$data['start_date'], $data['end_date']]];
+        if ($data['start'] != '' && $data['end'] != '') $where[] = ['addtime', 'between', [$data['start'], $data['end']]];
         if ($data['filingCode'] != '') $where[] = ['filingCode', 'like', '%' . $data['filingCode'] . '%'];
         if ($data['status'] != '') $where[] = ['status', '=', $data['status']];
         if ($data['good_name'] != '') $where[] = ['good_name', 'like', '%' . $data['good_name'] . '%'];

+ 1 - 1
app/admin/controller/Filing.php

@@ -11,7 +11,7 @@ class Filing extends Base
     //列表
     public function getList()
     {
-        $param = $this->request->only(['page' => 1, 'size' => 10, 'cat_id' => '', 'start_date' => '', 'end_date' => '', 'filingCode' => '', 'status' => '', 'good_name' => '', 'companyName' => '', 'companyCode' => '', 'orderCode' => '', 'supplierNo' => ''], 'post');
+        $param = $this->request->only(['page' => 1, 'size' => 10, 'cat_id' => '', 'start' => '', 'end' => '', 'filingCode' => '', 'status' => '', 'good_name' => '', 'companyName' => '', 'companyCode' => '', 'orderCode' => '', 'supplierNo' => ''], 'post');
 
         return FilingLogic::list($param);
     }