diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 0904b917b..90e37395e 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -3079,3 +3079,10 @@ function getMerchantName($id = 1){ return $data['name']?$data['name']:'无'; } + + +function dateFormat($date) { + + return date("Y.m.d",strtotime($date)); + +} \ No newline at end of file diff --git a/Application/Admin/Controller/PartnerController.class.php b/Application/Admin/Controller/PartnerController.class.php index b30c63d31..c08502c33 100644 --- a/Application/Admin/Controller/PartnerController.class.php +++ b/Application/Admin/Controller/PartnerController.class.php @@ -53,6 +53,14 @@ class PartnerController extends ThinkController $map["_string"] = "(contract_start_time <= {$time_end} ) OR (contract_end_time <= {$time_end})"; } + if($_REQUEST['original_package_name']) { + $game_map['original_package_name'] = ['like',"%{$_REQUEST['original_package_name']}%"]; + } + + if($_REQUEST['relation_game_name']) { + $game_map['relation_game_name'] = ['like',"%{$_REQUEST['relation_game_name']}%"]; + } + $page = intval(I('get.p', 0)); $page = $page ? $page : 1; //默认显示第一页数据 $row = intval(I('row', 0)); @@ -75,10 +83,10 @@ class PartnerController extends ThinkController }else{ $partners = $query ->field("p.*") - ->page($page,$row) +// ->page($page,$row) ->select(); } - +// dump($partners);die(); //获取公司id $partner_ids = array_column($partners, 'id'); @@ -145,7 +153,6 @@ class PartnerController extends ThinkController } - $parseData = array(); foreach ($partners as $key =>$value) { $tmpr = D("CompanyRelation")->getCompanyRelation(1,$value['id']); @@ -187,6 +194,18 @@ class PartnerController extends ThinkController $value['row'] = empty($row2) ? 1: $row2; $parseData[] = $value; } + + if ($_REQUEST['original_package_name'] || $_REQUEST['relation_game_name']) { + + foreach ( $parseData as $key => $value ) { + + if (!$value['game']) { + unset($parseData[$key]); + } + + } + } + if($is_export){ $this->assign('listData', $parseData); $GetData = $_GET; @@ -195,10 +214,12 @@ class PartnerController extends ThinkController $this->display("export"); die(); } + + $count = count($parseData); /* 查询记录总数 */ - $count = $model - ->where($map) - ->count(); +// $count = $model +// ->where($map) +// ->count(); //分页 $parameter['p'] = $page; $parameter['row'] = $row; @@ -206,6 +227,17 @@ class PartnerController extends ThinkController if ($page) { $this->assign('_page', $page); } + + $arraypage = $page; + $size = $row;//每页显示的记录数 + $parseData = array_slice($parseData, ($arraypage - 1) * $size, $size); +// $page = set_pagination($count, $row, $parameter); +// if ($page) { +// $this->assign('_page', $page); +// } +// dump($arraypage); +// dump($size);die(); + $this->checkListOrCountAuthRestMap($map,[]); $this->assign('listData', $parseData); $this->assign('count', $count); diff --git a/Application/Admin/View/CompanyGameRatio/addRatio.html b/Application/Admin/View/CompanyGameRatio/addRatio.html index e06e7f857..ca657fe45 100644 --- a/Application/Admin/View/CompanyGameRatio/addRatio.html +++ b/Application/Admin/View/CompanyGameRatio/addRatio.html @@ -238,6 +238,30 @@ $(function(){ var elementIdName = $(this).attr('id'); promoteGameRatioData[elementIdName] = val; }); + + function getMonday() { + var nowTemp = new Date();//当前时间 + + var oneDayLong = 24*60*60*1000 ;//一天的毫秒数 + + var c_time = nowTemp.getTime() ;//当前时间的毫秒时间 + + var c_day = nowTemp.getDay()||7;//当前时间的星期几 + + var m_time = c_time - (c_day-1)*oneDayLong;//当前周一的毫秒时间 + + var monday = new Date(m_time);//设置周一时间对象 + var m_year = monday.getFullYear(); + + var m_month = monday.getMonth()+1; + if (m_month<10) { + m_month = '0'+ m_month; + } + + var m_date = monday.getDate(); + return m_year+'-'+m_month+'-'+m_date; + } + subevn(); function subevn(){ $('#submit').off("click"); @@ -251,7 +275,7 @@ $(function(){ "begin_time":["date","开始时间不能为空"], "end_time":["nocheck"], "remark":["nocheck",'',"textarea"] - } + }; var cres = CIC.checkAddInput(obj); if(!cres){ return false; @@ -277,7 +301,15 @@ $(function(){ layer.msg("流水及比例不允许为空", {icon: 2}); return false; } - }) + }); + var momday = getMonday(); + + //判断日期是否小于当周周一 + if (momday > cres.begin_time) { + layer.msg("配置的开始日期不能大于当周周一", {icon: 2}); + return false; + } + if(!flag){ return false; diff --git a/Application/Admin/View/CompanyStatement/viewPuComplementStatement.html b/Application/Admin/View/CompanyStatement/viewPuComplementStatement.html index 44181396d..2045e341c 100644 --- a/Application/Admin/View/CompanyStatement/viewPuComplementStatement.html +++ b/Application/Admin/View/CompanyStatement/viewPuComplementStatement.html @@ -147,7 +147,7 @@ {$it['account']} {$it['game_list'][0]['game_name']} {$it['game_list'][0]['game_type_name']} - {$it['game_list'][0]['statement_begin_time']}~{$it['game_list'][0]['statement_end_time']} + {$it['game_list'][0]['statement_begin_time']|dateFormat}~{$it['game_list'][0]['statement_end_time']|dateFormat} {$it['game_list'][0]['pay_amount']} {$it['game_list'][0]['increment_ratio']}% diff --git a/Application/Admin/View/Partner/lists.html b/Application/Admin/View/Partner/lists.html index 330f429d7..e84cea9d3 100644 --- a/Application/Admin/View/Partner/lists.html +++ b/Application/Admin/View/Partner/lists.html @@ -64,6 +64,15 @@ +
+ +
+ +
+ +