114 lines
4.9 KiB
Plaintext
114 lines
4.9 KiB
Plaintext
|
|
@{
|
|
ViewBag.Title = "疫苗关注微信列表";
|
|
}
|
|
|
|
<table class="t1" style="width:100%">
|
|
<tr>
|
|
<td class="ltd" style="width:100px">昵称:</td>
|
|
<td class="rtd" style="width:160px"><input type="text" class="l-text" style="width:140px" id="nc" /></td>
|
|
<td class="ltd" style="width:100px">备注:</td>
|
|
<td class="rtd" style="width:160px"><input type="text" class="l-text" style="width:140px" id="bz" /></td>
|
|
<td class="rtd"><input type="button" value="查询" class="l-button" id="cx" /></td>
|
|
</tr>
|
|
</table>
|
|
<div id="gzList"></div>
|
|
<div id="bzuser" style="display:none">
|
|
<table class="t1" style="width:300px">
|
|
<tr>
|
|
<td class="ltd" style="width:100px">备注:</td>
|
|
<td class="rtd"><input id="xgbz" class="l-text" /></td>
|
|
</tr>
|
|
</table>
|
|
<input type="hidden" id="openid" />
|
|
</div>
|
|
@section scripts{
|
|
<script type="text/javascript" src="@Url.Content("~/Scripts/public.js")"></script>
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$("#gzList").ligerGrid({
|
|
|
|
title: "关注微信列表", parms: {}, url: "@Url.Action("getOpenUserList")",
|
|
columns: [
|
|
{ name: "openid", display: "微信ID", width: 220, align: "left", },
|
|
{
|
|
name: "subscribe", display: "关注状态", width: 80, align: "left", render: function (r, i, v) {
|
|
if(v==1)
|
|
{
|
|
return "关注中";
|
|
}
|
|
else
|
|
{
|
|
return "不再关注";
|
|
}
|
|
}
|
|
},
|
|
{ name: "nickname", display: "昵称", width: 200, align: "left" }
|
|
, { name: "language", display: "语言", width: 100, align: "left" }
|
|
, { name: "city", display: "城市", width: 100, align: "left" }
|
|
, { name: "province", display: "省份", width: 100, align: "left" }
|
|
, { name: "country", display: "国家", width: 100, align: "left" }
|
|
, { name: "subscribe_time", display: "关注时间", width: 100, align: "left", render: function (r, i, v) { return formatTime(v*1000) } }
|
|
, { name: "remark", display: "备注", width: 100, align: "left" }
|
|
|
|
], width: "98%",
|
|
height: "100%",
|
|
rownumbers: true,
|
|
usePager: true,
|
|
heightDiff: -20,
|
|
delayLoad: true, toolbar: {
|
|
items: [
|
|
{ text: '备注', click: edit, icon: 'modify' }
|
|
|
|
]
|
|
}
|
|
});
|
|
$("#cx").bind("click", function () {
|
|
liger.get("gzList").set("parms", { nc: $("#nc").val(), bz: $("#bz").val() });
|
|
liger.get("gzList").set("page", 1);
|
|
liger.get("gzList").reload();
|
|
});
|
|
});
|
|
function edit(item)
|
|
{
|
|
if(item.text=="备注")
|
|
{
|
|
var r = liger.get("gzList").getSelectedRow();
|
|
if (!r)
|
|
{
|
|
$.ligerDialog.warn("请选择要备注的用户!");
|
|
return;
|
|
}
|
|
$("#xgbz").val(r.remark);
|
|
$("#openid").val(r.openid);
|
|
$.ligerDialog.open({
|
|
title: "设置关注备注", width: 310, height: 120, target: $("#bzuser"), buttons: [{
|
|
text: "确定", onclick: function (item, dialg) {
|
|
$.ajax({
|
|
url: "@Url.Action("remark")", type: "post", dataType: "json", data: {openid:$("#openid").val(), bz: $("#xgbz").val() },
|
|
success: function (data) {
|
|
$.ligerDialog.closeWaitting();
|
|
$.ligerDialog.alert(data.Message);
|
|
if(data.State==1)
|
|
{
|
|
liger.get("gzList").reload();
|
|
dialg.hidden();
|
|
}
|
|
},
|
|
beforeSend: function () {
|
|
$.ligerDialog.waitting("正在设置备注,请稍后……");
|
|
},
|
|
error: function (e) {
|
|
$.ligerDialog.warn(e.responseText);
|
|
}
|
|
});
|
|
|
|
}
|
|
}, { text: "取消", onclick: function (item, dialg) { dialg.hidden(); } }]
|
|
})
|
|
}
|
|
}
|
|
</script>
|
|
}
|
|
|