90 lines
3.2 KiB
Plaintext
90 lines
3.2 KiB
Plaintext
@using WX.CRM.WebHelper;
|
||
@{
|
||
ViewBag.Title = "微信消息批量导出";
|
||
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
|
||
}
|
||
<div class="mvctool">
|
||
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
|
||
@Html.ToolButton("btnExport", "icon-export", "导出", 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" /> </li>
|
||
<li>微信号:<input type="text" name="txt_alias" style="width:120px" /> </li>
|
||
<li>客户ID:<input type="text" name="txt_resid" style="width:150px" /> </li>
|
||
<li>昵称:<input type="text" name="txt_nickname" style="width:120px" /> </li>
|
||
<li>备注和标签:<input type="text" name="txt_conremark" style="width:120px" /> </li>
|
||
</ul>
|
||
</div>
|
||
@Html.Raw(ViewBag.gridTable)
|
||
</div>
|
||
<script type="text/javascript">
|
||
var hrefArr = [];
|
||
$(function () {
|
||
$('#tablist').tablegrid({
|
||
url: '/WeiXin/WorkAccount/BatchExport',
|
||
height: $(window).height() - 110,
|
||
loadNow: false,
|
||
isCheckMore: true,
|
||
data: GetControlValue,
|
||
onLoadError: function () {
|
||
$.messager.alert("警告", "信息加载失败!", "error");
|
||
}
|
||
});
|
||
$("#btnQuery").click(function () {//搜索按钮点击事件
|
||
$('#tablist').tablegrid("Search");
|
||
});
|
||
$("#btnExport").click(function() {
|
||
var selects = $('#tablist').tablegrid('getSelections');
|
||
if (selects != null) {
|
||
$(selects).each(function (i, n) {
|
||
hrefArr[i] = $(n.export).attr("href");
|
||
});
|
||
$("iframe").remove();
|
||
download();
|
||
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
|
||
});
|
||
$(window).resize(function () {//自动适应大小
|
||
$('#tablist').tablegrid('resize', {
|
||
height: $(window).height() - 110
|
||
});
|
||
});
|
||
});
|
||
function GetControlValue() {
|
||
return {};
|
||
}
|
||
function frameReturnByClose() {
|
||
$("#modalwindow").window('close');
|
||
}
|
||
function frameReturnByReload(flag) {
|
||
$("#tablist").tablegrid("Load");
|
||
}
|
||
function frameReturnByMes(mes) {
|
||
$.messageBox5s('提示', mes);
|
||
}
|
||
|
||
function download() {
|
||
if (hrefArr.length > 0 && hrefArr !== undefined) {
|
||
var url = hrefArr.pop();
|
||
$("body").append("<iframe src='" + url + "' style='display:none'></iframe>");
|
||
setTimeout(download, 1);
|
||
}
|
||
}
|
||
|
||
</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;
|
||
}
|
||
|
||
</script>
|