117 lines
4.8 KiB
Plaintext
117 lines
4.8 KiB
Plaintext
@using WX.CRM.WebHelper
|
|
@{
|
|
ViewBag.Title = "bas_salesDepartment";
|
|
Layout = "~/Views/Shared/_Index_Layout2.cshtml";
|
|
}
|
|
|
|
<div class="mvctool">
|
|
@Html.ToolButton("btnQuery", "icon-search", "查询", true)
|
|
@Html.ToolButton("btnExport", "icon-export", "导出", "ExportAll_Click", true)
|
|
</div>
|
|
|
|
<div class="bas_datagrid">
|
|
<div id="tb" style="padding:5px;height:auto" class="grid_toolbar">
|
|
<ul class="toolBar_ul">
|
|
<li>销售组<input type="text" name="innerGroupId" id="innerGroupId" style="width:160px;" /><input type="hidden" name="txt_innerGroupId" id="txt_innerGroupId" value="" /> </li>
|
|
<li>工号:<input type="text" name="txt_eID" /> </li>
|
|
|
|
<li>
|
|
扩展类型:@Html.DropDownList("slt_extendType", new List<SelectListItem>() {
|
|
new SelectListItem(){ Text="全部",Value=""},
|
|
new SelectListItem(){ Text="客服经理",Value="1"},
|
|
new SelectListItem(){ Text="客服",Value="2"},
|
|
new SelectListItem(){ Text="高级客服",Value="3"},
|
|
new SelectListItem(){ Text="员工离职",Value="4"},
|
|
new SelectListItem(){ Text="客服状态",Value="5"}
|
|
})
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
@Html.Raw(ViewBag.gridTable)
|
|
</div>
|
|
<script type="text/javascript">
|
|
function GetGroups() {
|
|
var node = $("#innerGroupId").combotree("tree").tree('getSelected');
|
|
var tree = $("#innerGroupId").tree;
|
|
var isLeaf = tree('isLeaf', node.target);
|
|
var gorupidvalues = "";
|
|
if (node.id.toString().indexOf("com_") == -1 && node.id.toString().indexOf("sale_") == -1)
|
|
gorupidvalues = node.id.toString() + ",";
|
|
if (!isLeaf) {//不是最底层
|
|
var child = $("#innerGroupId").combotree("tree").tree("getChildren", node.target);
|
|
if (node.id != 0 && child != null) {
|
|
for (var i = 0; i < child.length; i++) {
|
|
if (child[i].id.toString().indexOf("com_") == -1 && child[i].id.toString().indexOf("sale_") == -1)
|
|
gorupidvalues += child[i].id + ","
|
|
}
|
|
}
|
|
}
|
|
|
|
if (gorupidvalues.length > 0)
|
|
return gorupidvalues.substr(0, gorupidvalues.length - 1);
|
|
else
|
|
return "-1";
|
|
}
|
|
|
|
$(function () {
|
|
$("#innerGroupId").combotree({
|
|
url: "/Base/InnerGroup/GetTreeList?type=1",
|
|
onSelect: function (node) {
|
|
var groups = GetGroups();
|
|
$("#txt_innerGroupId").val(groups);//获取组
|
|
if (node.id.toString().indexOf("sale_") == -1 && node.id.toString().indexOf("com_") == -1 && node.attributes != null) {
|
|
$("#innerDept").combotree("setValues", [node.attributes])
|
|
} else if (!(node.id.toString().indexOf("sale_") == -1 && node.id.toString().indexOf("com_") == -1)) {
|
|
|
|
//$('#txt_innerGroupId').combotree('clear');
|
|
}
|
|
}
|
|
});
|
|
|
|
$('#tablist').tablegrid({
|
|
url: '/Base/InnerUserExtLog/GetHtmlList',
|
|
height: $(window).height() - 110,
|
|
loadNow: true,
|
|
isPage: true
|
|
});
|
|
$("#btnQuery").click(function () {//搜索按钮点击事件
|
|
$('#tablist').tablegrid("Search");
|
|
});
|
|
$(window).resize(function () {//自动适应大小
|
|
$('#tablist').tablegrid('resize', {
|
|
height: $(window).height() - 110
|
|
});
|
|
});
|
|
});
|
|
function frameReturnByClose() {
|
|
$("#modalwindow").window('close');
|
|
}
|
|
function frameReturnByReload(flag) {
|
|
$("#tablist").tablegrid("Load");
|
|
}
|
|
function frameReturnByMes(mes) {
|
|
$.messageBox5s('提示', mes);
|
|
}
|
|
function getPageOptions(gridID) {
|
|
var option = $("#tablist").tablepage('getPagination');
|
|
var str = "rows=" + option.rows + "&page=" + option.page + "&order=" + option.order + "&sort=" + option.sort;
|
|
return str;
|
|
}
|
|
//获取datagrid头部及字段
|
|
function getDataGridHeader() {
|
|
var columns = $('#tablist').tablegrid("getHead");
|
|
return columns;
|
|
}
|
|
|
|
</script>
|
|
@*ToolBar事件处理*@
|
|
<script type="text/javascript">
|
|
function GetIframeHtml(src) {
|
|
return "<iframe id='ifymbc' width='100%' height='98%' scrolling='no' frameborder='0'' src='" + src + "'></iframe>";
|
|
}
|
|
function ExportAll_Click() {
|
|
$("#modalwindow").html(GetIframeHtml("/Control/ExcelExport?Query=" + encodeURIComponent("/Base/InnerUserExtLog/ExportAll?" + GetQueryStr())));
|
|
$("#modalwindow").window({ title: '导出', width: 480, height: 300, iconCls: 'icon-export' }).window('open');
|
|
}
|
|
|
|
</script> |