行业性质
This commit is contained in:
parent
f46a721fe7
commit
2eb86c41b9
@ -135,42 +135,12 @@
|
||||
t1.enterprise_of_grid_operator_id
|
||||
FROM
|
||||
gen_enterprise_of_grid_operator t1
|
||||
LEFT JOIN
|
||||
INNER JOIN
|
||||
gen_enterprise jt1
|
||||
ON
|
||||
t1.enterprise_id = jt1.enterprise_id
|
||||
AND
|
||||
jt1.is_delete = 0
|
||||
LEFT JOIN
|
||||
data_dictionary dt1
|
||||
ON
|
||||
dt1.dictionary_id = jt1.area1
|
||||
AND
|
||||
dt1.is_delete = 0
|
||||
LEFT JOIN
|
||||
data_dictionary dt2
|
||||
ON
|
||||
dt2.dictionary_id = jt1.area2
|
||||
AND
|
||||
dt2.is_delete = 0
|
||||
LEFT JOIN
|
||||
data_dictionary dt3
|
||||
ON
|
||||
dt3.dictionary_id = jt1.area3
|
||||
AND
|
||||
dt3.is_delete = 0
|
||||
LEFT JOIN
|
||||
data_dictionary dt4
|
||||
ON
|
||||
dt4.dictionary_id = jt1.area4
|
||||
AND
|
||||
dt4.is_delete = 0
|
||||
LEFT JOIN
|
||||
data_dictionary dt5
|
||||
ON
|
||||
dt5.dictionary_id = jt1.area5
|
||||
AND
|
||||
dt5.is_delete = 0
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="keywords != null and keywords != ''">
|
||||
|
@ -41,6 +41,7 @@
|
||||
var $ = layui.$;
|
||||
var $win = $(window);
|
||||
var admin = layui.admin;
|
||||
var form = layui.form;
|
||||
var treeTable = layui.treeTable;
|
||||
var resizeTimeout = null;
|
||||
var natureId = top.restAjax.params(window.location.href).natureId;
|
||||
@ -56,6 +57,7 @@
|
||||
$('input[name="'+ item.checkItemId +'_type"][value='+ item.type +']').attr('checked', true);
|
||||
}
|
||||
treeTableObj.setChecked(checkCheckItemIdArray);
|
||||
form.render('radio', 'dataTable');
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
@ -105,6 +107,7 @@
|
||||
},
|
||||
]
|
||||
});
|
||||
treeTableObj.expandAll();
|
||||
initData();
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
@ -117,6 +120,8 @@
|
||||
width: admin.screen() > 1 ? '100%' : '',
|
||||
height: ($win.height() - 140) +'px',
|
||||
});
|
||||
treeTableObj.expandAll();
|
||||
initData();
|
||||
}
|
||||
|
||||
initTable();
|
||||
@ -157,16 +162,13 @@
|
||||
top.restAjax.post(top.restAjax.path('api/industrycheckitem/saveindustrycheckitembynatureid/{natureId}', [natureId]), {
|
||||
natureCheckItems: natureCheckItemArray
|
||||
}, null, function(code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||
var layerIndex = top.dialog.msg('提交成功', {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
btn: [top.dataMessage.button.yes],
|
||||
shade: 0.3,
|
||||
yes: function(index) {
|
||||
top.dialog.close(index);
|
||||
window.location.reload();
|
||||
},
|
||||
btn2: function() {
|
||||
closeBox();
|
||||
}
|
||||
});
|
||||
}, function(code, data) {
|
||||
|
@ -75,7 +75,7 @@
|
||||
},
|
||||
callback: {
|
||||
onClick: function (event, treeId, treeNode) {
|
||||
parentId = treeNode.id;
|
||||
parentId = treeNode.dictionaryId;
|
||||
initIFrame();
|
||||
return false;
|
||||
}
|
||||
|
@ -1,166 +0,0 @@
|
||||
<!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-card">
|
||||
<div class="layui-card-header">
|
||||
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
|
||||
<a href="javascript:void(0);"><cite>新增内容</cite></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">场所性质</label>
|
||||
<div class="layui-input-block layui-form" id="natureSelectTemplateBox" lay-filter="natureSelectTemplateBox"></div>
|
||||
<script id="natureSelectTemplate" type="text/html">
|
||||
<select id="natureId" name="natureId">
|
||||
<option value="">请选择场所性质</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">检查项</label>
|
||||
<div class="layui-input-block layui-form" id="checkItemIdJoinTemplateBox" lay-filter="checkItemIdJoinTemplateBox"></div>
|
||||
<script id="checkItemIdJoinTemplate" type="text/html">
|
||||
<select name="checkItemId">
|
||||
<option value="">选择检查项</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.checkItemId}}">{{item.name}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">类型</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="type" value="1" title="必查" checked>
|
||||
<input type="radio" name="type" value="2" title="选查">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交新增</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var laytpl = layui.laytpl;
|
||||
var laydate = layui.laydate;
|
||||
var wangEditor = window.wangEditor;
|
||||
var wangEditorObj = {};
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
function refreshDownloadTemplet(fileName, file) {
|
||||
var dataRander = {};
|
||||
dataRander[fileName] = file;
|
||||
|
||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化场所性质下拉选择
|
||||
function initNatureSelect() {
|
||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/54c583df-6a6f-4a55-bcb3-2d6ace99b8ef', []), {}, null, function(code, data, args) {
|
||||
laytpl(document.getElementById('natureSelectTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('natureSelectTemplateBox').innerHTML = html;
|
||||
});
|
||||
form.render('select', 'natureSelectTemplateBox');
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化检查项ID联表
|
||||
function initCheckItemIdJoinTable(){
|
||||
top.restAjax.get(top.restAjax.path('api/checkitem/listcheckitem', []), {}, null, function(code, data, args) {
|
||||
laytpl(document.getElementById('checkItemIdJoinTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('checkItemIdJoinTemplateBox').innerHTML = html;
|
||||
});
|
||||
form.render('select', 'checkItemIdJoinTemplateBox');
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
initNatureSelect();
|
||||
initCheckItemIdJoinTable();
|
||||
}
|
||||
initData();
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
top.restAjax.post(top.restAjax.path('api/industrycheckitem/saveindustrycheckitem', []), formData.field, null, function(code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
shade: 0.3,
|
||||
yes: function(index) {
|
||||
top.dialog.close(index);
|
||||
window.location.reload();
|
||||
},
|
||||
btn2: function() {
|
||||
closeBox();
|
||||
}
|
||||
});
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -1,198 +0,0 @@
|
||||
<!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-card">
|
||||
<div class="layui-card-header">
|
||||
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
|
||||
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
|
||||
<a href="javascript:void(0);"><cite>编辑内容</cite></a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="layui-card-body" style="padding: 15px;">
|
||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">场所性质</label>
|
||||
<div class="layui-input-block layui-form" id="natureSelectTemplateBox" lay-filter="natureSelectTemplateBox"></div>
|
||||
<script id="natureSelectTemplate" type="text/html">
|
||||
<select id="natureId" name="natureId">
|
||||
<option value="">请选择场所性质</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.dictionaryId}}">{{item.dictionaryName}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">检查项</label>
|
||||
<div class="layui-input-block layui-form" id="checkItemIdJoinTemplateBox" lay-filter="checkItemIdJoinTemplateBox"></div>
|
||||
<script id="checkItemIdJoinTemplate" type="text/html">
|
||||
<select name="checkItemId">
|
||||
<option value="">选择检查项</option>
|
||||
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||
<option value="{{item.checkItemId}}">{{item.name}}</option>
|
||||
{{# } }}
|
||||
</select>
|
||||
</script>
|
||||
</div>
|
||||
<div class="layui-form-item" pane>
|
||||
<label class="layui-form-label">类型</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="type" value="1" title="必查">
|
||||
<input type="radio" name="type" value="2" title="选查">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交编辑</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
|
||||
<script src="assets/layuiadmin/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var laytpl = layui.laytpl;
|
||||
var laydate = layui.laydate;
|
||||
var industryCheckItemId = top.restAjax.params(window.location.href).industryCheckItemId;
|
||||
|
||||
var wangEditor = window.wangEditor;
|
||||
var wangEditorObj = {};
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
function refreshDownloadTemplet(fileName, file) {
|
||||
var dataRander = {};
|
||||
dataRander[fileName] = file;
|
||||
|
||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||
document.getElementById(fileName +'FileBox').innerHTML = html;
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化场所性质下拉选择
|
||||
function initNatureSelect(selectValue) {
|
||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/54c583df-6a6f-4a55-bcb3-2d6ace99b8ef', []), {}, null, function(code, data, args) {
|
||||
laytpl(document.getElementById('natureSelectTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('natureSelectTemplateBox').innerHTML = html;
|
||||
});
|
||||
form.render('select', 'natureSelectTemplateBox');
|
||||
|
||||
var selectObj = {};
|
||||
selectObj['nature'] = selectValue;
|
||||
form.val('dataForm', selectObj);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
// 初始化检查项ID联表
|
||||
function initCheckItemIdJoinTable(joinValue){
|
||||
top.restAjax.get(top.restAjax.path('api/checkitem/listcheckitem', []), {}, null, function(code, data) {
|
||||
laytpl(document.getElementById('checkItemIdJoinTemplate').innerHTML).render(data, function(html) {
|
||||
document.getElementById('checkItemIdJoinTemplateBox').innerHTML = html;
|
||||
});
|
||||
form.render('select', 'checkItemIdJoinTemplateBox');
|
||||
|
||||
// 初始化选择
|
||||
var formSelectData = {};
|
||||
formSelectData['checkItemId'] = joinValue;
|
||||
form.val('dataForm', formSelectData);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 初始化内容
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/industrycheckitem/getindustrycheckitembyid/{industryCheckItemId}', [industryCheckItemId]), {}, null, function(code, data) {
|
||||
var dataFormData = {};
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
}
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
|
||||
initNatureSelect(data['natureId']);
|
||||
initCheckItemIdJoinTable(data['checkItemId']);
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
}
|
||||
initData();
|
||||
|
||||
// 提交表单
|
||||
form.on('submit(submitForm)', function(formData) {
|
||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||
top.dialog.close(index);
|
||||
var loadLayerIndex;
|
||||
top.restAjax.put(top.restAjax.path('api/industrycheckitem/updateindustrycheckitem/{industryCheckItemId}', [industryCheckItemId]), formData.field, null, function(code, data) {
|
||||
var layerIndex = top.dialog.msg(top.dataMessage.updateSuccess, {
|
||||
time: 0,
|
||||
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
|
||||
shade: 0.3,
|
||||
yes: function(index) {
|
||||
top.dialog.close(index);
|
||||
window.location.reload();
|
||||
},
|
||||
btn2: function() {
|
||||
closeBox();
|
||||
}
|
||||
});
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
}, function() {
|
||||
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
|
||||
}, function() {
|
||||
top.dialog.close(loadLayerIndex);
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.close').on('click', function() {
|
||||
closeBox();
|
||||
});
|
||||
|
||||
// 行业类型
|
||||
// form.on('select(industryTypeId)', function(data) {
|
||||
// initIndustryIdSelect(data.value, null);
|
||||
// });
|
||||
|
||||
// 校验
|
||||
form.verify({
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user