140 lines
7.4 KiB
Plaintext
140 lines
7.4 KiB
Plaintext
@using WX.CRM.WebHelper
|
|
|
|
@{
|
|
ViewBag.Title = "员工业绩确认";
|
|
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
|
|
}
|
|
<script src="~/Scripts/op/tablegrid.sort.js"></script>
|
|
<script src="~/Scripts/op/ofixedtable.js"></script>
|
|
<div class="mvctool">
|
|
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
|
|
@Html.ToolButton("btnExport", "icon-export", "导出", true)
|
|
@*@Html.ToolButton("btnClear","icon-clear","清除",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><input type="button" id="btnYestoDay" value="前一日" /></li>
|
|
<li><input type="button" id="btnWeek" value="本周" /></li>
|
|
<li><input type="button" id="btnMonth" value="本月" /></li>
|
|
<li>资源进入时间:<input type="text" id="txt_sTime" name="txt_sTime" value=@(new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).ToString("yyyy-MM-dd")) onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" style="width: 100px;" />-@Html.WdatePickerText("txt_eTime", new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddMonths(1).AddDays(-1).ToString("yyyy-MM-dd"))</li>
|
|
@*<li>@Html.Action("UserComBoxByRole", "Control", new { controlName = "nb1", onLoadSucced = "onLoadSucced()", roleCodes = ViewBag.roleCodes, saledeptid = "", salegroupid = ViewBag.userGroupId, iseid = "0", inneruserid = ViewBag.inneruserid, currentRight = WX.CRM.WebHelper.InitRights.CONST_微信推广资源统计 })</li>*@
|
|
<li>@Html.Action("UserSSOComBox", "Control", new { currentRight = WX.CRM.WebHelper.InitRights.CONST_微信推广资源统计 })</li>
|
|
<li>资源类型:@Html.DropDownList("slt_restype", new List<SelectListItem>() { new SelectListItem() { Text = "全部", Value = "", Selected = true }, new SelectListItem() { Text = "推广资源", Value = "1" }, new SelectListItem() { Text = "线下资源", Value = "0" }, new SelectListItem() { Text = "诊股资源", Value = "2" }, new SelectListItem() { Text = "未知资源", Value = "-1" } })</li>
|
|
<li>
|
|
在离职:
|
|
@if (ViewBag.DeptCode == "TDOEM1")
|
|
{
|
|
@Html.DropDownList("slt_isdismiss", new List<SelectListItem>() { new SelectListItem() { Text = "全部", Value = "" }, new SelectListItem() { Text = "在职", Value = "在职", Selected = true }, new SelectListItem() { Text = "离职", Value = "离职" } })
|
|
}
|
|
else
|
|
{
|
|
@Html.DropDownList("slt_isdismiss", new List<SelectListItem>() { new SelectListItem() { Text = "全部", Value = "", Selected = true }, new SelectListItem() { Text = "在职", Value = "在职" }, new SelectListItem() { Text = "离职", Value = "离职" } })
|
|
}
|
|
</li>
|
|
<li><span style="color:red">区间成交时间:</span><input type="text" id="txt_cjTime1" name="txt_cjTime1" value=@(new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).ToString("yyyy-MM-dd")) onclick="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" style="width: 100px;" />-@Html.WdatePickerText("txt_cjTime2", new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddMonths(1).AddDays(-1).ToString("yyyy-MM-dd"))</li>
|
|
<li style="display: none"><input type="checkbox" id="curmonth" name="curmonth" />当月成交</li>
|
|
</ul>
|
|
</div>
|
|
@Html.Raw(ViewBag.RptList)
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
//var ofix1 = null;
|
|
$(function () {
|
|
$(window).resize(function () {
|
|
$('#tablist').tablegrid('resize', {
|
|
height: $(window).height() - 110
|
|
});
|
|
//if(ofix1 != null)
|
|
// ofix1.resize();
|
|
});
|
|
//$("#tablist").tablegrid({
|
|
// url: '/weixin/WxResourceReport/index',
|
|
// height: $(window).height() - 110,
|
|
// loadNow: true,
|
|
// data: GetControlValue()
|
|
//});
|
|
$("#btnQuery").click(function () {
|
|
//$('#tablist').tablegrid("Search");
|
|
LoadData();
|
|
});
|
|
$("#btnExport").click(function () {
|
|
BtnExportAll_Click();
|
|
});
|
|
$("#btnYestoDay").click(function () {
|
|
var day0 = dateRangeUtil.getPreviousDay()[0].Format("yyyy-MM-dd");
|
|
var day1 = dateRangeUtil.getPreviousDay()[1].Format("yyyy-MM-dd");
|
|
$("#txt_sTime").val(day0);
|
|
$("#txt_eTime").val(day1);
|
|
$("#btnQuery").click();
|
|
});
|
|
$("#btnWeek").click(function () {
|
|
var week0 = dateRangeUtil.getCurrentWeek()[0].Format("yyyy-MM-dd");
|
|
var week1 = dateRangeUtil.getCurrentWeek()[1].Format("yyyy-MM-dd");
|
|
$("#txt_sTime").val(week0);
|
|
$("#txt_eTime").val(week1);
|
|
$("#btnQuery").click();
|
|
});
|
|
$("#btnMonth").click(function () {
|
|
var month0 = dateRangeUtil.getCurrentMonth()[0].Format("yyyy-MM-dd");
|
|
var month1 = dateRangeUtil.getCurrentMonth()[1].Format("yyyy-MM-dd");
|
|
$("#txt_sTime").val(month0);
|
|
$("#txt_eTime").val(month1);
|
|
$("#btnQuery").click();
|
|
});
|
|
$("#btnClear").click(function () {
|
|
$("#tablist").tablegrid("toggleData", null, "8,9");
|
|
|
|
});
|
|
var CurTimeAmount = $(".grid_table_head th[field='CurTimeAmount']");
|
|
//console.dir(CurTimeAmount);
|
|
$(CurTimeAmount).css("color","red");
|
|
});
|
|
function onLoadSucced() {
|
|
LoadData();
|
|
}
|
|
function LoadData() {
|
|
$("#tablist").tablegrid({
|
|
url: '/weixin/WxResourceReport/index',
|
|
height: $(window).height() - 110,
|
|
loadNow: true,
|
|
data: GetControlValue(),
|
|
onLoadSuccess: function (data) {
|
|
//if (ofix1 == null) {
|
|
// ofix1 = new oFixedTable('ofix1', document.getElementById('tablist'), {});
|
|
//} else {
|
|
// ofix1.resize();
|
|
//}
|
|
}
|
|
});
|
|
}
|
|
function GetControlValue() {
|
|
return {
|
|
//saleDeptId: $("#nb1_uc_org_depts").val()
|
|
//, groupId: $("#nb1_uc_org_groups").val()
|
|
//, userId: $("#nb1_uc_org_ids").val()
|
|
//,
|
|
curmonth: $('#curmonth').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() {
|
|
$("#modalwindow").html(GetIframeHtml("/Control/ExcelExport?Query=" + encodeURIComponent("/weixin/WxResourceReport/Export?" + GetQueryStr() + "&curmonth=" + $('#curmonth').prop('checked') + "&SltValueStaus=" + $("#SltValueStaus").val() + "&SltDismStatus=" + $("#SltDismStatus").val() + "&status=" + $("#SltMonStatus").val() + "&SltMonDate=" + $('#SltMonDate').val() + "&groupId=" + $("#nb1_uc_org_groups").val() + "&userId=" + $("#nb1_uc_org_ids").val() + "&winrand=" + Math.random())));
|
|
$("#modalwindow").window({ title: '导出', width: 480, height: 300, iconCls: 'icon-export' }).window('open');
|
|
}
|
|
</script> |