From d6b8fa208c467a272034154acc940369f073f1dc Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Tue, 1 Dec 2020 13:55:17 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E6=B1=87=E6=80=BB=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/OldCountController.class.php | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Application/Admin/Controller/OldCountController.class.php b/Application/Admin/Controller/OldCountController.class.php index f510d5dc3..49cb28cdd 100644 --- a/Application/Admin/Controller/OldCountController.class.php +++ b/Application/Admin/Controller/OldCountController.class.php @@ -10,6 +10,40 @@ namespace Admin\Controller; class OldCountController extends \Think\Controller { + public function oldRewardChange() { + + $data = M("company_statement_info","tab_") + ->where("(fine > 0 or reward > 0) and company_type = 2") + ->select(); + + foreach ($data as $key => $value) { + + $statement_info = json_decode($value['statement_info'],true); + $statement_info[0]['game_list'][0]['fine'] = $value['fine']; + $statement_info[0]['game_list'][0]['reward'] = $value['reward']; + $statement_info = json_encode($statement_info); + + M("company_statement_info","tab_")->where(['id'=>$value['id']])->save(['statement_info'=>$statement_info]); + + } + + + $pool_data = M("company_statement_pool",'tab_')->where(['id'=>['in',[22,27]]])->select(); + foreach ($pool_data as $key => $value) { + + $save = json_decode($value['verify_log'],true); + $save['firstverify_user'] = $save['verify_user']; + $save['firstverify_time'] = $save['verify_time']; + $save = json_encode($save); + + M('company_statement_pool','tab_')->where(['id'=>$value['id']])->save(['verify_log'=>$save]); + + } + + echo "success"; + + } + public function changeCompanyGameidToPromoteGameid() { //默认设为 From d43d0c262844824c8a678086dbfdfd3d6c34f54f Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Tue, 1 Dec 2020 13:55:23 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E9=9B=B7=E9=9B=A8=E7=AD=89=E5=AF=BC?= =?UTF-8?q?=E9=87=8F=E5=85=AC=E4=BC=9A=E7=BB=84=E9=95=BF=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E7=9C=8B=E5=88=B0=E5=85=85=E5=80=BC=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/BaseController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Home/Controller/BaseController.class.php b/Application/Home/Controller/BaseController.class.php index 5e3561338..a9c94e5d1 100644 --- a/Application/Home/Controller/BaseController.class.php +++ b/Application/Home/Controller/BaseController.class.php @@ -395,7 +395,7 @@ class BaseController extends HomeController $closePromoteLowest = [334, 370]; if (in_array($topPromote['company_id'], $closePromoteLowest)) { - if ($topPromote['can_view_recharge'] == 1 && !in_array($promote['level'], [3, 4])) { + if ($topPromote['can_view_recharge'] == 1 && !in_array($promote['level'], [4])) { return true; } else { return false; From 08dd238ca48ec417505e71636935b243fdd3dfb3 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Tue, 1 Dec 2020 18:17:34 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E8=A1=A5=E7=82=B9?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=90=8D=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/CompanyStatementController.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index 602f22066..d6b84bc75 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -1455,6 +1455,8 @@ class CompanyStatementController extends ThinkController $statement_data = []; $company_data = M("promote_company","tab_")->where(['id'=>$value['company_id']])->find(); +// dump($company_data);die(); + $company_type = M("company_relation","tab_")->where("first_company_id={$value['company_id']} or second_company_id={$value['company_id']}")->find(); $insert['is_payment'] = $company_type['is_payment']; @@ -1473,7 +1475,7 @@ class CompanyStatementController extends ThinkController $proCompany_info['link_man'] = $company_data['settlement_contact']; $proCompany_info['link_phone'] =$company_data['contact_phone']; $proCompany_info['address'] = $company_data['address']; - $proCompany_info['payee_name'] =$company_data['company_name']; + $proCompany_info['payee_name'] =$company_data['bank_address']; $proCompany_info['bank_account'] = $company_data['bank_card']; $proCompany_info['opening_bank'] =$company_data['bank_name']; From 0572fde5ad57e5dc15a98b1165f83d904141bb89 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Tue, 1 Dec 2020 20:33:53 +0800 Subject: [PATCH 04/10] =?UTF-8?q?11bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...regateFinanceStatementController.class.php | 19 +++-- .../CompanyStatementPoolController.class.php | 51 +++++++------ .../CompanyStatementSetController.class.php | 39 +++++++++- .../View/CompanyStatementPool/editPuPool.html | 47 ++++++++---- .../editSpecialPuPool.html | 76 ++++++++++++------- 5 files changed, 154 insertions(+), 78 deletions(-) diff --git a/Application/Admin/Controller/AggregateFinanceStatementController.class.php b/Application/Admin/Controller/AggregateFinanceStatementController.class.php index 0c21874a8..cd9fd1bca 100644 --- a/Application/Admin/Controller/AggregateFinanceStatementController.class.php +++ b/Application/Admin/Controller/AggregateFinanceStatementController.class.php @@ -640,8 +640,11 @@ class AggregateFinanceStatementController extends ThinkController if($data['pay_type'] == 0){ //甲-乙 $data['pay_company'] = $data['second_party_info']; + $data['invoice'] = $data['first_party_info']; + }else{ $data['pay_company'] = $data['first_party_info']; + $data['invoice'] = $data['second_party_info']; } $this->doAddOperationLog($id,"导出"); $relation = M("company_relation","tab_")->where("(first_company_id={$data['channel_id']} and first_company_type=3) or (second_company_id = {$data['channel_id']} and second_company_type=3)")->find(); @@ -754,14 +757,14 @@ class AggregateFinanceStatementController extends ThinkController $objPHPExcel->getActiveSheet()->getRowDimension(($line+6))->setRowHeight($address_height*$height); //开票信息 - $invoice_data = "发票类型:".$data['pay_company']['invoice_type']; - $invoice_data .= "\n发票抬头:".$data['pay_company']['partner']; - $invoice_data .= "\n纳税人识别号:".$data['pay_company']['company_tax_no']; - - $invoice_data .= "\n开户银行:".$data['pay_company']['opening_bank']; - $invoice_data .= "\n开户账号:".$data['pay_company']['bank_account']; - $invoice_data .= "\n开票内容:".$data['pay_company']['invoice_item']; - $invoice_data .= "\n注册地址及电话:".$data['pay_company']['register_address'].",".$data['second_party_info']['register_phone']; + $invoice_data = "发票类型:".$data['invoice']['invoice_type']; + $invoice_data .= "\n发票抬头:".$data['invoice']['partner']; + $invoice_data .= "\n纳税人识别号:".$data['invoice']['company_tax_no']; + + $invoice_data .= "\n开户银行:".$data['invoice']['opening_bank']; + $invoice_data .= "\n开户账号:".$data['invoice']['bank_account']; + $invoice_data .= "\n开票内容:".$data['invoice']['invoice_item']; + $invoice_data .= "\n注册地址及电话:".$data['invoice']['register_address'].",".$data['second_party_info']['register_phone']; $objPHPExcel->getActiveSheet()->setCellValue('B'.($line+7), $invoice_data);//乙方 diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index 993f19158..e9be8af63 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -294,6 +294,11 @@ class CompanyStatementPoolController extends ThinkController $v['statement_money'] = "=ROUND("; } + + + $handle_data = $this->changeDataStruct($v['statement_info'],$is_export,$week_line); + + $v['statement_info'] = $handle_data; $row = 0; foreach($v['statement_info'] as $ke=>&$va){ $va['row'] = count($va['game_list']); @@ -336,15 +341,13 @@ class CompanyStatementPoolController extends ThinkController $v['statement_money'] .= "N{$line}+"; }else{ $count['platform_amount'] += $val['pay_amount']; - $count['sum_money'] += $val['sum_money']; +// $count['sum_money'] += $val['sum_money']; } + } + $count['week_money'] += $va['week_amount']; + $count['sum_money'] += $va['week_amount']; } - - $handle_data = $this->changeDataStruct($v['statement_info'],$is_export,$week_line); - - $v['statement_info'] = $handle_data; - $v['row'] = $row; if($is_export){ if($v['withdraw_type'] != 3) { @@ -388,6 +391,10 @@ class CompanyStatementPoolController extends ThinkController $v['statement_money'] = "=ROUND("; } + $handle_data = $this->changeDataStruct($v['statement_info'],$is_export,$week_line); + + $v['statement_info'] = $handle_data; + $row = 0; foreach($v['statement_info'] as $ke=>&$va){ $va['row'] = count($va['game_list']); @@ -430,15 +437,13 @@ class CompanyStatementPoolController extends ThinkController $v['statement_money'] .= "N{$line}+"; }else{ $count['platform_amount'] += $val['pay_amount']; - $count['sum_money'] += $val['sum_money']; +// $count['sum_money'] += $val['sum_money']; } } + $count['week_money'] += $va['week_amount']; + $count['sum_money'] += $va['week_amount']; } - $handle_data = $this->changeDataStruct($v['statement_info'],$is_export,$week_line); - - $v['statement_info'] = $handle_data; - $v['row'] = $row; if($is_export){ if($v['withdraw_type'] != 3) { @@ -484,7 +489,7 @@ class CompanyStatementPoolController extends ThinkController $v['statement_money'] = "=ROUND("; } $handle_data = $this->changeDataStruct($v['statement_info'],$is_export,$week_line); - +// dump($handle_data); $v['statement_info'] = $handle_data; $row = 0; foreach($v['statement_info'] as $ke=>&$va){ @@ -515,17 +520,19 @@ class CompanyStatementPoolController extends ThinkController if($v['withdraw_type'] != 3) { $val['sum_money'] = "=ROUND((K{$line}-L{$line})*(M{$line}+N{$line}),2)"; } else { - $val['sum_money'] = "=ROUND(K{$line}*(N{$line}),2)"; + $val['sum_money'] = "=ROUND((K{$line}-L{$line})*(N{$line}),2)"; } $v['statement_money'] .= "S{$line}+"; }else{ $count['platform_amount'] += $val['pay_amount']; - $count['week_money'] += $val['sum_money']; - $count['sum_money'] += $val['sum_money']; + +// $count['sum_money'] += $val['sum_money']; } } + $count['week_money'] += $va['week_amount']; + $count['sum_money'] += $va['week_amount']; } - +// dump($count); $v['row'] = $row; @@ -598,7 +605,7 @@ class CompanyStatementPoolController extends ThinkController //周结算金额计算 for ($i=0;;$i++) { if ($sv[$i]['sum_money']) { - $game_data['week_amount'] += $sv[$i]['sum_money']; + $game_data['week_amount'] += $sv[$i]['sum_money']- $sv[$i]['withhold']; $game_data['withhold_amount'] += $sv[$i]['withhold']; $game_data['fine'] += $sv[$i]['fine']; $game_data['reward'] += $sv[$i]['reward']; @@ -696,7 +703,7 @@ class CompanyStatementPoolController extends ThinkController } } - +// dump($handle_data); return $handle_data?$handle_data:[]; } @@ -1699,7 +1706,7 @@ class CompanyStatementPoolController extends ThinkController $statement_amount = 0; $statement_lack_amount = 0; -// dump($increment_ratio); + foreach ($increment_ratio as $key => $value) { $statement_info = array(); @@ -1732,12 +1739,12 @@ class CompanyStatementPoolController extends ThinkController $statement_info[$k]['game_list'][$gk]['sum_money'] = $sum_money[$key][$v['account']][$gk]; - $amount += $sum_money[$key][$v['account']][$gk]; + $amount += $sum_money[$key][$v['account']][$gk] - $statement_info[$k]['game_list'][$gk]['withhold']; if ($st[$key][$akey] == 1) { - $statement_amount += $sum_money[$key][$v['account']][$gk]; + $statement_amount += $sum_money[$key][$v['account']][$gk]-$statement_info[$k]['game_list'][$gk]['withhold']; } else { - $statement_lack_amount += $sum_money[$key][$v['account']][$gk]; + $statement_lack_amount += $sum_money[$key][$v['account']][$gk]-$statement_info[$k]['game_list'][$gk]['withhold']; } } diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index 55cd1331c..6d5278671 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -998,6 +998,7 @@ class CompanyStatementSetController extends Controller { if(empty($list)){continue;} + foreach($list as $k=>$v){ try { @@ -2188,8 +2189,6 @@ class CompanyStatementSetController extends Controller { */ protected function getModuleRatioGame($company_id,$relation_game_ids,$begintime,$endtime){ - - $where = [ "relation_game_id"=>["in",$relation_game_ids], "company_id"=>$company_id, @@ -2210,9 +2209,41 @@ class CompanyStatementSetController extends Controller { } if(is_string($relation_game_ids)) $relation_game_ids = explode(",",$relation_game_ids); - + + $array_mer = []; + + foreach ($relation_game_ids as $key => $value) { + $turnover_type = $this->getTurnoverType($value,$company_id,$begintime,$endtime); + + if ($turnover_type == 3 || $turnover_type == 4) { + + $mercy_game = M("game",'tab_')->field("original_package_name")->where(['relation_game_id'=>$value])->find()['original_package_name']; + + $original_game_id = M("game",'tab_') + ->field("relation_game_id") + ->where(['original_package_name'=>$mercy_game,'relation_game_id'=>['neq',$value]]) + ->group("relation_game_id") + ->select(); + + foreach ($original_game_id as $k => $v) { + + if(!in_array($v['relation_game_id'], $relation_game_ids)){ + + $array_mer[] = $v['relation_game_id']; + + } + + } + + } + + } + + $relation_game_ids = array_merge($relation_game_ids,$array_mer); + + if(empty($dbres)){ - return implode(",",$relation_game_ids);; + return implode(",",$relation_game_ids); }else{ $dbres = array_column($dbres,"relation_game_id"); $diff = array_diff($relation_game_ids,$dbres); diff --git a/Application/Admin/View/CompanyStatementPool/editPuPool.html b/Application/Admin/View/CompanyStatementPool/editPuPool.html index b40ab82ba..778e15be9 100644 --- a/Application/Admin/View/CompanyStatementPool/editPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/editPuPool.html @@ -174,8 +174,11 @@ {$com['reward']} {$com['fine']} - - {$com['statement_info'][0]['week_amount']} + + + + + {$com['statement_info'][0]['week_amount']} {$com['statement_money']} @@ -261,8 +264,11 @@ % {$account['game_list'][0]['sum_money']} - - {$account['week_amount']} + + + + + {$account['week_amount']} - @@ -454,13 +460,16 @@ //退款 var withhold = $(_this).parent().parent().find(".withhold").val(); - if (!withhold || withhold < 0) { + var oldwithhold = $(_this).parent().parent().find(".oldwithhold").val(); + // console.log(withhold-oldwithhold); + if (!withhold ) { withhold = 0; $(_this).parent().parent().find(".withhold").val(withhold); - } else if(parseFloat(withhold) > parseFloat(pay_money)) { - withhold = pay_money; - $(_this).parent().parent().find(".withhold").val(withhold); } + // else if(parseFloat(withhold) > parseFloat(pay_money)) { + // withhold = pay_money; + // $(_this).parent().parent().find(".withhold").val(withhold); + // } //补点 var increment_ratio = $(_this).parent().parent().find(".increment_ratio").val(); @@ -485,20 +494,26 @@ var this_amount = week_amount_find.find(".sum_money_span").text(); var week_amount = 0; + var i = 0; for (;;) { week_amount = week_amount_find.find(".week_amount").text(); - + i++; + // console.log(week_amount); if (week_amount) { break; } else { week_amount_find = week_amount_find.prev(); } + if (i>10) { + break; + } } - var D_value = parseFloat(old_amount)-parseFloat(this_amount) - parseFloat(withhold); + var D_value = parseFloat(old_amount)-parseFloat(this_amount) + (withhold-oldwithhold); - week_amount_find.find(".week_amount").text((parseFloat(week_amount)-D_value).toFixed(2)); + week_amount_find.find(".week_amount").text((parseFloat(week_amount) - D_value).toFixed(2)); + $(_this).parent().parent().find(".oldwithhold").val(withhold) } //结算金额重算 @@ -524,11 +539,13 @@ for (var i =0;i{$com['statement_info'][0]['game_list'][0]['statement_begin_time']}-{$com['statement_info'][0]['game_list'][0]['statement_end_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']}% % @@ -178,10 +178,11 @@ {$com['reward']} {$com['fine']} - {$com['statement_info'][0]['game_list'][0]['withhold']|default=0} - + + + - {$com['statement_info'][0]['week_amount']} + {$com['statement_info'][0]['week_amount']} {$com['statement_money']} @@ -267,8 +268,12 @@ % {$account['game_list'][0]['sum_money']} - - {$account['week_amount']} + + + + + + {$account['week_amount']} - @@ -459,14 +464,17 @@ } //退款 - var withhold = $(_this).parent().parent().find(".withhold").val(); - if (!withhold || withhold < 0) { + var withhold = parseFloat($(_this).parent().parent().find(".withhold").val()); + var oldwithhold = $(_this).parent().parent().find(".oldwithhold").val(); + + if (!withhold ) { withhold = 0; $(_this).parent().parent().find(".withhold").val(withhold); - } else if(parseFloat(withhold) > parseFloat(pay_money)) { - withhold = pay_money; - $(_this).parent().parent().find(".withhold").val(withhold); } + // else if(parseFloat(withhold) > parseFloat(pay_money)) { + // withhold = pay_money; + // $(_this).parent().parent().find(".withhold").val(withhold); + // } //补点 var increment_ratio = $(_this).parent().parent().find(".increment_ratio").val(); @@ -481,30 +489,36 @@ var week_amount_find = $(_this).parent().parent(); var old_amount = week_amount_find.find(".sum_money_span").text(); + var week_amount = 0; + var i = 0; + for (;;) { + week_amount = week_amount_find.find(".week_amount").text(); + i++; + if (week_amount) { + break; + } else { + week_amount_find = week_amount_find.prev(); + } + if (i>10) { + break; + } + } + //扣款 pay_money = parseFloat(pay_money) - parseFloat(refund); - var value = (parseFloat(pay_money)*(parseFloat(ratio)/100) + parseFloat(pay_money)*(parseFloat(increment_ratio)/100)); + + var value = (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)); var this_amount = week_amount_find.find(".sum_money_span").text(); - var week_amount = 0; - for (;;) { - week_amount = week_amount_find.find(".week_amount").text(); - - if (week_amount) { - break; - } else { - week_amount_find = week_amount_find.prev(); - } - } - - var D_value = parseFloat(old_amount)-parseFloat(this_amount) - parseFloat(withhold); + var D_value = parseFloat(old_amount)-parseFloat(this_amount) + (withhold-oldwithhold) ; week_amount_find.find(".week_amount").text((parseFloat(week_amount)-D_value).toFixed(2)); - + // week_amount_find.find(".week_amount_input").val((parseFloat(week_amount)-D_value- parseFloat(withhold))); + $(_this).parent().parent().find(".oldwithhold").val(withhold) } //结算金额重算 @@ -530,9 +544,13 @@ for (var i =0;i Date: Wed, 2 Dec 2020 09:55:14 +0800 Subject: [PATCH 05/10] =?UTF-8?q?11=E6=9C=88bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/CompanyStatementSetController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index 6d5278671..ba46ce8ed 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -2215,7 +2215,7 @@ class CompanyStatementSetController extends Controller { foreach ($relation_game_ids as $key => $value) { $turnover_type = $this->getTurnoverType($value,$company_id,$begintime,$endtime); - if ($turnover_type == 3 || $turnover_type == 4) { + if ($turnover_type == 2 || $turnover_type == 3 || $turnover_type == 4) { $mercy_game = M("game",'tab_')->field("original_package_name")->where(['relation_game_id'=>$value])->find()['original_package_name']; From 564a2ec91d5c34369957e98e3f00236312980c7f Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 2 Dec 2020 10:35:59 +0800 Subject: [PATCH 06/10] =?UTF-8?q?11=E6=9C=88bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/TimingController.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/TimingController.class.php b/Application/Admin/Controller/TimingController.class.php index e2d08f314..71a83319e 100644 --- a/Application/Admin/Controller/TimingController.class.php +++ b/Application/Admin/Controller/TimingController.class.php @@ -810,9 +810,9 @@ class TimingController extends AdminController { } // if (isset($return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']])) { - $return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']] = !$is_inside?$v['sum_money']:0; + $return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']] = !$is_inside?($v['sum_money']-($v['withhold']?$v['withhold']:0)):0; } else { - $return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']] += !$is_inside?$v['sum_money']:0; + $return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']] += !$is_inside?($v['sum_money']-($v['withhold']?$v['withhold']:0)):0; } } From 943d63faac974e6ceb521cce3e3e9b1ca13579e7 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 2 Dec 2020 10:57:34 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B4=A2=E5=8A=A1?= =?UTF-8?q?=E6=B1=87=E6=80=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/FinancialSummaryController.class.php | 2 +- Application/Admin/View/FinancialSummary/index.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/FinancialSummaryController.class.php b/Application/Admin/Controller/FinancialSummaryController.class.php index 5e598b42b..b2f60892b 100644 --- a/Application/Admin/Controller/FinancialSummaryController.class.php +++ b/Application/Admin/Controller/FinancialSummaryController.class.php @@ -23,7 +23,7 @@ class FinancialSummaryController extends AdminController public function index($p=1) { if(!array_key_exists("year",$_REQUEST) || !array_key_exists("type",$_REQUEST)){ - $this->redirect(ACTION_NAME, array('year' => date('Y',time()),"type"=>2)); + $this->redirect(ACTION_NAME, array('year' => date('Y',time()),"type"=>3)); } if(!IS_ROOT){ $this->OpAuthList= getModuleControllerAuth(); diff --git a/Application/Admin/View/FinancialSummary/index.html b/Application/Admin/View/FinancialSummary/index.html index a1a4968aa..d24b8ff3a 100644 --- a/Application/Admin/View/FinancialSummary/index.html +++ b/Application/Admin/View/FinancialSummary/index.html @@ -72,9 +72,9 @@
From 923851fea72a785131f8d66cbfd9da7677237a0e Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 2 Dec 2020 13:42:27 +0800 Subject: [PATCH 08/10] =?UTF-8?q?11=E6=9C=88bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementPoolController.class.php | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementPoolController.class.php b/Application/Admin/Controller/CompanyStatementPoolController.class.php index e9be8af63..50f3f3fba 100644 --- a/Application/Admin/Controller/CompanyStatementPoolController.class.php +++ b/Application/Admin/Controller/CompanyStatementPoolController.class.php @@ -605,7 +605,7 @@ class CompanyStatementPoolController extends ThinkController //周结算金额计算 for ($i=0;;$i++) { if ($sv[$i]['sum_money']) { - $game_data['week_amount'] += $sv[$i]['sum_money']- $sv[$i]['withhold']; + $game_data['week_amount'] += $sv[$i]['sum_money']- $sv[$i]['withhold']+$sv[$i]['reward']-$sv[$i]['fine']; $game_data['withhold_amount'] += $sv[$i]['withhold']; $game_data['fine'] += $sv[$i]['fine']; $game_data['reward'] += $sv[$i]['reward']; @@ -1705,6 +1705,10 @@ class CompanyStatementPoolController extends ThinkController $amount = 0; $statement_amount = 0; $statement_lack_amount = 0; + $reward = 0; + $fine = 0; + $lreward = 0; + $lfine = 0; foreach ($increment_ratio as $key => $value) { @@ -1720,6 +1724,7 @@ class CompanyStatementPoolController extends ThinkController $statement_data = $model->where(['id'=>$key])->find(); + $statement_info = json_decode($statement_data['statement_info'],true); foreach ($statement_info as $k => $v) { @@ -1745,6 +1750,7 @@ class CompanyStatementPoolController extends ThinkController $statement_amount += $sum_money[$key][$v['account']][$gk]-$statement_info[$k]['game_list'][$gk]['withhold']; } else { $statement_lack_amount += $sum_money[$key][$v['account']][$gk]-$statement_info[$k]['game_list'][$gk]['withhold']; + } } @@ -1753,7 +1759,16 @@ class CompanyStatementPoolController extends ThinkController $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]]); + $r_data = $model->field("fine,reward")->where(['id'=>$key])->find(); + if($model == M("company_statement_info","tab_")) { + $reward += $r_data['reward']; + $fine += $r_data['fine']; + } else { + $lreward += $r_data['reward']; + $lfine += $r_data['fine']; + } + + $model->where(['id'=>$key])->save(['statement_info'=>$statement_info_data,'statement_money'=>$amount+($r_data['reward']?$r_data['reward']:0)-($r_data['fine']?$r_data['fine']:0),'pay_amount'=>$amount,'remark'=>$remark[$key]]); $amount = 0; @@ -1762,7 +1777,7 @@ class CompanyStatementPoolController extends ThinkController } - M("company_statement_pool","tab_")->where(['id'=>$id])->save(['pay_amount'=>$statement_amount,'statement_money'=>$statement_amount,'lack_statement_money'=>$statement_lack_amount]); + M("company_statement_pool","tab_")->where(['id'=>$id])->save(['pay_amount'=>$statement_amount,'statement_money'=>$statement_amount+$reward-$fine,'lack_statement_money'=>$statement_lack_amount+$lreward-$lfine]); $this->ajaxReturn(['status'=>1,'info'=>'保存成功']); From 10ddadece76172deeb69873f54171bae69bae465 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 2 Dec 2020 14:10:27 +0800 Subject: [PATCH 09/10] =?UTF-8?q?js=E5=AD=97=E7=AC=A6=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=88=90=E6=95=B0=E5=AD=97=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/CompanyStatementPool/editPuPool.html | 2 +- .../Admin/View/CompanyStatementPool/editSpecialPuPool.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Admin/View/CompanyStatementPool/editPuPool.html b/Application/Admin/View/CompanyStatementPool/editPuPool.html index 778e15be9..a119beed3 100644 --- a/Application/Admin/View/CompanyStatementPool/editPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/editPuPool.html @@ -509,7 +509,7 @@ } } - var D_value = parseFloat(old_amount)-parseFloat(this_amount) + (withhold-oldwithhold); + var D_value = parseFloat(old_amount)-parseFloat(this_amount) + parseFloat(withhold-oldwithhold); 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 bcc213f90..3c944abd6 100644 --- a/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html @@ -514,7 +514,7 @@ var this_amount = week_amount_find.find(".sum_money_span").text(); - var D_value = parseFloat(old_amount)-parseFloat(this_amount) + (withhold-oldwithhold) ; + var D_value = parseFloat(old_amount)-parseFloat(this_amount) + parseFloat(withhold-oldwithhold) ; week_amount_find.find(".week_amount").text((parseFloat(week_amount)-D_value).toFixed(2)); // week_amount_find.find(".week_amount_input").val((parseFloat(week_amount)-D_value- parseFloat(withhold))); From bb0d37bb5368e639ea5dad02542b484abf870e08 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 2 Dec 2020 14:18:52 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=89=A3=E6=AC=BE?= =?UTF-8?q?=E6=97=A7=E7=9A=84=E9=AA=8C=E8=AF=81=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/CompanyStatementPool/editPuPool.html | 5 +++++ .../Admin/View/CompanyStatementPool/editSpecialPuPool.html | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/Application/Admin/View/CompanyStatementPool/editPuPool.html b/Application/Admin/View/CompanyStatementPool/editPuPool.html index a119beed3..d0e7b276e 100644 --- a/Application/Admin/View/CompanyStatementPool/editPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/editPuPool.html @@ -466,6 +466,11 @@ withhold = 0; $(_this).parent().parent().find(".withhold").val(withhold); } + + if (!oldwithhold ) { + oldwithhold = 0; + $(_this).parent().parent().find(".oldwithhold").val(oldwithhold); + } // else if(parseFloat(withhold) > parseFloat(pay_money)) { // withhold = pay_money; // $(_this).parent().parent().find(".withhold").val(withhold); diff --git a/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html b/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html index 3c944abd6..02709bf51 100644 --- a/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html +++ b/Application/Admin/View/CompanyStatementPool/editSpecialPuPool.html @@ -471,6 +471,11 @@ withhold = 0; $(_this).parent().parent().find(".withhold").val(withhold); } + + if (!oldwithhold ) { + oldwithhold = 0; + $(_this).parent().parent().find(".oldwithhold").val(oldwithhold); + } // else if(parseFloat(withhold) > parseFloat(pay_money)) { // withhold = pay_money; // $(_this).parent().parent().find(".withhold").val(withhold);