101 lines
3.8 KiB
Plaintext
101 lines
3.8 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.ToolButton("btnExport", "icon-export", "导出", false)
|
|
</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>@Html.Action("UserComBox", "Control", new { type = "OnlyGroup" })</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.WdatePickerText("txt_KtBeginTime", string.Empty)-@Html.WdatePickerText("txt_KtEndTime", string.Empty)</li>*@
|
|
</ul>
|
|
</div>
|
|
<div id="tab"></div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
|
|
$("#btnQuery").click(function () {
|
|
var sTime = $("#txt_STime").val();
|
|
var eTime = $("#txt_ETime").val();
|
|
if (sTime == "") {
|
|
alert("结算开始时间不能为空!");
|
|
return;
|
|
}
|
|
if (eTime == "") {
|
|
alert("结算结束时间不能为空!");
|
|
return;
|
|
}
|
|
load();
|
|
});
|
|
|
|
$("#btnExport").click(function () {
|
|
|
|
var saleDeptId = $("#nb1_uc_org_depts").val();
|
|
var groupId = $("#nb1_uc_org_groups").val();
|
|
var userId = $("#nb1_uc_org_ids").val();
|
|
|
|
var query = GetQueryStr();
|
|
if (query == "") {
|
|
query = "saleDeptId=" + saleDeptId + "&groupId=" + groupId + "&userId=" + userId;
|
|
}
|
|
else {
|
|
query = query + "&saleDeptId=" + saleDeptId + "&groupId=" + groupId + "&userId=" + userId;
|
|
}
|
|
|
|
window.open("/weiXin/CommissionGroup/Export?" + query);
|
|
});
|
|
});
|
|
|
|
function load() {
|
|
debugger
|
|
var para = GetParams();
|
|
var saleDeptId = $("#txt_deptId").val();
|
|
var groupId = $("#txt_groupIds").val();
|
|
var userId = $("#txt_userId").val();
|
|
|
|
para["saleDeptId"] = saleDeptId;
|
|
para["groupId"] = groupId;
|
|
para["userId"] = userId;
|
|
|
|
$.r_post("/weiXin/CommissionGroup/SaleGroupReportHtml", para, function (res) {
|
|
$("#tab").html(res.rowsList);
|
|
$("#tablist tbody").append(res.foot);
|
|
$("#tablist tbody tr").on('click', function () {
|
|
$("#tablist tbody tr").removeClass("tr_onclick");
|
|
$(this).addClass("tr_onclick");
|
|
});
|
|
});
|
|
}
|
|
|
|
function onLoadSucced() {
|
|
load();
|
|
}
|
|
function frameReturnByClose() {
|
|
$("#modalwindow").window('close');
|
|
}
|
|
|
|
function frameReturnByReload(flag) {
|
|
load();
|
|
}
|
|
|
|
function frameReturnByMes(mes) {
|
|
$.messageBox5s('提示', mes);
|
|
}
|
|
function GetIframeHtml(src) {
|
|
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0' src='" + src + "'></iframe>";
|
|
}
|
|
|
|
|
|
</script>
|