From 8c25f55c6e74a042cb6bdc1fbb4103ab5f1939b1 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 14 Feb 2020 11:03:58 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8D=E8=83=BDcp?= =?UTF-8?q?=E5=85=AC=E5=8F=B8=E9=80=89=E6=8B=A9=E6=97=A0=E6=95=88=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/Statement/createCpStatement.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/View/Statement/createCpStatement.html b/Application/Admin/View/Statement/createCpStatement.html index 56e1016d4..74f98c5db 100644 --- a/Application/Admin/View/Statement/createCpStatement.html +++ b/Application/Admin/View/Statement/createCpStatement.html @@ -624,7 +624,7 @@ //CP上游公司 company_id = $("#first_partner_id").find("option:selected").val(); }else{ - company_type = $("#second_partner_id").find("option:selected").val(); + company_id = $("#second_partner_id").find("option:selected").val(); } //发起查询 var selectData = { From 5cea54585f4c41e9c87e226f1d87c6a8a0b24724 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 14 Feb 2020 11:19:51 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8A=E6=B8=B8?= =?UTF-8?q?=E7=BB=93=E7=AE=97=E5=8D=95=E9=80=89=E6=8B=A9=E5=90=8E=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=80=BC=E5=8F=98=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/Statement/createCpStatement.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Application/Admin/View/Statement/createCpStatement.html b/Application/Admin/View/Statement/createCpStatement.html index 74f98c5db..c5164d2b3 100644 --- a/Application/Admin/View/Statement/createCpStatement.html +++ b/Application/Admin/View/Statement/createCpStatement.html @@ -566,6 +566,11 @@ } $("#first_partner_id").select2(); $("#second_partner_id").select2(); + //重置数据 + + DATAOBJ.first_part_company=false; + DATAOBJ.second_part_company=false; + TPLSHOW.pushStatementTypeOption(); }) }) $("#first_partner_id").on("change",function(){ @@ -869,6 +874,10 @@ EVENT.changeStatementType(); $("#statement_type").change();//默认支付给乙方 // TPLSHOW.showPartPayInfo();//查看底下是否有值 + }else{ + var str = ""; + $("#statement_type").html(str); + EVENT.changeStatementType(); } }, //支付信息显示 From a26a1191cc67b973aa4aeb7454db40ccedbe58bc Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 14 Feb 2020 11:40:51 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8A=E6=B8=B8?= =?UTF-8?q?=E7=BB=93=E7=AE=97=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/StatementController.class.php | 35 ++++++++++++++++--- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/Application/Admin/Controller/StatementController.class.php b/Application/Admin/Controller/StatementController.class.php index d4a5a1f95..d369fd60b 100644 --- a/Application/Admin/Controller/StatementController.class.php +++ b/Application/Admin/Controller/StatementController.class.php @@ -110,6 +110,8 @@ class StatementController extends ThinkController $Statement = M("statement","tab_"); $repart =false; $errorstr = ''; + $errorstr1 = ''; + $errorstr2 = ''; //开始时间被重叠部分 $checkmap = array( "statement_begin_time"=>array("ELT",strtotime($_REQUEST['time_start'])), @@ -126,7 +128,7 @@ class StatementController extends ThinkController }else{ $end = $_REQUEST['time_end']; } - $errorstr .= ($begin."到".$end."期间的数据已经结算过
"); + $errorstr = ($begin."到".$end."期间的数据已经结算过
"); } //结束被重复的部分 $checkmap = array( @@ -134,18 +136,41 @@ class StatementController extends ThinkController "statement_end_time"=>array("EGT",strtotime($_REQUEST['time_end'])), "company_id"=>$CompanyId ); - if($repart){ - $checkmap["id"]=array("NEQ",$bres["id"]); - } + $bres = $Statement->field("statement_begin_time,statement_end_time")->where($checkmap)->find(); if($bres){ $repart=true; $begin = date("Y-m-d",$bres["statement_begin_time"]); //统计相交时间 $end = $_REQUEST['time_end']; - $errorstr .= ($begin."到".$end."期间的数据已经结算过
"); + $errorstr1 = ($begin."到".$end."期间的数据已经结算过
"); + } + //中间被包住 + $checkmap = array( + "statement_begin_time"=>array("EGT",strtotime($_REQUEST['time_start'])), + "statement_end_time"=>array("ELT",strtotime($_REQUEST['time_end'])), + "company_id"=>$CompanyId + ); + $bres = $Statement->field("statement_begin_time,statement_end_time")->where($checkmap)->find(); + if($bres){ + $repart=true; + $begin = date("Y-m-d",$bres["statement_begin_time"]); + //统计相交时间 + $end = date("Y-m-d",$bres["statement_end_time"]); + $errorstr2 = ($begin."到".$end."期间的数据已经结算过
"); } + if($repart){ + if($errorstr1 == $errorstr){ + $errorstr1 =''; + } + if($errorstr1 == $errorstr2){ + $errorstr1 =''; + } + if($errorstr == $errorstr2){ + $errorstr2 =''; + } + $errorstr .=($errorstr1.$errorstr2); $this->ajaxReturn(array("error"=>$errorstr,"code"=>2001)); }