113 lines
3.6 KiB
Plaintext
113 lines
3.6 KiB
Plaintext
@using WX.CRM.WebHelper;
|
|
@using WX.CRM.Model.Entity;
|
|
@{
|
|
ViewBag.Title = "公众号用户";
|
|
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
|
|
}
|
|
<script src="~/Scripts/op/tablegrid.sort.js"></script>
|
|
<div class="mvctool">
|
|
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
|
|
@*Html.ToolButton("btnNoWeixin", "icon-save", "非微信用户", true)*@
|
|
</div>
|
|
<div id="remark" style="display:none;margin-bottom:10px;">客户来源:<input type="text" id="source" style="width:280px"/> <input type="button" value="确定" onclick="sourceConfirm()"/></div>
|
|
<div class="bas_datagrid">
|
|
<div id="tb" class="grid_toolbar">
|
|
<ul class="toolBar_ul">
|
|
<li>昵称:<input type="text" name="txt_nickName" style="width:120px" /></li>
|
|
</ul>
|
|
</div>
|
|
@Html.Raw(ViewBag.gridTable)
|
|
</div>
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
loadtablegrid();
|
|
|
|
$(window).resize(function () {//自动适应大小
|
|
$('#tablist').tablegrid('resize', {
|
|
height: $(window).height() - 110
|
|
});
|
|
});
|
|
|
|
$("#btnQuery").click(function () {
|
|
$('#tablist').tablegrid("Search");
|
|
});
|
|
$("#btnNoWeixin").click(function () {
|
|
$('#remark').css('display','block');
|
|
});
|
|
});
|
|
function frameReturnByClose() {
|
|
$("#modalwindow").window('close');
|
|
}
|
|
function frameReturnByReload(flag) {
|
|
$("#tablist").tablegrid("Load");
|
|
}
|
|
function frameReturnByMes(mes) {
|
|
$.messageBox5s('提示', mes);
|
|
}
|
|
|
|
function loadtablegrid() {
|
|
$('#tablist').tablegrid({
|
|
url: '/WeiXin/SzzyOrder/GetOfficeAccountUserHtmlList',
|
|
height: $(window).height() - 110,
|
|
loadNow: true,
|
|
onLoadError: function () {
|
|
$.messager.alert("警告", "信息加载失败!", "error");
|
|
}
|
|
});
|
|
}
|
|
|
|
function changeselect(productId) {
|
|
var nb1defaultIndex = 0;
|
|
if (productId == 0) {
|
|
$("#slt_subProductId").unbind();
|
|
$("#slt_subProductId").html("<option value='0'>--请选中产品小类--</option>");
|
|
return;
|
|
}
|
|
$.r_post("/SzzyOrder/GetSubProductList?productId=" + productId, function (data) {
|
|
$("#slt_subProductId").unbind();
|
|
|
|
$("#slt_subProductId").html("<option value='0'>--请选中产品小类--</option>");
|
|
|
|
$(data).each(function (n, m) {
|
|
/*if (nb1defaultIndex == 0) {
|
|
$("#slt_subProductId").append("<option value='" + m.Value + "' selected='selected'>" + m.Text + "</option>");
|
|
}
|
|
else {*/
|
|
$("#slt_subProductId").append("<option value='" + m.Value + "'>" + m.Text + "</option>");
|
|
|
|
//}
|
|
});
|
|
nb1defaultIndex++;
|
|
}, "json");
|
|
}
|
|
|
|
</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 selectCustomerWx(userName) {
|
|
window.parent.frameReturnByClose();
|
|
window.parent.selectCustomerWx(userName);
|
|
}
|
|
|
|
function sourceConfirm() {
|
|
var val = $('#source').val().trim();
|
|
if (val == '' || val == undefined) {
|
|
$.messager.alert("警告", "请填写客户来源", "error");
|
|
return;
|
|
}
|
|
selectCustomerWx(val);
|
|
}
|
|
|
|
</script>
|