Merge branch 'hotfix/market_percentage' of wmtx/platform into release

支付渠道跳转增加
master
廖金灵 4 years ago committed by Gogs
commit 613b50eb63

@ -199,43 +199,23 @@ class PayChannelController extends ThinkController
$payTypeData['支付宝支付金额']['amount'] = 0; $payTypeData['支付宝支付金额']['amount'] = 0;
$payTypeData['微信支付金额']['amount'] = 0; $payTypeData['微信支付金额']['amount'] = 0;
$payTypeData['快捷支付金额']['amount'] = 0; $payTypeData['快捷支付金额']['amount'] = 0;
$payTypeData['苹果支付金额']['amount'] = 0;
$payTypeData['汇付宝支付金额']['amount'] = 0;
$payTypeData['易宝支付金额']['amount'] = 0;
$payTypeData['其他支付金额']['amount'] = 0;
$payTypeData['支付宝支付金额']['pay_way'] = "1,9"; $payTypeData['支付宝支付金额']['pay_way'] = "1";
$payTypeData['微信支付金额']['pay_way'] = "2,3"; $payTypeData['微信支付金额']['pay_way'] = "2";
$payTypeData['快捷支付金额']['pay_way'] = "4"; $payTypeData['快捷支付金额']['pay_way'] = "4";
$payTypeData['苹果支付金额']['pay_way'] = "15";
$payTypeData['汇付宝支付金额']['pay_way'] = "7";
$payTypeData['易宝支付金额']['pay_way'] = "17";
$payTypeData['其他支付金额']['pay_way'] = "1,9,4,2,3,15,7,17";
$payTypeData['支付宝支付金额']['type'] = "in"; $payTypeData['支付宝支付金额']['type'] = "in";
$payTypeData['微信支付金额']['type'] = "in"; $payTypeData['微信支付金额']['type'] = "in";
$payTypeData['快捷支付金额']['type'] = "in"; $payTypeData['快捷支付金额']['type'] = "in";
$payTypeData['苹果支付金额']['type'] = "in";
$payTypeData['汇付宝支付金额']['type'] = "in";
$payTypeData['易宝支付金额']['type'] = "in";
$payTypeData['其他支付金额']['type'] = "not in";
foreach($channelData as $key => $value) { foreach($channelData as $key => $value) {
if ($value['pay_way']==1 || $value['pay_way']==9 ) { if ($value['pay_way']==1 || $value['pay_way']==9 ) {
$payTypeData['支付宝支付金额']['amount'] += number_format($value['pay_amount'],2,'.',''); $payTypeData['支付宝支付金额']['amount'] += number_format($value['pay_amount'],2,'.','');
} else if ($value['pay_way']==4 ) {
$payTypeData['汇付宝支付金额']['amount'] += number_format($value['pay_amount'],2,'.','');
} else if ($value['pay_way']==2 || $value['pay_way']==3 ) { } else if ($value['pay_way']==2 || $value['pay_way']==3 ) {
$payTypeData['微信支付金额']['amount'] += number_format($value['pay_amount'],2,'.',''); $payTypeData['微信支付金额']['amount'] += number_format($value['pay_amount'],2,'.','');
} else if ($value['pay_way']==15) { } else {
$payTypeData['快捷支付金额']['amount'] += number_format($value['pay_amount'],2,'.',''); $payTypeData['快捷支付金额']['amount'] += number_format($value['pay_amount'],2,'.','');
} else if($value['pay_way'] ==7){
$payTypeData['苹果支付金额']['amount'] += number_format($value['pay_amount'],2,'.','');
} else if($value['pay_way'] ==17){
$payTypeData['易宝支付金额']['amount'] += number_format($value['pay_amount'],2,'.','');
} else if($value['pay_way']){
$payTypeData['其他支付金额']['amount'] += number_format($value['pay_amount'],2,'.','');
} }
} }

