detail.ejs 64 KB

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