59 lines
2.6 KiB
HTML
59 lines
2.6 KiB
HTML
<div class="easyui-layout" style="width:100%;height:100%;">
|
|
<div id='southdiv' data-options="region:'south'" style="height:50px;text-align:center;padding:5px">
|
|
<a href="javascript:void(0)" iconCls="fa-check" class="easyui-linkbutton" onclick="spjdsubmitForm()" id="submitb">保存</a>
|
|
</div>
|
|
<div data-options="region:'center'" style="height:100%;padding:15px 15px;">
|
|
<form id="spjdff" method="post" name="spjdff" enctype="multipart/form-data">
|
|
<div style="margin-top:10px;margin-bottom:5px">
|
|
<input id="jdmc" class="easyui-textbox" name="jdmc" style="width:480px;" data-options="label:'节点名称',multiline:true"
|
|
required=true />
|
|
</div>
|
|
<div style="margin-bottom:5px">
|
|
<input id="spbm" class="easyui-combotree" name="spbm" style="width:480px;" editable="false" data-options="label:'审批部门'"
|
|
required=true />
|
|
</div>
|
|
<div style="margin-bottom:5px">
|
|
<input id="spr" class="easyui-combobox" name="spr" style="width:480px;" editable="false" data-options="label:'审批人',multiple:true"
|
|
required=true />
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$('#spbm').combotree({ url: 'parthandle?a=tree', loadFilter: function(rows){
|
|
return convert(rows);
|
|
},onSelect: function (node) { $('#spr').combobox({
|
|
url: 'getuser?partid=' + node.id + '&a=combobox',
|
|
}); } });
|
|
function spjdsubmitForm() {
|
|
var spjddata = $('#spjdff').serializeJSON();
|
|
spjddata['spr'] = $('#spr').combobox('getValues')
|
|
console.log(spjddata)
|
|
spjddata['zylx'] = $('#zylxlist').datalist('getSelected').value
|
|
$.ajax({
|
|
type: "POST",
|
|
url: 'api/operationspjd?a=add',
|
|
data: JSON.stringify(spjddata),
|
|
datatype: "json",
|
|
processData: false,
|
|
contentType: "application/json;charset=utf-8",
|
|
beforeSend: function () {
|
|
var bo = $('#spjdff').form('validate')
|
|
if (bo == false) {
|
|
return bo
|
|
} else {
|
|
$('#submitb').linkbutton('disable');
|
|
}
|
|
},
|
|
success: function (data) {
|
|
if (data.code == 1) {
|
|
$('#spjdtable').datagrid('reload');
|
|
$("#dd").dialog("close");
|
|
} else { $.messager.alert('提示', '失败!'); }
|
|
$('#submitb').linkbutton('enable');
|
|
},
|
|
});
|
|
}
|
|
|
|
|
|
</script> |