|
|
|
@ -46,7 +46,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/html" id="table-bar">
|
|
|
|
|
<button type="button" class="layui-btn layui-btn-sm" title="提交给上级" lay-event="publish">
|
|
|
|
|
<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">
|
|
|
|
@ -102,13 +102,26 @@
|
|
|
|
|
cols: [[
|
|
|
|
|
{ title: '序号', align: 'center', width: "5%", type: 'numbers' },
|
|
|
|
|
{ title: '任务名称', field: 'job_name', align: 'left', },
|
|
|
|
|
{ title: '状态', field: 'status_name', align: 'center', width: "10%" },
|
|
|
|
|
{ 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: []
|
|
|
|
|
defaultToolbar: [],
|
|
|
|
|
parseData: function (res) { // res 即为原始返回的数据
|
|
|
|
|
for (var i = 0; i < res.data.length; i++) {
|
|
|
|
|
if (res.data[i].forward_progress == 1) {
|
|
|
|
|
res.data[i].status_name = "未提交给上级";
|
|
|
|
|
} if (res.data[i].forward_progress == 2) {
|
|
|
|
|
res.data[i].status_name = "已提交给上级";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -122,7 +135,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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) {
|
|
|
|
|