detail.ejs 85 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503
  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 (parseInt(ctx.subProject.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. <% if (group && group.status) { %>
  352. <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"
  353. 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') %><% } %>">
  354. <% 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>
  355. <% } %>
  356. <% } %>
  357. <% } else { %>
  358. <button class="btn btn-secondary" data-toggle="tooltip" data-placement="top" data-original-title="">&nbsp;</button>
  359. <% } %>
  360. <!--<button class="btn btn-warning" data-toggle="tooltip" data-placement="top" data-original-title="温仁书 审批中">2</button>-->
  361. <!--<button class="btn btn-info" data-toggle="tooltip" data-placement="top" data-original-title="玉安然">3</button>-->
  362. </div>
  363. <div class="row">
  364. <div class="col-2">
  365. </div>
  366. <div class="col-8 text-center">
  367. 第 <%- (materialData ? materialData.order : '0') %> 期
  368. <% if (materialData) { %>
  369. <% if (materialData.status === audit.material.status.uncheck) { %>
  370. <span class="text-info"><%- materialData.status_users %></span>
  371. <% } else { %>
  372. <a href="#sp-list" data-toggle="modal" data-target="#sp-list" data-type="material" data-order="<%- materialData.order %>"><%- materialData.status_users %></a>
  373. <% } %>
  374. <span class="<%- audit.material.statusClass[materialData.status] %>"><%- audit.material.statusString[materialData.status] %></span>
  375. <% } %>
  376. </div>
  377. </div>
  378. <table class="table table-bordered table-2sm mb-0 mt-1 <% if (!ctx.tender.info.display.dayMode) { %>table-dark<% } %>">
  379. <% if (materialData) { %>
  380. <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>
  381. <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>
  382. <% } else { %>
  383. <tr><th width="60%">含税(信息价/指数法)</th><td width="20%">0</td><td width="20%">0</td></tr>
  384. <tr><th>不含税(信息价/指数法)</th><td>0</td><td>0</td></tr>
  385. <% } %>
  386. </table>
  387. </div>
  388. </div>
  389. </div>
  390. </div>
  391. </div>
  392. </div>
  393. </div>
  394. <!--期进度表-->
  395. <div class="col-6">
  396. <div class="card mb-3 <% if (!ctx.tender.info.display.dayMode) { %>bg-dark text-white<% } %> bottom-height">
  397. <% if (hadMap === 2) { %>
  398. <div class="card-header"><h6 class="mb-0">章节计量情况表</h6></div>
  399. <div class="card-body">
  400. <div id="jlchart3" style="height: 300px; width: 100%;"></div>
  401. </div>
  402. <% } else { %>
  403. <div class="card-header"><h6 class="mb-0">期进度表</h6></div>
  404. <div class="card-body">
  405. <div id="chartContainer4" style="height: 300px; width: 100%;"></div>
  406. </div>
  407. <% } %>
  408. </div>
  409. </div>
  410. <!--月进度表-->
  411. <div class="col-6 pl-0">
  412. <div class="card mb-3 bottom-height <% if (!ctx.tender.info.display.dayMode) { %>bg-dark text-white<% } %>">
  413. <% if (hadMap === 2) { %>
  414. <div class="card-header">
  415. <ul class="nav nav-tabs card-header-tabs panel-card-tabs <% if (ctx.tender.info.display.dayMode) { %>nav-white-tabs<% } %>" id="change-echarts">
  416. <li class="nav-item">
  417. <a class="nav-link active" data-toggle="tab" href="#qijindubiao" role="tab" aria-selected="true">期进度表</a>
  418. </li>
  419. <li class="nav-item">
  420. <a class="nav-link" data-toggle="tab" href="#yuejindbiao" role="tab" aria-selected="true">月进度表</a>
  421. </li>
  422. </ul>
  423. </div>
  424. <div class="card-body">
  425. <div class="tab-content">
  426. <div class="tab-pane active" id="qijindubiao">
  427. <div id="chartContainer4" class="bottom-height-two" style="width: 100%;"></div>
  428. </div>
  429. <div class="tab-pane" id="yuejindbiao" >
  430. <div id="chartContainer3" class="bottom-height-two" style="width: 100%;"></div>
  431. </div>
  432. </div>
  433. </div>
  434. <% } else { %>
  435. <div class="card-header"><h6 class="mb-0">月进度表</h6></div>
  436. <div class="card-body">
  437. <div id="chartContainer3" style="height: 300px; width: 100%;"></div>
  438. </div>
  439. <% } %>
  440. </div>
  441. </div>
  442. </div>
  443. </div>
  444. </div>
  445. </div>
  446. </div>
  447. </div>
  448. </div>
  449. </div>
  450. <script type="text/javascript">
  451. const tenders = JSON.parse(unescape('<%- escape(JSON.stringify(tenders)) %>'));
  452. const category = JSON.parse(unescape('<%- escape(JSON.stringify(categoryData)) %>'));
  453. const tender = JSON.parse('<%- JSON.stringify(tender) %>');
  454. const cur_uid = parseInt('<%- ctx.session.sessionUser.accountId %>');
  455. const dayMode = <%- ctx.tender.info.display.dayMode %>;
  456. //计量完成概况//
  457. var myChart = echarts.init(document.getElementById('jlchart1')<% if (!ctx.tender.info.display.dayMode) { %>, 'dark'<% } %>);
  458. var option = {
  459. <% if (ctx.tender.info.display.dayMode) { %>
  460. color: ['#e9af68','#57b7b6','#e4575a','#959eac','#6699FF',
  461. '#d38b70','#8fb7cf','#cd5c5c','#ffa500','#40e0d0',
  462. '#1e90ff','#ff6347','#7b68ee','#00fa9a','#ffd700',
  463. '#5c616b','#ff6666','#3cb371','#b8860b','#30e0e0'],
  464. <% } else { %>
  465. 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)'],
  466. backgroundColor: '#343a40 ',
  467. <% } %>
  468. tooltip: {
  469. trigger: 'item'
  470. },
  471. legend: {
  472. top: '0%',
  473. left: '0%',
  474. orient:'vertical'
  475. },
  476. series: [
  477. {
  478. name: '金额',
  479. type: 'pie',
  480. top:'0%',
  481. left:'50%',
  482. radius: ['100%'],
  483. avoidLabelOverlap: false,
  484. label: {
  485. show: false,
  486. position: 'right'
  487. },
  488. emphasis: {
  489. label: {
  490. show: true,
  491. fontSize: '20',
  492. fontWeight: 'bold'
  493. }
  494. },
  495. labelLine: {
  496. show: false
  497. },
  498. data: [
  499. <% for (const s of stage_total) { %>
  500. {value: <%- s.num %>, name: '<%- s.name %>'},
  501. <% } %>
  502. ]
  503. }
  504. ]
  505. };
  506. // 为echarts对象加载数据
  507. myChart.setOption(option);
  508. //计量完成概况 结束//
  509. //计量支付概况//
  510. var myChart1 = echarts.init(document.getElementById('jlchart2')<% if (!ctx.tender.info.display.dayMode) { %>, 'dark'<% } %>);
  511. var option1 = {
  512. <% if (!ctx.tender.info.display.dayMode) { %>backgroundColor: '#343a40 ',<% } %>
  513. tooltip: {
  514. trigger: 'axis',
  515. axisPointer: {
  516. type: 'shadow'
  517. }
  518. },
  519. grid: {
  520. left: '3%',
  521. right: '18%',
  522. top:'5%',
  523. bottom: '0%',
  524. containLabel: true
  525. },
  526. yAxis: {
  527. type: 'category',
  528. data: ['总价', '截止应付', '截止实付']
  529. },
  530. xAxis: {
  531. type: 'value',
  532. name : '金额',
  533. position:'left',
  534. axisLabel : {
  535. interval: 0,//横轴信息全部显示
  536. rotate: 35,// 倾斜角度
  537. formatter: function (value, index) {
  538. if (value < 0) {
  539. let newValue = Math.abs(value);
  540. if (newValue >= 10000 && newValue < 10000000) {
  541. newValue = newValue / 10000 + "万";
  542. } else if (newValue >= 10000000) {
  543. newValue = newValue / 10000000 + "千万";
  544. }
  545. value = '-' + newValue;
  546. }
  547. if (value >= 10000 && value < 10000000) {
  548. value = value / 10000 + "万";
  549. } else if (value >= 10000000) {
  550. value = value / 10000000 + "千万";
  551. }
  552. return value;
  553. }
  554. },
  555. splitArea : {show : true}
  556. },
  557. series: [{
  558. 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 %>,],
  559. type: 'bar',
  560. itemStyle:{
  561. normal:{
  562. color:function(params){
  563. <% if (ctx.tender.info.display.dayMode) { %>
  564. var colorlist = ['#e9af68','#57b7b6','#e4575a','#959eac','#6699FF',
  565. '#d38b70','#8fb7cf','#cd5c5c','#ffa500','#40e0d0',
  566. '#1e90ff','#ff6347','#7b68ee','#00fa9a','#ffd700',
  567. '#5c616b','#ff6666','#3cb371','#b8860b','#30e0e0'];
  568. <% } else { %>
  569. 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)'];
  570. <% } %>
  571. return colorlist[params.dataIndex];
  572. }
  573. }
  574. }
  575. }]
  576. };
  577. // 为echarts对象加载数据
  578. myChart1.setOption(option1);
  579. //计量支付概况 结束//
  580. //章节计量情况图//
  581. var myChart2 = echarts.init(document.getElementById('jlchart3')<% if (!ctx.tender.info.display.dayMode) { %>, 'dark'<% } %>);
  582. var option2 = {
  583. <% if (ctx.tender.info.display.dayMode) { %>
  584. color: ['#e9af68','#57b7b6','#e4575a','#959eac','#6699FF',
  585. '#d38b70','#8fb7cf','#cd5c5c','#ffa500','#40e0d0',
  586. '#1e90ff','#ff6347','#7b68ee','#00fa9a','#ffd700',
  587. '#5c616b','#ff6666','#3cb371','#b8860b','#30e0e0'],
  588. <% } else { %>
  589. 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)'],
  590. backgroundColor: '#343a40 ',
  591. <% } %>
  592. tooltip: {
  593. trigger: 'axis',
  594. axisPointer: {
  595. type: 'shadow'
  596. }
  597. },
  598. legend: {
  599. data: ['台账金额','截止本期计量']
  600. },
  601. grid: {
  602. left: '3%',
  603. right: '4%',
  604. bottom: '3%',
  605. containLabel: true
  606. },
  607. yAxis: {
  608. type : 'value',
  609. name : '金额',
  610. position:'left',
  611. axisLabel : {
  612. // if (ctx.tender.info.display.thousandth) {
  613. // formatter: function (value, index) {
  614. // return value.format2Str('#,##0.######') + ' 元'
  615. // }
  616. formatter: function (value, index) {
  617. if (value < 0) {
  618. let newValue = Math.abs(value);
  619. if (newValue >= 10000 && newValue < 10000000) {
  620. newValue = newValue / 10000 + "万";
  621. } else if (newValue >= 10000000) {
  622. newValue = newValue / 10000000 + "千万";
  623. }
  624. value = '-' + newValue;
  625. }
  626. if (value >= 10000 && value < 10000000) {
  627. value = value / 10000 + "万";
  628. } else if (value >= 10000000) {
  629. value = value / 10000000 + "千万";
  630. }
  631. return value;
  632. }
  633. },
  634. splitArea : {show : true}
  635. },
  636. xAxis: {
  637. type: 'category',
  638. data: [
  639. <% for (const gcl of gclChapter) { %>
  640. <% if (parseInt(gcl.code) <= 900 || (parseInt(gcl.code) > 900 && (gcl.total_price !== 0 || gcl.end_gather_tp !== 0))) { %>
  641. '<%- gcl.code %>章',
  642. <% } %>
  643. <% } %>
  644. ]
  645. },
  646. series: [
  647. {
  648. name: '台账金额',
  649. type: 'bar',
  650. data: [
  651. <% for (const gcl of gclChapter) { %>
  652. <% if (parseInt(gcl.code) <= 900 || (parseInt(gcl.code) > 900 && (gcl.total_price !== 0 || gcl.end_gather_tp !== 0))) { %>
  653. <%- gcl.total_price %>,
  654. <% } %>
  655. <% } %>
  656. ]
  657. },
  658. {
  659. name: '截止本期计量',
  660. type: 'bar',
  661. data: [
  662. <% for (const gcl of gclChapter) { %>
  663. <% if (parseInt(gcl.code) <= 900 || (parseInt(gcl.code) > 900 && (gcl.total_price !== 0 || gcl.end_gather_tp !== 0))) { %>
  664. <%- gcl.end_gather_tp %>,
  665. <% } %>
  666. <% } %>
  667. ]
  668. }
  669. ]
  670. };
  671. // 为echarts对象加载数据
  672. myChart2.setOption(option2);
  673. //4 标段期数计量进度//
  674. var myChart3 = echarts.init(document.getElementById('chartContainer4')<% if (!ctx.tender.info.display.dayMode) { %>, 'dark'<% } %>);
  675. var option3 = {
  676. <% if (ctx.tender.info.display.dayMode) { %>
  677. color: ['#e9af68','#57b7b6','#e4575a','#959eac','#6699FF',
  678. '#d38b70','#8fb7cf','#cd5c5c','#ffa500','#40e0d0',
  679. '#1e90ff','#ff6347','#7b68ee','#00fa9a','#ffd700',
  680. '#5c616b','#ff6666','#3cb371','#b8860b','#30e0e0'],
  681. <% } else { %>
  682. 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)'],
  683. backgroundColor: '#343a40 ',
  684. <% } %>
  685. title : {
  686. text: ''
  687. },
  688. tooltip : {
  689. trigger: 'axis',
  690. },
  691. calculable : true,
  692. legend: {
  693. itemWidth:15,
  694. data:['本期合同计量','本期数量变更计量','截止上期完成','本期完成计量','完成度']
  695. },
  696. dataZoom: [
  697. {show: true, start: 0, end: 100,height:10,bottom:30}
  698. ],
  699. xAxis : [
  700. {
  701. type : 'category',
  702. splitLine : {show : true},
  703. data : [
  704. <% for (const s of stages) {%>
  705. '第<%- s.order %>期',
  706. <% } %>
  707. ]
  708. }
  709. ],
  710. yAxis : [
  711. {
  712. type : 'value',
  713. name : '金额',
  714. position:'left',
  715. axisLabel : {
  716. formatter: function (value, index) {
  717. if (value < 0) {
  718. let newValue = Math.abs(value);
  719. if (newValue >= 10000 && newValue < 10000000) {
  720. newValue = newValue / 10000 + "万";
  721. } else if (newValue >= 10000000) {
  722. newValue = newValue / 10000000 + "千万";
  723. }
  724. value = '-' + newValue;
  725. }
  726. if (value >= 10000 && value < 10000000) {
  727. value = value / 10000 + "万";
  728. } else if (value >= 10000000) {
  729. value = value / 10000000 + "千万";
  730. }
  731. return value;
  732. }
  733. },
  734. splitArea : {show : true},
  735. splitLine : {show : true},
  736. },
  737. {
  738. type : 'value',
  739. name:'完成度',
  740. axisLabel : {
  741. formatter: '{value} %'
  742. },
  743. position: 'right',
  744. splitArea : {show : false},
  745. splitLine : {show : false},
  746. }
  747. ],
  748. series : [
  749. {
  750. name:'本期合同计量',
  751. type:'bar',
  752. tooltip : {
  753. trigger: 'item',
  754. <% if (ctx.tender.info.display.thousandth) { %>
  755. formatter: function (params, ticket, callback) {
  756. return params.name + '<br/>' + params.seriesName + ': ' + params.value.format2Str('#,##0.######') + ' 元';
  757. }
  758. <% } else { %>
  759. tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
  760. <% } %>
  761. },
  762. stack: '合同',
  763. data:[
  764. <% for (const s of stages) {%>
  765. <%- s.contract_tp %>,
  766. <% } %>
  767. ]
  768. },
  769. {
  770. name:'本期数量变更计量',
  771. type:'bar',
  772. tooltip : {
  773. trigger: 'item',
  774. <% if (ctx.tender.info.display.thousandth) { %>
  775. formatter: function (params, ticket, callback) {
  776. return params.name + '<br/>' + params.seriesName + ': ' + params.value.format2Str('#,##0.######') + ' 元';
  777. }
  778. <% } else { %>
  779. tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
  780. <% } %>
  781. },
  782. stack: '变更',
  783. data:[
  784. <% for (const s of stages) {%>
  785. <%- s.qc_tp %>,
  786. <% } %>
  787. ]
  788. },
  789. {
  790. name:'截止上期完成',
  791. type:'bar',
  792. tooltip : {
  793. trigger: 'item',
  794. <% if (ctx.tender.info.display.thousandth) { %>
  795. formatter: function (params, ticket, callback) {
  796. return params.name + '<br/>' + params.seriesName + ': ' + params.value.format2Str('#,##0.######') + ' 元';
  797. }
  798. <% } else { %>
  799. tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
  800. <% } %>
  801. },
  802. stack: '完成',
  803. data:[
  804. <% for (const s of stages) {%>
  805. <%- ctx.helper.add(s.pre_contract_tp, s.pre_qc_tp) %>,
  806. <% } %>
  807. ]
  808. },
  809. {
  810. name:'本期完成计量',
  811. type:'bar',
  812. tooltip : {
  813. trigger: 'item',
  814. <% if (ctx.tender.info.display.thousandth) { %>
  815. formatter: function (params, ticket, callback) {
  816. return params.name + '<br/>' + params.seriesName + ': ' + params.value.format2Str('#,##0.######') + ' 元';
  817. }
  818. <% } else { %>
  819. tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
  820. <% } %>
  821. },
  822. stack: '完成',
  823. data:[
  824. <% for (const s of stages) {%>
  825. <%- ctx.helper.sum([s.contract_tp, s.qc_tp, s.pc_tp]) %>,
  826. <% } %>
  827. ]
  828. },
  829. {
  830. name:'完成度',
  831. type:'line',
  832. tooltip : {trigger: 'axis',formatter: "{b}占总标段<br/>{a}:{c} %"},
  833. yAxisIndex: 1,
  834. data:[
  835. <% for (const s of stages) {%>
  836. <%- ctx.helper.mul(ctx.helper.div(ctx.helper.sum([s.contract_tp, s.qc_tp, s.pc_tp]), tender.sum, 2), 100) %>,
  837. <% } %>
  838. ]
  839. },
  840. ]
  841. };
  842. // 为echarts对象加载数据
  843. myChart3.setOption(option3);
  844. //4 标段期数计量进度//
  845. //3 标段月进度//
  846. // 基于准备好的dom,初始化echarts图表
  847. var myChart4 = echarts.init(document.getElementById('chartContainer3')<% if (!ctx.tender.info.display.dayMode) { %>, 'dark'<% } %>);
  848. var option4 = {
  849. <% if (ctx.tender.info.display.dayMode) { %>
  850. color: ['#e9af68','#57b7b6','#e4575a','#959eac','#6699FF',
  851. '#d38b70','#8fb7cf','#cd5c5c','#ffa500','#40e0d0',
  852. '#1e90ff','#ff6347','#7b68ee','#00fa9a','#ffd700',
  853. '#5c616b','#ff6666','#3cb371','#b8860b','#30e0e0'],
  854. <% } else { %>
  855. color:["#17a2b8","#28a745"],
  856. backgroundColor: '#343a40 ',
  857. <% } %>
  858. title : {
  859. text: ''
  860. },
  861. tooltip : {
  862. trigger: 'axis',
  863. formatter: function (params, ticket, callback) {
  864. let sHint = '';
  865. for (const param of params) {
  866. if (sHint !== '') {
  867. sHint += '<br>';
  868. }
  869. if (sHint === '' && param.name !== '') {
  870. sHint = param.name + '<br>';
  871. }
  872. sHint += '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:' + param.color +'"></span>';
  873. if (param.data) {
  874. sHint += param.seriesName + ': ' + param.data + ' %';
  875. } else {
  876. sHint += param.seriesName + ': -';
  877. }
  878. }
  879. return sHint;
  880. },
  881. },
  882. legend: {
  883. data:['截止本月完成','本月完成']
  884. },
  885. toolbox: {
  886. show : true,
  887. right:'3%',
  888. feature : {
  889. magicType : {
  890. show: true,
  891. type: ['line', 'bar'],
  892. title:{
  893. line:'切换为折线图',
  894. bar:'切换为柱状图'
  895. }
  896. }
  897. }
  898. },
  899. dataZoom : {
  900. show : true,
  901. start : 50,
  902. end : 100,
  903. height:10,
  904. bottom:30
  905. },
  906. xAxis : [
  907. {
  908. type : 'category',
  909. boundaryGap : true,
  910. data : [
  911. <% for (const mp of monthProgress) { %>
  912. '<%- mp.month %>',
  913. <% } %>
  914. ]
  915. }
  916. ],
  917. yAxis : [
  918. {
  919. type : 'value',
  920. axisLabel : {
  921. formatter: '{value} %'
  922. },
  923. splitArea : {show : true}
  924. }
  925. ],
  926. series : [
  927. {
  928. name:'截止本月完成',
  929. type:'line',
  930. itemStyle: {
  931. normal: {
  932. lineStyle: {
  933. shadowColor : 'rgba(0,0,0,0.4)',
  934. shadowBlur: 5,
  935. shadowOffsetX: 3,
  936. shadowOffsetY: 3
  937. }
  938. }
  939. },
  940. areaStyle: { // 区域填充样式
  941. color: { // 填充的颜色 // 线性渐变,前四个参数分别是 x0, y0, x2, y2, 范围从 0 - 1,相当于在图形包围盒中的百分比,如果 globalCoord 为 `true`,则该四个值是绝对的像素位置
  942. type: 'linear',
  943. x: 0,
  944. y: 0,
  945. x2: 0,
  946. y2: 1,
  947. colorStops: [
  948. {
  949. offset: 0,
  950. color: 'rgba(37,234,255,0.7)', // 0% 处的颜色
  951. },
  952. {
  953. offset: 1,
  954. color: 'rgba(37,234,255,0.7)' // 100% 处的颜色
  955. }
  956. ],
  957. global: false, // 缺省为 false
  958. }
  959. },
  960. data:[
  961. <% for (const mp of monthProgress) { %>
  962. <%- mp.end_ratio %>,
  963. <% } %>
  964. ]
  965. },
  966. {
  967. name:'本月完成',
  968. type:'line',
  969. itemStyle: {
  970. normal: {
  971. lineStyle: {
  972. shadowColor : 'rgba(0,0,0,0.4)',
  973. shadowBlur: 5,
  974. shadowOffsetX: 3,
  975. shadowOffsetY: 3
  976. }
  977. }
  978. },
  979. areaStyle: { // 区域填充样式
  980. color: { // 填充的颜色 // 线性渐变,前四个参数分别是 x0, y0, x2, y2, 范围从 0 - 1,相当于在图形包围盒中的百分比,如果 globalCoord 为 `true`,则该四个值是绝对的像素位置
  981. type: 'linear',
  982. x: 0,
  983. y: 0,
  984. x2: 0,
  985. y2: 1,
  986. colorStops: [
  987. {
  988. offset: 0,
  989. color: 'rgba(40,167,69,0.7)', // 0% 处的颜色
  990. },
  991. {
  992. offset: 1,
  993. color: 'rgba(40,167,69,0.7)' // 100% 处的颜色
  994. }
  995. ],
  996. global: false, // 缺省为 false
  997. }
  998. },
  999. data:[
  1000. <% for (const mp of monthProgress) { %>
  1001. <%- mp.ratio %>,
  1002. <% } %>
  1003. ]
  1004. }
  1005. ]
  1006. };
  1007. // 为echarts对象加载数据
  1008. myChart4.setOption(option4);
  1009. //3 标段月进度//
  1010. //变更审批进度//
  1011. var myChart5 = echarts.init(document.getElementById('bgchart')<% if (!ctx.tender.info.display.dayMode) { %>, 'dark'<% } %>);
  1012. var option5 = {
  1013. <% if (ctx.tender.info.display.dayMode) { %>
  1014. color: ['#e9af68','#57b7b6','#e4575a','#959eac','#6699FF',
  1015. '#d38b70','#8fb7cf','#cd5c5c','#ffa500','#40e0d0',
  1016. '#1e90ff','#ff6347','#7b68ee','#00fa9a','#ffd700',
  1017. '#5c616b','#ff6666','#3cb371','#b8860b','#30e0e0'],
  1018. <% } else {%>
  1019. 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)'],
  1020. backgroundColor: '#343a40 ',
  1021. <% } %>
  1022. tooltip: {
  1023. trigger: 'item'
  1024. },
  1025. // legend: {
  1026. // top: '0%',
  1027. // right: '0%',
  1028. // orient:'vertical',
  1029. // itemWidth:15,
  1030. // data: ['一般变更', '较大变更', '重大变更', '待上报', '审批中', '已完成']
  1031. // },
  1032. legend:[{
  1033. top: '0%',
  1034. right: '0%',
  1035. orient:'vertical',
  1036. itemWidth:15,
  1037. data:['一般变更','较大变更','重大变更']
  1038. },{
  1039. top: '0%',
  1040. right: '35%',
  1041. orient:'vertical',
  1042. itemWidth:15,
  1043. data:['待上报','审批中','已完成']
  1044. }],
  1045. series: [
  1046. {
  1047. name: '数量',
  1048. type: 'pie',
  1049. top:'0%',
  1050. right:'65%',
  1051. selectedMode: 'single',
  1052. radius: '50%',
  1053. avoidLabelOverlap: false,
  1054. label: {
  1055. show:false,
  1056. //position: 'inner',
  1057. //fontSize: 14,
  1058. },
  1059. labelLine: {
  1060. show: false
  1061. },
  1062. data: [
  1063. <% for (const cs of change_status_total) { %>
  1064. {value: <%- cs.num %>, name: '<%- cs.name %>'},
  1065. <% } %>
  1066. ]
  1067. },
  1068. {
  1069. name: '数量',
  1070. type: 'pie',
  1071. top:'0%',
  1072. right:'65%',
  1073. radius: ['70%', '100%'],
  1074. avoidLabelOverlap: false,
  1075. label: {
  1076. show: false,
  1077. position: 'center'
  1078. },
  1079. emphasis: {
  1080. label: {
  1081. show: false,
  1082. //fontSize: '14',
  1083. //fontWeight: 'bold'
  1084. }
  1085. },
  1086. labelLine: {
  1087. //show: false,
  1088. length: 20,
  1089. },
  1090. data: [
  1091. <% for (const cq of change_quality_total) { %>
  1092. {value: <%- cq.num %>, name: '<%- cq.name %>'},
  1093. <% } %>
  1094. ]
  1095. }
  1096. ]
  1097. };
  1098. // 为echarts对象加载数据
  1099. myChart5.setOption(option5);
  1100. function echartsReset() {
  1101. myChart.resize();
  1102. myChart1.resize();
  1103. myChart2.resize();
  1104. myChart3.resize();
  1105. myChart4.resize();
  1106. myChart5.resize();
  1107. }
  1108. $(function () {
  1109. $('#change-echarts a[data-toggle="tab"]').on('shown.bs.tab', function(e) {
  1110. myChart3.resize();
  1111. myChart4.resize();
  1112. });
  1113. $('#showFull').click(function () {
  1114. const full=document.getElementById("big-data");
  1115. launchIntoFullscreen(full);
  1116. // $('#exitFull').show();
  1117. // $('#showFull').hide();
  1118. });
  1119. $('#exitFull').click(function () {
  1120. exitFullscreen();
  1121. // $('#exitFull').hide();
  1122. // $('#showFull').show();
  1123. })
  1124. })
  1125. $(window).resize(echartsReset);
  1126. // 数据全屏
  1127. function launchIntoFullscreen(element) {
  1128. if(element.requestFullscreen){
  1129. element.requestFullscreen();
  1130. }
  1131. else if(element.mozRequestFullScreen) {
  1132. element.mozRequestFullScreen();
  1133. }
  1134. else if(element.webkitRequestFullscreen) {
  1135. element.webkitRequestFullscreen();
  1136. }
  1137. else if(element.msRequestFullscreen) {
  1138. element.msRequestFullscreen();
  1139. }
  1140. }
  1141. function exitFullscreen() {
  1142. if(document.exitFullscreen) {
  1143. document.exitFullscreen();
  1144. } else if(document.mozCancelFullScreen) {
  1145. document.mozCancelFullScreen();
  1146. } else if(document.webkitExitFullscreen) {
  1147. document.webkitExitFullscreen();
  1148. }
  1149. }
  1150. document.addEventListener("fullscreenchange", function (event) {
  1151. if (document.fullscreenElement) {
  1152. $('#exitfull-div').show();
  1153. $('#showFull').hide();
  1154. } else {
  1155. $('#exitfull-div').hide();
  1156. $('#showFull').show();
  1157. }
  1158. });
  1159. </script>
  1160. <script src="/public/js/sub_menu.js"></script>
  1161. <script>
  1162. $.subMenu({
  1163. menu: '#sub-menu', miniMenu: '#sub-mini-menu', miniMenuList: '#mini-menu-list',
  1164. toMenu: '#to-menu', toMiniMenu: '#to-mini-menu',
  1165. key: 'menu.1.0.0',
  1166. miniHint: '#sub-mini-hint', hintKey: 'menu.hint.1.0.1',
  1167. callback: function (info) {
  1168. if (info.mini) {
  1169. $('.panel-title').addClass('fluid');
  1170. $('#sub-menu').removeClass('panel-sidebar');
  1171. } else {
  1172. $('.panel-title').removeClass('fluid');
  1173. $('#sub-menu').addClass('panel-sidebar');
  1174. }
  1175. autoFlashHeight();
  1176. echartsReset();
  1177. }
  1178. });
  1179. </script>
  1180. <script>
  1181. const tenderId = parseInt('<%- tender.id %>');
  1182. const auditType = JSON.parse('<%- JSON.stringify(audit.auditType) %>');
  1183. $(document).ready(function () {
  1184. const getAuditTypeText = function (type) {
  1185. if (type === auditType.key.common) return '';
  1186. return `<span class="text-${auditType.info[type].class}">${auditType.info[type].long}</span>`;
  1187. };
  1188. const loadStageHistory = function (result, auditConst) {
  1189. const { auditHistory, auditors2, user } = result;
  1190. let historyHTML = [];
  1191. const darkHTML = !dayMode ? 'bg-dark border-secondary text-white' : '';
  1192. const textClass = !dayMode ? 'text-light' : '';
  1193. auditHistory.forEach((his, idx) => {
  1194. if (idx === auditHistory.length - 1 && auditHistory.length !== 1) {
  1195. historyHTML.push(`<div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a></div>`);
  1196. }
  1197. historyHTML.push(`<div class="${idx < auditHistory.length - 1 ? 'fold-card' : ''}">`);
  1198. historyHTML.push(`<div class="text-center text-muted">${idx+1}#</div>`);
  1199. historyHTML.push(`<ul class="timeline-list list-unstyled mt-2 pr-1 ${ idx === auditHistory.length - 1 && auditHistory.length !== 1 ? 'last-auditor-list' : '' }">`);
  1200. his.forEach((group, index) => {
  1201. if (index === 0) {
  1202. historyHTML.push(`<li class="timeline-list-item pb-2">
  1203. <div class="timeline-item-date">
  1204. ${group.beginYear}
  1205. <span class="${textClass}">${group.beginDate}</span>
  1206. <span class="${textClass}">${group.beginTime}</span>
  1207. </div>
  1208. <div class="timeline-item-tail"></div>
  1209. <div class="timeline-item-icon bg-success text-light"><i class="fa fa-caret-down"></i></div>
  1210. <div class="timeline-item-content">
  1211. <div class="py-1">
  1212. <span>原报</span>
  1213. <span class="pull-right text-success">${idx !== 0 ? '重新' : '' }上报审批</span>
  1214. </div>
  1215. <div class="card ${darkHTML}">
  1216. <div class="card-body px-3 py-0">
  1217. <div class="card-text p-2 py-3 row">
  1218. <div class="col">
  1219. <span class="h6">${user.name}</span>
  1220. <span class="text-muted ml-1">${user.role}</span>
  1221. </div>
  1222. <div class="col">
  1223. <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
  1224. </div>
  1225. </div>
  1226. </div>
  1227. </div>
  1228. </div>
  1229. </li>`);
  1230. }
  1231. historyHTML.push(`<li class="timeline-list-item pb-2 ${ group.status === auditConst.status.uncheck && idx === auditHistory.length - 1 && auditHistory.length !== 1 ? 'is_uncheck' : ''}">`);
  1232. if (group.endYear) {
  1233. historyHTML.push(`<div class="timeline-item-date ${textClass}">${group.endYear}<span class="${textClass}">${group.endDate}</span><span class="${textClass}">${group.endTime}</span></div>`);
  1234. }
  1235. if (index < his.length - 1) {
  1236. historyHTML.push('<div class="timeline-item-tail"></div>');
  1237. }
  1238. if (group.status === auditConst.status.checked) {
  1239. historyHTML.push('<div class="timeline-item-icon bg-success text-light"><i class="fa fa-check"></i></div>');
  1240. } else if (group.status === auditConst.status.checkNo || group.status === auditConst.status.checkNoPre || group.status === auditConst.status.checkCancel) {
  1241. historyHTML.push('<div class="timeline-item-icon bg-warning text-light"><i class="fa fa-level-up"></i></div>');
  1242. } else if (group.status === auditConst.status.checking) {
  1243. historyHTML.push('<div class="timeline-item-icon bg-warning text-light"><i class="fa fa-ellipsis-h"></i></div>');
  1244. } else {
  1245. historyHTML.push('<div class="timeline-item-icon bg-secondary text-light"></div>');
  1246. }
  1247. historyHTML.push('<div class="timeline-item-content">');
  1248. const statuStr = group.status !== auditConst.status.uncheck ?
  1249. `<span class="pull-right ${auditConst.statusClass[group.status]}">${auditConst.statusString[group.status]}</span>` : '';
  1250. historyHTML.push(`<div class="py-1">
  1251. <span class="">
  1252. ${ !group.is_final ? group.audit_order + '' : '终' }审 ${getAuditTypeText(group.audit_type)}
  1253. </span>
  1254. ${statuStr}
  1255. </div>`);
  1256. historyHTML.push(`<div class="card ${darkHTML}"><div class="card-body px-3 py-0">`);
  1257. for (const [i, auditor] of group.auditors.entries()) {
  1258. historyHTML.push(`<div class="card-text p-2 py-3 row ${ ( i > 0 ? 'border-top' : '') }">`);
  1259. historyHTML.push(`<div class="col"><span class="h6">${auditor.name}</span><span class="text-muted ml-1">${auditor.role}</span></div>`);
  1260. historyHTML.push('<div class="col">');
  1261. if (auditor.status === auditConst.status.checked) {
  1262. historyHTML.push('<span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>');
  1263. } if (auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre || auditor.status === auditConst.status.checkCancel) {
  1264. historyHTML.push('<span class="pull-right text-warning"><i class="fa fa-share-square fa-rotate-270"></i></span>');
  1265. }
  1266. historyHTML.push('</div>');
  1267. if (auditor.opinion) {
  1268. historyHTML.push(`<div class="col-12 py-1"><i class="fa fa-commenting-o mr-1"></i>${auditor.opinion}</div>`);
  1269. }
  1270. historyHTML.push('</div>');
  1271. }
  1272. historyHTML.push('</div></div>');
  1273. historyHTML.push('</div>');
  1274. historyHTML.push('</li>');
  1275. });
  1276. historyHTML.push('</div>');
  1277. historyHTML.push('</ul>');
  1278. });
  1279. $('#audit-list').empty();
  1280. $('#audit-list').append(historyHTML.join(''));
  1281. }
  1282. const loadHistory = function (result, auditConst) {
  1283. const { auditHistory, auditors, user } = result
  1284. let historyHTML = ''
  1285. const leftAuditors = auditors;
  1286. const darkHTML = !dayMode ? 'bg-dark border-secondary text-white' : '';
  1287. auditHistory.forEach((auditors, idx) => {
  1288. if(idx === auditHistory.length - 1 && auditHistory.length !== 1) {
  1289. historyHTML += `<div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
  1290. >展开历史审批流程</a></div>`
  1291. }
  1292. historyHTML += `<div class="${idx < auditHistory.length - 1 ? 'fold-card' : ''}">
  1293. <div class="text-center text-muted">${idx + 1}#</div>
  1294. <ul class="timeline-list list-unstyled mt-2">`
  1295. auditors.forEach((auditor, index) => {
  1296. if (index === 0) {
  1297. historyHTML += `<li class="timeline-list-item pb-2">
  1298. <div class="timeline-item-date">
  1299. ${formatDate(auditor.begin_time, !dayMode)}
  1300. </div>
  1301. <div class="timeline-item-tail"></div>
  1302. <div class="timeline-item-icon bg-success text-light">
  1303. <i class="fa fa-caret-down"></i>
  1304. </div>
  1305. <div class="timeline-item-content">
  1306. <div class="card ${darkHTML}">
  1307. <div class="card-body p-3">
  1308. <div class="card-text">
  1309. <p class="mb-1"><span
  1310. class="h5">${user.name}</span><span
  1311. class="pull-right text-success">${idx !== 0 ? '重新' : ''}上报审批</span>
  1312. </p>
  1313. <p class="text-muted mb-0">${user.role}</p>
  1314. </div>
  1315. </div>
  1316. </div>
  1317. </div>
  1318. </li>
  1319. <li class="timeline-list-item pb-2">
  1320. <div class="timeline-item-date">
  1321. ${formatDate(auditor.end_time, !dayMode)}
  1322. </div>`
  1323. if(index < auditors.length - 1) {
  1324. historyHTML += `<div class="timeline-item-tail"></div>`
  1325. }
  1326. if(auditor.status === auditConst.status.checked) {
  1327. historyHTML += `<div class="timeline-item-icon bg-success text-light">
  1328. <i class="fa fa-check"></i>
  1329. </div>`
  1330. } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {
  1331. historyHTML += `<div class="timeline-item-icon bg-warning text-light">
  1332. <i class="fa fa-level-up"></i>
  1333. </div>`
  1334. } else if(auditor.status === auditConst.status.checking) {
  1335. historyHTML += `<div class="timeline-item-icon bg-warning text-light">
  1336. <i class="fa fa-ellipsis-h"></i>
  1337. </div>`
  1338. } else {
  1339. historyHTML += `<div class="timeline-item-icon bg-secondary text-light"></div>`
  1340. }
  1341. historyHTML += `<div class="timeline-item-content">
  1342. <div class="card ${darkHTML}">
  1343. <div class="card-body p-3">
  1344. <div class="card-text">
  1345. <p class="mb-1"><span class="h5">${auditor.name}</span><span
  1346. class="pull-right ${auditConst.statusClass[auditor.status]}">${auditConst.statusString[auditor.status]}</span>
  1347. </p>
  1348. <p class="text-muted mb-0">${auditor.role}</p>
  1349. </div>
  1350. </div>`
  1351. if (auditor.opinion) {
  1352. historyHTML += `<div class="card-body p-3 border-top">
  1353. <p style="margin: 0;">${auditor.opinion}</p>
  1354. </div>`
  1355. }
  1356. historyHTML += `</div></div></li>`
  1357. } else {
  1358. historyHTML += `<li class="timeline-list-item pb-2">
  1359. <div class="timeline-item-date">
  1360. ${formatDate(auditor.end_time, !dayMode)}
  1361. </div>`
  1362. if(index < auditors.length - 1) {
  1363. historyHTML += `<div class="timeline-item-tail"></div>`
  1364. }
  1365. if(auditor.status === auditConst.status.checked) {
  1366. historyHTML += `<div class="timeline-item-icon bg-success text-light">
  1367. <i class="fa fa-check"></i>
  1368. </div>`
  1369. } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {
  1370. historyHTML += `<div class="timeline-item-icon bg-warning text-light">
  1371. <i class="fa fa-level-up"></i>
  1372. </div>`
  1373. } else if(auditor.status === auditConst.status.checking) {
  1374. historyHTML += `<div class="timeline-item-icon bg-warning text-light">
  1375. <i class="fa fa-ellipsis-h"></i>
  1376. </div>`
  1377. } else {
  1378. historyHTML += `<div class="timeline-item-icon bg-secondary text-light"></div>`
  1379. }
  1380. historyHTML += `<div class="timeline-item-content">
  1381. <div class="card ${darkHTML}">
  1382. <div class="card-body p-3">
  1383. <div class="card-text">
  1384. <p class="mb-1"><span class="h5">${auditor.name}</span>
  1385. <span
  1386. class="pull-right
  1387. ${auditConst.statusClass[auditor.status]}">${auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''}
  1388. ${auditor.status === auditConst.status.checkNo ? user.name : ''}
  1389. ${auditor.status === auditConst.status.checkNoPre ? (leftAuditors.find(item => item.order === auditor.sort-1) ? leftAuditors.find(item => item.order === auditor.sort-1).name : '') : ''}
  1390. </span>
  1391. </p>
  1392. <p class="text-muted mb-0">${auditor.role}</p>
  1393. </div>
  1394. </div>`
  1395. if (auditor.opinion) {
  1396. historyHTML += `<div class="card-body p-3 border-top">
  1397. <p style="margin: 0;">${auditor.opinion} </p>
  1398. </div>`
  1399. }
  1400. historyHTML += `</div></div></li>`
  1401. }
  1402. })
  1403. historyHTML += '</ul></div>'
  1404. })
  1405. $('#audit-list').empty()
  1406. $('#audit-list').append(historyHTML);
  1407. };
  1408. // 获取审批流程
  1409. $('a[data-target="#sp-list" ]').on('click', function () {
  1410. const type = $(this).attr('data-type');
  1411. const data = {
  1412. order: $(this).attr('data-order'),
  1413. };
  1414. let url = '';
  1415. let auditConst = '';
  1416. if (type === 'stage') {
  1417. url = '/tender/' + tenderId + '/measure/stage/auditors';
  1418. auditConst = JSON.parse('<%- JSON.stringify(audit.stage) %>');
  1419. } else if (type === 'ledger') {
  1420. url = '/tender/' + tenderId + '/measure/ledger/auditors';
  1421. auditConst = JSON.parse('<%- JSON.stringify(audit.ledger) %>');
  1422. } else if (type === 'material') {
  1423. url = '/tender/' + tenderId + '/measure/material/auditors';
  1424. auditConst = JSON.parse('<%- JSON.stringify(audit.material) %>');
  1425. }
  1426. postData(url, data, function (result) {
  1427. if (type === 'stage'|| type === 'ledger' || type === 'material') {
  1428. loadStageHistory(result, auditConst);
  1429. } else {
  1430. loadHistory(result, auditConst);
  1431. }
  1432. });
  1433. });
  1434. // 展开/收起历史审核记录
  1435. $('#audit-list').on('click', 'a', function() {
  1436. const type = $(this).data('target')
  1437. const auditCard = $(this).parent().parent()
  1438. console.log('auditCard', auditCard)
  1439. if (type === 'show') {
  1440. $(this).data('target', 'hide')
  1441. auditCard.find('.fold-card').slideDown('swing', () => {
  1442. auditCard.find('#end-target').text($(this).data('idx') + '#')
  1443. auditCard.find('#fold-btn').text('收起历史审核记录')
  1444. })
  1445. } else {
  1446. $(this).data('target', 'show')
  1447. auditCard.find('.fold-card').slideUp('swing', () => {
  1448. auditCard.find('#end-target').text('1#')
  1449. auditCard.find('#fold-btn').text('展开历史审核记录')
  1450. })
  1451. }
  1452. });
  1453. function formatDate(date, dayMode) {
  1454. if (!date) return '';
  1455. date = new Date(date)
  1456. const year = date.getFullYear();
  1457. let mon = date.getMonth() + 1;
  1458. let day = date.getDate();
  1459. let hour = date.getHours();
  1460. let minute = date.getMinutes();
  1461. let scond = date.getSeconds();
  1462. if (mon < 10) {
  1463. mon = '0' + mon.toString();
  1464. }
  1465. if (day < 10) {
  1466. day = '0' + day.toString();
  1467. }
  1468. if (hour < 10) {
  1469. hour = '0' + hour.toString();
  1470. }
  1471. if (minute < 10) {
  1472. minute = '0' + minute.toString();
  1473. }
  1474. if (scond < 10) {
  1475. scond = '0' + scond.toString();
  1476. }
  1477. return `${year}<span class="${dayMode ? 'text-light' : ''}">${mon}-${day}</span><span class="${dayMode ? 'text-light' : ''}">${hour}:${minute}:${scond}</span>`;
  1478. };
  1479. })
  1480. </script>