2020-04-02 18:21:52 +08:00
|
|
|
<!doctype html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<!-- 领导审查 -->
|
|
|
|
<base href="/inspection/">
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="renderer" content="webkit">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
|
|
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
|
|
|
|
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
|
|
|
|
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="layui-fluid layui-anim layui-anim-fadein">
|
|
|
|
<div class="layui-row layui-col-space15">
|
|
|
|
<div class="layui-col-md12">
|
|
|
|
<div class="layui-card">
|
|
|
|
<div class="layui-card-body">
|
|
|
|
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
|
|
|
|
<div class="layui-inline search-item-width-100">
|
|
|
|
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
|
|
|
|
</div>
|
|
|
|
<div class="layui-inline layui-form search-item" id="typeSelectTemplateBox" lay-filter="typeSelectTemplateBox"></div>
|
|
|
|
<script id="typeSelectTemplate" type="text/html">
|
|
|
|
<select id="type" name="type">
|
|
|
|
<option value="">企业类型</option>
|
|
|
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
|
|
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
|
|
|
{{# } }}
|
|
|
|
</select>
|
|
|
|
</script>
|
|
|
|
<div class="layui-inline layui-form search-item" id="industrySelectTemplateBox" lay-filter="industrySelectTemplateBox"></div>
|
|
|
|
<script id="industrySelectTemplate" type="text/html">
|
|
|
|
<select id="industry" name="industry">
|
|
|
|
<option value="">管理行业</option>
|
|
|
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
|
|
|
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
|
|
|
{{# } }}
|
|
|
|
</select>
|
|
|
|
</script>
|
|
|
|
<button type="button" id="search" class="layui-btn layui-btn-sm">
|
|
|
|
<i class="fa fa-lg fa-search"></i> 搜索
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script src="assets/layuiadmin/layui/layui.js"></script>
|
|
|
|
<script>
|
|
|
|
layui.config({
|
|
|
|
base: 'assets/layuiadmin/'
|
|
|
|
}).extend({
|
|
|
|
index: 'lib/index'
|
|
|
|
}).use(['index', 'table', 'laydate', 'common'], function() {
|
|
|
|
var $ = layui.$;
|
|
|
|
var $win = $(window);
|
|
|
|
var table = layui.table;
|
|
|
|
var admin = layui.admin;
|
|
|
|
var laydate = layui.laydate;
|
|
|
|
var form = layui.form;
|
|
|
|
var laytpl = layui.laytpl;
|
|
|
|
var common = layui.common;
|
|
|
|
var resizeTimeout = null;
|
|
|
|
var tableUrl = 'api/check/listpageleadercheckofmine';
|
|
|
|
|
|
|
|
// 初始化企业类型下拉选择
|
|
|
|
function initTypeSelect() {
|
|
|
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/612415f3-0ebb-4bc2-b713-e9fb1acc7f76', []), {}, null, function(code, data, args) {
|
|
|
|
laytpl(document.getElementById('typeSelectTemplate').innerHTML).render(data, function(html) {
|
|
|
|
document.getElementById('typeSelectTemplateBox').innerHTML = html;
|
|
|
|
});
|
|
|
|
form.render('select', 'typeSelectTemplateBox');
|
|
|
|
}, function(code, data) {
|
|
|
|
top.dialog.msg(data.msg);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
initTypeSelect();
|
|
|
|
// 初始化管理行业下拉选择
|
|
|
|
function initIndustrySelect() {
|
|
|
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/b97630ab-45b7-45bc-a624-507d4df952ff', []), {}, null, function(code, data, args) {
|
|
|
|
laytpl(document.getElementById('industrySelectTemplate').innerHTML).render(data, function(html) {
|
|
|
|
document.getElementById('industrySelectTemplateBox').innerHTML = html;
|
|
|
|
});
|
|
|
|
form.render('select', 'industrySelectTemplateBox');
|
|
|
|
}, function(code, data) {
|
|
|
|
top.dialog.msg(data.msg);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
initIndustrySelect();
|
|
|
|
|
|
|
|
// 初始化表格
|
|
|
|
function initTable() {
|
|
|
|
table.render({
|
|
|
|
elem: '#dataTable',
|
|
|
|
id: 'dataTable',
|
|
|
|
url: top.restAjax.path(tableUrl, []),
|
|
|
|
width: admin.screen() > 1 ? '100%' : '',
|
|
|
|
height: $win.height() - 90,
|
|
|
|
limit: 20,
|
|
|
|
limits: [20, 40, 60, 80, 100, 200],
|
|
|
|
request: {
|
|
|
|
pageName: 'page',
|
|
|
|
limitName: 'rows'
|
|
|
|
},
|
|
|
|
cols: [[
|
|
|
|
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
|
|
|
{field: 'nameJoinByEnterpriseId', width: 200, title: '企业名称', align:'center',
|
|
|
|
templet: function(row) {
|
|
|
|
var rowData = row[this.field];
|
|
|
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
|
|
return '-';
|
|
|
|
}
|
|
|
|
return rowData;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{field: 'typeDictionaryName', width: 200, title: '类型', align:'center',
|
|
|
|
templet: function(row) {
|
|
|
|
var rowData = row[this.field];
|
|
|
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
|
|
return '-';
|
|
|
|
}
|
|
|
|
return rowData;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{field: 'addressJoinByEnterpriseId', width: 200, title: '详细地址', align:'center',
|
|
|
|
templet: function(row) {
|
|
|
|
var rowData = row[this.field];
|
|
|
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
|
|
return '-';
|
|
|
|
}
|
|
|
|
return rowData;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{field: 'industryDictionaryName', width: 200, title: '管理行业', align:'center',
|
|
|
|
templet: function(row) {
|
|
|
|
var rowData = row[this.field];
|
|
|
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
|
|
return '-';
|
|
|
|
}
|
|
|
|
return rowData;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{field: 'engagedCountJoinByEnterpriseId', width: 100, title: '从业人数', align:'center',
|
|
|
|
templet: function(row) {
|
|
|
|
var rowData = row[this.field];
|
|
|
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
|
|
return '-';
|
|
|
|
}
|
|
|
|
return rowData;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{field: 'riskOperationDictionaryName', width: 200, title: '风险作业', align:'center',
|
|
|
|
templet: function(row) {
|
|
|
|
var rowData = row[this.field];
|
|
|
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
|
|
return '-';
|
|
|
|
}
|
|
|
|
return rowData;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{field: 'masterJoinByEnterpriseId', width: 150, title: '负责人', align:'center',
|
|
|
|
templet: function(row) {
|
|
|
|
var rowData = row[this.field];
|
|
|
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
|
|
return '-';
|
|
|
|
}
|
|
|
|
return rowData;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{field: 'phoneJoinByEnterpriseId', width: 150, title: '联系电话', align:'center',
|
|
|
|
templet: function(row) {
|
|
|
|
var rowData = row[this.field];
|
|
|
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
|
|
return '-';
|
|
|
|
}
|
|
|
|
return rowData;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{field: 'checkType', width: 150, title: '检查类型', align:'center',
|
|
|
|
templet: function(row) {
|
|
|
|
var rowData = row[this.field];
|
|
|
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
|
|
return '-';
|
|
|
|
}
|
|
|
|
if(rowData == 1) {
|
|
|
|
return '检查';
|
|
|
|
} else if(rowData == 2) {
|
|
|
|
return '复查';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{field: 'isCoordination', width: 100, title: '是否配合', align:'center',
|
|
|
|
templet: function(row) {
|
|
|
|
var rowData = row[this.field];
|
|
|
|
if(typeof(rowData) === 'undefined' || rowData == null) {
|
|
|
|
return '-';
|
|
|
|
}
|
|
|
|
if(rowData == 1) {
|
|
|
|
return '配合'
|
|
|
|
}
|
|
|
|
return '不配合';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{field: 'isComplete', width: 100, title: '是否完成', align:'center',
|
|
|
|
templet: function(row) {
|
|
|
|
var rowData = row[this.field];
|
|
|
|
if(typeof(rowData) === 'undefined' || rowData == null) {
|
|
|
|
return '-';
|
|
|
|
}
|
|
|
|
if(rowData == 1) {
|
|
|
|
return '完成'
|
|
|
|
}
|
|
|
|
return '未完成';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{field: 'gmtCreate', width: 200, title: '时间', align:'center',
|
|
|
|
templet: function(row) {
|
|
|
|
var rowData = row[this.field];
|
|
|
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
|
|
return '-';
|
|
|
|
}
|
|
|
|
return rowData;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{field: 'updateCheckMine', width: 180, title: '操作', fixed:'right', align:'center',
|
|
|
|
templet: function(row) {
|
|
|
|
return '<div class="layui-btn-group">' +
|
|
|
|
'<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="handleEvent">处理完毕</button>' +
|
|
|
|
'<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="leaderEvent">上级处理</button>' +
|
|
|
|
'</div>';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
]],
|
|
|
|
page: true,
|
|
|
|
parseData: function(data) {
|
|
|
|
return {
|
|
|
|
'code': 0,
|
|
|
|
'msg': '',
|
|
|
|
'count': data.total,
|
|
|
|
'data': data.rows
|
|
|
|
};
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
// 重载表格
|
|
|
|
function reloadTable(currentPage) {
|
|
|
|
table.reload('dataTable', {
|
|
|
|
url: top.restAjax.path(tableUrl, []),
|
|
|
|
where: {
|
|
|
|
keywords: $('#keywords').val(),
|
|
|
|
type: $('#type').val(),
|
|
|
|
industry: $('#industry').val(),
|
|
|
|
},
|
|
|
|
page: {
|
|
|
|
curr: currentPage
|
|
|
|
},
|
|
|
|
height: $win.height() - 90,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
initTable();
|
|
|
|
// 事件 - 页面变化
|
|
|
|
$win.on('resize', function() {
|
|
|
|
clearTimeout(resizeTimeout);
|
|
|
|
resizeTimeout = setTimeout(function() {
|
|
|
|
reloadTable();
|
|
|
|
}, 500);
|
|
|
|
});
|
|
|
|
// 事件 - 搜索
|
|
|
|
$(document).on('click', '#search', function() {
|
|
|
|
reloadTable(1);
|
|
|
|
});
|
2020-04-02 22:50:09 +08:00
|
|
|
// 执行检查
|
|
|
|
function inspect(msg, checkId, type) {
|
|
|
|
top.dialog.confirm(msg, function(index) {
|
|
|
|
top.dialog.close(index);
|
|
|
|
var loadLayerIndex;
|
|
|
|
top.restAjax.post(top.restAjax.path('api/check/saveinspect/{checkId}', [checkId]), {
|
|
|
|
type: type
|
|
|
|
}, null, function(code, data) {
|
|
|
|
reloadTable();
|
|
|
|
}, function(code, data) {
|
|
|
|
top.dialog.msg(data.msg);
|
|
|
|
}, function() {
|
|
|
|
loadLayerIndex = top.dialog.msg('提交中...', {icon: 16, time: 0, shade: 0.3});
|
|
|
|
}, function() {
|
|
|
|
top.dialog.close(loadLayerIndex);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
2020-04-02 18:21:52 +08:00
|
|
|
table.on('tool(dataTable)', function(obj) {
|
|
|
|
var layEvent = obj.event;
|
|
|
|
var data = obj.data;
|
|
|
|
if(layEvent === 'handleEvent') {
|
2020-04-02 22:50:09 +08:00
|
|
|
inspect('确定处理完毕?', data.checkId, 1);
|
2020-04-02 18:21:52 +08:00
|
|
|
} else if(layEvent === 'leaderEvent') {
|
2020-04-02 22:50:09 +08:00
|
|
|
inspect('确定上级处理?', data.checkId, 2);
|
2020-04-02 18:21:52 +08:00
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|