detail.ejs 80 KB

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