master
ELF 4 years ago
parent 1e5c0cca66
commit bdc23b7d90

@ -2707,7 +2707,7 @@ function getMarketAdminsByPromoteIds($promoteIds)
foreach ($topPromotes as $topPromote) {
$topAdminMap[$topPromote['id']] = $topPromote['admin_id'];
}
$admins = M('ucenter_member', 'sys_')->field(['id', 'username'])->where(['id' => ['in', array_column($topPromotes, 'admin_id')]])->select();
$admins = M('member', 'sys_')->field(['uid id', 'nickname username', 'real_name'])->where(['id' => ['in', array_column($topPromotes, 'admin_id')]])->select();
$admins = index_by_column('id', $admins);
foreach ($resultMap as &$row) {
$adminId = $topAdminMap[$row['top_id']] ?? 0;

@ -125,8 +125,8 @@ class PromoteCompanyController extends ThinkController
$v["settlement_type"] = $tmpr['settlement_type'];
$v["deposit_pay_type"] = $deposit ? $payTypes[$deposit['pay_type']] : '--';
$v["deposit_status"] = $deposit ? $statusList[$deposit['status']] : '--';
$v["deposit_amount"] = $deposit ? $deposit['amount'] : '--';
$v["deposit_status"] = !$deposit || $deposit['pay_type'] == PresidentDepositService::PAY_TYPE_NONE ? '--' : $statusList[$deposit['status']];
$v["deposit_amount"] = $deposit ? $deposit['amount'] : 0;
$v["collection"] = $tmpr['collection'];
$v["invoice_type"] = $tmpr['invoice_type'];
$v["invoice_content"] = $tmpr['invoice_content'];
@ -1398,13 +1398,15 @@ class PromoteCompanyController extends ThinkController
->select();
// dd($promoteres);
$adminList = getMarketAdminsByPromoteIds(array_column($promoteres, 'id'));
if(empty($promoteres)){
//无会长
return ["list"=>["account" => "--","list" => ["turnover_ratio"=>[["name"=>"--","ratio"=>"--"]],"ratio"=>0,"relation_game_id"=>$k,"cp_ratio"=>[["name"=>"--","ratio"=>"--"]],"row"=>1,"original_package_name"=>"--","relation_game_name"=>"--","game_type_name"=>"--"]],"row"=>1];
}
foreach ($promoteres as $k => &$v) {
$v['market_admin_username'] = isset($adminList[$v['id']]) && $adminList[$v['id']]['admin'] ? $adminList[$v['id']]['admin']['username'] : '无';
$admin = isset($adminList[$v['id']]) && $adminList[$v['id']]['admin'] ? $adminList[$v['id']]['admin'] : null;
$v['market_admin_username'] = $admin ? ($admin['real_name'] ? $admin['real_name'] : $admin['username']) : '无';
if($ratio == false || empty($v['game_ids'])){
$v['row']=1;

@ -151,7 +151,7 @@
<select name="relation[self_company_id]" id="self_company" class="select_gallery">
<option value="0"></option>
<?php foreach($selfCompanies as $selfCompany):?>
<option value="<?=$selfCompany['id']?>"><?=$selfCompany['company_name']?></option>
<option value="<?=$selfCompany['id']?>" <?php if($selfCompany['company_name']==''):?>selected<?php endif;?>><?=$selfCompany['company_name']?></option>
<?php endforeach;?>
</select>
<span class="notice-text"></span>
@ -162,8 +162,8 @@
<td class="r">
<select name="relation[settlement_type]" id="settlement_type" class="select_gallery">
<option value="0"></option>
<option value="1" selected>周结</option>
<option value="2">月结</option>
<option value="1">周结</option>
<option value="2" selected>月结</option>
</select>
<span class="notice-text"></span>
</td>
@ -172,8 +172,8 @@
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>开票类型:</td>
<td class="r">
<select name="relation[invoice_type]" id="invoice_type" class="select_gallery">
<option value="0" selected></option>
<option value="1">专票</option>
<option value="0"></option>
<option value="1" selected>专票</option>
<option value="2">普票</option>
</select>
<span class="notice-text"></span>
@ -182,7 +182,7 @@
<tr>
<td class="l">开票内容:</td>
<td class="r table_radio">
<input type="text" name="relation[invoice_content]" id="invoice_content" class="input" value=""></textarea>
<input type="text" name="relation[invoice_content]" id="invoice_content" class="input" value="信息服务费"></textarea>
</td>
</tr>
<tr>
@ -203,8 +203,8 @@
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>收款方:</td>
<td class="r">
<select name="relation[collection]" id="collection" class="select_gallery">
<option value="1" >甲方</option>
<option value="2" selected>乙方</option>
<option value="1" selected>甲方</option>
<option value="2">乙方</option>
</select>
<span class="notice-text"></span>
</td>
@ -277,8 +277,8 @@
<td class="l noticeinfo">是否有游戏资质:</td>
<td class="r">
<select name="has_game_evidence" class="select_gallery">
<option value="1"></option>
<option value="0" selected="selected"></option>
<option value="1" selected></option>
<option value="0"></option>
</select>
</td>
</tr>

Loading…
Cancel
Save