You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
266 lines
10 KiB
266 lines
10 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title></title>
|
|
<link rel="stylesheet" href="../../../../component/pear/css/pear.css" />
|
|
<style>
|
|
.require-star {
|
|
position: absolute;
|
|
width: 3px;
|
|
height: 14px;
|
|
background-color: #ea4335;
|
|
top: 12px;
|
|
right: 8px;
|
|
border-radius: 1.5px;
|
|
}
|
|
|
|
.input-width {
|
|
max-width: 470px
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<form class="layui-form" action="">
|
|
<div class="mainBox">
|
|
<div class="main-container" style="margin-top: 20px;margin-bottom: 0;">
|
|
|
|
<div class="layui-form-item">
|
|
|
|
<textarea id="memo" placeholder="请输入退回原因" class="layui-textarea"
|
|
style="width: 650px;min-height: 74px !important;"></textarea>
|
|
|
|
</div>
|
|
|
|
<div class="layui-form-item" style="margin-bottom: 0 !important;">
|
|
|
|
|
|
|
|
<div style="display: flex;align-items:flex-end">
|
|
<div class="layui-input-inline" style="width: auto;">
|
|
<div class="layui-btn-container tag" lay-filter="orgs" lay-allowclose="true"
|
|
style="border-style:dashed;border-width:1px;border-color: #CCCCCC;height: 100px;width: 650px;padding: 10px;overflow: auto;">
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div id="tableDiv" style="width: 650px;">
|
|
<div class="layui-table-tool" style="min-height: 38px !important">
|
|
<div class="layui-input-inline" style="margin-left: -16px;width: 150px !important;">
|
|
<select id="orgTypeId" lay-filter="orgTypeId">
|
|
<option value="0">全部</option>
|
|
<option value="211">小学</option>
|
|
<option value="311">初级中学</option>
|
|
<option value="312">九年一贯制学校</option>
|
|
<option value="341">完全中学</option>
|
|
<option value="342">高级中学</option>
|
|
</select>
|
|
</div>
|
|
<div class="layui-input-group" style="margin-left: -16px;">
|
|
<input type="text" id="org_name" placeholder="请输入学校名称" class="layui-input"
|
|
lay-affix="clear" lay-filter="clear">
|
|
<div class="layui-input-split layui-input-suffix" style="cursor: pointer;"
|
|
lay-on="confirm">
|
|
<i class="layui-icon layui-icon-search"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<table id="data-table"></table>
|
|
<script type="text/html" id="select-enable">
|
|
<input type="checkbox" id="{{d.org_id}}" lay-skin="switch" lay-text="已选|未选" lay-filter="switchEnable"
|
|
{{ d.sw == true ? "checked" : "" }}>
|
|
</script>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bottom">
|
|
<div class="button-container" style="right: 15px !important">
|
|
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="publish">
|
|
<i class="layui-icon layui-icon-return"></i>
|
|
退 回
|
|
</button>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
<script src="../../../../component/layui/layui.js"></script>
|
|
<script src="../../../../component/pear/pear.js"></script>
|
|
<script>
|
|
layui.use(['tag'], function () {
|
|
var form = layui.form;
|
|
var $ = layui.jquery;
|
|
var laydate = layui.laydate;
|
|
var tab = layui.tab;
|
|
var util = layui.util;
|
|
var tag = layui.tag;
|
|
var table = layui.table;
|
|
|
|
var bureauIds = [];
|
|
var publishData = {};
|
|
|
|
var jobId = GetQueryString("job_id");
|
|
var statusCode = GetQueryString("status_code");
|
|
var targetId = GetQueryString("target_id");
|
|
|
|
|
|
|
|
renderBureauTable();
|
|
|
|
function renderBureauTable() {
|
|
table.render({
|
|
elem: '#data-table',
|
|
id: 'myTable',
|
|
url: '/QingLong/zbdc/listSchool',
|
|
where: {
|
|
school_type_id: $("#orgTypeId").val(),
|
|
check_type_id: 2,
|
|
keyword: $("#org_name").val()
|
|
},
|
|
height: '315',
|
|
page: {
|
|
limit: 5
|
|
, layout: ['count', 'prev', 'page', 'next', 'skip']
|
|
, prev: "上一页"
|
|
, next: "下一页"
|
|
},
|
|
cols: [[
|
|
{ title: '序号', align: 'center', width: "5%", type: 'numbers' },
|
|
{ title: '学校名称', field: 'org_name', align: 'center' },
|
|
{ title: '学校类型', field: 'school_type_name', align: 'center', width: "20%" },
|
|
{ title: '操作', align: 'center', width: "25%", templet: '#select-enable' }
|
|
]],
|
|
skin: 'line',
|
|
// toolbar: '#table-toolbar',
|
|
defaultToolbar: [],
|
|
parseData: function (res) {
|
|
var data = res.data;
|
|
for (var i = 0; i < data.length; i++) {
|
|
switch (data[i].org_type_id) {
|
|
case 14:
|
|
res.data[i].org_type_name = '教辅单位';
|
|
break;
|
|
case 16:
|
|
res.data[i].org_type_name = '学校';
|
|
break;
|
|
default:
|
|
res.data[i].org_type_name = '--';
|
|
break;
|
|
}
|
|
|
|
res.data[i].sw = false
|
|
if (bureauIds.includes(data[i].org_id)) {
|
|
res.data[i].sw = true
|
|
}
|
|
}
|
|
return res;
|
|
},
|
|
done: function (res, curr, count) {
|
|
var options = this;
|
|
|
|
// 获取当前行数据
|
|
table.getRowData = function (tableId, elem) {
|
|
var index = $(elem).closest('tr').data('index');
|
|
return table.cache[tableId][index] || {};
|
|
};
|
|
|
|
form.on('switch(switchEnable)', function (obj) {
|
|
var data = table.getRowData(options.id, this);
|
|
if (obj.elem.checked) {
|
|
tag.add('orgs', { text: data.org_name, id: data.org_id });
|
|
bureauIds.push(data.org_id);
|
|
}
|
|
else {
|
|
tag.delete('orgs', data.org_id);
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}
|
|
|
|
tag.on('delete(orgs)', function (data) {
|
|
var orgId = data.elem.prevObject.prevObject[0].getAttribute("lay-id");
|
|
bureauIds = bureauIds.filter(item => item !== orgId);
|
|
var switchElem = $('#' + orgId);
|
|
switchElem.prop('checked', false);
|
|
form.render();
|
|
});
|
|
|
|
|
|
form.on('select(orgTypeId)', function (data) {
|
|
tableReload();
|
|
});
|
|
|
|
form.on('input-affix(clear)', function (data) {
|
|
tableReload();
|
|
});
|
|
|
|
function tableReload() {
|
|
renderBureauTable();
|
|
}
|
|
|
|
form.on('submit(publish)', function (data) {
|
|
|
|
if (Array.isArray(bureauIds) && bureauIds.length === 0) {
|
|
layer.msg("请选择要退回的学校!", {
|
|
icon: 3,
|
|
time: 1500
|
|
});
|
|
}
|
|
else {
|
|
|
|
$.ajax({
|
|
url: '/QingLong/zbdc/CheckReport',
|
|
type: 'post',
|
|
data: {
|
|
bureau_ids: bureauIds.join(","),
|
|
check_type_id: -1,
|
|
message: $("#memo").val()
|
|
},
|
|
success: function (result) {
|
|
if (result.success) {
|
|
layer.msg("退回成功!", {
|
|
icon: 1,
|
|
time: 1200
|
|
}, function () {
|
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
|
parent.getInfo();
|
|
});
|
|
} else {
|
|
layer.msg(result.message, {
|
|
icon: 2,
|
|
time: 2000
|
|
});
|
|
}
|
|
}
|
|
});
|
|
|
|
|
|
|
|
}
|
|
return false;
|
|
});
|
|
|
|
|
|
function GetQueryString(name, istop) {
|
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
|
var r = window.location.search.substr(1).match(reg);
|
|
if (typeof (istop) != "undefined") r = top.location.search.substr(1).match(reg);
|
|
|
|
if (r != null) return unescape(r[2]);
|
|
return null;
|
|
}
|
|
});
|
|
</script>
|
|
<script>
|
|
</script>
|
|
</body>
|
|
|
|
</html> |