|
|
|
@ -253,6 +253,13 @@ class SubSpendController extends ThinkController
|
|
|
|
|
if(!isset($_REQUEST['ids']) || !isset($_REQUEST['company_id']) ) $this->error("参数错误");
|
|
|
|
|
$ids = $_REQUEST['ids'];
|
|
|
|
|
$company_id = $_REQUEST['company_id'];
|
|
|
|
|
if($company_id == 0){
|
|
|
|
|
$saveData = [
|
|
|
|
|
"promote_id"=>0,
|
|
|
|
|
"promote_account"=>'官方渠道',
|
|
|
|
|
"market_admin_id"=>0,
|
|
|
|
|
];
|
|
|
|
|
}else{
|
|
|
|
|
//获取会长及adminid
|
|
|
|
|
$promote = M("promote","tab_")->field("id,account,admin_id")->where("company_id = '{$company_id}' and level = '1' and status = '1'")->find();
|
|
|
|
|
$saveData = [
|
|
|
|
@ -260,6 +267,7 @@ class SubSpendController extends ThinkController
|
|
|
|
|
"promote_account"=>$promote['account'],
|
|
|
|
|
"market_admin_id"=>$promote['admin_id'],
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
$where = [
|
|
|
|
|
"id"=>['in',$ids]
|
|
|
|
|
];
|
|
|
|
@ -310,8 +318,7 @@ class SubSpendController extends ThinkController
|
|
|
|
|
}
|
|
|
|
|
//获取所有公司
|
|
|
|
|
$promoteCompany = M('promote_company','tab_')->field('id, company_name as name')->where(['status' => 1])->select();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
array_unshift($promoteCompany,['id'=>0,'name'=>C('OFFICIEL_CHANNEL')]);
|
|
|
|
|
$this->assign('promoteCompany', $promoteCompany);
|
|
|
|
|
$this->assign('data', $sendData);
|
|
|
|
|
$this->assign('ids', $ids);
|
|
|
|
|