|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
|
|
|
<head>
|
|
|
<meta charset="utf-8">
|
|
|
<title></title>
|
|
|
<link rel="stylesheet" href="../../../component/pear/css/pear.css" />
|
|
|
<link rel="stylesheet" href="../iconfont/iconfont.css" />
|
|
|
<style>
|
|
|
|
|
|
</style>
|
|
|
|
|
|
</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>
|
|
|
<script type="text/html" id="fill-progress">
|
|
|
<span style="cursor: pointer;" onclick='fill_progress("{{= d.child_job_id }}","{{= d.forward_count }}","{{= d.forward_fill_count }}","{{= d.job_type }}")'>{{= d.forward_fill_count }} / {{= d.forward_count }}</span>
|
|
|
</script>
|
|
|
<script type="text/html" id="status-Templet">
|
|
|
{{# if(d.forward_progress == 1){ }}
|
|
|
未提交给上级
|
|
|
{{# } else if(d.forward_progress == 2) { }}
|
|
|
<span style="color: #16BAAA;">已提交给上级</span>
|
|
|
{{# } }}
|
|
|
</script>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
<script type="text/html" id="table-bar">
|
|
|
{{# if(d.forward_progress == 1){ }}
|
|
|
<button type="button" class="layui-btn layui-btn-sm" title="提交给上级" lay-event="submitUpLevel">
|
|
|
<i class="iconfont icon-tijiao"></i>
|
|
|
</button>
|
|
|
{{# } }}
|
|
|
<button type="button" class="layui-btn layui-btn-sm" title="查看" lay-event="view">
|
|
|
<i class="iconfont icon-chakan"></i>
|
|
|
</button>
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<script src="../../../component/layui/layui.js"></script>
|
|
|
<script src="../../../component/pear/pear.js"></script>
|
|
|
<script src="../../../component/pear/base64.js"></script>
|
|
|
|
|
|
<script>
|
|
|
layui.use(['table', 'form', 'jquery', 'common', 'dtree', 'laytpl'], function () {
|
|
|
var table = layui.table;
|
|
|
var form = layui.form;
|
|
|
var $ = layui.jquery;
|
|
|
var common = layui.common;
|
|
|
var laytpl = layui.laytpl;
|
|
|
var element = layui.element;
|
|
|
|
|
|
var forwardProgress = GetQueryString("forward_progress");
|
|
|
|
|
|
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(),
|
|
|
is_finish: -1,
|
|
|
fill_type_id: 2,
|
|
|
forward_progress: forwardProgress
|
|
|
},
|
|
|
height: 'full-150',
|
|
|
page: {
|
|
|
limit: 12
|
|
|
, layout: ['count', 'prev', 'page', 'next', 'skip']
|
|
|
, prev: "上一页"
|
|
|
, next: "下一页"
|
|
|
},
|
|
|
cols: [[
|
|
|
{ title: '序号', align: 'center', width: "5%", type: 'numbers' },
|
|
|
{ title: '任务名称', field: 'job_name', align: 'left', },
|
|
|
{ title: '状态', align: 'center', width: "10%", templet: '#status-Templet' },
|
|
|
{ title: '填报进度', align: 'center', width: "10%", templet: '#fill-progress' },
|
|
|
{ title: '发布时间', field: 'publish_time', align: 'center', width: "15%" },
|
|
|
{ title: '截止时间', field: 'deadline_time', align: 'center', width: "15%" },
|
|
|
{ title: '操作', align: 'left', width: "10%", toolbar: '#table-bar' }
|
|
|
]],
|
|
|
skin: 'line',
|
|
|
defaultToolbar: []
|
|
|
|
|
|
});
|
|
|
}
|
|
|
|
|
|
table.on('tool(data-table)', function (obj) {
|
|
|
if (obj.event === 'submitUpLevel') {
|
|
|
window.submitUpLevel(obj);
|
|
|
} else if (obj.event === 'view') {
|
|
|
window.view(obj);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
window.submitUpLevel = function (obj) {
|
|
|
var msg = "";
|
|
|
if (obj.data.forward_count == obj.data.forward_fill_count) {
|
|
|
msg = "确定要提交给上级吗?"
|
|
|
} else {
|
|
|
msg = "还有未完成的填报,确定要提交给上级吗?"
|
|
|
}
|
|
|
layer.confirm(msg, {
|
|
|
icon: 3,
|
|
|
title: '提示'
|
|
|
}, function (index) {
|
|
|
layer.close(index);
|
|
|
console.log(obj.data);
|
|
|
$.ajax({
|
|
|
url: '/QingLong/collect/setForwardFinish',
|
|
|
type: 'post',
|
|
|
data: { job_id: obj.data.job_id },
|
|
|
success: function (result) {
|
|
|
if (result.success) {
|
|
|
layer.msg("提交给上级成功!", {
|
|
|
icon: 1,
|
|
|
time: 1000
|
|
|
}, function () {
|
|
|
refresh();
|
|
|
});
|
|
|
} else {
|
|
|
layer.msg(result.message, {
|
|
|
icon: 2,
|
|
|
time: 2000
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
window.view = function (obj) {
|
|
|
layer.open({
|
|
|
type: 2,
|
|
|
title: '查看',
|
|
|
shade: 0.1,
|
|
|
area: ['800px', '400px'],
|
|
|
content: './job_view.html?job_id=' + obj.data.job_id
|
|
|
});
|
|
|
}
|
|
|
|
|
|
window.fill_progress = function (job_id, total_count, finish_count, job_type) {
|
|
|
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%'],
|
|
|
content: "./task_view.html?job_id=" + job_id + "&job_type=" + job_type
|
|
|
});
|
|
|
}
|
|
|
|
|
|
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> |