diff --git a/Application/Admin/Controller/PayChannelController.class.php b/Application/Admin/Controller/PayChannelController.class.php index e78885eae..c5953740f 100644 --- a/Application/Admin/Controller/PayChannelController.class.php +++ b/Application/Admin/Controller/PayChannelController.class.php @@ -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['支付宝支付金额']['pay_way'] = "1,9"; - $payTypeData['微信支付金额']['pay_way'] = "2,3"; + $payTypeData['支付宝支付金额']['pay_way'] = "1"; + $payTypeData['微信支付金额']['pay_way'] = "2"; $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'] = "not in"; foreach($channelData as $key => $value) { if ($value['pay_way']==1 || $value['pay_way']==9 ) { $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 ) { $payTypeData['微信支付金额']['amount'] += number_format($value['pay_amount'],2,'.',''); - } else if ($value['pay_way']==15) { + } else { $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,'.',''); } } diff --git a/Application/Admin/Controller/PayMerchantController.class.php b/Application/Admin/Controller/PayMerchantController.class.php index 83592b2d6..606a16536 100644 --- a/Application/Admin/Controller/PayMerchantController.class.php +++ b/Application/Admin/Controller/PayMerchantController.class.php @@ -51,7 +51,7 @@ class PayMerchantController extends ThinkController } 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(); //游戏充值金额 @@ -260,6 +260,7 @@ class PayMerchantController extends ThinkController if ($_REQUEST['export']) { $title = ['main_name' => '商户主体', 'name' => '支付商户', + 'merchant_way'=>'支付方式', 'account' => '商户账号', 'ratio' => '占比(总充值量%)', 'cash_amount' => '游戏现金金额', @@ -279,24 +280,24 @@ class PayMerchantController extends ThinkController $sum_radio_export['main_name'] = '收款商户占比'; foreach ($sum_merchant as $key => $value) { - if ($value['merchant_way'] == self::WAY_ALIPAY) { - $merchant_way = "支付宝"; - } else if ($value['merchant_way'] == self::WAY_WEIXIN) { - $merchant_way = "微信"; - } else if ($value['merchant_way'] == self::WAY_EXPRESS) { - $merchant_way = "快捷"; - } else { - $merchant_way = "无"; - } +// if ($value['merchant_way'] == self::WAY_ALIPAY) { +// $merchant_way = "支付宝"; +// } else if ($value['merchant_way'] == self::WAY_WEIXIN) { +// $merchant_way = "微信"; +// } else if ($value['merchant_way'] == self::WAY_EXPRESS) { +// $merchant_way = "快捷"; +// } else { +// $merchant_way = "无"; +// } $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_radio_export['account'] .= $value['name']."-".$merchant_way.":".$radio."%"; + $sum_merchant_export['account'] .= $value['name']."(".$value['merchant_way']."):".$value['sum_amount']; + $sum_radio_export['account'] .= $value['name']."(".$value['merchant_way']."):".$radio."%"; } $data = array_merge($data,[$sum],[$sum_merchant_export],[$sum_radio_export]); - data2csv($data,'个人总提成列表',$title); + data2csv($data,'支付方式统计',$title); } // dump($sum_merchant);die(); diff --git a/Application/Admin/View/PayMerchant/index.html b/Application/Admin/View/PayMerchant/index.html index 5aad8cf2a..ce401e232 100644 --- a/Application/Admin/View/PayMerchant/index.html +++ b/Application/Admin/View/PayMerchant/index.html @@ -125,6 +125,15 @@ +
+ +
+
- +
商户主体 支付商户 + 支付方式 商户账号 占比(总充值量) @@ -204,8 +214,8 @@ {$data.main_name|default = '无'} - {$data.name|default = '无'}({$data.merchant_way|default = '无'}) - + {$data.name|default = '无'} + {$data.merchant_way|default = '无'} {$data.account|default = ''} {$data['ratio']}% @@ -223,6 +233,7 @@ 合计(根据时间检索变化) + 100% {$sum['cash_amount']|default = '0.00'} {$sum['coin_amount']|default = '0.00'} @@ -285,6 +296,7 @@ $("#name").select2(); $("#main_name").select2(); $("#account").select2(); + $("#pay_way").select2(); //导航高亮 highlight_subnav('{:U('PayChannel/index')}'); diff --git a/Application/Admin/View/Promote/add.html b/Application/Admin/View/Promote/add.html index 1f9c858cd..db04682a1 100644 --- a/Application/Admin/View/Promote/add.html +++ b/Application/Admin/View/Promote/add.html @@ -133,10 +133,10 @@