公司比例格式修改

master
zhengyongxing 4 years ago
parent 995a860016
commit 28f73f3140

@ -118,24 +118,76 @@ class PartnerController extends ThinkController
// dd($cp_game_ratio_map);
$parseGameRadiores = array();//合作方分成比例
// foreach ($gameradiores as $key =>$val) {
// $val['row'] = 1;
// $val['my_ratio'] = 100 - $val['ratio'];
// if ($val['begin_total_amount'] == 0) {
// $val['name'] = '默认比例';
// if (isset($parseGameRadiores[$val['game_id']])) {
// $parseGameRadiores[$val['game_id']] = [];
// }
// } else {
// if($val['instanceof']=='1'){
// $val['name']="月流水≥".$val['begin_total_amount'];
// }else{
// $val['name']="月流水>".$val['begin_total_amount'];
// }
// }
// $val['ratio'] = floatval($val['ratio']);
// $parseGameRadiores[$val['game_id']][] = $val;
// }
foreach ($gameradiores as $key =>$val) {
$val['row'] = 1;
$val['my_ratio'] = 100 - $val['ratio'];
if ($val['begin_total_amount'] == 0) {
$val['name'] = '默认比例';
if ($gameradiores[$key+1]['begin_total_amount']==0) {
$val['name'] = "0.00≤月流水≤∞";
} else {
$val['name']=$val['begin_total_amount']."≤月流水<".$gameradiores[$key+1]['begin_total_amount'];
}
if (isset($parseGameRadiores[$val['game_id']])) {
$parseGameRadiores[$val['game_id']] = [];
}
} else {
if($val['instanceof']=='1'){
$val['name']="月流水≥".$val['begin_total_amount'];
if ($gameradiores[$key+1]['begin_total_amount']!=0) {
$val['name']=$val['begin_total_amount']."≤月流水<".$gameradiores[$key+1]['begin_total_amount'];
} else {
$val['name']=$val['begin_total_amount']."≤月流水≤∞";
}
// $val['name']="月流水≥".$val['begin_total_amount'];
}else{
$val['name']="月流水>".$val['begin_total_amount'];
if($gameradiores[$key+1]['begin_total_amount']!=0) {
if ($gameradiores[$key+1]['instanceof'] == '1') {
$val['name']=$val['begin_total_amount']."<月流水<".$gameradiores[$key+1]['begin_total_amount'];
} else {
$val['name']=$val['begin_total_amount']."≤月流水<".$gameradiores[$key+1]['begin_total_amount'];
}
} else {
if ($gameradiores[$key+1]['instanceof'] == '1') {
$val['name']=$val['begin_total_amount']."<月流水≤∞";
} else {
$val['name']=$val['begin_total_amount']."≤月流水≤∞";
}
}
// $val['name']="月流水>".$val['begin_total_amount'];
}
}
$val['ratio'] = floatval($val['ratio']);
$parseGameRadiores[$val['game_id']][] = $val;
}
$myGameRadiores = $parseGameRadiores;//我方分成比例
foreach ($myGameRadiores as $key => &$val) {
foreach ($val as $k => &$v) {

@ -1469,8 +1469,17 @@ class PromoteCompanyController extends ThinkController
//设置比例阶梯
protected function setPromoteRadio(&$v,$is_inside=0){
$turnover_ratio = json_decode($v['turnover_ratio'],true);
if (!$turnover_ratio) {
$rate_detail = "0≤月流水≤∞";
} else {
$rate_detail = "0≤月流水<{$turnover_ratio[0]['turnover']}";
}
$v['turnover_ratio'] = array(
array("ratio"=>floatval(!$is_inside?$v['ratio']:0)."%","name"=>"默认比例")
array("ratio"=>floatval(!$is_inside?$v['ratio']:0)."%","name"=>$rate_detail)
);
foreach($turnover_ratio as $ke=>$va){
@ -1478,12 +1487,27 @@ class PromoteCompanyController extends ThinkController
if(array_key_exists("instanceof",$va)){
//存在
if($va['instanceof']=='1'){
$t['name']="月流水≥".$va['turnover'];
if ($turnover_ratio[$ke+1]['turnover']) {
$t['name']=$va['turnover']."≤月流水<".$turnover_ratio[$ke+1]['turnover'];
} else {
$t['name']=$va['turnover']."≤月流水≤∞";
}
}else{
$t['name']="月流水>".$va['turnover'];
if($turnover_ratio[$ke+1]['turnover']) {
$t['name']=$va['turnover']."<月流水<".$turnover_ratio[$ke+1]['turnover'];
} else {
$t['name']=$va['turnover']."<月流水≤∞";
}
}
}else{
$t['name']="月流水≥".$va['turnover'];
// $t['name']="月流水≥".$va['turnover'];
if ($turnover_ratio[$ke+1]['turnover']) {
$t['name']=$va['turnover']."≤月流水<".$turnover_ratio[$ke+1]['turnover'];
} else {
$t['name']=$va['turnover']."≤月流水<∞";
}
}
$v['turnover_ratio'][]=$t;
}

@ -189,8 +189,8 @@
<td rowspan="{$vo['sec_rowspan'][0]}">{$vo['game_name'][0]|default="------"}</td>
<td rowspan="{$vo['sec_rowspan'][0]}">{$vo['game_type'][0]|default="------"}</td>
<td rowspan="{$vo['sec_rowspan'][0]}">{$vo['withdraw_type'][0]|default="------"}</td>
<td rowspan='1'>默认</td>
<td rowspan='1'>{$vo['rate_data'][0][0]['exploitation_rate']|default="0"}</td>
<td rowspan='1'>{$vo['rate_data'][0][0]['exploitation_name']|default="0<=流水<=∞"}</td>
<td rowspan='1'>{$vo['rate_data'][0][0]['exploitation_rate']|default="------"}</td>
<td rowspan="{$vo.rowspan}">{$vo.bank_user|default="------"}</td>
<td rowspan="{$vo.rowspan}">{$vo.bank_card|default="------"}</td>
@ -216,7 +216,7 @@
</tr>
</if>
<volist name="vo['rate_data'][$index-1]" id="rate" key="rate_index">
<if condition="$rate['exploitation_name'] neq '默认'">
<if condition="$rate_index gt 1">
<tr>
<td rowspan='1'>{$rate.exploitation_name}</td>
<td rowspan='1'>{$rate.exploitation_rate}</td>

Loading…
Cancel
Save