94 lines
3.4 KiB
Plaintext
94 lines
3.4 KiB
Plaintext
@model WX.CRM.Model.Entity.BAS_RIGHTGROUP
|
|
@using WX.CRM.WebHelper;
|
|
@{
|
|
ViewBag.Title = "创建bas_rightGroup";
|
|
Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
|
|
|
|
}
|
|
@section scripts{
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$("#map_PARENTID").attr("data-val-noinput-input", "@(Request.QueryString["notId"] == null ? "[-1]" : Request.QueryString["notId"])");
|
|
})
|
|
</script>
|
|
}
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$("#btnSave").click(function () {
|
|
if ($("#CreateForm").valid()) {
|
|
$(".combo").css("display", "");
|
|
if (!$("#map_PARENTID").valid())
|
|
return;
|
|
$.r_ajax({
|
|
url: "/Base/RightGroup/Edit",
|
|
type: "Post",
|
|
data: $("#CreateForm").serialize(),
|
|
dataType: "json",
|
|
loading: true,
|
|
success: function (data) {
|
|
if (data.type == 1) {
|
|
window.parent.frameReturnByMes(data.message);
|
|
window.parent.frameReturnByReload('@Model.PARENTID');
|
|
window.parent.frameReturnByClose()
|
|
}
|
|
else {
|
|
window.parent.frameReturnByMes(data.message);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
return false;
|
|
});
|
|
$('#comboTree').combotree({
|
|
url:"/Base/RightGroup/GetAllGroupTree",
|
|
required: true,
|
|
heiht: "400",
|
|
onSelect: function (node) {
|
|
$("#map_PARENTID").attr("value", node.id);
|
|
if (!$("#map_PARENTID").valid()) {
|
|
$(".combo").addClass("input-validation-error");
|
|
$(".combo-text").addClass("input-validation-error");
|
|
} else {
|
|
$(".combo").removeClass("input-validation-error");
|
|
$(".combo-text").removeClass("input-validation-error");
|
|
}
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<div class="mvctool bgb">
|
|
@Html.ToolButtonPlain("btnSave", "icon-save", "保存", false, "")
|
|
</div>
|
|
@using (Html.BeginForm("Edit", "RightGroup", null, FormMethod.Post, new { Id = "CreateForm" }))
|
|
{
|
|
@Html.ValidationSummary(true)
|
|
<table class="fromEditTable setTextWidth300">
|
|
<tbody>
|
|
<tr>
|
|
<td width="60px" style="width:100px;">
|
|
@Html.LabelFor(m => m.map_PARENTID)
|
|
</td>
|
|
<td style="width:310px">
|
|
@Html.TextBoxFor(m => m.map_PARENTID, new { style = "width:305px;display:none;" })
|
|
<input id="comboTree" style="width: 305px;" value="@Model.map_PARENTID" />
|
|
</td>
|
|
<td width="120px">
|
|
@Html.ValidationMessageFor(m => m.map_PARENTID)
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="60px" style="width:100px;">
|
|
@Html.LabelFor(m => m.map_NAME)
|
|
</td>
|
|
<td style="width:310px">
|
|
@Html.TextBoxFor(m => m.map_NAME)
|
|
@Html.HiddenFor(m => m.PKID)
|
|
</td>
|
|
<td width="120px">
|
|
@Html.ValidationMessageFor(m => m.map_NAME)
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
} |