safesite/safesite/templates/riskactadd.html

106 lines
5.0 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="fxdsubmitForm()" id="submitb">提交</a>
<a href="javascript:void(0)" iconCls="fa-close" class="easyui-linkbutton" onclick="closeForm()">取消</a>
</div>
<div data-options="region:'center'" style="height:100%;padding:15px 15px;">
<form id="fxdff" method="post" name="fxdff" enctype="multipart/form-data">
<div style="margin-bottom:5px">
<input id="fxdqy" class="easyui-combotree" name="area" style="width:480px" data-options="
label:'风险区域',
url: 'api/area?a=tree',
method: 'get',
editable: false,
loadFilter: function (rows) {
return convert(rows);
},
formatter: function (node) {
var s = node.text;
if (node.children) {
s += '&nbsp;<span style=\'color:blue\'>(' + node.children.length + ')</span>';
}
return s;
},"
>
</div>
<div style="margin-bottom:5px">
<input id="fxdlx" class="easyui-combobox" name="type" style="width:480px" data-options="
label:'类型',
url: 'getdickey?a=combobox&dicclass=53',
method: 'get',
editable: false,"
required=true>
</div>
<div style="margin-top:10px;margin-bottom:5px">
<input id="fxmc" class="easyui-textbox" name="name" style="width:480px" data-options="label:'名称'"
required=true />
</div>
<div style="margin-bottom:5px">
<input id="jtwz" class="easyui-textbox" name="place" style="width:480px" data-options="label:'具体位置'"
/>
</div>
<div style="margin-top:10px;margin-bottom:5px">
<input id="group" class="easyui-combobox" name="group" style="width:480px" data-options="label:'所属岗位',url:'grouphandle?a=combobox'"
required=true editable=false/>
</div>
<div style="margin-top:10px;margin-bottom:5px">
<select id="gkcj" class="easyui-combobox" name="gkcj" style="width:480px" data-options="label:'管控层级'"
required=true editable=false>
<option value="公司级">公司级</option>
<option value="部门级">部门级</option>
<option value="班组级">班组级</option>
<option value="岗位级">岗位级</option>
</select>
</div>
<div style="margin-top:10px;margin-bottom:5px">
<input id="zrbm" class="easyui-combotree" name="zrbm" style="width:480px"
data-options="label:'责任部门',loadFilter: function(rows){
return convert(rows);
},
formatter:function(node){
var s = node.text;
if (node.children){
s += '&nbsp;<span style=\'color:blue\'>(' + node.children.length + ')</span>';
}
return s;
}," required=true editable=false/>
</div>
<div style="margin-top:10px;margin-bottom:5px">
<input id="zrr" class="easyui-combobox" name="zrr" style="width:480px" data-options="label:'责任人'"
required=true editable=false/>
</div>
</form>
</div>
</div>
<script>
var kind = {{kind}}
$("#zrbm").combotree({ url: 'parthandle?a=tree', onSelect: function (node) { $('#zrr').combobox({ url: 'getuser?partid=' + node.id + '&a=combobox', }); } });
function fxdsubmitForm() {
var data = $('#fxdff').serializeJSON();
data['kind'] = kind
$.ajax({
type: "POST",
url: 'api/riskact?a=add',
data: JSON.stringify(data),
datatype: "json",
processData: false,
contentType: "application/json;charset=utf-8",
beforeSend: function () {
var bo = $('#fxdff').form('validate')
if (bo == false) {
return bo
} else {
$('#submitb').linkbutton('disable');
}
},
success: function (data) {
if (data.code == 1) {
$('#riskacttable').datagrid('reload');
$("#dd").dialog("close");
} else { $.messager.alert('提示', '失败!'); }
$('#submitb').linkbutton('enable');
},
});
}
</script>