detail.ejs 74 KB

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