tender.ejs 22 KB

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