Commit 05105079 authored by hujun's avatar hujun

通话记录列表-跟进记录显示修改

parent 443a36c1
......@@ -39,7 +39,7 @@ class CellPhone extends Basic
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$report = new SecretReport();
$field = 'agents_id,users_id,call_type,call_time,time,voice_file,user_status,a.id,a.create_time,type,secret_no';
$field = 'agents_id,users_id,call_type,call_time,time,voice_file,c.user_status,a.id,a.create_time,a.type,secret_no,d.content';
$where = [];
if (!empty($this->params['start_date'])) {
......
......@@ -28,6 +28,7 @@ class SecretReport extends BaseModel
$data = $this->field($field)->alias('a')
->join('a_agents b','a.agents_id=b.id','left')
->join('u_users c','a.users_id=c.id','left')
->join('u_phone_follow_up d','d.user_id=c.id','left')
->where($params)
->order($order_)
->limit($pageSize)
......@@ -53,7 +54,7 @@ class SecretReport extends BaseModel
$user_data = Db::table('u_users')->field('user_name,user_phone')->where('id',$v->users_id)->find();
$user_data['user_name'] = empty($user_data['user_name']) ? '?.?' : $user_data['user_name'];
$result[$k]['user_name'] = $user_data['user_name'] .'-'. hide_customer_phone($user_data['user_phone']);
$result[$k]['follow_up'] = Db::table('u_phone_follow_up')->where('user_id',$v->users_id)->order('id DESC')->value('content');
// $result[$k]['follow_up'] = Db::table('u_phone_follow_up')->where('user_id',$v->users_id)->order('id DESC')->value('content');
} else {
$result[$k]['user_nick'] = "";
$result[$k]['follow_up'] = "";
......@@ -101,6 +102,7 @@ class SecretReport extends BaseModel
return $this->alias('a')
->join('a_agents b','a.agents_id=b.id','left')
->join('u_users c','a.users_id=c.id','left')
->join('u_phone_follow_up d','d.user_id=c.id','left')
->where($params)
->count();
}
......
......@@ -30,8 +30,8 @@
<td>[%= it[item]['time'] %]</td>
<!--<td>[%= it[item]['price'] %] </td>-->
<td>
[% if(it[item]['follow_up'] != null) { %]
[%= it[item]['follow_up'] %]
[% if(it[item]['content'] != null) { %]
[%= it[item]['content'] %]
[% } %]
[% if(it[item]['user_status'] == 0) { %]
......
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