ComplianceServer/oldcode/WEB/Views/Csvr/RecordShared/Index2.cshtml

188 lines
9.5 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 = "RecordShared2";
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
}
<script type="text/javascript">
$(function () {
$('#tablist').tablegrid({
url: '/Csvr/RecordShared/GetHtmlList2',
height: $(window).height() - 130,
isPage: true,
loadNow: false,
data: GetControlValue,
onLoadError: function () {
$.messager.alert("警告", "信息加载失败!", "error");
}
});
$("#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);
}
function GetControlValue() {
return { saleDeptId: $("#nb1_uc_org_depts").val(), groupId: $("#nb1_uc_org_groups").val(), userId: $("#nb1_uc_org_ids").val(), dayType: $("#txt_Daytype").val() };
}
function onLoadSucced() {
$('#tablist').tablegrid("Search");
}
</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>大类:
<select id="bigType" name="slt_bigType" style="width:150px;height:22px" onChange="changeselect(this.value)">
<option value="">--请选择大类--</option>
@foreach (var item in ViewBag.BigTypeList as List<SelectListItem>)
{
<option value="@item.Value">@item.Text</option>
}
</select>
</li>
<li>
小类:
<select id="subType" name="slt_subType" style="width:220px;height:22px">
<option value="">--请选择小类--</option>
</select>
</li>
<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>
@*@Html.Action("UserComBoxByRole", "Control", new { onLoadSucced = "onLoadSucced()", controlName = "nb1", roleCodes = ViewBag.roleCodes, saledeptid = ViewBag.saleDeptId, salegroupid = ViewBag.userGroupId, iseid = "0", inneruserid = ViewBag.inneruserid, currentRight = WX.CRM.WebHelper.InitRights.CONST_共享录音 })*@
@Html.Action("UserSSOComBox", "Control", new { currentRight = WX.CRM.WebHelper.InitRights.CONST_共享录音 })
</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('');
}
function changeselect(bigType) {
var nb1defaultIndex = 0;
if (bigType == 0) {
$("#subType").unbind();
$("#subType").html("<option value=''>--请选择小类--</option>");
return;
}
$.r_post("/WeiXin/Message/GetSubTypeList?bigType=" + bigType, function (data) {
$("#subType").unbind();
$("#subType").html("<option value=''>--请选择小类--</option>");
$(data).each(function (n, m) {
/*if (nb1defaultIndex == 0) {
$("#slt_subProductId").append("<option value='" + m.Value + "' selected='selected'>" + m.Text + "</option>");
}
else {*/
$("#subType").append("<option value='" + m.Value + "'>" + m.Text + "</option>");
//}
});
nb1defaultIndex++;
}, "json");
}
</script>