detail.ejs 81 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493
  1. <link href="/public/css/bootstrap/bootstrap-colorpicker.min.css" rel="stylesheet">
  2. <% include ./tender_sub_menu.ejs %>
  3. <div class="panel-content">
  4. <div class="panel-title">
  5. <div class="title-main d-flex">
  6. <% include ./tender_sub_mini_menu.ejs %>
  7. <% if (tender.ledger_status !== audit.ledger.status.uncheck) { %>
  8. <h2>进行至
  9. <% if (lastStage) { %>
  10. 第<%- lastStage.order %>期<small class="<%- audit.stage.statusClass[lastStage.status] %>">(<%- audit.stage.statusString[lastStage.status] %>)</small>
  11. <% } else { %>
  12. 台账<small class="<%- audit.ledger.auditStringClass[tender.ledger_status] %>">(<%- audit.ledger.auditString[tender.ledger_status] %>)</small>
  13. <% } %>
  14. </h2>
  15. <% } %>
  16. <% if (cooperation) { %>
  17. <div>
  18. <a href="/tender/<%= tender.id %>/cooperation" class="btn btn-sm btn-light" ><i class="fa fa-users"></i> 协作办公</a>
  19. </div>
  20. <% } %>
  21. <div class="ml-auto">
  22. <a href="javascript:void(0)" title="全屏显示" id="showFull" style="font-size: 16px" class="float-left text-dark mr-3"><i class="fa fa-arrows-alt"></i></a>
  23. <div class="dropdown d-flex float-left mt-1 mr-2">
  24. <!--<button id="showFull" class="btn btn-sm btn-outline-dark mr-2">全屏</button>-->
  25. <a class="btn btn-sm btn-outline-dark dropdown-toggle dropdown-wd" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  26. 标段
  27. </a>
  28. <div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
  29. <a href="#bd-set-1" data-toggle="modal" data-target="#bd-set-1" class="dropdown-item" >标段属性</a>
  30. <a href="#bd-set-2" data-toggle="modal" data-target="#bd-set-2" class="dropdown-item" >小数位数</a>
  31. <a href="#bd-set-3" data-toggle="modal" data-target="#bd-set-3" class="dropdown-item" >数量精度</a>
  32. <a href="#bd-set-4" data-toggle="modal" data-target="#bd-set-4" class="dropdown-item" >合同参数</a>
  33. <a href="#bd-set-5" data-toggle="modal" data-target="#bd-set-5" class="dropdown-item" >显示设置</a>
  34. <a href="#bd-set-6" data-toggle="modal" data-target="#bd-set-6" class="dropdown-item" >章节设置</a>
  35. <a href="#bd-set-7" data-toggle="modal" data-target="#bd-set-7" class="dropdown-item" >付款账号</a>
  36. <a class="dropdown-item" href="javascript: void(0);" id="copyBtn">拷贝设置</a>
  37. </div>
  38. </div>
  39. <% if (ctx.session.sessionUser.is_admin) { %>
  40. <div class="dropdown d-flex mt-1">
  41. <a class="btn btn-sm btn-outline-dark dropdown-toggle dropdown-wd" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  42. 管理员
  43. </a>
  44. <div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
  45. <% if (ctx.session.sessionProject.page_show !== null && parseInt(ctx.session.sessionProject.page_show.xxjd) === 1) { %>
  46. <a href="#xxjd-set" data-toggle="modal" data-target="#xxjd-set" class="dropdown-item">投资进度</a>
  47. <% } %>
  48. <a href="/tender/<%- tender.id %>/shenpi" class="dropdown-item">审批流程</a>
  49. <a href="#bd-set-9" data-toggle="modal" data-target="#bd-set-9" class="dropdown-item">游客账号 <span id="tourist-num" <% if (tourists.length !== 0) { %>class="badge badge-secondary"<% } %>><% if (tourists.length !== 0) { %><%- tourists.length %><% } %></span></a>
  50. <a href="#bd-set-10" data-toggle="modal" data-target="#bd-set-10" class="dropdown-item">上报控制</a>
  51. <a href="#bd-set-12" data-toggle="modal" data-target="#bd-set-12" class="dropdown-item">功能设置</a>
  52. <a href="#bd-set-11" data-toggle="modal" data-target="#bd-set-11" class="dropdown-item">概况设置</a>
  53. </div>
  54. </div>
  55. <% } %>
  56. </div>
  57. </div>
  58. </div>
  59. <div class="content-wrap" id="big-data">
  60. <div style="height: 70px;display: none;<% if (ctx.tender.info.display.dayMode) { %> background-color: #fff;<% } else { %> background-color: #2c3237 !important;<% } %>" id="exitfull-div">
  61. <div class="title-main d-flex">
  62. <div class="ml-auto">
  63. <div class="dropdown d-flex float-left mt-1 mr-2">
  64. <button id="exitFull" class="btn btn-sm btn-secondary ml-auto">退出全屏</button>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. <div class="c-body <% if (ctx.tender.info.display.dayMode) { %>c-body-white<% } %>" <% if (!ctx.tender.info.display.dayMode) { %>style="background-color: #2c3237 !important;"<% } %>>
  70. <div class="sjs-height-0">
  71. <!--<div class="auto-main-height">-->
  72. <div class="main-height-one">
  73. <div class="m-3">
  74. <!--金额概况-->
  75. <div class="row ml-1 mb-3">
  76. <div class="col-12">
  77. <div class="row">
  78. <div class="col-auto pl-0">
  79. <div class="card text-center <% if (!ctx.tender.info.display.dayMode) { %>bg-dark text-white<% } %>">
  80. <div class="card-body">
  81. <h5 class="card-title card-big-title"><%- ctx.helper.formatMoney(tender.total_price) %></h5>
  82. <p class="card-text text-muted">0号台账合同</p>
  83. </div>
  84. </div>
  85. </div>
  86. <style>
  87. .tooltip-inner {
  88. max-width: 400px;
  89. text-align: left;
  90. }
  91. </style>
  92. <div class="col-auto pl-0">
  93. <div class="card text-center <% if (!ctx.tender.info.display.dayMode) { %>bg-dark text-white<% } %>">
  94. <div class="card-body" data-toggle="tooltip" data-placement="bottom" data-html="true" data-original-title="<p style='text-align:left;'>批复正变更:<%- ctx.helper.formatMoney(tender.change_p_tp) %></p>批复负变更:<%- ctx.helper.formatMoney(tender.change_n_tp) %>">
  95. <h5 class="card-title card-big-title"><%- ctx.helper.formatMoney(tender.change_tp) %></h5>
  96. <p class="card-text text-muted">已批复变更金额</p>
  97. </div>
  98. </div>
  99. </div>
  100. <div class="col-auto pl-0">
  101. <div class="card text-center <% if (!ctx.tender.info.display.dayMode) { %>bg-dark text-white<% } %>">
  102. <div class="card-body">
  103. <h5 class="card-title card-big-title"><%- ctx.helper.formatMoney(tender.sum) %></h5>
  104. <p class="card-text text-muted">变更后金额</p>
  105. </div>
  106. </div>
  107. </div>
  108. <div class="col-auto pl-0">
  109. <div class="card text-center <% if (!ctx.tender.info.display.dayMode) { %>bg-dark text-white<% } %>">
  110. <div class="card-body" data-toggle="tooltip" data-placement="bottom" data-html="true" data-original-title="<p>截止本期正变更:<%- ctx.helper.formatMoney(tender.end_positive_qc_tp) %></p>截止本期负变更:<%- ctx.helper.formatMoney(tender.end_negative_qc_tp) %>">
  111. <h5 class="card-title card-big-title"><%- ctx.helper.formatMoney(tender.end_qc_tp) %> <small class="text-danger" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="占合同比例"><%- tender.qc_ratio %>%</small></h5>
  112. <p class="card-text text-muted">截止本期变更</p>
  113. </div>
  114. </div>
  115. </div>
  116. <div class="col-auto pl-0">
  117. <div class="card text-center <% if (!ctx.tender.info.display.dayMode) { %>bg-dark text-white<% } %>">
  118. <div class="card-body">
  119. <h5 class="card-title card-big-title"><%- ctx.helper.formatMoney(tender.gather_tp) %></h5>
  120. <p class="card-text text-muted">本期完成</p>
  121. </div>
  122. </div>
  123. </div>
  124. <div class="col-auto pl-0">
  125. <div class="card text-center <% if (!ctx.tender.info.display.dayMode) { %>bg-dark text-white<% } %>">
  126. <div class="card-body">
  127. <h5 class="card-title card-big-title"><%- ctx.helper.formatMoney(tender.end_gather_tp) %></h5>
  128. <p class="card-text text-muted">截止本期完成</p>
  129. </div>
  130. </div>
  131. </div>
  132. <!--<div class="col-auto pl-0">-->
  133. <!--<div class="card text-center <% if (!ctx.tender.info.display.dayMode) { %>bg-dark text-white<% } %>">-->
  134. <!--<div class="card-body">-->
  135. <!--<h5 class="card-title card-big-title"><%- ctx.helper.formatMoney(tender.pre_gather_tp) %></h5>-->
  136. <!--<p class="card-text text-muted">截止上期完成</p>-->
  137. <!--</div>-->
  138. <!--</div>-->
  139. <!--</div>-->
  140. <div class="col-auto pl-0">
  141. <div class="card text-center <% if (!ctx.tender.info.display.dayMode) { %>bg-dark text-white<% } %>">
  142. <div class="card-body">
  143. <h5 class="card-title card-big-title"><%- ctx.helper.formatMoney(tender.yf_tp) %></h5>
  144. <p class="card-text text-muted">本期应付</p>
  145. </div>
  146. </div>
  147. </div>
  148. </div>
  149. </div>
  150. </div>
  151. <!--进度条-->
  152. <div class="">
  153. <div class="progress">
  154. <% if (tender.pre_ratio > 0) { %>
  155. <div class="progress-bar bg-success bg-green" style="width: <%- tender.pre_ratio %>%;" data-placement="bottom" data-toggle="tooltip" data-original-title="截止上期累计完成:¥<%- ctx.helper.formatMoney(tender.pre_gather_tp) %>"><%- tender.pre_ratio %>%</div>
  156. <% } %>
  157. <% if (tender.cur_ratio > 0) { %>
  158. <div class="progress-bar bg-info bg-blue" style="width: <%- tender.cur_ratio %>%;" data-placement="bottom" data-toggle="tooltip" data-original-title="本期完成:¥<%- ctx.helper.formatMoney(tender.gather_tp) %>"><%- tender.cur_ratio %>%</div>
  159. <% } %>
  160. <% if (tender.other_ratio > 0) { %>
  161. <div class="progress-bar bg-danger bg-red" style="width: <%- tender.other_ratio %>%;" data-placement="bottom" data-toggle="tooltip" data-original-title="未完成:¥<%- ctx.helper.formatMoney(tender.other_tp) %>"><%- tender.other_ratio %>%</div>
  162. <% } %>
  163. </div>
  164. </div>
  165. </div>
  166. </div>
  167. <!--图表1-->
  168. <div class="main-height-two">
  169. <div class="m-3">
  170. <div class="row">
  171. <div class="col-3">
  172. <!--计量完成概况-->
  173. <div class="card mb-3 <% if (!ctx.tender.info.display.dayMode) { %>bg-dark text-white<% } %>">
  174. <div class="card-header"><h6 class="mb-0">计量完成概况</h6></div>
  175. <div class="card-body">
  176. <div id="jlchart1" style="height: 100%; width: 100%;">
  177. </div>
  178. </div>
  179. </div>
  180. <!--支付情况-->
  181. <div class="card mb-3 <% if (!ctx.tender.info.display.dayMode) { %>bg-dark text-white<% } %>">
  182. <div class="card-header"><h6 class="mb-0">支付情况</h6></div>
  183. <div class="card-body">
  184. <div id="jlchart2" style="height: 100%; width: 100%;">
  185. </div>
  186. </div>
  187. </div>
  188. </div>
  189. <!--章节计量情况图-->
  190. <div class="col-6 pl-0">
  191. <div class="card mb-3 <% if (!ctx.tender.info.display.dayMode) { %>bg-dark text-white<% } %>">
  192. <% if (hadMap === 1) { %>
  193. <div class="card-body" id="map" style="height: 388px; width: 100%;"></div>
  194. <% } else if (hadMap === 2) { %>
  195. <div style="position:relative;height: 388px; width: 100%;">
  196. <% if (map_pic) { %>
  197. <% if (!ctx.tender.info.display.dayMode) { %>
  198. <div style="position:absolute;top:0;left:0;width:100%;height: 388px;background-color: rgba(44, 50, 55, 0.2);z-index: 10"></div>
  199. <% } %>
  200. <img style="display:block;width:100%;height: 388px;margin:0 auto;" src="<%- fujianOssPath + map_pic %>">
  201. <% } else { %>
  202. <div class="p-5 text-center text-muted">
  203. <img src="/public/images/nulllogo.png" />
  204. <div class="pt-3">请上传你的静态图片</div>
  205. </div>
  206. <% } %>
  207. </div>
  208. <% } else { %>
  209. <div class="card-header"><h6 class="mb-0">章节计量情况图</h6></div>
  210. <div class="card-body">
  211. <div id="jlchart3" style="height: 304px; width: 100%;">
  212. </div>
  213. </div>
  214. <% } %>
  215. </div>
  216. </div>
  217. <div class="col-3 pl-0">
  218. <!--台账审批进度-->
  219. <div class="card mb-3 <% if (!ctx.tender.info.display.dayMode) { %>bg-dark text-white<% } %>">
  220. <div class="card-header"><h6 class="mb-0"><% if (lastStage) { %>计量审批进度<% } else { %>台账审批进度<% } %></h6></div>
  221. <div class="card-body">
  222. <div style="">
  223. <div class="btn-group btn-group-sm btn-block my-1">
  224. <% if (lastStage) { %>
  225. <% if (lastStage.auditors && lastStage.auditors.length > 0) { %>
  226. <% for (const [i,sa] of lastStage.auditors.entries()) { %>
  227. <button class="btn <% if (sa.status === audit.stage.status.checked) { %>btn-green<% } else if (sa.status === audit.stage.status.checking) { %>btn-yellow<% } else if (sa.status === audit.stage.status.checkNo) { %>btn-red<% } else { %>btn-blueOne<% } %><% if (i+1 !== lastStage.auditors.length) { %> btn-relative<% } %>" data-toggle="tooltip"
  228. data-placement="top" data-original-title="<%- sa.name %> <% if (sa.status === audit.stage.status.checked) { %>审批完成<% } else if (sa.status === audit.stage.status.checking) { %>审批中<% } else if (sa.status === audit.stage.status.checkNo || sa.status === audit.stage.status.checkNoPre) { %>审批退回<% } else if (sa.status === audit.stage.status.checkAgain) { %>重新审批<% } %> <% if (sa.end_time) { %><%- ctx.helper.dateTran(sa.end_time, 'YYYY-MM-DD') %><% } %>">
  229. <% if (lastStage.auditors.length > 1 && i !== 0) { %><i class="fa <% if (lastStage.auditors[i-1].status === audit.stage.status.checked) { %>text-green<% } else if (lastStage.auditors[i-1].status === audit.stage.status.checking) { %>text-yellow<% } else if (lastStage.auditors[i-1].status === audit.stage.status.checkNo) { %>text-red<% } else { %>text-blueOne<% } %> fa-caret-right icon-absolute icon-size"></i><% } %><%- (i+1) %></button>
  230. <% } %>
  231. <% } else { %>
  232. <button class="btn btn-secondary" data-toggle="tooltip" data-placement="top" data-original-title="">&nbsp;</button>
  233. <% } %>
  234. <% } else { %>
  235. <%if (tender.auditors && tender.auditors.length > 0) { %>
  236. <% for (const [i, la] of tender.auditors.entries()) { %>
  237. <button class="btn <% if (la.status === audit.ledger.status.checked) { %>btn-green<% } else if (la.status === audit.ledger.status.checking) { %>btn-yellow<% } else if (la.status === audit.ledger.status.checkNo) { %>btn-red<% } else { %>btn-blueOne<% } %><% if (i+1 !== tender.auditors.length) { %> btn-relative<% } %>" data-toggle="tooltip"
  238. data-placement="top" data-original-title="<%- la.name %> <% if (la.status === audit.ledger.status.checked) { %>审批完成<% } else if (la.status === audit.ledger.status.checking) { %>审批中<% } else if (la.status === audit.ledger.status.checkNo || la.status === audit.ledger.status.checkNoPre) { %>审批退回<% } %> <% if (la.end_time) { %><%- ctx.helper.dateTran(la.end_time, 'YYYY-MM-DD') %><% } %>">
  239. <% if (tender.auditors.length > 1 && i !== 0) { %><i class="fa <% if (tender.auditors[i-1].status === audit.ledger.status.checked) { %>text-green<% } else if (tender.auditors[i-1].status === audit.ledger.status.checking) { %>text-yellow<% } else if (tender.auditors[i-1].status === audit.ledger.status.checkNo) { %>text-red<% } else { %>text-blueOne<% } %> fa-caret-right icon-absolute icon-size"></i><% } %><%- (i+1) %></button>
  240. <% } %>
  241. <% } else { %>
  242. <button class="btn btn-secondary" data-toggle="tooltip" data-placement="top" data-original-title="">&nbsp;</button>
  243. <% } %>
  244. <% } %>
  245. </div>
  246. <div class="row">
  247. <div class="col-2">
  248. </div>
  249. <div class="col-8 text-center">
  250. <% if (lastStage) { %>
  251. 第<%- lastStage.order %>期
  252. <% if (lastStage.status === audit.stage.status.uncheck) { %>
  253. <span class="text-info"><%- lastStage.status_users %></span>
  254. <% } else { %>
  255. <a href="#sp-list" data-toggle="modal" data-target="#sp-list" data-type="stage" data-order="<%- lastStage.order %>"><%- lastStage.status_users %></a>
  256. <% } %>
  257. <span class="<%- audit.stage.statusClass[lastStage.status] %>"><%- audit.stage.statusString[lastStage.status] %></span>
  258. <% } else { %>
  259. <% if (tender.ledger_status === audit.ledger.status.uncheck) { %>
  260. <span class="text-info"><%- tender.status_users %></span> <span>待上报</span>
  261. <% } else { %>
  262. <a href="#sp-list" data-toggle="modal" data-target="#sp-list" data-type="ledger" data-order="<%- tender.order %>"><%- tender.status_users %></a> <span class="<%- audit.ledger.auditStringClass[tender.ledger_status] %> %>"><%- audit.ledger.auditString[tender.ledger_status] %></span>
  263. <% } %>
  264. <% } %>
  265. </div>
  266. </div>
  267. <div class="row mt-1 border-top border-secondary pt-1 mt-2">
  268. <% if (lastStage) { %>
  269. <div class="col-7 mb-1">
  270. 本期合同计量金额:
  271. </div>
  272. <div class="col-5 text-right mb-1">
  273. <%- lastStage.contract_tp %>
  274. </div>
  275. <div class="col-7">
  276. 本期变更计量金额:
  277. </div>
  278. <div class="col-5 text-right">
  279. <%- lastStage.qc_tp %>
  280. </div>
  281. <% } else { %>
  282. <div class="col-7 mb-1">
  283. &nbsp;
  284. </div>
  285. <div class="col-5 text-right mb-1">
  286. &nbsp;
  287. </div>
  288. <div class="col-7">
  289. &nbsp;
  290. </div>
  291. <div class="col-5 text-right">
  292. &nbsp;
  293. </div>
  294. <% } %>
  295. </div>
  296. </div>
  297. </div>
  298. </div>
  299. <div class="card mb-3 <% if (!ctx.tender.info.display.dayMode) { %>bg-dark text-white<% } %>">
  300. <div class="card-header">
  301. <ul class="nav nav-tabs card-header-tabs panel-card-tabs <% if (ctx.tender.info.display.dayMode) { %>nav-white-tabs<% } %>">
  302. <li class="nav-item">
  303. <a class="nav-link active" data-toggle="tab" href="#taizhangshenpi" role="tab" aria-selected="true">工程变更进度</a>
  304. </li>
  305. <li class="nav-item">
  306. <a class="nav-link" data-toggle="tab" href="#taizhangxiuding" role="tab" aria-selected="true">材料调差进度</a>
  307. </li>
  308. </ul>
  309. </div>
  310. <div class="card-body">
  311. <div class="tab-content">
  312. <div class="tab-pane active" id="taizhangshenpi">
  313. <div id="bgchart" style="height: 100%; width: 100%;"></div>
  314. </div>
  315. <div class="tab-pane" id="taizhangxiuding" >
  316. <div class="card-body p-0">
  317. <div>
  318. <div class="btn-group btn-group-sm btn-block">
  319. <% if (materialData && materialData.auditors.length > 0) { %>
  320. <% for (const [i, ma] of materialData.auditors.entries()) { %>
  321. <button class="btn <% if (ma.status === audit.material.status.checked) { %>btn-green<% } else if (ma.status === audit.material.status.checking) { %>btn-yellow<% } else if(ma.status === audit.material.status.checkNo) { %>btn-red<% } else { %>btn-blueOne<% } %><% if (i+1 !== materialData.auditors.length) { %> btn-relative<% } %>" data-toggle="tooltip"
  322. data-placement="top" data-original-title="<%- ma.name %> <% if (ma.status === audit.material.status.checked) { %>审批完成<% } else if (ma.status === audit.material.status.checking) { %>审批中<% } else if (ma.status === audit.material.status.checkNo || ma.status === audit.material.status.checkNoPre) { %>审批退回<% } %> <% if (ma.end_time) { %><%- ctx.helper.dateTran(ma.end_time, 'YYYY-MM-DD') %><% } %>">
  323. <% if (materialData.auditors.length > 1 && i !== 0) { %><i class="fa <% if (materialData.auditors[i-1].status === audit.material.status.checked) { %>text-green<% } else if (materialData.auditors[i-1].status === audit.material.status.checking) { %>text-yellow<% } else if (materialData.auditors[i-1].status === audit.material.status.checkNo) { %>text-red<% } else { %>text-blueOne<% } %> fa-caret-right icon-absolute icon-size"></i><% } %><%- (i+1) %></button>
  324. <% } %>
  325. <% } else { %>
  326. <button class="btn btn-secondary" data-toggle="tooltip" data-placement="top" data-original-title="">&nbsp;</button>
  327. <% } %>
  328. <!--<button class="btn btn-warning" data-toggle="tooltip" data-placement="top" data-original-title="温仁书 审批中">2</button>-->
  329. <!--<button class="btn btn-info" data-toggle="tooltip" data-placement="top" data-original-title="玉安然">3</button>-->
  330. </div>
  331. <div class="row">
  332. <div class="col-2">
  333. </div>
  334. <div class="col-8 text-center">
  335. 第 <%- (materialData ? materialData.order : '0') %> 期
  336. <% if (materialData) { %>
  337. <% if (materialData.curAuditor) { %>
  338. <a href="#sp-list" data-toggle="modal" data-target="#sp-list" data-type="material" data-order="<%- materialData.order %>"><%- materialData.curAuditor.name %></a>
  339. <% } %>
  340. <span class="<%- audit.material.auditProgressClass[materialData.status] %>"><%- audit.material.auditProgress[materialData.status] %></span>
  341. <% } %>
  342. </div>
  343. </div>
  344. <table class="table table-bordered table-2sm mb-0 mt-1 <% if (!ctx.tender.info.display.dayMode) { %>table-dark<% } %>">
  345. <% if (materialData) { %>
  346. <tr><th width="60%">含税(信息价/指数法)</th><td width="20%"><%= materialData.m_tp !== null ? ctx.helper.round(ctx.helper.mul(materialData.m_tp, 1+materialData.rate/100), 2) : '0' %></td><td width="20%"><%= materialData.ex_tp !== null ? ctx.helper.round(ctx.helper.mul(materialData.ex_tp, 1+materialData.rate/100), 2) : '0' %></td></tr>
  347. <tr><th>不含税(信息价/指数法)</th><td><%= materialData.m_tp !== null ? ctx.helper.round(materialData.m_tp, 2) : '0' %></td><td><%= materialData.ex_tp !== null ? ctx.helper.round(materialData.ex_tp, 2) : '0' %></td></tr>
  348. <% } else { %>
  349. <tr><th width="60%">含税(信息价/指数法)</th><td width="20%">0</td><td width="20%">0</td></tr>
  350. <tr><th>不含税(信息价/指数法)</th><td>0</td><td>0</td></tr>
  351. <% } %>
  352. </table>
  353. </div>
  354. </div>
  355. </div>
  356. </div>
  357. </div>
  358. </div>
  359. </div>
  360. <!--期进度表-->
  361. <div class="col-6">
  362. <div class="card mb-3 <% if (!ctx.tender.info.display.dayMode) { %>bg-dark text-white<% } %> bottom-height">
  363. <% if (hadMap === 1 || hadMap === 2) { %>
  364. <div class="card-header"><h6 class="mb-0">章节计量情况表</h6></div>
  365. <div class="card-body">
  366. <div id="jlchart3" style="height: 300px; width: 100%;"></div>
  367. </div>
  368. <% } else { %>
  369. <div class="card-header"><h6 class="mb-0">期进度表</h6></div>
  370. <div class="card-body">
  371. <div id="chartContainer4" style="height: 300px; width: 100%;"></div>
  372. </div>
  373. <% } %>
  374. </div>
  375. </div>
  376. <!--月进度表-->
  377. <div class="col-6 pl-0">
  378. <div class="card mb-3 bottom-height <% if (!ctx.tender.info.display.dayMode) { %>bg-dark text-white<% } %>">
  379. <% if (hadMap === 1 || hadMap === 2) { %>
  380. <div class="card-header">
  381. <ul class="nav nav-tabs card-header-tabs panel-card-tabs <% if (ctx.tender.info.display.dayMode) { %>nav-white-tabs<% } %>" id="change-echarts">
  382. <li class="nav-item">
  383. <a class="nav-link active" data-toggle="tab" href="#qijindubiao" role="tab" aria-selected="true">期进度表</a>
  384. </li>
  385. <li class="nav-item">
  386. <a class="nav-link" data-toggle="tab" href="#yuejindbiao" role="tab" aria-selected="true">月进度表</a>
  387. </li>
  388. </ul>
  389. </div>
  390. <div class="card-body">
  391. <div class="tab-content">
  392. <div class="tab-pane active" id="qijindubiao">
  393. <div id="chartContainer4" class="bottom-height-two" style="width: 100%;"></div>
  394. </div>
  395. <div class="tab-pane" id="yuejindbiao" >
  396. <div id="chartContainer3" class="bottom-height-two" style="width: 100%;"></div>
  397. </div>
  398. </div>
  399. </div>
  400. <% } else { %>
  401. <div class="card-header"><h6 class="mb-0">月进度表</h6></div>
  402. <div class="card-body">
  403. <div id="chartContainer3" style="height: 300px; width: 100%;"></div>
  404. </div>
  405. <% } %>
  406. </div>
  407. </div>
  408. </div>
  409. </div>
  410. </div>
  411. </div>
  412. </div>
  413. </div>
  414. </div>
  415. </div>
  416. <script type="text/javascript">
  417. const tenders = JSON.parse(unescape('<%- escape(JSON.stringify(tenders)) %>'));
  418. const category = JSON.parse(unescape('<%- escape(JSON.stringify(categoryData)) %>'));
  419. const tender = JSON.parse('<%- JSON.stringify(tender) %>');
  420. const cur_uid = parseInt('<%- ctx.session.sessionUser.accountId %>');
  421. const dayMode = <%- ctx.tender.info.display.dayMode %>;
  422. //计量完成概况//
  423. var myChart = echarts.init(document.getElementById('jlchart1')<% if (!ctx.tender.info.display.dayMode) { %>, 'dark'<% } %>);
  424. var option = {
  425. <% if (ctx.tender.info.display.dayMode) { %>
  426. color: ['#e9af68','#57b7b6','#e4575a','#959eac','#6699FF',
  427. '#d38b70','#8fb7cf','#cd5c5c','#ffa500','#40e0d0',
  428. '#1e90ff','#ff6347','#7b68ee','#00fa9a','#ffd700',
  429. '#5c616b','#ff6666','#3cb371','#b8860b','#30e0e0'],
  430. <% } else { %>
  431. color: ['rgba(24,144,255,0.7)','rgba(69,183,149,0.7)','rgba(250,204,20,0.7)','rgba(145,82,225,0.7)','rgba(58,207,221,0.7)','rgba(204,73,80,0.7)','rgba(255,255,225,0.7)'],
  432. backgroundColor: '#343a40 ',
  433. <% } %>
  434. tooltip: {
  435. trigger: 'item'
  436. },
  437. legend: {
  438. top: '0%',
  439. left: '0%',
  440. orient:'vertical'
  441. },
  442. series: [
  443. {
  444. name: '金额',
  445. type: 'pie',
  446. top:'0%',
  447. left:'50%',
  448. radius: ['100%'],
  449. avoidLabelOverlap: false,
  450. label: {
  451. show: false,
  452. position: 'right'
  453. },
  454. emphasis: {
  455. label: {
  456. show: true,
  457. fontSize: '20',
  458. fontWeight: 'bold'
  459. }
  460. },
  461. labelLine: {
  462. show: false
  463. },
  464. data: [
  465. <% for (const s of stage_total) { %>
  466. {value: <%- s.num %>, name: '<%- s.name %>'},
  467. <% } %>
  468. ]
  469. }
  470. ]
  471. };
  472. // 为echarts对象加载数据
  473. myChart.setOption(option);
  474. //计量完成概况 结束//
  475. //计量支付概况//
  476. var myChart1 = echarts.init(document.getElementById('jlchart2')<% if (!ctx.tender.info.display.dayMode) { %>, 'dark'<% } %>);
  477. var option1 = {
  478. <% if (!ctx.tender.info.display.dayMode) { %>backgroundColor: '#343a40 ',<% } %>
  479. tooltip: {
  480. trigger: 'axis',
  481. axisPointer: {
  482. type: 'shadow'
  483. }
  484. },
  485. grid: {
  486. left: '3%',
  487. right: '18%',
  488. top:'5%',
  489. bottom: '0%',
  490. containLabel: true
  491. },
  492. yAxis: {
  493. type: 'category',
  494. data: ['总价', '截止应付', '截止实付']
  495. },
  496. xAxis: {
  497. type: 'value',
  498. name : '金额',
  499. position:'left',
  500. axisLabel : {
  501. interval: 0,//横轴信息全部显示
  502. rotate: 35,// 倾斜角度
  503. formatter: function (value, index) {
  504. if (value < 0) {
  505. let newValue = Math.abs(value);
  506. if (newValue >= 10000 && newValue < 10000000) {
  507. newValue = newValue / 10000 + "万";
  508. } else if (newValue >= 10000000) {
  509. newValue = newValue / 10000000 + "千万";
  510. }
  511. value = '-' + newValue;
  512. }
  513. if (value >= 10000 && value < 10000000) {
  514. value = value / 10000 + "万";
  515. } else if (value >= 10000000) {
  516. value = value / 10000000 + "千万";
  517. }
  518. return value;
  519. }
  520. },
  521. splitArea : {show : true}
  522. },
  523. series: [{
  524. data: [<%- tender.total_price ? tender.total_price : 0 %>, <%- tender.end_yf_tp ? tender.end_yf_tp : 0 %>, <%- tender.end_sf_tp ? tender.end_sf_tp : 0 %>,],
  525. type: 'bar',
  526. itemStyle:{
  527. normal:{
  528. color:function(params){
  529. <% if (ctx.tender.info.display.dayMode) { %>
  530. var colorlist = ['#e9af68','#57b7b6','#e4575a','#959eac','#6699FF',
  531. '#d38b70','#8fb7cf','#cd5c5c','#ffa500','#40e0d0',
  532. '#1e90ff','#ff6347','#7b68ee','#00fa9a','#ffd700',
  533. '#5c616b','#ff6666','#3cb371','#b8860b','#30e0e0'];
  534. <% } else { %>
  535. var colorlist = ['rgba(24,144,255,0.7)','rgba(69,183,149,0.7)','rgba(250,204,20,0.7)','rgba(145,82,225,0.7)','rgba(58,207,221,0.7)','rgba(204,73,80,0.7)','rgba(255,255,225,0.7)'];
  536. <% } %>
  537. return colorlist[params.dataIndex];
  538. }
  539. }
  540. }
  541. }]
  542. };
  543. // 为echarts对象加载数据
  544. myChart1.setOption(option1);
  545. //计量支付概况 结束//
  546. //章节计量情况图//
  547. var myChart2 = echarts.init(document.getElementById('jlchart3')<% if (!ctx.tender.info.display.dayMode) { %>, 'dark'<% } %>);
  548. var option2 = {
  549. <% if (ctx.tender.info.display.dayMode) { %>
  550. color: ['#e9af68','#57b7b6','#e4575a','#959eac','#6699FF',
  551. '#d38b70','#8fb7cf','#cd5c5c','#ffa500','#40e0d0',
  552. '#1e90ff','#ff6347','#7b68ee','#00fa9a','#ffd700',
  553. '#5c616b','#ff6666','#3cb371','#b8860b','#30e0e0'],
  554. <% } else { %>
  555. color: ['rgba(24,144,255,0.7)','rgba(69,183,149,0.7)','rgba(250,204,20,0.7)','rgba(145,82,225,0.7)','rgba(58,207,221,0.7)','rgba(204,73,80,0.7)','rgba(255,255,225,0.7)'],
  556. backgroundColor: '#343a40 ',
  557. <% } %>
  558. tooltip: {
  559. trigger: 'axis',
  560. axisPointer: {
  561. type: 'shadow'
  562. }
  563. },
  564. legend: {
  565. data: ['台账金额','截止本期计量']
  566. },
  567. grid: {
  568. left: '3%',
  569. right: '4%',
  570. bottom: '3%',
  571. containLabel: true
  572. },
  573. yAxis: {
  574. type : 'value',
  575. name : '金额',
  576. position:'left',
  577. axisLabel : {
  578. // if (ctx.tender.info.display.thousandth) {
  579. // formatter: function (value, index) {
  580. // return value.format2Str('#,##0.######') + ' 元'
  581. // }
  582. formatter: function (value, index) {
  583. if (value < 0) {
  584. let newValue = Math.abs(value);
  585. if (newValue >= 10000 && newValue < 10000000) {
  586. newValue = newValue / 10000 + "万";
  587. } else if (newValue >= 10000000) {
  588. newValue = newValue / 10000000 + "千万";
  589. }
  590. value = '-' + newValue;
  591. }
  592. if (value >= 10000 && value < 10000000) {
  593. value = value / 10000 + "万";
  594. } else if (value >= 10000000) {
  595. value = value / 10000000 + "千万";
  596. }
  597. return value;
  598. }
  599. },
  600. splitArea : {show : true}
  601. },
  602. xAxis: {
  603. type: 'category',
  604. data: [
  605. <% for (const gcl of gclChapter) { %>
  606. <% if (parseInt(gcl.code) <= 900 || (parseInt(gcl.code) > 900 && (gcl.total_price !== 0 || gcl.end_gather_tp !== 0))) { %>
  607. '<%- gcl.code %>章',
  608. <% } %>
  609. <% } %>
  610. ]
  611. },
  612. series: [
  613. {
  614. name: '台账金额',
  615. type: 'bar',
  616. data: [
  617. <% for (const gcl of gclChapter) { %>
  618. <% if (parseInt(gcl.code) <= 900 || (parseInt(gcl.code) > 900 && (gcl.total_price !== 0 || gcl.end_gather_tp !== 0))) { %>
  619. <%- gcl.total_price %>,
  620. <% } %>
  621. <% } %>
  622. ]
  623. },
  624. {
  625. name: '截止本期计量',
  626. type: 'bar',
  627. data: [
  628. <% for (const gcl of gclChapter) { %>
  629. <% if (parseInt(gcl.code) <= 900 || (parseInt(gcl.code) > 900 && (gcl.total_price !== 0 || gcl.end_gather_tp !== 0))) { %>
  630. <%- gcl.end_gather_tp %>,
  631. <% } %>
  632. <% } %>
  633. ]
  634. }
  635. ]
  636. };
  637. // 为echarts对象加载数据
  638. myChart2.setOption(option2);
  639. //4 标段期数计量进度//
  640. var myChart3 = echarts.init(document.getElementById('chartContainer4')<% if (!ctx.tender.info.display.dayMode) { %>, 'dark'<% } %>);
  641. var option3 = {
  642. <% if (ctx.tender.info.display.dayMode) { %>
  643. color: ['#e9af68','#57b7b6','#e4575a','#959eac','#6699FF',
  644. '#d38b70','#8fb7cf','#cd5c5c','#ffa500','#40e0d0',
  645. '#1e90ff','#ff6347','#7b68ee','#00fa9a','#ffd700',
  646. '#5c616b','#ff6666','#3cb371','#b8860b','#30e0e0'],
  647. <% } else { %>
  648. color: ['rgba(24,144,255,0.7)','rgba(69,183,149,0.7)','rgba(250,204,20,0.7)','rgba(145,82,225,0.7)','rgba(204,73,80,0.7)','rgba(58,207,221,0.7)','rgba(255,255,225,0.7)'],
  649. backgroundColor: '#343a40 ',
  650. <% } %>
  651. title : {
  652. text: ''
  653. },
  654. tooltip : {
  655. trigger: 'axis',
  656. },
  657. calculable : true,
  658. legend: {
  659. itemWidth:15,
  660. data:['本期合同计量','本期数量变更计量','截止上期完成','本期完成计量','完成度']
  661. },
  662. dataZoom: [
  663. {show: true, start: 0, end: 100,height:10,bottom:30}
  664. ],
  665. xAxis : [
  666. {
  667. type : 'category',
  668. splitLine : {show : true},
  669. data : [
  670. <% for (const s of stages) {%>
  671. '第<%- s.order %>期',
  672. <% } %>
  673. ]
  674. }
  675. ],
  676. yAxis : [
  677. {
  678. type : 'value',
  679. name : '金额',
  680. position:'left',
  681. axisLabel : {
  682. formatter: function (value, index) {
  683. if (value < 0) {
  684. let newValue = Math.abs(value);
  685. if (newValue >= 10000 && newValue < 10000000) {
  686. newValue = newValue / 10000 + "万";
  687. } else if (newValue >= 10000000) {
  688. newValue = newValue / 10000000 + "千万";
  689. }
  690. value = '-' + newValue;
  691. }
  692. if (value >= 10000 && value < 10000000) {
  693. value = value / 10000 + "万";
  694. } else if (value >= 10000000) {
  695. value = value / 10000000 + "千万";
  696. }
  697. return value;
  698. }
  699. },
  700. splitArea : {show : true},
  701. splitLine : {show : true},
  702. },
  703. {
  704. type : 'value',
  705. name:'完成度',
  706. axisLabel : {
  707. formatter: '{value} %'
  708. },
  709. position: 'right',
  710. splitArea : {show : false},
  711. splitLine : {show : false},
  712. }
  713. ],
  714. series : [
  715. {
  716. name:'本期合同计量',
  717. type:'bar',
  718. tooltip : {
  719. trigger: 'item',
  720. <% if (ctx.tender.info.display.thousandth) { %>
  721. formatter: function (params, ticket, callback) {
  722. return params.name + '<br/>' + params.seriesName + ': ' + params.value.format2Str('#,##0.######') + ' 元';
  723. }
  724. <% } else { %>
  725. tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
  726. <% } %>
  727. },
  728. stack: '合同',
  729. data:[
  730. <% for (const s of stages) {%>
  731. <%- s.contract_tp %>,
  732. <% } %>
  733. ]
  734. },
  735. {
  736. name:'本期数量变更计量',
  737. type:'bar',
  738. tooltip : {
  739. trigger: 'item',
  740. <% if (ctx.tender.info.display.thousandth) { %>
  741. formatter: function (params, ticket, callback) {
  742. return params.name + '<br/>' + params.seriesName + ': ' + params.value.format2Str('#,##0.######') + ' 元';
  743. }
  744. <% } else { %>
  745. tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
  746. <% } %>
  747. },
  748. stack: '变更',
  749. data:[
  750. <% for (const s of stages) {%>
  751. <%- s.qc_tp %>,
  752. <% } %>
  753. ]
  754. },
  755. {
  756. name:'截止上期完成',
  757. type:'bar',
  758. tooltip : {
  759. trigger: 'item',
  760. <% if (ctx.tender.info.display.thousandth) { %>
  761. formatter: function (params, ticket, callback) {
  762. return params.name + '<br/>' + params.seriesName + ': ' + params.value.format2Str('#,##0.######') + ' 元';
  763. }
  764. <% } else { %>
  765. tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
  766. <% } %>
  767. },
  768. stack: '完成',
  769. data:[
  770. <% for (const s of stages) {%>
  771. <%- ctx.helper.add(s.pre_contract_tp, s.pre_qc_tp) %>,
  772. <% } %>
  773. ]
  774. },
  775. {
  776. name:'本期完成计量',
  777. type:'bar',
  778. tooltip : {
  779. trigger: 'item',
  780. <% if (ctx.tender.info.display.thousandth) { %>
  781. formatter: function (params, ticket, callback) {
  782. return params.name + '<br/>' + params.seriesName + ': ' + params.value.format2Str('#,##0.######') + ' 元';
  783. }
  784. <% } else { %>
  785. tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
  786. <% } %>
  787. },
  788. stack: '完成',
  789. data:[
  790. <% for (const s of stages) {%>
  791. <%- ctx.helper.sum([s.contract_tp, s.qc_tp, s.pc_tp]) %>,
  792. <% } %>
  793. ]
  794. },
  795. {
  796. name:'完成度',
  797. type:'line',
  798. tooltip : {trigger: 'axis',formatter: "{b}占总标段<br/>{a}:{c} %"},
  799. yAxisIndex: 1,
  800. data:[
  801. <% for (const s of stages) {%>
  802. <%- ctx.helper.mul(ctx.helper.div(ctx.helper.sum([s.contract_tp, s.qc_tp, s.pc_tp]), tender.sum, 2), 100) %>,
  803. <% } %>
  804. ]
  805. },
  806. ]
  807. };
  808. // 为echarts对象加载数据
  809. myChart3.setOption(option3);
  810. //4 标段期数计量进度//
  811. //3 标段月进度//
  812. // 基于准备好的dom,初始化echarts图表
  813. var myChart4 = echarts.init(document.getElementById('chartContainer3')<% if (!ctx.tender.info.display.dayMode) { %>, 'dark'<% } %>);
  814. var option4 = {
  815. <% if (ctx.tender.info.display.dayMode) { %>
  816. color: ['#e9af68','#57b7b6','#e4575a','#959eac','#6699FF',
  817. '#d38b70','#8fb7cf','#cd5c5c','#ffa500','#40e0d0',
  818. '#1e90ff','#ff6347','#7b68ee','#00fa9a','#ffd700',
  819. '#5c616b','#ff6666','#3cb371','#b8860b','#30e0e0'],
  820. <% } else { %>
  821. color:["#17a2b8","#28a745"],
  822. backgroundColor: '#343a40 ',
  823. <% } %>
  824. title : {
  825. text: ''
  826. },
  827. tooltip : {
  828. trigger: 'axis',
  829. formatter: function (params, ticket, callback) {
  830. let sHint = '';
  831. for (const param of params) {
  832. if (sHint !== '') {
  833. sHint += '<br>';
  834. }
  835. if (sHint === '' && param.name !== '') {
  836. sHint = param.name + '<br>';
  837. }
  838. sHint += '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:' + param.color +'"></span>';
  839. if (param.data) {
  840. sHint += param.seriesName + ': ' + param.data + ' %';
  841. } else {
  842. sHint += param.seriesName + ': -';
  843. }
  844. }
  845. return sHint;
  846. },
  847. },
  848. legend: {
  849. data:['截止本月完成','本月完成']
  850. },
  851. toolbox: {
  852. show : true,
  853. right:'3%',
  854. feature : {
  855. magicType : {
  856. show: true,
  857. type: ['line', 'bar'],
  858. title:{
  859. line:'切换为折线图',
  860. bar:'切换为柱状图'
  861. }
  862. }
  863. }
  864. },
  865. dataZoom : {
  866. show : true,
  867. start : 50,
  868. end : 100,
  869. height:10,
  870. bottom:30
  871. },
  872. xAxis : [
  873. {
  874. type : 'category',
  875. boundaryGap : true,
  876. data : [
  877. <% for (const mp of monthProgress) { %>
  878. '<%- mp.month %>',
  879. <% } %>
  880. ]
  881. }
  882. ],
  883. yAxis : [
  884. {
  885. type : 'value',
  886. axisLabel : {
  887. formatter: '{value} %'
  888. },
  889. splitArea : {show : true}
  890. }
  891. ],
  892. series : [
  893. {
  894. name:'截止本月完成',
  895. type:'line',
  896. itemStyle: {
  897. normal: {
  898. lineStyle: {
  899. shadowColor : 'rgba(0,0,0,0.4)',
  900. shadowBlur: 5,
  901. shadowOffsetX: 3,
  902. shadowOffsetY: 3
  903. }
  904. }
  905. },
  906. areaStyle: { // 区域填充样式
  907. color: { // 填充的颜色 // 线性渐变,前四个参数分别是 x0, y0, x2, y2, 范围从 0 - 1,相当于在图形包围盒中的百分比,如果 globalCoord 为 `true`,则该四个值是绝对的像素位置
  908. type: 'linear',
  909. x: 0,
  910. y: 0,
  911. x2: 0,
  912. y2: 1,
  913. colorStops: [
  914. {
  915. offset: 0,
  916. color: 'rgba(37,234,255,0.7)', // 0% 处的颜色
  917. },
  918. {
  919. offset: 1,
  920. color: 'rgba(37,234,255,0.7)' // 100% 处的颜色
  921. }
  922. ],
  923. global: false, // 缺省为 false
  924. }
  925. },
  926. data:[
  927. <% for (const mp of monthProgress) { %>
  928. <%- mp.end_ratio %>,
  929. <% } %>
  930. ]
  931. },
  932. {
  933. name:'本月完成',
  934. type:'line',
  935. itemStyle: {
  936. normal: {
  937. lineStyle: {
  938. shadowColor : 'rgba(0,0,0,0.4)',
  939. shadowBlur: 5,
  940. shadowOffsetX: 3,
  941. shadowOffsetY: 3
  942. }
  943. }
  944. },
  945. areaStyle: { // 区域填充样式
  946. color: { // 填充的颜色 // 线性渐变,前四个参数分别是 x0, y0, x2, y2, 范围从 0 - 1,相当于在图形包围盒中的百分比,如果 globalCoord 为 `true`,则该四个值是绝对的像素位置
  947. type: 'linear',
  948. x: 0,
  949. y: 0,
  950. x2: 0,
  951. y2: 1,
  952. colorStops: [
  953. {
  954. offset: 0,
  955. color: 'rgba(40,167,69,0.7)', // 0% 处的颜色
  956. },
  957. {
  958. offset: 1,
  959. color: 'rgba(40,167,69,0.7)' // 100% 处的颜色
  960. }
  961. ],
  962. global: false, // 缺省为 false
  963. }
  964. },
  965. data:[
  966. <% for (const mp of monthProgress) { %>
  967. <%- mp.ratio %>,
  968. <% } %>
  969. ]
  970. }
  971. ]
  972. };
  973. // 为echarts对象加载数据
  974. myChart4.setOption(option4);
  975. //3 标段月进度//
  976. //变更审批进度//
  977. var myChart5 = echarts.init(document.getElementById('bgchart')<% if (!ctx.tender.info.display.dayMode) { %>, 'dark'<% } %>);
  978. var option5 = {
  979. <% if (ctx.tender.info.display.dayMode) { %>
  980. color: ['#e9af68','#57b7b6','#e4575a','#959eac','#6699FF',
  981. '#d38b70','#8fb7cf','#cd5c5c','#ffa500','#40e0d0',
  982. '#1e90ff','#ff6347','#7b68ee','#00fa9a','#ffd700',
  983. '#5c616b','#ff6666','#3cb371','#b8860b','#30e0e0'],
  984. <% } else {%>
  985. color: ['rgba(145,82,225,0.7)','rgba(58,207,221,0.7)','rgba(204,73,80,0.7)','rgba(24,144,255,0.7)','rgba(69,183,149,0.7)','rgba(250,204,20,0.7)','rgba(255,255,225,0.7)'],
  986. backgroundColor: '#343a40 ',
  987. <% } %>
  988. tooltip: {
  989. trigger: 'item'
  990. },
  991. // legend: {
  992. // top: '0%',
  993. // right: '0%',
  994. // orient:'vertical',
  995. // itemWidth:15,
  996. // data: ['一般变更', '较大变更', '重大变更', '待上报', '审批中', '已完成']
  997. // },
  998. legend:[{
  999. top: '0%',
  1000. right: '0%',
  1001. orient:'vertical',
  1002. itemWidth:15,
  1003. data:['一般变更','较大变更','重大变更']
  1004. },{
  1005. top: '0%',
  1006. right: '35%',
  1007. orient:'vertical',
  1008. itemWidth:15,
  1009. data:['待上报','审批中','已完成']
  1010. }],
  1011. series: [
  1012. {
  1013. name: '数量',
  1014. type: 'pie',
  1015. top:'0%',
  1016. right:'65%',
  1017. selectedMode: 'single',
  1018. radius: '50%',
  1019. avoidLabelOverlap: false,
  1020. label: {
  1021. show:false,
  1022. //position: 'inner',
  1023. //fontSize: 14,
  1024. },
  1025. labelLine: {
  1026. show: false
  1027. },
  1028. data: [
  1029. <% for (const cs of change_status_total) { %>
  1030. {value: <%- cs.num %>, name: '<%- cs.name %>'},
  1031. <% } %>
  1032. ]
  1033. },
  1034. {
  1035. name: '数量',
  1036. type: 'pie',
  1037. top:'0%',
  1038. right:'65%',
  1039. radius: ['70%', '100%'],
  1040. avoidLabelOverlap: false,
  1041. label: {
  1042. show: false,
  1043. position: 'center'
  1044. },
  1045. emphasis: {
  1046. label: {
  1047. show: false,
  1048. //fontSize: '14',
  1049. //fontWeight: 'bold'
  1050. }
  1051. },
  1052. labelLine: {
  1053. //show: false,
  1054. length: 20,
  1055. },
  1056. data: [
  1057. <% for (const cq of change_quality_total) { %>
  1058. {value: <%- cq.num %>, name: '<%- cq.name %>'},
  1059. <% } %>
  1060. ]
  1061. }
  1062. ]
  1063. };
  1064. // 为echarts对象加载数据
  1065. myChart5.setOption(option5);
  1066. function echartsReset() {
  1067. myChart.resize();
  1068. myChart1.resize();
  1069. myChart2.resize();
  1070. myChart3.resize();
  1071. myChart4.resize();
  1072. myChart5.resize();
  1073. }
  1074. $(function () {
  1075. $('#change-echarts a[data-toggle="tab"]').on('shown.bs.tab', function(e) {
  1076. myChart3.resize();
  1077. myChart4.resize();
  1078. });
  1079. $('#showFull').click(function () {
  1080. const full=document.getElementById("big-data");
  1081. launchIntoFullscreen(full);
  1082. // $('#exitFull').show();
  1083. // $('#showFull').hide();
  1084. });
  1085. $('#exitFull').click(function () {
  1086. exitFullscreen();
  1087. // $('#exitFull').hide();
  1088. // $('#showFull').show();
  1089. })
  1090. })
  1091. $(window).resize(echartsReset);
  1092. // 数据全屏
  1093. function launchIntoFullscreen(element) {
  1094. if(element.requestFullscreen){
  1095. element.requestFullscreen();
  1096. }
  1097. else if(element.mozRequestFullScreen) {
  1098. element.mozRequestFullScreen();
  1099. }
  1100. else if(element.webkitRequestFullscreen) {
  1101. element.webkitRequestFullscreen();
  1102. }
  1103. else if(element.msRequestFullscreen) {
  1104. element.msRequestFullscreen();
  1105. }
  1106. }
  1107. function exitFullscreen() {
  1108. if(document.exitFullscreen) {
  1109. document.exitFullscreen();
  1110. } else if(document.mozCancelFullScreen) {
  1111. document.mozCancelFullScreen();
  1112. } else if(document.webkitExitFullscreen) {
  1113. document.webkitExitFullscreen();
  1114. }
  1115. }
  1116. document.addEventListener("fullscreenchange", function (event) {
  1117. if (document.fullscreenElement) {
  1118. $('#exitfull-div').show();
  1119. $('#showFull').hide();
  1120. } else {
  1121. $('#exitfull-div').hide();
  1122. $('#showFull').show();
  1123. }
  1124. });
  1125. </script>
  1126. <script src="/public/js/sub_menu.js"></script>
  1127. <script>
  1128. $.subMenu({
  1129. menu: '#sub-menu', miniMenu: '#sub-mini-menu', miniMenuList: '#mini-menu-list',
  1130. toMenu: '#to-menu', toMiniMenu: '#to-mini-menu',
  1131. key: 'menu.1.0.0',
  1132. miniHint: '#sub-mini-hint', hintKey: 'menu.hint.1.0.1',
  1133. callback: function (info) {
  1134. if (info.mini) {
  1135. $('.panel-title').addClass('fluid');
  1136. $('#sub-menu').removeClass('panel-sidebar');
  1137. } else {
  1138. $('.panel-title').removeClass('fluid');
  1139. $('#sub-menu').addClass('panel-sidebar');
  1140. }
  1141. autoFlashHeight();
  1142. echartsReset();
  1143. }
  1144. });
  1145. </script>
  1146. <script>
  1147. const tenderId = parseInt('<%- tender.id %>');
  1148. $(document).ready(function () {
  1149. // 获取审批流程
  1150. $('a[data-target="#sp-list" ]').on('click', function () {
  1151. const type = $(this).attr('data-type');
  1152. const data = {
  1153. order: $(this).attr('data-order'),
  1154. };
  1155. let url = '';
  1156. let auditConst = '';
  1157. if (type === 'stage') {
  1158. url = '/tender/' + tenderId + '/measure/stage/auditors';
  1159. auditConst = JSON.parse('<%- JSON.stringify(audit.stage) %>');
  1160. } else if (type === 'ledger') {
  1161. url = '/tender/' + tenderId + '/measure/ledger/auditors';
  1162. auditConst = JSON.parse('<%- JSON.stringify(audit.ledger) %>');
  1163. } else if (type === 'material') {
  1164. url = '/tender/' + tenderId + '/measure/material/auditors';
  1165. auditConst = JSON.parse('<%- JSON.stringify(audit.material) %>');
  1166. }
  1167. postData(url, data, function (result) {
  1168. const { auditHistory, auditors, user } = result
  1169. let historyHTML = ''
  1170. const leftAuditors = auditors;
  1171. const darkHTML = !dayMode ? 'bg-dark border-secondary text-white' : '';
  1172. auditHistory.forEach((auditors, idx) => {
  1173. if(idx === auditHistory.length - 1 && auditHistory.length !== 1) {
  1174. historyHTML += `<div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
  1175. >展开历史审批流程</a></div>`
  1176. }
  1177. historyHTML += `<div class="${idx < auditHistory.length - 1 ? 'fold-card' : ''}">
  1178. <div class="text-center text-muted">${idx + 1}#</div>
  1179. <ul class="timeline-list list-unstyled mt-2">`
  1180. auditors.forEach((auditor, index) => {
  1181. if (index === 0) {
  1182. historyHTML += `<li class="timeline-list-item pb-2">
  1183. <div class="timeline-item-date">
  1184. ${formatDate(auditor.begin_time, !dayMode)}
  1185. </div>
  1186. <div class="timeline-item-tail"></div>
  1187. <div class="timeline-item-icon bg-success text-light">
  1188. <i class="fa fa-caret-down"></i>
  1189. </div>
  1190. <div class="timeline-item-content">
  1191. <div class="card ${darkHTML}">
  1192. <div class="card-body p-3">
  1193. <div class="card-text">
  1194. <p class="mb-1"><span
  1195. class="h5">${user.name}</span><span
  1196. class="pull-right text-success">${idx !== 0 ? '重新' : ''}上报审批</span>
  1197. </p>
  1198. <p class="text-muted mb-0">${user.role}</p>
  1199. </div>
  1200. </div>
  1201. </div>
  1202. </div>
  1203. </li>
  1204. <li class="timeline-list-item pb-2">
  1205. <div class="timeline-item-date">
  1206. ${formatDate(auditor.end_time, !dayMode)}
  1207. </div>`
  1208. if(index < auditors.length - 1) {
  1209. historyHTML += `<div class="timeline-item-tail"></div>`
  1210. }
  1211. if(auditor.status === auditConst.status.checked) {
  1212. historyHTML += `<div class="timeline-item-icon bg-success text-light">
  1213. <i class="fa fa-check"></i>
  1214. </div>`
  1215. } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {
  1216. historyHTML += `<div class="timeline-item-icon bg-warning text-light">
  1217. <i class="fa fa-level-up"></i>
  1218. </div>`
  1219. } else if(auditor.status === auditConst.status.checking) {
  1220. historyHTML += `<div class="timeline-item-icon bg-warning text-light">
  1221. <i class="fa fa-ellipsis-h"></i>
  1222. </div>`
  1223. } else {
  1224. historyHTML += `<div class="timeline-item-icon bg-secondary text-light"></div>`
  1225. }
  1226. historyHTML += `<div class="timeline-item-content">
  1227. <div class="card ${darkHTML}">
  1228. <div class="card-body p-3">
  1229. <div class="card-text">
  1230. <p class="mb-1"><span class="h5">${auditor.name}</span><span
  1231. class="pull-right ${auditConst.statusClass[auditor.status]}">${auditConst.statusString[auditor.status]}</span>
  1232. </p>
  1233. <p class="text-muted mb-0">${auditor.role}</p>
  1234. </div>
  1235. </div>`
  1236. if (auditor.opinion) {
  1237. historyHTML += `<div class="card-body p-3 border-top">
  1238. <p style="margin: 0;">${auditor.opinion}</p>
  1239. </div>`
  1240. }
  1241. historyHTML += `</div></div></li>`
  1242. } else {
  1243. historyHTML += `<li class="timeline-list-item pb-2">
  1244. <div class="timeline-item-date">
  1245. ${formatDate(auditor.end_time, !dayMode)}
  1246. </div>`
  1247. if(index < auditors.length - 1) {
  1248. historyHTML += `<div class="timeline-item-tail"></div>`
  1249. }
  1250. if(auditor.status === auditConst.status.checked) {
  1251. historyHTML += `<div class="timeline-item-icon bg-success text-light">
  1252. <i class="fa fa-check"></i>
  1253. </div>`
  1254. } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {
  1255. historyHTML += `<div class="timeline-item-icon bg-warning text-light">
  1256. <i class="fa fa-level-up"></i>
  1257. </div>`
  1258. } else if(auditor.status === auditConst.status.checking) {
  1259. historyHTML += `<div class="timeline-item-icon bg-warning text-light">
  1260. <i class="fa fa-ellipsis-h"></i>
  1261. </div>`
  1262. } else {
  1263. historyHTML += `<div class="timeline-item-icon bg-secondary text-light"></div>`
  1264. }
  1265. historyHTML += `<div class="timeline-item-content">
  1266. <div class="card ${darkHTML}">
  1267. <div class="card-body p-3">
  1268. <div class="card-text">
  1269. <p class="mb-1"><span class="h5">${auditor.name}</span>
  1270. <span
  1271. class="pull-right
  1272. ${auditConst.statusClass[auditor.status]}">${auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''}
  1273. ${auditor.status === auditConst.status.checkNo ? user.name : ''}
  1274. ${auditor.status === auditConst.status.checkNoPre ? (leftAuditors.find(item => item.order === auditor.sort-1) ? leftAuditors.find(item => item.order === auditor.sort-1).name : '') : ''}
  1275. </span>
  1276. </p>
  1277. <p class="text-muted mb-0">${auditor.role}</p>
  1278. </div>
  1279. </div>`
  1280. if (auditor.opinion) {
  1281. historyHTML += `<div class="card-body p-3 border-top">
  1282. <p style="margin: 0;">${auditor.opinion} </p>
  1283. </div>`
  1284. }
  1285. historyHTML += `</div></div></li>`
  1286. }
  1287. })
  1288. historyHTML += '</ul></div>'
  1289. })
  1290. $('#audit-list').empty()
  1291. $('#audit-list').append(historyHTML)
  1292. });
  1293. });
  1294. // 展开/收起历史审核记录
  1295. $('#audit-list').on('click', 'a', function() {
  1296. const type = $(this).data('target')
  1297. const auditCard = $(this).parent().parent()
  1298. console.log('auditCard', auditCard)
  1299. if (type === 'show') {
  1300. $(this).data('target', 'hide')
  1301. auditCard.find('.fold-card').slideDown('swing', () => {
  1302. auditCard.find('#end-target').text($(this).data('idx') + '#')
  1303. auditCard.find('#fold-btn').text('收起历史审核记录')
  1304. })
  1305. } else {
  1306. $(this).data('target', 'show')
  1307. auditCard.find('.fold-card').slideUp('swing', () => {
  1308. auditCard.find('#end-target').text('1#')
  1309. auditCard.find('#fold-btn').text('展开历史审核记录')
  1310. })
  1311. }
  1312. });
  1313. function formatDate(date, dayMode) {
  1314. if (!date) return '';
  1315. date = new Date(date)
  1316. const year = date.getFullYear();
  1317. let mon = date.getMonth() + 1;
  1318. let day = date.getDate();
  1319. let hour = date.getHours();
  1320. let minute = date.getMinutes();
  1321. let scond = date.getSeconds();
  1322. if (mon < 10) {
  1323. mon = '0' + mon.toString();
  1324. }
  1325. if (day < 10) {
  1326. day = '0' + day.toString();
  1327. }
  1328. if (hour < 10) {
  1329. hour = '0' + hour.toString();
  1330. }
  1331. if (minute < 10) {
  1332. minute = '0' + minute.toString();
  1333. }
  1334. if (scond < 10) {
  1335. scond = '0' + scond.toString();
  1336. }
  1337. return `${year}<span class="${dayMode ? 'text-light' : ''}">${mon}-${day}</span><span class="${dayMode ? 'text-light' : ''}">${hour}:${minute}:${scond}</span>`;
  1338. };
  1339. })
  1340. </script>
  1341. <% if (hadMap === 1 || ctx.session.sessionUser.is_admin) { %>
  1342. <script src="/public/js/map/turf.min.js"></script>
  1343. <script src="/public/js/map/gcoord.js"></script>
  1344. <script>
  1345. const tenderMapList = JSON.parse(unescape('<%- escape(JSON.stringify(tenderMapList)) %>'));
  1346. </script>
  1347. <% } %>
  1348. <% if (hadMap === 1) { %>
  1349. <!--<script src="//bj.bcebos.com/v1/mapopen/api-demos/js/mapStyle.js"></script>-->
  1350. <script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=C3hLZAjuWTaCdwnwoYY83APrwlPEj4v7"></script>
  1351. <script type="text/javascript">
  1352. // 画线
  1353. $(function () {
  1354. const map = new BMapGL.Map("map");
  1355. // 创建地图实例
  1356. const polyLineList = [];
  1357. const centerPoint = { lng: <%- map_json.lng %>, lat: <%- map_json.lat %> };
  1358. let level = <%- map_json.level %>;
  1359. const pointList = [];
  1360. const centerList = [];
  1361. for (const tm of tenderMapList) {
  1362. if (tm.map_json) {
  1363. const map_json = JSON.parse(unescape(escape(tm.map_json)));
  1364. const lngLatList = [];
  1365. for (const mj of map_json) {
  1366. const result = gcoord.transform([mj.lng, mj.lat], gcoord.WGS84, gcoord.BD09);
  1367. lngLatList.push(new BMapGL.Point(result[0], result[1]));
  1368. }
  1369. polyLineList.push({
  1370. map: lngLatList,
  1371. color: tm.color,
  1372. });
  1373. const center = JSON.parse(tm.center);
  1374. pointList.push(turf.point([center.lng, center.lat]));
  1375. if (tm.tips) {
  1376. const centerResult = gcoord.transform([map_json[Math.floor(map_json.length/2)].lng, map_json[Math.floor(map_json.length/2)].lat], gcoord.WGS84, gcoord.BD09);
  1377. centerList.push({ map: new BMapGL.Point(centerResult[0], centerResult[1]), color: tm.color, tips: tm.tips });
  1378. }
  1379. }
  1380. }
  1381. if (pointList.length > 0) {
  1382. let maxDistance = 0;
  1383. // 中心点计算
  1384. const features = turf.featureCollection(pointList);
  1385. const center = turf.center(features);
  1386. if (center && center.geometry && center.geometry.coordinates && center.geometry.coordinates.length === 2) {
  1387. centerPoint.lng = _.round(center.geometry.coordinates[0], 4);
  1388. centerPoint.lat = _.round(center.geometry.coordinates[1], 4);
  1389. }
  1390. // 地图级别计算
  1391. if (pointList.length === 1) {
  1392. // 只有一条路线
  1393. const map_json = JSON.parse(unescape(escape(tenderMapList[0].map_json)));
  1394. for (const mj of map_json) {
  1395. const distance = turf.distance(turf.point([mj.lng, mj.lat]), turf.point([centerPoint.lng, centerPoint.lat]));
  1396. if (distance > maxDistance) {
  1397. maxDistance = distance;
  1398. }
  1399. }
  1400. } else {
  1401. for (const c of pointList) {
  1402. const distance = turf.distance(c, turf.point([centerPoint.lng, centerPoint.lat]));
  1403. if (distance > maxDistance) {
  1404. maxDistance = distance;
  1405. }
  1406. }
  1407. }
  1408. if (maxDistance === 0) {
  1409. level = 15;
  1410. } else {
  1411. // 级别区间
  1412. // const range = [0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 25, 50, 100, 200, 500, 1000, 2000, 5000, 10000];
  1413. const range = [10000, 5000, 2000, 1000, 500, 200, 100, 50, 25, 20, 10, 5, 2, 1, 0.5, 0.2, 0.1, 0.05, 0.02];
  1414. level = _.findIndex(range, function (item) {
  1415. return item <= maxDistance;
  1416. })
  1417. level = level + 1;
  1418. }
  1419. const result = gcoord.transform([centerPoint.lng, centerPoint.lat], gcoord.WGS84, gcoord.BD09);
  1420. centerPoint.lng = result[0];
  1421. centerPoint.lat = result[1];
  1422. }
  1423. // 初始化地图,设置中心点坐标和地图级别
  1424. const point = new BMapGL.Point(centerPoint.lng, centerPoint.lat);
  1425. map.centerAndZoom(point, level);
  1426. // const LocationControl = new BMapGL.LocationControl(); // 添加比例尺控件
  1427. // map.addControl(LocationControl);
  1428. map.enableScrollWheelZoom(true);
  1429. <% if (!ctx.tender.info.display.dayMode) { %>
  1430. map.setMapStyleV2({styleId: '20d4aea41cf71387395f2dc835f1c4b6'});
  1431. <% } %>
  1432. if (polyLineList.length > 0) {
  1433. for (const pl of polyLineList) {
  1434. const polyline = new BMapGL.Polyline(pl.map, {strokeColor: pl.color, strokeWeight:10, strokeOpacity:1});
  1435. map.addOverlay(polyline);
  1436. }
  1437. }
  1438. if (centerList.length > 0) {
  1439. for (const cl of centerList) {
  1440. const opts = {
  1441. position : cl.map, // 指定文本标注所在的地理位置
  1442. offset : new BMapGL.Size(5, 0) //设置文本偏移量
  1443. }
  1444. const label = new BMapGL.Label(cl.tips, opts); // 创建文本标注对象
  1445. label.setStyle({
  1446. height: '18px',
  1447. lineHeight : '18px',
  1448. color : cl.color,
  1449. borderRadius: '5px',
  1450. borderColor: cl.color,
  1451. padding: '0px 5px',
  1452. fontSize : '12px',
  1453. // fontFamily: '微软雅黑',
  1454. });
  1455. map.addOverlay(label);
  1456. // const opts = {
  1457. // width: 0,
  1458. // height: 0,
  1459. // maxwidth: 220,
  1460. // title: '路线标注:',
  1461. // };
  1462. // const infoWindow = new BMapGL.InfoWindow(cl.tips, opts);
  1463. // map.openInfoWindow(infoWindow, cl.map);
  1464. }
  1465. }
  1466. })
  1467. </script>
  1468. <% } %>