155 lines
5.6 KiB
HTML
155 lines
5.6 KiB
HTML
<div class="easyui-layout" style="width:100%;height:100%;">
|
|
<div data-options="region:'west',title:'许可证类型',split:true,border:false" style="width:300px;height:100%;">
|
|
<ul id="zylxlist"></ul>
|
|
</div>
|
|
<div data-options="region:'center',border:false" style="height:100%;">
|
|
<div style="height:50%">
|
|
<table id="fxcstable" style="width:auto;height:100%;" title='风险分析和安全措施'></table>
|
|
<div id="fxcsbar" style="padding:6px;height:auto">
|
|
|
|
{% load myfilter %}
|
|
{% if request|has_permission:'b_zuoyepeizhi_risk_add' %}
|
|
<a id="addfxcs" class="easyui-linkbutton" onclick="addfxcs()" data-options="iconCls: 'fa-plus',plain:true">新增</a>
|
|
{% endif %}
|
|
{% if request|has_permission:'b_zuoyepeizhi_risk_edit' %}
|
|
<a id="editfxcs" class="easyui-linkbutton" onclick="editfxcs()" data-options="iconCls: 'fa-edit',plain:true">编辑</a>
|
|
{% endif %}
|
|
{% if request|has_permission:'b_zuoyepeizhi_risk_del' %}
|
|
<a id="delfxcs" class="easyui-linkbutton" onclick="delfxcs()" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<div style="height:50%">
|
|
<table id="spjdtable" style="width:auto;height:100%;" title='审批节点(除作业部门和属地部门外,按排序进行)'></table>
|
|
<div id="spjdbar" style="padding:6px;height:auto">
|
|
{% if request|has_permission:'b_zuoyepeizhi_shenpi_add' %}
|
|
<a id="addspjd" class="easyui-linkbutton" onclick="addspjd()" data-options="iconCls: 'fa-plus',plain:true">新增</a>
|
|
{% endif %}
|
|
{% if request|has_permission:'b_zuoyepeizhi_shenpi_del' %}
|
|
<a id="delspjd" class="easyui-linkbutton" onclick="delspjd()" data-options="iconCls: 'fa-trash',plain:true">删除</a>
|
|
{% endif %}
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$('#zylxlist').datalist({
|
|
url: 'getdickey?dicclass=33&a=combobox',
|
|
method: 'get',
|
|
onSelect: function (index,data) {
|
|
$("#fxcstable").datagrid({
|
|
url: 'api/fxcs?a=listall&zylx='+data.value,
|
|
});
|
|
$("#spjdtable").datagrid({
|
|
url: 'api/operationspjd?a=listall&zylx='+data.value,
|
|
});
|
|
},
|
|
});
|
|
$('#spjdtable').datagrid({
|
|
url: '',
|
|
rownumbers: true,
|
|
singleSelect: true,
|
|
striped: true,
|
|
fitColumns: true,
|
|
method: 'get',
|
|
pagination: 'true',
|
|
pageSize: 20,
|
|
toolbar: '#spjdbar',
|
|
border:false,
|
|
columns: [[
|
|
{ field: 'id', title: 'ID', hidden: true },
|
|
{ field: 'jdmc', title: '节点名称', width: 40 },
|
|
{ field: 'spbm__partname', title: '审批部门', width: 120 },
|
|
{ field: 'sprnames', title: '审批人', width: 120 },
|
|
]]
|
|
});
|
|
$('#fxcstable').datagrid({
|
|
url: '',
|
|
rownumbers: true,
|
|
singleSelect: true,
|
|
striped: true,
|
|
fitColumns: true,
|
|
method: 'get',
|
|
pagination: 'true',
|
|
pageSize: 20,
|
|
toolbar: '#fxcsbar',
|
|
border:false,
|
|
columns: [[
|
|
{ field: 'id', title: 'ID', hidden: true },
|
|
{ field: 'fxfx', title: '风险分析', width: 40 },
|
|
{ field: 'aqcs', title: '安全措施', width: 120 },
|
|
{ field: 'cslx', title: '措施类型', width: 80 },
|
|
]]
|
|
});
|
|
function addfxcs(){
|
|
var row = $('#zylxlist').datalist('getSelected')
|
|
if (row){
|
|
opendg('新建风险分析和控制措施','html/fxcs/add')
|
|
}else{
|
|
$.messager.alert('提示', '未选择作业类型!');
|
|
}
|
|
|
|
}
|
|
function editfxcs(){
|
|
var row = $('#fxcstable').datagrid('getSelected')
|
|
if (row){
|
|
opendg('编辑风险分析和控制措施','html/fxcs/edit/'+row.id+'/')
|
|
}else{
|
|
$.messager.alert('提示', '未选择具体风险!');
|
|
}
|
|
|
|
}
|
|
function delfxcs(){
|
|
var row = $('#fxcstable').datagrid('getSelected')
|
|
if (row){
|
|
$.get('api/fxcs?a=del&id='+row.id,function(data){
|
|
if(data.code==1){
|
|
$('#fxcstable').datagrid('reload');
|
|
}else{
|
|
$.messager.alert('提示', '您无权删除!');
|
|
}
|
|
})
|
|
}else{
|
|
$.messager.alert('提示', '未选择作业类型!');
|
|
}
|
|
|
|
}
|
|
function addspjd(){
|
|
var row = $('#zylxlist').datalist('getSelected')
|
|
if (row){
|
|
opendg('新增审批节点','html/operationspjd/add')
|
|
}else{
|
|
$.messager.alert('提示', '未选择作业类型!');
|
|
}
|
|
|
|
}
|
|
function addspjd(){
|
|
var row = $('#zylxlist').datalist('getSelected')
|
|
if (row){
|
|
opendg('新增审批节点','html/operationspjd/add')
|
|
}else{
|
|
$.messager.alert('提示', '未选择作业类型!');
|
|
}
|
|
|
|
}
|
|
function delspjd(){
|
|
var row = $('#spjdtable').datagrid('getSelected')
|
|
if (row){
|
|
$.get('api/operationspjd?a=del&id='+row.id,function(data){
|
|
if(data.code==1){
|
|
$('#spjdtable').datagrid('reload');
|
|
}else{
|
|
$.messager.alert('提示', '您无权删除!');
|
|
}
|
|
})
|
|
}else{
|
|
$.messager.alert('提示', '请选择审批节点!');
|
|
}
|
|
}
|
|
</script> |