市场业绩毛利修改

master
zhengyongxing 4 years ago
parent 8cc9bdb0c6
commit 250d2ac2c0

@ -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,

@ -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);

@ -73,6 +73,20 @@
<span class="notice-text">管理员手机号码,用于找回密码等安全操作</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">离职状态</td>
<td class="r table_radio table_radio2">
<span class="table_btn">
<label>
<input type="radio" class="inp_radio" value="1" name="work_status" <if condition="$data['work_status'] eq 1"> checked</if>> 离职
</label>
<label>
<input type="radio" class="inp_radio" value="0" name="work_status" <if condition="$data['work_status'] eq 0"> checked</if> > 未离职
</label></span>
<span class="notice-text" style="line-height:1.4;width:68%;">离职状态,市场专员离职发放后自动标志未离职</span>
</td>
</tr>
</tbody>
</table>

@ -68,6 +68,20 @@
<!-- </if>-->
</td>
</tr>
<tr>
<td class="l noticeinfo">离职状态</td>
<td class="r table_radio table_radio2">
<span class="table_btn">
<label>
<input type="radio" class="inp_radio" value="1" name="work_status" <if condition="$list['work_status'] eq 1"> checked</if>> 离职
</label>
<label>
<input type="radio" class="inp_radio" value="0" name="work_status" <if condition="$list['work_status'] eq 0"> checked</if> > 未离职
</label></span>
<span class="notice-text" style="line-height:1.4;width:68%;">离职状态,市场专员离职发放后自动标志未离职</span>
</td>
</tr>
<if condition="is_administrator() and I('get.id') eq C('USER_ADMINISTRATOR')">
<tr>
<td class="l">手机:</td>

@ -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`;
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`;
Loading…
Cancel
Save