79 lines
3.3 KiB
Plaintext
79 lines
3.3 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>类型:<select id="slt_type" name="slt_type"><option value="1">共享给我的客户</option><option value="2">我共享的客户</option></select></li>
|
||
@*<li>@Html.Action("UserComBoxByRole", "Control", new { onLoadSucced = "onLoadSucced()", 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>客户ID:<input type="text" id="txt_resId" name="txt_resId" style="width:180px" /> </li>
|
||
</ul>
|
||
</div>
|
||
@Html.Raw(ViewBag.List)
|
||
</div>
|
||
<script type="text/javascript">
|
||
$(function () {
|
||
$('#tablist').tablegrid({
|
||
url: '/Res/SharedCustomer/Index',
|
||
height: $(window).height() - 110,
|
||
loadNow: false,
|
||
data: GetControlValue
|
||
});
|
||
$("#btnQuery").click(function () {//搜索按钮点击事件
|
||
var resid = $("#txt_resId").val();
|
||
$("#txt_resId").val($.trim(resid));//去除两边空格
|
||
$('#tablist').tablegrid("Search");
|
||
});
|
||
$(window).resize(function () {//自动适应大小
|
||
$('#tablist').tablegrid('resize', {
|
||
height: $(window).height() - 110
|
||
});
|
||
});
|
||
});
|
||
function GetControlValue() {
|
||
return { saleDeptId: $("#nb1_uc_org_depts").val(), groupId: $("#nb1_uc_org_groups").val(), userId: $("#nb1_uc_org_ids").val() };
|
||
}
|
||
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>";
|
||
}
|
||
function Create_Click() {
|
||
$("#modalwindow").html(GetIframeHtml("/Res/SharedCustomer/Create"));
|
||
$("#modalwindow").window({ title: '新增', width: 400, height: 300, iconCls: 'icon-add' }).window('open');
|
||
}
|
||
function Delete_Click() {
|
||
var row = $('#tablist').tablegrid('getSelected');
|
||
if (row != null) {
|
||
$.messager.confirm('提示', '@Suggestion.YouWantToDeleteTheSelectedRecords', function (r) {
|
||
if (r) {
|
||
$.r_post("/Res/SharedCustomer/Delete?resid=" + row.RESID, function (data) {
|
||
if (data.type == 1) {
|
||
$("#tablist").tablegrid('Load');
|
||
}
|
||
$.messageBox5s('提示', data.message);
|
||
}, "json");
|
||
}
|
||
});
|
||
} else { $.messageBox5s('提示', '@Suggestion.PlaseChooseToOperatingRecords'); }
|
||
}
|
||
</script>
|