130 lines
6.4 KiB
Plaintext
130 lines
6.4 KiB
Plaintext
@using WX.CRM.WebHelper;
|
|
@{
|
|
ViewBag.Title = "我的分配资源";
|
|
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
|
|
}
|
|
|
|
<div class="mvctool">
|
|
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
|
|
@*@Html.ToolButton("btnExport", "icon-export", "导出", 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 { onLoadSucced = "onLoadSucced()", isShowDismiss = "1", controlName = "nb1", roleCodes = ViewBag.roleCodes, saledeptid = ViewBag.saleDeptId, salegroupid = ViewBag.userGroupId, iseid = "0", inneruserid = "" })*@</li>
|
|
<li> @Html.Action("UserSSOComBox", "Control", new { currentRight = WX.CRM.WebHelper.InitRights.CONST_公共权限 })</li>
|
|
<li>
|
|
资源类型:
|
|
@Html.DropDownList("ResourctType1", null, new { style = "width:200px" })
|
|
<select id="cmbActive1" name="cmbActive1" style="width:200px">
|
|
<option value="">-请选择-</option>
|
|
</select>
|
|
</li>
|
|
<li>分配时间:@Html.WdatePickerText("txt_AllocateTime1", DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"))-@Html.WdatePickerText("txt_AllocateTime2", DateTime.Now.ToString("yyyy-MM-dd"))</li>
|
|
<li>分配人工号:<input type="text" name="txt_diseid" /></li>
|
|
<li>分类:@Html.DropDownList("slt_category", ViewBag.category as IEnumerable<SelectListItem>)</li>
|
|
<li>客户ID:<input type="text" name="txt_resId" style="width:200px" /> </li>
|
|
<li>是否风险客户:@Html.DropDownList("slt_IsFx", new List<SelectListItem>() { new SelectListItem() { Text = "全部", Value = "" }, new SelectListItem() { Text = "是", Value = "1" }, new SelectListItem() { Text = "否", Value = "0" } })</li>
|
|
<li>
|
|
<input id="txt_HidACTIVITYID" name="txt_HidACTIVITYID" type="hidden" value="" />
|
|
<input id="txt_HidResourceId" name="txt_HidResourceId" type="hidden" value="" />
|
|
<input id="txt_HidRESOURCETAG" name="txt_HidRESOURCETAG" type="hidden" value="" />
|
|
</li>
|
|
<li>加好友:@Html.DropDownList("slt_isBound", new List<SelectListItem>() { new SelectListItem() { Text = "全部", Value = "", Selected = true }, new SelectListItem() { Text = "是", Value = "1" }, new SelectListItem() { Text = "否", Value = "0" } })</li>
|
|
<li>
|
|
@{ List<WX.CRM.Model.Entity.BAS_BUSINESSLINES> list = ViewBag.deptList; }
|
|
事业部:
|
|
<select name="slt_deptlineid">
|
|
<option value="">全部</option>
|
|
@foreach (var item in list)
|
|
{
|
|
<option value="@item.BUSINESSID">@item.BUSINESSNAME</option>
|
|
}
|
|
</select>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
@Html.Raw(ViewBag.gridTable)
|
|
</div>
|
|
<script type="text/javascript">
|
|
|
|
$(function () {
|
|
|
|
$("#btnQuery").click(function () {//搜索按钮点击事件
|
|
$("#txt_HidRESOURCETAG").val();
|
|
$("#txt_HidACTIVITYID").val();
|
|
$("#txt_HidResourceId").val();
|
|
$("#txt_HidRESOURCETAG").val($("#cmbActive1 option:selected").attr("retag"));
|
|
$("#txt_HidACTIVITYID").val($("#cmbActive1").val());
|
|
$("#txt_HidResourceId").val($("#ResourctType1").val());
|
|
$('#tablist').tablegrid("Search");
|
|
});
|
|
$(window).resize(function () {//自动适应大小
|
|
$('#tablist').tablegrid('resize', {
|
|
height: $(window).height() - 110
|
|
});
|
|
});
|
|
|
|
$("#ResourctType1").change(function () {
|
|
var selec = $("#ResourctType1").val();
|
|
$("#cmbActive1").get(0).options.length = 0;//清空历史值
|
|
$.getJSON("/Res/Allocate/ActiveList/" + selec, function (data) {
|
|
$("<option>请选择</option>").appendTo($("#cmbActive1"));
|
|
$.each(data, function (i, item) {
|
|
$("<option></option>").val(item["ACTIVITYID"]).text(item["ACTIVITYNAME"]).attr("retag", item["RESOURCETAG"]).appendTo($("#cmbActive1"));
|
|
});
|
|
});
|
|
});
|
|
var para = getQueryString("resourcetype");
|
|
if (para != null) {
|
|
$("#txt_HidResourceId").val(para);
|
|
$("#ResourctType1").change();
|
|
}
|
|
$('#tablist').tablegrid({
|
|
url: '/Res/Allocate/GetHtmlList',
|
|
height: $(window).height() - 110,
|
|
loadNow: false,
|
|
data: GetControlValue
|
|
});
|
|
function GetControlValue() {
|
|
return { saleDeptId: $("#nb1_uc_org_depts").val(), groupId: $("#nb1_uc_org_groups").val(), userId: $("#nb1_uc_org_ids").val() };
|
|
}
|
|
|
|
$("#btnExport").click(function () {
|
|
Export_Click();
|
|
});
|
|
|
|
//setInterval(function () {
|
|
// document.getElementById("btnQuery").click()
|
|
//}, 5 * 60 * 1000)
|
|
});
|
|
function onLoadSucced() {
|
|
$('#tablist').tablegrid("Search");
|
|
}
|
|
function frameReturnByReload(flag) {
|
|
$("#tablist").tablegrid("Load");
|
|
}
|
|
</script>
|
|
@*ToolBar事件处理*@
|
|
<script type="text/javascript">
|
|
function GetIframeHtml(src) {
|
|
return "<iframe width='100%' height='98%' scrolling='no' frameborder='0'' src='" + src + "'></iframe>";
|
|
}
|
|
//获取datagrid头部及字段
|
|
function getDataGridHeader() {
|
|
var columns = $('#tablist').tablegrid("getAllHead");
|
|
return columns;
|
|
}
|
|
//导出数据
|
|
function Export_Click() {
|
|
//if ($('#ResourctType1').val() == 0 || $('#cmbActive1').val() == 0) {
|
|
// $.messager.alert("警告", "请选择资源类型", "error");
|
|
// return;
|
|
//}
|
|
window.open("/Res/Allocate/Export?" + GetQueryStr() + "&saleDeptId=" + $("#nb1_uc_org_depts").val() + "&groupId=" + $("#nb1_uc_org_groups").val() + "&userId=" + $("#nb1_uc_org_ids").val() + "&Ieguid=" + GetGuid());
|
|
//$("#modalwindow").html(GetIframeHtml("/Control/ExcelExport?Query=" + encodeURIComponent("/Res/Allocate/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');
|
|
}
|
|
</script>
|