detail.ejs 79 KB

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