103 lines
4.2 KiB
Plaintext
103 lines
4.2 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)
|
|
</div>
|
|
|
|
<div class="bas_datagrid">
|
|
<div id="tb" style="padding:5px;height:auto" class="grid_toolbar">
|
|
<ul class="toolBar_ul">
|
|
<li>
|
|
时间:@Html.WdatePickerText("txt_STime", DateTime.Now.AddDays(-20).ToString("yyyy-MM-dd"))
|
|
-@Html.WdatePickerText("txt_ETime", DateTime.Now.ToString("yyyy-MM-dd"))
|
|
</li>
|
|
<li>
|
|
资源类型:@Html.DropDownList("slt_ResourctType", null, new { style = "width:200px" })
|
|
<select id="cmbActive1" name="cmbActive1" style="width: 200px">
|
|
<option value="0">-请选择-</option>
|
|
</select>
|
|
</li>
|
|
<li>@Html.Action("UserSSOComBox", "Control", new { currentRight = WX.CRM.WebHelper.InitRights.CONST_资源效果分析 })</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>*@
|
|
</ul>
|
|
</div>
|
|
@Html.Raw(ViewBag.GroupList)
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
getDate();
|
|
function getDate() {
|
|
var _date, $stime, $etime;
|
|
_date = CRM_Comon().GetDate();
|
|
$stime = $("#txt_STime");
|
|
$etime = $("#txt_ETime");
|
|
if ($stime.val() == "") {
|
|
$stime.val(_date.getFistDate({ MinDate: false }));
|
|
} if ($etime.val() == "") {
|
|
$etime.val(_date.getLastDate({ MaxDate: false }));
|
|
}
|
|
}
|
|
|
|
$('#tablist').tablegrid({
|
|
url: '/Res/ResourceEffectAnalysis/GetHtmlList',
|
|
height: $(window).height() - 130,
|
|
loadNow: false,
|
|
isPage: false,
|
|
data: GetControlValue
|
|
});
|
|
function GetControlValue() {
|
|
return { activityId: $("#cmbActive1").val(), saleDeptId: $("#nb1_uc_org_depts").val(), groupId: $("#nb1_uc_org_groups").val(), userId: $("#nb1_uc_org_ids").val() };
|
|
}
|
|
|
|
$("#btnQuery").click(function () {
|
|
$('#tablist').tablegrid("Search");
|
|
});
|
|
});
|
|
|
|
$("#slt_ResourctType").change(function () {
|
|
var selec = $("#slt_ResourctType").val();
|
|
$("#cmbActive1").get(0).options.length = 0;//清空历史值
|
|
$("<option></option>").val("0").text("-所有-").attr("retag", "0").appendTo($("#cmbActive1"));
|
|
$.getJSON("/Res/ResourceEffectAnalysis/ActiveList/" + selec, function (data) {
|
|
$.each(data, function (i, item) {
|
|
$("<option></option>").val(item["ACTIVITYID"]).text(item["ACTIVITYNAME"]).attr("retag", item["RESOURCETAG"]).appendTo($("#cmbActive1"));
|
|
});
|
|
});
|
|
});
|
|
|
|
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("/Res/ResourceEffectAnalysis/Export?" + GetQueryStr() + "&activityId=" + $("#cmbActive1").val() + "&groupId=" + $("#nb1_uc_org_groups").val() + "&userId=" + $("#nb1_uc_org_ids").val())));
|
|
$("#modalwindow").window({ title: '导出', width: 480, height: 300, iconCls: 'icon-export' }).window('open');
|
|
}
|
|
</script>
|
|
|
|
|