143 lines
6.0 KiB
Plaintext
143 lines
6.0 KiB
Plaintext
@using WX.CRM.WebHelper
|
|
|
|
@{
|
|
ViewBag.Title = "员工业绩汇总查询(实时)";
|
|
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
|
|
DateTime maxMonthlyDate = DateTime.ParseExact(ViewBag.maxMonthlyDate + "01", "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture, System.Globalization.DateTimeStyles.None);
|
|
if (DateTime.Now.Day > 10)
|
|
{
|
|
maxMonthlyDate = maxMonthlyDate.AddMonths(1);
|
|
}
|
|
}
|
|
<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 { controlName = "nb1", onLoadSucced = "onLoadSucced()", roleCodes = ViewBag.roleCodes, saledeptid = "", salegroupid = ViewBag.userGroupId, iseid = "0", inneruserid = ViewBag.inneruserid })</li>
|
|
<li>经纪人工号:<input type="text" name="txt_SaleEid" /></li>
|
|
<li>
|
|
在离职:@Html.DropDownList("slt_isDismiss", new List<SelectListItem>() {
|
|
new SelectListItem(){ Text="全部",Value="-1",Selected=true},
|
|
new SelectListItem(){ Text="在职",Value="0"},
|
|
new SelectListItem(){ Text="离职",Value="1"},
|
|
}, new { width="60px"})
|
|
</li>
|
|
@*<li>
|
|
月份:@Html.DropDownList("txt_SltYearMonth", new WX.CRM.WEB.Handler.ControlResource().GetMonthByUserPerformanct())
|
|
</li>*@
|
|
<li>
|
|
<input id="btnPre" type="button" name="btnPre" value="前一日" />
|
|
</li>
|
|
<li>最后计算时间:@Html.Label("lbInitDatetime", new { id = "lbInitDatetime" })</li>
|
|
<li id="advandli" style="display:none;">
|
|
交易时间:
|
|
<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', minDate: '@maxMonthlyDate' })" 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>
|
|
<input id="txt_SearchType" name="txt_SearchType" type="hidden" value="0" />
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
@Html.Raw(ViewBag.GroupList)
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$("#DivBusinessType").attr("style", "display:none;");
|
|
|
|
$('#tablist').tablegrid({
|
|
url: '/QH/UserPerformanceQuery/GetHtmlList',
|
|
height: $(window).height() - 130,
|
|
loadNow: false,
|
|
isPage: false,
|
|
data: GetControlValue,
|
|
onLoadSuccess: function (data) {
|
|
$("#lbInitDatetime").text(data.initTime);
|
|
}
|
|
});
|
|
function GetControlValue() {
|
|
return { saleDeptId: $("#nb1_uc_org_depts").val(), groupId: $("#nb1_uc_org_groups").val(), userId: $("#nb1_uc_org_ids").val()};
|
|
}
|
|
$("#btnQuery").click(function () {
|
|
if ($("#txt_SltYearMonth").attr("disabled") != "disabled")
|
|
$("#txt_SearchType").val(0);
|
|
$('#tablist').tablegrid("Search");
|
|
});
|
|
$("#btnPre").click(function () {
|
|
var $stime = $("#txt_STime");
|
|
$stime.val('@DateTime.Now.AddDays(-1).ToShortDateString()');
|
|
$("#txt_SearchType").val(2);
|
|
$('#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 GetIframeHtml(src) {
|
|
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0' src='" + src + "'></iframe>";
|
|
}
|
|
//获取datagrid头部及字段
|
|
function getDataGridHeader() {
|
|
var columns = $('#tablist').tablegrid("getHead");
|
|
return columns;
|
|
}
|
|
function ExportAllPage_Click1() {
|
|
$("#modalwindow").html(GetIframeHtml("/Control/ExcelExport?Query=" + encodeURIComponent("/QH/UserPerformanceQuery/Export?" + GetQueryStr()
|
|
+ "&groupId=" + $("#nb1_uc_org_groups").val()
|
|
+ "&userId=" + $("#nb1_uc_org_ids").val())));
|
|
$("#modalwindow").window({ title: '导出', width: 480, height: 300, iconCls: 'icon-export' }).window('open');
|
|
}
|
|
|
|
function initRpt() {
|
|
$.r_ajax({
|
|
url: "/QH/UserPerformanceQuery/InitRpt",
|
|
type: "Post",
|
|
data: { SltYearMonth: $("#txt_SltYearMonth").val() },
|
|
dataType: "json",
|
|
loading: true,
|
|
success: function (data) {
|
|
if (data.result == 1) {
|
|
$('#tablist').tablegrid("Search");
|
|
$.messageBox5s('提示', data.msg);
|
|
}
|
|
else {
|
|
$.messageBox5s('初始化失败:', data.msg);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
function AdvanceSearch() {
|
|
var o = $("#txt_SearchType").val();
|
|
if (o == "0") {
|
|
$("#txt_SearchType").val(1);
|
|
$("#advandli").attr("style", "");
|
|
$("#txt_SltYearMonth").attr("disabled", "disabled");
|
|
$("#btnPre").attr("disabled", "disabled");
|
|
$("#DivBusinessType").attr("style", "");
|
|
} else {
|
|
$("#txt_SearchType").val(0);
|
|
$("#advandli").attr("style", "display:none;");
|
|
$("#txt_SltYearMonth").removeAttr("disabled");
|
|
$("#btnPre").removeAttr("disabled");
|
|
$("#DivBusinessType").attr("style", "display:none;");
|
|
}
|
|
}
|
|
</script>
|