From 31fa1fcfc223c182188aaa76a9961b1c6adf8a0d Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 9 Jun 2021 18:07:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E6=B8=B8cp=E6=96=B0=E5=A2=9E=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E8=BF=87=E6=9C=9F=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PartnerController.class.php | 21 +++++++++++++++++-- Application/Admin/View/Partner/export.html | 2 ++ Application/Admin/View/Partner/lists.html | 9 ++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/PartnerController.class.php b/Application/Admin/Controller/PartnerController.class.php index 2bbcbd793..e31f815f6 100644 --- a/Application/Admin/Controller/PartnerController.class.php +++ b/Application/Admin/Controller/PartnerController.class.php @@ -26,7 +26,8 @@ class PartnerController extends ThinkController public function lists() { $model = M($this->modelName, 'tab_'); - $map = []; + $now = time(); + $map = ["_string" => "1=1 "]; $id = intval(I('id', 0)); if (!empty($id)) { $map['tab_partner.id'] = $id; @@ -56,6 +57,14 @@ class PartnerController extends ThinkController $time_end = strtotime($_REQUEST['timeend'])+ 86399; $map["_string"] = "(contract_start_time <= {$time_end} ) OR (contract_end_time <= {$time_end})"; } + if (!empty(I('contract_type'))) { + if(I('contract_type') == 1){ + $map['_string'] .= " AND (contract_end_time = 0 OR contract_end_time > {$now})"; + }else{ + $map['_string'] .= " AND (contract_end_time <= {$now} AND contract_end_time != 0)"; + } + } + if($_REQUEST['original_package_name']) { $game_map['original_package_name'] = ['like',"%{$_REQUEST['original_package_name']}%"]; @@ -241,6 +250,14 @@ class PartnerController extends ThinkController $contract_end_time = $value['contract_end_time'] ? time_format($value['contract_end_time'], 'Y/m/d') : '-'; } $value['contract_time'] = $contract_start_time . '-' . $contract_end_time; + //判断合同是否过期 + if($value['contract_end_time'] == 0){ + $value['contract_str'] = "未过期"; + }elseif($value['contract_end_time']-0+86399 < time()){ + $value['contract_str'] = "已过期"; + }else{ + $value['contract_str'] = "未过期"; + } $validity_start_time = $value['validity_start_time'] ? time_format($value['validity_start_time'], 'Y/m/d') : '-'; if($value['validity_start_time']){ @@ -265,7 +282,7 @@ class PartnerController extends ThinkController } } - + // dd($parseData); if($is_export){ $this->assign('listData', $parseData); $GetData = $_GET; diff --git a/Application/Admin/View/Partner/export.html b/Application/Admin/View/Partner/export.html index 16a91ae7d..9b4eb4c34 100644 --- a/Application/Admin/View/Partner/export.html +++ b/Application/Admin/View/Partner/export.html @@ -72,6 +72,7 @@ 是否有游戏资质 是否签署合同 合同期限 + 合同是否过期 生效期限 公司税号 开票税点 @@ -136,6 +137,7 @@ {$data.is_sign_contract|default="--"} {$data.contract_time} + {$data.contract_str} {$data.validity_time} {$data.company_tax_no|default="--"} {$data.invoice_rate|showPercent} diff --git a/Application/Admin/View/Partner/lists.html b/Application/Admin/View/Partner/lists.html index 1a173ce00..b847eecba 100644 --- a/Application/Admin/View/Partner/lists.html +++ b/Application/Admin/View/Partner/lists.html @@ -84,6 +84,13 @@ +
+ +
搜索 @@ -114,6 +121,7 @@ 游戏分成比例 合同期限 + 合同是否过期 结算周期 户名 账号 @@ -156,6 +164,7 @@ {$data.contract_time} + {$data.contract_str} {$data.settlement_type|default="--"} {$data.payee_name|default="--"} {$data.bank_account|default="--"}