From a6263b22055e5fcfd578fd6e4825735b17d9bcd9 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Tue, 24 Nov 2020 11:10:53 +0800 Subject: [PATCH] =?UTF-8?q?11=E6=9C=88=E5=8A=9F=E8=83=BD=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementPoolController.class.php | 75 ++++++++++++------- .../View/CompanyStatementPool/editPuPool.html | 14 ++-- .../editSpecialPuPool.html | 22 ++++-- .../View/CompanyStatementPool/viewPuPool.html | 9 ++- 4 files changed, 72 insertions(+), 48 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index 30721e0d7..650bd69c6 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -357,6 +357,7 @@ class CompanyStatementPoolController extends ThinkController $count["platform_amount"] = "=ROUND(SUM(K2:K".$line."),2)"; $count["sum_money"] = "=ROUND(SUM(Q2:Q".$line."),2)"; } +// dump($infolist); $this->assign("data",$infolist); $this->assign("count",$count); $this->assign("is_export",$is_export); @@ -450,6 +451,7 @@ class CompanyStatementPoolController extends ThinkController $count["platform_amount"] = "=ROUND(SUM(K2:K".$line."),2)"; $count["sum_money"] = "=ROUND(SUM(Q2:Q".$line."),2)"; } +// dump($infolist); $this->assign("data",$infolist); $this->assign("count",$count); $this->assign("is_export",$is_export); @@ -595,6 +597,7 @@ class CompanyStatementPoolController extends ThinkController for ($i=0;;$i++) { if ($sv[$i]['sum_money']) { $game_data['week_amount'] += $sv[$i]['sum_money']; + $game_data['withhold_amount'] += $sv[$i]['withhold']; $game_data['fine'] += $sv[$i]['fine']; $game_data['reward'] += $sv[$i]['reward']; } else { @@ -634,6 +637,7 @@ class CompanyStatementPoolController extends ThinkController $handle_data[$hk-$substract]['time_row'] += $handle_data[$hk]['time_row']; $handle_data[$hk-$substract]['week_amount'] += $handle_data[$hk]['week_amount']; + $handle_data[$hk-$substract]['withhold_amount'] += $handle_data[$hk]['withhold_amount']; unset($handle_data[$hk]['time']); unset($handle_data[$hk]['time_row']); @@ -1584,7 +1588,10 @@ class CompanyStatementPoolController extends ThinkController } if ($info['withdraw_type'] == "特殊补点") { - $optist = ['viewPool','cancelPool','editSpecialPuPool']; + $optist = ['viewPool','cancelPool']; + if ($info['company_type'] == 2 && $info['verify_status'] == '0') { + array_push($optist,'editSpecialPuPool'); + } } if($info['company_type'] == 2 && $info['verify_status'] == '0'&&$info['withdraw_type'] != "特殊补点") { @@ -1668,50 +1675,60 @@ class CompanyStatementPoolController extends ThinkController $statement_amount = 0; $statement_lack_amount = 0; +// dump($increment_ratio); foreach ($increment_ratio as $key => $value) { - if ($st[$key] == 1) { - $model = M("company_statement_info","tab_"); - } else { - $model = M("company_lack_statement_info","tab_"); - } - $statement_data = $model->where(['id'=>$key])->find(); + $statement_info = array(); + foreach($value as $akey => $aval) { + + if ($st[$key][$akey] == 1) { + $model = M("company_statement_info","tab_"); + } else { + $model = M("company_lack_statement_info","tab_"); + } - $statement_info = json_decode($statement_data['statement_info'],true); + $statement_data = $model->where(['id'=>$key])->find(); - foreach ($statement_info as $k => $v) { + $statement_info = json_decode($statement_data['statement_info'],true); - $game_list = $v['game_list']; + foreach ($statement_info as $k => $v) { - foreach ($game_list as $gk => $gv) { - if ($ratio[$key][$v['account']][$gk]) { - $statement_info[$k]['game_list'][$gk]['ratio'] = $ratio[$key][$v['account']][$gk]; - } - $statement_info[$k]['game_list'][$gk]['refund'] = $refund[$key][$v['account']][$gk]; - $statement_info[$k]['game_list'][$gk]['withhold'] = $withhold[$key][$v['account']][$gk]; + $game_list = $v['game_list']; - $statement_info[$k]['game_list'][$gk]['increment_ratio'] = $increment_ratio[$key][$v['account']][$gk]; + foreach ($game_list as $gk => $gv) { - $statement_info[$k]['game_list'][$gk]['sum_money'] = $sum_money[$key][$v['account']][$gk]; + if ($ratio[$key][$v['account']][$gk]) { + $statement_info[$k]['game_list'][$gk]['ratio'] = (int)$ratio[$key][$v['account']][$gk]; + } + $statement_info[$k]['game_list'][$gk]['refund'] = $refund[$key][$v['account']][$gk]; + $statement_info[$k]['game_list'][$gk]['withhold'] = $withhold[$key][$v['account']][$gv['statement_begin_time']]; + $withhold[$key][$v['account']][$gv['statement_begin_time']] = 0; - $amount += $sum_money[$key][$v['account']][$gk]; + $statement_info[$k]['game_list'][$gk]['increment_ratio'] = $increment_ratio[$key][$v['account']][$gk]; + + $statement_info[$k]['game_list'][$gk]['sum_money'] = $sum_money[$key][$v['account']][$gk]; + + $amount += $sum_money[$key][$v['account']][$gk]; + + if ($st[$key][$akey] == 1) { + $statement_amount += $sum_money[$key][$v['account']][$gk]; + } else { + $statement_lack_amount += $sum_money[$key][$v['account']][$gk]; + } - if ($st[$key] == 1) { - $statement_amount += $sum_money[$key][$v['account']][$gk]; - } else { - $statement_lack_amount += $sum_money[$key][$v['account']][$gk]; } -// dump($v['account']); -// dump($sum_money[$key][$v['account']][$gk]); + } - } + $statement_info_data = json_encode($statement_info); + + $model->where(['id'=>$key])->save(['statement_info'=>$statement_info_data,'statement_money'=>$amount,'pay_amount'=>$amount,'remark'=>$remark[$key]]); - $statement_info = json_encode($statement_info); + $amount = 0; + + } - $model->where(['id'=>$key])->save(['statement_info'=>$statement_info,'statement_money'=>$amount,'pay_amount'=>$amount,'remark'=>$remark[$key]]); - $amount = 0; } M("company_statement_pool","tab_")->where(['id'=>$id])->save(['pay_amount'=>$statement_amount,'statement_money'=>$statement_amount,'lack_statement_money'=>$statement_lack_amount]); diff --git a/Application/Admin/View/CompanyStatementPool/editPuPool.html b/Application/Admin/View/CompanyStatementPool/editPuPool.html index 17867b93c..b40ab82ba 100644 --- a/Application/Admin/View/CompanyStatementPool/editPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/editPuPool.html @@ -171,10 +171,10 @@ % {$com['statement_info'][0]['game_list'][0]['sum_money']} - + {$com['reward']} {$com['fine']} - + {$com['statement_info'][0]['week_amount']} {$com['statement_money']} @@ -230,7 +230,7 @@ % % {$game['sum_money']} - + @@ -260,8 +260,8 @@ % % {$account['game_list'][0]['sum_money']} - + {$account['week_amount']} @@ -292,7 +292,7 @@ % % {$game['sum_money']} - + @@ -477,7 +477,7 @@ //扣款 pay_money = parseFloat(pay_money) - parseFloat(refund); - var value = (parseFloat(pay_money)*(parseFloat(ratio)/100) + parseFloat(pay_money)*(parseFloat(increment_ratio)/100)) - parseFloat(withhold); + var value = (parseFloat(pay_money)*(parseFloat(ratio)/100) + parseFloat(pay_money)*(parseFloat(increment_ratio)/100)); $(_this).parent().parent().find(".sum_money_span").text(value.toFixed(2)); $(_this).parent().parent().find(".sum_money").val(value.toFixed(2)); @@ -495,7 +495,7 @@ } } - var D_value = parseFloat(old_amount)-parseFloat(this_amount); + var D_value = parseFloat(old_amount)-parseFloat(this_amount) - parseFloat(withhold); week_amount_find.find(".week_amount").text((parseFloat(week_amount)-D_value).toFixed(2)); diff --git a/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html b/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html index 544ef67eb..6e247dc28 100644 --- a/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html @@ -166,15 +166,21 @@ {$com['statement_info'][0]['time']} {$com['statement_info'][0]['game_list'][0]['pay_amount']} - + + {$com['statement_info'][0]['game_list'][0]['refund']|default=0} + + {$com['statement_info'][0]['game_list'][0]['ratio']}% % {$com['statement_info'][0]['game_list'][0]['sum_money']} - + {$com['reward']} {$com['fine']} - + + {$com['statement_info'][0]['game_list'][0]['withhold']|default=0} + + {$com['statement_info'][0]['week_amount']} {$com['statement_money']} @@ -230,7 +236,7 @@ {$game['ratio']}% % {$game['sum_money']} - + @@ -260,8 +266,8 @@ {$account['game_list'][0]['ratio']}% % {$account['game_list'][0]['sum_money']} - + {$account['week_amount']} @@ -292,7 +298,7 @@ {$game['ratio']}% % {$game['sum_money']} - + @@ -477,7 +483,7 @@ //扣款 pay_money = parseFloat(pay_money) - parseFloat(refund); - var value = (parseFloat(pay_money)*(parseFloat(ratio)/100) + parseFloat(pay_money)*(parseFloat(increment_ratio)/100)) - parseFloat(withhold); + var value = (parseFloat(pay_money)*(parseFloat(ratio)/100) + parseFloat(pay_money)*(parseFloat(increment_ratio)/100)); $(_this).parent().parent().find(".sum_money_span").text(value.toFixed(2)); $(_this).parent().parent().find(".sum_money").val(value.toFixed(2)); @@ -495,7 +501,7 @@ } } - var D_value = parseFloat(old_amount)-parseFloat(this_amount); + var D_value = parseFloat(old_amount)-parseFloat(this_amount) - parseFloat(withhold); week_amount_find.find(".week_amount").text((parseFloat(week_amount)-D_value).toFixed(2)); diff --git a/Application/Admin/View/CompanyStatementPool/viewPuPool.html b/Application/Admin/View/CompanyStatementPool/viewPuPool.html index 9873124b0..4bb70bb3e 100644 --- a/Application/Admin/View/CompanyStatementPool/viewPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/viewPuPool.html @@ -173,7 +173,7 @@ {$com['statement_info'][0]['reward']||default="0"} {$com['statement_info'][0]['fine']||default="0"} - {$com['statement_info'][0]['game_list'][0]['withhold']|default=0} + {$com['statement_info'][0]['game_list'][0]['withhold']|default=0} {$com['statement_info'][0]['week_amount']||default="0"} {$com['statement_money']} @@ -229,7 +229,7 @@ {$game['ratio']}% {$game['increment_ratio']}% {$game['sum_money']} - {$game['withhold']|default=0} + @@ -264,8 +264,9 @@ {$account['reward']|default=0} {$account['fine']|default=0} - {$account['game_list'][0]['withhold']|default=0} + + {$account['withhold_amount']|default=0}--> {$account['week_amount']} @@ -299,7 +300,7 @@ {$game['ratio']}% {$game['increment_ratio']}% {$game['sum_money']} - {$game['withhold']|default=0} +