54 lines
2.3 KiB
HTML
54 lines
2.3 KiB
HTML
<div class="easyui-layout" style="width:100%;height:100%">
|
|
<div id='southdiv' data-options="region:'south'" style="width:100%;height:50px;padding:5px">
|
|
<div style="text-align:center;padding:2px">
|
|
<a id="submitb" class="easyui-linkbutton" iconCls="fa-floppy-o" onclick="submitform()">保存</a>
|
|
<a class="easyui-linkbutton" iconCls="fa-close" onclick="javascript:$('#dd').dialog('close')">取消</a>
|
|
</div>
|
|
</div>
|
|
<div data-options="region:'center'" style="width:100%;height:100%;padding:5px 15px;">
|
|
<form method="post" id="tmflff">
|
|
<div style="margin-bottom:10px">
|
|
<input id="name" name="name" style="width:90%;height:40px"
|
|
data-options="label:'法律法规分类名',multiline:true,required:true" class="easyui-textbox"></input>
|
|
</div>
|
|
<div style="margin-bottom:10px">
|
|
<select id="parent" name="parent" style="width:90%" data-options="label:'上级分类'"
|
|
editable="false"></select>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<script>
|
|
$('#parent').combotree({
|
|
url: 'rlt/api/lawstype?a=tree2',
|
|
loadFilter: function (rows) {
|
|
return convert(rows);
|
|
},
|
|
});
|
|
function submitform() {
|
|
$.ajax({
|
|
type: "POST",
|
|
url: 'rlt/api/lawstype?a=add',
|
|
data: JSON.stringify($('#tmflff').serializeJSON()),
|
|
datatype: "json",
|
|
processData: false,
|
|
contentType: "application/json;charset=utf-8",
|
|
beforeSend: function () {
|
|
var bo = $('#tmflff').form('validate')
|
|
if (bo == false) {
|
|
return bo
|
|
} else {
|
|
$('#submitb').linkbutton('disable');
|
|
}
|
|
},
|
|
success: function (data) {
|
|
if (data.code == 1) {
|
|
$("#mrfltree").tree('reload');
|
|
$("#zjfltree").tree('reload');
|
|
$("#dd").dialog("close");
|
|
} else { $.messager.alert('提示', '失败,该选项不可编辑!'); }
|
|
$('#submitb').linkbutton('enable');
|
|
},
|
|
});
|
|
}
|
|
</script>
|
|
</div> |