@ -51,7 +51,7 @@ class PayMerchantController extends ThinkController
} }
if ($_REQUEST['pay_way']) { if ($_REQUEST['pay_way']) {
$data_map['pay_way'] = [trim($_REQUEST['type']),$_REQUEST['pay_way']]; $data_map['merchant_way'] = ['in',$_REQUEST['pay_way']];
} }
// var_dump($data_map);die(); // var_dump($data_map);die();
//游戏充值金额 //游戏充值金额
@ -260,6 +260,7 @@ class PayMerchantController extends ThinkController
if ($_REQUEST['export']) { if ($_REQUEST['export']) {
$title = ['main_name' => '商户主体', $title = ['main_name' => '商户主体',
'name' => '支付商户', 'name' => '支付商户',
'merchant_way'=>'支付方式',
'account' => '商户账号', 'account' => '商户账号',
'ratio' => '占比(总充值量%)', 'ratio' => '占比(总充值量%)',
'cash_amount' => '游戏现金金额', 'cash_amount' => '游戏现金金额',
@ -279,24 +280,24 @@ class PayMerchantController extends ThinkController
$sum_radio_export['main_name'] = '收款商户占比'; $sum_radio_export['main_name'] = '收款商户占比';
foreach ($sum_merchant as $key => $value) { foreach ($sum_merchant as $key => $value) {
if ($value['merchant_way'] == self::WAY_ALIPAY) { // if ($value['merchant_way'] == self::WAY_ALIPAY) {
$merchant_way = "支付宝"; // $merchant_way = "支付宝";
} else if ($value['merchant_way'] == self::WAY_WEIXIN) { // } else if ($value['merchant_way'] == self::WAY_WEIXIN) {
$merchant_way = "微信"; // $merchant_way = "微信";
} else if ($value['merchant_way'] == self::WAY_EXPRESS) { // } else if ($value['merchant_way'] == self::WAY_EXPRESS) {
$merchant_way = "快捷"; // $merchant_way = "快捷";
} else { // } else {
$merchant_way = "无"; // $merchant_way = "无";
} // }
$radio = round(($value['sum_amount']/array_sum(array_column($sum_merchant,'sum_amount')))*100,2); $radio = round(($value['sum_amount']/array_sum(array_column($sum_merchant,'sum_amount')))*100,2);
$sum_merchant_export['account'] .= $value['name']."-".$merchant_way.":".$value['sum_amount']; $sum_merchant_export['account'] .= $value['name']."(".$value['merchant_way']."):".$value['sum_amount'];
$sum_radio_export['account'] .= $value['name']."-".$merchant_way.":".$radio."%"; $sum_radio_export['account'] .= $value['name']."(".$value['merchant_way']."):".$radio."%";
} }
$data = array_merge($data,[$sum],[$sum_merchant_export],[$sum_radio_export]); $data = array_merge($data,[$sum],[$sum_merchant_export],[$sum_radio_export]);
data2csv($data,'个人总提成列表',$title); data2csv($data,'支付方式统计',$title);
} }
// dump($sum_merchant);die(); // dump($sum_merchant);die();

@ -125,6 +125,15 @@
</select> </select>
</div> </div>
<div class="input-list input-list-game search_label_rehab">
<select id="pay_way" name="pay_way" class="select_gallery" >
<option value="">请选择支付方式</option>
<option value="1" <if condition="$_GET['pay_way'] eq '1'">selected</if>>支付宝</option>
<option value="2" <if condition="$_GET['pay_way'] eq '2'">selected</if>>微信</option>
<option value="4" <if condition="$_GET['pay_way'] eq '4'">selected</if>>快捷</option>
</select>
</div>
<div class="input-list input-list-game search_label_rehab"> <div class="input-list input-list-game search_label_rehab">
<select id="name" name="name" class="select_gallery" > <select id="name" name="name" class="select_gallery" >
<option value="">请选择支付商户</option> <option value="">请选择支付商户</option>
@ -152,7 +161,7 @@
</div> </div>
</div> </div>
<input type="text" name="type" class="" value="{$_GET['type']}" style="display: none"/> <input type="text" name="type" class="" value="{$_GET['type']}" style="display: none"/>
<input type="text" name="pay_way" class="" value="{$_GET['pay_way']}" style="display: none"/> <!-- <input type="text" name="pay_way" class="" value="{$_GET['pay_way']}" style="display: none"/>-->
<input type="hidden" name="" value="" class="sortBy"> <input type="hidden" name="" value="" class="sortBy">
<div class="input-list"> <div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('PayMerchant/index','model='.$model['name'].'&row='.I('row'),false)}" <a class="sch-btn" href="javascript:;" id="search" url="{:U('PayMerchant/index','model='.$model['name'].'&row='.I('row'),false)}"
@ -175,6 +184,7 @@
<tr> <tr>
<th >商户主体</th> <th >商户主体</th>
<th >支付商户</th> <th >支付商户</th>
<th >支付方式</th>
<th >商户账号</th> <th >商户账号</th>
<!-- <th >支付渠道</th>--> <!-- <th >支付渠道</th>-->
<th >占比(总充值量)</th> <th >占比(总充值量)</th>
@ -204,8 +214,8 @@
<volist name="listdata" id="data"> <volist name="listdata" id="data">
<tr> <tr>
<td>{$data.main_name|default = '无'}</td> <td>{$data.main_name|default = '无'}</td>
<td >{$data.name|default = '无'}({$data.merchant_way|default = '无'}) <td >{$data.name|default = '无'}</td>
</td> <td >{$data.merchant_way|default = '无'}</td>
<td >{$data.account|default = ''}</td> <td >{$data.account|default = ''}</td>
<!-- <td >{$data['channel']|default = ''}</td>--> <!-- <td >{$data['channel']|default = ''}</td>-->
<td >{$data['ratio']}%</td> <td >{$data['ratio']}%</td>
@ -223,6 +233,7 @@
<td><span>合计(根据时间检索变化)</span></td> <td><span>合计(根据时间检索变化)</span></td>
<td></td> <td></td>
<td></td> <td></td>
<td></td>
<td>100%</td> <td>100%</td>
<td ><span>{$sum['cash_amount']|default = '0.00'}</span></td> <td ><span>{$sum['cash_amount']|default = '0.00'}</span></td>
<td ><span>{$sum['coin_amount']|default = '0.00'}</span></td> <td ><span>{$sum['coin_amount']|default = '0.00'}</span></td>
@ -285,6 +296,7 @@
$("#name").select2(); $("#name").select2();
$("#main_name").select2(); $("#main_name").select2();
$("#account").select2(); $("#account").select2();
$("#pay_way").select2();
//导航高亮 //导航高亮
highlight_subnav('{:U('PayChannel/index')}'); highlight_subnav('{:U('PayChannel/index')}');

@ -133,10 +133,10 @@
<td class="r table_radio"> <td class="r table_radio">
<span class="form_radio table_btn"> <span class="form_radio table_btn">
<label > <label >
<input type="radio" value="1" name="can_view_recharge" > 开启 <input type="radio" value="1" name="can_view_recharge" checked="checked"> 开启
</label > </label >
<label > <label >
<input type="radio" value="0" name="can_view_recharge" checked="checked"> 锁定 <input type="radio" value="0" name="can_view_recharge"> 锁定
</label> </label>
</span> </span>
</td> </td>

Loading…
Cancel
Save