detail.ejs 78 KB

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