66 lines
2.0 KiB
Plaintext
66 lines
2.0 KiB
Plaintext
@model AssetUnitGroup
|
|
@{
|
|
ViewBag.Title = "簿记账户组 | 编辑";
|
|
Layout = "~/Views/Shared/_InfoLayout.cshtml";
|
|
}
|
|
@section CSS{
|
|
|
|
}
|
|
@section JS{
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$(".form-group").removeClass("col-md-6");
|
|
});
|
|
|
|
function checkSubmitData() {
|
|
var pass = $('#assetunitgroupEditForm').valid();
|
|
return pass;
|
|
}
|
|
|
|
function saveassetunitgroup() {
|
|
if (!checkSubmitData()) return false;
|
|
|
|
var data = $("#assetunitgroupEditForm").serialize();
|
|
var ajaxopt = {
|
|
type: "Post",
|
|
url: "/assetunit/assetunitgroupEditJson",
|
|
data: data,
|
|
dataType: "json",
|
|
success: function (data) {
|
|
if (data.success) {
|
|
window.parent.showmiddlemessage("保存成功");
|
|
try {
|
|
window.parent.reloadassetunitgroup();
|
|
closeWindow();
|
|
|
|
} catch (e) { }
|
|
}
|
|
else {
|
|
alert(data.msg);
|
|
}
|
|
},
|
|
error: function (msg) {
|
|
alert("error:" + msg);
|
|
}
|
|
}
|
|
main.ajax(ajaxopt);
|
|
}
|
|
|
|
function closeWindow() {
|
|
try { window.parent.layer.closeAll(); } catch (e) { }
|
|
}
|
|
</script>
|
|
}
|
|
|
|
@using (Html.BeginForm("assetunitgroupEdit", "assetunitgroup", FormMethod.Post, new { id = "assetunitgroupEditForm", autocomplete = "off",onkeydown="if(event.keyCode==13){return false;}" }))
|
|
{
|
|
<div class="yc-panel">
|
|
<input type="hidden" value="@Model.id" name="id" id="id" />
|
|
@Html.HiddenFor(model => model.EncryptId)
|
|
@Html.MyTextFor(model => model.Name, true)
|
|
</div>
|
|
<div class="form-buttons">
|
|
@MyControls.Btn("保存", "saveassetunitgroup()")
|
|
@MyControls.Btn("关闭", "layer.closeMe()")
|
|
</div>
|
|
} |