|
|
|
@ -53,7 +53,8 @@ class PromoteController extends ThinkController
|
|
|
|
|
if ($_REQUEST['parent_id']=='全部') {
|
|
|
|
|
unset($_REQUEST['parent_id']);
|
|
|
|
|
}
|
|
|
|
|
$zid=get_zi_promote_id($_REQUEST['parent_id']);
|
|
|
|
|
$zid = get_zi_promote_id($_REQUEST['parent_id'], null);
|
|
|
|
|
// dd($zid);
|
|
|
|
|
if ($zid) {
|
|
|
|
|
$zid=$zid.','.$_REQUEST['parent_id'];
|
|
|
|
|
} else {
|
|
|
|
@ -134,11 +135,10 @@ class PromoteController extends ThinkController
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// dump($map);die();
|
|
|
|
|
|
|
|
|
|
//为数据权限添加
|
|
|
|
|
setPowerPromoteIds($map, 'id');
|
|
|
|
|
$list_data = D(self::model_name)->where($map)->order('id DESC')->page($p, $row)->select();
|
|
|
|
|
|
|
|
|
|
$oa_data = [];
|
|
|
|
|
if (I('oa_associated', -1) == -1) {
|
|
|
|
|
foreach ($list_data as $k => $v) {
|
|
|
|
@ -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();
|
|
|
|
|
}
|
|
|
|
@ -288,6 +294,9 @@ class PromoteController extends ThinkController
|
|
|
|
|
$ba = new \Admin\Model\BusinessAffairsModel();
|
|
|
|
|
$ba->update_child($ba_id['ba_id'], $_REQUEST['ba_id'], $id);
|
|
|
|
|
}
|
|
|
|
|
if (!empty(I('company_id'))) {
|
|
|
|
|
$data['company_id'] = I('company_id');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$res=M("promote", "tab_")->where(array("id"=>$_POST['id']))->save($data);
|
|
|
|
|
if ($res !== false) {
|
|
|
|
@ -337,7 +346,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();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|