From fb9deff8b7aac4d835bd964cb5523e907fc24c73 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 27 Jul 2020 13:49:32 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E7=94=9F=E6=95=88=E7=9A=84=E9=BB=98=E8=AE=A4=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/PromoteCompany/add.html | 5 ++++- Application/Admin/View/PromoteCompany/edit.html | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Application/Admin/View/PromoteCompany/add.html b/Application/Admin/View/PromoteCompany/add.html index 354ff05b7..47cc3d384 100644 --- a/Application/Admin/View/PromoteCompany/add.html +++ b/Application/Admin/View/PromoteCompany/add.html @@ -185,7 +185,9 @@  -  + 结束时间不选默认永久 + @@ -501,7 +503,7 @@ if(start>=end) {layer.msg('开始时间必须小于结束时间');$("#contact_end").val('');return false;} return false; }); - + $('.time3').datetimepicker({ format: 'yyyy-mm-dd', language:"zh-CN", @@ -517,6 +519,7 @@ return false; }); + $(".time3").datetimepicker("setDate", new Date()); $('.time4').datetimepicker({ format: 'yyyy-mm-dd', diff --git a/Application/Admin/View/PromoteCompany/edit.html b/Application/Admin/View/PromoteCompany/edit.html index b3851e34c..aa615709c 100644 --- a/Application/Admin/View/PromoteCompany/edit.html +++ b/Application/Admin/View/PromoteCompany/edit.html @@ -183,6 +183,7 @@  -  + 结束时间不选默认永久 From 0e8730b8103ea94c359faa166b82b40ecbda758b Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 27 Jul 2020 13:55:33 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=87=8D=E7=AE=97?= =?UTF-8?q?=E9=9C=80=E9=87=8D=E6=96=B0=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/CompanyStatementController.class.php | 2 +- .../Admin/Controller/CompanyStatementSetController.class.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index 141d219c5..ddc1e9a35 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -395,7 +395,7 @@ class CompanyStatementController extends ThinkController $ids = $_REQUEST['ids']; $dbres = $this->DBModel->field("id,verify_status,verify_log")->where("id in ({$ids})")->select(); foreach($dbres as $k=>&$v){ - if(in_array($v['verify_status'],[3,4])) continue; //合作方确认后不进行重算 + // if(in_array($v['verify_status'],[3,4])) continue; //合作方确认后不进行重算 //重算 $res = A("CompanyStatementSet")->updateCompanyStatementData($v['id'],$this->admininfo["username"]); if($res === false){ diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index 8b2daedff..b40b043d3 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -1175,6 +1175,8 @@ class CompanyStatementSetController extends Controller { //重写用户 $savedata['verify_log'] = json_encode(["create_user"=>$admin_user,"create_time"=>date("Y-m-d H:i:s")]); $savedata['verify_status'] = 0; + $savedata['confirm_status'] = 0; + $savedata['confirm_log'] = ''; $savedata['id'] = $dbres['id']; return $StatementDb->save($savedata); } From 69615c14595e09214ed77c6cbf3541d0b25c0de3 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 27 Jul 2020 14:04:11 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E6=89=A7=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementSetController.class.php | 90 +++++++++++++------ 1 file changed, 65 insertions(+), 25 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementSetController.class.php b/Application/Admin/Controller/CompanyStatementSetController.class.php index b40b043d3..b83d26c3e 100644 --- a/Application/Admin/Controller/CompanyStatementSetController.class.php +++ b/Application/Admin/Controller/CompanyStatementSetController.class.php @@ -25,7 +25,15 @@ class CompanyStatementSetController extends Controller { } $this->cpapihost = $cpapihost['value']; } - public function setFreeDateCount($begin,$end='') + /** + * Undocumented function + * + * @param [type] $begin 开始时间 2020-04-01 + * @param string $end 结束时间,默认今天 + * @param string $company all/pc/cp/pu 全部 下游公司 上游 下游个人 + * @return void + */ + public function setFreeDateCount($begin,$end='',$company='all') { if($end == '') $end = $begin; //判断日期格式 @@ -48,10 +56,10 @@ class CompanyStatementSetController extends Controller { $datelist = get_date_list($starttime,$endtime,1); $countdate = count($datelist); for($i=0;$i<$countdate;$i++){ - $this->setDailyCount($datelist[$i]); + $this->setDailyCount($datelist[$i],$company); } } - public function setDailyCount($stime="now") + public function setDailyCount($stime="now",$company='all') { if(!IS_CLI){ die("只支持脚本访问"); @@ -67,33 +75,65 @@ class CompanyStatementSetController extends Controller { if($w == 1 || $d == 1){ if($w == 1){ - echo $nowdate.":".PHP_EOL; - echo "--周结begin".PHP_EOL; - - $this->cpStatement(0,$stime); - echo "∟----CP周结统计ok".PHP_EOL; - - $this->promoteCompanyStatement(0,$stime); - echo "∟----推广公司周结统计ok".PHP_EOL; - - $this->promoteUserPool(0,$stime); - echo "∟----推广个人周结ok".PHP_EOL; + if($company == "all"){ + echo $nowdate.":".PHP_EOL; + echo "--周结begin".PHP_EOL; + + $this->cpStatement(0,$stime); + echo "∟----CP周结统计ok".PHP_EOL; + + $this->promoteCompanyStatement(0,$stime); + echo "∟----推广公司周结统计ok".PHP_EOL; + + $this->promoteUserPool(0,$stime); + echo "∟----推广个人周结ok".PHP_EOL; + } + if($company == "cp"){ + $this->cpStatement(0,$stime); + echo "∟----CP周结统计ok".PHP_EOL; + } + if($company == "pc"){ + $this->promoteCompanyStatement(0,$stime); + echo "∟----推广公司周结统计ok".PHP_EOL; + } + if($company == "pu"){ + $this->promoteUserPool(0,$stime); + echo "∟----推广个人周结ok".PHP_EOL; + } + } if($d == 1){ - echo $nowdate.":".PHP_EOL; - echo "--月结&补点begin".PHP_EOL; + if($company == "all"){ + echo $nowdate.":".PHP_EOL; + echo "--月结&补点begin".PHP_EOL; - $this->cpStatement(1,$stime); - $this->cpStatement(2,$stime); - echo "∟----CP月结&补点统计ok".PHP_EOL; + $this->cpStatement(1,$stime); + $this->cpStatement(2,$stime); + echo "∟----CP月结&补点统计ok".PHP_EOL; - $this->promoteCompanyStatement(1,$stime); - $this->promoteCompanyStatement(2,$stime); - echo "∟----推广公司月结&补点统计ok".PHP_EOL; + $this->promoteCompanyStatement(1,$stime); + $this->promoteCompanyStatement(2,$stime); + echo "∟----推广公司月结&补点统计ok".PHP_EOL; - $this->promoteUserPool(1,$stime); - $this->promoteUserPool(2,$stime); - echo "∟----推广个人月结&补点统计ok".PHP_EOL; + $this->promoteUserPool(1,$stime); + $this->promoteUserPool(2,$stime); + echo "∟----推广个人月结&补点统计ok".PHP_EOL; + } + if($company == "cp"){ + $this->cpStatement(1,$stime); + $this->cpStatement(2,$stime); + echo "∟----CP月结&补点统计ok".PHP_EOL; + } + if($company == "pc"){ + $this->promoteCompanyStatement(1,$stime); + $this->promoteCompanyStatement(2,$stime); + echo "∟----推广公司月结&补点统计ok".PHP_EOL; + } + if($company == "pu"){ + $this->promoteUserPool(1,$stime); + $this->promoteUserPool(2,$stime); + echo "∟----推广个人月结&补点统计ok".PHP_EOL; + } } }else{ echo $nowdate."非周一和月初,无需任何处理".PHP_EOL;