tender.ejs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  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. <% if (!ctx.session.sessionProject.page_show.closeWapYfSf) { %>
  176. <td>
  177. <p class="mb-0">本期应付</p>
  178. <b>¥<%- s.yf_tp ? s.yf_tp : 0 %></b>
  179. </td>
  180. <% } %>
  181. </tr>
  182. <% if (!ctx.session.sessionProject.page_show.closeWapYfSf) { %>
  183. <tr>
  184. <td>
  185. <p class="mb-0">本期实付</p>
  186. <b>¥<%- s.sf_tp ? s.sf_tp : 0 %></b>
  187. </td>
  188. <td>
  189. </td>
  190. </tr>
  191. <% } %>
  192. <% if (s.curAuditor && s.status == auditConst.status.checking && s.curAuditor.aid === ctx.session.sessionUser.accountId) { %>
  193. <tr>
  194. <td colspan="2">
  195. <a class="btn btn-block btn-success" href="/wap/tender/<%- s.tid %>/stage/<%- s.order %>">审批本期</a>
  196. </td>
  197. </tr>
  198. <% } %>
  199. </tbody></table>
  200. </dd>
  201. <% } %>
  202. </dl>
  203. </div>
  204. <div class="tab-pane" id="biangeng">
  205. <!--工程变更-->
  206. <dl class="mb-2 mt-3">
  207. <% for (const c of changes) { %>
  208. <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>
  209. <dd>
  210. <table class="table table-hover">
  211. <tbody>
  212. <tr>
  213. <td colspan="2">
  214. <p class="mb-0">工程名称</p>
  215. <%- c.name %>
  216. </td>
  217. </tr>
  218. <tr>
  219. <td>
  220. <p class="mb-0">变更性质</p>
  221. <b><% for (const q in changeConst.quality) { %>
  222. <% const cQuality = changeConst.quality[q] %><% if (cQuality.value === c.quality) { %><%- cQuality.name %><% } %><% } %></b>
  223. </td>
  224. <td>
  225. <p class="mb-0">变更金额</p>
  226. <b><%- ctx.helper.roundNum(c.total_price, tpUnit) %></b>
  227. </td>
  228. </tr>
  229. <tr>
  230. <td colspan="2">
  231. <% if ((c.status === auditChangeConst.status.checking || c.status === auditChangeConst.status.backnew) && c.curAuditor.uid === ctx.session.sessionUser.accountId) { %>
  232. <a href="/wap/tender/<%- tender.id %>/change/<%- c.cid %>/info#shenpi" class="btn btn-block btn-success">审批变更</a>
  233. <% } else if (c.status === auditChangeConst.status.uncheck) { %>
  234. <span>待上报</span>
  235. <% } else { %>
  236. <span class="<%- auditChangeConst.auditStatusClass[c.curAuditor.status] %>"><%- c.curAuditor.name %>-<%- c.curAuditor.jobs %> <%- auditChangeConst.auditStatusString[c.curAuditor.status] %></span>
  237. <% } %>
  238. </td>
  239. </tr>
  240. </tbody>
  241. </table>
  242. </dd>
  243. <% } %>
  244. </dl>
  245. </div>
  246. </div>
  247. </div>
  248. <!--底栏菜单-->
  249. <nav class="fixed-bottom navbar-dark bg-light border-top">
  250. <ul class="nav nav-fill my-2">
  251. <li class="nav-item">
  252. <a class="nav-link text-muted show-loading" href="/wap/dashboard"><i class="fa fa-check-square-o"></i> 待审批</a>
  253. </li>
  254. <li class="nav-item">
  255. <a class="nav-link active show-loading" href="/wap/list"><i class="fa fa-list-ul"></i> 项目</a>
  256. </li>
  257. </ul>
  258. </nav>
  259. </div>
  260. <!-- JS. -->
  261. <script src="/public/js/jquery/jquery-3.2.1.min.js"></script>
  262. <script src="/public/js/popper/popper.min.js"></script>
  263. <script src="/public/js/bootstrap/bootstrap.min.js"></script>
  264. <script src="/public/js/cookies.js"></script>
  265. <script src="/public/js/wap/global.js"></script>
  266. <script type="text/javascript">
  267. //4 标段期数计量进度//
  268. var myChart = echarts.init(document.getElementById('chartContainer4'));
  269. var option = {
  270. color: ['#e9af68','#57b7b6','#e4575a','#959eac','#6699FF',
  271. '#d38b70','#8fb7cf','#cd5c5c','#ffa500','#40e0d0',
  272. '#1e90ff','#ff6347','#7b68ee','#00fa9a','#ffd700',
  273. '#5c616b','#ff6666','#3cb371','#b8860b','#30e0e0'],
  274. title : {
  275. text: ''
  276. },
  277. tooltip : {
  278. trigger: 'axis'
  279. },
  280. calculable : true,
  281. legend: {
  282. data:['本期合同计量','本期数量变更计量','截止上期累计完成','本期完成计量','完成度']
  283. },
  284. dataZoom: [
  285. {show: true,start: 0, end: 100}
  286. ],
  287. xAxis : [
  288. {
  289. type : 'category',
  290. splitLine : {show : true},
  291. data : [
  292. <% for (const s of stagesEcharts) {%>
  293. '第<%- s.order %>期',
  294. <% } %>
  295. ]
  296. }
  297. ],
  298. yAxis : [
  299. {
  300. type : 'value',
  301. name : '金额',
  302. position:'left',
  303. axisLabel : {
  304. formatter: '{value} 元'
  305. },
  306. splitArea : {show : true},
  307. splitLine : {show : true},
  308. },
  309. {
  310. type : 'value',
  311. name:'完成度',
  312. axisLabel : {
  313. formatter: '{value} %'
  314. },
  315. position: 'right',
  316. splitArea : {show : false},
  317. splitLine : {show : false},
  318. }
  319. ],
  320. series : [
  321. {
  322. name:'本期合同计量',
  323. type:'bar',
  324. tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
  325. stack: '合同',
  326. data:[
  327. <% for (const s of stagesEcharts) {%>
  328. <%- s.contract_tp %>,
  329. <% } %>
  330. ]
  331. },
  332. {
  333. name:'本期数量变更计量',
  334. type:'bar',
  335. tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
  336. stack: '变更',
  337. data:[
  338. <% for (const s of stagesEcharts) {%>
  339. <%- s.qc_tp %>,
  340. <% } %>
  341. ]
  342. },
  343. {
  344. name:'截止上期累计完成',
  345. type:'bar',
  346. tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
  347. stack: '完成',
  348. data:[
  349. <% for (const s of stagesEcharts) {%>
  350. <%- ctx.helper.add(s.pre_contract_tp, s.pre_qc_tp) %>,
  351. <% } %>
  352. ]
  353. },
  354. {
  355. name:'本期完成计量',
  356. type:'bar',
  357. tooltip : {trigger: 'item',formatter: "{b} <br/>{a}:{c}元"},
  358. stack: '完成',
  359. data:[
  360. <% for (const s of stagesEcharts) {%>
  361. <%- ctx.helper.add(s.contract_tp, s.qc_tp) %>,
  362. <% } %>
  363. ]
  364. },
  365. {
  366. name:'完成度',
  367. type:'line',
  368. tooltip : {trigger: 'axis',formatter: "{b}占总标段<br/>{a}:{c} %"},
  369. yAxisIndex: 1,
  370. data:[
  371. <% for (const s of stagesEcharts) {%>
  372. <%- ctx.helper.mul(ctx.helper.div(ctx.helper.add(s.contract_tp, s.qc_tp), tender.sum, 2), 100) %>,
  373. <% } %>
  374. ]
  375. },
  376. ]
  377. };
  378. // 为echarts对象加载数据
  379. myChart.setOption(option);
  380. //4 标段期数计量进度//
  381. //3 标段月进度//
  382. // 基于准备好的dom,初始化echarts图表
  383. var myChart = echarts.init(document.getElementById('chartContainer3'));
  384. var option = {
  385. color:["#e9af68","#57b7b6"],
  386. title : {
  387. text: ''
  388. },
  389. tooltip : {
  390. trigger: 'axis',
  391. formatter: function (params, ticket, callback) {
  392. let sHint = '';
  393. for (const param of params) {
  394. if (sHint !== '') {
  395. sHint += '<br>';
  396. }
  397. if (sHint === '' && param.name !== '') {
  398. sHint = param.name + '<br>';
  399. }
  400. sHint += '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:' + param.color +'"></span>';
  401. if (param.data) {
  402. sHint += param.seriesName + ': ' + param.data + ' %';
  403. } else {
  404. sHint += param.seriesName + ': -';
  405. }
  406. }
  407. return sHint;
  408. },
  409. },
  410. legend: {
  411. data:['截止本月完成','本月完成']
  412. },
  413. toolbox: {
  414. show : true,
  415. feature : {
  416. magicType : {show: true, type: ['line', 'bar']}
  417. }
  418. },
  419. dataZoom : {
  420. show : true,
  421. start : 50,
  422. end : 100
  423. },
  424. xAxis : [
  425. {
  426. type : 'category',
  427. boundaryGap : true,
  428. data : [
  429. <% for (const mp of monthProgress) { %>
  430. '<%- mp.month %>',
  431. <% } %>
  432. ]
  433. }
  434. ],
  435. yAxis : [
  436. {
  437. type : 'value',
  438. axisLabel : {
  439. formatter: '{value} %'
  440. },
  441. splitArea : {show : true}
  442. }
  443. ],
  444. series : [
  445. {
  446. name:'截止本月完成',
  447. type:'line',
  448. itemStyle: {
  449. normal: {
  450. lineStyle: {
  451. shadowColor : 'rgba(0,0,0,0.4)',
  452. shadowBlur: 5,
  453. shadowOffsetX: 3,
  454. shadowOffsetY: 3
  455. }
  456. }
  457. },
  458. data:[
  459. <% for (const mp of monthProgress) { %>
  460. <%- mp.end_ratio %>,
  461. <% } %>
  462. ]
  463. },
  464. {
  465. name:'本月完成',
  466. type:'line',
  467. itemStyle: {
  468. normal: {
  469. lineStyle: {
  470. shadowColor : 'rgba(0,0,0,0.4)',
  471. shadowBlur: 5,
  472. shadowOffsetX: 3,
  473. shadowOffsetY: 3
  474. }
  475. }
  476. },
  477. data:[
  478. <% for (const mp of monthProgress) { %>
  479. <%- mp.ratio %>,
  480. <% } %>
  481. ]
  482. }
  483. ]
  484. };
  485. // 为echarts对象加载数据
  486. myChart.setOption(option);
  487. //3 标段月进度//
  488. </script>
  489. <script>
  490. $(document).ready(function () {
  491. if (window.location.hash && window.location.hash === '#yufukuan') {
  492. $('#gaikuang').removeClass('active');
  493. $('.nav-item a[href="#gaikuang"]').removeClass('active');
  494. $('#yufukuan').addClass('active');
  495. $('.nav-item a[href="#yufukuan"]').addClass('active');
  496. } else if (window.location.hash && window.location.hash === '#tzxiuding') {
  497. $('#gaikuang').removeClass('active');
  498. $('.nav-item a[href="#gaikuang"]').removeClass('active');
  499. $('#tzxiuding').addClass('active');
  500. $('.nav-item a[href="#tzxiuding"]').addClass('active');
  501. } else if (window.location.hash && window.location.hash === '#jlqi') {
  502. $('#gaikuang').removeClass('active');
  503. $('.nav-item a[href="#gaikuang"]').removeClass('active');
  504. $('#jlqi').addClass('active');
  505. $('.nav-item a[href="#jlqi"]').addClass('active');
  506. } else if (window.location.hash && window.location.hash === '#biangeng') {
  507. $('#gaikuang').removeClass('active');
  508. $('.nav-item a[href="#gaikuang"]').removeClass('active');
  509. $('#biangeng').addClass('active');
  510. $('.nav-item a[href="#biangeng"]').addClass('active');
  511. }
  512. $('.show-content').on('click', function () {
  513. $(this).parents('td').html($(this).data('content'));
  514. });
  515. });
  516. </script>
  517. </body>
  518. </html>