From 5972c5e0070c00d65eb9d08b4c49357dbf3808c4 Mon Sep 17 00:00:00 2001 From: 18516761980 <4761516tqsxp> Date: 星期四, 07 四月 2022 16:55:51 +0800 Subject: [PATCH] . --- src/main/webapp/static/js/tableData.js | 48 ++++++++++++++++++++++++++++++++---------------- 1 files changed, 32 insertions(+), 16 deletions(-) diff --git a/src/main/webapp/static/js/tableData.js b/src/main/webapp/static/js/tableData.js index f1f5fc2..524eba0 100644 --- a/src/main/webapp/static/js/tableData.js +++ b/src/main/webapp/static/js/tableData.js @@ -1,14 +1,37 @@ setTimeout(function(){ getTheaddData() getThbodyData() - getWang() + getType() },0) setInterval(function(){ getThbodyData() },5000) + + var getType = function () { + $.ajax({ + url:baseurl+'/pms/projectPlan/dataSummary', + type:'GET', + data:{}, + success:function(res){ + if (res.code ===200 ) { + var str = '<tr>' + +'<th>' + '椤圭洰鎬绘暟' + '</th>' + '<th>'+ res.data.totalQuantity +'</th>' + +'<th>' + '闆嗘垚椤圭洰' + '</th>' + '<th>'+ res.data.intoSum +'</th>' + +'<th>' + '闈為泦鎴愰」鐩暟' + '</th>' + '<th>'+ res.data.wrongInto +'</th>' + +'<th>' + '宸查獙鏀堕」鐩暟' + '</th>' + '<th>'+ res.data.inspected +'</th>' + +'<th>' + '鏈獙鏀堕」鐩暟' + '</th>' + '<th>'+ res.data.wrongInspected +'</th>' + +'<th>' + '宸插畬宸ユ湭楠屾敹鏁�' + '</th>' + '<th>'+ res.data.finished +'</th>' + $("#type-header").append(str) + } + } + }) + } + + +/****************************************************************************************************************************************************************************/ + - - var proData = ["椤圭洰鍚嶇О","鍞墠閲戦鏍哥畻","寮�濮嬫椂闂�","缁撴潫鏃堕棿", + var proData = ["椤圭洰鍚嶇О","椤圭洰绫诲瀷","鍞墠閲戦鏍哥畻","寮�濮嬫椂闂�","缁撴潫鏃堕棿", "鍚堢害绛捐","鍥鹃潰浼氱","BOM璁捐/浜岀骇BOM涓嬪彂", "鏉愭枡閲囪喘","鐢熶骇鍒朵綔","鍐呴儴瀹夎璋冩暣锛堢爺鍙戠墿鏂欙級","杩涘満瀹夎","绋嬪簭璋冭瘯","绯荤粺鑱旇皟","涓婄嚎杩愯","椤圭洰楠屾敹","杩愯垂","瀹夎璐�"] var getTheaddData = function(){ @@ -39,7 +62,7 @@ // }, // }) } - + /*****************************************************************************************************************************************************************************/ var getThbodyData = function(){ $.ajax({ @@ -49,6 +72,7 @@ data:{}, success:function(res){ if(res.code==200){ + // console.log(res) data=res.data // 鍒ゆ柇鏃堕棿鏄惁鏈塶ull 鏈塶ull鐨勬敼涓� "" for(var i = 0;i<data.length;i++){ @@ -80,9 +104,10 @@ } var str2 = '<tr id="row'+i+'" class="row">' +'<th class="projects">'+data[i].id+'</th>' + +'<th class="projects">'+data[i].type+'</th>' +'<td class="nor-mal">'+data[i].presaleAmt+'</td>' - +'<td class="nor-mal">'+data[i].startDay.substring(0,10)+'</td>' - +'<td class="nor-mal">'+data[i].endDay.substring(0,10)+'</td>' + +'<td class="nor-mal">'+'<p>'+data[i].startDay.substring(0,10)+'</p>'+'</td>' + +'<td class="nor-mal">'+'<p>'+data[i].endDay.substring(0,10)+'</p>'+'</td>' var str9 = '<td class="normal">'+'<p>'+data[i].plandeAmt+'</p>'+'<p>'+data[i].realdeAmt+'</p>'+'</td>' + '<td class="normal">'+'<p>'+data[i].planinAmt+'</p>'+'<p>'+data[i].realinAmt+'</p>'+'</td>' var str3 = str2 +str + str9 +'</tr>' @@ -152,15 +177,6 @@ } /*****************************************************************************************************************************************************************************/ - function getWang() { - $.ajax({ - url:baseurl+'/pms/projectPlan/dataSummary', - type:'GET', - data:{}, - success:function(res){ - console.log(res) - } - }) - } + -- Gitblit v1.9.1