From f218544e7f9bb4e62064b2e38633bd7efb921ca2 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 13 Feb 2020 20:45:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8E=A8=E5=B9=BF=E5=85=AC?= =?UTF-8?q?=E5=8F=B8=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PromoteCompanyController.class.php | 27 ++++++---- .../Admin/View/PromoteCompany/lists.html | 52 ++++++++++++++----- 2 files changed, 54 insertions(+), 25 deletions(-) diff --git a/Application/Admin/Controller/PromoteCompanyController.class.php b/Application/Admin/Controller/PromoteCompanyController.class.php index 1ece015a1..1d53d2179 100644 --- a/Application/Admin/Controller/PromoteCompanyController.class.php +++ b/Application/Admin/Controller/PromoteCompanyController.class.php @@ -20,15 +20,22 @@ class PromoteCompanyController extends ThinkController { $model = M($this->modelName, 'tab_'); $map = []; + $promotemap=[]; $company_name = trim(I('company_name')); - - if($company_name) - $map['tab_promote_company.company_name'] = array('like',"%{$company_name}%"); + if($company_name) $map['tab_promote_company.company_name'] = array('like',"%{$company_name}%"); if (isset($_REQUEST['status']) && $_REQUEST['status'] !== '') { $status = intval($_REQUEST['status']); $map['tab_promote_company.status'] = $status; $parameter['status'] = $status; } + if (isset($_REQUEST['promote_id'])) { + $map['id'] = M("Promote","tab_")->field("company_id")->where("id={$_REQUEST['promote_id']}")->find()['company_id']; + $promotemap['id']=$_REQUEST['promote_id']; + } + if (isset($_REQUEST['company_type'])) { + $map['company_type'] = $_REQUEST['company_type']; + } + $page = intval(I('get.p', 0)); $page = $page ? $page : 1; //默认显示第一页数据 @@ -43,17 +50,11 @@ class PromoteCompanyController extends ThinkController ->select(); //获取公司id $companyids = implode(',', array_column($companyres, 'id')); - // //处理公司数据 - // $company = array(); - // foreach($companyres as $k=>$v){ - // $company[] - // } //获取所属会长及其游戏分成 + $promotemap['company_id']=["in",$companyids]; $promoteres = M("Promote","tab_") ->field("id,company_id,account,settlement_type") - ->where(array( - "company_id"=>["in",$companyids] - )) + ->where($promotemap) ->select(); //获取会长id $promoteids = implode(',', array_column($promoteres, 'id')); @@ -188,6 +189,7 @@ class PromoteCompanyController extends ThinkController $this->assign('listData', $companyres); $this->assign('count', $count); + $this->assign('promoteList', getPromoteByLevel(1)); $this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Partner/lists'])->find()); $this->meta_title = '推广公司'; $this->display(); @@ -211,6 +213,9 @@ class PromoteCompanyController extends ThinkController $save = I('post.');//前端已经验证 $save['create_time'] = $time; $save['last_up_time'] = $time; + $save['contact_begin']=strtotime($save['contact_begin']); + $save['contact_end']=strtotime($save['contact_end']); + if(isset($save['resources'])){ $save['resources'] = json_encode($save['resources'],JSON_UNESCAPED_UNICODE); } diff --git a/Application/Admin/View/PromoteCompany/lists.html b/Application/Admin/View/PromoteCompany/lists.html index 484fc9581..f23a8c409 100644 --- a/Application/Admin/View/PromoteCompany/lists.html +++ b/Application/Admin/View/PromoteCompany/lists.html @@ -29,28 +29,53 @@ .data_list table td{ text-indent:0; } + .data_game_list table td{ + line-height:1; + padding: 3px; + } - +
+
-
-
- -
-
- - 搜索 +
+ + +
+
+   +
+ +
+ +
+
+ +
+ +
+ 搜索 +
@@ -77,19 +102,18 @@ 产品类型 游戏名称 合作方分成比例 - - - aOh! 暂时还没有内容! + aOh! 暂时还没有内容! + 查看 编辑 删除 @@ -191,14 +215,14 @@ {$_page|default=''}
-
+