422 lines
18 KiB
HTML
422 lines
18 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en" xmlns="http://www.w3.org/1999/html">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<title>预释放资源详情页</title>
|
||
<link rel="stylesheet" href="../../layui-v2.8.18/layui/css/layui.css" media="all"/>
|
||
</head>
|
||
<style>
|
||
.layui-form-label {
|
||
position: relative;
|
||
float: left;
|
||
display: block;
|
||
padding: 9px 10px;
|
||
width: 100%;
|
||
font-weight: 400;
|
||
line-height: 20px;
|
||
text-align: left;
|
||
}
|
||
|
||
table {
|
||
border-collapse: collapse;
|
||
overflow: auto;
|
||
}
|
||
|
||
table, th, td {
|
||
border: 1px solid rgb(219 219 219);
|
||
text-align: center;
|
||
font-size: 16px;
|
||
}
|
||
|
||
th, td {
|
||
padding: 10px;
|
||
text-align: center;
|
||
}
|
||
.layui-table-tool-self{
|
||
display: none;
|
||
}
|
||
</style>
|
||
<body>
|
||
<form class="layui-form" action="" onsubmit="return false" style="padding: 10px">
|
||
<div class="layui-panel" style="padding:10px">
|
||
<blockquote class="layui-elem-quote">
|
||
<h2 id="proName"></h2>
|
||
</blockquote>
|
||
<div class="layui-form-item" style="margin-top: 1%;">
|
||
<div class="layui-col-xs3">
|
||
<div class="layui-form-item" style="margin-top: 1%;">
|
||
<div class="layui-inline">
|
||
<div class="layui-input-inline" style="width: 200px;">
|
||
<label class="layui-form-label">计划开工日期:<span style="color:red" id="startTime"> </span></label>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item" style="margin-top: 1%;">
|
||
<div class="layui-inline" style="width:100%">
|
||
<div class=" layui-input-inline" style="width: 200px;">
|
||
<label class="layui-form-label">项目管理资源数:<span style="color:red" id="teamNum"> </span></label>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-col-xs3">
|
||
<div class="layui-form-item" style="margin-top: 1%;">
|
||
<div class="layui-form-item" style="margin-top: 1%;">
|
||
<div class="layui-inline">
|
||
<div class="layui-input-inline" style="width: 200px;">
|
||
<label class="layui-form-label"> 计划完工日期:<span style="color:red"
|
||
id="endTime"> </span></label>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item" style="margin-top: 1%;">
|
||
<div class="layui-inline">
|
||
<div class="layui-input-inline" style="width:200px">
|
||
<label class="layui-form-label">分包班组数:<span style="color:red"
|
||
id="subTeamNum"> </span></label>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="layui-col-xs3">
|
||
<div class="layui-form-item" style="margin-top: 1%;">
|
||
<div class="layui-form-item" style="margin-top: 1%;">
|
||
<div class="layui-inline">
|
||
<div class="layui-input-inline" style="width: 200px;">
|
||
<label class="layui-form-label"> 分公司:<span style="color:red"
|
||
id="orgName"> </span></label>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-form-item" style="margin-top: 1%;">
|
||
<div class="layui-inline">
|
||
<div class="layui-input-inline" style="width: 200px;">
|
||
<label class="layui-form-label"> 自有班组数:<span style="color:red"
|
||
id="ownTeamNum"> </span></label>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-col-xs3">
|
||
<div style="float:right;width: 200px;text-align: center;margin-right: 10%;">
|
||
<label>项目进度</label><br>
|
||
<br>
|
||
<div class="layui-progress layui-progress-big" lay-showpercent="true"
|
||
style="width: 150px;margin-left: 20px;">
|
||
<div class="layui-progress-bar" id="myBar" lay-percent="0%"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-panel" style="padding:10px;margin-top: 10px;">
|
||
<div class="layui-tab layui-tab-brief">
|
||
<ul class="layui-tab-title">
|
||
<li class="layui-this">项目管理资源</li>
|
||
<li>分包班组</li>
|
||
<li>自有班组</li>
|
||
</ul>
|
||
<div class="layui-tab-content">
|
||
<div class="layui-tab-item layui-show">
|
||
<table id="teamTable" lay-filter="test"></table>
|
||
</div>
|
||
<div class="layui-tab-item">
|
||
<table id="subTeamTable" lay-filter="test1"></table>
|
||
</div>
|
||
<div class="layui-tab-item">
|
||
<table id="ownTeamTable" lay-filter="test2"></table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</form>
|
||
|
||
</body>
|
||
</html>
|
||
<script src="../../js/jquery/jquery-3.6.0.js"></script>
|
||
<script src="../../layui-v2.8.18/layui/layui.js"></script>
|
||
<script type="text/javascript" src="../../js/jq.js"></script>
|
||
<script src="../../js/common_methon.js"></script>
|
||
<script type="text/javascript" src="../../../public/public.js"></script>
|
||
<script type="text/javascript" src="../../js/publicJs.js"></script>
|
||
<script type="text/javascript" src="../../js/select.js"></script>
|
||
<script type="text/javascript" src="../../js/my/permission.js"></script>
|
||
|
||
<script type="text/html" id="toolbar1">
|
||
<div class="layui-btn-container" style="float:right;margin-right:-10%">
|
||
<button class="layui-btn layui-btn-primary layui-border" lay-event="export1">导出</button>
|
||
</div>
|
||
</script>
|
||
<script type="text/html" id="toolbar2">
|
||
<div class="layui-btn-container" style="float:right;margin-right:-10%">
|
||
<button class="layui-btn layui-btn-primary layui-border" lay-event="export2">导出</button>
|
||
</div>
|
||
</script>
|
||
<script type="text/html" id="toolbar3">
|
||
<div class="layui-btn-container" style="float:right;margin-right:-10%">
|
||
<button class="layui-btn layui-btn-primary layui-border" lay-event="export3">导出</button>
|
||
</div>
|
||
</script>
|
||
|
||
<script type="text/javascript">
|
||
|
||
var form;
|
||
var table;
|
||
var table1;
|
||
var table2;
|
||
var element;
|
||
var proId = localStorage.getItem("releaseProId");
|
||
|
||
layui.use(['table', 'form', 'element'], function () {
|
||
table = layui.table;
|
||
table1 = layui.table;
|
||
table2 = layui.table;
|
||
form = layui.form;
|
||
element = layui.element;
|
||
getData()
|
||
getTeamTable(table);
|
||
getSubTeamTable(table1);
|
||
getOwnTeamTable(table2);
|
||
|
||
|
||
|
||
table.on('toolbar(test)', function(obj) { // 双击 toolDouble
|
||
var data = obj.data; // 获得当前行数据
|
||
// console.log(obj)
|
||
if (obj.event === 'export1') {
|
||
window.location.href = czl_ht_url + "/newPro/exportProTeamPersonData?proId="+proId
|
||
}
|
||
});
|
||
|
||
table2.on('toolbar(test2)', function(obj) { // 双击 toolDouble
|
||
var data = obj.data; // 获得当前行数据
|
||
// console.log(obj)
|
||
if (obj.event === 'export3') {
|
||
window.location.href = czl_ht_url + "/newPro/exportOwnTeamPersonData?proId="+proId
|
||
}
|
||
});
|
||
});
|
||
|
||
|
||
function getData() {
|
||
$.ajax({
|
||
type: 'post',
|
||
url: czl_ht_url + '/newPro/getReleaseDataListById',
|
||
dataType: 'json', // 服务器返回数据类型
|
||
async: false,
|
||
data: {
|
||
proId: proId,
|
||
},
|
||
success: function (data) {
|
||
var resMsg = data.resMsg;
|
||
if ("数据获取成功" == resMsg) {
|
||
let info = data.obj.info;
|
||
$("#proName").text(info.proName);
|
||
$("#startTime").text(info.startTime);
|
||
$("#teamNum").text(info.teamNum);
|
||
$("#endTime").text(info.endTime);
|
||
$("#subTeamNum").text(info.subTeamNum);
|
||
$("#orgName").text(info.orgName);
|
||
$("#teamNum").text(info.teamNum);
|
||
$("#ownTeamNum").text(info.ownTeamNum);
|
||
updateProgress(info.process);
|
||
}
|
||
},
|
||
error: function (err) {
|
||
console.log("获取工程下拉列表出错:", err);
|
||
}
|
||
});
|
||
}
|
||
|
||
function getTeamTable(table) {
|
||
//渲染表格
|
||
var ins1 = table.render({
|
||
elem: '#teamTable'
|
||
, url: czl_ht_url + '/newPro/getTeamTable' //数据接口
|
||
, method: 'post' //方式默认是get
|
||
, where: {
|
||
proId: proId,
|
||
} //post请求必须加where ,post请求需要的参数
|
||
, cellMinWidth: 80
|
||
, cols: [[ //表头
|
||
{
|
||
field: 'number', width: 80, title: '序号', align: 'center', type: 'numbers'
|
||
}
|
||
, {field: 'orgName', align: 'center', title: '分公司'}
|
||
, {field: 'teamName', align: 'center', title: '项目管理团队'}
|
||
, {field: 'voltageLevel', align: 'center', title: '电压等级'}
|
||
, {field: 'postName', align: 'center', title: '岗位'}
|
||
, {field: 'personName', align: 'center', title: '姓名'}
|
||
, {field: 'sex', align: 'center', title: '性别'}
|
||
,{field: 'idCard', align: 'center',title: '身份证',templet:function(res){
|
||
return res.idCard + "\t";
|
||
}}
|
||
, {field: 'certification', align: 'center', title: '执证情况'}
|
||
, {field: 'skillLevel', align: 'center', title: '职称/技能等级'}
|
||
]]
|
||
, id: 'teamTable'
|
||
, page: true //开启分页
|
||
, loading: true //数据加载中。。。
|
||
, limits: [10, 20, 50,100,500] //一页选择显示3,5或10条数据
|
||
, limit: 10 //一页显示5条数据
|
||
, response: {
|
||
statusCode: 200 //规定成功的状态码,默认:0
|
||
}, parseData: function (res) { //将原始数据解析成 table 组件所规定的数据,res为从url中get到的数据
|
||
let result;
|
||
if (res.data !== '' && res.data != null && res.data !== "null") {
|
||
if (this.page.curr) {
|
||
result = res.data.slice(this.limit * (this.page.curr - 1), this.limit * this.page.curr);
|
||
} else {
|
||
result = res.data.slice(0, this.limit);
|
||
}
|
||
}
|
||
return {
|
||
"code": res.code, //解析接口状态
|
||
"msg": res.msg, //解析提示文本
|
||
"count": res.count, //解析数据长度
|
||
"data": result, //解析数据列表
|
||
};
|
||
},
|
||
toolbar: "#toolbar1"
|
||
});
|
||
}
|
||
|
||
function getSubTeamTable(table1) {
|
||
//渲染表格
|
||
table1.render({
|
||
elem: '#subTeamTable'
|
||
, url: czl_ht_url + '/newPro/getSubTeamTable' //数据接口
|
||
, method: 'post' //方式默认是get
|
||
, where: {
|
||
proId: proId,
|
||
} //post请求必须加where ,post请求需要的参数
|
||
, cellMinWidth: 80
|
||
, cols: [[ //表头
|
||
{
|
||
field: 'number', width: 80, title: '序号', align: 'center', type: 'numbers'
|
||
}
|
||
, {field: 'sugetbName', align: 'center', title: '分包单位名称'}
|
||
, {field: 'structure', align: 'center', title: '工序'}
|
||
, {field: 'teamName', align: 'center', title: '班组'}
|
||
, {field: 'personName', align: 'center', title: '姓名'}
|
||
, {field: 'postName', align: 'center', title: '岗位'}
|
||
, {field: 'sex', align: 'center', title: '性别'}
|
||
, {field: 'nation', align: 'center', title: '民族'}
|
||
,{field: 'idCard', align: 'center',title: '身份证',templet:function(res){
|
||
return res.idCard + "\t";
|
||
}}
|
||
, {field: 'skillLevel', align: 'center', title: '职称/技能等级'}
|
||
]]
|
||
, id: 'subTeamTable'
|
||
, page: true //开启分页
|
||
, loading: true //数据加载中。。。
|
||
, limits: [10, 20,50, 100,500] //一页选择显示3,5或10条数据
|
||
, limit: 10 //一页显示5条数据
|
||
, response: {
|
||
statusCode: 200 //规定成功的状态码,默认:0
|
||
}, parseData: function (res) { //将原始数据解析成 table 组件所规定的数据,res为从url中get到的数据
|
||
let result;
|
||
if (res.data !== '' && res.data != null && res.data !== "null") {
|
||
if (this.page.curr) {
|
||
result = res.data.slice(this.limit * (this.page.curr - 1), this.limit * this.page.curr);
|
||
} else {
|
||
result = res.data.slice(0, this.limit);
|
||
}
|
||
}
|
||
return {
|
||
"code": res.code, //解析接口状态
|
||
"msg": res.msg, //解析提示文本
|
||
"count": res.count, //解析数据长度
|
||
"data": result, //解析数据列表
|
||
};
|
||
},
|
||
toolbar: "#toolbar2"
|
||
});
|
||
table1.on('toolbar(test1)', function(obj) { // 双击 toolDouble
|
||
var data = obj.data; // 获得当前行数据
|
||
console.log(obj)
|
||
if (obj.event === 'export2') {
|
||
window.location.href = czl_ht_url + "/newPro/exportSubTeamPersonData?proId="+proId
|
||
}
|
||
});
|
||
}
|
||
|
||
function getOwnTeamTable(table2) {
|
||
//渲染表格
|
||
table2.render({
|
||
elem: '#ownTeamTable'
|
||
, url: czl_ht_url + '/newPro/getOwnTeamTable' //数据接口
|
||
, method: 'post' //方式默认是get
|
||
, where: {
|
||
proId: proId,
|
||
} //post请求必须加where ,post请求需要的参数
|
||
, cellMinWidth: 80
|
||
, cols: [[ //表头
|
||
{
|
||
field: 'number', width: 80, title: '序号', align: 'center', type: 'numbers'
|
||
}
|
||
, {field: 'structure', align: 'center', title: '工序'}
|
||
, {field: 'teamName', align: 'center', title: '班组'}
|
||
, {field: 'postName', align: 'center', title: '岗位'}
|
||
, {field: 'personName', align: 'center', title: '姓名'}
|
||
, {field: 'sex', align: 'center', title: '性别'}
|
||
, {field: 'nation', align: 'center', title: '民族'}
|
||
,{field: 'idCard', align: 'center',title: '身份证',templet:function(res){
|
||
return res.idCard + "\t";
|
||
}}
|
||
, {field: 'certification', align: 'center', title: '执证情况'}
|
||
, {field: 'skillLevel', align: 'center', title: '职称/技能等级'}
|
||
]]
|
||
, id: 'ownTeamTable'
|
||
, page: true //开启分页
|
||
, loading: true //数据加载中。。。
|
||
, limits: [10, 20, 50,100,500] //一页选择显示3,5或10条数据
|
||
, limit: 10 //一页显示5条数据
|
||
, response: {
|
||
statusCode: 200 //规定成功的状态码,默认:0
|
||
}, parseData: function (res) { //将原始数据解析成 table 组件所规定的数据,res为从url中get到的数据
|
||
let result;
|
||
if (res.data !== '' && res.data != null && res.data !== "null") {
|
||
if (this.page.curr) {
|
||
result = res.data.slice(this.limit * (this.page.curr - 1), this.limit * this.page.curr);
|
||
} else {
|
||
result = res.data.slice(0, this.limit);
|
||
}
|
||
}
|
||
return {
|
||
"code": res.code, //解析接口状态
|
||
"msg": res.msg, //解析提示文本
|
||
"count": res.count, //解析数据长度
|
||
"data": result, //解析数据列表
|
||
};
|
||
},
|
||
toolbar: "#toolbar3"
|
||
});
|
||
}
|
||
|
||
|
||
function updateProgress(newPercent) {
|
||
var progressBar = $('#myBar');
|
||
progressBar.attr('lay-percent', newPercent + '%'); // 更新进度条的百分比
|
||
progressBar.css('width', newPercent); // 更新进度条的显示宽度
|
||
element.progress('myProgress', newPercent); // 使用 layui 的 element 模块更新进度条
|
||
element.render();
|
||
}
|
||
|
||
function getNowTime() {
|
||
var time = new Date();
|
||
var year = time.getFullYear();
|
||
var month = time.getMonth() + 1 >= 10 ? time.getMonth() + 1 : '0' + (time.getMonth() + 1);
|
||
var day = time.getDate() >= 10 ? time.getDate() : '0' + time.getDate();
|
||
return year + "-" + month + "-" + day;
|
||
}
|
||
|
||
|
||
</script> |