inspection.ejs 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. <div>
  7. <div class="d-inline-block">
  8. <div class="btn-group" id="sort-dropdown">
  9. <button type="button" class="btn btn-sm btn-light text-primary dropdown-toggle" data-toggle="dropdown" id="bpaixu">排序:创建时间</button>
  10. <div class="dropdown-menu" aria-labelledby="bpaixu">
  11. <ul class="list-unstyled px-3 mb-0" id="sort-radio">
  12. <li class="mb-2">
  13. <div class="custom-control custom-radio">
  14. <input type="radio" class="custom-control-input" id="pai1" name="paizhi" value="time" checked="">
  15. <label class="custom-control-label" for="pai1">创建时间</label>
  16. </div>
  17. </li>
  18. <li class="mb-2">
  19. <div class="custom-control custom-radio">
  20. <input type="radio" class="custom-control-input" id="pai3" name="paizhi" value="code">
  21. <label class="custom-control-label" for="pai3">编号</label>
  22. </div>
  23. </li>
  24. </ul>
  25. <ul class="list-unstyled px-3 pt-2 mb-0 border-top" id="order-radio">
  26. <li class="mb-2">
  27. <div class="custom-control custom-radio">
  28. <input type="radio" class="custom-control-input" id="pdown" name="paixu" value="desc" checked="">
  29. <label class="custom-control-label" for="pdown">降序</label>
  30. </div>
  31. </li>
  32. <li class="mb-2">
  33. <div class="custom-control custom-radio">
  34. <input type="radio" class="custom-control-input" id="pup" name="paixu" value="asc">
  35. <label class="custom-control-label" for="pup">升序</label>
  36. </div>
  37. </li>
  38. </ul>
  39. </div>
  40. </div>
  41. </div>
  42. <div class="d-inline-block">
  43. <div class="btn-group">
  44. <button type="button" class="btn btn-sm btn-light text-primary dropdown-toggle" data-toggle="dropdown" data-status="<%- status %>" id="zhankai"><% if (status !== 0) { %><%- filter.statusString[status] %>(<%- filter.count[status] %>)<% } else { %>全部<% } %></button>
  45. <div class="dropdown-menu" aria-labelledby="zhankai" id="status_select">
  46. <% if (status !== 0) { %><a class="dropdown-item" data-val="0" href="javascript:void(0);">全部</a><% } %>
  47. <% for (const fs in filter.status) { %>
  48. <% const f = filter.status[fs]; %>
  49. <% if (f !== status) { %><a class="dropdown-item" data-val="<%- f %>" href="javascript:void(0);"><%- filter.statusString[f] %>(<%- filter.count[f] %>)</a><% } %>
  50. <% } %>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. <div class="ml-auto">
  56. <% if (permission.add_inspection) { %>
  57. <a href="#add-bj" data-toggle="modal" data-target="#add-bj" class="btn btn-sm btn-primary pull-right ml-1">新建巡检</a>
  58. <a href="#setting" data-toggle="modal" data-target="#setting" class="btn btn-sm btn-outline-primary pull-right ml-1"><i class="fa fa-cog"></i></a>
  59. <% } %>
  60. </div>
  61. </div>
  62. </div>
  63. <div class="content-wrap">
  64. <div class="c-body">
  65. <div class="sjs-height-0">
  66. <table class="table table-bordered">
  67. <thead class="text-center">
  68. <tr>
  69. <th width="13%" id="sort_change">编号</th><th width="5%">部位</th>
  70. <th width="10%">检查项目</th><th width="25%">检查情况</th><th width="13%">处理要求及措施</th>
  71. <th width="10%">检查日期</th><th width="7%">附件</th><th width="13%">状态</th>
  72. </tr>
  73. </thead>
  74. <tbody id="changeList">
  75. <% for (const c of inspectionList) { %>
  76. <tr><td><a href="/sp/<%- ctx.subProject.id %>/quality/tender/<%- ctx.tender.id %>/inspection/<%- c.id %>/information"><%- c.code %></a></td><td></td>
  77. <td><%- c.check_item %></td>
  78. <td><%- c.check_situation %></td>
  79. <td><%- c.action %></td>
  80. <td><%- c.check_date ? moment(c.check_date).format('YYYY-MM-DD') : '' %></td>
  81. <td class="text-center">
  82. <a class="show-files" href="#file" data-toggle="modal" data-target="#file" data-id="<%- c.id %>"><i class="fa fa-paperclip"></i> <%- c.attList.length > 0 ? c.attList.length : '' %></a>
  83. </td>
  84. <td class="text-center">
  85. <span class="<%- auditConst.auditStringClass[c.status] %>"><% if (c.status !== auditConst.status.uncheck) { %><i class="fa fa-circle <%- auditConst.auditStringClass[c.status] %>"></i> <% } %><%- auditConst.auditString[c.status] %></span>
  86. </td>
  87. </tr>
  88. <% } %>
  89. </tbody>
  90. </table>
  91. <!--翻页-->
  92. <% include ../layout/page.ejs %>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. <script>
  98. autoFlashHeight();
  99. const tenderId = parseInt('<%- ctx.tender.id %>');
  100. const tenderName = JSON.parse(unescape('<%- escape(JSON.stringify(tender.name)) %>'));
  101. const dealCode = JSON.parse(unescape('<%- escape(JSON.stringify(dealCode)) %>'));
  102. const ruleConst = JSON.parse(unescape('<%- escape(JSON.stringify(ruleConst)) %>'));
  103. let codeRule = JSON.parse(unescape('<%- escape(JSON.stringify(codeRule)) %>'));
  104. let connectorRule = '<%- c_connector %>';
  105. const cRuleFirst = parseInt('<%- c_rule_first %>');
  106. const ruleType = parseInt('<%- ruleType %>');
  107. const rulesType = '<%- rule_type %>';
  108. const auditType = JSON.parse(unescape('<%- escape(JSON.stringify(auditType)) %>'));
  109. const auditConst = JSON.parse(unescape('<%- escape(JSON.stringify(auditConst)) %>'));
  110. const inspectionList = JSON.parse(unescape('<%- escape(JSON.stringify(inspectionList)) %>'));
  111. </script>