tender.ejs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
  6. <meta http-equiv="x-ua-compatible" content="ie=edge">
  7. <title>标段概况-计量支付</title>
  8. <link rel="stylesheet" href="/public/css/bootstrap/bootstrap.min.css">
  9. <link rel="stylesheet" href="/public/css/wap/main.css">
  10. <link rel="stylesheet" href="/public/css/toast.css">
  11. <link rel="stylesheet" href="/public/css/font-awesome/font-awesome.min.css">
  12. <script src=/public/js/echarts/echarts.min.js></script>
  13. <link rel="shortcut icon" href="/public/images/favicon.ico">
  14. <style>
  15. body {
  16. padding: 0;
  17. }
  18. .tab-content > .tab-pane,.pill-content > .pill-pane {
  19. display: block;
  20. height: 0;
  21. overflow-y: hidden;
  22. }
  23. .tab-content > .active,.pill-content > .active {
  24. height: auto;
  25. }
  26. </style>
  27. </head>
  28. <body>
  29. <div class="container">
  30. <!--顶部-->
  31. <nav class="fixed-top bg-dark">
  32. <div class="my-2 d-flex justify-content-between">
  33. <span class="text-white ml-3"><a href="/wap/list" class="mr-2 text-white show-loading"><i class="fa fa-chevron-left"></i>标段概况</a></span>
  34. <a tabindex="0" href="javascript:void(0)" class="text-white text-truncate text-center"
  35. style="width:150px" data-toggle="popover" data-placement="top"
  36. data-content="<%- tender.name %>" data-trigger="focus"><%- tender.name %></a>
  37. <div class="mr-3">
  38. <div class="dropdown">
  39. <button class="btn btn-sm btn-light dropdown-toggle" type="button" data-toggle="dropdown">
  40. <%- ctx.session.sessionUser.name.substr(ctx.session.sessionUser.name.length > 2 ? ctx.session.sessionUser.name.length - 2 : 0) %>
  41. </button>
  42. <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
  43. <a class="dropdown-item" href="/wap/logout">退出登录</a>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. </nav>
  49. <!--标段概况-->
  50. <div class="py-6">
  51. <!--标签-->
  52. <ul class="nav nav-tabs nav-fill">
  53. <li class="nav-item">
  54. <a class="px-1 nav-link active" data-toggle="tab" href="#gaikuang" role="tab">概况</a>
  55. </li>
  56. <li class="nav-item">
  57. <a class="px-1 nav-link" data-toggle="tab" href="#yufukuan" role="tab">预付款</a>
  58. </li>
  59. <li class="nav-item">
  60. <a class="px-1 nav-link" data-toggle="tab" href="#tzxiuding" role="tab">台账修订</a>
  61. </li>
  62. <li class="nav-item">
  63. <a class="px-1 nav-link" data-toggle="tab" href="#jlqi" role="tab">计量期</a>
  64. </li>
  65. <li class="nav-item">
  66. <a class="px-1 nav-link" data-toggle="tab" href="#biangeng" role="tab">工程变更</a>
  67. </li>
  68. </ul>
  69. <div class="tab-content">
  70. <div class="tab-pane active" id="gaikuang">
  71. <!--图表-->
  72. <div class="card mb-3 mr-1 mt-3">
  73. <div class="card-body">
  74. <h5 class="card-title">期进度表</h5>
  75. <div style="overflow-x:scroll;padding-bottom: 10px">
  76. <div id="chartContainer4" style="height: 300px; width: 250%;">
  77. </div>
  78. </div>
  79. <p class="text-center text-muted m-0">左右滑动</p>
  80. </div>
  81. </div>
  82. <div class="card mb-3 mr-1">
  83. <div class="card-body">
  84. <h5 class="card-title">月进度表</h5>
  85. <div style="overflow-x:scroll;padding-bottom: 10px">
  86. <div id="chartContainer3" style="height: 300px; width: 320%;">
  87. </div>
  88. </div>
  89. <p class="text-center text-muted m-0">左右滑动</p>
  90. </div>
  91. </div>
  92. </div>
  93. <div class="tab-pane" id="yufukuan">
  94. <% for (const t of advanceConst.typeCol) { %>
  95. <div class="card my-3">
  96. <div class="card-body">
  97. <a href="/wap/tender/<%- tender.id %>/advance#<%- t.key %>"><h5 class="card-title d-flex justify-content-between"><%- t.name %><span><% if (advanceList[t.type]) { %>第<%- advanceList[t.type].order %>期<% } %></span></h5></a>
  98. </div>
  99. </div>
  100. <% } %>
  101. </div>
  102. <div class="tab-pane" id="tzxiuding">
  103. <dl class="mb-2 mt-3">
  104. <% for (const lr of revises) { %>
  105. <dt class="bg-light p-2 d-flex justify-content-between"><span>第<%- lr.corder %>次修订</span>
  106. <% if (!lr.valid) {%>
  107. <span class="text-danger">
  108. 作废
  109. </span>
  110. <% } else { %>
  111. <span class="<%- auditReviseConst.auditStringClass[lr.status] %>">
  112. <% if (lr.curAuditor && lr.status !== auditReviseConst.status.checked) { %>
  113. <%- lr.curAuditor.name %><%if (lr.curAuditor.role !== '' && lr.curAuditor.role !== null) { %>-<%- lr.curAuditor.role %><% } %>
  114. <% } %>
  115. <%- lr.status === auditReviseConst.status.checked ? '审批完成' : auditReviseConst.auditProgress[lr.status] %>
  116. </span>
  117. <% } %>
  118. </dt>
  119. <dd>
  120. <table class="table table-hover">
  121. <tr><td width="90">修订时间</td><td><%- ctx.moment(lr.in_time).format('YYYY-MM-DD') %></td></tr>
  122. <tr><td>修订人</td><td><%- lr.user_name %></td></tr>
  123. <tr><td>修订详情</td><td><% if (lr.content) { %><% if (lr.content.length <= 22) { %><%- lr.content %><% } else { %><%- lr.content.substring(0,22) %><a class="show-content" data-content="<%- lr.content %>" href="javascript:void(0);">展开更多</a><% } %><% } %></td></tr>
  124. <% if (lr.curAuditor && lr.status == auditReviseConst.status.checking && lr.curAuditor.audit_id === ctx.session.sessionUser.accountId) { %>
  125. <tr>
  126. <td colspan="2">
  127. <a class="btn btn-block btn-success" href="/wap/tender/<%- tender.id %>/revise/<%- lr.id %>/info">审批</a>
  128. </td>
  129. </tr>
  130. <% } %>
  131. </table>
  132. </dd>
  133. <% } %>
  134. </dl>
  135. </div>
  136. <div class="tab-pane" id="jlqi">
  137. <!--期列表-->
  138. <dl class="mb-2 mt-3">
  139. <% for (const s of stages) { %>
  140. <dt class="bg-light p-2 d-flex justify-content-between"><span>第<%- s.order %>期</span>
  141. <span class="<%- auditConst.auditStringClass[s.status] %>">
  142. <% if (s.curAuditor && s.status !== auditConst.status.checked) { %>
  143. <%- s.curAuditor.name %><%if (s.curAuditor.role !== '' && s.curAuditor.role !== null) { %>-<%- s.curAuditor.role %><% } %>
  144. <% } %>
  145. <%- s.status === auditConst.status.checked ? '审批完成' : auditConst.auditProgress[s.status] %>
  146. </span>
  147. </dt>
  148. <dd>
  149. <table class="table table-hover">
  150. <tbody><tr>
  151. <td>
  152. <p class="mb-0">本期合同计量</p>
  153. <b>¥<%- s.contract_tp ? s.contract_tp : 0 %></b>
  154. </td>
  155. <td>
  156. <p class="mb-0">本期数量变更计量</p>
  157. <b>¥<%- s.qc_tp ? s.qc_tp : 0 %></b>
  158. </td>
  159. </tr>
  160. <tr>
  161. <td>
  162. <p class="mb-0">本期完成计量</p>
  163. <b>¥<%- s.tp ? s.tp : 0 %></b>
  164. </td>
  165. <td>
  166. <p class="mb-0">截止上期完成计量</p>
  167. <b>¥<%- s.pre_tp ? s.pre_tp : 0 %></b>
  168. </td>
  169. </tr>
  170. <tr>
  171. <td>
  172. <p class="mb-0">截止本期完成计量</p>
  173. <b>¥<%- s.end_tp ? s.end_tp : 0 %></b>
  174. </td>
  175. <td>
  176. <p class="mb-0">本期应付</p>
  177. <b>¥<%- s.yf_tp ? s.yf_tp : 0 %></b>
  178. </td>
  179. </tr>
  180. <tr>
  181. <td>
  182. <p class="mb-0">本期实付</p>
  183. <b>¥<%- s.sf_tp ? s.sf_tp : 0 %></b>
  184. </td>
  185. <td>
  186. </td>
  187. </tr>
  188. <% if (s.curAuditor && s.status == auditConst.status.checking && s.curAuditor.aid === ctx.session.sessionUser.accountId) { %>
  189. <tr>
  190. <td colspan="2">
  191. <a class="btn btn-block btn-success" href="/wap/tender/<%- s.tid %>/stage/<%- s.order %>">审批本期</a>
  192. </td>
  193. </tr>
  194. <% } %>
  195. </tbody></table>
  196. </dd>
  197. <% } %>
  198. </dl>
  199. </div>
  200. <div class="tab-pane" id="biangeng">
  201. <!--工程变更-->
  202. <dl class="mb-2 mt-3">
  203. <% for (const c of changes) { %>
  204. <dt class="bg-light p-2 d-flex justify-content-between"><span><a href="/wap/tender/<%- tender.id %>/change/<%- c.cid %>/info"><% if (c.status !== auditChangeConst.status.checked) { %><%- c.code %><% } else { %><%- c.p_code %><% } %></a></span></dt>
  205. <dd>
  206. <table class="table table-hover">
  207. <tbody>
  208. <tr>
  209. <td colspan="2">
  210. <p class="mb-0">工程名称</p>
  211. <%- c.name %>
  212. </td>
  213. </tr>
  214. <tr>
  215. <td>
  216. <p class="mb-0">变更性质</p>
  217. <b><% for (const q in changeConst.quality) { %>
  218. <% const cQuality = changeConst.quality[q] %><% if (cQuality.value === c.quality) { %><%- cQuality.name %><% } %><% } %></b>
  219. </td>
  220. <td>
  221. <p class="mb-0">变更金额</p>
  222. <b><%- ctx.helper.roundNum(c.total_price, tpUnit) %></b>
  223. </td>
  224. </tr>
  225. <tr>
  226. <td colspan="2">
  227. <% if ((c.status === auditChangeConst.status.checking || c.status === auditChangeConst.status.backnew) && c.curAuditor.uid === ctx.session.sessionUser.accountId) { %>
  228. <a href="/wap/tender/<%- tender.id %>/change/<%- c.cid %>/info#shenpi" class="btn btn-block btn-success">审批变更</a>
  229. <% } else if (c.status === auditChangeConst.status.uncheck) { %>
  230. <span>待上报</span>
  231. <% } else { %>
  232. <span class="<%- auditChangeConst.auditStatusClass[c.curAuditor.status] %>"><%- c.curAuditor.name %>-<%- c.curAuditor.jobs %> <%- auditChangeConst.auditStatusString[c.curAuditor.status] %></span>
  233. <% } %>
  234. </td>
  235. </tr>
  236. </tbody>
  237. </table>
  238. </dd>
  239. <% } %>
  240. </dl>
  241. </div>
  242. </div>
  243. </div>
  244. <!--底栏菜单-->
  245. <nav class="fixed-bottom navbar-dark bg-light border-top">
  246. <ul class="nav nav-fill my-2">
  247. <li class="nav-item">
  248. <a class="nav-link text-muted show-loading" href="/wap/dashboard"><i class="fa fa-check-square-o"></i> 待审批</a>
  249. </li>
  250. <li class="nav-item">
  251. <a class="nav-link active show-loading" href="/wap/list"><i class="fa fa-list-ul"></i> 项目</a>
  252. </li>
  253. </ul>
  254. </nav>
  255. </div>
  256. <!-- JS. -->
  257. <script src="/public/js/jquery/jquery-3.2.1.min.js"></script>
  258. <script src="/public/js/popper/popper.min.js"></script>
  259. <script src="/public/js/bootstrap/bootstrap.min.js"></script>
  260. <script src="/public/js/cookies.js"></script>
  261. <script src="/public/js/wap/global.js"></script>
  262. <script type="text/javascript">
  263. //4 标段期数计量进度//
  264. var myChart = echarts.init(document.getElementById('chartContainer4'));
  265. var option = {
  266. color: ['#e9af68','#57b7b6','#e4575a','#959eac','#6699FF',
  267. '#d38b70','#8fb7cf','#cd5c5c','#ffa500','#40e0d0',
  268. '#1e90ff','#ff6347','#7b68ee','#00fa9a','#ffd700',
  269. '#5c616b','#ff6666','#3cb371','#b8860b','#30e0e0'],
  270. title : {
  271. text: ''
  272. },
  273. tooltip : {
  274. trigger: 'axis'
  275. },
  276. calculable : true,
  277. legend: {
  278. data:['本期合同计量','本期数量变更计量','截止上期累计完成','本期完成计量','完成度']
  279. },
  280. dataZoom: [
  281. {show: true,start: 0, end: 100}
  282. ],
  283. xAxis : [
  284. {
  285. type : 'category',
  286. splitLine : {show : true},
  287. data : [
  288. <% for (const s of stagesEcharts) {%>
  289. '第<%- s.order %>期',
  290. <% } %>
  291. ]
  292. }
  293. ],
  294. yAxis : [
  295. {
  296. type : 'value',
  297. name : '金额',
  298. position:'left',
  299. axisLabel : {
  300. formatter: '{value} 元'
  301. },
  302. splitArea : {show : true},
  303. splitLine : {show : true},
  304. },
  305. {
  306. type : 'value',
  307. name:'完成度',
  308. axisLabel : {
  309. formatter: '{value} %'
  310. },
  311. position: 'right',
  312. splitArea : {show : false},
  313. splitLine : {show : false},
  314. }
  315. ],
  316. series : [
  317. {
  318. name:'本期合同计量',
  319. type:'bar',
  320. tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
  321. stack: '合同',
  322. data:[
  323. <% for (const s of stagesEcharts) {%>
  324. <%- s.contract_tp %>,
  325. <% } %>
  326. ]
  327. },
  328. {
  329. name:'本期数量变更计量',
  330. type:'bar',
  331. tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
  332. stack: '变更',
  333. data:[
  334. <% for (const s of stagesEcharts) {%>
  335. <%- s.qc_tp %>,
  336. <% } %>
  337. ]
  338. },
  339. {
  340. name:'截止上期累计完成',
  341. type:'bar',
  342. tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
  343. stack: '完成',
  344. data:[
  345. <% for (const s of stagesEcharts) {%>
  346. <%- ctx.helper.add(s.pre_contract_tp, s.pre_qc_tp) %>,
  347. <% } %>
  348. ]
  349. },
  350. {
  351. name:'本期完成计量',
  352. type:'bar',
  353. tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
  354. stack: '完成',
  355. data:[
  356. <% for (const s of stagesEcharts) {%>
  357. <%- ctx.helper.add(s.contract_tp, s.qc_tp) %>,
  358. <% } %>
  359. ]
  360. },
  361. {
  362. name:'完成度',
  363. type:'line',
  364. tooltip : {trigger: 'axis',formatter: "{b}占总标段<br/>{a}:{c} %"},
  365. yAxisIndex: 1,
  366. data:[
  367. <% for (const s of stagesEcharts) {%>
  368. <%- ctx.helper.mul(ctx.helper.div(ctx.helper.add(s.contract_tp, s.qc_tp), tender.sum, 2), 100) %>,
  369. <% } %>
  370. ]
  371. },
  372. ]
  373. };
  374. // 为echarts对象加载数据
  375. myChart.setOption(option);
  376. //4 标段期数计量进度//
  377. //3 标段月进度//
  378. // 基于准备好的dom,初始化echarts图表
  379. var myChart = echarts.init(document.getElementById('chartContainer3'));
  380. var option = {
  381. color:["#e9af68","#57b7b6"],
  382. title : {
  383. text: ''
  384. },
  385. tooltip : {
  386. trigger: 'axis',
  387. formatter: function (params, ticket, callback) {
  388. let sHint = '';
  389. for (const param of params) {
  390. if (sHint !== '') {
  391. sHint += '<br>';
  392. }
  393. if (sHint === '' && param.name !== '') {
  394. sHint = param.name + '<br>';
  395. }
  396. sHint += '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:' + param.color +'"></span>';
  397. if (param.data) {
  398. sHint += param.seriesName + ': ' + param.data + ' %';
  399. } else {
  400. sHint += param.seriesName + ': -';
  401. }
  402. }
  403. return sHint;
  404. },
  405. },
  406. legend: {
  407. data:['截止本月完成','本月完成']
  408. },
  409. toolbox: {
  410. show : true,
  411. feature : {
  412. magicType : {show: true, type: ['line', 'bar']}
  413. }
  414. },
  415. dataZoom : {
  416. show : true,
  417. start : 50,
  418. end : 100
  419. },
  420. xAxis : [
  421. {
  422. type : 'category',
  423. boundaryGap : true,
  424. data : [
  425. <% for (const mp of monthProgress) { %>
  426. '<%- mp.month %>',
  427. <% } %>
  428. ]
  429. }
  430. ],
  431. yAxis : [
  432. {
  433. type : 'value',
  434. axisLabel : {
  435. formatter: '{value} %'
  436. },
  437. splitArea : {show : true}
  438. }
  439. ],
  440. series : [
  441. {
  442. name:'截止本月完成',
  443. type:'line',
  444. itemStyle: {
  445. normal: {
  446. lineStyle: {
  447. shadowColor : 'rgba(0,0,0,0.4)',
  448. shadowBlur: 5,
  449. shadowOffsetX: 3,
  450. shadowOffsetY: 3
  451. }
  452. }
  453. },
  454. data:[
  455. <% for (const mp of monthProgress) { %>
  456. <%- mp.end_ratio %>,
  457. <% } %>
  458. ]
  459. },
  460. {
  461. name:'本月完成',
  462. type:'line',
  463. itemStyle: {
  464. normal: {
  465. lineStyle: {
  466. shadowColor : 'rgba(0,0,0,0.4)',
  467. shadowBlur: 5,
  468. shadowOffsetX: 3,
  469. shadowOffsetY: 3
  470. }
  471. }
  472. },
  473. data:[
  474. <% for (const mp of monthProgress) { %>
  475. <%- mp.ratio %>,
  476. <% } %>
  477. ]
  478. }
  479. ]
  480. };
  481. // 为echarts对象加载数据
  482. myChart.setOption(option);
  483. //3 标段月进度//
  484. </script>
  485. <script>
  486. $(document).ready(function () {
  487. if (window.location.hash && window.location.hash === '#yufukuan') {
  488. $('#gaikuang').removeClass('active');
  489. $('.nav-item a[href="#gaikuang"]').removeClass('active');
  490. $('#yufukuan').addClass('active');
  491. $('.nav-item a[href="#yufukuan"]').addClass('active');
  492. } else if (window.location.hash && window.location.hash === '#tzxiuding') {
  493. $('#gaikuang').removeClass('active');
  494. $('.nav-item a[href="#gaikuang"]').removeClass('active');
  495. $('#tzxiuding').addClass('active');
  496. $('.nav-item a[href="#tzxiuding"]').addClass('active');
  497. } else if (window.location.hash && window.location.hash === '#jlqi') {
  498. $('#gaikuang').removeClass('active');
  499. $('.nav-item a[href="#gaikuang"]').removeClass('active');
  500. $('#jlqi').addClass('active');
  501. $('.nav-item a[href="#jlqi"]').addClass('active');
  502. } else if (window.location.hash && window.location.hash === '#biangeng') {
  503. $('#gaikuang').removeClass('active');
  504. $('.nav-item a[href="#gaikuang"]').removeClass('active');
  505. $('#biangeng').addClass('active');
  506. $('.nav-item a[href="#biangeng"]').addClass('active');
  507. }
  508. $('.show-content').on('click', function () {
  509. $(this).parents('td').html($(this).data('content'));
  510. });
  511. });
  512. </script>
  513. </body>
  514. </html>