推广公司

master
liuweiwen 5 years ago
parent 043de55e0b
commit ee2fc154a4

@ -198,13 +198,16 @@ class PromoteController extends ThinkController
parent::lists('SiteApply', $p, $map);
}
public function add($account=null, $password=null, $second_pwd=null, $real_name=null, $email=null, $mobile_phone=null, $bank_name=null, $bank_card=null, $admin=null, $status=null, $ba_id = null)
public function add($account=null, $password=null, $second_pwd=null, $real_name=null, $email=null,
$mobile_phone=null, $bank_name=null, $bank_card=null, $admin=null, $status=null, $ba_id = null, $company_id = null)
{
if (IS_POST) {
if (C('PROMOTE_AUTO_AUDIT') == 1) {
$status = 1;
}
$data = array('account'=>$account,'password'=>$password,'second_pwd'=>$second_pwd,'real_name'=>$real_name,'email'=>$email,'mobile_phone'=>$mobile_phone,'bank_name'=>$bank_name,'bank_card'=>$bank_card,'admin_id'=>session('user_auth')['uid'],'status'=>$status,'ba_id'=>$ba_id);
$data = array('account'=>$account,'password'=>$password,'second_pwd'=>$second_pwd,'real_name'=>$real_name,
'email'=>$email,'mobile_phone'=>$mobile_phone,'bank_name'=>$bank_name,'bank_card'=>$bank_card,
'admin_id'=>session('user_auth')['uid'],'status'=>$status,'ba_id'=>$ba_id, 'company_id' => $company_id);
if (preg_match('/^[a-zA-Z0-9]{6,15}$/', $account)==false) {
$this->error('账号只能是6-15位字母或数字');
@ -217,6 +220,7 @@ class PromoteController extends ThinkController
$ba = new \Admin\Model\BusinessAffairsModel();
$ba->add_child($_REQUEST['ba_id'],$res);
} */
session('user_auth_promote_ids', null);
$this->success("添加成功", U('lists'));
} else {
$this->error($res);
@ -224,6 +228,8 @@ class PromoteController extends ThinkController
} else {
$this->meta_title ='新增渠道信息';
$this->m_title = '推广员列表';
$companys = M('promote_company', 'tab_')->where(['status' => 1])->select();
$this->assign('companys', $companys);
$this->assign('commonset', M('Kuaijieicon')->where(['url'=>'Promote/lists/type/1','status'=>1])->find());
$this->display();
}
@ -337,7 +343,8 @@ class PromoteController extends ThinkController
$this->m_title = '推广员列表';
$this->assign('commonset', M('Kuaijieicon')->where(['url'=>'Promote/lists/type/1','status'=>1])->find());
$companys = M('promote_company', 'tab_')->where(['status' => 1])->select();
$this->assign('companys', $companys);
$this->display();
}
}

@ -168,6 +168,22 @@
</td>
</tr>
</if>
<tr>
<td class="l">推广公司:</td>
<td class="r">
<select name="company_id" id="company_id">
<option value="0">请选择推广公司</option>
<volist name="companys" id="vo">
<option value="{$vo.id}" <?php echo ($vo['id'] == $data['company_id'] ? 'selected':''); ?>
>{$vo.company_name} </option>
</volist>
</select>
<span class="notice-text">设置该推广员所属的推广公司</span>
</td>
</tr>
<tr>
<td class="l">注册时间:</td>
<td class="r">

@ -59,7 +59,7 @@
<button class="submit_btn ajax-post" id="submit" type="submit" target-form="form-horizontal" style="margin-left:210px;">
保存
</button>
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="{:U('Partner/lists')}" >
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:history.back(-1);" >
返回
</a>
</div>

Loading…
Cancel
Save