优化推广下游查看

master
chenzhi 4 years ago
parent 80e8477b51
commit d015bce440

@ -65,6 +65,11 @@ class PromoteCompanyController extends ThinkController
$reg_str = "([^0-9]|^){$g_id },";
$map["game_ids"]=["EXP","REGEXP '{$reg_str}'"];
}
if (isset($_REQUEST['is_sign_contact'])) {
$map["is_sign_contact"]=$_REQUEST['is_sign_contact'];
}
if (isset($_REQUEST['pay_type'])) {
$pay_type = $_REQUEST['pay_type'];
$promote_id = M("president_deposit","tab_")->where("pay_type = '$pay_type'")->group("promote_id")->getField("promote_id",true);
@ -86,6 +91,7 @@ class PromoteCompanyController extends ThinkController
}
}
// dd($map);
$page = intval(I('get.p', 0));
@ -114,7 +120,7 @@ class PromoteCompanyController extends ThinkController
$v["company_belong"] = getCompanyBlong($v["company_belong"]);
$v["develop_type"] = getCompanyRelation($v["develop_type"]);
$v['company_type'] = $v['company_type'] == 2 ? '个人' : '公司';
$v['is_sign_contract'] = $v['is_sign_contract'] ? '是' : '否';
$v['is_sign_contact'] = $v['is_sign_contact'] ? '是' : '否';
$contract_start_time = $v['company_info']['contact_begin'] ?
time_format($v['company_info']['contact_begin'], 'Y/m/d') : '-';
@ -127,6 +133,9 @@ class PromoteCompanyController extends ThinkController
$validity_end_time = $v['company_info']['validity_end_time'] ?
time_format($v['company_info']['validity_end_time'], 'Y/m/d') : '-';
$v['validity_time'] = $validity_start_time . '-' . $validity_end_time;
if(!$is_export){
$v['can_del'] = $this->promoteCompanyIsCanDel($v["id"]) ? 1 : 0;
}
//遍历获取游戏信息
if(empty($v["game_ids"])){
$senddata=false;
@ -1200,7 +1209,7 @@ class PromoteCompanyController extends ThinkController
$promoteres = M("Promote","tab_")
->alias('p')
->field("p.id,p.company_id,p.account,p.game_ids,d.amount,IFNULL(d.pay_way,-1) pay_way,d.status,d.pay_type")
->join("tab_president_deposit as d ON p.id = d.promote_id")
->join("tab_president_deposit as d ON p.id = d.promote_id","left")
->where($promotemap)
->select();
// dd($promoteres);
@ -1316,6 +1325,15 @@ class PromoteCompanyController extends ThinkController
$rid = M('game', 'tab_')->field('relation_game_id')->where(["id"=>["in",$ids]])->group("relation_game_id")->select();
return implode(",",array_column($rid,'relation_game_id'));
}
protected function promoteCompanyIsCanDel($company_id){
$r = M("Promote","tab_")->where("company_id={$company_id}")->count();
if($r > 0){
return false;
}else{
return true;
}
}

@ -108,6 +108,14 @@
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="is_sign_contact" name="is_sign_contact" class="select_gallery" style="width:120px;">
<option value="">是否签署合同</option>
<option value="0" <?php echo isset($_GET['is_sign_contact']) && I('is_sign_contact') === 0 ? "selected" : ''?>>否</option>
<option value="1" <?php echo I('is_sign_contact') == 1 ? "selected" : ''?>>是</option>
</select>
</div>
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('PromoteCompany/lists','model='.$model['name'].'&row='.I('row'),false)}">搜索</a>
@ -144,6 +152,7 @@
<th>内外团</th>
<th>开发类型</th>
<th>公司性质</th>
<th>是否签署合同</th>
<th>结算周期</th>
<th>会长账号</th>
@ -173,6 +182,7 @@
<td rowspan="{$data.row}">{$data.develop_type}</td>
<td rowspan="{$data.row}">{$data.company_type}</td>
<td rowspan="{$data.row}">{$data.is_sign_contact}</td>
<td rowspan="{$data.row}">{$data.settlement_type}</td>
<notempty name="data.list">

Loading…
Cancel
Save