transfer.ejs 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <% include ./sub_menu.ejs %>
  2. <div class="panel-content">
  3. <div class="panel-title">
  4. <div class="title-main d-flex">
  5. <% include ./sub_mini_menu.ejs %>
  6. <h2>划拨列表</h2>
  7. <div class="ml-auto">
  8. <% if (ctx.session.sessionUser.is_admin || financialPermission.transfer_add) { %>
  9. <a href="#add-transfer" data-toggle="modal" data-target="#add-transfer" class="btn btn-primary btn-sm pull-right">新建划拨</a>
  10. <% } %>
  11. </div>
  12. </div>
  13. </div>
  14. <div class="content-wrap">
  15. <div class="c-body">
  16. <div class="sjs-height-0">
  17. <table class="table table-hover table-bordered text-center">
  18. <thead>
  19. <tr>
  20. <th width="50px">次数</th>
  21. <th width="10%">划拨年月</th>
  22. <th width="120px">本次划拨金额</th>
  23. <th width="120px">截止上次划拨金额</th>
  24. <th width="120px">截止本次划拨金额</th>
  25. <th width="100px">填报人</th>
  26. <th width="150px">填报单位</th>
  27. <th width="150px">填报时间</th>
  28. <th width="20%">填报备注</th>
  29. <th width="80px">附件</th>
  30. <th width="80px">操作</th>
  31. </tr>
  32. </thead>
  33. <tbody id="transfer-list">
  34. <% if (transferList.length > 0) { %>
  35. <% for (const [i, t] of transferList.entries()) { %>
  36. <tr class="text-center" data-id="<%- t.id %>">
  37. <td class=""><%- pageInfo.total_num - ((pageInfo.page-1)*pageInfo.pageSize + i) %></td>
  38. <td class=""><a href="/sp/<%- ctx.subProject.id %>/financial/transfer/<%- t.id %>/tender"><%- t.t_time %></a>
  39. <% if (ctx.session.sessionUser.is_admin) { %>
  40. <a href="#edit" class="edit-time" data-ftid="<%- t.id %>" data-time="<%- t.t_time %>" data-toggle="modal" data-target="#edit"><i class="fa fa-pencil-square-o "></i></a>
  41. <% } %>
  42. </td>
  43. <td class="text-right"><%- t.total_price %></td>
  44. <td class="text-right"><%- t.pre_hb_tp %></td>
  45. <td class="text-right"><%- ctx.helper.add(t.total_price, t.pre_hb_tp) %></td>
  46. <td class=""><%- t.username %></td>
  47. <td class="text-left" ><%- t.company %></td>
  48. <td class="" ><%- moment(t.create_time).format('YYYY-MM-DD HH:mm:ss') %></td>
  49. <td class="" ><span class="show-remark"><%- t.remark %></span> <% if (t.uid === ctx.session.sessionUser.accountId) { %><a href="javascript:void(0);" class="edit-remark" data-id="<%- t.id %>"><i class="fa fa-pencil-square-o"></i></a><% } %></td>
  50. <td class="" ><a href="javascript:void(0);" data-trid="<%- t.id %>" class="text-primary open-transfer-files"><i class="fa fa-paperclip fa-rotate-90"></i></a> <span class="file-num"><%- t.files.length > 0 ? t.files.length : '' %></span></td>
  51. <td><% if (t.uid === ctx.session.sessionUser.accountId) { %><a href="javascript:void(0);" class="text-danger del-transfer-btn" data-id="<%- t.id %>">删除</a><% } %></td>
  52. </tr>
  53. <% } %>
  54. <% } %>
  55. </tbody>
  56. </table>
  57. <!--翻页-->
  58. <% include ../layout/page.ejs %>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. <script>
  64. const user_id = <%- ctx.session.sessionUser.accountId %>;
  65. const whiteList = JSON.parse(unescape('<%- escape(JSON.stringify(whiteList)) %>'));
  66. const transferList = JSON.parse(unescape('<%- escape(JSON.stringify(transferList)) %>'));
  67. const financialPermission = JSON.parse(unescape('<%- escape(JSON.stringify(financialPermission)) %>'));
  68. </script>