detail.ejs 85 KB

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