inspection_information.ejs 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  1. <% include ./sub_menu.ejs %>
  2. <div class="panel-content">
  3. <div class="panel-title">
  4. <div class="title-main d-flex justify-content-between">
  5. <% include ./sub_mini_menu.ejs %>
  6. <div>
  7. <div class="d-inline-block">
  8. 质量巡检
  9. </div>
  10. </div>
  11. <div class="ml-auto">
  12. <% if (!inspection.readOnly) { %>
  13. <a href="#del" data-toggle="modal" data-target="#del" class="btn btn-outline-danger btn-sm mr-5">删除巡检</a>
  14. <% } %>
  15. <% if (inspection.status === auditConst.status.uncheck) { %>
  16. <% if (ctx.session.sessionUser.accountId === inspection.uid) { %>
  17. <a href="javascript:void(0);" class="btn btn-success btn-sm" id="judge-start-btn">提交审批</a>
  18. <% } else { %>
  19. <button class="btn btn-outline-secondary btn-sm" data-toggle="tooltip" data-placement="bottom" title="上报中">上报中</button>
  20. <% } %>
  21. <% } else if (inspection.status === auditConst.status.checking || inspection.status === auditConst.status.checkNoPre) { %>
  22. <% if (inspection.curAuditorIds.indexOf(ctx.session.sessionUser.accountId) >= 0) { %>
  23. <a href="#sp-close" data-toggle="modal" data-target="#sp-close" class="btn btn-danger btn-sm mr-2">关闭</a>
  24. <a id="sp-done-btn" href="javascript: void(0);" data-toggle="modal" data-target="#sp-done" class="btn btn-success btn-sm">审批通过</a>
  25. <a href="#sp-back" data-toggle="modal" data-target="#sp-back" class="btn btn-warning btn-sm">审批退回</a>
  26. <% } else { %>
  27. <button class="btn btn-outline-warning btn-sm" data-toggle="tooltip" data-placement="bottom" title="审批中">审批中</button>
  28. <% } %>
  29. <% } else if (inspection.status === auditConst.status.checked) { %>
  30. <button class="btn btn-outline-success btn-sm" data-toggle="tooltip" data-placement="bottom" title="整改完成">整改完成</button>
  31. <% } else if (inspection.status === auditConst.status.rectification) { %>
  32. <% if (inspection.curAuditorIds.indexOf(ctx.session.sessionUser.accountId) >= 0) { %>
  33. <a id="judge-success-btn" href="javascript: void(0);" class="btn btn-success btn-sm">整改完成</a>
  34. <a href="#sp-back" data-toggle="modal" data-target="#sp-back" class="btn btn-warning btn-sm">审批退回</a>
  35. <% } else { %>
  36. <button class="btn btn-outline-warning btn-sm" data-toggle="tooltip" data-placement="bottom" title="整改中">整改中</button>
  37. <% } %>
  38. <% } else if (inspection.status === auditConst.status.checkNo) { %>
  39. <button class="btn btn-outline-warning btn-sm" data-toggle="tooltip" data-placement="bottom" title="审批退回">审批退回</button>
  40. <% if (ctx.session.sessionUser.accountId === inspection.uid) { %>
  41. <a href="javascript:void(0);" class="btn btn-success btn-sm" id="judge-start-btn">重新提交</a>
  42. <% } %>
  43. <% } else if (inspection.status === auditConst.status.checkStop) { %>
  44. <button class="btn btn-outline-danger btn-sm" data-toggle="tooltip" data-placement="bottom" title="已关闭">已关闭</button>
  45. <% } %>
  46. </div>
  47. </div>
  48. </div>
  49. <div class="content-wrap">
  50. <div class="c-body">
  51. <div class="sjs-height-0">
  52. <div class="col-xl-8 mx-auto">
  53. <h4 class="mt-3 text-center mb-3"><%- inspection.code %></h4>
  54. <table class="table table-bordered">
  55. <thead>
  56. <tr>
  57. <th colspan="2" class="text-center">安全巡检单</th>
  58. </tr>
  59. </thead>
  60. <tbody id="check_table">
  61. <tr><th width="150">检查项<b class="text-danger">*</b></th><td><textarea data-key="check_item" class="form-control form-control-sm" <%- !inspection.readOnly ? '' : 'disabled' %>><%- inspection.check_item %></textarea></td></tr>
  62. <tr><th width="150">现场检查情况</th><td><textarea data-key="check_situation" class="form-control form-control-sm" <%- !inspection.readOnly ? '' : 'disabled' %>><%- inspection.check_situation %></textarea></td></tr>
  63. <tr><th width="150">处理要求及措施</th><td><textarea data-key="action" class="form-control form-control-sm" <%- !inspection.readOnly ? '' : 'disabled' %>><%- inspection.action %></textarea></td></tr>
  64. <tr><th width="150">检查日期<b class="text-danger">*</b></th><td><% if (!inspection.readOnly) { %><input data-key="check_date" id="check_date" class="datepicker-here form-control form-control-sm" placeholder="请选择检查日期" data-date-format="yyyy-MM-dd" data-language="zh" type="text" value="<%- inspection.check_date ? moment(inspection.check_date).format('YYYY-MM-DD') : '' %>"><% } else { %><%- inspection.check_date ? moment(inspection.check_date).format('YYYY-MM-DD') : '' %><% } %></td></tr>
  65. <tr><th width="150">检查人</th>
  66. <td>
  67. <% if (!inspection.readOnly && false) { %>
  68. <span class="d-inline-block" id="inspector-set">
  69. <% if (inspection.inspector) { %>
  70. <span class="badge">
  71. <%- inspection.inspector %>
  72. <span class="dropdown">
  73. <a href="javascript:void(0)" class="btn-sm text-danger px-1" title="移除" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-remove"></i></a>
  74. <div class="dropdown-menu">
  75. <a class="dropdown-item" href="javascript:void(0);">确认移除检查人?</a>
  76. <div class="dropdown-divider"></div>
  77. <div class="px-2 py-1 text-center">
  78. <button class="btn btn-sm btn-danger remove-btn">移除</button>
  79. <button class="btn btn-sm btn-secondary">取消</button>
  80. </div>
  81. </div>
  82. </span>
  83. </span>
  84. <% } %>
  85. </span>
  86. <div class="d-inline-block dropdown" <% if (inspection.inspector) { %>style="display: none!important;"<% } %>>
  87. <button class="btn btn-outline-primary btn-sm dropdown-toggle" type="button"
  88. id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true"
  89. aria-expanded="false">
  90. 选择检查人
  91. </button>
  92. <div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton"
  93. style="width:220px">
  94. <div class="mb-2 p-2"><input class="form-control form-control-sm gr-search"
  95. placeholder="姓名/手机 检索" autocomplete="off"></div>
  96. <dl class="list-unstyled book-list">
  97. <% accountGroup.forEach((group, idx) => { %>
  98. <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>" data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
  99. <div class="dd-content" data-toggleid="<%- idx %>">
  100. <% group.groupList.forEach(item => { %>
  101. <% if (item.id !== ctx.session.sessionUser.accountId) { %>
  102. <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>" >
  103. <p class="mb-0 d-flex">
  104. <span class="text-primary"><%- item.name %></span>
  105. <span class="ml-auto"><%- item.mobile %></span></p>
  106. <span class="text-muted"><%- item.role %></span>
  107. </dd>
  108. <% } %>
  109. <% });%>
  110. </div>
  111. <% }) %>
  112. </dl>
  113. </div>
  114. </div>
  115. <% } else { %><%- inspection.inspector %><% } %>
  116. </td>
  117. </tr>
  118. </tbody>
  119. </table>
  120. <% if (inspection.status === auditConst.status.rectification || inspection.status === auditConst.status.checked) { %>
  121. <table class="table table-bordered">
  122. <thead>
  123. <tr>
  124. <th colspan="2" class="text-center">整改单</th>
  125. </tr>
  126. </thead>
  127. <tbody id="rectification_table">
  128. <tr><th width="150">整改情况</th><td><textarea data-key="rectification_item" class="form-control form-control-sm" <%- inspection.rectificationPower ? '' : 'disabled' %>><%- inspection.rectification_item %></textarea></td></tr>
  129. <tr><th width="150">整改日期</th><td><% if (inspection.rectificationPower) { %><input data-key="rectification_date" id="rectification_date" class="datepicker-here form-control form-control-sm" placeholder="请选择整改日期" data-date-format="yyyy-MM-dd" data-language="zh" type="text" value="<%- inspection.rectification_date ? moment(inspection.rectification_date).format('YYYY-MM-DD') : '' %>"><% } else { %><%- inspection.rectification_date ? moment(inspection.rectification_date).format('YYYY-MM-DD') : '' %><% } %></td></tr>
  130. <tr><th width="150">整改人</th><td><%- inspection.rectification_user.name %></td></tr>
  131. </tbody>
  132. </table>
  133. <% } %>
  134. <table class="table table-bordered mt-3">
  135. <thead>
  136. <tr>
  137. <th></th>
  138. <th class="text-center">附件</th>
  139. <th class="text-center">上传者</th>
  140. <th class="text-center" width="200">上传时间</th>
  141. <th class="text-center">操作</th>
  142. </tr>
  143. </thead>
  144. <tbody id="file-content">
  145. </tbody>
  146. </table>
  147. <% if(!inspection.readOnly) { %>
  148. <table class="table table-bordered mt-3">
  149. <thead>
  150. <tr>
  151. <th colspan="2" class="text-center">审批流程</th>
  152. </tr>
  153. </thead>
  154. <tbody>
  155. <tr>
  156. <td width="30%">
  157. <div class="card">
  158. <ul class="list-group list-group-flush" id="auditors2">
  159. <% inspection.auditors2.forEach((item, idx) => { %>
  160. <% if (idx === 0) { %>
  161. <li class="list-group-item d-flex justify-content-between align-items-center">
  162. <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
  163. <span class="text-muted">
  164. <% for (const u of item) { %>
  165. <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
  166. <% } %>
  167. </span>
  168. <span class="badge badge-light badge-pill ml-auto"><small>原报</small></span>
  169. </li>
  170. <% } else if(idx === inspection.auditors2.length -1 && idx !== 0) { %>
  171. <li class="list-group-item d-flex justify-content-between align-items-center" data-auditorid="<%- item[0].aid %>">
  172. <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
  173. <span class="text-muted">
  174. <% for (const u of item) { %>
  175. <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
  176. <% } %>
  177. </span>
  178. <div class="d-flex ml-auto">
  179. <% if (item[0].audit_type !== auditType.key.common) { %>
  180. <span class="badge badge-pill badge-<%- auditType.info[item[0].audit_type].class %> p-1"><small><%- auditType.info[item[0].audit_type].short %></small></span>
  181. <% } %>
  182. <span class="badge badge-light badge-pill"><small>终审</small></span>
  183. </div>
  184. </li>
  185. <% } else {%>
  186. <li class="list-group-item d-flex justify-content-between align-items-center" data-auditorid="<%- item[0].aid %>">
  187. <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
  188. <span class="text-muted">
  189. <% for (const u of item) { %>
  190. <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
  191. <% } %>
  192. </span>
  193. <div class="d-flex ml-auto">
  194. <% if (item[0].audit_type !== auditType.key.common) { %>
  195. <span class="badge badge-pill badge-<%- auditType.info[item[0].audit_type].class %> p-1"><small><%- auditType.info[item[0].audit_type].short %></small></span>
  196. <% } %>
  197. <span class="badge badge-light badge-pill"><small><%= ctx.helper.transFormToChinese(idx) %>审</small></span>
  198. </div>
  199. </li>
  200. <% } %>
  201. <% }) %>
  202. </ul>
  203. </div>
  204. </td>
  205. <td width="70%">
  206. <div class="dropdown text-right">
  207. <% if (ctx.tender.info.shenpi.inspection !== shenpiConst.sp_status.gdspl) { %>
  208. <button class="btn btn-outline-primary btn-sm dropdown-toggle" type="button"
  209. id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true"
  210. aria-expanded="false">
  211. 添加审批流程
  212. </button>
  213. <div class="dropdown-menu dropdown-menu-right" id="shenpi_select" aria-labelledby="dropdownMenuButton"
  214. style="width:220px">
  215. <div class="mb-2 p-2"><input class="form-control form-control-sm gr-search"
  216. placeholder="姓名/手机 检索" autocomplete="off"></div>
  217. <dl class="list-unstyled book-list">
  218. <% accountGroup.forEach((group, idx) => { %>
  219. <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>" data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
  220. <div class="dd-content" data-toggleid="<%- idx %>">
  221. <% group.groupList.forEach(item => { %>
  222. <% if (item.id !== ctx.session.sessionUser.accountId) { %>
  223. <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>" >
  224. <p class="mb-0 d-flex">
  225. <span class="text-primary"><%- item.name %></span>
  226. <span class="ml-auto"><%- item.mobile %></span></p>
  227. <span class="text-muted"><%- item.role %></span>
  228. </dd>
  229. <% } %>
  230. <% });%>
  231. </div>
  232. <% }) %>
  233. </dl>
  234. </div>
  235. <% } %>
  236. </div>
  237. <div class="card mt-3">
  238. <div class="card-header">
  239. 审批流程
  240. </div>
  241. <ul class="list-group list-group-flush" id="auditors">
  242. <% for (let i = 0, iLen = inspection.auditorGroups.length; i < iLen; i++) { %>
  243. <li class="list-group-item d-flex" auditorId="<%- inspection.auditorGroups[i][0].aid %>">
  244. <div class="col-auto"><%- i+1 %></div>
  245. <div class="col">
  246. <% for (const auditor of inspection.auditorGroups[i]) { %>
  247. <div class="d-inline-block mx-1" auditorId="<%- auditor.aid %>">
  248. <i class="fa fa-user text-muted"></i> <%- auditor.name %> <small class="text-muted"><%- auditor.role %></small>
  249. </div>
  250. <% } %>
  251. </div>
  252. <div class="col-auto">
  253. <% if (inspection.auditorGroups[i][0].audit_type !== auditType.key.common) { %>
  254. <span class="badge badge-pill badge-<%- auditType.info[inspection.auditorGroups[i][0].audit_type].class %> badge-bg-small"><small><%- auditType.info[inspection.auditorGroups[i][0].audit_type].long%></small></span>
  255. <% } %>
  256. <% if ((ctx.tender.info.shenpi.inspection === shenpiConst.sp_status.sqspr ||
  257. (ctx.tender.info.shenpi.inspection === shenpiConst.sp_status.gdzs && i+1 !== iLen)) && ctx.session.sessionUser.accountId === inspection.uid) { %>
  258. <a href="javascript: void(0)" class="text-danger pull-right">移除</a>
  259. <% } %>
  260. </div>
  261. </li>
  262. <% } %>
  263. </ul>
  264. </div>
  265. </td>
  266. </tr>
  267. </tbody>
  268. </table>
  269. <% } else {%>
  270. <table class="table table-bordered mt-3">
  271. <thead>
  272. <tr>
  273. <th colspan="2" class="text-center">审批流程</th>
  274. </tr>
  275. </thead>
  276. <tbody>
  277. <tr>
  278. <td width="30%" style="vertical-align: top">
  279. <div class="card">
  280. <ul class="list-group list-group-flush">
  281. <% inspection.auditors2.forEach((item, idx) => { %>
  282. <% if (idx === 0) { %>
  283. <li class="list-group-item d-flex justify-content-between align-items-center">
  284. <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
  285. <span class="text-muted">
  286. <% for (const u of item) { %>
  287. <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
  288. <% } %>
  289. </span>
  290. <span class="badge badge-light badge-pill ml-auto"><small>原报</small></span>
  291. </li>
  292. <% } else if(idx === inspection.auditors2.length -1 && idx !== 0) { %>
  293. <li class="list-group-item d-flex justify-content-between align-items-center" data-auditorid="<%- item[0].aid %>">
  294. <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
  295. <span class="text-muted">
  296. <% for (const u of item) { %>
  297. <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
  298. <% } %>
  299. </span>
  300. <div class="d-flex ml-auto">
  301. <% if (item[0].audit_type !== auditType.key.common) { %>
  302. <span class="badge badge-pill badge-<%- auditType.info[item[0].audit_type].class %> p-1"><small><%- auditType.info[item[0].audit_type].short %></small></span>
  303. <% } %>
  304. <span class="badge badge-light badge-pill"><small>终审</small></span>
  305. </div>
  306. </li>
  307. <% } else {%>
  308. <li class="list-group-item d-flex justify-content-between align-items-center" data-auditorid="<%- item[0].aid %>">
  309. <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
  310. <span class="text-muted">
  311. <% for (const u of item) { %>
  312. <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
  313. <% } %>
  314. </span>
  315. <div class="d-flex ml-auto">
  316. <% if (item[0].audit_type !== auditType.key.common) { %>
  317. <span class="badge badge-pill badge-<%- auditType.info[item[0].audit_type].class %> p-1"><small><%- auditType.info[item[0].audit_type].short %></small></span>
  318. <% } %>
  319. <span class="badge badge-light badge-pill"><small><%= ctx.helper.transFormToChinese(idx) %>审</small></span>
  320. </div>
  321. </li>
  322. <% } %>
  323. <% }) %>
  324. </ul>
  325. </div>
  326. </td>
  327. <td width="70%">
  328. <% inspection.auditHistory.forEach((his, idx) => { %>
  329. <!-- 展开/收起历史流程 -->
  330. <% if(idx === inspection.auditHistory.length - 1 && inspection.auditHistory.length !== 1) { %>
  331. <div class="text-right">
  332. <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
  333. </div>
  334. <% } %>
  335. <div class="<%- idx < inspection.auditHistory.length - 1 ? 'fold-card' : '' %>">
  336. <div class="text-center text-muted"><%- idx+1 %>#</div>
  337. <ul class="timeline-list list-unstyled mt-2 <% if (idx === inspection.auditHistory.length - 1) { %>last-auditor-list<% } %>">
  338. <% his.forEach((group, index) => { %>
  339. <% if (index === 0) { %>
  340. <li class="timeline-list-item pb-2">
  341. <div class="timeline-item-date">
  342. <%- group.beginYear %>
  343. <span><%- group.beginDate %></span>
  344. <span><%- group.beginTime %></span>
  345. </div>
  346. <div class="timeline-item-tail"></div>
  347. <div class="timeline-item-icon bg-success text-light"><i class="fa fa-caret-down"></i></div>
  348. <div class="timeline-item-content">
  349. <div class="py-1">
  350. <span class="text-black-50">原报</span>
  351. <span class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
  352. </div>
  353. <div class="card">
  354. <div class="card-body px-3 py-0">
  355. <div class="card-text p-2 py-3 row">
  356. <div class="col">
  357. <span class="h6"><%- inspection.user.name %></span>
  358. <span class="text-muted ml-1"><%- inspection.user.role %></span>
  359. </div>
  360. <div class="col">
  361. <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
  362. </div>
  363. </div>
  364. </div>
  365. </div>
  366. </div>
  367. </li>
  368. <% } %>
  369. <li class="timeline-list-item pb-2 <% if (group.status === auditConst.status.uncheck && idx === inspection.auditHistory.length - 1) { %>is_uncheck<% } %>">
  370. <% if (group.endYear) { %>
  371. <div class="timeline-item-date">
  372. <%- group.endYear %>
  373. <span><%- group.endDate %></span>
  374. <span><%- group.endTime %></span>
  375. </div>
  376. <% } %>
  377. <% if (index < his.length - 1) { %>
  378. <div class="timeline-item-tail"></div>
  379. <% } %>
  380. <% if (group.status === auditConst.status.checked) { %>
  381. <div class="timeline-item-icon bg-success text-light"><i class="fa fa-check"></i></div>
  382. <% } else if (ctx.helper._.includes([auditConst.status.checkNo, auditConst.status.checkNoPre], group.status)) { %>
  383. <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-level-up"></i></div>
  384. <% } else if (ctx.helper._.includes([auditConst.status.checking, auditConst.status.rectification], group.status)) { %>
  385. <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-ellipsis-h"></i></div>
  386. <% } else if (group.status === auditConst.status.checkStop) { %>
  387. <div class="timeline-item-icon bg-danger text-light"><i class="fa fa-stop"></i></div>
  388. <% } else { %>
  389. <div class="timeline-item-icon bg-secondary text-light"></div>
  390. <% } %>
  391. <div class="timeline-item-content">
  392. <div class="py-1">
  393. <span class="text-black-50">
  394. <%- (group.is_rectification ? '整改人' : (group.audit_order === 0 ? '原报' : !group.is_final ? group.audit_order + '审' : '终审')) %>
  395. <% if (group.audit_type !== auditType.key.common) { %><span class="text-<%- auditType.info[group.audit_type].class %> "><%- auditType.info[group.audit_type].long %></span><% } %>
  396. </span>
  397. <% if (group.status !== auditConst.status.uncheck) { %>
  398. <span class="pull-right <%- auditConst.statusClass[group.status] %>"><%- auditConst.statusString[group.status] %></span>
  399. <% } %>
  400. </div>
  401. <div class="card">
  402. <div class="card-body px-3 py-0">
  403. <% for (const [i, auditor] of group.auditors.entries()) { %>
  404. <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
  405. <div class="col">
  406. <span class="h6"><%- auditor.name %></span>
  407. <span class="text-muted ml-1"><%- auditor.role %></span>
  408. </div>
  409. <div class="col">
  410. <% if (auditor.status === auditConst.status.checked) { %>
  411. <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
  412. <% } else if (ctx.helper._.includes([auditConst.status.checkNo, auditConst.status.checkNoPre], auditor.status)) { %>
  413. <span class="pull-right text-warning"><i class="fa fa-share-square fa-rotate-270"></i></span>
  414. <% } else if (ctx.helper._.includes([auditConst.status.checking, auditConst.status.rectification], auditor.status)) { %>
  415. <span class="pull-right text-warning"><i class="fa fa-commenting"></i></span>
  416. <% } else if (auditor.status === auditConst.status.checkStop) {%>
  417. <span class="pull-right text-danger"><i class="fa fa-stop-circle"></i></span>
  418. <% } %>
  419. </div>
  420. <% if (auditor.opinion) { %>
  421. <div class="col-12 py-1 bg-light"><i class="fa fa-commenting-o mr-1"></i><%- auditor.opinion %></div>
  422. <% } %>
  423. </div>
  424. <% } %>
  425. </div>
  426. </div>
  427. </div>
  428. </li>
  429. <% }) %>
  430. </ul>
  431. </div>
  432. <% }) %>
  433. </td>
  434. </tr>
  435. </tbody>
  436. </table>
  437. <% } %>
  438. </div>
  439. </div>
  440. </div>
  441. </div>
  442. </div>
  443. <script>
  444. const cur_uid = parseInt('<%- ctx.session.sessionUser.accountId %>');
  445. const tender_id = parseInt('<%- ctx.tender.id %>');
  446. const auditConst = JSON.parse('<%- JSON.stringify(auditConst) %>');
  447. const auditType = JSON.parse('<%- JSON.stringify(auditType) %>');
  448. const inspection = JSON.parse(unescape('<%- escape(JSON.stringify(inspection)) %>'));
  449. const preUrl = '<%- preUrl %>';
  450. const fileList = JSON.parse(unescape('<%- escape(JSON.stringify(fileList)) %>')) || [];
  451. const whiteList = JSON.parse('<%- JSON.stringify(whiteList) %>');
  452. const deleteFilePermission = <%- deleteFilePermission %>;
  453. </script>
  454. <% if(!inspection.readOnly) { %>
  455. <script>
  456. const accountList = JSON.parse(unescape('<%- escape(JSON.stringify(accountList)) %>'));
  457. const accountGroup = JSON.parse(unescape('<%- escape(JSON.stringify(accountGroup)) %>'));
  458. const shenpi_status = <%- ctx.tender.info.shenpi.inspection %>;
  459. const shenpiConst = JSON.parse('<%- JSON.stringify(shenpiConst) %>');
  460. </script>
  461. <% } else if (inspection.shenpiPower) { %>
  462. <script>
  463. const accountList = JSON.parse(unescape('<%- escape(JSON.stringify(accountList)) %>'));
  464. const accountGroup = JSON.parse(unescape('<%- escape(JSON.stringify(accountGroup)) %>'));
  465. </script>
  466. <% } %>