transfer.ejs 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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="100px">次数</th>
  21. <th width="10%">划拨年月</th>
  22. <th width="10%">划拨金额</th>
  23. <th width="10%">填报人</th>
  24. <th>填报单位</th>
  25. <th width="150px">填报时间</th>
  26. <th width="15%">填报备注</th>
  27. <th width="150px">附件</th>
  28. <th width="150px">操作</th>
  29. </tr>
  30. </thead>
  31. <tbody id="transfer-list">
  32. <% if (transferList.length > 0) { %>
  33. <% for (const [i, t] of transferList.entries()) { %>
  34. <tr class="text-center" data-id="<%- t.id %>">
  35. <td class=""><%- (transferList.length - i) %></td>
  36. <td class=""><a href="/sp/<%- ctx.subProject.id %>/financial/transfer/<%- t.id %>/tender"><%- t.t_time %></a></td>
  37. <td class="text-right"><%- t.total_price %></td>
  38. <td class=""><%- t.username %></td>
  39. <td class="text-left" ><%- t.company %></td>
  40. <td class="" ><%- moment(t.create_time).format('YYYY-MM-DD HH:mm:ss') %></td>
  41. <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>
  42. <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>
  43. <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>
  44. </tr>
  45. <% } %>
  46. <% } %>
  47. </tbody>
  48. </table>
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. <script>
  54. const user_id = <%- ctx.session.sessionUser.accountId %>;
  55. const whiteList = JSON.parse(unescape('<%- escape(JSON.stringify(whiteList)) %>'));
  56. const transferList = JSON.parse(unescape('<%- escape(JSON.stringify(transferList)) %>'));
  57. const financialPermission = JSON.parse(unescape('<%- escape(JSON.stringify(financialPermission)) %>'));
  58. </script>