From 878414aeb2108e0b8c6be9adaa9b6c4de726b0bc Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 29 Apr 2020 13:52:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TestResourceController.class.php | 16 ++++++- .../View/TestResource/supportNumberList.html | 47 +++++++++++++++++-- 2 files changed, 58 insertions(+), 5 deletions(-) diff --git a/Application/Admin/Controller/TestResourceController.class.php b/Application/Admin/Controller/TestResourceController.class.php index f9d1fde7a..6a22b9c3d 100644 --- a/Application/Admin/Controller/TestResourceController.class.php +++ b/Application/Admin/Controller/TestResourceController.class.php @@ -78,8 +78,18 @@ class TestResourceController extends ThinkController if(!empty(I('user_account'))){ $map['tab_test_resource.user_account']=['like','%'.I('user_account').'%']; } - if(!empty(I('promote_name'))){ - $map['tab_test_resource.promote_account']=['like','%'.I('promote_name').'%']; + if(!empty(I('promote_id'))){ + + $promote_id = I('promote_id'); + + $promnote_arr = M("promote","tab_")->field("id")->where("chain like '%/{$promote_id}/%'")->select(); + + $promnote_arr = array_column($promnote_arr,"id"); + array_push($promnote_arr,$promote_id); + + $promnote_arr = implode(",",$promnote_arr); + + $map['tab_test_resource.promote_id']=['in',$promnote_arr]; } //为数据权限添加 setPowerPromoteIds($map, 'tab_test_resource.promote_id'); @@ -91,6 +101,8 @@ class TestResourceController extends ThinkController ->order('tab_test_resource.create_time DESC') ->select(); +// var_dump($data);die(); + foreach ($data as $key => $value) { $data[$key]['create_time'] = date('Y-m-d H:i:s',$value['create_time']); } diff --git a/Application/Admin/View/TestResource/supportNumberList.html b/Application/Admin/View/TestResource/supportNumberList.html index 341c8abf6..98ddc53c2 100644 --- a/Application/Admin/View/TestResource/supportNumberList.html +++ b/Application/Admin/View/TestResource/supportNumberList.html @@ -74,10 +74,27 @@   -
- -   + + + + + +
+ + -
+
+ +
+ @@ -200,6 +217,7 @@