From 838adb3d70c32d642d1b18164dec9095dce6f76f Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Mon, 24 Jul 2023 10:33:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/adminapi/lists/CompanyLists.php | 3 ++- app/adminapi/lists/auth/AdminLists.php | 9 ++++++++- vendor/ebaoquan/junziqian_sdk | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/adminapi/lists/CompanyLists.php b/app/adminapi/lists/CompanyLists.php index ac5902596..4e9e19b29 100644 --- a/app/adminapi/lists/CompanyLists.php +++ b/app/adminapi/lists/CompanyLists.php @@ -39,7 +39,8 @@ class CompanyLists extends BaseAdminDataLists implements ListsSearchInterface public function setSearch(): array { return [ - '=' => ['level_two', 'level_one', 'company_name', 'organization_code', 'city', 'area', 'street', 'company_type', 'master_name', 'master_position', 'master_phone', 'master_email', 'other_contacts', 'area_manager', 'is_contract', 'account', 'password', 'deposit', 'deposit_time', 'qualification', 'status'], + '=' => ['level_two', 'level_one', 'organization_code', 'city', 'area', 'street', 'company_type', 'master_name', 'master_position', 'master_phone', 'master_email', 'other_contacts', 'area_manager', 'is_contract', 'account', 'password', 'deposit', 'deposit_time', 'qualification', 'status'], + '%like%' => ['company_name'], ]; } diff --git a/app/adminapi/lists/auth/AdminLists.php b/app/adminapi/lists/auth/AdminLists.php index 5ab19bb4f..4a339e7c8 100755 --- a/app/adminapi/lists/auth/AdminLists.php +++ b/app/adminapi/lists/auth/AdminLists.php @@ -25,6 +25,7 @@ use app\common\model\auth\SystemRole; use app\common\model\Company; use app\common\model\dept\Dept; use app\common\model\dept\Jobs; +use think\facade\Db; /** * 管理员列表 @@ -122,6 +123,13 @@ class AdminLists extends BaseAdminDataLists implements ListsExtendInterface, Lis } if(isset($this->params['company_id']) && $this->params['company_id'] != ''){ $where[] = ['company_id', '=', $this->params['company_id']]; + }else{ + if($this->adminInfo['root']!=1){ + $column_id=Db::name('company')->where('level_two',$this->adminInfo['company_id'])->column('id'); + array_push($column_id,$this->adminInfo['company_id']); + $where[]=['company_id','in',$column_id]; + + } } return $where; } @@ -142,7 +150,6 @@ class AdminLists extends BaseAdminDataLists implements ListsExtendInterface, Lis 'id', 'name', 'account', 'create_time', 'disable', 'root', 'province', 'city', 'area', 'street', 'login_time', 'login_ip', 'multipoint_login', 'avatar', 'company_id', 'is_contract', 'create_time' ]; - $adminLists = Admin::field($field) ->where($this->searchWhere) ->where($this->queryWhere()) diff --git a/vendor/ebaoquan/junziqian_sdk b/vendor/ebaoquan/junziqian_sdk index 1294ea49f..9acc82cd2 160000 --- a/vendor/ebaoquan/junziqian_sdk +++ b/vendor/ebaoquan/junziqian_sdk @@ -1 +1 @@ -Subproject commit 1294ea49ff9ecc4532821f8798304816cbf8dd74 +Subproject commit 9acc82cd23d807280ddd29df2117e7890094d049