czl-screen/pages/home/preReleaseResourceView.html

452 lines
18 KiB
HTML
Raw Permalink Normal View History

2025-05-20 16:37:46 +08:00
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="UTF-8">
<title>预释放资源详情页</title>
<link rel="stylesheet" type="text/css" media="screen" href="../../js/layui-v2.8.18/layui/css/layui.css" />
<link rel="stylesheet" href="../../css/mainList.css">
</head>
<style type="text/css">
/*.table-bordered, .table-bordered>tbody>tr>td, .table-bordered>tbody>tr>th, .table-bordered>tfoot>tr>td, .table-bordered>tfoot>tr>th, .table-bordered>thead>tr>td, .table-bordered>thead>tr>th {*/
/* border: 0px solid #ddd;*/
/*}*/
th {
text-align: center;
}
.layui-table-tool {
display: none;
}
.layui-table thead th {
background-color: #0A2559;
color: white;
border: 0px;
}
.layui-table-cell {
color: white;
}
/*.layui-laydate-content>table>tbody>tr>td{*/
/* background-color: white;*/
/*}*/
#layui-laydate1 {
left: 534.578px;
top: 171.484px;
background: #020B31;
color: white;
}
.laydate-footer-btns span {
height: 26px;
line-height: 26px;
margin: 0 0 0 -1px;
padding: 0 10px;
border: 1px solid #C9C9C9;
background-color: #020B31!important;
white-space: nowrap;
vertical-align: top;
border-radius: 2px;
}
.layui-btn {
background-color: #2a91d3;
}
.layui-btn-sm {
height: 36px;
line-height: 30px;
padding: 0 10px;
font-size: 12px;
width: 75px;
border-radius: 9px;
}
.clickable-text {
cursor: pointer;
}
.layui-table-view{
overflow-y: auto;
height: 80%;
}
.layui-table-fixed-r{
right: -150px !important;
}
.layui-elem-quote {
margin-bottom: 10px;
padding: 15px;
line-height: 1.8;
border-left: 5px solid #16b777;
border-radius: 0 2px 2px 0;
background-color: transparent;
}
.layui-tab .layui-tab-title {
position: relative;
left: 0;
height: 40px;
white-space: nowrap;
font-size: 0;
border-bottom-width: 1px;
border-bottom-style: solid;
transition: all .2s;
-webkit-transition: all .2s;
border: 1px solid #a3a1a1;
}
.layui-form-label {
position: relative;
float: left;
display: block;
padding: 9px 10px;
width: 100%;
font-weight: 400;
line-height: 20px;
text-align: left;
color: white;
}
</style>
<body>
<form class="layui-form" action="" onsubmit="return false" style="padding: 10px;margin-top:10px">
<div class="layui-panel" style="padding:10px;background: transparent;border: 1px solid #a3a1a1;">
<blockquote class="layui-elem-quote">
<h2 id="proName" style="color: white;font-size: 20px;"></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:white" 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:white" 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:white"
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:white"
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:white"
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:white"
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%;color: white">
<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;background: transparent;border: 1px solid #a3a1a1;">
<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"></table>
</div>
<div class="layui-tab-item">
<table id="subTeamTable"></table>
</div>
<div class="layui-tab-item">
<table id="ownTeamTable"></table>
</div>
</div>
</div>
</div>
</form>
</body>
</html>
<script type="text/javascript" src="../../js/publicJs.js"></script>
2025-10-28 17:05:44 +08:00
<script type="text/javascript" src="../../js/libs/jquery.min.js"></script>
2025-05-20 16:37:46 +08:00
<script type="text/javascript" src="../../js/jq.js"></script>
<script type="text/javascript" src="../../js/layui-v2.8.18/layui/layui.js"></script>
<script type="text/javascript" src="../../js/select.js"></script>
<script type="text/javascript" src="../../js/my/permission.js"></script>
<script type="text/javascript" src="../../js/dict.js"></script>
<script type="text/javascript">
var form;
var table;
var element;
var proId = localStorage.getItem("releaseProId");
layui.use(['table', 'form', 'element'], function () {
table = layui.table;
form = layui.form;
element = layui.element;
getData()
getTeamTable();
getSubTeamTable();
getOwnTeamTable();
});
function getData() {
$.ajax({
type: 'post',
url: ctxPath + '/dataDetail/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.render({
elem: '#teamTable'
, url: ctxPath + '/dataDetail/getTeamTable' //数据接口
, method: 'post' //方式默认是get
, toolbar: 'default' //开启工具栏,此处显示默认图标,可以自定义模板,详见文档
, 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: '身份证'}
, {field: 'certification', align: 'center', title: '执证情况'}
, {field: 'skillLevel', align: 'center', title: '职称/技能等级'}
]]
, id: 'menuTable'
, page: true //开启分页
, loading: true //数据加载中。。。
, limits: [5, 10, 20, 100] //一页选择显示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: "#toolbar"
});
}
function getSubTeamTable() {
//渲染表格
table.render({
elem: '#subTeamTable'
, url: ctxPath + '/dataDetail/getSubTeamTable' //数据接口
, method: 'post' //方式默认是get
, toolbar: 'default' //开启工具栏,此处显示默认图标,可以自定义模板,详见文档
, where: {
proId: proId,
} //post请求必须加where post请求需要的参数
, cellMinWidth: 80
, cols: [[ //表头
{
field: 'number', width: 80, title: '序号', align: 'center', type: 'numbers'
}
, {field: 'subName', 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: '民族'}
2025-10-28 17:25:45 +08:00
, {field: 'idCard', align: 'center', title: '身份证',templet:d=>{
if(d.idCard){
if(d.idCard.length>18){
return decrypt(d.idCard)
}
}
return d.idCard;
}}
2025-05-20 16:37:46 +08:00
, {field: 'skillLevel', align: 'center', title: '职称/技能等级'}
]]
, id: 'menuTable'
, page: true //开启分页
, loading: true //数据加载中。。。
, limits: [5, 10, 20, 100] //一页选择显示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: "#toolbar"
});
}
function getOwnTeamTable() {
//渲染表格
table.render({
elem: '#ownTeamTable'
, url: ctxPath + '/dataDetail/getOwnTeamTable' //数据接口
, method: 'post' //方式默认是get
, toolbar: 'default' //开启工具栏,此处显示默认图标,可以自定义模板,详见文档
, 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: '民族'}
2025-10-28 17:25:45 +08:00
, {field: 'idCard', align: 'center', title: '身份证',templet:d=>{
if(d.idCard){
if(d.idCard.length>18){
return decrypt(d.idCard)
}
}
return d.idCard;
}}
2025-05-20 16:37:46 +08:00
, {field: 'certification', align: 'center', title: '执证情况'}
, {field: 'skillLevel', align: 'center', title: '职称/技能等级'}
]]
, id: 'menuTable'
, page: true //开启分页
, loading: true //数据加载中。。。
, limits: [5, 10, 20, 100] //一页选择显示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: "#toolbar"
});
}
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>