小bug修改

master
zhengyongxing 4 years ago
parent 19c7f7db0d
commit 5acd5197ae

@ -3079,3 +3079,10 @@ function getMerchantName($id = 1){
return $data['name']?$data['name']:'无';
}
function dateFormat($date) {
return date("Y.m.d",strtotime($date));
}

@ -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);

@ -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;

@ -147,7 +147,7 @@
<td rowspan="{$it['row']}">{$it['account']}</td>
<td>{$it['game_list'][0]['game_name']}</td>
<td>{$it['game_list'][0]['game_type_name']}</td>
<td>{$it['game_list'][0]['statement_begin_time']}~{$it['game_list'][0]['statement_end_time']}</td>
<td>{$it['game_list'][0]['statement_begin_time']|dateFormat}~{$it['game_list'][0]['statement_end_time']|dateFormat}</td>
<td>{$it['game_list'][0]['pay_amount']}</td>
<if condition="$data['withdraw_type'] eq 2">
<td>{$it['game_list'][0]['increment_ratio']}%</td>

@ -64,6 +64,15 @@
<option value="2">个人</option>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<input type="text" id="original_package_name" name="original_package_name" class="" value="{$startDate}"
placeholder="请输入原包名"/>
</div>
<div class="input-list input-list-game search_label_rehab">
<input type="text" id="relation_game_name" name="relation_game_name" class="" value="{$startDate}"
placeholder="请输入现包名"/>
</div>
<div class="input-list">
<input type="text" id="time-start" name="timestart" class="" value="{$startDate}"

Loading…
Cancel
Save