src/main/webapp/static/css/projectSchedule.css | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/webapp/static/js/projectSchedule/projectSchedule.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/webapp/static/js/projectSchedule/testData.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/webapp/views/projectSchedule/projectSchedule.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/webapp/static/css/projectSchedule.css
New file @@ -0,0 +1,35 @@ * { padding: 0; margin: 0; overflow: hidden; } body { height: 100%; } #container { padding: 10px 10px; position: absolute; height: 92%; background-color: #2E4E7E; overflow: auto; } .table { width: 210%; } .table, th, td { border: 1px solid #fff; text-align: center; color: #D9D9D9; } #tab-header tr>th{ background-color: #3A4A5A; width: 150px; height: 60px; } #tab-body tr>td{ height: 40px; } .projectName { background-color: #3A4A5A; } src/main/webapp/static/js/projectSchedule/projectSchedule.js
@@ -1,5 +1,72 @@ // 数据源 var data = { id:1 /*****************table渲染******************/ setTimeout(function(){ setHead(); setBody(); },500) setInterval(function(){ setBody(); changeTd(); },5000) /*****************header*********************/ function setHead() { $('#tab-header').empty() var headStr = [] for (var i = 0; i < headData.length; i++) { str = '<th class="projectName">' + headData[i] + '</th>' headStr += str } headStr = '<tr>' + headStr + '</tr>' $('#tab-header').append(headStr) } // 表格渲染 /*****************body***********************/ function setBody() { for (var i = 0; i < bodyData.length; i++) { for (var k in bodyData[i]) { if (bodyData[i][k] == null) { bodyData[i][k] = '' } } } $('#tab-body').empty() var bodyStr = [] for (var i = 0; i < bodyData.length; i++) { str = '<tr>' + '<td class="projectName">' + bodyData[i].name + '</td>' + '<td>' + bodyData[i].orderDesc + '</td>' + '<td>' + bodyData[i].salesman + '</td>' + '<td>' + bodyData[i].presaleAmt + '</td>' + '<td>' + bodyData[i].predeDate0$ + '</td>' + '<td>' + bodyData[i].preinDate0$ + '</td>' + '<td>' + bodyData[i].realMonth + '</td>' + '<td>' + bodyData[i].weight + '</td>' + '<td>' + bodyData[i].installMk + '</td>' + '<td>' + bodyData[i].deliveryMk + '</td>' + '<td>' + bodyData[i].custMan + '</td>' + '<td>' + bodyData[i].custMobile + '</td>' + '<td>' + bodyData[i].custAdress + '</td>' + '<td>' + bodyData[i].progressRate + '</td>' + '<td>' + bodyData[i].planCarInfo + '</td>' + '<td>' + bodyData[i].plandeDate0$ + '</td>' + '<td>' + bodyData[i].realdeDate0$ + '</td>' + '<td>' + bodyData[i].planinDate0$ + '</td>' + '<td>' + bodyData[i].realinDate0$ + '</td>' + '<td>' + bodyData[i].plandeAmt + '</td>' + '<td>' + bodyData[i].realdeAmt + '</td>' + '<td>' + bodyData[i].planinAmt + '</td>' + '<td>' + bodyData[i].realinAmt + '</td>' + '<td>' + bodyData[i].planFADate0$ + '</td>' + '<td>' + bodyData[i].realFADate0$ + '</td>' + '<td>' + bodyData[i].planLADate0$ + '</td>' + '<td>' + bodyData[i].realLADate0$ + '</td>' + '</tr>' bodyStr += str } $('#tab-body').append(bodyStr) } src/main/webapp/static/js/projectSchedule/testData.js
New file @@ -0,0 +1,52 @@ // header setTimeout(function(){ getProject(); },200) setInterval(function(){ getProject(); },5000) var headData = [ '客户名称', '订单类型', '业务员', '售前核价金额', '销售预交货期', '销售预安装期', '周期', '产品重量', '是否安装', '是否运输', '客户联系人', '客户联系方式', '客户地址', '任务进度', '预计车辆信息', '预计发货时间', '实际发货时间', '预计安装时间', '实际安装时间', '预计运费', '实际运费', '预计安装费', '实际安装费', '预计初验时间', '实际初验时间', '预计终验时间', '实际终验时间', ] // body var bodyData = '' function getProject() { $.ajax({ url: baseUrl+'/item/list/auth?limit=2000', headers:{token: localStorage.getItem('token')}, type:'GET', success:function(res) { if (res.code === 200) { bodyData = res.data.records; } } }) } src/main/webapp/views/projectSchedule/projectSchedule.html
@@ -3,13 +3,17 @@ <head> <meta charset="UTF-8"> <title>项目执行进度表</title> <link rel="stylesheet" href="../../static/css/common.css"> <link rel="stylesheet" href="../../static/css/projectSchedule.css"> <script src="../../static/js/jquery-3.3.1.min.js"></script> <script src="../../static/js/common.js"></script> <script src="../../static/js/projectSchedule/testData.js"></script> <script src="../../static/js/projectSchedule/projectSchedule.js"></script> </head> <body> <div id='container'> <div class="table"> <table border="1" cellspacing="" cellpadding=""> <table cellspacing="0" cellpadding="0"> <thead id="tab-header"></thead> <tbody id="tab-body"></tbody> </table>