diff --git a/Application/Admin/Controller/MarketPercentageController.class.php b/Application/Admin/Controller/MarketPercentageController.class.php index f836e01e3..e0ad51bce 100644 --- a/Application/Admin/Controller/MarketPercentageController.class.php +++ b/Application/Admin/Controller/MarketPercentageController.class.php @@ -202,17 +202,30 @@ class MarketPercentageController extends ThinkController if(is_administrator()||session('user_group_id') == 15||session('user_group_id') == 14||session('user_group_id') == 19||session('user_group_id') == 23) { unset($map['admin_id']); + $markerData = M("ucenter_member")->field("id")->where(['work_status'=>1])->select(); + + if ($markerData) { + $admin_map['sys_member.uid'] = ['not in',array_column($markerData,'id')]; + } + $admin_data = M("member") ->field("access.uid admin_id") ->join("left join sys_auth_group_access access on sys_member.uid = access.uid") ->join("left join sys_auth_group auth on access.group_id=auth.id") ->where(['group_id'=>['in','11,12,21']]) + ->where($admin_map) ->select(); if ($admin_data) { $map['admin_id'] = ['in',array_column($admin_data,'admin_id')]; } + if (!in_array($_REQUEST['admin_id'],array_column($markerData,'id'))) { + $_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):''; + } else { + $this->display("marketstaffsettle"); + die(); + } + - $_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):''; } @@ -991,7 +1004,7 @@ class MarketPercentageController extends ThinkController $map['pay_time'] = $_REQUEST['pay_time']; } } -// var_dump($map);die(); + $data = M("market_altogether","tab_") ->field("max(pay_time) pay_time,real_name,admin_id,nickname,level,sum(pay_amount) pay_amount,sum(extend_commission) extend_commission, sum(performance_commission) performance_commission,sum(achievement_bonus) achievement_bonus, diff --git a/Application/Admin/Controller/UserController.class.php b/Application/Admin/Controller/UserController.class.php index 5d1420f60..48c7c8bfd 100644 --- a/Application/Admin/Controller/UserController.class.php +++ b/Application/Admin/Controller/UserController.class.php @@ -420,6 +420,9 @@ class UserController extends AdminController $info['second_pwd'] = (empty($spwd) || $spwd == $oldspwd) ? $oldspwd : $spwd; $info['email'] = $_POST['email']; $info['mobile'] = isset($_POST['mobile']) ? $_POST['mobile'] : ''; + if($_POST['work_status']) { + $info['work_status'] = $_POST['work_status']; + } $ss['group_id'] = $_POST['auth']; $ss['houtai'] = $_POST['houtai']; $smember = $Member->where($map)->save($info); diff --git a/Application/Admin/View/User/add.html b/Application/Admin/View/User/add.html index 6de26319d..cb254779e 100644 --- a/Application/Admin/View/User/add.html +++ b/Application/Admin/View/User/add.html @@ -73,6 +73,20 @@ 管理员手机号码,用于找回密码等安全操作 +