Commit 340cd57c authored by zhuwei's avatar zhuwei

model 6

parent d23a1d8b
......@@ -283,9 +283,9 @@ class Client extends Basic
$total = $user->all_user_count($conditions);
}else{
//跟进
$UPhoneFollowPp = new UPhoneFollowUp($this->siteId);
$user_res = $UPhoneFollowPp->all_user_search($phone_or_name,$pagesize,$pagenum);
$total = $UPhoneFollowPp->all_user_search_count($phone_or_name);
$s_phone_follow_up = new UPhoneFollowUp($this->siteId);
$user_res = $s_phone_follow_up->all_user_search($phone_or_name,$pagesize,$pagenum);
$total = $s_phone_follow_up->all_user_search_count($phone_or_name);
}
if($search_type!='2')
......
......@@ -13,7 +13,7 @@ use app\api_broker\service\PushMessageService;
use app\index\extend\Basic;
use app\model\AAgents;
use app\model\SecretReport;
use app\model\UPhoneFollowPp;
use app\model\UPhoneFollowUp;
use app\model\Users;
use app\model\TAgentTotalCallModel;
......@@ -92,7 +92,7 @@ class CellPhone extends Basic
$list = $report->getCallList($pageNo, $pageSize, 'id desc', $field, $where);
$m_user = new Users();
$m_phone_follow = new UPhoneFollowPp($this->siteId);
$m_phone_follow = new UPhoneFollowUp($this->siteId);
$m_agent = new AAgents();
foreach ($list as $k => $v) {
if (empty($v['agents_id'])) {
......
......@@ -214,22 +214,22 @@ class Remark extends Basic
$pagesize = 15;
$user_id = $params['user_id'];
$UPhoneFollowPp = new UPhoneFollowUp($this->siteId);
$s_phone_follow_up = new UPhoneFollowUp($this->siteId);
// 查询电话跟进数据
$UPhoneFollowPp_res = $UPhoneFollowPp->select_useraction_search($user_id, $searchdate);
$s_phone_follow_up_res = $s_phone_follow_up->select_useraction_search($user_id, $searchdate);
foreach ($UPhoneFollowPp_res as $k => $v) {
foreach ($s_phone_follow_up_res as $k => $v) {
$table = new AAgents();
$Agents_res = $table->Agents_res($v['agent_id']);
$UPhoneFollowPp_res[$k]['agentinfo'] = $Agents_res ? $Agents_res['store_name'] . '-' . $Agents_res['name'] : '未知';
$UPhoneFollowPp_res[$k]['user_pic'] = AGENTHEADERIMGURL . $Agents_res['img'];
$UPhoneFollowPp_res[$k]['label'] = '';
$s_phone_follow_up_res[$k]['agentinfo'] = $Agents_res ? $Agents_res['store_name'] . '-' . $Agents_res['name'] : '未知';
$s_phone_follow_up_res[$k]['user_pic'] = AGENTHEADERIMGURL . $Agents_res['img'];
$s_phone_follow_up_res[$k]['label'] = '';
//电话跟进标签
if ($v['labels_id']) {
$table = new ULabels();
$table_res = $table->get_labelsname($v['labels_id']);
$UPhoneFollowPp_res[$k]['label'] = $table_res[0]['name'];
$s_phone_follow_up_res[$k]['label'] = $table_res[0]['name'];
}
}
......@@ -324,7 +324,7 @@ class Remark extends Basic
return $this->response("200", "success!", [
'user_info' => $user_res,
'user_date' => $UPhoneFollowPp_res,
'user_date' => $s_phone_follow_up_res,
'user_history' => $records_result,
'user_invite_history' => $records_invite_result,
'user_invite_info' => $user_invite_info,
......@@ -343,12 +343,12 @@ class Remark extends Basic
$page_num = isset($params['pagenum']) ? $params['pagenum'] : 1;
$page_size = 15;
$UPhoneFollowPp = new UPhoneFollowUp($this->siteId);
$s_phone_follow_up = new UPhoneFollowUp($this->siteId);
// 查询电话跟进数据
$UPhoneFollowPp_res = $UPhoneFollowPp->phone_up_list($page_size, $page_num);
$total = $UPhoneFollowPp->phone_up_list_count();
$s_phone_follow_up_res = $s_phone_follow_up->phone_up_list($page_size, $page_num);
$total = $s_phone_follow_up->phone_up_list_count();
$total = intval($total / $page_size) + (($total % $page_size == 0) ? 0 : 1);
return $this->response("200", "success!", [ 'user_date' => $UPhoneFollowPp_res, 'pagenum' => $pagenum, 'total' => $total ]);
return $this->response("200", "success!", [ 'user_date' => $s_phone_follow_up_res, 'pagenum' => $pagenum, 'total' => $total ]);
}
......
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