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.

262 lines
11 KiB

2 years ago
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="../../../component/pear/css/pear.css" />
2 years ago
<link rel="stylesheet" href="../iconfont/iconfont.css" />
2 years ago
</head>
<body class="pear-container layui-form">
<div class="layui-card" style="margin-bottom: 10px !important;">
<div class="layui-card-body">
<div class="layui-form-item" style="margin: 10px 0 5px 0 !important;">
<div class="layui-form-item layui-inline">
<label class="layui-form-label" style="width: auto;">任务名称:</label>
<div class="layui-input-inline">
<input type="text" id="task_name" lay-affix="clear" lay-filter="clear" placeholder="请输入任务名称"
class="layui-input">
</div>
</div>
<div class="layui-form-item layui-inline">
<button class="pear-btn pear-btn-md pear-btn-primary" lay-submit lay-filter="user-query">
<i class="layui-icon layui-icon-search"></i>
查询
</button>
</div>
</div>
</div>
</div>
<div class="layui-card">
<div class="layui-card-body">
<table id="data-table"></table>
2 years ago
<script type="text/html" id="jobName-Templet">
{{#if (d.job_type == 1) { }}
<img src="../imgs/form.png" title="表单" style="max-width: 16px;margin-top: -4px;">
{{# } else { }}
<img src="../imgs/excel.png" title="EXCEL模板" style="max-width: 16px;margin-top: -4px;">
{{# } }}
{{d.job_name}}
{{#if (d.jiezhi == true) { }}
2 years ago
<img src="../imgs/yjz.svg" style="max-width: 50px;margin-top: -9px;margin-left: 1px;">
2 years ago
{{# } }}
</script>
<script type="text/html" id="targetType">
{{#if (d.target_type_id == 1) { }}
2 years ago
单位
2 years ago
{{# } else { }}
2 years ago
人员
2 years ago
{{# } }}
</script>
2 years ago
<script type="text/html" id="fill-progress">
2 years ago
<span style="cursor: pointer;background-color: #16BAAA;padding: 5px 10px;border-radius: 8px;color: #FFFFFF;font-weight: bolder;" onclick='fill_progress("{{= d.status_code }}","{{= d.self_or_next }}","{{= d.job_id }}","{{= d.child_count }}","{{= d.child_reply_count }}","{{= d.job_type }}")'>{{= d.child_reply_count }} / {{= d.child_count }}</span>
2 years ago
</script>
2 years ago
2 years ago
<script type="text/html" id="status-Templet">
2 years ago
{{# if(d.submitUp == 0){ }}
2 years ago
未提交给上级
2 years ago
{{# } else { }}
2 years ago
<span style="color: #16BAAA;">已提交给上级</span>
{{# } }}
</script>
2 years ago
</div>
</div>
<script type="text/html" id="table-bar">
2 years ago
{{# if(d.submitUp == 0){ }}
2 years ago
<button type="button" class="layui-btn layui-btn-sm" title="提交给上级" lay-event="submitUpLevel" style="font-size: 12px !important;">
<i class="iconfont icon-tijiao"></i> 提交给上级
</button>
{{# } }}
2 years ago
<button type="button" class="layui-btn layui-btn-sm" title="导出汇总表" lay-event="exportHz" style="font-size: 12px !important;">
<i class="iconfont icon-cz-hzb"></i>导出汇总表
</button>
2 years ago
2 years ago
<button type="button" class="layui-btn layui-btn-sm" title="查看" lay-event="view" style="font-size: 12px !important;">
<i class="iconfont icon-chakan"></i> 查看
2 years ago
</button>
</script>
<script src="../../../component/layui/layui.js"></script>
<script src="../../../component/pear/pear.js"></script>
<script src="../../../component/pear/base64.js"></script>
<script>
2 years ago
layui.use(['table', 'form', 'jquery', 'common', 'laytpl'], function () {
2 years ago
var table = layui.table;
var form = layui.form;
var $ = layui.jquery;
var common = layui.common;
var laytpl = layui.laytpl;
var element = layui.element;
2 years ago
2 years ago
var statusCodes = GetQueryString("status_codes");
2 years ago
tableRender();
form.on('submit(user-query)', function () {
tableRender();
return false;
});
form.on('input-affix(clear)', function (data) {
tableRender();
});
function tableRender() {
table.render({
elem: '#data-table',
url: '/QingLong/collect/viewJobList',
where: {
keyword: $("#task_name").val(),
2 years ago
status_codes: statusCodes
2 years ago
},
2 years ago
height: 'full-146',
2 years ago
page: {
limit: 12
, layout: ['count', 'prev', 'page', 'next', 'skip']
, prev: "上一页"
, next: "下一页"
},
cols: [[
2 years ago
{ title: '序号', unresize: true, align: 'center', width: "5%", type: 'numbers' },
2 years ago
{ title: '任务名称', unresize: true, align: 'left', templet: '#jobName-Templet' },
2 years ago
{ title: '状态', unresize: true, align: 'center', width: "10%", templet: '#status-Templet' },
2 years ago
{ title: '填报进度', unresize: true, align: 'center', width: "10%", templet: '#fill-progress' },
2 years ago
{ title: '发布日期', unresize: true, field: 'publish_time', align: 'center', width: "10%" },
{ title: '截止日期', unresize: true, field: 'deadline_time', align: 'center', width: "10%" },
2 years ago
{ title: '发布对象', unresize: true, align: 'center', width: "8%", templet: '#targetType' },
2 years ago
{ title: '操作', unresize: true, align: 'left', width: "20%", toolbar: '#table-bar' }
2 years ago
]],
skin: 'line',
2 years ago
defaultToolbar: [],
parseData: function (res) {
for (var i = 0; i < res.data.length; i++) {
2 years ago
if (res.data[i].status_code.toString().slice(-1) == "1") {
res.data[i].submitUp = 0;
} else {
res.data[i].submitUp = 1;
2 years ago
}
}
return res;
}
2 years ago
});
}
table.on('tool(data-table)', function (obj) {
2 years ago
if (obj.event === 'submitUpLevel') {
window.submitUpLevel(obj);
2 years ago
} else if (obj.event === 'view') {
window.view(obj);
2 years ago
} else if (obj.event === 'exportHz') {
window.exportHz(obj);
2 years ago
}
});
2 years ago
window.submitUpLevel = function (obj) {
2 years ago
var msg = "";
if (obj.data.forward_count == obj.data.forward_fill_count) {
msg = "确定要提交给上级吗?"
} else {
2 years ago
msg = "还有单位未完成填报,确定要提交给上级吗?"
2 years ago
}
layer.confirm(msg, {
icon: 3,
title: '提示'
}, function (index) {
2 years ago
layer.close(index);
2 years ago
$.ajax({
url: '/QingLong/collect/setForwardFinish',
type: 'post',
2 years ago
data: { job_id: obj.data.job_id, status_code: obj.data.status_code },
2 years ago
success: function (result) {
if (result.success) {
layer.msg("提交给上级成功!", {
icon: 1,
time: 1000
}, function () {
refresh();
});
} else {
layer.msg(result.message, {
icon: 2,
time: 2000
});
}
}
});
});
2 years ago
}
2 years ago
window.view = function (obj) {
2 years ago
layer.open({
type: 2,
title: '查看',
shade: 0.1,
2 years ago
area: ['800px', '450px'],
content: './job_view_zf.html?job_id=' + obj.data.job_id + "&status_code=" + obj.data.status_code + "&target_id=" + obj.data.target_id
2 years ago
});
2 years ago
}
2 years ago
2 years ago
window.fill_progress = function (status_code, self_or_next, job_id, total_count, finish_count, job_type) {
if (status_code[2] == "3") {
2 years ago
layer.open({
type: 2,
title: '填报进度( <span style="color: #16BAAA;font-weight: bolder;">已填报 ' + finish_count + '</span> / 应填报 ' + total_count + ' ',
shadeClose: true,
shade: false,
maxmin: false,
move: false,
area: ['100%', '100%'],
2 years ago
content: "./task_view_p.html?job_id=" + job_id + "&job_type=" + job_type + "&self_or_next=1"
2 years ago
});
} else {
layer.open({
type: 2,
title: '填报进度( <span style="color: #16BAAA;font-weight: bolder;">已填报 ' + finish_count + '</span> / 应填报 ' + total_count + ' ',
shadeClose: true,
shade: false,
maxmin: false,
move: false,
area: ['100%', '100%'],
2 years ago
content: "./task_view.html?job_id=" + job_id + "&job_type=" + job_type
2 years ago
});
}
2 years ago
}
2 years ago
2 years ago
window.exportHz = function (obj) {
window.location = "/QingLong/collect/getSummaryExcel?job_id=" + obj.data.job_id;
2 years ago
}
2 years ago
window.refresh = function (param) {
table.reload('data-table');
}
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>
</body>
</html>