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.

214 lines
9.2 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!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" />
</head>
<body class="pear-container layui-form" style="overflow: hidden;">
<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">
<select id="status" lay-filter="status">
<option value="-1">全部</option>
<option value="1">已完成</option>
<option value="0">未完成</option>
</select>
</div>
</div>
<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="org_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="status-Templet">
{{# if(d.forward_progress_xiaji === 2){ }}
<span style="color: #16BAAA;">已完成</span>
{{# } else { }}
未完成
{{# } }}
</script>
<script type="text/html" id="progress-Templet">
{{# if(d.forward_count === 0){ }}
--
{{# } else { }}
<span style="cursor: pointer;" onclick='fill_progress("{{= d.forward_count }}","{{= d.forward_fill_count }}","{{= d.job_type }}")'>{{= d.forward_fill_count }} / {{= d.forward_count }}</span>
{{# } }}
</script>
</div>
</div>
<script type="text/html" id="table-bar">
{{# if(d.is_finish === 1){ }}
<button type="button" class="layui-btn layui-btn-sm" title="查看" lay-event="view" style="font-size: 12px !important;">
<i class="iconfont icon-chakan"></i>
</button>
{{# if(d.job_type === 2){ }}
<button type="button" class="layui-btn layui-btn-sm" title="下载" lay-event="download" style="font-size: 12px !important;">
<i class="iconfont icon-xiazai"></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', 'laytpl'], function () {
var table = layui.table;
var form = layui.form;
var $ = layui.jquery;
var common = layui.common;
var laytpl = layui.laytpl;
var jobId = GetQueryString("job_id");
var jobType = GetQueryString("job_type");
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: '/dsBase/collect/viewJob',
where: {
job_id: jobId,
is_finish: $("#status").val(),
keyword: $("#org_name").val(),
query_type_id: 1
},
height: 'full-155',
page: {
limit: 15
, layout: ['count', 'prev', 'page', 'next', 'skip']
, prev: "上一页"
, next: "下一页"
},
cols: [[
{ title: '序号', unresize: true, align: 'center', width: "5%", type: 'numbers' },
{ title: '单位名称', unresize: true, field: 'target_name', align: 'center' },
{ title: '完成状态', unresize: true, align: 'center', width: "10%", templet: '#status-Templet' },
{ title: '完成时间', unresize: true, field: 'forward_finish_time', align: 'center', width: "10%" },
// { title: '完成进度', unresize: true, align: 'center', width: "8%", templet: '#progress-Templet' },
{ title: '联系人', unresize: true, field: 'person_name', align: 'center', width: "10%" },
{ title: '电话', unresize: true, field: 'telephone', align: 'center', width: "10%" },
{ title: '邮箱', unresize: true, field: 'email', align: 'center', width: "10%" }
// { title: '操作', align: 'center', width: "15%", toolbar: '#table-bar' }
]],
skin: 'line',
defaultToolbar: [],
parseData: function (res) { // res 即为原始返回的数据
for (var i = 0; i < res.data.length; i++) {
if (res.data[i].forward_progress_xiaji === 0 || res.data[i].forward_progress_xiaji === 1) {
res.data[i].forward_finish_time = "--";
}
res.data[i].job_type = parseInt(jobType);
}
return res;
}
});
}
table.on('tool(data-table)', function (obj) {
if (obj.event === 'view') {
window.view(obj);
} else if (obj.event === 'download') {
window.download(obj);
}
});
window.download = function (obj) {
window.location = '/dsBase/collect/getJobBureauFillInfo?job_id=' + obj.data.job_id + '&bureau_id=' + obj.data.bureau_id + '&type_id=1';
}
window.view = function (obj) {
if (obj.data.job_type === 1) {
layer.open({
type: 2,
title: '填报',
offset: 'r',
anim: 'slideLeft',
area: ['1000px', '100%'],
shade: 0.1,
shadeClose: true,
content: "../form/view_bureau.html?job_id=" + obj.data.job_id + "&bureau_id=" + obj.data.bureau_id
});
} else {
var base64Url = Base64.encode('/dsBase/collect/getJobBureauFillInfo?job_id=' + obj.data.job_id + '&bureau_id=' + obj.data.bureau_id + '&type_id=2');
window.open('../exportPdf.html?url=' + base64Url, '_blank');
}
}
window.fill_progress = function (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=" + jobId + "&job_type=" + job_type
});
}
form.on('select(status)', function (data) {
tableRender();
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>
</body>
</html>