You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
simple-yewu/frontend/views/phone-center/call-records.php

181 lines
7.9 KiB

<?php
use \common\libs\MyLib;
?>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script><script >
$(document).bind("ajaxSend",function(elm,xhr,s) {
var csrf_param = $('meta[name=csrf-param]').prop('content');
var csrf_token = $('meta[name=csrf-token]').prop('content');
if(s.type == "POST") {
xhr.setRequestHeader('X-CSRF-Param',csrf_param);
xhr.setRequestHeader('X-CSRF-Token',csrf_token);
}
});
</script>
<script type="text/javascript" language="javascript" src="/js/ajax.js"></script>
<script type="text/javascript" language="javascript" src="/js/jquery-1.8.3.js"></script><script >
$(document).bind("ajaxSend",function(elm,xhr,s) {
var csrf_param = $('meta[name=csrf-param]').prop('content');
var csrf_token = $('meta[name=csrf-token]').prop('content');
if(s.type == "POST") {
xhr.setRequestHeader('X-CSRF-Param',csrf_param);
xhr.setRequestHeader('X-CSRF-Token',csrf_token);
}
});
</script>
<link rel="stylesheet" href="../Myfile/css/font.css?v=20190611">
<link rel="stylesheet" href="../Myfile/css/xadmin.css?v=20190605">
<link rel="stylesheet" href="../Myfile/css/theme274.min.css?v=20190605">
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="../Myfile/lib/layui/layui.js?v=20190611" charset="utf-8"></script>
<script type="text/javascript" src="../Myfile/js/xadmin.js?v=20190612"></script><script type="text/javascript" language="javascript" src="/js/func.js"></script>
<script type="text/javascript" language="javascript" src="/js/datepicker/WdatePicker.js"></script>
<link rel="stylesheet" type="text/css" href="/copy/css/jquery.dialog.css" />
<script type="text/javascript" src="/copy/js/core.js"></script>
<script type="text/javascript" src="/copy/js/jquery.dialog.js"></script>
<script type="text/javascript" language="javascript">
//修改
function edit(id) {
window.location.href = '/fix-project/edit?id=' + id;
}
function del(id) {
if(confirm('是否确认删除?')) {
$.post('/fix-project/delete',{id:id},function(obj){
if(obj.success) {
window.location.reload();
} else {
alert(obj.msg);
}
},'json');
}
}
$(function(){
$('#add-btn').click(function(){
edit(0);
});
$("#search-btn").click(function(){
var params = $('#searchForm').serialize();
window.location.href = "/phone-center/call-records?" + params;
});
$('.exitDialog').Dialog({
title:'预约',
autoOpen: false,
width:400,
height:250
});
$('.exit').click(function(){
$('.exitDialog').Dialog('open');
var url = $(this).attr('record_url');
$("#play_url").attr('src',url);
});
$('.exitDialog input[type=button]').click(function(e) {
if($(this).hasClass('normal')){
}
});
});
</script>
<table style="width:98%;" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<form id="searchForm">
<tr>
<td class="td_bg">
通话时间:从<input name="begin_time" type="text" value="<?=$begin_time?>" style="width:150px;" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd HH:mm:ss'})"><input name="end_time" type="text" value="<?=$end_time?>" style="width:150px;" onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd HH:mm:ss'})">截止
主叫电话:<input name="caller" type="text" value="<?=$caller?>" style="width: 100px;">
被叫电话:<input name="called" type="text" value="<?=$called?>" style="width: 100px;">
通话状态:
<select name="call_result">
<option value="">请选择</option>
<option value="ANSWERED" <?= $call_result == 'ANSWERED'? 'selected':''?> >通话成功</option>
<option value="BUSY">被叫忙</option>
<option value="NO_ANSWER">被叫无应答</option>
<option value="REJECT">被叫拒接</option>
<option value="HANGUP">主叫提前挂机</option>
<option value="INVALID_NUMBER">空号</option>
<option value="POWER_OFF">关机</option>
<option value="UNAVAILABLE">暂时无法接听</option>
<option value="SUSPEND">停机</option>
<option value="TP_NO_BINDING">无绑定关系</option>
<option value="TP_TIMEOUT">号码查询接口超时</option>
<option value="BLACK">黑名单号码</option>
<option value="TP_ERROR">号码查询接口解析错误</option>
<option value="CALLED_BLACK">被叫不支持</option>
<option value="CALL_FORWARD">呼叫转移</option>
<option value="OTHER">其他失败情形</option>
</select>
通话时长:从<input name="duration_begin" type="text" value="<?=$duration_begin?>" style="width:100px;" ><input name="duration_end" type="text" value="<?=$duration_end?>" style="width:100px;" >截止
(秒为单位)
<input type="button" class="act_btn" id="search-btn" name="search-btn" value="搜索">
</td>
</tr>
</form>
</table>
<table width="98%" align="center" cellpadding="3" cellspacing="1" class="table">
<tr>
<td width="" align="center" class="bg_tr">序号</td>
<td width="" align="center" class="bg_tr">坐席人员</td>
<td width="" align="center" class="bg_tr">通话时间</td>
<td width="" align="center" class="bg_tr">主叫真实号码</td>
<td width="" align="center" class="bg_tr">被叫真实号码</td>
<td width="" align="center" class="bg_tr">主叫分配号码</td>
<td width="" align="center" class="bg_tr">被叫分配号码</td>
<td width="" align="center" class="bg_tr">通话时长</td>
<td width="" align="center" class="bg_tr">通话状态</td>
<td width="" align="center" class="bg_tr">语音</td>
</tr>
<form id="theFrm">
<?php
foreach($record_items as $item) {
?>
<tr onMouseOver=overColor(this) onMouseOut=outColor(this)>
<td align="center" class="td_bg" nowrap><?= $item->id ?></td>
<td align="center" class="td_bg" nowrap><?= $item->user?$item->user->showName:'' ?></td>
<td align="center" class="td_bg" nowrap><?= $item->begin_time ?></td>
<td align="center" class="td_bg" nowrap><?= $item->caller ?></td>
<td align="center" class="td_bg" nowrap><?= $item->called ?></td>
<td align="center" class="td_bg" nowrap><?= $item->caller_show ?></td>
<td align="center" class="td_bg" nowrap><?= $item->called_show ?></td>
<td align="center" class="td_bg" nowrap><?= MyLib::HMSByTime($item->call_duration)?></td>
<td align="center" class="td_bg" nowrap><?= MyLib::phoneCenterStatus($item->call_result) ?></td>
<td align="center" class="td_bg" nowrap>
<?php if($item->record_file_url):?>
<a class="exit" record_url="<?=$item->record_file_url?>" href="javascript:void()">播放</a>
<?php endif;?>
</td>
</tr>
<?php } ?>
</form>
</table>
<div class="exitDialog">
<table style="width:98%; margin-top: 10px; ">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>
<audio id="play_url" src="" controls="controls"></audio>
</td>
</tr>
</table>
</div>