Commit 978641bf authored by hujun's avatar hujun

拨打电话修改

parent ed190d7e
...@@ -22,24 +22,6 @@ class CellPhone extends Basic ...@@ -22,24 +22,6 @@ class CellPhone extends Basic
protected $data = []; protected $data = [];
protected $msg = ""; protected $msg = "";
/**
* 总记录列表
*
* @return \think\response\View
*/
public function index() {
return view('cell_phone/index');
}
/**
* 经纪人通话列表
*
* @return \think\response\View
*/
public function agentIndex() {
return view('cell_phone/agentIndex');
}
/** /**
* 绑定手机号 * 绑定手机号
* 解绑之后有延迟 * 解绑之后有延迟
...@@ -154,7 +136,7 @@ class CellPhone extends Basic ...@@ -154,7 +136,7 @@ class CellPhone extends Basic
} }
/** /**
* 通话列表、搜索 * 总记录列表、搜索
* *
* @return \think\Response * @return \think\Response
* @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DataNotFoundException
...@@ -162,42 +144,47 @@ class CellPhone extends Basic ...@@ -162,42 +144,47 @@ class CellPhone extends Basic
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
public function callLog() { public function callLog() {
$result['code'] = 200;
$result['msg'] = ''; if ($this->request->isAjax()) {
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo']; $result['code'] = 200;
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize']; $result['msg'] = '';
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$report = new SecretReport(); $pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$field = 'agents_id,users_id,call_type,call_time,time,voice_file';
$where = []; $report = new SecretReport();
$field = 'agents_id,users_id,call_type,call_time,time,voice_file';
if (!empty($this->params['start_date'])) { $where = [];
$where['create_time'] = ['> time', $this->params['start_date']];
} if (!empty($this->params['start_date'])) {
$where['create_time'] = ['> time', $this->params['start_date']];
}
if (!empty($this->params['end_date'])) { if (!empty($this->params['end_date'])) {
$where['create_time'] = ['< time', $this->params['end_date']]; $where['create_time'] = ['< time', $this->params['end_date']];
} }
if (!empty($this->params['call_name'])) { if (!empty($this->params['call_name'])) {
$where['realName'] = ['LIKE', $this->params['call_name'].'%']; $where['realName'] = ['LIKE', $this->params['call_name'] . '%'];
} }
if (!empty($this->params['call_phone'])) { if (!empty($this->params['call_phone'])) {
$where['phone_no'] = ['LIKE',$this->params['call_phone'].'%']; $where['phone_no'] = ['LIKE', $this->params['call_phone'] . '%'];
} }
if (!empty($this->params['client_phone'])) { if (!empty($this->params['client_phone'])) {
$where['peer_no'] = ['LIKE',$this->params['client_phone'].'%']; $where['peer_no'] = ['LIKE', $this->params['client_phone'] . '%'];
} }
if (!empty($this->params['client_name'])) { if (!empty($this->params['client_name'])) {
$where['user_nick'] = ['LIKE', $this->params['client_name'].'%']; $where['user_nick'] = ['LIKE', $this->params['client_name'] . '%'];
} }
$data['list'] = $report->getCallList($pageNo, $pageSize, 'id desc', $field, $where); $data['list'] = $report->getCallList($pageNo, $pageSize, 'id desc', $field, $where);
$data['total'] = $report->getCallListTotal($where); $data['total'] = $report->getCallListTotal($where);
return $this->response($result['code'], $result['msg'], $data); return $this->response($result['code'], $result['msg'], $data);
} else {
return view('cell_phone/index');
}
} }
/** /**
...@@ -209,33 +196,38 @@ class CellPhone extends Basic ...@@ -209,33 +196,38 @@ class CellPhone extends Basic
* @throws \think\exception\DbException * @throws \think\exception\DbException
*/ */
public function callCollectList() { public function callCollectList() {
$result['code'] = 200;
$result['msg'] = ''; if ($this->request->isAjax()) {
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo']; $result['code'] = 200;
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize']; $result['msg'] = '';
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$report = new SecretReport(); $pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$field = 'a.id,b.phone,sum(time) as time,agents_id,call_type,release_time,start_time';
$where = []; $report = new SecretReport();
$field = 'a.id,b.phone,sum(time) as time,agents_id,call_type,release_time,start_time';
if (!empty($this->params['start_date'])) { $where = [];
$where['create_time'] = ['> time', $this->params['start_date']];
} if (!empty($this->params['start_date'])) {
$where['create_time'] = ['> time', $this->params['start_date']];
}
if (!empty($this->params['end_date'])) { if (!empty($this->params['end_date'])) {
$where['create_time'] = ['< time', $this->params['end_date']]; $where['create_time'] = ['< time', $this->params['end_date']];
} }
if (!empty($this->params['agents_name'])) { if (!empty($this->params['agents_name'])) {
$where['realName'] = ['LIKE', $this->params['agents_name'].'%']; $where['realName'] = ['LIKE', $this->params['agents_name'] . '%'];
} }
if (!empty($this->params['phone'])) { if (!empty($this->params['phone'])) {
$where['phone'] = ['LIKE',$this->params['phone'].'%']; $where['phone'] = ['LIKE', $this->params['phone'] . '%'];
} }
$data['list'] = $report->getCallCollect($pageNo, $pageSize, 'id desc', $field, $where); $data['list'] = $report->getCallCollect($pageNo, $pageSize, 'id desc', $field, $where);
$data['total'] = $report->getCallCollectTotal($where); $data['total'] = $report->getCallCollectTotal($where);
return $this->response($result['code'], $result['msg'], $data); return $this->response($result['code'], $result['msg'], $data);
} else {
return view('cell_phone/agentIndex');
}
} }
} }
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="col-lg-10 col-lg-offset-0"> <div class="col-lg-10 col-lg-offset-0">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading breadcrumb"> <div class="panel-heading breadcrumb">
<li><a href="#">通话记录</a></li> <li><a href="#">通话统计</a></li>
</div> </div>
<div class="panel-body"> <div class="panel-body">
...@@ -37,28 +37,7 @@ ...@@ -37,28 +37,7 @@
<th class="text-center">花费</th> <th class="text-center">花费</th>
</tr> </tr>
</thead> </thead>
<tbody class="text-center" id="agentIndex_list"> <tbody class="text-center" id="agentIndex_list"></tbody>
<!--<tr>-->
<!--<td>212</td>-->
<!--<td>商场</td>-->
<!--<td>长兴</td>-->
<!--<td>1000</td>-->
<!--<td>是</td>-->
<!--<td>2018-01-16 17:02:00</td>-->
<!--<td>已租</td>-->
<!--<td>张娜张-->
<!--<a data-toggle="modal" data-id="77" href="#modal-watch" class="btn1 btn-danger add_applies">修改</a>-->
<!--</td>-->
<!--<td>-->
<!--<a class="btn1 btn-success " href="#modal-process" data-toggle="modal" data-id="77" onclick="alertFollow(this)">编辑</a>-->
<!--<a class="btn1 btn-success " href="#modal-process" data-toggle="modal" data-id="77" onclick="alertFollow(this)">推荐至首页</a>-->
<!--<a class="btn1 btn-success " href="#modal-process" data-toggle="modal" data-id="77" onclick="alertFollow(this)">设置案场权限人</a>-->
<!--<a class="btn1 btn-success " href="#modal-process" data-toggle="modal" data-id="77" onclick="alertFollow(this)">是否独家</a>-->
<!--<a class="btn1 btn-success " href="#modal-process" data-toggle="modal" data-id="77" onclick="alertFollow(this)">操作记录</a>-->
<!--<a data-toggle="modal" data-id="77" href="#modal-watch" class="btn1 btn-danger add_applies" onclick="delete_house(4720)">删除</a>-->
<!--</td>-->
<!--</tr>-->
</table> </table>
</div> </div>
<!-- /#page-content-wrapper --> <!-- /#page-content-wrapper -->
......
...@@ -179,8 +179,6 @@ Route::group('index', [ ...@@ -179,8 +179,6 @@ Route::group('index', [
'bindAXB' => [ 'index/CellPhone/bindAXB', [ 'method' => 'post' ] ],//隐私号码 'bindAXB' => [ 'index/CellPhone/bindAXB', [ 'method' => 'post' ] ],//隐私号码
'agentsUnBind' => [ 'index/CellPhone/agentsUnBind', [ 'method' => 'post' ] ],//解除绑定关系 'agentsUnBind' => [ 'index/CellPhone/agentsUnBind', [ 'method' => 'post' ] ],//解除绑定关系
'updateBindAXB' => ['api_broker/CellPhone/updateBindAXB', [ 'method' => 'post' ] ], //更新绑定关系隐私号码 'updateBindAXB' => ['api_broker/CellPhone/updateBindAXB', [ 'method' => 'post' ] ], //更新绑定关系隐私号码
'CellPhoneIndex' => ['index/CellPhone/index', [ 'method' => 'get' ] ], //总记录列表
'CellPhoneAgentIndex' => ['index/CellPhone/agentIndex', [ 'method' => 'get' ] ], //经纪人通话列表
'phoneList' => ['index/Phone/phoneList', [ 'method' => 'get' ] ], //号码池 'phoneList' => ['index/Phone/phoneList', [ 'method' => 'get' ] ], //号码池
'bindPhoneListIndex' => ['index/Phone/bindPhoneListIndex', [ 'method' => 'get' ] ], //号码绑定列表 'bindPhoneListIndex' => ['index/Phone/bindPhoneListIndex', [ 'method' => 'get' ] ], //号码绑定列表
......
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