TG.WXCRM.V4/WEB/Views/Ww/MyWork/QWRecord.cshtml

262 lines
11 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@using WX.CRM.WebHelper;
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_content.cshtml";
}
<script src="/Scripts/jquery.easyui.min.js" type="text/javascript"></script>
<link href="/Content/themes/blue/easyui.css" rel="stylesheet" />
<link href="/Content/Site.css" rel="stylesheet" />
<script src="/Scripts/common.js"></script>
<link href="/Content/data_grid_list.css" rel="stylesheet" />
<script src="/Scripts/op/jquery.rewrite.js"></script>
<style>
.layui-table-cell {
height: auto;
}
.layui-table-body {
height: 600px !important;
}
</style>
<div class="layui-fluid" style="padding-left:0px;padding-top:10px;">
<div class="layui-card" id="topcard" style="width:100%;padding-top:10px;">
<div class="layui-card-header layui-self-header">
<div style="float:left;position:relative;">
企微通话查询
</div>
<div style="float:right;position:relative;">
@Html.Action("ToolBarNew", "Control", new
{
tool = ViewBag.ToolBar as ToolBar,
otherToolBars = new ToolBarNew[] { }
})
</div>
<div class="hrclass" style="position:relative;float: left;"></div>
</div>
<div class="layui-card-body " id="contentBody">
<form class="layui-form selftopwhere" id="myform">
<div class="layui-form-item">
企业:
<div class="layui-inline">
@*@Html.DropDownList("corpid", ViewBag.Select as List<SelectListItem>, new Dictionary<string, object> {
{ "lay-filter", "corp_deptid" },
})*@
@Html.DropDownList("corpid", ViewBag.Select as List<SelectListItem>)
</div>
部门:
<div class="layui-inline">
<select name="deptid">
<option value="">全部</option>
@{ List<WX.CRM.Model.Entity.BAS_BUSINESSLINES> list = ViewBag.BusinessLines;
foreach (var item in list)
{
<option value="@item.BUSINESSID">@item.BUSINESSNAME</option>
}
}
</select>
</div>
客服:
<div class="layui-inline">
<input type="text" name="internal_user" placeholder="ID/名称" autocomplete="off" class="layui-input">
</div>
客服工号:
<div class="layui-inline">
<input type="text" name="eid"autocomplete="off" class="layui-input">
</div>
客户:
<div class="layui-inline">
<input type="text" name="external_user" placeholder="ID/名称" autocomplete="off" class="layui-input">
</div>
通话时间:
<div class="layui-inline">
<input class="layui-input" placeholder="开始日" name="msgtime_from" id="msgtime_from" style="width:120px;">
</div>
<div class="layui-inline">
<input class="layui-input" placeholder="截止日" name="msgtime_to" id="msgtime_to" style="width:120px;">
</div>
<div class="layui-inline">
<input class="layui-btn layui-btn-sm layui-btn-ok" data-method="search" type="button" value="查询" /><input class="layui-btn layui-btn-sm layui-btn-reset" type="reset" value="清空" />
</div>
<input type="hidden" name="deptids" value="@ViewBag.DeptIds" />
</div>
</form>
<table class="layui-hide" id="tab_kefuzhuangtaiyi1" lay-filter="wochao"></table>
<iframe id="BillOpen" width="0" height="0" scrolling="no" frameborder="0" style="display:none;"></iframe>
</div>
</div>
</div>
<!--确定宽度-->
<script>
var httpurl = "@Html.Raw(ViewBag.HHMessageFile)";
var innerhttp = "@Html.Raw(ViewBag.InnerFile)";//内网获取json必须使用内网地址
var nowlocation = window.location.href;
if (nowlocation.indexOf("192.168.1.") > -1 || nowlocation.indexOf("192.168.11.") > -1 || nowlocation.indexOf("localhost") > -1) {//内网无疑
httpurl = innerhttp;
}
var selectRow = {};
var winindex;
var layer;
var rowid;
layui.use(['laypage', 'layer', 'table', 'laydate', 'form'], function () {
var form = layui.form;
var laydate = layui.laydate;
layer = layui.layer;
table = layui.table;
var nowDate = new Date(); //当前日期;
laydate.render({ elem: '#msgtime_from', value: '@DateTime.Now.ToString("yyyy-MM-dd")' });
laydate.render({ elem: '#msgtime_to', value: '@DateTime.Now.ToString("yyyy-MM-dd")' });
var param = $("#myform").serializeFormJSON();
param.msgtime_from = '@DateTime.Now.ToString("yyyy-MM-dd")';
param.msgtime_to = '@DateTime.Now.ToString("yyyy-MM-dd")';
table.render({
id: 'listReload'//列表别名ID
, elem: '#tab_kefuzhuangtaiyi1'
, url: 'GetQWRecordHtmlList'
, method: 'POST'
, cellMinWidth: 80 //全局定义常规单元格的最小宽度layui 2.2.1 新增
, page: true
, limit: 10
, height: "full-160"
//, size:"sm"
, cols: [[
{ field: 'numbers', type: 'numbers' }
, { field: 'corpname', title: '企业号'}
, { field: 'internal_dept_name', title: '部门'}
, { field: 'internal_appuserid', title: '客服ID'}
, { field: 'internal_nickname', title: '客服'}
, { field: 'internal_eid', title: '客服工号'}
, { field: 'internal_employee_name', title: '姓名'}
, { field: 'remark', title: '客服备注姓名'}
, { field: 'external_appuserid', title: '客户ID'}
, { field: 'external_nickname', title: '客户'}
, {
field: 'send_type', title: '类型', templet: function (d)
{
if (d.send_type == 1) {
return "<font color='red'>呼入</font>";
} else {
return "<font color='green'>呼出</font>";
}
}
}
, { field: 'callduration', title: '时长/秒'}
, { field: 'start_time', title: '开始时间'}
, { field: 'end_time', title: '结束时间'}
, {
field: 'filename', title: '播放', templet: function (da) {
return `<a href="javascript:PalyRecord('${httpurl}playamr?corpid=${da.corpid}&fname=${da.file_name}')" )">播放</a>`;
}
}
]], where: param
});
//监听行单击事件单击事件为rowDouble
table.on('row(wochao)', function (obj) {
var data = obj.data;
//console.log(data);
//标注选中样式
obj.tr.addClass('self-table-click').siblings().removeClass('self-table-click');
selectRow = data;
});
var active = {
search: function () {
var param = $("#myform").serializeFormJSON();
table.reload('listReload', {
where: param,
page: {
curr: 1
}
});
},
export: function () {
var param = $("#myform").serializeFormJSON();
var queryString = "";
for (var key in param) {
if (queryString != "") queryString += "&";
queryString += key + "=" + encodeURIComponent(param[key]);
}
$("#BillOpen").attr("src", "/MyWork/QWRecordExport?" + queryString);
//$("#modalwindow").html(GetIframeHtml("/Control/ExcelExport?Query=" + encodeURIComponent("/WeiXin/OutComplaint/Export?" + queryString)));
//$("#modalwindow").window({ title: '导出', width: 480, height: 300, iconCls: 'icon-export' }).window('open');
}
};
$('.layui-btn').on('click', function () {
var othis = $(this), method = othis.data('method');
console.log(method);
active[method] ? active[method].call(this, othis) : '';
});
});
function Closed() {
layer.close(winindex);
}
function TableReload() {
table.reload('listReload', {
});
}
function PalyRecord(url) {
url = url + "&nguid=" + GetGuid();
var html = "";
var browser = myBrowser();
if (browser == "IE" || browser == "Firefox") {
html = '<object id="Player" width="300" height="50" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject"hspace="5"><param name="AutoRewind" value="1"><param name="FileName" value="' + url + '"><param name="ShowControls" value="1"><param name="ShowPositionControls" value="0"><param name="ShowAudioControls" value="1"><param name="ShowTracker" value="1"><param name="ShowDisplay" value="0"><param name="ShowStatusBar" value="0"><param name="ShowGotoBar" value="0"><param name="ShowCaptioning" value="0"><param name="AutoStart" value="1"><param name="Volume" value="5000"><param name="AnimationAtStart" value="0"><param name="TransparentAtStart" value="0"><param name="AllowChangeDisplaySize" value="0"><param name="AllowScan" value="0"><param name="EnableContextMenu" value="0"><param name="ClickToPlay" value="1"> </object>'
} else {
html = '<video src=' + url + ' controls="controls" autoplay />';
}
layui.use('layer', function () {
var layer = layui.layer;
layer.open({
title: '播放通话',
type: 1,
content: html,
area: ['300px', '200px']
});
});
}
function myBrowser() {
var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
var isOpera = userAgent.indexOf("Opera") > -1;
if (isOpera) { //判断是否Opera浏览器
return "Opera"
}
if (userAgent.indexOf("Firefox") > -1) { //判断是否Firefox浏览器
return "Firefox";
}
if (userAgent.indexOf("Chrome") > -1) {
return "Chrome";
}
if (userAgent.indexOf("Safari") > -1) { //判断是否Safari浏览器
return "Safari";
}
if (userAgent.indexOf("compatible") > -1 && userAgent.indexOf("MSIE") > -1 && !isOpera) { //判断是否IE浏览器
return "IE";
}
if (userAgent.indexOf('Trident') > -1) {//IE11
return "IE";
}
if (userAgent.indexOf("Edge") > -1) {//Edge
return "IE";
}
}
</script>