160 lines
6.3 KiB
Plaintext
160 lines
6.3 KiB
Plaintext
@using WX.CRM.WebHelper;
|
||
@{
|
||
ViewBag.Title = "选择好友";
|
||
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
|
||
}
|
||
<style>
|
||
#tablist td {
|
||
word-break: keep-all; /* 不换行 */
|
||
word-wrap: normal;
|
||
overflow: hidden; /* 内容超出宽度时隐藏超出部分的内容 */
|
||
text-overflow: ellipsis; /* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用。*/
|
||
}
|
||
</style>
|
||
<div class="mvctool">
|
||
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
|
||
@Html.ToolButton("btnSave", "icon-save", "确定", true)
|
||
</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" />
|
||
<input type="hidden" name="txt_jobWxUserName" value="@Request["jobWxUserName"]" />
|
||
</li>
|
||
<li>微信号:<input type="text" name="txt_alias" style="width:120px" /> </li>
|
||
<li>昵称或备注:<input type="text" name="txt_nickname" style="width:120px" /> </li>
|
||
<li>
|
||
时间:@Html.WdatePickerText("txt_stime", "")-@Html.WdatePickerText("txt_etime", "")
|
||
<input type="hidden" name="txt_jobWxUserName" style="width:150px" value="@Request["jobWxUserName"]" />
|
||
</li>
|
||
<li>
|
||
好友类型:
|
||
<select name="slt_ntype">
|
||
<option value="0">全部</option>
|
||
<option value="1">被加/推广</option>
|
||
<option value="2">我加/其他</option>
|
||
<option value="3">拉黑/删除</option>
|
||
<option value="4">未服务推广资源</option>
|
||
<option value="5">同事</option>
|
||
</select>
|
||
</li>
|
||
<li>
|
||
<input type="checkbox" value="1" name="ckb_nofriend" id="ckb_nofriend" checked="checked" /><label for="ckb_nofriend">过滤非好友</label>
|
||
</li>
|
||
|
||
<li>
|
||
快速选择:
|
||
<input type="button" value="取消" onclick="CancleChoose()" />
|
||
<input type="button" value="前60行" onclick="Choose(0,60)" />
|
||
<input type="button" value="61~120行" onclick="Choose(61,120)" />
|
||
<input type="button" value="121~180行" onclick="Choose(121,180)" />
|
||
自定义选择:<input type="text" style="width:50px;" id="t_start" />~<input type="text" style="width:50px;" id="t_end"/><input type="button" onclick="ChooseBySelf()" value="确定" />
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
@Html.Raw(ViewBag.gridTable)
|
||
</div>
|
||
<script type="text/javascript">
|
||
$(function () {
|
||
$('#tablist').tablegrid({
|
||
//url: '/Res/WX/GetWorkAccountRcontackHtmlList?jobWxUserName=@Request["jobWxUserName"]',
|
||
url: '/TS/MsgAssistant/GetChooseRcontactHtmlList',
|
||
height: $(window).height() - 110,
|
||
loadNow: true,
|
||
isCheckMore: true,
|
||
onLoadError: function () {
|
||
$.messager.alert("警告", "信息加载失败!", "error");
|
||
}
|
||
});
|
||
$("#btnQuery").click(function () {//搜索按钮点击事件
|
||
$('#tablist').tablegrid("Search");
|
||
});
|
||
|
||
$('#btnExport').click(function () {
|
||
export_Click();
|
||
});
|
||
|
||
$(window).resize(function () {//自动适应大小
|
||
$('#tablist').tablegrid('resize', {
|
||
height: $(window).height() - 110
|
||
});
|
||
});
|
||
$("#btnSave").click(function () {//保存按钮
|
||
var parentrows = parent.GetAllRows();
|
||
var nowrows = $('#tablist').tablegrid('getSelections');
|
||
var isMove = 1;
|
||
$(nowrows).each(function (i, n) {
|
||
isMove = 1;
|
||
$(parentrows).each(function (x, w) {
|
||
if (w.PKID == n.PKID) {
|
||
isMove = 0;
|
||
}
|
||
});
|
||
if (isMove == 1) {
|
||
parent.AddRow(n.PKID, n.USERNAME, n.NICKNAME, n.CONREMARK);
|
||
}
|
||
});
|
||
parent.RebuildIndex();
|
||
|
||
$("#tablist tr:gt(0)").not(":has(input:disabled)").removeClass("tr_onclick").find("input:checked").removeAttr("checked");
|
||
$.messager.alert("提示","添加成功!","info")
|
||
});
|
||
|
||
});
|
||
function frameReturnByClose() {
|
||
$("#modalwindow").window('close');
|
||
}
|
||
function frameReturnByReload(flag) {
|
||
$("#tablist").tablegrid("Load");
|
||
}
|
||
function frameReturnByMes(mes) {
|
||
$.messageBox5s('提示', mes);
|
||
}
|
||
|
||
</script>
|
||
@*ToolBar事件处理*@
|
||
<script type="text/javascript">
|
||
function GetIframeHtml(src) {
|
||
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0'' src='" + src + "'></iframe>";
|
||
}
|
||
|
||
function Export_Click() {
|
||
$("#modalwindow").html(GetIframeHtml("/Control/ExcelExport?Query=" + encodeURIComponent("/Res/WX/Export?" + GetQueryStr())));
|
||
$("#modalwindow").window({ title: '导出', width: 480, height: 300, iconCls: 'icon-export' }).window('open');
|
||
}
|
||
|
||
function getDataGridHeader() {
|
||
var columns = $('#tablist').tablegrid("getHead");
|
||
return columns;
|
||
}
|
||
function Choose(startIndex, endIndex) {
|
||
$("#tablist tr").each(function (index, nrow) {
|
||
if (startIndex <= index && endIndex >= index) {
|
||
//console.log(index);
|
||
$(nrow).not(":has(input:disabled)").addClass("tr_onclick").find("input:checkbox").attr("checked", "checked");
|
||
}
|
||
});
|
||
}
|
||
function CancleChoose() {
|
||
$("#tablist tr:gt(0)").not(":has(input:disabled)").removeClass("tr_onclick").find("input:checked").removeAttr("checked");
|
||
}
|
||
function ChooseBySelf() {
|
||
var t_start = $("#t_start").val();
|
||
var t_end = $("#t_end").val();
|
||
//console.log(t_start);
|
||
//console.log(t_end);
|
||
if (t_start == "" || t_end == "") {
|
||
alert("请输入区间数字!");
|
||
}
|
||
if (isNaN(t_start) || isNaN(t_end)) {
|
||
alert("请输入正确的数字!");
|
||
} else {
|
||
Choose(parseInt(t_start), parseInt(t_end));
|
||
}
|
||
|
||
|
||
}
|
||
</script>
|