Commit 88be2bd5 authored by zhuwei's avatar zhuwei

phone_up_list

parent 1b9f4fe3
......@@ -207,5 +207,59 @@ class Remark extends Basic
}
/**
* 电话跟进列表
*/
public function phone_up_list()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
// if (!isset($params['user_id'])) {
// return $this->response("300", "参数不全", [ 'remote_groupid' => '' ]);
// }
$searchdate = $params['searchdate'];
$pagenum = isset($params['pagenum']) ? $params['pagenum'] : 1;
$pagesize = 15;
$user_id = $params['user_id'];
$UPhoneFollowPp = new UPhoneFollowPp();
// 查询电话跟进数据
$UPhoneFollowPp_res=$UPhoneFollowPp->phone_up_list($pagesize,$pagenum);
//dump($UPhoneFollowPp_res);
/*dump($total);
var_dump($user_res);
exit;*/
//dump($UPhoneFollowPp_res);
/*foreach($UPhoneFollowPp_res as $k=>$v){
$table= new Agents();
$Agents_res =$table->Agents_res($v['agent_id']);
//dump($Agents_res);
$UPhoneFollowPp_res[$k]['agentinfo']=$Agents_res?$Agents_res['agentshopname'].'-'.$Agents_res['realname']:'未知';
$UPhoneFollowPp_res[$k]['user_pic']=ADMIN_URL_TL.'user_header/'.$Agents_res['head_portrait'];
$UPhoneFollowPp_res[$k]['label']='';
//dump($v['labels_id']);
//电话跟进标签
if($v['labels_id']){
$table= new ULabels();
$table_res =$table->get_labelsname($v['labels_id']);
//dump($table_res);
//exit;
$UPhoneFollowPp_res[$k]['label']=$table_res[0]['name'];
}
}*/
$UPhoneFollowPp = new UPhoneFollowPp();
$total =$UPhoneFollowPp->phone_up_list_count();
//dump($total);
$total = intval($total / $pagesize) + (($total % $pagesize == 0) ? 0 : 1);
//dump($total);
return $this->response("200", "success!", ['user_date'=>$UPhoneFollowPp_res,'pagenum'=>$pagenum,'total'=>$total]);
}
}
\ No newline at end of file
......@@ -105,4 +105,22 @@ class UPhoneFollowPp extends BaseModel
return $UPhoneFollowPp_res;
}
public function phone_up_list($pagesize,$pagenum)
{
$UPhoneFollowPp_res = db('u_phone_follow_up')
->order('create_time', 'desc')
->limit($pagesize)
->page($pagenum)
->select();
return $UPhoneFollowPp_res;
}
public function phone_up_list_count()
{
$UPhoneFollowPp_res = db('u_phone_follow_up')
->count();
return $UPhoneFollowPp_res;
}
}
......@@ -163,6 +163,8 @@ Route::group('index', [
'select_by_phone' => ['index/remark/select_by_phone', [ 'method' => 'get|post' ] ], //后台客户详情--客方搜索
'setting_index' => ['index/Setting/index', [ 'method' => 'get' ] ], //全局参数设置页面
'getSetting' => ['index/Setting/getSetting', [ 'method' => 'get|post' ] ], //新增和修改全局参数设置
'phone_up_list' => ['index/remark/phone_up_list', [ 'method' => 'get|post' ] ], //电话跟进列表
]);
......
/**
* Created by 刘丹 on 2018/3/1.
*/
define (['doT', 'text!temp/agentIndex_template_tpl.html', 'css!style/home.css','ckfinder','ckfinderStart','pagination','bootstrapJs'], function (doT, template) {
agentIndex = {
pageNo: 1, /*第几页*/
pageSize: 10, /*每页显示多少条*/
id : '',
house_id:'',
type:'',
valueCurrent:'',
ajaxObj:'',
stopstatus:true,
boxphoto:'',
init: function () {
//初始化dot
$ ("body").append (template);
agentIndex.getList ();
agentIndex.event ();
},
event: function () {
$("#search").click(function () {
agentIndex.getList(1);
});
$("#reset").click(function () {//重置
document.getElementById("form_search").reset();
});
},
getList: function (pageNo) {
agentIndex.pageNo = pageNo;
var params = {};
params.pageNo = agentIndex.pageNo;
params.pageSize = agentIndex.pageSize;
params.agents_name = $('#industry_type') .val();//经纪人姓名
params.phone = $('#dish') .val();//经纪人手机号
params.start_date = $('#start_date') .val();//时间1
params.end_date = $('#end_date') .val();//时间2
$.ajax ({
url: '/index/callCollectList',//获取列表
type: 'GET',
async: true,
data: params,
dataType: 'json',
success: function (data) {
var temp = document.getElementById ('agentIndex_list_tpl').innerHTML;
var doTtmpl = doT.template (temp);
$ ("#agentIndex_list").html (doTtmpl (data.data.list));
/*分页代码*/
$ ("#pagediv").pagination ({
length: data.data.total,
current: pageNo,
every: agentIndex.pageSize,
onClick: function (el) {
agentIndex.getList (el.num.current);
}
});
}
});
}
};
return agentIndex;
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment