推广员/组长添加备注

master
liaojinling 5 years ago
parent 58bd9414d6
commit d789a175f8

@ -942,6 +942,7 @@ class PromoteService {
'create_time' => time(),
'company_belong' => $params['company_belong'] ?? 0,
'company_relation' => $params['company_relation'] ?? 0,
'group_remark' => $params['group_remark'] ?? '',
];
if ($parent) {

@ -1088,6 +1088,7 @@ class PromoteController extends BaseController
if (!$result['status']) {
$this->ajaxReturn(['status' => 0, 'msg' => $result['message']]);
}
$status = $promoteService->addPromote($params, $parent);
if ($status) {
$this->ajaxReturn(['status' => 1, 'msg' => '添加成功']);
@ -1217,7 +1218,10 @@ class PromoteController extends BaseController
return false;
}
}
if (empty($_REQUEST['real_name'])) {
$this->error('联系人姓名不能为空', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
exit();
}
if (empty($_REQUEST['real_name'])) {
$this->error('联系人姓名不能为空', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
exit();
@ -1239,6 +1243,20 @@ class PromoteController extends BaseController
$this->error('您输入的手机号码格式不合法', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
}
$groupRemark = $_REQUEST['group_remark'] ?? '';
$promote = M('promote', 'tab_')->field(['id', 'level'])->where(['id' => $_REQUEST['id']])->find();
if (!$promote) {
$this->error('该推广员不存在', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
return false;
}
if ($promote['level'] == 2 && $groupRemark == '') {
$this->error('请输入部门名称', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
return false;
}
if ($promote['level'] == 3 && $groupRemark == '') {
$this->error('请输入小组名称', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
return false;
}
// if (empty($_REQUEST['email'])) {
// $this->error('电子邮箱不能为空', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
// return false;

@ -146,7 +146,7 @@ class QueryController extends BaseController
$promoteData = [];
if (!empty($promoteIdData)) {
$promoteIdData = array_unique($promoteIdData);
$promoteData = M('promote', 'tab_')->where(array('id' => ['in',$promoteIdData]))->getField('id,account,real_name');
$promoteData = M('promote', 'tab_')->where(array('id' => ['in',$promoteIdData]))->getField('id,account,real_name,group_remark');
}
foreach ($data as &$list) {
switch ($list['level']) {
@ -169,8 +169,10 @@ class QueryController extends BaseController
$chainArr = explode('/', $chain);
$list['p_p_pro_account'] = $promoteData[$chainArr[1]]['account'];
$list['p_p_pro_real_name'] = $promoteData[$chainArr[1]]['real_name'];
$list['p_p_pro_group_remark'] = $promoteData[$chainArr[1]]['group_remark'];
$list['p_pro_account'] = $promoteData[$list['parent_id']]['account'];
$list['p_pro_real_name'] = $promoteData[$list['parent_id']]['real_name'];
$list['p_pro_group_remark'] = $promoteData[$list['parent_id']]['group_remark'];
break;
}
$list['user_account'] = substr($list['user_account'], 0, 2) . '******' . substr($list['user_account'], 8);

@ -70,10 +70,27 @@
<tr>
<td class="l">昵称:</td>
<td class="r">
<input type="text" class="name txt" name="nickname" id="nickname" placeholder="请输入子渠道昵称">
<input type="text" class="name txt" name="nickname" id="nickname" placeholder="请输入昵称">
<span id="nickname_tip"></span>
</td>
</tr>
<?php if(I('promote_type', 0) == 0):?>
<tr>
<td class="l"><span class="req">*</span>部门名称:</td>
<td class="r">
<input type="text" class="name txt" name="group_remark" id="group_remark" placeholder="请输入部门名称">
<span id="group_remark_tip"></span>
</td>
</tr>
<?php elseif(I('promote_type', 0) == 1):?>
<tr>
<td class="l"><span class="req">*</span>小组名称:</td>
<td class="r">
<input type="text" class="name txt" name="group_remark" id="group_remark" placeholder="请输入小组名称">
<span id="group_remark_tip"></span>
</td>
</tr>
<?php endif;?>
<tr>
<td class="l"></td>
<td class="r">
@ -164,6 +181,14 @@
if($('#repassword').val()!==$('#password').val()){
return json_data = {'status':0,'msg':'子渠道密码和确认密码不一致'}
}
if ((promote_type == 0 || promote_type == 1) && $.trim($('#group_remark')) == '') {
if (promote_type == 0) {
return json_data = {'status':0,'msg':'请输入部门名称'}
}
if (promote_type == 1) {
return json_data = {'status':0,'msg':'请输入小组名称'}
}
}
var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(17[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
// if(!myreg.test($('#mobile_phone').val())){
// return json_data = {'status':0,'msg':'请输入正确的手机号'}

@ -62,6 +62,23 @@
<span id="email_tip"></span>
</td>
</tr>
<?php if(I('promote_type', 0) == 0):?>
<tr>
<td class="l"><span class="req">*</span>部门名称:</td>
<td class="r">
<input type="text" class="name txt" name="group_remark" value="{$data['group_remark']}" id="group_remark" placeholder="请输入部门名称">
<span id="group_remark_tip"></span>
</td>
</tr>
<?php elseif(I('promote_type', 0) == 1):?>
<tr>
<td class="l"><span class="req">*</span>小组名称:</td>
<td class="r">
<input type="text" class="name txt" name="group_remark" value="{$data['group_remark']}" id="group_remark" placeholder="请输入小组名称">
<span id="group_remark_tip"></span>
</td>
</tr>
<?php endif;?>
<tr>
<td class="l"></td>
<td class="r">

@ -213,8 +213,8 @@
<td>{$vo.sdk_version}</td>
<td>{$vo.server_name}</td>
<td>{$vo.game_player_name}</td>
<td>{$vo.p_p_pro_account}({$vo.p_p_pro_real_name})</td>
<td>{$vo.p_pro_account}({$vo.p_pro_real_name})</td>
<td>{$vo.p_p_pro_account}({$vo.p_p_pro_real_name}/{$vo.p_p_pro_group_remark})</td>
<td>{$vo.p_pro_account}({$vo.p_pro_real_name}/{$vo.p_pro_group_remark})</td>
<td>{$vo.pro_account}({$vo.pro_real_name})</td>
<td>{$vo.pay_time}</td>
<!-- <td>-->

@ -1101,3 +1101,6 @@ ADD COLUMN `can_view_recharge` tinyint(1) NOT NULL default 0 COMMENT '是否显
ALTER TABLE `tab_promote_belong`
ADD COLUMN `can_view_recharge` tinyint(1) NOT NULL default 0 COMMENT '是否显示充值数据 0否 1是';
ALTER TABLE `tab_promote`
ADD COLUMN `group_remark` varchar(50) NOT NULL default '' COMMENT '部门分组';

Loading…
Cancel
Save