TG.WXCRM.V4/WEB/Views/WeiXin/WxResourceReport/UserWorkReport.cshtml

117 lines
4.8 KiB
Plaintext

@using WX.CRM.WebHelper
@{
ViewBag.Title = "员工日常工作报表";
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
}
<div class="mvctool">
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
@Html.Action("ToolBar", "Control", ViewBag.ToolBar as ToolBar)
@Html.ToolButton("btnExport", "icon-export", "导出", true)
</div>
<style>
body {
overflow: hidden
}
</style>
<div class="bas_datagrid">
<div id="tb" style="padding:5px;height:auto" class="grid_toolbar">
<ul class="toolBar_ul">
<li>@Html.Action("UserSSOComBox", "Control", new { currentRight = WX.CRM.WebHelper.InitRights.CONST_员工日常工作报表 })</li>
<li>
<span>分配时间:</span>
<input type="text" id="stime" name="stime" value=@(DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")) onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'etime\')}' })" style="width: 100px;" />-
<input type="text" id="etime" name="etime" value=@(DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd")) onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd',minDate:'#F{$dp.$D(\'stime\')}' })" style="width: 100px;" />
</li>
<li>
<input type="checkbox" name="hideQuit" id="hideQuit" value="1">
不显示离职员工
</li>
</ul>
</div>
@Html.Raw(ViewBag.gridTable)
</div>
<script type="text/javascript">
$(function () {
$(window).resize(function () {
$('#tablist').tablegrid('resize', {
height: $(window).height() - 110
});
});
$("#btnQuery").click(function () {
LoadData();
});
$("#btnExport").click(function () {
BtnExportAll_Click();
});
var CurTimeAmount = $(".grid_table_head th[field='CurTimeAmount']");
//console.dir(CurTimeAmount);
$(CurTimeAmount).css("color", "red");
});
function onLoadSucced() {
LoadData();
}
function getPageOptions(gridID) {
var option = $("#tablist").tablepage('getPagination');
var str = "rows=" + option.rows + "&page=" + option.page + "&order=" + option.order + "&sort=" + option.sort;
return str;
}
function LoadData() {
$("#tablist").tablegrid({
url: '/weixin/WxResourceReport/UserWorkReport',
height: $(window).height() - 110,
loadNow: true,
isPage: true,
data: GetControlValue(),
onLoadSuccess: function (data) {
$(".layui-table-page").hide();
}
});
}
function GetControlValue() {
return {
companyId: $("#txt_companyId").val(),
deptId: $("#txt_deptId").val(),
groupId: $("#txt_groupIds").val(),
userid: $('#txt_userId').val(),
stime: $('#stime').val(),
etime: $('#etime').val(),
hideQuit: $('#hideQuit').prop("checked")
};
}
function frameReturnByClose() {
$("#modalwindow").window('close');
}
function frameReturnByReload(flag) {
$("#tablist").tablegrid("Load");
}
//获取datagrid头部及字段
function getDataGridHeader() {
var columns = $('#tablist').tablegrid("getHead");
return columns;
}
function GetIframeHtml(src) {
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0' src='" + src + "'></iframe>";
}
function BtnExportAll_Click() {
var param = "&gid=" + $(".combo-value").val() + "&pkid=" + $('#nb1_combox_user').val() + "&stime=" + $('#stime').val() + "&etime=" + $('#etime').val() + "&hideQuit=" + $('#hideQuit').prop("checked");
var option = $("#tablist").tablepage('getPagination');
//全部导出
param += "&rows=" + option.totalRows + "&page=1&order=" + option.order + "&sort=" + option.sort;
$("#modalwindow").html(GetIframeHtml("/Control/ExcelExport?Query=" + encodeURIComponent("/weixin/WxResourceReport/UserWorkReportExport?" + GetQueryStr() + param)));
$("#modalwindow").window({ title: '导出', width: 480, height: 300, iconCls: 'icon-export' }).window('open');
}
function Other2_Click() {
$("#modalwindow").html(GetIframeHtml("/WxResourceReport/TemplateList"));
$("#modalwindow").window({ title: '模板管理', width: 1240, height: 800}).window('open');
}
function Other1_Click() {
$("#modalwindow").html(GetIframeHtml("/WxResourceReport/EditWarnSetting"));
$("#modalwindow").window({ title: '预警值配置', width: 1240, height: 800 }).window('open');
}
function Other3_Click() {
$("#modalwindow").html(GetIframeHtml("/WxResourceReport/WarnUserList"));
$("#modalwindow").window({ title: '通知人员管理', width: 1240, height: 800 }).window('open');
}
</script>