Commit 8dc30fb7 authored by hujun's avatar hujun

通话汇总修改搜索条件

parent 12f5f767
......@@ -112,12 +112,16 @@ class CellPhone extends Basic
$field = 'a.id,b.phone,sum(time) as time,agents_id,call_type,release_time,start_time';
$where = [];
if (!empty($this->params['start_date'])) {
$where['create_time'] = [ '> time', $this->params['start_date'] ];
if (!empty($this->params['start_date']) && empty($this->params['end_date'])) {
$where['a.create_time'] = [ '> time', $this->params['start_date'] ];
}
if (!empty($this->params['end_date'])) {
$where['create_time'] = [ '< time', $this->params['end_date'] ];
if (!empty($this->params['end_date']) && empty($this->params['start_date'])) {
$where['a.create_time'] = [ '< time', $this->params['end_date'] ];
}
if (!empty($this->params['end_date']) && !empty($this->params['start_date'])) {
$where['a.create_time'] = [ 'between', [$this->params['start_date'], $this->params['end_date']]];
}
if (!empty($this->params['agents_name'])) {
......
<script id="agentIndex_list_tpl" type="text/template">
[% if(it) { %]
[% if(it[0]) { %]
[% for(var item in it){ %]
<tr class="text-center">
<td>[%= it[item]['agents_name'] %]</td>
......
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