TG.WXCRM.V4/WEB/Views/Csvr/RecordShared/Index.cshtml

133 lines
7.2 KiB
Plaintext
Raw Permalink 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 = "RecordShared";
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
}
<script type="text/javascript">
$(function () {
$('#tablist').tablegrid({
url: '/Csvr/RecordShared/GetHtmlList',
height: $(window).height() - 130,
loadNow: true,
isPage: true
});
$("#btnQuery").click(function () {
$('#tablist').tablegrid("Search");
});
$(window).resize(function () {//自动适应大小
$('#tablist').tablegrid('resize', {
height: $(window).height() - 110
});
});
});
function frameReturnByClose() {
$("#modalwindow").window('close');
}
function frameReturnByReload(flag) {
$("#tablist").tablegrid("Load");
}
function frameReturnByMes(mes) {
$.messageBox5s('提示', mes);
}
</script>
<div class="mvctool">
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
@Html.Action("ToolBar", "Control", ViewBag.ToolBar as ToolBar)
</div>
<div class="bas_datagrid">
<div id="tb" style="padding:5px;height:auto" class="grid_toolbar">
<ul class="toolBar_ul">
<li>共享时间:@Html.WdatePickerText("txt_STime", DateTime.Now.ToString("yyyy-MM-dd"))-@Html.WdatePickerText("txt_ETime", DateTime.Now.ToString("yyyy-MM-dd"))</li>
@*<li>
共享录音分类:@Html.DropDownList("slt_RecordSharedType", new List<SelectListItem>() {
new SelectListItem(){ Text="全部",Value="0"},
new SelectListItem(){ Text="优秀录音",Value="1"},
new SelectListItem(){ Text="违规录音",Value="2"}
})
</li>*@
<li>录音业务类型:@Html.DropDownList("slt_RecordType", new WX.CRM.WEB.Handler.ControlResource().GetRecordTypeList(), new { style = "width:100px" })
<li>客户ID<input type="text" name="txt_Resid" style="width:150px" /></li>
<li>录音编号:<input type="text" name="txt_Recordid" style="width:150px" /></li>
@*<li>受理人:<input type="text" name="txt_serviceEid" style="width:100px" /></li>*@
<li>共享人:<input type="text" name="txt_shareEid" style="width:100px" /></li>
<li><input type="hidden" name="txt_RecordSharedType" style="width:100px" value="@Request["RecordSharedType"]" /></li>
</ul>
</div>
@Html.Raw(ViewBag.gridTable)
</div>
<div id="recordPlayerWin"></div>
<script type="text/javascript">
function GetIframeHtml(src) {
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0' src='" + src + "'></iframe>";
}
function Delete_Click() {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
$.messager.confirm('提示', '@Suggestion.YouWantToDeleteTheSelectedRecords', function (r) {
if (r) {
$.r_post("/Csvr/RecordShared/Delete?pkid=" + row.PKID, function (data) {
if (data.type == 1) {
$("#tablist").tablegrid('Load');
}
$.messageBox5s('提示', data.message);
}, "json");
}
});
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
}
function PalyRecord(url, objDiv, ctiver) {
$('#recordPlayerWin').window({
title: '播放录音', width: 330, height: 180, iconCls: 'icon-add', shadow: true,
modal: true,
closed: true,
minimizable: false,
maximizable: false,
collapsible: false,
onBeforeClose: function () { //当面板关闭之前触发的事件
// document.getElementById("Player").stop();
}
}).window('open');
if (ctiver == "@(((int)WX.CRM.Model.Enum.CTI_VER.深海捷固定坐席).ToString())"
|| ctiver == "@(((int)WX.CRM.Model.Enum.CTI_VER.艾讯).ToString())"
|| ctiver == "@(((int)WX.CRM.Model.Enum.CTI_VER.艾讯new).ToString())"
) {
var isChrome = window.navigator.userAgent.indexOf("Chrome") !== -1
if (isChrome) {
$('#recordPlayerWin').html("<video controls=\"\" src=\"" + url + "\" style=\"width:300px; height:50px;\" autoplay=\"autoplay\" />");
}
else {
$('#recordPlayerWin').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 {
$.ajax({
url: url + "&jsoncallback=?",
success: function (recordurl) {
$('#recordPlayerWin').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="' + recordurl + '"><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>');
},
error: function () {
$.messager.alert("错误", "获取录音地址出错!", "error");
},
dataType: 'json'
});
}
}
function StopRecord(objDiv) {
try {
//document.getElementById("Player").stop();
} catch (e) {
}
$('#' + objDiv).hide();
$('#' + objDiv).html('');
}
</script>