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=''}
-
+