Merge pull request 'feature/add_item' (#230) from feature/add_item into release

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/230
master
郑永星 4 years ago
commit 77532bdb08

@ -71,14 +71,39 @@ class SocietyInfoController extends ThinkController
$map['communication_time'] = array('elt', time() - $gap * 86400);
}
if (I('sociaty_level') && I('sociaty_level') != '0') $map['sociaty_level'] = I('sociaty_level');
//获取分页数据
$query = $model->where($map)->order("communication_time desc");
$count = $query->count();
if($_REQUEST['ids'] && $is_export) {
$map['id'] = ['in',$_REQUEST['ids']];
}
$order_query = $query
->where($map);
if (I('data_order')) {
$data_order = reset(explode(',', $_REQUEST['data_order']));
$data_order_type = end(explode(',', $_REQUEST['data_order']));
if ($data_order == 4 && $data_order_type == "create_time") {
$order_query = $order_query->order("create_time desc");
} else if($data_order == 3 && $data_order_type == "create_time") {
$order_query = $order_query->order("create_time asc");
}
if ($data_order == 4 && $data_order_type == "communication_time") {
$order_query = $order_query->order("communication_time desc");
} else if($data_order == 3 && $data_order_type == "communication_time") {
$order_query = $order_query->order("communication_time asc");
}
$this->assign('userarpu_order', $data_order);
$this->assign('userarpu_order_type', $data_order_type);
}
if($is_export){
$map['id'] = ['in',$_REQUEST['ids']];
$parseData = $query->field("province, city, company_name, register_capital, functionary, phone, wechat, qq, game_type, game_name, join_platform, promote_scale,sociaty_level, turnover, address, league_info, is_potential, remark, interface_person, create_time, communication_time, create_account")
->where($map)
->order("communication_time desc")
$parseData = $order_query->field("province, city, company_name, register_capital, functionary, phone, wechat, qq, game_type, game_name, join_platform, promote_scale,sociaty_level, turnover, address, league_info, is_potential, remark, interface_person, create_time, communication_time, create_account")
->select();
foreach ($parseData as &$v) {
$v['sociaty_level'] = $this->level[$v['sociaty_level']];
@ -96,7 +121,7 @@ class SocietyInfoController extends ThinkController
$this->export($head, $parseData, "公会信息-".date('Ymd'));
return ;
} else {
$societyInfos = $model->where($map)->order("communication_time desc")->field("*")->page($page,$row)->select();
$societyInfos = $order_query->page($page,$row)->field("*")->select();
// dump($societyInfos);die();
}

@ -89,6 +89,8 @@
<input type="text" name="text" style="width: 200px" class="" placeholder="快速搜索" value="{:I('text')}"/>&nbsp;
</div>
<input type="hidden" name="sortBy" value="" class="sortBy">
<div class="input-list">
<a class="sch-btn" href="javascript:;" id="search" url="{:U('lists','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
</div>
@ -165,8 +167,28 @@
<th>是否为意向客户</th>
<th>备注信息</th>
<th>对接人</th>
<th>录入时间</th>
<th>最后沟通时间</th>
<th>
<a class="paixu" data-order='create_time'>
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'create_time'">
录入时间▲
<elseif
condition="$userarpu_order eq 3 and $userarpu_order_type eq 'create_time'" />
录入时间▼
<else />录入时间<img src="__IMG__/up-down.png" width="13px">
</if>
</a>
</th>
<th>
<a class="paixu" data-order='communication_time'>
<if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'communication_time'">
最后沟通时间▲
<elseif
condition="$userarpu_order eq 3 and $userarpu_order_type eq 'communication_time'" />
最后沟通时间▼
<else />最后沟通时间<img src="__IMG__/up-down.png" width="13px">
</if>
</a>
</th>
<th style="width:8%;min-width:10px;">操作</th>
</tr>
@ -429,6 +451,23 @@
return false;
});
$(".paixu").click(function () {
var that = $(this);
$data_order = that.attr('data-order');
$order_type = '{$userarpu_order}';
if ($order_type == '' || $order_type == '4') {
$(".sortBy").attr('name', 'data_order');
val = '3,' + $data_order;
$(".sortBy").attr('value', val);
$("#search").click();
} else if ($order_type == '3') {
$(".sortBy").attr('name', 'data_order');
val = '4,' + $data_order;
$(".sortBy").attr('value', val);
$("#search").click();
}
});
$("#excel_back").click(function () {
$(".search_list").show();
$(".excel_list").hide();

Loading…
Cancel
Save