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.
225 lines
8.8 KiB
225 lines
8.8 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: 25px;">
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label" style="width: 100px !important;"><span
|
|
class="require-star"></span>填报截止日期:</label>
|
|
<div class="layui-input-block" style="margin-left: 90px !important;">
|
|
<input type="text" class="layui-input input-width" lay-verify="required" name="deadline_time"
|
|
id="endDate" placeholder="请选择截止日期">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-item">
|
|
<label class="layui-form-label" style="width: 100px !important;"><span
|
|
class="require-star"></span>选择范围:</label>
|
|
<div class="layui-input-block" style="margin-left: 134px !important;">
|
|
<div class="layui-tab layui-tab-brief">
|
|
<ul class="layui-tab-title" style="border-bottom-style:none">
|
|
<li class="layui-this">按单位类型选</li>
|
|
<li>按指定单位选</li>
|
|
</ul>
|
|
<div class="layui-tab-content">
|
|
<div class="layui-tab-item layui-show">
|
|
<input type="checkbox" id="zsxx" lay-skin="tag" title="市直学校">
|
|
<input type="checkbox" id="szjf" lay-skin="tag" title="市直教辅单位">
|
|
<input type="checkbox" id="xqjyj" lay-skin="tag" title="县区教育局">
|
|
</div>
|
|
<div class="layui-tab-item">
|
|
<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: 445px;padding: 10px;overflow: auto;">
|
|
</div>
|
|
<div>
|
|
|
|
<table id="data-table"></table>
|
|
|
|
</div>
|
|
|
|
|
|
<input type="button" id="test" value="aaaaa" />
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bottom">
|
|
<div class="button-container">
|
|
<button type="submit" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="publish">
|
|
<i class="layui-icon layui-icon-ok"></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 bureauIds = "";
|
|
|
|
var jobId = GetQueryString("job_id");
|
|
|
|
laydate.render({
|
|
elem: '#endDate'
|
|
});
|
|
|
|
$("#test").click(function () {
|
|
tag.add('orgs', { text: '新选项', id: 12 });
|
|
});
|
|
|
|
function tableRender() {
|
|
table.render({
|
|
elem: '#data-table',
|
|
url: '/QingLong/collect/getBureauList',
|
|
where: {
|
|
org_type_id: "-1",
|
|
org_name: ""
|
|
},
|
|
height: 'full-130',
|
|
page: {
|
|
limit: 15
|
|
, layout: ['count', 'prev', 'page', 'next', 'skip']
|
|
, prev: "上一页"
|
|
, next: "下一页"
|
|
},
|
|
cols: [[
|
|
{ title: '序号', align: 'center', width: "5%", type: 'numbers' },
|
|
{ title: '单位名称', field: 'org_name', align: 'center' },
|
|
{ title: '单位类型', field: 'org_type_name', align: 'center', width: "10%" },
|
|
{ title: '操作', align: 'center', width: "25%", toolbar: '#table-bar' }
|
|
]],
|
|
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 5:
|
|
res.data[i].org_type_name = '市直教辅单位';
|
|
break;
|
|
case 9:
|
|
res.data[i].org_type_name = '市直学校';
|
|
break;
|
|
case 11:
|
|
res.data[i].org_type_name = '区县教育局';
|
|
break;
|
|
default:
|
|
res.data[i].sub_scope = '--';
|
|
break;
|
|
}
|
|
}
|
|
|
|
return res;
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
|
|
form.on('submit(publish)', function (data) {
|
|
|
|
var shiZhiSchool = 0;
|
|
var shiZhiJiaoFu = 0;
|
|
var quXiaoJiaoYuJu = 0;
|
|
|
|
$('input[type="checkbox"]').each(function () {
|
|
var isChecked = $(this).prop('checked');
|
|
var checkboxText = $(this).attr('id');
|
|
if (isChecked) {
|
|
if (checkboxText == 'zsxx') {
|
|
shiZhiSchool = 1;
|
|
} else if (checkboxText == 'szjf') {
|
|
shiZhiJiaoFu = 1;
|
|
} else if (checkboxText == 'xqjyj') {
|
|
quXiaoJiaoYuJu = 1;
|
|
}
|
|
}
|
|
});
|
|
|
|
data.field["job_id"] = jobId;
|
|
data.field["shiZhiSchool"] = shiZhiSchool;
|
|
data.field["shiZhiJiaoFu"] = shiZhiJiaoFu;
|
|
data.field["quXiaoJiaoYuJu"] = quXiaoJiaoYuJu;
|
|
data.field["bureauIds"] = bureauIds;
|
|
|
|
$.ajax({
|
|
url: '/QingLong/collect/publishJob',
|
|
type: 'post',
|
|
data: data.field,
|
|
success: function (result) {
|
|
if (result.success) {
|
|
layer.msg("成功!", {
|
|
icon: 1,
|
|
time: 1000
|
|
}, function () {
|
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
|
parent.returnTaskList();
|
|
});
|
|
} 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> |