index.ejs 124 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039
  1. <link href="/public/css/bootstrap/bootstrap-colorpicker.min.css" rel="stylesheet">
  2. <div class="panel-content" style="background:#2c3237 !important">
  3. <div class="panel-title fluid border-top-0" style="background:#2c3237 !important">
  4. <div class="title-main d-flex justify-content-between">
  5. <div class="d-inline-block mr-2">
  6. <div class="btn-group" id="first-category">
  7. <button type="button" class="btn btn-sm btn-outline-dark text-white dropdown-toggle" data-cid="" data-value="" data-toggle="dropdown">全部</button>
  8. <div class="dropdown-menu" aria-labelledby="zhankai">
  9. <a class="dropdown-item select-cate" data-value="" href="javascript:void(0);">全部</a>
  10. <% if (categoryData.length > 0 && categoryData[0].value.length > 0) { %>
  11. <% for (const c of categoryData[0].value) { %>
  12. <a class="dropdown-item select-cate" data-cid="<%- c.cid %>" data-value="<%- c.id %>" href="javascript:void(0);"><%- c.value %></a>
  13. <% } %>
  14. <% } %>
  15. </div>
  16. </div>
  17. <% if (categoryData[1] && categoryData[1].value.length > 0) { %>
  18. <div class="btn-group" id="second-category" style="display: none">
  19. <button type="button" class="btn btn-sm btn-outline-dark text-white dropdown-toggle" data-cid="" data-value="" data-toggle="dropdown">全部</button>
  20. <div class="dropdown-menu" aria-labelledby="zhankai">
  21. <a class="dropdown-item select-cate" data-value="" href="javascript:void(0);">全部</a>
  22. <% for (const c of categoryData[1].value) { %>
  23. <a class="dropdown-item select-cate" data-cid="<%- c.cid %>" data-value="<%- c.id %>" href="javascript:void(0);"><%- c.value %></a>
  24. <% } %>
  25. </div>
  26. </div>
  27. <% } %>
  28. <% if (categoryData[2] && categoryData[2].value.length > 0) { %>
  29. <div class="btn-group" id="third-category" style="display: none">
  30. <button type="button" class="btn btn-sm btn-outline-dark text-white dropdown-toggle" data-cid="" data-value="" data-toggle="dropdown">全部</button>
  31. <div class="dropdown-menu" aria-labelledby="zhankai">
  32. <a class="dropdown-item select-cate" data-value="" href="javascript:void(0);">全部</a>
  33. <% for (const c of categoryData[2].value) { %>
  34. <a class="dropdown-item select-cate" data-cid="<%- c.cid %>" data-value="<%- c.id %>" href="javascript:void(0);"><%- c.value %></a>
  35. <% } %>
  36. </div>
  37. </div>
  38. <% } %>
  39. </div>
  40. <div>
  41. <a href="javascript:void(0)" title="全屏显示" id="showFull" class="text-white"><i class="fa fa-arrows-alt"></i></a>
  42. <div class="btn-group">
  43. <button type="button" class="btn btn-sm btn-outline-dark text-white dropdown-toggle" data-toggle="dropdown" id="zhankai">决策大屏<span><%- ctx.session.sessionProject.dataCollect %></span></button>
  44. <div class="dropdown-menu" aria-labelledby="zhankai">
  45. <% for (const i of projectData.data_collect_pages) { %>
  46. <a class="dropdown-item change-collect" href="javascript:void(0)" data-collect="<%- i %>">决策大屏<%- i %></a>
  47. <% } %>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. <div class="content-wrap" id="big-data">
  54. <div style="height: 30px;background-color: #2c3237; display: none" id="exitfull-div">
  55. <div class="title-main d-flex">
  56. <div class="ml-auto">
  57. <div class="dropdown d-flex float-left mt-1 mr-2">
  58. <button id="exitFull" class="btn btn-sm btn-secondary ml-auto">退出全屏</button>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. <div class="c-body" style="background:#2c3237 !important">
  64. <div class="flex-content" data-content="1" <% if (ctx.session.sessionProject.dataCollect !== 1 && ctx.session.sessionProject.dataCollect !== 3) { %>style="display: none"<% } %>>
  65. <div class="row">
  66. <div class="col-3 pr-0">
  67. <div class="left-content">
  68. <div class="left-card-content">
  69. <div class="height-20 mb-2">
  70. <div class="card text-center bg-dark text-white ml-2 mr-2 py-1 height-100">
  71. <div class="card-body card-per-body">
  72. <div class="row">
  73. <div class="col-6">
  74. <h5 class="card-title card-case-title data_tender_num">0</h5>
  75. <p class="card-text card-case-text text-muted">标段个数</p>
  76. </div>
  77. <div class="col-6">
  78. <h5 class="card-title card-case-title data_tender_rate">0%</h5>
  79. <p class="card-text card-case-text text-muted">计量进度</p>
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. <div class="height-20 mb-2">
  86. <div class="card text-center bg-dark text-white ml-2 mr-2 py-2 height-100">
  87. <div class="card-body card-per-body">
  88. <h5 class="card-title card-case-title data_total_price">0.00</h5>
  89. <p class="card-text card-case-text text-muted">台账金额</p>
  90. </div>
  91. </div>
  92. </div>
  93. <div class="height-20 mb-2">
  94. <div class="card text-center bg-dark text-white ml-2 mr-2 py-2 height-100">
  95. <div class="card-body card-per-body" data-toggle="tooltip" data-placement="bottom" data-html="true" data-original-title="">
  96. <h5 class="card-title card-case-title data_total_checked_change_price">0.00</h5>
  97. <p class="card-text text-muted">已批复变更金额</p>
  98. </div>
  99. </div>
  100. </div>
  101. <div class="height-20 mb-2">
  102. <div class="card text-center bg-dark text-white ml-2 mr-2 py-2 height-100">
  103. <div class="card-body card-per-body">
  104. <h5 class="card-title card-case-title data_total_after_change_price">0.00</h5>
  105. <p class="card-text text-muted">变更后金额</p>
  106. </div>
  107. </div>
  108. </div>
  109. <div class="height-20 mb-2">
  110. <div class="card text-center bg-dark text-white ml-2 mr-2 py-2 height-100">
  111. <div class="card-body card-per-body">
  112. <h5 class="card-title card-case-title data_total_stage_price">0.00</h5>
  113. <p class="card-text text-muted">累计完成金额</p>
  114. </div>
  115. </div>
  116. </div>
  117. <!--<div class="height-20">-->
  118. <!--<div class="card text-center bg-dark text-white ml-2 mr-2 height-100">-->
  119. <!--<div class="card-body card-per-body">-->
  120. <!--<h5 class="card-title card-case-title data_total_material_price">0.00</h5>-->
  121. <!--<p class="card-text text-muted">材料调差</p>-->
  122. <!--</div>-->
  123. <!--</div>-->
  124. <!--</div>-->
  125. </div>
  126. <!--饼图-->
  127. <div class="left-chart">
  128. <div class="card height-100 bg-dark mt-2 ml-2 mr-2">
  129. <div id="jechart" class="jechart" style="height: 100%; width: 100%;"></div>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. <div class="col-6 pl-0 pr-0">
  135. <div class="center-content mr-2">
  136. <div class="center-chart-content">
  137. <div class="center-di">
  138. <div class="card bg-dark height-100">
  139. <div class="jlchart" data-chart-num="1" id="jlchart" style="height: 100%; width: 100%; <% if (ctx.session.sessionProject.dataCollect === 3) { %>display:none;<% } %>"></div>
  140. <div class="di-content mb-2" id="map1" style="background: #343A40; width: 100%; <% if (ctx.session.sessionProject.dataCollect === 1) { %>display:none;<% } %>">
  141. </div>
  142. </div>
  143. </div>
  144. <div class="center-chart">
  145. <div class="card height-100 bg-dark mt-2">
  146. <div class="jlchart" data-chart-num="2" id="jlchart" style="height: 100%; width: 100%; <% if (ctx.session.sessionProject.dataCollect === 1) { %>display:none;<% } %>"></div>
  147. <div class="di-content mb-2" <% if (ctx.session.sessionProject.dataCollect === 3) { %>style="display:none;"<% } %>>
  148. <div class="jldbchart" data-chart-num="1" id="jldbchart" style="height: 100%; width: 100%;"></div>
  149. </div>
  150. </div>
  151. </div>
  152. </div>
  153. <div class="center-table">
  154. <div class="card height-100 bg-dark mt-2">
  155. <h6 class="bg-dark text-center text-white m-0 py-3">标段明细数据</h6>
  156. <div class="tablebox">
  157. <table id="tableId">
  158. <thead>
  159. <tr>
  160. <th>标段</th>
  161. <th>期数</th>
  162. <th>0号台账</th>
  163. <th>本期完成</th>
  164. <th>截止本期完成</th>
  165. <th>本期应付</th>
  166. <th>截止本期应付</th>
  167. </tr>
  168. </thead>
  169. <tbody class="stage-data">
  170. </tbody>
  171. </table>
  172. <table id="tableId1"></table>
  173. </div>
  174. </div>
  175. </div>
  176. </div>
  177. </div>
  178. <div class="col-3 pl-0">
  179. <div class="right-content">
  180. <div class="right-chart-content">
  181. <div class="right-month">
  182. <h6 class="card bg-dark text-center text-white m-0 pt-2 pb-3">本月审批统计</h6>
  183. <div class="row right-month-height">
  184. <div class="col-6 pr-0 height-50">
  185. <div class="card text-center bg-dark text-white border-right-0 border-botton-0 height-100">
  186. <div class="card-body card-small-body height-100">
  187. <h5 class="card-title card-approve-title height-50"><span class="card-approve-big month_stage_num">0</span><small class="small-text">期</small></h5>
  188. <p class="card-text text-muted height-50">计量期</p>
  189. </div>
  190. </div>
  191. </div>
  192. <div class="col-6 pl-0 height-50">
  193. <div class="card text-center bg-dark text-white border-botton-0 height-100">
  194. <div class="card-body card-small-body height-100">
  195. <h5 class="card-title card-approve-title height-50"><span class="card-approve-big month_change_num">0</span><small class="small-text">条</small></h5>
  196. <p class="card-text text-muted height-50">变更令</p>
  197. </div>
  198. </div>
  199. </div>
  200. <div class="col-6 pr-0 height-50">
  201. <div class="card text-center bg-dark text-white border-right-0 border-top-0 height-100">
  202. <div class="card-body card-small-body height-100">
  203. <h5 class="card-title card-approve-title height-50"><span class="card-approve-big month_revise_num">0</span><small class="small-text">次</small></h5>
  204. <p class="card-text text-muted height-50">台账修订</p>
  205. </div>
  206. </div>
  207. </div>
  208. <div class="col-6 pl-0 height-50">
  209. <div class="card text-center bg-dark text-white border-top-0 height-100">
  210. <div class="card-body card-small-body height-100">
  211. <h5 class="card-title card-approve-title height-50"><span class="card-approve-big month_material_num">0</span><small class="small-text">期</small></h5>
  212. <p class="card-text text-muted height-50">材料调差</p>
  213. </div>
  214. </div>
  215. </div>
  216. </div>
  217. </div>
  218. <div class="right-chart">
  219. <div class="card height-100 bg-dark">
  220. <div class="jlwcdchart" id="jlwcdchart" style="height: 100%; width: 100%;"></div>
  221. </div>
  222. </div>
  223. </div>
  224. <div class="right-biaoduan">
  225. <div class="card height-100 bg-dark mt-2">
  226. <h6 class="bg-dark text-center text-white m-0 py-3">标段审批信息</h6>
  227. <div id="review_box" class="review_box m-0 p-3 mb-2">
  228. <ul class="list-unstyled list-comment" id="comment1">
  229. <% for (const notice of noticeList) { %>
  230. <% if(notice.type === pushType.stage) { %>
  231. <li class="media pb-3 mb-3 border-bottom-grey-1">
  232. <div class="media-body">
  233. <div class="row">
  234. <div class="col-2"><span class="badge badge-success">计量审批</span></div>
  235. <div class="col-10 text-white">
  236. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  237. <a href="/tender/<%- notice.tid %>/measure/stage/<%- notice.order %>" class="text-white">第<%- notice.order %>期 </a>
  238. <span class="<%- acStage.statusClass[notice.status] %>"><%- acStage.statusString[notice.status]%></span>
  239. </div>
  240. </div>
  241. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  242. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  243. </p>
  244. </div>
  245. </li>
  246. <% } else if(notice.type === pushType.material) { %>
  247. <li class="media pb-3 mb-3 border-bottom-grey-1">
  248. <div class="media-body">
  249. <div class="row">
  250. <div class="col-2"><span class="badge badge-secondary">材料调差</span></div>
  251. <div class="col-10 text-white">
  252. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  253. <a href="/tender/<%- notice.tid %>/measure/material/<%- notice.order %>" class="text-white">第<%- notice.order %>期 </a>
  254. <span class="<%- acMaterial.statusClass[notice.status] %>"><%- acMaterial.statusString[notice.status]%></span>
  255. </div>
  256. </div>
  257. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  258. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  259. </p>
  260. </div>
  261. </li>
  262. <% } else if(notice.type === pushType.ledger) { %>
  263. <li class="media pb-3 mb-3 border-bottom-grey-1">
  264. <div class="media-body">
  265. <div class="row">
  266. <div class="col-2"><span class="badge badge-info">台账审批</span></div>
  267. <div class="col-10 text-white">
  268. <a data-id="<%- notice.id %>"href="/tender/<%- notice.tid %>/ledger" class="text-white"><%- notice.name %></a> <span class="<%- acLedger.statusClass[notice.status] %>"><%- acLedger.statusString[notice.status]%></span>
  269. </div>
  270. </div>
  271. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  272. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  273. </p>
  274. </div>
  275. </li>
  276. <% } else if(notice.type === pushType.revise) { %>
  277. <li class="media pb-3 mb-3 border-bottom-grey-1">
  278. <div class="media-body">
  279. <div class="row">
  280. <div class="col-2"><span class="badge badge-info">台账修订</span></div>
  281. <div class="col-10 text-white">
  282. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  283. <a href="/tender/<%- notice.tid %>/revise/info" class="text-white">台账修订(第<%- notice.corder %>次)</a>
  284. <span class="<%- acRevise.statusClass[notice.status] %>"><%- acRevise.statusString[notice.status]%></span>
  285. </div>
  286. </div>
  287. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  288. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  289. </p>
  290. </div>
  291. </li>
  292. <% } else if(notice.type === pushType.change){ %>
  293. <li class="media pb-3 mb-3 border-bottom-grey-1">
  294. <div class="media-body">
  295. <div class="row">
  296. <div class="col-2"><span class="badge badge-danger">变更审批</span></div>
  297. <div class="col-10 text-white">
  298. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  299. <a href="/tender/<%- notice.tid %>/change/<%- notice.cid %>/information" class="text-white"><%- notice.c_code %> </a>
  300. <span class="<%- acChange.statusClass[notice.status] %>"><%- acChange.statusString[notice.status]%></span>
  301. </div>
  302. </div>
  303. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  304. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  305. </p>
  306. </div>
  307. </li>
  308. <% } else if(notice.type === pushType.advance) { %>
  309. <li class="media pb-3 mb-3 border-bottom-grey-1">
  310. <div class="media-body">
  311. <div class="row">
  312. <div class="col-2"><span class="badge badge-warning">预付款</span></div>
  313. <div class="col-10 text-white">
  314. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  315. <a href="/tender/<%- notice.tid %>/advance/<%- notice.vid %>/detail" class="text-white">第<%- notice.order %>期</a>
  316. <span class="<%- acAdvance.statusClass[notice.status] %>"><%- acAdvance.statusString[notice.status]%></span>
  317. </div>
  318. </div>
  319. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  320. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  321. </p>
  322. </div>
  323. </li>
  324. <% } %>
  325. <% } %>
  326. </ul>
  327. <ul id="comment2" class="list-comment"></ul>
  328. </div>
  329. </div>
  330. </div>
  331. </div>
  332. </div>
  333. </div>
  334. </div>
  335. <div class="flex-content" data-content="2" <% if (ctx.session.sessionProject.dataCollect !== 2 && ctx.session.sessionProject.dataCollect !== 4) { %>style="display: none"<% } %>>
  336. <div class="mx-3">
  337. <div class="row">
  338. <div class="col-6 pr-1">
  339. <div class="left-content">
  340. <div class="left-small-card-content ml-3">
  341. <div class="row height-100">
  342. <div class="col-4 pl-0">
  343. <div class="card text-center bg-dark text-white ml-0 mr-0 height-100">
  344. <div class="card-body card-per-body">
  345. <div class="row height-100">
  346. <div class="col-6">
  347. <h5 class="card-title card-case-title data_tender_num">0</h5>
  348. <p class="card-text card-case-text text-muted">标段个数</p>
  349. </div>
  350. <div class="col-6">
  351. <h5 class="card-title card-case-title data_tender_rate">0%</h5>
  352. <p class="card-text card-case-text text-muted">计量进度</p>
  353. </div>
  354. </div>
  355. </div>
  356. </div>
  357. </div>
  358. <div class="col-4 pl-0">
  359. <div class="card text-center bg-dark text-white height-100">
  360. <div class="card-body card-per-body">
  361. <h5 class="card-title card-case-title data_total_price">0.00</h5>
  362. <p class="card-text card-case-text text-muted">台账金额</p>
  363. </div>
  364. </div>
  365. </div>
  366. <div class="col-4 pl-0">
  367. <div class="card text-center bg-dark text-white height-100">
  368. <div class="card-body card-per-body" data-toggle="tooltip" data-placement="bottom" data-html="true" data-original-title="">
  369. <h5 class="card-title card-case-title data_total_checked_change_price">0.00</h5>
  370. <p class="card-text text-muted">已批复变更金额</p>
  371. </div>
  372. </div>
  373. </div>
  374. </div>
  375. </div>
  376. <div class="left-big-chart-content">
  377. <div class="card height-60 bg-dark mt-2 mb-2">
  378. <div class="jlchart" id="jlchart" style="height: 100%; width: 100%;"></div>
  379. </div>
  380. <div class="height-36">
  381. <div class="row height-100">
  382. <div class="col-6 pr-2">
  383. <div class="left-bottom-chart height-100">
  384. <div class="card height-100 bg-dark">
  385. <div class="jlwcdchart" id="jlwcdchart" style="height: 100%; width: 100%;"></div>
  386. </div>
  387. </div>
  388. </div>
  389. <div class="col-6 pl-0">
  390. <div class="left-bottom-chart height-100">
  391. <div class="card height-100 bg-dark">
  392. <div id="tztjchart" style="height: 100%; width: 100%;"></div>
  393. </div>
  394. </div>
  395. </div>
  396. </div>
  397. </div>
  398. </div>
  399. </div>
  400. </div>
  401. <div class="col-6 pl-1 pr-0">
  402. <div class="right-content">
  403. <div class="right-small-card-content mx-3">
  404. <div class="row height-100">
  405. <div class="col-4 pl-0">
  406. <div class="card text-center bg-dark text-white mb-2 height-100">
  407. <div class="card-body card-per-body">
  408. <h5 class="card-title card-case-title data_total_after_change_price">0.00</h5>
  409. <p class="card-text text-muted">变更后金额</p>
  410. </div>
  411. </div>
  412. </div>
  413. <div class="col-4 pl-0">
  414. <div class="card text-center bg-dark text-white height-100">
  415. <div class="card-body card-per-body">
  416. <h5 class="card-title card-case-title data_total_stage_price">0.00</h5>
  417. <p class="card-text card-case-text text-muted">累计完成金额</p>
  418. </div>
  419. </div>
  420. </div>
  421. <div class="col-4 pl-0">
  422. <div class="card text-center bg-dark text-white height-100">
  423. <div class="card-body card-per-body">
  424. <h5 class="card-title card-case-title data_total_advance_price">0.00</h5>
  425. <p class="card-text card-case-text text-muted">预付款</p>
  426. </div>
  427. </div>
  428. </div>
  429. <!--<div class="col-4 pl-0">-->
  430. <!--<div class="card text-center bg-dark text-white height-100">-->
  431. <!--<div class="card-body card-per-body">-->
  432. <!--<h5 class="card-title card-case-title data_total_material_price">0.00</h5>-->
  433. <!--<p class="card-text card-case-text text-muted">材料调差</p>-->
  434. <!--</div>-->
  435. <!--</div>-->
  436. <!--</div>-->
  437. </div>
  438. </div>
  439. <div class="right-big-chart-content mr-3">
  440. <div class="height-60 mt-2">
  441. <div class="card height-100 bg-dark">
  442. <div class="jldbchart" data-chart-num="2" id="jldbchart" style="height: 100%; width: 100%; <% if (ctx.session.sessionProject.dataCollect === 4) { %>display:none;<% } %>"></div>
  443. <div class="di-content mb-2" id="map2" style="height: 100%; width: 100%; <% if (ctx.session.sessionProject.dataCollect === 2) { %>display:none;<% } %>"></div>
  444. </div>
  445. </div>
  446. <div class="height-36 mt-2">
  447. <div class="height-100 right-bottom-50-fl">
  448. <div class="left-bd-scroll height-100 mr-1">
  449. <div class="card bg-dark height-100">
  450. <h6 class="bg-dark text-center text-white m-0 py-3">标段审批信息</h6>
  451. <div id="review_box2" class="review_box m-0 p-3 mb-2 height-100">
  452. <ul class="list-unstyled list-comment" id="comment3">
  453. <% for (const notice of noticeList) { %>
  454. <% if(notice.type === pushType.stage) { %>
  455. <li class="media pb-3 mb-3 border-bottom-grey-1">
  456. <div class="media-body">
  457. <div class="row">
  458. <div class="col-2"><span class="badge badge-success">计量审批</span></div>
  459. <div class="col-10 text-white">
  460. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  461. <a href="/tender/<%- notice.tid %>/measure/stage/<%- notice.order %>" class="text-white">第<%- notice.order %>期 </a>
  462. <span class="<%- acStage.statusClass[notice.status] %>"><%- acStage.statusString[notice.status]%></span>
  463. </div>
  464. </div>
  465. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  466. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  467. </p>
  468. </div>
  469. </li>
  470. <% } else if(notice.type === pushType.material) { %>
  471. <li class="media pb-3 mb-3 border-bottom-grey-1">
  472. <div class="media-body">
  473. <div class="row">
  474. <div class="col-2"><span class="badge badge-secondary">材料调差</span></div>
  475. <div class="col-10 text-white">
  476. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  477. <a href="/tender/<%- notice.tid %>/measure/material/<%- notice.order %>" class="text-white">第<%- notice.order %>期 </a>
  478. <span class="<%- acMaterial.statusClass[notice.status] %>"><%- acMaterial.statusString[notice.status]%></span>
  479. </div>
  480. </div>
  481. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  482. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  483. </p>
  484. </div>
  485. </li>
  486. <% } else if(notice.type === pushType.ledger) { %>
  487. <li class="media pb-3 mb-3 border-bottom-grey-1">
  488. <div class="media-body">
  489. <div class="row">
  490. <div class="col-2"><span class="badge badge-info">台账审批</span></div>
  491. <div class="col-10 text-white">
  492. <a data-id="<%- notice.id %>"href="/tender/<%- notice.tid %>/ledger" class="text-white"><%- notice.name %></a> <span class="<%- acLedger.statusClass[notice.status] %>"><%- acLedger.statusString[notice.status]%></span>
  493. </div>
  494. </div>
  495. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  496. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  497. </p>
  498. </div>
  499. </li>
  500. <% } else if(notice.type === pushType.revise) { %>
  501. <li class="media pb-3 mb-3 border-bottom-grey-1">
  502. <div class="media-body">
  503. <div class="row">
  504. <div class="col-2"><span class="badge badge-info">台账修订</span></div>
  505. <div class="col-10 text-white">
  506. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  507. <a href="/tender/<%- notice.tid %>/revise/info" class="text-white">台账修订(第<%- notice.corder %>次)</a>
  508. <span class="<%- acRevise.statusClass[notice.status] %>"><%- acRevise.statusString[notice.status]%></span>
  509. </div>
  510. </div>
  511. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  512. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  513. </p>
  514. </div>
  515. </li>
  516. <% } else if(notice.type === pushType.change){ %>
  517. <li class="media pb-3 mb-3 border-bottom-grey-1">
  518. <div class="media-body">
  519. <div class="row">
  520. <div class="col-2"><span class="badge badge-danger">变更审批</span></div>
  521. <div class="col-10 text-white">
  522. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  523. <a href="/tender/<%- notice.tid %>/change/<%- notice.cid %>/information" class="text-white"><%- notice.c_code %> </a>
  524. <span class="<%- acChange.statusClass[notice.status] %>"><%- acChange.statusString[notice.status]%></span>
  525. </div>
  526. </div>
  527. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  528. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  529. </p>
  530. </div>
  531. </li>
  532. <% } else if(notice.type === pushType.advance) { %>
  533. <li class="media pb-3 mb-3 border-bottom-grey-1">
  534. <div class="media-body">
  535. <div class="row">
  536. <div class="col-2"><span class="badge badge-warning">预付款</span></div>
  537. <div class="col-10 text-white">
  538. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  539. <a href="/tender/<%- notice.tid %>/advance/<%- notice.vid %>/detail" class="text-white">第<%- notice.order %>期</a>
  540. <span class="<%- acAdvance.statusClass[notice.status] %>"><%- acAdvance.statusString[notice.status]%></span>
  541. </div>
  542. </div>
  543. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  544. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  545. </p>
  546. </div>
  547. </li>
  548. <% } %>
  549. <% } %>
  550. </ul>
  551. <ul id="comment4" class="list-comment"></ul>
  552. </div>
  553. </div>
  554. </div>
  555. </div>
  556. <div class="height-100 right-bottom-50-fl">
  557. <div class="right-month height-100 ml-1">
  558. <h6 class="card bg-dark text-center text-white m-0 py-3">本月审批统计</h6>
  559. <div class="row right-month-height">
  560. <div class="col-6 pr-0">
  561. <div class="card text-center bg-dark text-white border-right-0 border-botton-0 height-100">
  562. <div class="card-body card-small-body">
  563. <h5 class="card-title card-approve-title height-50"><span class="card-approve-big month_stage_num">0</span><small class="small-text">期</small></h5>
  564. <p class="card-text text-muted height-50">计量期</p>
  565. </div>
  566. </div>
  567. </div>
  568. <div class="col-6 pl-0">
  569. <div class="card text-center bg-dark text-white border-botton-0 height-100">
  570. <div class="card-body card-small-body">
  571. <h5 class="card-title card-approve-title height-50"><span class="card-approve-big month_change_num">0</span><small class="small-text">条</small></h5>
  572. <p class="card-text text-muted height-50">变更令</p>
  573. </div>
  574. </div>
  575. </div>
  576. <div class="col-6 pr-0">
  577. <div class="card text-center bg-dark text-white border-right-0 border-top-0 height-100">
  578. <div class="card-body card-small-body">
  579. <h5 class="card-title card-approve-title height-50"><span class="card-approve-big month_revise_num">0</span><small class="small-text">次</small></h5>
  580. <p class="card-text text-muted height-50">台账修订</p>
  581. </div>
  582. </div>
  583. </div>
  584. <div class="col-6 pl-0">
  585. <div class="card text-center bg-dark text-white border-top-0 height-100">
  586. <div class="card-body card-small-body">
  587. <h5 class="card-title card-approve-title height-50"><span class="card-approve-big month_material_num">0</span><small class="small-text">期</small></h5>
  588. <p class="card-text text-muted height-50">材料调差</p>
  589. </div>
  590. </div>
  591. </div>
  592. </div>
  593. </div>
  594. </div>
  595. </div>
  596. </div>
  597. </div>
  598. </div>
  599. </div>
  600. </div>
  601. </div>
  602. <% if (ctx.helper._.includes(projectData.data_collect_pages, '5')) { %>
  603. <div class="flex-content" data-content="5" <% if (ctx.session.sessionProject.dataCollect !== 5) { %>style="display: none"<% } %>>
  604. <div class="row">
  605. <div class="col-3 pr-0">
  606. <div class="left-content">
  607. <div class="left-card-content">
  608. <div class="height-20 mb-2">
  609. <div class="card text-center bg-dark text-white ml-2 mr-2 py-1 height-100">
  610. <div class="card-body card-per-body">
  611. <div class="row">
  612. <div class="col-6">
  613. <h5 class="card-title card-case-title data_tender_num">0</h5>
  614. <p class="card-text card-case-text text-muted">工区个数</p>
  615. </div>
  616. <div class="col-6">
  617. <h5 class="card-title card-case-title data_tender_rate">0%</h5>
  618. <p class="card-text card-case-text text-muted">计量进度</p>
  619. </div>
  620. </div>
  621. </div>
  622. </div>
  623. </div>
  624. <div class="height-20 mb-2">
  625. <div class="card text-center bg-dark text-white ml-2 mr-2 py-2 height-100">
  626. <div class="card-body card-per-body">
  627. <h5 class="card-title card-case-title data_total_price">0.00</h5>
  628. <p class="card-text card-case-text text-muted">台账金额</p>
  629. </div>
  630. </div>
  631. </div>
  632. <div class="height-20 mb-2">
  633. <div class="card text-center bg-dark text-white ml-2 mr-2 py-2 height-100">
  634. <div class="card-body card-per-body" data-toggle="tooltip" data-placement="bottom" data-html="true" data-original-title="">
  635. <h5 class="card-title card-case-title data_total_checked_change_price">0.00</h5>
  636. <p class="card-text text-muted">已批复变更金额</p>
  637. </div>
  638. </div>
  639. </div>
  640. <div class="height-20 mb-2">
  641. <div class="card text-center bg-dark text-white ml-2 mr-2 py-2 height-100">
  642. <div class="card-body card-per-body">
  643. <h5 class="card-title card-case-title data_total_after_change_price">0.00</h5>
  644. <p class="card-text text-muted">变更后金额</p>
  645. </div>
  646. </div>
  647. </div>
  648. <div class="height-20 mb-2">
  649. <div class="card text-center bg-dark text-white ml-2 mr-2 py-2 height-100">
  650. <div class="card-body card-per-body">
  651. <h5 class="card-title card-case-title data_total_stage_price">0.00</h5>
  652. <p class="card-text text-muted">累计完成金额</p>
  653. </div>
  654. </div>
  655. </div>
  656. </div>
  657. <!--饼图-->
  658. <div class="left-chart">
  659. <div class="card height-100 bg-dark mt-2 ml-2 mr-2">
  660. <div id="jechart5" class="jechart" style="height: 100%; width: 100%;"></div>
  661. </div>
  662. </div>
  663. </div>
  664. </div>
  665. <div class="col-9 pl-0">
  666. <div class="center-content">
  667. <div class="center-chart-content">
  668. <div class="height-100">
  669. <div class="row pl-0 pr-0 center-di">
  670. <div class="col-12">
  671. <div class="card bg-dark height-100">
  672. <div class="jlchart" style="height: 100%; width: 100%;"></div>
  673. </div>
  674. </div>
  675. </div>
  676. <div class="row pl-3 pr-0 center-chart">
  677. <div class="col-8 pl-0 pr-0 height-100">
  678. <div class="card height-100 bg-dark mt-2 mr-2">
  679. <div class="di-content mb-2">
  680. <div class="jldbchart" id="jldbchart5" style="height: 100%; width: 100%;"></div>
  681. </div>
  682. </div>
  683. </div>
  684. <div class="col-4 pl-0 pr-0 height-100">
  685. <div class="card height-100 bg-dark mt-2 mb-2">
  686. <div class="jlwcdchart" id="jlwcdchart5" style="height: 100%; width: 100%;"></div>
  687. </div>
  688. </div>
  689. </div>
  690. </div>
  691. </div>
  692. <div class="row pl-3 pr-0 center-table">
  693. <div class="col-8 pl-0 pr-0 height-100">
  694. <div class="mr-2 height-100">
  695. <div class="card height-100 bg-dark mt-2">
  696. <h6 class="bg-dark text-center text-white m-0 py-3">各工区明细数据</h6>
  697. <div class="tablebox">
  698. <table id="tableId2">
  699. <thead>
  700. <tr>
  701. <th>标段</th>
  702. <th>期数</th>
  703. <th>0号台账</th>
  704. <th>本期完成</th>
  705. <th>截止本期完成</th>
  706. <th>本期应付</th>
  707. <th>截止本期应付</th>
  708. </tr>
  709. </thead>
  710. <tbody class="stage-data">
  711. </tbody>
  712. </table>
  713. <table id="tableId3"></table>
  714. </div>
  715. </div>
  716. </div>
  717. </div>
  718. <div class="col-4 pl-0 pr-0 height-100">
  719. <div class="card height-100 bg-dark mt-2 pr-3">
  720. <h6 class="bg-dark text-center text-white m-0 py-3">各工区审批信息</h6>
  721. <div id="review_box3" class="review_box m-0 p-3 mb-2">
  722. <ul class="list-unstyled list-comment" id="comment5">
  723. <% for (const notice of noticeList) { %>
  724. <% if(notice.type === pushType.stage) { %>
  725. <li class="media pb-3 mb-3 border-bottom-grey-1">
  726. <div class="media-body">
  727. <div class="row">
  728. <div class="col-2"><span class="badge badge-success">计量审批</span></div>
  729. <div class="col-10 text-white">
  730. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  731. <a href="/tender/<%- notice.tid %>/measure/stage/<%- notice.order %>" class="text-white">第<%- notice.order %>期 </a>
  732. <span class="<%- acStage.statusClass[notice.status] %>"><%- acStage.statusString[notice.status]%></span>
  733. </div>
  734. </div>
  735. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  736. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  737. </p>
  738. </div>
  739. </li>
  740. <% } else if(notice.type === pushType.material) { %>
  741. <li class="media pb-3 mb-3 border-bottom-grey-1">
  742. <div class="media-body">
  743. <div class="row">
  744. <div class="col-2"><span class="badge badge-secondary">材料调差</span></div>
  745. <div class="col-10 text-white">
  746. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  747. <a href="/tender/<%- notice.tid %>/measure/material/<%- notice.order %>" class="text-white">第<%- notice.order %>期 </a>
  748. <span class="<%- acMaterial.statusClass[notice.status] %>"><%- acMaterial.statusString[notice.status]%></span>
  749. </div>
  750. </div>
  751. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  752. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  753. </p>
  754. </div>
  755. </li>
  756. <% } else if(notice.type === pushType.ledger) { %>
  757. <li class="media pb-3 mb-3 border-bottom-grey-1">
  758. <div class="media-body">
  759. <div class="row">
  760. <div class="col-2"><span class="badge badge-info">台账审批</span></div>
  761. <div class="col-10 text-white">
  762. <a data-id="<%- notice.id %>"href="/tender/<%- notice.tid %>/ledger" class="text-white"><%- notice.name %></a> <span class="<%- acLedger.statusClass[notice.status] %>"><%- acLedger.statusString[notice.status]%></span>
  763. </div>
  764. </div>
  765. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  766. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  767. </p>
  768. </div>
  769. </li>
  770. <% } else if(notice.type === pushType.revise) { %>
  771. <li class="media pb-3 mb-3 border-bottom-grey-1">
  772. <div class="media-body">
  773. <div class="row">
  774. <div class="col-2"><span class="badge badge-info">台账修订</span></div>
  775. <div class="col-10 text-white">
  776. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  777. <a href="/tender/<%- notice.tid %>/revise/info" class="text-white">台账修订(第<%- notice.corder %>次)</a>
  778. <span class="<%- acRevise.statusClass[notice.status] %>"><%- acRevise.statusString[notice.status]%></span>
  779. </div>
  780. </div>
  781. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  782. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  783. </p>
  784. </div>
  785. </li>
  786. <% } else if(notice.type === pushType.change){ %>
  787. <li class="media pb-3 mb-3 border-bottom-grey-1">
  788. <div class="media-body">
  789. <div class="row">
  790. <div class="col-2"><span class="badge badge-danger">变更审批</span></div>
  791. <div class="col-10 text-white">
  792. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  793. <a href="/tender/<%- notice.tid %>/change/<%- notice.cid %>/information" class="text-white"><%- notice.c_code %> </a>
  794. <span class="<%- acChange.statusClass[notice.status] %>"><%- acChange.statusString[notice.status]%></span>
  795. </div>
  796. </div>
  797. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  798. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  799. </p>
  800. </div>
  801. </li>
  802. <% } else if(notice.type === pushType.advance) { %>
  803. <li class="media pb-3 mb-3 border-bottom-grey-1">
  804. <div class="media-body">
  805. <div class="row">
  806. <div class="col-2"><span class="badge badge-warning">预付款</span></div>
  807. <div class="col-10 text-white">
  808. <a href="/tender/<%- notice.tid %>" class="text-white"><%- notice.name %></a>
  809. <a href="/tender/<%- notice.tid %>/advance/<%- notice.vid %>/detail" class="text-white">第<%- notice.order %>期</a>
  810. <span class="<%- acAdvance.statusClass[notice.status] %>"><%- acAdvance.statusString[notice.status]%></span>
  811. </div>
  812. </div>
  813. <p class="mt-1 mb-0 text-white"><%- notice.su_name %><small class="ml-1 text-muted"><%- (notice.su_role ? '- ' + notice.su_role : '') %></small>
  814. <span class="pull-right text-muted"><%- ctx.helper.formatFullDate(notice.create_time) %></span>
  815. </p>
  816. </div>
  817. </li>
  818. <% } %>
  819. <% } %>
  820. </ul>
  821. <ul id="comment6" class="list-comment"></ul>
  822. </div>
  823. </div>
  824. </div>
  825. </div>
  826. </div>
  827. </div>
  828. </div>
  829. <% } %>
  830. </div>
  831. </div>
  832. </div>
  833. </div>
  834. <script src="/public/js/datacollect_scroll.js"></script>
  835. <script type="text/javascript"> autoFlashHeight();</script>
  836. <script type="text/javascript">
  837. const is_dz = <%- ctx.helper._.includes(projectData.data_collect_pages, '5') %>;
  838. // 分类金额饼图表
  839. var chart1 = document.getElementsByClassName('jechart');
  840. // var myChart1 = echarts.init(document.getElementById('jechart'), 'dark');
  841. option1 = {
  842. tooltip : {
  843. trigger: 'item',
  844. formatter: "{a} <br/>{b} : {c} ({d}%)",
  845. // 当前鼠标位置
  846. position: 'right',
  847. },
  848. title: {
  849. text: '金额统计图',
  850. left: 'center',
  851. top:'7%'
  852. },
  853. color: ['rgba(38, 217, 217,0.7)','rgba(78, 139, 229,0.7)',
  854. 'rgba(78, 229, 139,0.7)','rgba(108, 78, 229,0.7)',
  855. 'rgba(58,207,221,0.7)','rgba(164, 229, 78,0.7)',
  856. 'rgba(199, 78, 229,0.7)', 'rgba(229, 92, 174, 0.7)',
  857. 'rgba(229, 214, 78, 0.7)', 'rgba(241, 87, 96, 0.7)',
  858. 'rgba(242, 179, 82, 0.7)'],
  859. backgroundColor: '#343a40 ',
  860. // tooltip: {
  861. // trigger: 'item'
  862. // },
  863. // legend: {
  864. // orient: 'vertical',
  865. // left: 'center',
  866. // },
  867. series: [
  868. {
  869. name: '台账金额',
  870. type: 'pie',
  871. radius: '60%',
  872. top:'15%',
  873. formatter: function(name){
  874. return name.length>10?name.substr(0,10)+"...":name;
  875. },
  876. data: [],
  877. emphasis: {
  878. itemStyle: {
  879. shadowBlur: 10,
  880. shadowOffsetX: 0,
  881. shadowColor: 'rgba(0, 0, 0, 0.5)'
  882. }
  883. }
  884. }
  885. ]
  886. };
  887. var myChart1_1 = echarts.init(chart1[0], 'dark');
  888. myChart1_1.setOption(option1);
  889. if (is_dz) {
  890. var myChart1_2 = echarts.init(chart1[1], 'dark');
  891. myChart1_2.setOption(option1);
  892. }
  893. // 计量情况柱状图表
  894. // var myChart2 = echarts.init(document.getElementsByClassName('jlchart')[0], 'dark');
  895. option2 = {
  896. title: {
  897. text: '计量情况',
  898. left: 'center',
  899. top:'5%'
  900. },
  901. color: ['rgba(38, 217, 217,0.7)','rgba(78, 139, 229,0.7)',
  902. 'rgba(78, 229, 139,0.7)','rgba(108, 78, 229,0.7)',
  903. 'rgba(58,207,221,0.7)','rgba(164, 229, 78,0.7)',
  904. 'rgba(199, 78, 229,0.7)', 'rgba(229, 92, 174, 0.7)',
  905. 'rgba(229, 214, 78, 0.7)', 'rgba(241, 87, 96, 0.7)',
  906. 'rgba(242, 179, 82, 0.7)'],
  907. backgroundColor: '#343a40 ',
  908. tooltip: {
  909. trigger: 'axis',
  910. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  911. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  912. },
  913. },
  914. dataZoom: [
  915. {
  916. brushSelect:false,
  917. // zoomLock: false,
  918. type: 'slider',
  919. show: true,
  920. realtime: true,
  921. showdetail: false,
  922. showDataShadow: false,
  923. // dataZoomIndex: 10,
  924. start: 0,
  925. end: 8,
  926. handleSize: 0,
  927. height: 10,
  928. bottom: '10%',
  929. },
  930. // {
  931. // // realtime: true,
  932. // type: 'slider',
  933. // show: true,
  934. // realtime: true,
  935. // showdetail: false,
  936. // showDataShadow: false,
  937. // // dataZoomIndex: 10,
  938. // start: 0,
  939. // end: 8,
  940. // handleSize: 0,
  941. // bottom:30,
  942. // height:10,
  943. // }
  944. ],
  945. legend: {
  946. data: ['台账', '截止合同计量', '截止变更计量'],
  947. top:'17%'
  948. },
  949. grid: {
  950. top:'25%',
  951. left: '3%',
  952. right: '4%',
  953. bottom: '15%',
  954. containLabel: true
  955. },
  956. xAxis: [
  957. {
  958. type: 'category',
  959. data: [],
  960. axisLabel: {
  961. show: true,
  962. interval: 0,
  963. textStyle: {
  964. color: "#fff",
  965. fontSize: 14
  966. },
  967. formatter: function(value) {
  968. var res = value;
  969. if(res.length > 6) {
  970. res = res.substring(0, 5) + "..";
  971. }
  972. return res;
  973. }
  974. }
  975. }
  976. ],
  977. yAxis: [
  978. {
  979. type: 'value',
  980. name:'金额',
  981. position: 'left',
  982. axisLabel : {
  983. formatter: function (value, index) {
  984. if (value < 0) {
  985. let newValue = Math.abs(value);
  986. if (newValue >= 10000 && newValue < 10000000) {
  987. newValue = newValue / 10000 + "万";
  988. } else if (newValue >= 10000000) {
  989. newValue = newValue / 10000000 + "千万";
  990. }
  991. value = '-' + newValue;
  992. }
  993. if (value >= 10000 && value < 10000000) {
  994. value = value / 10000 + "万";
  995. } else if (value >= 10000000) {
  996. value = value / 10000000 + "千万";
  997. }
  998. return value;
  999. }
  1000. },
  1001. splitArea : {show : true}
  1002. },
  1003. // {
  1004. // type: 'value',
  1005. // name:'完成度',
  1006. // position: 'right',
  1007. // min:0,
  1008. // max:100,
  1009. // axisLabel : {
  1010. // formatter: '{value} %'
  1011. // },
  1012. // splitArea : {show : true}
  1013. // }
  1014. ],
  1015. series: [
  1016. {
  1017. name: '台账',
  1018. type: 'bar',
  1019. emphasis: {
  1020. focus: 'series'
  1021. },
  1022. data: []
  1023. },
  1024. {
  1025. name: '截止合同计量',
  1026. type: 'bar',
  1027. stack: '计量',
  1028. emphasis: {
  1029. focus: 'series'
  1030. },
  1031. data: []
  1032. },
  1033. {
  1034. name: '截止变更计量',
  1035. type: 'bar',
  1036. stack: '计量',
  1037. emphasis: {
  1038. focus: 'series'
  1039. },
  1040. data: []
  1041. }
  1042. ]
  1043. };
  1044. var chart2 = document.getElementsByClassName('jlchart');
  1045. var myChart2_1 = echarts.init(chart2[0], 'dark');
  1046. var myChart2_2 = echarts.init(chart2[1], 'dark');
  1047. var myChart2_3 = echarts.init(chart2[2], 'dark');
  1048. myChart2_1.setOption(option2);
  1049. myChart2_2.setOption(option2);
  1050. myChart2_3.setOption(option2);
  1051. if (is_dz) {
  1052. var myChart2_4 = echarts.init(chart2[3], 'dark');
  1053. const option2_4 = _.cloneDeep(option2);
  1054. option2_4.title.text = '各工区计量情况';
  1055. myChart2_4.setOption(option2_4);
  1056. }
  1057. // myChart2.setOption(option);
  1058. // 计量完成度统计柱状图表
  1059. // var myChart3 = echarts.init(document.getElementsByClassName('jlwcdchart')[0], 'dark');
  1060. option3 = {
  1061. title: {
  1062. text: '计量完成度统计',
  1063. left: 'center',
  1064. top:'5%'
  1065. },
  1066. color: ['rgba(38, 217, 217,0.7)','rgba(78, 139, 229,0.7)',
  1067. 'rgba(78, 229, 139,0.7)','rgba(108, 78, 229,0.7)',
  1068. 'rgba(58,207,221,0.7)','rgba(164, 229, 78,0.7)',
  1069. 'rgba(199, 78, 229,0.7)', 'rgba(229, 92, 174, 0.7)',
  1070. 'rgba(229, 214, 78, 0.7)', 'rgba(241, 87, 96, 0.7)',
  1071. 'rgba(242, 179, 82, 0.7)'],
  1072. backgroundColor: '#343a40 ',
  1073. tooltip: {
  1074. trigger: 'axis',
  1075. axisPointer: { // Use axis to trigger tooltip
  1076. type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
  1077. }
  1078. },
  1079. grid: {
  1080. left: '10%',
  1081. right: '10%',
  1082. bottom: '3%',
  1083. containLabel: true
  1084. },
  1085. xAxis: {
  1086. type: 'value'
  1087. },
  1088. yAxis: {
  1089. type: 'category',
  1090. data: [],
  1091. axisLabel: {
  1092. show: true,
  1093. interval: 0,
  1094. // textStyle: {
  1095. // color: "#fff",
  1096. // fontSize: 14
  1097. // },
  1098. formatter: function(value) {
  1099. var res = value;
  1100. if(res.length > 6) {
  1101. res = res.substring(0, 5) + "..";
  1102. }
  1103. return res;
  1104. }
  1105. }
  1106. },
  1107. dataZoom: [
  1108. {
  1109. brushSelect:false,
  1110. start: 0,
  1111. end: 10,
  1112. type: 'slider',
  1113. show: true,
  1114. handleSize: 0,
  1115. realtime: true,
  1116. showDetail: false,
  1117. // filterMode: 'empty',
  1118. yAxisIndex: [0,1],
  1119. width: 10,
  1120. height: '80%',
  1121. right: '5%',
  1122. bottom:'2%'
  1123. },
  1124. ],
  1125. series: [
  1126. {
  1127. name: '完成度',
  1128. type: 'bar',
  1129. stack: 'total',
  1130. label: {
  1131. show: true
  1132. },
  1133. emphasis: {
  1134. focus: 'series'
  1135. },
  1136. data: []
  1137. }
  1138. ]
  1139. };
  1140. var chart3 = document.getElementsByClassName('jlwcdchart');
  1141. var myChart3_1 = echarts.init(chart3[0], 'dark');
  1142. var myChart3_2 = echarts.init(chart3[1], 'dark');
  1143. myChart3_1.setOption(option3);
  1144. myChart3_2.setOption(option3);
  1145. if (is_dz) {
  1146. var myChart3_3 = echarts.init(chart3[2], 'dark');
  1147. const option3_3 = _.cloneDeep(option3);
  1148. option3_3.title.text = '各工区计量完成百分比统计';
  1149. myChart3_3.setOption(option3_3);
  1150. }
  1151. // 计量对比线形图表
  1152. option4 = {
  1153. title: {
  1154. text: '计量对比',
  1155. left: 'center',
  1156. top:'5%'
  1157. },
  1158. color: ['rgba(38, 217, 217,0.7)','rgba(78, 139, 229,0.7)',
  1159. 'rgba(78, 229, 139,0.7)','rgba(108, 78, 229,0.7)',
  1160. 'rgba(58,207,221,0.7)','rgba(164, 229, 78,0.7)',
  1161. 'rgba(199, 78, 229,0.7)', 'rgba(229, 92, 174, 0.7)',
  1162. 'rgba(229, 214, 78, 0.7)', 'rgba(241, 87, 96, 0.7)',
  1163. 'rgba(242, 179, 82, 0.7)'],
  1164. backgroundColor: '#343a40 ',
  1165. tooltip: {
  1166. trigger: 'axis',
  1167. axisPointer: {
  1168. type: 'cross',
  1169. label: {
  1170. backgroundColor: '#6a7985'
  1171. }
  1172. }
  1173. },
  1174. legend: {
  1175. data: ['本月计量', '累计计量'],
  1176. top:'15%'
  1177. },
  1178. grid: {
  1179. top:'25%',
  1180. left: '3%',
  1181. right: '4%',
  1182. bottom: '15%',
  1183. containLabel: true
  1184. },
  1185. xAxis: [
  1186. {
  1187. type: 'category',
  1188. boundaryGap: false,
  1189. data: []
  1190. }
  1191. ],
  1192. yAxis: [
  1193. {
  1194. type: 'value',
  1195. axisLabel : {
  1196. formatter: function (value, index) {
  1197. if (value < 0) {
  1198. let newValue = Math.abs(value);
  1199. if (newValue >= 10000 && newValue < 10000000) {
  1200. newValue = newValue / 10000 + "万";
  1201. } else if (newValue >= 10000000) {
  1202. newValue = newValue / 10000000 + "千万";
  1203. }
  1204. value = '-' + newValue;
  1205. }
  1206. if (value >= 10000 && value < 10000000) {
  1207. value = value / 10000 + "万";
  1208. } else if (value >= 10000000) {
  1209. value = value / 10000000 + "千万";
  1210. }
  1211. return value;
  1212. }
  1213. },
  1214. }
  1215. ],
  1216. dataZoom: [
  1217. {
  1218. brushSelect: false,
  1219. showdetail: false,
  1220. show: true,
  1221. realtime: true,
  1222. dataZoomIndex: 10,
  1223. start: 0,
  1224. end: 5,
  1225. handleSize: 0,
  1226. height: 10,
  1227. bottom: '10%'
  1228. },
  1229. ],
  1230. series: [
  1231. {
  1232. name: '本月计量',
  1233. type: 'line',
  1234. stack: '总量',
  1235. areaStyle: {},
  1236. emphasis: {
  1237. focus: 'series'
  1238. },
  1239. data: []
  1240. },
  1241. {
  1242. name: '累计计量',
  1243. type: 'line',
  1244. stack: '总量',
  1245. areaStyle: {},
  1246. emphasis: {
  1247. focus: 'series'
  1248. },
  1249. data: []
  1250. }
  1251. ]
  1252. };
  1253. var chart4 = document.getElementsByClassName('jldbchart');
  1254. var myChart4_1 = echarts.init(chart4[0], 'dark');
  1255. var myChart4_2 = echarts.init(chart4[1], 'dark');
  1256. myChart4_1.setOption(option4);
  1257. myChart4_2.setOption(option4);
  1258. if (is_dz) {
  1259. var myChart4_3 = echarts.init(chart4[2], 'dark');
  1260. const option4_3 = _.cloneDeep(option4);
  1261. option4_3.title.text = '全线计量对比';
  1262. myChart4_3.setOption(option4_3);
  1263. }
  1264. // for (var i = 0; i < chart4.length; i++) {
  1265. // var myChart4 = echarts.init(chart4[i], 'dark');
  1266. // myChart4.setOption(option);
  1267. // }
  1268. // 投资统计分析圆饼图表
  1269. var myChart5 = echarts.init(document.getElementById('tztjchart'), 'dark');
  1270. option5 = {
  1271. title: {
  1272. text: '投资统计分析',
  1273. left: 'center',
  1274. top:'7%'
  1275. },
  1276. color: ['rgba(38, 217, 217,0.7)','rgba(78, 139, 229,0.7)',
  1277. 'rgba(78, 229, 139,0.7)','rgba(108, 78, 229,0.7)',
  1278. 'rgba(58,207,221,0.7)','rgba(164, 229, 78,0.7)',
  1279. 'rgba(199, 78, 229,0.7)', 'rgba(229, 92, 174, 0.7)',
  1280. 'rgba(229, 214, 78, 0.7)', 'rgba(241, 87, 96, 0.7)',
  1281. 'rgba(242, 179, 82, 0.7)'],
  1282. backgroundColor: '#343a40 ',
  1283. tooltip: {
  1284. trigger: 'item',
  1285. },
  1286. series: [
  1287. {
  1288. name: '数据来源',
  1289. type: 'pie',
  1290. top:'15%',
  1291. bottom:'10%',
  1292. radius: <% if (categoryData && categoryData[2] && categoryData[2].value.length > 0) { %>['0%', '30%']<% } else if (categoryData && categoryData[1] && categoryData[1].value.length > 0) { %>['0%', '50%']<% } else { %>['0%', '85%']<% } %>,
  1293. // label: {
  1294. // position: 'inner',
  1295. // fontSize: 14
  1296. // },
  1297. label:{
  1298. show:false
  1299. },
  1300. labelLine: {
  1301. show: true
  1302. },
  1303. formatter: function(name){
  1304. return name.length>10?name.substr(0,10)+"...":name;
  1305. },
  1306. data: [
  1307. ]
  1308. },
  1309. {
  1310. name: '数据来源',
  1311. type: 'pie',
  1312. top:'15%',
  1313. bottom:'10%',
  1314. radius: <% if (categoryData && categoryData[2] && categoryData[2].value.length > 0) { %>['30%', '60%']<% } else { %>['50%', '85%']<% } %>,
  1315. // label: {
  1316. // position: 'inner',
  1317. // fontSize: 14
  1318. // },
  1319. label:{
  1320. show:false
  1321. },
  1322. labelLine: {
  1323. show: true,
  1324. },
  1325. formatter: function(name){
  1326. return name.length>10?name.substr(0,10)+"...":name;
  1327. },
  1328. data: [
  1329. ]
  1330. },
  1331. {
  1332. name: '数据来源',
  1333. type: 'pie',
  1334. top:'15%',
  1335. bottom:'10%',
  1336. radius: ['60%', '85%'],
  1337. // label: {
  1338. // position: 'inner',
  1339. // fontSize: 14
  1340. // },
  1341. label:{
  1342. show:false
  1343. },
  1344. labelLine: {
  1345. show: true
  1346. },
  1347. formatter: function(name){
  1348. return name.length>10?name.substr(0,10)+"...":name;
  1349. },
  1350. data: [
  1351. ]
  1352. }
  1353. ]
  1354. };
  1355. myChart5.setOption(option5);
  1356. function echartsReset() {
  1357. myChart1_1.resize();
  1358. myChart2_1.resize();
  1359. myChart2_2.resize();
  1360. myChart2_3.resize();
  1361. myChart3_1.resize();
  1362. myChart3_2.resize();
  1363. myChart4_1.resize();
  1364. myChart4_2.resize();
  1365. myChart5.resize();
  1366. if (is_dz) {
  1367. myChart1_2.resize();
  1368. myChart2_4.resize();
  1369. myChart3_3.resize();
  1370. myChart4_3.resize();
  1371. }
  1372. }
  1373. $(function () {
  1374. $('#showFull').click(function () {
  1375. const full=document.getElementById("big-data");
  1376. launchIntoFullscreen(full);
  1377. });
  1378. $('#exitFull').click(function () {
  1379. exitFullscreen();
  1380. })
  1381. })
  1382. let resizeTimer = null;
  1383. $(window).bind('resize', function () {
  1384. if (resizeTimer) clearTimeout(resizeTimer);
  1385. resizeTimer = setTimeout(function () {
  1386. echartsReset();
  1387. $(".tableid_").find('th').each(function(i) {
  1388. $(this).css('width', $('#tableId').find('th:eq(' + i + ')').innerWidth());
  1389. $(this).css('width', $('#tableId2').find('th:eq(' + i + ')').innerWidth());
  1390. });
  1391. }, 500);
  1392. })
  1393. // 数据全屏
  1394. function launchIntoFullscreen(element) {
  1395. if(element.requestFullscreen){
  1396. element.requestFullscreen();
  1397. }
  1398. else if(element.mozRequestFullScreen) {
  1399. element.mozRequestFullScreen();
  1400. }
  1401. else if(element.webkitRequestFullscreen) {
  1402. element.webkitRequestFullscreen();
  1403. }
  1404. else if(element.msRequestFullscreen) {
  1405. element.msRequestFullscreen();
  1406. }
  1407. }
  1408. function exitFullscreen() {
  1409. if(document.exitFullscreen) {
  1410. document.exitFullscreen();
  1411. } else if(document.mozCancelFullScreen) {
  1412. document.mozCancelFullScreen();
  1413. } else if(document.webkitExitFullscreen) {
  1414. document.webkitExitFullscreen();
  1415. }
  1416. }
  1417. document.addEventListener("fullscreenchange", function (event) {
  1418. if (document.fullscreenElement) {
  1419. $('#exitfull-div').show();
  1420. $('#showFull').hide();
  1421. } else {
  1422. $('#exitfull-div').hide();
  1423. $('#showFull').show();
  1424. }
  1425. });
  1426. </script>
  1427. <!--<script src="/public/js/map/turf.min.js"></script>-->
  1428. <!--<script src="/public/js/map/gcoord.js"></script>-->
  1429. <!--<script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=C3hLZAjuWTaCdwnwoYY83APrwlPEj4v7"></script>-->
  1430. <script>
  1431. // let map1, map2;
  1432. // function loadScript() {
  1433. // var script = document.createElement("script");
  1434. // script.src = "https://api.map.baidu.com/api?v=1.0&type=webgl&ak=C3hLZAjuWTaCdwnwoYY83APrwlPEj4v7&callback=initialize";
  1435. // document.body.appendChild(script);
  1436. // }
  1437. // window.onload = loadScript;
  1438. // const map1 = new BMapGL.Map("map1");
  1439. // const map2 = new BMapGL.Map("map2");
  1440. // map1.enableScrollWheelZoom(true);
  1441. // map1.setMapStyleV2({styleId: '20d4aea41cf71387395f2dc835f1c4b6'});
  1442. // map2.enableScrollWheelZoom(true);
  1443. // map2.setMapStyleV2({styleId: '20d4aea41cf71387395f2dc835f1c4b6'});
  1444. const originDataCollect = parseInt('<%- ctx.session.sessionProject.dataCollect %>');
  1445. const category = JSON.parse(unescape('<%- escape(JSON.stringify(categoryData)) %>'));
  1446. <!--const mapJson = JSON.parse(unescape('<%- escape(JSON.stringify(map_json)) %>'));-->
  1447. let tenders = '';
  1448. // let noticeList = '';
  1449. $(function () {
  1450. postData('/datacollect/load', {}, function (result) {
  1451. tenders = result.tenderList;
  1452. const chart_option5_data = {
  1453. data1: [],
  1454. data2: [],
  1455. data3: [],
  1456. }
  1457. const chart_category_data = {
  1458. data1: [],
  1459. data2: [],
  1460. data3: [],
  1461. }
  1462. let option5_is_tender = false;
  1463. // 设置圆环图5数据,还要设置圆环图大小
  1464. if (category && category.length > 0) {
  1465. if (category[0] && category[0].value.length > 0) {
  1466. for (const c of category[0].value) {
  1467. chart_category_data.data1.push([{
  1468. cid: category[0].id,
  1469. value: c.id,
  1470. }]);
  1471. chart_option5_data.data1.push({
  1472. value: 0,
  1473. name: c.value,
  1474. });
  1475. }
  1476. }
  1477. if (category[1] && category[1].value.length > 0) {
  1478. for (const cc1 of chart_category_data.data1) {
  1479. for (const c of category[1].value) {
  1480. chart_category_data.data2.push([...cc1, {
  1481. cid: category[1].id,
  1482. value: c.id,
  1483. }]);
  1484. }
  1485. }
  1486. for (const cd1 of chart_option5_data.data1) {
  1487. for (const c of category[1].value) {
  1488. chart_option5_data.data2.push({
  1489. value: 0,
  1490. name: cd1.name + ' ' + c.value,
  1491. });
  1492. }
  1493. }
  1494. }
  1495. if (category[2] && category[2].value.length > 0) {
  1496. for (const cc2 of chart_category_data.data2) {
  1497. for (const c of category[2].value) {
  1498. chart_category_data.data3.push([...cc2, {
  1499. cid: category[2].id,
  1500. value: c.id,
  1501. }]);
  1502. }
  1503. }
  1504. for (const cd2 of chart_option5_data.data2) {
  1505. for (const c of category[2].value) {
  1506. chart_option5_data.data3.push({
  1507. value: 0,
  1508. name: cd2.name + ' ' + c.value,
  1509. });
  1510. }
  1511. }
  1512. }
  1513. } else {
  1514. option5_is_tender = true;
  1515. }
  1516. for (const t of tenders) {
  1517. calculateTender(t);
  1518. if (option5_is_tender) {
  1519. if (t.total_price) chart_option5_data.data1.push({ value: t.total_price, name: t.name});
  1520. } else {
  1521. for (const cc1 of chart_category_data.data1) {
  1522. const sameObject = _.intersectionWith(t.category, cc1, _.isEqual);
  1523. if(sameObject.length === 1) {
  1524. const index = _.findIndex(chart_category_data.data1, function (item) {
  1525. return _.isEqual(_.sortBy(item, 'cid'), _.sortBy(sameObject, 'cid'));
  1526. });
  1527. if (index !== -1) {
  1528. chart_option5_data.data1[index].value = ZhCalc.add(chart_option5_data.data1[index].value, (t.total_price ? t.total_price : 0));
  1529. }
  1530. }
  1531. // const index = sameObject[0] ? _.findIndex(cc1, { cid: sameObject[0].cid, value: sameObject[0].value }) : -1;
  1532. // console.log(cc1, chart_category_data.data1, index);
  1533. // if (index !== -1) {
  1534. // chart_option5_data.data1[index].value = ZhCalc.add(chart_option5_data.data1[index].value, (t.total_price ? t.total_price : 0));
  1535. // }
  1536. }
  1537. for (const cc2 of chart_category_data.data2) {
  1538. const sameObject = _.intersectionWith(t.category, cc2, _.isEqual);
  1539. if(sameObject.length === 2) {
  1540. const index = _.findIndex(chart_category_data.data2, function (item) {
  1541. return _.isEqual(_.sortBy(item, 'cid'), _.sortBy(sameObject, 'cid'));
  1542. })
  1543. if (index !== -1) {
  1544. chart_option5_data.data2[index].value = ZhCalc.add(chart_option5_data.data2[index].value, (t.total_price ? t.total_price : 0));
  1545. }
  1546. }
  1547. }
  1548. for (const cc3 of chart_category_data.data3) {
  1549. const sameObject = _.intersectionWith(t.category, cc3, _.isEqual);
  1550. if(sameObject.length === 3) {
  1551. const index = _.findIndex(chart_category_data.data3, function (item) {
  1552. return _.isEqual(_.sortBy(item, 'cid'), _.sortBy(sameObject, 'cid'));
  1553. })
  1554. if (index !== -1) {
  1555. chart_option5_data.data3[index].value = ZhCalc.add(chart_option5_data.data3[index].value, (t.total_price ? t.total_price : 0));
  1556. }
  1557. }
  1558. }
  1559. }
  1560. }
  1561. const option5 = myChart5.getOption();
  1562. option5.series[0].data = _.filter(chart_option5_data.data1, function (item) {
  1563. return item.value !== 0;
  1564. });
  1565. option5.series[1].data = _.filter(chart_option5_data.data2, function (item) {
  1566. return item.value !== 0;
  1567. });
  1568. option5.series[2].data = _.filter(chart_option5_data.data3, function (item) {
  1569. return item.value !== 0;
  1570. });
  1571. myChart5.setOption(option5);
  1572. // const selectCategory = {
  1573. // cid: category && category[0].value ? category[0].id : ,
  1574. // }
  1575. // const categoryName =
  1576. if (category && category.length > 0) {
  1577. if (category[0] && category[0].value.length > 0) {
  1578. for (const [i, fc] of category[0].value.entries()) {
  1579. const fcCategory = {cid: fc.cid, value: fc.id};
  1580. if (_.findIndex(tenders, function (item) {
  1581. return _.findIndex(item.category, fcCategory) !== -1;
  1582. }) === -1) {
  1583. $('#first-category .select-cate').eq(i + 1).hide();
  1584. } else {
  1585. $('#first-category .select-cate').eq(i + 1).show();
  1586. }
  1587. }
  1588. }
  1589. }
  1590. setData(tenders, 0);
  1591. })
  1592. function calculateTender(tender) {
  1593. if (tender.stage_tp) {
  1594. tender.gather_tp = ZhCalc.sum([tender.stage_tp.contract_tp, tender.stage_tp.qc_tp, tender.stage_tp.pc_tp]);
  1595. tender.end_contract_tp = ZhCalc.sum([tender.stage_tp.pre_contract_tp, tender.stage_tp.contract_tp, tender.stage_tp.contract_pc_tp]);
  1596. tender.end_qc_tp = ZhCalc.sum([tender.stage_tp.pre_qc_tp, tender.stage_tp.qc_tp, tender.stage_tp.qc_pc_tp]);
  1597. tender.end_gather_tp = ZhCalc.add(tender.end_contract_tp, tender.end_qc_tp);
  1598. tender.pre_gather_tp = ZhCalc.add(tender.stage_tp.pre_contract_tp, tender.stage_tp.pre_qc_tp);
  1599. tender.yf_tp = ZhCalc.add(tender.stage_tp.yf_tp);
  1600. tender.end_yf_tp = ZhCalc.add(tender.stage_tp.pre_yf_tp, tender.yf_tp);
  1601. }
  1602. }
  1603. function setData(tenderList, categoryIndex = 0) {
  1604. let total_price = 0;
  1605. // let total_change_price = 0;
  1606. let total_checked_change_price = 0;
  1607. // let total_checked_change_positive_price = 0;
  1608. // let total_checked_change_negative_price = 0;
  1609. let total_after_change_price = 0;
  1610. let total_stage_price = 0;
  1611. let total_advance_price = 0;
  1612. // let total_material_price = 0;
  1613. let month_stage_num = 0;
  1614. let month_change_num = 0;
  1615. let month_revise_num = 0;
  1616. let month_material_num = 0;
  1617. let html = '';
  1618. const chart_option_name = [];
  1619. const chart_option2_data = {
  1620. total_price: [],
  1621. contract_tp:[],
  1622. qc_tp:[],
  1623. };
  1624. const chart_option3_data = [];
  1625. const chart_option1_data = [];
  1626. let option1_is_tender = false;
  1627. const chart_category_data = [];
  1628. if (category && category.length > 0 && category[categoryIndex] && category[categoryIndex].value.length > 0) {
  1629. for (const c of category[categoryIndex].value) {
  1630. chart_category_data.push({
  1631. cid: category[categoryIndex].id,
  1632. value: c.id,
  1633. });
  1634. chart_option1_data.push({
  1635. value: 0,
  1636. name: c.value,
  1637. });
  1638. }
  1639. } else {
  1640. option1_is_tender = true;
  1641. }
  1642. const chart_option4_data = [];
  1643. for(const t of tenderList) {
  1644. total_price = ZhCalc.add(total_price, t.total_price);
  1645. // total_change_price = ZhCalc.add(total_change_price, t.end_qc_tp);
  1646. total_checked_change_price = ZhCalc.add(total_checked_change_price, t.change_tp);
  1647. // total_checked_change_positive_price = ZhCalc.add(total_checked_change_positive_price, t.change_p_tp);
  1648. // total_checked_change_negative_price = ZhCalc.add(total_checked_change_negative_price, t.change_n_tp);
  1649. total_after_change_price = ZhCalc.add(total_after_change_price, ZhCalc.add(t.total_price, t.change_tp));
  1650. total_stage_price = ZhCalc.add(total_stage_price, t.end_gather_tp);
  1651. // total_material_price = ZhCalc.add(total_material_price, t.material_tp);
  1652. total_advance_price = ZhCalc.add(total_advance_price, t.advance_tp);
  1653. month_stage_num = ZhCalc.add(month_stage_num, t.month_stage_num);
  1654. month_change_num = ZhCalc.add(month_change_num, t.month_change_num);
  1655. month_revise_num = ZhCalc.add(month_revise_num, t.month_revise_num);
  1656. month_material_num = ZhCalc.add(month_material_num, t.month_material_num);
  1657. html += '<tr>\n' +
  1658. ' <td><span data-toggle="tooltip" data-placement="right" data-original-title="'+ t.name +'">'+ (t.name.length > 15 ? t.name.substring(0, 15) + '...' : t.name) +'</span></td>\n' +
  1659. ' <td>'+ (t.progress ? t.progress.title : (t.cur_flow ? t.cur_flow.title : '')) + '</td>\n' +
  1660. ' <td>'+ (t.total_price ? t.total_price : 0) +'</td>\n' +
  1661. ' <td>'+ (t.gather_tp ? t.gather_tp : 0) +'</td>\n' +
  1662. ' <td>'+ (t.end_gather_tp ? t.end_gather_tp : 0) +'</td>\n' +
  1663. ' <td>'+ (t.yf_tp ? t.yf_tp : 0) +'</td>\n' +
  1664. ' <td>'+ (t.end_yf_tp ? t.end_yf_tp : 0) +'</td>\n' +
  1665. ' </tr>\n';
  1666. chart_option_name.push(t.name);
  1667. chart_option2_data.total_price.push(t.total_price ? t.total_price : 0);
  1668. chart_option2_data.contract_tp.push(t.end_contract_tp ? t.end_contract_tp : 0);
  1669. chart_option2_data.qc_tp.push(t.end_qc_tp ? t.end_qc_tp : 0);
  1670. const rate = ZhCalc.mul(ZhCalc.div(ZhCalc.add(t.pre_gather_tp, t.gather_tp), ZhCalc.add(t.total_price, t.end_qc_tp), 2), 100, 0);
  1671. chart_option3_data.push(rate ? rate : '');
  1672. if (option1_is_tender) {
  1673. if(t.total_price) chart_option1_data.push({ value: t.total_price, name: t.name});
  1674. } else {
  1675. const sameObject = _.intersectionWith(t.category, chart_category_data, _.isEqual);
  1676. const index = sameObject[0] ? _.findIndex(chart_category_data, { cid: sameObject[0].cid, value: sameObject[0].value }) : -1;
  1677. if (index !== -1) {
  1678. chart_option1_data[index].value = ZhCalc.add(chart_option1_data[index].value, (t.total_price ? t.total_price : 0));
  1679. }
  1680. }
  1681. for (const s of t.month_stage) {
  1682. const index = _.findIndex(chart_option4_data, { yearmonth: s.yearmonth });
  1683. if (index === -1) {
  1684. chart_option4_data.push({
  1685. yearmonth: s.yearmonth,
  1686. tp: s.tp,
  1687. end_tp: s.end_tp,
  1688. })
  1689. // chart_option4_data.yearmonth.push(s.yearmonth);
  1690. // chart_option4_data.tp.push(s.tp);
  1691. // chart_option4_data.end_tp.push(s.end_tp);
  1692. } else {
  1693. // chart_option4_data.tp[index].tp = ZhCalc.add(chart_option4_data.tp[index].tp, s.tp);
  1694. // chart_option4_data.tp[index].end_tp = ZhCalc.add(chart_option4_data.tp[index].end_tp, s.end_tp);
  1695. chart_option4_data[index].tp = ZhCalc.add(chart_option4_data[index].tp, s.tp);
  1696. chart_option4_data[index].end_tp = ZhCalc.add(chart_option4_data[index].end_tp, s.end_tp);
  1697. }
  1698. }
  1699. }
  1700. // console.log(tenderList);
  1701. $('.data_tender_num').text(tenderList.length);
  1702. // const rate = total_price && total_change_price ? ZhCalc.round(ZhCalc.div(total_stage_price, ZhCalc.add(total_price, total_change_price)) * 100, 2) : 0;
  1703. const rate = total_stage_price && total_after_change_price ? ZhCalc.round(ZhCalc.div(total_stage_price, total_after_change_price) * 100, 2) : 0;
  1704. $('.data_tender_rate').text(rate ? rate + '%' : '0%');
  1705. $('.data_total_price').text(formatMoney(total_price));
  1706. // $('.data_total_change_price').text(formatMoney(total_change_price));
  1707. $('.data_total_checked_change_price').text(formatMoney(total_checked_change_price));
  1708. // $('.data_total_checked_change_price').parents('div').attr('data-original-title', "<p style='text-align:left;'>批复正变更:" + formatMoney(total_checked_change_positive_price) + "</p>批复负变更:" + formatMoney(total_checked_change_negative_price));
  1709. $('.data_total_after_change_price').text(formatMoney(total_after_change_price));
  1710. $('.data_total_stage_price').text(formatMoney(total_stage_price));
  1711. $('.data_total_advance_price').text(formatMoney(total_advance_price));
  1712. // $('.data_total_material_price').text(formatMoney(total_material_price));
  1713. $('.month_stage_num').text(month_stage_num);
  1714. $('.month_change_num').text(month_change_num);
  1715. $('.month_revise_num').text(month_revise_num);
  1716. $('.month_material_num').text(month_material_num);
  1717. // 滚动数据
  1718. $('.stage-data').eq(0).html(html);
  1719. // if (originDataCollect === 1 || originDataCollect === 2) {
  1720. tableScroll('tableId', '100%', 30, 7);
  1721. if (is_dz) {
  1722. $('.stage-data').eq(1).html(html);
  1723. tableScroll('tableId2', '100%', 30, 7);
  1724. }
  1725. // }
  1726. $('[data-toggle="tooltip"]').tooltip();
  1727. // 图表数据赋值
  1728. const option2 = myChart2_1.getOption();
  1729. option2.dataZoom[0].start = 0;
  1730. option2.dataZoom[0].end = computedPosition(tenderList.length);
  1731. option2.xAxis[0].data = chart_option_name;
  1732. option2.series[0].data = chart_option2_data.total_price;
  1733. option2.series[1].data = chart_option2_data.contract_tp;
  1734. option2.series[2].data = chart_option2_data.qc_tp;
  1735. option2.series[2].data = chart_option2_data.qc_tp;
  1736. if (tenderList.length >= 8) {
  1737. option2.dataZoom[0].show = true;
  1738. } else {
  1739. option2.dataZoom[0].show = false;
  1740. }
  1741. myChart2_1.setOption(option2);
  1742. myChart2_2.setOption(option2);
  1743. myChart2_3.setOption(option2);
  1744. if (is_dz) {
  1745. const option2_4 = _.cloneDeep(option2);
  1746. option2_4.title[0].text = '各工区计量情况';
  1747. myChart2_4.setOption(option2_4);
  1748. }
  1749. const option3 = myChart3_1.getOption();
  1750. option3.dataZoom[0].start = 0;
  1751. option3.dataZoom[0].end = computedPosition(tenderList.length);
  1752. option3.yAxis[0].data = chart_option_name;
  1753. option3.series[0].data = chart_option3_data;
  1754. if (tenderList.length >= 8) {
  1755. option3.dataZoom[0].show = true;
  1756. // option3.dataZoom[0].bottom = '10%';
  1757. // option3.grid.bottom = '15%';
  1758. } else {
  1759. option3.dataZoom[0].show = false;
  1760. // option3.dataZoom[0].bottom = '0%';
  1761. // option3.grid.bottom = '3%';
  1762. }
  1763. myChart3_1.setOption(option3);
  1764. myChart3_2.setOption(option3);
  1765. if (is_dz) {
  1766. const option3_3 = _.cloneDeep(option3);
  1767. option3_3.title[0].text = '各工区计量完成百分比统计';
  1768. myChart3_3.setOption(option3_3);
  1769. }
  1770. const option1 = myChart1_1.getOption();
  1771. option1.series[0].data = _.filter(chart_option1_data, function (item) {
  1772. return item.value !== 0;
  1773. });
  1774. myChart1_1.setOption(option1);
  1775. if (is_dz) {
  1776. myChart1_2.setOption(option1);
  1777. }
  1778. const option4_data = {
  1779. yearmonth: [],
  1780. tp: [],
  1781. end_tp: [],
  1782. }
  1783. if (chart_option4_data.length > 0) {
  1784. // chart_option4_data 排序
  1785. const new_chart_option4_data = _.sortBy(chart_option4_data, 'yearmonth');
  1786. for (const [i,c4] of new_chart_option4_data.entries()) {
  1787. option4_data.yearmonth.push(c4.yearmonth);
  1788. option4_data.tp.push(c4.tp);
  1789. if(i !== 0) {
  1790. option4_data.end_tp.push(ZhCalc.add(c4.tp, option4_data.end_tp[i-1]));
  1791. } else {
  1792. option4_data.end_tp.push(c4.tp);
  1793. }
  1794. }
  1795. }
  1796. const option4 = myChart4_1.getOption();
  1797. option4.dataZoom[0].start = 0;
  1798. option4.dataZoom[0].end = computedPosition(option4_data.yearmonth.length);
  1799. option4.xAxis[0].data = option4_data.yearmonth;
  1800. option4.series[0].data = option4_data.tp;
  1801. option4.series[1].data = option4_data.end_tp;
  1802. if (option4_data.yearmonth.length >= 8) {
  1803. option4.dataZoom[0].show = true;
  1804. // option4.dataZoom[0].bottom = '10%';
  1805. // option4.grid.bottom = '15%';
  1806. } else {
  1807. option4.dataZoom[0].show = false;
  1808. // option4.dataZoom[0].bottom = '0%';
  1809. // option4.grid.bottom = '3%';
  1810. }
  1811. myChart4_1.setOption(option4);
  1812. myChart4_2.setOption(option4);
  1813. if (is_dz) {
  1814. const option4_3 = _.cloneDeep(option4);
  1815. option4_3.title[0].text = '全线计量对比';
  1816. myChart4_3.setOption(option4_3);
  1817. }
  1818. $('#tableId').css({'margin-top': 0});
  1819. if (is_dz) {
  1820. $('#tableId2').css({'margin-top': 0});
  1821. }
  1822. // 地图设置
  1823. // const polyLineList = [];
  1824. // const centerPoint = { lng: mapJson.lng, lat: mapJson.lat };
  1825. // let level = mapJson.level;
  1826. // // 初始化地图,设置中心点坐标和地图级别
  1827. // const point = new BMapGL.Point(centerPoint.lng, centerPoint.lat);
  1828. // // 创建地图实例
  1829. // map1.centerAndZoom(point, level);
  1830. // // 创建地图实例
  1831. // map2.centerAndZoom(point, level);
  1832. // map1.reset();
  1833. // map2.reset();
  1834. }
  1835. $('.change-collect').on('click', function () {
  1836. const num = parseInt($(this).data('collect'));
  1837. $('#zhankai span').text(num);
  1838. if (num === 1 || num === 3) {
  1839. $('.flex-content[data-content="1"]').show();
  1840. $('.flex-content[data-content="2"]').hide();
  1841. $('.flex-content[data-content="5"]').hide();
  1842. if (originDataCollect !== 1 && originDataCollect !== 3) {
  1843. tableScroll('tableId', '100%', 30, 7);
  1844. }
  1845. if (num === 3) {
  1846. $('.jlchart[data-chart-num="1"]').hide();
  1847. $('.jlchart[data-chart-num="1"]').siblings().show();
  1848. $('.jlchart[data-chart-num="2"]').show();
  1849. $('.jlchart[data-chart-num="2"]').siblings().hide();
  1850. } else {
  1851. $('.jlchart[data-chart-num="1"]').show();
  1852. $('.jlchart[data-chart-num="1"]').siblings().hide();
  1853. $('.jlchart[data-chart-num="2"]').hide();
  1854. $('.jlchart[data-chart-num="2"]').siblings().show();
  1855. }
  1856. // roll(50);
  1857. } else if (num === 2 || num === 4) {
  1858. $('.flex-content[data-content="2"]').show();
  1859. $('.flex-content[data-content="1"]').hide();
  1860. $('.flex-content[data-content="5"]').hide();
  1861. // roll2(50);
  1862. if (num === 4) {
  1863. $('.jldbchart[data-chart-num="2"]').hide();
  1864. $('.jldbchart[data-chart-num="2"]').siblings().show();
  1865. } else {
  1866. $('.jldbchart[data-chart-num="2"]').show();
  1867. $('.jldbchart[data-chart-num="2"]').siblings().hide();
  1868. }
  1869. } else if (num === 5) {
  1870. $('.flex-content[data-content="5"]').show();
  1871. $('.flex-content[data-content="1"]').hide();
  1872. $('.flex-content[data-content="2"]').hide();
  1873. tableScroll('tableId2', '100%', 30, 7);
  1874. // $('.jlchart[data-chart-num="1"]').show();
  1875. // $('.jlchart[data-chart-num="2"]').siblings().show();
  1876. }
  1877. echartsReset();
  1878. });
  1879. // 第一层分类选择
  1880. $("body").on('click', '#first-category .select-cate', function () {
  1881. const id = $(this).data('value');
  1882. $(this).parents('.dropdown-menu').siblings('button').text($(this).text());
  1883. let newTenderList = tenders;
  1884. let categoryIndex = 0;
  1885. if (!id) {
  1886. $('#second-category').hide();
  1887. $('#third-category').hide();
  1888. $('#first-category').children('button').attr('data-cid', '').attr('data-value', '');
  1889. } else {
  1890. // 获取第一层已选类别
  1891. const firstCategory = { cid: parseInt($(this).data('cid')), value: parseInt(id) };
  1892. $('#first-category').children('button').attr('data-cid', $(this).data('cid')).attr('data-value', id);
  1893. newTenderList = _.filter(tenders, function (item) {
  1894. return _.findIndex(item.category, firstCategory) !== -1;
  1895. })
  1896. categoryIndex = 1;
  1897. if (category[1] && category[1].value.length > 0) {
  1898. $('#second-category').show();
  1899. $('#third-category').hide();
  1900. $('#second-category').children('button').text('全部').attr('data-cid', '').attr('data-value', '');
  1901. for (const [i,sc] of category[1].value.entries()) {
  1902. const scCategory = { cid: sc.cid, value: sc.id };
  1903. if (_.findIndex(newTenderList, function (item) {
  1904. return _.findIndex(item.category, scCategory) !== -1;}) === -1) {
  1905. $('#second-category .select-cate').eq(i+1).hide();
  1906. } else {
  1907. $('#second-category .select-cate').eq(i+1).show();
  1908. }
  1909. }
  1910. }
  1911. // categoryList.push(firstCategory);
  1912. }
  1913. setData(newTenderList, categoryIndex);
  1914. // 获取新的tenderList及categoryList
  1915. });
  1916. // 第二层分类选择
  1917. $("body").on('click', '#second-category .select-cate', function () {
  1918. const id = $(this).data('value');
  1919. // 获取第一层已选类别
  1920. const first_cid = $('#first-category').children('button').attr('data-cid');
  1921. const first_value = $('#first-category').children('button').attr('data-value');
  1922. const firstCategory = { cid: parseInt(first_cid), value: parseInt(first_value) };
  1923. let newTenderList = _.filter(tenders, function (item) {
  1924. return _.findIndex(item.category, firstCategory) !== -1;
  1925. });
  1926. // let categoryList = [firstCategory];
  1927. let categoryIndex = 1;
  1928. $(this).parents('.dropdown-menu').siblings('button').text($(this).text());
  1929. if (!id) {
  1930. $('#third-category').hide();
  1931. } else {
  1932. // 获取第二层已选类别
  1933. const secondCategory = { cid: parseInt($(this).data('cid')), value: parseInt(id) };
  1934. $('#second-category').children('button').attr('data-cid', $(this).data('cid')).attr('data-value', id);
  1935. newTenderList = _.filter(newTenderList, function (item) {
  1936. return _.findIndex(item.category, secondCategory) !== -1;
  1937. });
  1938. categoryIndex = 2;
  1939. if (category[2] && category[2].value.length > 0) {
  1940. $('#third-category').show();
  1941. $('#third-category').children('button').text('全部').attr('data-cid', '').attr('data-value', '');
  1942. for (const [i,sc] of category[2].value.entries()) {
  1943. const tcCategory = { cid: sc.cid, value: sc.id };
  1944. if (_.findIndex(newTenderList, function (item) {
  1945. return _.findIndex(item.category, tcCategory) !== -1;}) === -1) {
  1946. $('#third-category .select-cate').eq(i+1).hide();
  1947. } else {
  1948. $('#third-category .select-cate').eq(i+1).show();
  1949. }
  1950. }
  1951. }
  1952. // categoryList.push(secondCategory);
  1953. }
  1954. setData(newTenderList, categoryIndex);
  1955. // 获取新的tenderList及categoryList
  1956. });
  1957. // 第三层分类选择(至多三层)
  1958. $("body").on('click', '#third-category .select-cate', function () {
  1959. const id = $(this).data('value');
  1960. // 获取第一层已选类别
  1961. const first_cid = $('#first-category').children('button').attr('data-cid');
  1962. const first_value = $('#first-category').children('button').attr('data-value');
  1963. const firstCategory = { cid: parseInt(first_cid), value: parseInt(first_value) };
  1964. let newTenderList = _.filter(tenders, function (item) {
  1965. return _.findIndex(item.category, firstCategory) !== -1;
  1966. });
  1967. // 获取第二层已选类别
  1968. const second_cid = $('#second-category').children('button').attr('data-cid');
  1969. const second_value = $('#second-category').children('button').attr('data-value');
  1970. const secondCategory = { cid: parseInt(second_cid), value: parseInt(second_value) };
  1971. newTenderList = _.filter(newTenderList, function (item) {
  1972. return _.findIndex(item.category, secondCategory) !== -1;
  1973. });
  1974. // let categoryList = [firstCategory, secondCategory];
  1975. let categoryIndex = 2;
  1976. $(this).parents('.dropdown-menu').siblings('button').text($(this).text());
  1977. if (!id) {
  1978. $('#third-category').children('button').text('全部').attr('data-cid', '').attr('data-value', '');
  1979. } else {
  1980. $('#third-category').children('button').attr('data-cid', $(this).data('cid')).attr('data-value', id);
  1981. categoryIndex = 3;
  1982. const third_cid = $('#third-category').children('button').attr('data-cid');
  1983. const third_value = $('#third-category').children('button').attr('data-value');
  1984. const thirdCategory = { cid: parseInt(third_cid), value: parseInt(third_value) };
  1985. newTenderList = _.filter(newTenderList, function (item) {
  1986. return _.findIndex(item.category, thirdCategory) !== -1;
  1987. });
  1988. // categoryList.push({ cid: parseInt($(this).data('cid')), value: parseInt($(this).data('value')) });
  1989. }
  1990. setData(newTenderList, categoryIndex);
  1991. // 获取新的tenderList及categoryList
  1992. })
  1993. })
  1994. function formatMoney(s, dot = ',', decimal = 2) {
  1995. if (!s) {
  1996. s = 0;
  1997. return s.toFixed(decimal);
  1998. }
  1999. s = parseFloat((s + '').replace(/[^\d\.-]/g, '')).toFixed(decimal) + '';
  2000. if (!decimal) {
  2001. s += '.';
  2002. }
  2003. const l = s.split('.')[0].split('').reverse(),
  2004. r = s.split('.')[1];
  2005. let t = '';
  2006. for (let i = 0; i < l.length; i++) {
  2007. t += l[i] + ((i + 1) % 3 == 0 && (i + 1) != l.length ? dot : '');
  2008. }
  2009. const num = t.split('').reverse().join('') + (decimal === 0 ? '' : '.' + r);
  2010. return num.replace('-,', '-');
  2011. }
  2012. // 计算显示滚动条长度
  2013. function computedPosition(xArrayLength) {
  2014. if (xArrayLength >= 8) {
  2015. return Math.floor(8 / xArrayLength * 100) > 100 ? 100 : Math.floor(8 / xArrayLength * 100);
  2016. // return length <= 10 ? 35 : 100 - Math.floor(35 / length * 100);
  2017. } else {
  2018. return 100;
  2019. }
  2020. }
  2021. </script>