From df3b058b91e4a8a332f675f712489921a60a2cc3 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 3 Sep 2020 15:03:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=A1=A5=E7=82=B9=E6=AF=94=E4=BE=8B?= =?UTF-8?q?=E9=9D=9E=E8=B4=9F=E6=95=B0=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementController.class.php | 18 +++++++------ .../viewSpecialComplement.html | 25 ++++++++++++++++--- 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index df578d116..4bca64e9f 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -1145,10 +1145,10 @@ class CompanyStatementController extends ThinkController foreach ($check_add as $key => $value) { - if ($value['statement_end_time'] >= $start_time && $value['statement_end_time']<=$end_time - ||$value['statement_begin_time']>=$start_time && $value['statement_begin_time']<=$end_time - ||$value['statement_begin_time']>=$start_time && $value['statement_end_time'] <= $end_time) - { +// if ($value['statement_end_time'] >= $start_time && $value['statement_end_time']<=$end_time +// ||$value['statement_begin_time']>=$start_time && $value['statement_begin_time']<=$end_time +// ||$value['statement_begin_time']<=$start_time && $value['statement_end_time'] >= $end_time) +// { $statementInfo = json_decode($value['statement_info'],true);; if ($value['company_type'] == 2) { @@ -1156,12 +1156,16 @@ class CompanyStatementController extends ThinkController } foreach ($statementInfo as $k => $v) { - if (in_array($v['relation_game_id'],$relation_game_data)) { - $this->ajaxReturn(['status'=>0,'data'=>[],'msg'=>"《{$v['game_name']}》在日期:{$_REQUEST['time_start']}-{$_REQUEST['time_end']}有结算过的部分,请重新选择"]); + if (strtotime(str_replace('.','-',$v['statement_end_time'])) >= $start_time && strtotime(str_replace('.','-',$v['statement_end_time']))<=$end_time + ||strtotime(str_replace('.','-',$v['statement_begin_time']))>=$start_time && strtotime(str_replace('.','-',$v['statement_begin_time']))<=$end_time + ||strtotime(str_replace('.','-',$v['statement_begin_time']))<=$start_time && strtotime(str_replace('.','-',$v['statement_end_time'])) >= $end_time) { + if (in_array($v['relation_game_id'], $relation_game_data)) { + $this->ajaxReturn(['status' => 0, 'data' => [], 'msg' => "《{$v['game_name']}》在日期:{$_REQUEST['time_start']}-{$_REQUEST['time_end']}有结算过的部分,请重新选择"]); + } } } - } +// } } diff --git a/Application/Admin/View/CompanyStatement/viewSpecialComplement.html b/Application/Admin/View/CompanyStatement/viewSpecialComplement.html index 3b43c077d..12a9c0985 100644 --- a/Application/Admin/View/CompanyStatement/viewSpecialComplement.html +++ b/Application/Admin/View/CompanyStatement/viewSpecialComplement.html @@ -260,6 +260,7 @@ layer.msg("正在提交请勿重复提交..."); return; } + var is_zero = 0; layer.load(2); is_submit = 0; var time_start = $("#time_start").val(); @@ -293,7 +294,11 @@ sec_data['statement_begin_time'] = $(cval).next().find('.begin_time').text(); sec_data['statement_end_time'] = $(cval).next().find('.end_time').text(); statement_info.push(sec_data); - + if (sec_data['increment_ratio']<=0||sec_data['pay_amount']<=0) { + is_zero = 1; + layer.closeAll("loading"); + return; + } var _append = $(cval).parent(); var row = $(cval).attr('rowspan'); for (var i=0;i100) { $(this).val(100); ratio = 100; } - //最终的分配金额 var withdraw_amount = ((pay_amount * ratio)/100).toFixed(2); From 229d8d2a5056f23972a8bb858e81b38c6d65e7e0 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 3 Sep 2020 15:37:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=A4=E5=AE=9A=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=BD=95=E5=85=A5=E8=BF=87=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementController.class.php | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index 4bca64e9f..27394764c 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -1152,19 +1152,32 @@ class CompanyStatementController extends ThinkController $statementInfo = json_decode($value['statement_info'],true);; if ($value['company_type'] == 2) { - $statementInfo = $statementInfo['game_list']; - } - foreach ($statementInfo as $k => $v) { - if (strtotime(str_replace('.','-',$v['statement_end_time'])) >= $start_time && strtotime(str_replace('.','-',$v['statement_end_time']))<=$end_time - ||strtotime(str_replace('.','-',$v['statement_begin_time']))>=$start_time && strtotime(str_replace('.','-',$v['statement_begin_time']))<=$end_time - ||strtotime(str_replace('.','-',$v['statement_begin_time']))<=$start_time && strtotime(str_replace('.','-',$v['statement_end_time'])) >= $end_time) { - if (in_array($v['relation_game_id'], $relation_game_data)) { - $this->ajaxReturn(['status' => 0, 'data' => [], 'msg' => "《{$v['game_name']}》在日期:{$_REQUEST['time_start']}-{$_REQUEST['time_end']}有结算过的部分,请重新选择"]); + foreach ($statementInfo as $sk => $sv) { + $statementInfos = $sv['game_list']; + foreach ($statementInfos as $k => $v) { + if (strtotime(str_replace('.','-',$v['statement_end_time'])) >= $start_time && strtotime(str_replace('.','-',$v['statement_end_time']))<=$end_time + ||strtotime(str_replace('.','-',$v['statement_begin_time']))>=$start_time && strtotime(str_replace('.','-',$v['statement_begin_time']))<=$end_time + ||strtotime(str_replace('.','-',$v['statement_begin_time']))<=$start_time && strtotime(str_replace('.','-',$v['statement_end_time'])) >= $end_time) { + if (in_array($v['relation_game_id'], $relation_game_data)) { + $this->ajaxReturn(['status' => 0, 'data' => [], 'msg' => "《{$v['game_name']}》在日期:{$_REQUEST['time_start']}-{$_REQUEST['time_end']}有结算过的部分,请重新选择"]); + } + } + } + } + } else { + foreach ($statementInfo as $k => $v) { + if (strtotime(str_replace('.','-',$v['statement_end_time'])) >= $start_time && strtotime(str_replace('.','-',$v['statement_end_time']))<=$end_time + ||strtotime(str_replace('.','-',$v['statement_begin_time']))>=$start_time && strtotime(str_replace('.','-',$v['statement_begin_time']))<=$end_time + ||strtotime(str_replace('.','-',$v['statement_begin_time']))<=$start_time && strtotime(str_replace('.','-',$v['statement_end_time'])) >= $end_time) { + if (in_array($v['relation_game_id'], $relation_game_data)) { + $this->ajaxReturn(['status' => 0, 'data' => [], 'msg' => "《{$v['game_name']}》在日期:{$_REQUEST['time_start']}-{$_REQUEST['time_end']}有结算过的部分,请重新选择"]); + } } } } + // } }