248 lines
9.3 KiB
Plaintext
248 lines
9.3 KiB
Plaintext
@using CRM.Core.Model.Entity
|
||
@using Core.Web.WebHelper
|
||
@{
|
||
/**/
|
||
|
||
ViewBag.Title = "Index";
|
||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||
}
|
||
<style>
|
||
.self-table-click td {
|
||
background-color: #f3ebbc;
|
||
}
|
||
|
||
.playClass {
|
||
width: 18px;
|
||
margin: 0;
|
||
display: initial;
|
||
cursor: pointer;
|
||
}
|
||
|
||
#ExportData {
|
||
display: inline-block;
|
||
vertical-align: middle;
|
||
height: 38px;
|
||
line-height: 38px;
|
||
border: 1px solid transparent;
|
||
padding: 0 18px;
|
||
background-color: #009688;
|
||
color: #fff;
|
||
white-space: nowrap;
|
||
text-align: center;
|
||
font-size: 14px;
|
||
border-radius: 2px;
|
||
cursor: pointer;
|
||
}
|
||
</style>
|
||
<div class="x-body">
|
||
<div class="layui-btn-group" style="padding-bottom:10px;">
|
||
@Html.Action("ToolBar", "Home",
|
||
new
|
||
{
|
||
area = "",
|
||
rightcode = (ViewBag.rightCode as string)
|
||
}
|
||
)
|
||
</div>
|
||
<div id="mytoolbar">
|
||
<div class="layui-inline">
|
||
<input type="text" name="txt_type" placeholder="请输入" autocomplete="off" class="layui-input" value="@ViewBag.type" style="display:none">
|
||
</div>
|
||
<div class="layui-inline">
|
||
<input type="text" name="txt_robotId" placeholder="请输入" autocomplete="off" class="layui-input" value="@ViewBag.robotId" style="display:none">
|
||
</div>
|
||
AI话术:
|
||
<div class="layui-inline">
|
||
<select name="txt_robot" style="height:35px;">
|
||
<option value="-3">全部</option>
|
||
@foreach (var item in ViewBag.robotList as List<SelectListItem>)
|
||
{
|
||
<option value="@item.Value">@item.Text</option>
|
||
}
|
||
</select>
|
||
</div>
|
||
任务描述:
|
||
<div class="layui-inline">
|
||
<input type="text" name="txt_robotRemark" placeholder="请输入" autocomplete="off" class="layui-input">
|
||
</div>
|
||
事业部:
|
||
<div class="layui-inline">
|
||
<select name="txt_channel" style="height:35px;">
|
||
<option value="">请选择</option>
|
||
@foreach (var item in ViewBag.companyList as List<Bas_CompanyVirtual>)
|
||
{
|
||
<option value="@item.Channel">@item.CompanyName</option>
|
||
}
|
||
</select>
|
||
</div>
|
||
客户Id:
|
||
<div class="layui-inline">
|
||
<input type="text" name="txt_UMID" placeholder="请输入" autocomplete="off" class="layui-input">
|
||
</div>
|
||
@*<div class="layui-inline">
|
||
<input type="text" name="txt_resId" placeholder="请输入" autocomplete="off" class="layui-input">
|
||
</div>*@
|
||
订单号:
|
||
<div class="layui-inline">
|
||
<input type="text" name="txt_orderId" placeholder="请输入" autocomplete="off" class="layui-input">
|
||
</div>
|
||
客户姓名:
|
||
<div class="layui-inline">
|
||
<input type="text" name="txt_cname" placeholder="请输入" autocomplete="off" class="layui-input">
|
||
</div>
|
||
AI外呼状态:
|
||
<div class="layui-inline">
|
||
<select name="txt_aistatus" style="height:35px;">
|
||
<option value="-3">全部</option>
|
||
@foreach (var item in ViewBag.aiCallType as List<SelectListItem>)
|
||
{
|
||
<option value="@item.Value">@item.Text</option>
|
||
}
|
||
</select>
|
||
</div>
|
||
是否重拨:
|
||
<div class="layui-inline">
|
||
<select name="txt_hasCall" style="height:35px">
|
||
<option value="-3">全部</option>
|
||
<option value="1">是</option>
|
||
<option value="0">否</option>
|
||
</select>
|
||
</div>
|
||
AI外呼日期:
|
||
<div class="layui-inline">
|
||
<input class="layui-input" placeholder="开始日" name="txt_xstime" id="xstime" autocomplete="off">
|
||
</div>
|
||
<div class="layui-inline">
|
||
<input class="layui-input" placeholder="截止日" name="txt_xetime" id="xetime" autocomplete="off">
|
||
</div>
|
||
<button class="layui-btn" data-type="reload">查询</button>
|
||
<button id="ExportData">导出</button>
|
||
</div>
|
||
<table class="layui-hide" id="tabl1" lay-filter="tabl1"></table>
|
||
<iframe id="BillOpen" width="0" height="0" scrolling="no" frameborder="0" style="display:none;"></iframe>
|
||
</div>
|
||
<script>
|
||
var selectRow = {};
|
||
|
||
layui.use('laydate', function () {
|
||
var laydate = layui.laydate;
|
||
laydate.render({ elem: '#xstime' });
|
||
laydate.render({ elem: '#xetime' });
|
||
});
|
||
layui.use(['table', 'form'], function () {
|
||
var table = layui.table;
|
||
var form = layui.form;
|
||
|
||
var param2 = GetParams("mytoolbar");
|
||
table.render({
|
||
id: 'testReload',//列表别名ID
|
||
elem: '#tabl1',//表ID
|
||
url: '/AiRecord/Index',
|
||
method: 'POST',
|
||
even: true, //开启隔行背景
|
||
cols: [[
|
||
{ field: 'RobotName', title: 'AI话术', width: 120 }
|
||
, { field: 'Remark', title: '任务描述', width: 120 }
|
||
, { field: 'CallNo', title: '用户号码', width: 120 }
|
||
, { field: 'CHANNELNAME', title: '事业部', width: 140 }
|
||
, { field: 'UMID', title: '客户Id', width: 120 }
|
||
, { field: 'CNAME', title: '客户姓名', width: 80 }
|
||
, { field: 'ORDERID', title: '订单号', width: 120 }
|
||
, { field: 'AiStatusName', title: 'AI外呼状态', width: 120 }
|
||
, { field: 'Id', title: '录音编号', width: 120 }
|
||
, { field: 'SvcTime', title: '外呼时长', width: 130, templet: '#SvcTimeTpl' }
|
||
, { field: 'HasCallName', title: '是否重拨', width: 100 }
|
||
, { field: 'Rounds', title: '对话轮次', width: 100 }
|
||
, { field: 'StartTime', title: '外呼时间', width: 170 }
|
||
, { field: 'EndTime', title: '挂机时间', width: 170 }
|
||
, { field: 'call', title: '试听', templet: '#callTpl', fixed: 'right' }
|
||
, { field: 'view', title: '操作', templet: '#viewRecordTpl', fixed: 'right' }
|
||
|
||
]]
|
||
, page: { //支持传入 laypage 组件的所有参数(某些参数除外,如:jump/elem) - 详见文档
|
||
layout: ['limit', 'count', 'prev', 'page', 'next', 'skip', 'refresh'] //自定义分页布局
|
||
//,curr: 5 //设定初始在第 5 页
|
||
, groups: 5 //只显示 1 个连续页码
|
||
|
||
}
|
||
, where: param2
|
||
});
|
||
//监听行单击事件
|
||
table.on('row(tabl1)', function (obj) {
|
||
var data = obj.data;
|
||
//console.log(data);
|
||
//标注选中样式
|
||
obj.tr.addClass('self-table-click').siblings().removeClass('self-table-click');
|
||
|
||
selectRow = data;
|
||
});
|
||
$('#mytoolbar .layui-btn').on('click', function (data) {
|
||
var param = GetParams("mytoolbar");
|
||
table.reload('testReload', {
|
||
page: {
|
||
curr: 1 //重新从第 1 页开始
|
||
},
|
||
where: param
|
||
});
|
||
});
|
||
$('#ExportData').on('click', function (data) {
|
||
var param = GetParams("mytoolbar");
|
||
$("#BillOpen").attr("src", "/AiRecord/ExportData?channel=" + param.channel + "&resId=" + param.resId + "&orderId=" + param.orderId + "&cname=" + param.cname + "&aistatus=" + param.aistatus + "&hasCall=" + param.hasCall + "&xstime=" + param.xstime + "&xetime=" + param.xetime + "&robot=" + param.robot + "&type=-1");
|
||
});
|
||
});
|
||
|
||
function onPlay(fileName) {
|
||
fileName = fileName.replace("http://10.1.11.10:18081", "http://rec.xunfei.tcfortune.com:8282");
|
||
layui.use('layer', function () {
|
||
var layer = layui.layer;
|
||
layer.open({
|
||
title: '播放录音',
|
||
type: 1,
|
||
content: '<audio src=' + fileName + ' controls autoplay ></audio>',
|
||
area: ['300px', '200px']
|
||
});
|
||
});
|
||
}
|
||
function onLook(id) {
|
||
layui.use('layer', function () {
|
||
var layer = layui.layer;
|
||
layer.open({
|
||
title: '录音列表',
|
||
type: 2,
|
||
content: '/AiAudioList/AudioDetail?Id=' + id,
|
||
area: ['80%', '80%']
|
||
});
|
||
});
|
||
}
|
||
</script>
|
||
<script type="text/html" id="callTpl" style="width:100px">
|
||
{{# if(d.Audio!= null){ }}
|
||
<a href="javascript:void(0)" onclick="onPlay('{{d.Audio}}')">
|
||
<img src="/images/play.png" class="playClass" />
|
||
</a>
|
||
{{# } }}
|
||
</script>
|
||
<script type="text/html" id="viewRecordTpl" style="width:100px">
|
||
{{# if(d.Audio!= null){ }}
|
||
<a href="javascript:void(0)" style="color:blue" onclick="onLook('{{d.sid}}')">查看</a>
|
||
{{# } }}
|
||
</script>
|
||
<script type="text/html" id="SvcTimeTpl" style="width:100px">
|
||
{{# if(d.SvcTime!= null){ }}
|
||
{{ d.SvcTime }}秒
|
||
{{# } }}
|
||
</script>
|
||
|
||
<script type="text/html" id="viewOrderTpl" style="width:100px">
|
||
<div>
|
||
{{# if(d.ORDERID!= ""){ }}
|
||
{{# var orderStr = d.ORDERID.split(",") }}
|
||
{{# for (var i = 0; i < orderStr.length; i++) {}}
|
||
<div>
|
||
{{ orderStr[i]}}
|
||
</div>
|
||
{{# } } }}
|
||
</div>
|
||
</script>
|
||
|