TG.WXCRM.V4/WEB/Views/Weapp/WeappUserInfo/Index.cshtml

79 lines
3.0 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 = "";
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
}
<div class="mvctool">
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
@Html.Action("ToolBar", "Control", ViewBag.ToolBar as ToolBar)
@Html.ToolButton("btnMessage", "icon-check", "聊天记录", false)
</div>
<div class="bas_datagrid">
<div id="tb" style="padding:5px;height:auto" class="grid_toolbar">
<ul class="toolBar_ul">
@*<li>@Html.Action("UserComBoxByRole", "Control", new { onLoadSucced = "onLoadSucced()", controlName = "nb1", roleCodes = ViewBag.roleCodes, saledeptid = "", salegroupid = ViewBag.userGroupId, iseid = "0", inneruserid = "" })</li>*@
<li>昵称:<input type="text" name="txt_nickName" style="width:120px" />&nbsp;</li>
<li>客户ID<input type="text" name="txt_resid" style="width:120px" /></li>
</ul>
</div>
@Html.Raw(ViewBag.gridTable)
</div>
<script type="text/javascript">
$(function () {
$('#tablist').tablegrid({
url: '/Weapp/WeappUserInfo',
height: $(window).height() - 110,
loadNow: true,
data: GetControlValue,
onLoadError: function () {
$.messager.alert("警告", "信息加载失败!", "error");
}
});
$("#btnQuery").click(function () {//搜索按钮点击事件
$('#tablist').tablegrid("Search");
});
$(window).resize(function () {//自动适应大小
$('#tablist').tablegrid('resize', {
height: $(window).height() - 110
});
});
$("#btnMessage").click(function () {
var row = $('#tablist').tablegrid('getSelected');
if (row != null) {
var eid = row.EID.split('-')[0];
window.parent.ChildAddTab('公众号聊天记录', '/weapp/weappmessage?eid=' + eid + '&accountNum=' + row.ACCOUNTNUM + '&nickname=' + row.NICKNAME, "");
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
});
});
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>";
}
//获取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>