From 23555f8d4df4cb28fb15d4096ccad3e00a99a289 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 26 Aug 2020 15:32:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E8=A1=A5=E7=82=B9=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementController.class.php | 29 ++++++++++++++++++- .../viewSpecialComplement.html | 2 +- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index 913755f0f..65e77603a 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -984,8 +984,35 @@ class CompanyStatementController extends ThinkController $radioMap['company_id'] = $_REQUEST['company_id']; } + + $start_time = strtotime($_REQUEST['time_start']); $end_time = strtotime($_REQUEST['time_end']) + 86399; + $check_add = M("company_statement","tab_")->field("statement_begin_time,statement_end_time,statement_info,company_type")->where(['company_id'=>$_REQUEST['company_id']])->select(); + + 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) + { + + $statementInfo = json_decode($value['statement_info'],true);; + if ($value['company_type'] == 2) { + $statementInfo = $statementInfo['game_list']; + } + + 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 (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) { $map['payed_time'] = ['between', [$start_time, $end_time]]; @@ -1176,7 +1203,7 @@ class CompanyStatementController extends ThinkController } - $this->ajaxReturn(['status'=>1,'data'=>$handleData]); + $this->ajaxReturn(['status'=>1,'data'=>$handleData,'msg'=>'']); } diff --git a/Application/Admin/View/CompanyStatement/viewSpecialComplement.html b/Application/Admin/View/CompanyStatement/viewSpecialComplement.html index 4f99690b6..78e728319 100644 --- a/Application/Admin/View/CompanyStatement/viewSpecialComplement.html +++ b/Application/Admin/View/CompanyStatement/viewSpecialComplement.html @@ -521,7 +521,7 @@ } } else { - layer.msg('获取数据失败'); + layer.msg(result.msg); } is_add = 1; layer.closeAll("loading");