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 @@ 管理员手机号码,用于找回密码等安全操作 + + 离职状态 + + + + + 离职状态,市场专员离职发放后自动标志未离职 + + + diff --git a/Application/Admin/View/User/edit.html b/Application/Admin/View/User/edit.html index db208188c..84f1118de 100644 --- a/Application/Admin/View/User/edit.html +++ b/Application/Admin/View/User/edit.html @@ -68,6 +68,20 @@ + + 离职状态 + + + + + 离职状态,市场专员离职发放后自动标志未离职 + + + 手机: diff --git a/Data/update.sql b/Data/update.sql index 0d227f99c..6035dfc39 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -2405,4 +2405,7 @@ ADD COLUMN `is_qualifity` tinyint(2) NULL COMMENT '是否具有游戏资质 0 ALTER TABLE `tab_market_altogether` ADD COLUMN `achievement_profit` decimal(13, 2) NULL DEFAULT 0.00 COMMENT '开发毛利' AFTER `wait_achievement_commission`, -ADD COLUMN `performance_profit` decimal(13, 2) NULL DEFAULT 0.00 COMMENT '维护毛利' AFTER `achievement_profit`; \ No newline at end of file +ADD COLUMN `performance_profit` decimal(13, 2) NULL DEFAULT 0.00 COMMENT '维护毛利' AFTER `achievement_profit`; + +ALTER TABLE `sys_ucenter_member` +ADD COLUMN `work_status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '离职状态' AFTER `openid_sign`; \ No newline at end of file