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.

133 lines
4.7 KiB

<!DOCTYPE html>
<html lang="cn">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="../../../lib/layui/css/layui.css">
<link rel="stylesheet" href="./projectList.css">
<style>
.bottom {
width: 100%;
position: absolute;
bottom: 0px;
left: 0px;
height: 50px;
line-height: 50px;
background-color: #FFF;
border-top: 1px solid #eee;
}
</style>
</head>
<body>
<div class="layui-bg-gray" style="padding: 16px;">
<div class="layui-card" style="margin-bottom: 6px;">
<div class="layui-card-header" style="font-weight: bold;">已选项目</div>
<div class="layui-card-body">
<div style="padding-left: 10px;padding-right: 10px;">
<table id="selectSubjectView" lay-filter="selectSubjectFilter"></table>
</div>
</div>
</div>
<div class="layui-card" style="margin-bottom: 6px;">
<div class="layui-card-header" style="font-weight: bold;">已选专家</div>
<div class="layui-card-body">
<div style="padding-left: 10px;padding-right: 10px;">
<table id="selectExpertView" lay-filter="selectExpertFilter"></table>
</div>
</div>
</div>
</div>
<script src="../../../lib/layui/layui.js"></script>
<script src="../../../lib/jquery.min.js"></script>
<script src="../../../lib/layer/layer.js"></script>
<script>
layui.use(['table', 'laydate', 'form'], function () {
var table = layui.table
, laydate = layui.laydate
, element = layui.element
, form = layui.form
, $ = layui.jquery;
var ys_id = GetQueryString("ys_id");
// 初始化
tableRender(ys_id);
function tableRender(ysID) {
table.render({
elem: '#selectSubjectView'
, url: "/dsBase/gtzz/getYsInfo"
, where: {
ys_id: ysID
}
, cols: [[
{ field: '', title: '序号', align: 'center', type: 'numbers', width: "10%" },
{ field: 'xmmc', title: '项目名称' },
{ field: 'subject_type_name', title: '项目类型', width: "15%" },
{ field: 'xmdw', title: '项目单位', width: "20%" },
{ field: 'money', title: '预算金额', width: "15%" }
]]
, height: "158"
, autoSort: false //禁用前端自动排序
, parseData: function (res) {
return {
"code": 0,
"msg": "",
"count": 100,
"data": res.listSubject
};
}
});
table.render({
elem: '#selectExpertView'
, url: "/dsBase/gtzz/getYsInfo"
, where: {
ys_id: ysID
}
, cols: [[
{ field: '', title: '序号', align: 'center', type: 'numbers', width: "10%" },
{ field: 'person_name', title: '姓名' , width: "20%"},
{ field: 'bureau_name', title: '所属单位'},
{ field: 'bureau_name', title: '研究专长', width: "30%" }
]]
, height: "158"
, autoSort: false //禁用前端自动排序
, parseData: function (res) {
return {
"code": 0,
"msg": "",
"count": 100,
"data": res.listExpert
};
}
});
}
// 获取参数值
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>