105 lines
5.0 KiB
Plaintext
105 lines
5.0 KiB
Plaintext
@using WX.CRM.WebHelper
|
|
|
|
@{
|
|
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.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>@Html.Action("UserComBoxByRole", "Control", new { type = "2", onLoadSucced = "onLoadSucced()", controlName = "nb1", roleCodes = ViewBag.roleCodes, saledeptid = ViewBag.saleDeptId, salegroupid = ViewBag.userGroupId, currentRight = WX.CRM.WebHelper.InitRights.CONST_组别工单统计 })</li>*@
|
|
<li>@Html.Action("UserSSOComBox", "Control", new { currentRight = WX.CRM.WebHelper.InitRights.CONST_组别工单统计 })</li>
|
|
<li><input id="btnToday" type="button" name="btnToday" value="今日" /> </li>
|
|
<li><input id="btnLastday" type="button" name="btnLastday" value="昨日" /> </li>
|
|
<li><input id="btnWeek" type="button" name="btnWeek" value="本周" /> </li>
|
|
<li><input id="btnMonth" type="button" name="btnMonth" value="本月" /> </li>
|
|
<li>时间选择:@Html.WdatePickerText("txt_STime", DateTime.Now.ToString("yyyy-MM-dd"))-@Html.WdatePickerText("txt_ETime", DateTime.Now.ToString("yyyy-MM-dd"))</li>
|
|
<li>
|
|
@*@Html.ToolButtonPlain("btnQuery" , "icon-search", "查询", false, "")*@
|
|
@Html.ToolButtonPlain("btnMore", "", "更多↓", false, "nstatus='hidden'")
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
@Html.Raw(ViewBag.GroupList)
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$('#tablist').tablegrid({
|
|
url: '/Ord/MemoStatistics/GetGroupMemoStatistics',
|
|
height: $(window).height() - 130,
|
|
loadNow: false,
|
|
//data: GetControlValue
|
|
});
|
|
function GetControlValue() {
|
|
return {groupId: $("#nb1_uc_org_groups").val()};
|
|
}
|
|
$("#btnQuery").click(function () {
|
|
$('#tablist').tablegrid("Search");
|
|
});
|
|
$("#btnToday").click(function () {
|
|
var Nowdate = new Date();
|
|
var month = Number(Nowdate.getMonth()) + 1;
|
|
$("#txt_STime").val(Nowdate.getFullYear() + "-" + month + "-" + Nowdate.getDate());
|
|
$("#txt_ETime").val(Nowdate.getFullYear() + "-" + month + "-" + Nowdate.getDate());
|
|
$('#tablist').tablegrid("Search");
|
|
});
|
|
$("#btnLastday").click(function () {
|
|
var Lastdate = new Date();
|
|
Lastdate.setDate(Lastdate.getDate() - 1);
|
|
var month = Number(Lastdate.getMonth()) + 1;
|
|
$("#txt_STime").val(Lastdate.getFullYear() + "-" + month + "-" + Lastdate.getDate());
|
|
$("#txt_ETime").val(Lastdate.getFullYear() + "-" + month + "-" + Lastdate.getDate());
|
|
$('#tablist').tablegrid("Search");
|
|
});
|
|
$("#btnWeek").click(function () {
|
|
var Nowdate = new Date();
|
|
var WeekFirstDay = new Date(Nowdate - (Nowdate.getDay() - 1) * 86400000);
|
|
var monthS = Number(WeekFirstDay.getMonth()) + 1;
|
|
var WeekLastDay = new Date((WeekFirstDay / 1000 + 6 * 86400) * 1000);
|
|
var monthE = Number(WeekLastDay.getMonth()) + 1;
|
|
$("#txt_STime").val(WeekFirstDay.getFullYear() + "-" + monthS + "-" + WeekFirstDay.getDate());
|
|
$("#txt_ETime").val(WeekLastDay.getFullYear() + "-" + monthE + "-" + WeekLastDay.getDate());
|
|
$('#tablist').tablegrid("Search");
|
|
});
|
|
$("#btnMonth").click(function () {
|
|
var Nowdate = new Date();
|
|
var MonthFirstDay = new Date(Nowdate.getFullYear(), Nowdate.getMonth(), 1);
|
|
monthS = Number(MonthFirstDay.getMonth()) + 1;
|
|
var MonthNextFirstDay = new Date(Nowdate.getFullYear(), Nowdate.getMonth() + 1, 1);
|
|
var MonthLastDay = new Date(MonthNextFirstDay - 86400000);
|
|
monthE = Number(MonthLastDay.getMonth()) + 1;
|
|
$("#txt_STime").val(MonthFirstDay.getFullYear() + "-" + monthS + "-" + MonthFirstDay.getDate());
|
|
$("#txt_ETime").val(MonthLastDay.getFullYear() + "-" + monthE + "-" + MonthLastDay.getDate());
|
|
$('#tablist').tablegrid("Search");
|
|
});
|
|
});
|
|
function onLoadSucced() {
|
|
$('#tablist').tablegrid("Search");
|
|
}
|
|
function frameReturnByClose() {
|
|
$("#modalwindow").window('close');
|
|
}
|
|
|
|
function frameReturnByReload(flag) {
|
|
$("#tablist").tablegrid("Load");
|
|
}
|
|
|
|
function frameReturnByMes(mes) {
|
|
$.messageBox5s('提示', mes);
|
|
}
|
|
|
|
function export_click() {
|
|
var url = "/Ord/MemoStatistics/GroupExportAll?" + GetQueryStr() + "&saleDeptId=" + $("#nb1_uc_org_depts").val() + "&groupId=" + $("#nb1_uc_org_groups").val() + "&Fireguid=" + GetGuid();
|
|
this.window.open(url);
|
|
}
|
|
</script>
|
|
|