TG.WXCRM.V4/WEB/Views/Res/WX/WorkAccountIndex.cshtml

134 lines
6.4 KiB
Plaintext

@using WX.CRM.WebHelper;
@{
ViewBag.Title = "工作微信管理";
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
}
<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>微信用户名:<input type="text" name="txt_userName" style="width:150px" />&nbsp;</li>
<li>微信号:<input type="text" name="txt_alias" style="width:120px" />&nbsp;</li>
<li>客服工号:<input type="text" name="txt_eId" style="width:150px" />&nbsp;</li>
@{
var ss = (string)ViewBag.roleCodes;
if (ss.IndexOf("[CKWX]") > -1 && ss.IndexOf("[GLY]") == -1)
{
ss += "[GLY]";
}
}
<li>@Html.Action("UserComBoxByRole", "Control", new { onLoadSucced = "onLoadSucced()", controlName = "nb1", roleCodes = ss, saledeptid = "", salegroupid = ViewBag.userGroupId, iseid = "0", inneruserid = "", currentRight = WX.CRM.WebHelper.InitRights.CONST_工作微信管理 })</li>
<li>昵称:<input type="text" name="txt_nickName" style="width:120px" />&nbsp;</li>
<li>
在职状态:<select id="slt_isDismiss" name="slt_isDismiss" style="height:22px;">
<option value="-1" selected>全部</option>
<option value="0" selected>在职</option>
<option value="1">离职</option>
</select>&nbsp;
</li>
<li style="display:none;">备注和标签:<input type="text" name="txt_conRemark" style="width:120px" />&nbsp;</li>
<li style="display:none;">时间:@Html.WdatePickerText("txt_stime", "")-@Html.WdatePickerText("txt_etime", "")</li>
<li style="display:none;">客户微信用户名:<input type="text" name="txt_customerUserName" style="width:150px" />&nbsp;</li>
<li style="display:none;">客户微信号:<input type="text" name="txt_customerAlias" style="width:120px" />&nbsp;</li>
<li style="display:none;">客户微信昵称:<input type="text" name="txt_customerNickname" style="width:150px" />&nbsp;</li>
<li style="display:none;">客户微信备注:<input type="text" name="txt_customerRemark" style="width:120px" />&nbsp;</li>
<li>
@Html.ToolButtonPlain("btnMore", "", "更多↓", false, "nstatus='hidden'")
</li>
</ul>
</div>
@Html.Raw(ViewBag.gridTable)
</div>
<script type="text/javascript">
$(function () {
$('#tablist').tablegrid({
url: '/Res/WX/GetWorkAccountHtmlList',
height: $(window).height() - 110,
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 onLoadSucced() {
$('#tablist').tablegrid("Search");
}
</script>
@*ToolBar事件处理*@
<script type="text/javascript">
function GetIframeHtml(src) {
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0'' src='" + src + "'></iframe>";
}
function Rcontack_Click() {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
window.parent.ChildAddTab('工作微信好友', '/Res/WX/WorkAccountRcontact?jobWxUserName=' + row.USERNAME, "");
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
}
function ResDetail_Click() {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
window.parent.ChildAddTab('微信资源详情', '/Csvr/CustomerInfo/CustomerDetail?resid=' + row.RESID, "");
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
}
function Bind_Click() {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
$("#modalwindow").html(GetIframeHtml("/Res/WX/BindWorkAccount?id=" + row.PKID + "&Ieguid=" + GetGuid()));
$("#modalwindow").window({ title: '编辑', width: 800, height: 600, iconCls: 'icon-edit' }).window('open');
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
}
function ChatRecord_Click() {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
//window.location = '/Res/WX/GetJobWxChatRecord?jobWxUserName=' + row.USERNAME;
// window.parent.ChildAddTab('工作微信聊天记录', '/Res/WX/GetJobWxChatRecord?jobWxUserName=' + row.USERNAME, "");
//window.parent.ChildAddTab('工作微信聊天记录', 'http://192.168.1.132:809/MessageHtml.html?username=' + row.USERNAME, "");
window.parent.ChildAddTab('工作微信聊天记录', '/Weixin/WorkAccount/MyMessage?workusername=' + row.USERNAME, "icon-detail");
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
}
function Hongbao_Click() {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
window.parent.ChildAddTab('微信红包', '/Weixin/WorkAccount/ShowHongBao?workusername=' + row.USERNAME, "icon-detail");
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
}
//获取datagrid头部及字段
function getDataGridHeader() {
var columns = $('#tablist').tablegrid("getAllHead");
return columns;
}
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() };
}
</script>