Mini.Crm/Mini.Web/Areas/Admin/Views/Menu/LeftMenuEdit.cshtml

150 lines
5.2 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@model Air.Model.AirAdminViewModel.Bas_LeftMemuModel
@using Mini.Web.WebHelper;
@{
ViewBag.Title = "创建bas_leftMemu";
Layout = "~/Areas/Admin/Views/Shared/_Index_LayoutEdit.cshtml";
}
@section scripts{
<script type="text/javascript">
$(function () {
$("#ParentId").attr("data-val-noinput-input", "@(ViewBag.notId as string == "" ? "[0]" : ViewBag.notId as string)");
})
</script>
}
<script type="text/javascript">
$(function () {
$("#btnSave").click(function () {
if ($("#CreateForm").valid()) {
$(".combo").css("display", "");
if (!$("#ParentId").valid())
return;
$.r_ajax({
url: "LeftMenuEdit",
type: "Post",
data: $("#CreateForm").serialize(),
dataType: "json",
loading: true,
success: function (data) {
if (data.type == 1) {
window.parent.frameReturnByMes(data.message);
window.parent.frameReturnByReload(true);
window.parent.frameReturnByClose()
}
else {
window.parent.frameReturnByMes(data.message);
}
}
});
}
return false;
});
$('#comboTree').combotree({
url: "GetMenuTreeJson",
onSelect: function (node) {
$("#ModuleMenuId").val(node.moduleMenuId);
$("#ParentId").attr("value", node.id);
if (!$("#ParentId").valid()) {
$("#tdParent .combo").addClass("input-validation-error");
$("#tdParent .combo-text").addClass("input-validation-error");
} else {
$("#tdParent .combo").removeClass("input-validation-error");
$("#tdParent .combo-text").removeClass("input-validation-error");
}
}
});
$('#RightId').combotree({
url: "../RightGroup/GetRightTreeList"
});
});
</script>
<div class="mvctool bgb">
@Html.ToolButtonPlain("btnSave", "icon-save", "保存", false, "")
</div>
<form id="CreateForm">
@Html.ValidationSummary(true)
<table class="fromEditTable setTextWidth300">
<tbody>
<tr>
<td width="60px" style="width:100px;">
父节点:
</td>
<td style="width:310px" id="tdParent">
@Html.TextBoxFor(m => m.ParentId, new { style = "width:305px;display:none;" })
<input id="comboTree" style="width: 305px;" value="@Model.ParentId" />
</td>
<td width="120px">
@Html.ValidationMessageFor(m => m.ParentId)
</td>
</tr>
<tr>
<td width="60px" style="width:100px;">
菜单名称:
</td>
<td style="width:310px">
@Html.TextBoxFor(m => m.MName)
@Html.HiddenFor(m => m.MenuId)
@Html.HiddenFor(m => m.ModuleMenuId)
</td>
<td width="120px">
@Html.ValidationMessageFor(m => m.MName)
</td>
</tr>
<tr>
<td width="60px" style="width:100px;">
菜单URL
</td>
<td style="width:310px">
@Html.TextBoxFor(m => m.Url)
</td>
<td width="120px">
@Html.ValidationMessageFor(m => m.Url)
</td>
</tr>
<tr>
<td width="60px" style="width:100px;">
是否组:
</td>
<td style="width:310px">
@Html.RadioButtonFor(m => m.IsGroup, 1)
@Html.RadioButtonFor(m => m.IsGroup, 0)
</td>
<td width="120px">
@Html.ValidationMessageFor(m => m.IsGroup)
</td>
</tr>
<tr>
<td width="60px" style="width:100px;">
是否显示:
</td>
<td style="width:310px">
@Html.RadioButtonFor(m => m.IsShow, 1)
@Html.RadioButtonFor(m => m.IsShow, 0)
</td>
<td width="120px">
@Html.ValidationMessageFor(m => m.IsShow)
</td>
</tr>
<tr>
<td width="60px" style="width:100px;">
对应权限:
</td>
<td style="width:310px">
@Html.TextBoxFor(m => m.RightId, new { style = "width:305px;" })
</td>
<td width="120px">
@Html.ValidationMessageFor(m => m.RightId)
</td>
</tr>
</tbody>
</table>
</form>