|
|
|
@ -59,6 +59,8 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
|
$companyids = implode(',', array_column($companyres, 'id'));
|
|
|
|
|
//获取所属会长及其游戏分成
|
|
|
|
|
$promotemap['company_id']=["in",$companyids];
|
|
|
|
|
$promotemap['level'] = 1;
|
|
|
|
|
|
|
|
|
|
$promoteres = M("Promote","tab_")
|
|
|
|
|
->field("id,company_id,account,settlement_type")
|
|
|
|
|
->where($promotemap)
|
|
|
|
@ -177,20 +179,29 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
|
if($v['platform_name'] == '' || $v['platform_name'] == "0"){
|
|
|
|
|
$v['platform_name'] = "--";
|
|
|
|
|
}
|
|
|
|
|
$v["is_sign_contact"] = ($v["is_sign_contact"]=="1" ? "是" :'否');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$v["is_sign_contact"] = ($v["is_sign_contact"]=="1" ? "是" :'否');
|
|
|
|
|
$v["company_type"] = ($v["company_type"]=="1" ? "公司" :'个人');
|
|
|
|
|
$v["company_belong"] = ($v["company_belong"]=="0" ? "内团" : ($v["company_belong"]=="1" ? "外团" : ($v["company_belong"]=="2" ? "外团分发" : '无')));
|
|
|
|
|
}
|
|
|
|
|
// dd($companyres);
|
|
|
|
|
if($is_export){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//公司及会长数量统计
|
|
|
|
|
$companycount = $model->field("id")->where($map)->select();
|
|
|
|
|
$count = count($companycount);
|
|
|
|
|
$companyallids = implode(',', array_column($companycount, 'id'));
|
|
|
|
|
$promotemap['company_id']=["in",$companyallids];
|
|
|
|
|
$promotecount = M("Promote","tab_")->where($promotemap)->count();
|
|
|
|
|
|
|
|
|
|
$this->assign('listData', $companyres);
|
|
|
|
|
$this->assign('count', $count);
|
|
|
|
|
$this->assign('promotecount', $promotecount);
|
|
|
|
|
if($is_export){
|
|
|
|
|
//导出
|
|
|
|
|
$this->display("export");
|
|
|
|
|
die();
|
|
|
|
|
}
|
|
|
|
|
/* 查询记录总数 */
|
|
|
|
|
$count = $model
|
|
|
|
|
->where($map)
|
|
|
|
|
->count();
|
|
|
|
|
//分页
|
|
|
|
|
$parameter['p'] = $page;
|
|
|
|
|
$parameter['row'] = $row;
|
|
|
|
@ -198,9 +209,7 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
|
if ($page) {
|
|
|
|
|
$this->assign('_page', $page);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->assign('listData', $companyres);
|
|
|
|
|
$this->assign('count', $count);
|
|
|
|
|
//分配其他页面需要参数
|
|
|
|
|
$this->assign('promoteList', getPromoteByLevel(1));
|
|
|
|
|
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Partner/lists'])->find());
|
|
|
|
|
$this->meta_title = '推广公司';
|
|
|
|
|