transfer_tender.ejs 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <link rel="stylesheet" href="/public/css/bootstrap/bootstrap-select.min.css">
  2. <% include ./sub_menu.ejs %>
  3. <div class="panel-content">
  4. <div class="panel-title">
  5. <div class="title-main d-flex">
  6. <% include ./sub_mini_menu.ejs %>
  7. <h2><%- transferInfo.t_time %></h2>
  8. <div class="ml-auto">
  9. <% if (transferInfo.uid === ctx.session.sessionUser.accountId) { %>
  10. <% if (transferInfo.is_lock) { %>
  11. <a href="#unlock" data-toggle="modal" data-target="#unlock" class="btn btn-danger btn-sm pull-right">解锁数据</a>
  12. <% } else { %>
  13. <a href="#lock" data-toggle="modal" data-target="#lock" class="btn btn-success btn-sm pull-right mr-2">锁定数据</a>
  14. <a href="#add-bd" data-toggle="modal" data-target="#add-bd" class="btn btn-primary btn-sm pull-right mr-2">添加标段</a>
  15. <% } %>
  16. <% } %>
  17. </div>
  18. </div>
  19. </div>
  20. <div class="content-wrap">
  21. <div class="c-body">
  22. <div class="sjs-height-0">
  23. <table class="table table-bordered">
  24. <thead class="text-center">
  25. <tr>
  26. <th width="50px">序号</th>
  27. <th width="">标段名称</th>
  28. <th width="130px">计量期数</th>
  29. <th width="100px">合同金额</th>
  30. <th width="100px">本期合同计量</th>
  31. <th width="100px">本期变更计量</th>
  32. <th width="100px">本期完成计量</th>
  33. <th width="100px">本期应付</th>
  34. <th width="100px">本期实付</th>
  35. <th width="100px">本次划拨金额</th>
  36. <th width="80px">附件</th>
  37. <% if (transferInfo.uid === ctx.session.sessionUser.accountId) { %>
  38. <th width="80px">操作</th>
  39. <% } %>
  40. </tr>
  41. </thead>
  42. <tbody id="tender-list">
  43. <% if (transferTenderList.length > 0) { %>
  44. <% for (const [i, t] of transferTenderList.entries()) { %>
  45. <tr class="text-right" data-id="<%- t.id %>">
  46. <td class="text-center"><%- i+1 %></td>
  47. <td class="text-left"><%- t.name %></td>
  48. <td class="text-center">第<%- t.sorder %>期</td>
  49. <td class="" ><%- t.total_price %></td>
  50. <td class="" ><%- t.contract_tp %></td>
  51. <td class="" ><%- t.qc_tp %></td>
  52. <td class="" ><%- ctx.helper.sum([t.contract_tp, t.qc_tp, t.pc_tp]) %></td>
  53. <td class="" ><%- t.yf_tp %></td>
  54. <td class="" ><%- t.sf_tp %></td>
  55. <td><% if (transferInfo.uid === ctx.session.sessionUser.accountId && !transferInfo.is_lock) { %><input type="text" class="form-control form-control-sm text-right" placeholder="默认等于本期实付" data-ftid="<%- t.id %>" value="<%- t.hb_tp %>"><% } else { %><%- t.hb_tp %><% } %></td>
  56. <td class="text-center" ><a href="javascript:void(0);" class="text-primary open-tender-files" data-ftid="<%- t.id %>"><i class="fa fa-paperclip fa-rotate-90"></i></a> <span class="file-num"><%- t.files.length > 0 ? t.files.length : '' %></span></td>
  57. <% if (transferInfo.uid === ctx.session.sessionUser.accountId) { %><td class="text-center"><% if (!transferInfo.is_lock) { %><a class="text-danger del-tender-btn" href="javascript:void(0);" data-id="<%- t.id %>">移除</a><% } %></td><% } %>
  58. </tr>
  59. <% } %>
  60. <% } %>
  61. </tbody>
  62. </table>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. <script src="/public/js/bootstrap/bootstrap-select.min.js"></script>
  68. <script>
  69. const user_id = <%- ctx.session.sessionUser.accountId %>;
  70. const trid = '<%- transferInfo.id %>';
  71. const whiteList = JSON.parse(unescape('<%- escape(JSON.stringify(whiteList)) %>'));
  72. const tenderList = JSON.parse(unescape('<%- escape(JSON.stringify(transferTenderList)) %>'));
  73. const financialPermission = JSON.parse(unescape('<%- escape(JSON.stringify(financialPermission)) %>'));
  74. </script>