From 233fa89251a469bad490645f7ec49e32f9c120f6 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 29 Oct 2020 18:24:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E5=9B=A2=E6=8E=A8=E5=B9=BF=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/MarketPercentageController.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/MarketPercentageController.class.php b/Application/Admin/Controller/MarketPercentageController.class.php index d44756ad5..c16dbb7a0 100644 --- a/Application/Admin/Controller/MarketPercentageController.class.php +++ b/Application/Admin/Controller/MarketPercentageController.class.php @@ -1599,8 +1599,8 @@ class MarketPercentageController extends ThinkController if ($data['begin_time'] < $last_month && $data['end_time'] <= $last_month) { $this->ajaxReturn(['msg'=>"已经结算过的时间不能修改","status"=>0]); - } elseif ($data['begin_time'] < $last_month && $data['end_time'] > $last_month) { - unset($data['begin_time']); + } elseif ($data['begin_time'] <= $last_month && $data['end_time'] > $last_month) { + $data['begin_time'] = strtotime(date('Y-m-1',strtotime("-1 month"))); } $belong_game = M("company_belong_game","tab_") @@ -1687,7 +1687,7 @@ class MarketPercentageController extends ThinkController ->where(['id'=>$id]) ->find(); - if (date("m",$data['begin_time']) < date("m",time())) { + if (date("m",$data['begin_time']) < date("m",strtotime('-1 month'))) { $this->ajaxReturn(['msg'=>"过去已结算过的比例不能删除","status"=>0]); }