From 54095a376b9c0bfd84bec8a1cdd062b9f385c34a Mon Sep 17 00:00:00 2001
From: whycq <whycq>
Date: 星期四, 10 三月 2022 15:30:11 +0800
Subject: [PATCH] # ycq 项目执行进度表0.0.1
---
src/main/webapp/views/projectSchedule/projectSchedule.html | 6 +
src/main/webapp/static/js/projectSchedule/projectSchedule.js | 75 +++++++++++++++++++++++-
src/main/webapp/static/js/projectSchedule/testData.js | 52 +++++++++++++++++
src/main/webapp/static/css/projectSchedule.css | 35 +++++++++++
4 files changed, 163 insertions(+), 5 deletions(-)
diff --git a/src/main/webapp/static/css/projectSchedule.css b/src/main/webapp/static/css/projectSchedule.css
new file mode 100644
index 0000000..a4d033f
--- /dev/null
+++ b/src/main/webapp/static/css/projectSchedule.css
@@ -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;
+
+}
\ No newline at end of file
diff --git a/src/main/webapp/static/js/projectSchedule/projectSchedule.js b/src/main/webapp/static/js/projectSchedule/projectSchedule.js
index 3366637..58bb7c3 100644
--- a/src/main/webapp/static/js/projectSchedule/projectSchedule.js
+++ b/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)
+
+}
diff --git a/src/main/webapp/static/js/projectSchedule/testData.js b/src/main/webapp/static/js/projectSchedule/testData.js
new file mode 100644
index 0000000..cb3d17a
--- /dev/null
+++ b/src/main/webapp/static/js/projectSchedule/testData.js
@@ -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;
+ }
+
+ }
+ })
+}
diff --git a/src/main/webapp/views/projectSchedule/projectSchedule.html b/src/main/webapp/views/projectSchedule/projectSchedule.html
index 3789a1f..1f71f95 100644
--- a/src/main/webapp/views/projectSchedule/projectSchedule.html
+++ b/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>
--
Gitblit v1.9.1