185 lines
7.7 KiB
Plaintext
185 lines
7.7 KiB
Plaintext
@using WX.CRM.WebHelper;
|
||
@{
|
||
ViewBag.Title = "待办事项";
|
||
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
|
||
}
|
||
<script type="text/javascript">
|
||
$(function () {
|
||
|
||
$('#tablist').tablegrid({
|
||
url: '/Csvr/ToDoItem/GetHtmlList',
|
||
height: $(window).height() - 110,
|
||
loadNow: false,
|
||
isCheckMore: true
|
||
//data: GetControlValue
|
||
});
|
||
//function GetControlValue() {
|
||
// return { groupId: user.getGroups(), userId: user.getUser() };
|
||
//}
|
||
function GetControlValue() {
|
||
return { saleDeptId: $("#nb1_uc_org_depts").val(), groupId: $("#nb1_uc_org_groups").val(), userId: $("#nb1_uc_org_ids").val() };
|
||
}
|
||
//$('#tablist').tablegrid("Load");
|
||
$(window).resize(function () {//自动适应大小
|
||
$('#tablist').tablegrid('resize', {
|
||
height: $(window).height() - 110
|
||
});
|
||
});
|
||
$("#btnQuery").click(function () {
|
||
$('#tablist').tablegrid("Search");
|
||
});
|
||
|
||
|
||
});
|
||
//ifram 返回
|
||
function frameReturnByClose() {
|
||
$("#modalwindow").window('close');
|
||
}
|
||
function frameReturnByReload(flag) {
|
||
$("#tablist").tablegrid("Load");
|
||
}
|
||
function frameReturnByMes(mes) {
|
||
$.messageBox5s('提示', mes);
|
||
}
|
||
</script>
|
||
<div class="mvctool">
|
||
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
|
||
|
||
@Html.Action("ToolBar", "Control", ViewBag.ToolBar as ToolBar)
|
||
@Html.ToolButton("btnExport", "icon-export", "导出", "Export_Click", true)
|
||
</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 = ViewBag.saleDeptId, salegroupid = ViewBag.userGroupId, iseid = "0", inneruserid = ViewBag.inneruserid })</li>*@
|
||
<li>客户ID:<input name="txt_resid" type="text" style="width:150px;" placeholder="客户ID" autocomplete="off" /></li>
|
||
<li>@Html.Action("UserSSOComBox", "Control")</li>
|
||
<li>
|
||
完成状态: @Html.DropDownList("slt_status", new List<SelectListItem>() {
|
||
new SelectListItem(){ Text="未完成",Value="0"},
|
||
new SelectListItem(){ Text="已完成",Value="1"},
|
||
new SelectListItem(){ Text="所有",Value=""}
|
||
})
|
||
</li>
|
||
<li>
|
||
@*1 点击
|
||
2 报名
|
||
6 登录
|
||
7 关注
|
||
8 取关
|
||
12 加好友
|
||
17 听课
|
||
20 聊天
|
||
31 体验*@
|
||
事件:
|
||
<select name="slt_resourcetag">
|
||
<option value="">全部</option>
|
||
<option value="softlogin" @{ if (Request.QueryString["resourcetag"] == "softlogin") { @Html.Raw("selected=\"selected\"") } }>登录</option>
|
||
@*<option value="liveInteractive" @{ if (Request.QueryString["resourcetag"] == "liveInteractive") { @Html.Raw("selected=\"selected\"") } }>直播</option>*@
|
||
<option value="RFM" @{ if (Request.QueryString["resourcetag"] == "RFM") { @Html.Raw("selected=\"selected\"") } }>标签</option>
|
||
<option value="web">报名</option>
|
||
<option value="UserCenterEvent7">关注</option>
|
||
<option value="UserCenterEvent8">取消关注</option>
|
||
<option value="UserCenterEvent20">聊天信息</option>
|
||
<option value="UserCenterEvent31">体验到期</option>
|
||
<option value="UserCenterEvent17">听课</option>
|
||
<option value="UserCenterEvent1">点击</option>
|
||
<option value="UserCenterEvent12">加好友</option>
|
||
<option value="other">其他</option>
|
||
</select>
|
||
</li>
|
||
<li>提醒时间:@Html.WdatePickerText("txt_ctime", "")~@Html.WdatePickerText("txt_etime", "")</li>
|
||
<li>待办事项:<input name="txt_memo" type="text" style="width:150px;" placeholder="待办事项" autocomplete="off" /></li>
|
||
</ul>
|
||
</div>
|
||
|
||
@Html.Raw(ViewBag.List)
|
||
</div>
|
||
<script type="text/javascript">
|
||
function onLoadSucced() {
|
||
$('#tablist').tablegrid("Search");
|
||
}
|
||
function GetIframeHtml(src) {
|
||
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0'' src='" + src + "'></iframe>";
|
||
}
|
||
function Create_Click() {
|
||
$("#modalwindow").html(GetIframeHtml("/Csvr/ToDoItem/Add"));
|
||
$("#modalwindow").window({ title: '新增', width: 700, height: 400, iconCls: 'icon-add' }).window('open');
|
||
}
|
||
function Edit_Click() {
|
||
var row = $('#tablist').tablegrid('getSelected');
|
||
if (row != null) {
|
||
$("#modalwindow").html(GetIframeHtml("/Csvr/ToDoItem/Add?id=" + row.pkid));
|
||
$("#modalwindow").window({ title: '编辑', width: 700, height: 430, iconCls: 'icon-edit' }).window('open');
|
||
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
|
||
}
|
||
function Complete_Click() {
|
||
var row = $('#tablist').tablegrid('getSelections');
|
||
if (row.length == 0) {
|
||
$.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords!');
|
||
return;
|
||
}
|
||
console.log(row);
|
||
var ids = "";
|
||
$(row).each(function (a,b) {
|
||
ids += "["+b.pkid+"]";
|
||
});
|
||
if (row != null) {
|
||
$.messager.confirm('提示', '您确定要完成此待办事项吗?', function (r) {
|
||
if (r) {
|
||
|
||
$.r_post("/Csvr/ToDoItem/Complete?allid=" + ids, function (data) {
|
||
if (data.type == 1) {
|
||
$('#tablist').tablegrid("Load");
|
||
$.messageBox5s('提示', data.message);
|
||
}
|
||
else {
|
||
$.messageBox5s('提示', data.message);
|
||
}
|
||
}, "json");
|
||
}
|
||
});
|
||
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords!'); }
|
||
}
|
||
function gotoComplete(title, url, id) {
|
||
if (url != '') {
|
||
window.parent.ChildAddTab(title, url, '');
|
||
}
|
||
|
||
$.r_post("/Csvr/ToDoItem/Complete?allid=" + id, function (data) {
|
||
if (data.type == 1) {
|
||
$('#tablist').tablegrid("Load");
|
||
}
|
||
}, "json");
|
||
}
|
||
$(function () {
|
||
$("#tb .toolBar_ul").append("<li><a href=\"javascript:ShowTag()\" style='padding-left:10px;'>标签说明</a></li>")
|
||
});
|
||
function ShowTag() {
|
||
$("#modalwindow").html(GetIframeHtml("/tag.html"));
|
||
$("#modalwindow").window({ title: '标签说明', width: 700, height: 520, iconCls: 'icon-edit' }).window('open');
|
||
}
|
||
function Export_Click() {
|
||
var ctime= $("#txt_ctime").val();
|
||
var etime = $("#txt_etime").val();
|
||
if (ctime && etime) {
|
||
$("#modalwindow").html(GetIframeHtml("/Control/ExcelExport?Query=" + encodeURIComponent("/Csvr/ToDoItem/ExportAll?" + GetQueryStr())));
|
||
$("#modalwindow").window({ title: '导出', width: 480, height: 300, iconCls: 'icon-export' }).window('open');
|
||
} else {
|
||
alert("请选择提醒时间段在导出!");
|
||
}
|
||
}
|
||
function getPageOptions(gridID) {
|
||
var option = $("#tablist").tablepage('getPagination');
|
||
var str = "rows=" + option.rows + "&page=" + option.page + "&order=" + option.order + "&sort=" + option.sort;
|
||
return str;
|
||
}
|
||
//获取datagrid头部及字段
|
||
function getDataGridHeader() {
|
||
var columns = $('#tablist').tablegrid("getHead");
|
||
return columns;
|
||
}
|
||
|
||
</script>
|
||
|