inspection_information.ejs 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  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 class="text-center" width="150">检查项<b class="text-danger">*</b></th><td><textarea rows="4" data-key="check_item" id="check_item_quality_height-<%- inspection.id %>" class="form-control form-control-sm" <%- !inspection.readOnly ? '' : 'disabled' %>><%- inspection.check_item %></textarea></td></tr>
  62. <tr><th class="text-center" width="150">现场检查情况</th><td><textarea rows="4" data-key="check_situation" id="check_situation_quality_height-<%- inspection.id %>" class="form-control form-control-sm" <%- !inspection.readOnly ? '' : 'disabled' %>><%- inspection.check_situation %></textarea></td></tr>
  63. <tr><th class="text-center" width="150">处理要求及措施</th><td><textarea rows="4" data-key="action" id="action_quality_height-<%- inspection.id %>" class="form-control form-control-sm" <%- !inspection.readOnly ? '' : 'disabled' %>><%- inspection.action %></textarea></td></tr>
  64. <tr><th class="text-center" 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 class="text-center" 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 class="text-center" width="150">整改情况</th><td><textarea rows="4" data-key="rectification_item" id="rectification_item_quality_height-<%- inspection.id %>" class="form-control form-control-sm" <%- inspection.rectificationPower ? '' : 'disabled' %>><%- inspection.rectification_item %></textarea></td></tr>
  129. <tr><th class="text-center" 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 class="text-center" 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. <% if (ctx.tender.info.shenpi.inspection !== shenpiConst.sp_status.gdspl) { %>
  158. <div style="height: 22px;width: 100%">&nbsp;</div>
  159. <% } %>
  160. <div class="card mt-3">
  161. <ul class="list-group list-group-flush" id="auditors2">
  162. <% inspection.auditors2.forEach((item, idx) => { %>
  163. <% if (idx === 0) { %>
  164. <li class="list-group-item d-flex justify-content-between align-items-center">
  165. <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
  166. <span class="text-muted">
  167. <% for (const u of item) { %>
  168. <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
  169. <% } %>
  170. </span>
  171. <span class="badge badge-light badge-pill ml-auto"><small>原报</small></span>
  172. </li>
  173. <% } else if(idx === inspection.auditors2.length -1 && idx !== 0) { %>
  174. <li class="list-group-item d-flex justify-content-between align-items-center" data-auditorid="<%- item[0].aid %>">
  175. <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
  176. <span class="text-muted">
  177. <% for (const u of item) { %>
  178. <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
  179. <% } %>
  180. </span>
  181. <div class="d-flex ml-auto">
  182. <% if (item[0].audit_type !== auditType.key.common) { %>
  183. <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>
  184. <% } %>
  185. <span class="badge badge-light badge-pill"><small>终审</small></span>
  186. </div>
  187. </li>
  188. <% } else {%>
  189. <li class="list-group-item d-flex justify-content-between align-items-center" data-auditorid="<%- item[0].aid %>">
  190. <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
  191. <span class="text-muted">
  192. <% for (const u of item) { %>
  193. <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
  194. <% } %>
  195. </span>
  196. <div class="d-flex ml-auto">
  197. <% if (item[0].audit_type !== auditType.key.common) { %>
  198. <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>
  199. <% } %>
  200. <span class="badge badge-light badge-pill"><small><%= ctx.helper.transFormToChinese(idx) %>审</small></span>
  201. </div>
  202. </li>
  203. <% } %>
  204. <% }) %>
  205. </ul>
  206. </div>
  207. </td>
  208. <td width="70%">
  209. <div class="dropdown text-right">
  210. <% if (ctx.tender.info.shenpi.inspection !== shenpiConst.sp_status.gdspl) { %>
  211. <button class="btn btn-outline-primary btn-sm dropdown-toggle" type="button"
  212. id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true"
  213. aria-expanded="false">
  214. 添加审批流程
  215. </button>
  216. <div class="dropdown-menu dropdown-menu-right" id="shenpi_select" aria-labelledby="dropdownMenuButton"
  217. style="width:220px">
  218. <div class="mb-2 p-2"><input class="form-control form-control-sm gr-search"
  219. placeholder="姓名/手机 检索" autocomplete="off"></div>
  220. <dl class="list-unstyled book-list">
  221. <% accountGroup.forEach((group, idx) => { %>
  222. <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>
  223. <div class="dd-content" data-toggleid="<%- idx %>">
  224. <% group.groupList.forEach(item => { %>
  225. <% if (item.id !== ctx.session.sessionUser.accountId) { %>
  226. <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>" >
  227. <p class="mb-0 d-flex">
  228. <span class="text-primary"><%- item.name %></span>
  229. <span class="ml-auto"><%- item.mobile %></span></p>
  230. <span class="text-muted"><%- item.role %></span>
  231. </dd>
  232. <% } %>
  233. <% });%>
  234. </div>
  235. <% }) %>
  236. </dl>
  237. </div>
  238. <% } %>
  239. </div>
  240. <div class="card mt-3">
  241. <div class="card-header">
  242. 审批流程
  243. </div>
  244. <ul class="list-group list-group-flush" id="auditors">
  245. <% for (let i = 0, iLen = inspection.auditorGroups.length; i < iLen; i++) { %>
  246. <li class="list-group-item d-flex" auditorId="<%- inspection.auditorGroups[i][0].aid %>">
  247. <div class="col-auto"><%- i+1 %></div>
  248. <div class="col">
  249. <% for (const auditor of inspection.auditorGroups[i]) { %>
  250. <div class="d-inline-block mx-1" auditorId="<%- auditor.aid %>">
  251. <i class="fa fa-user text-muted"></i> <%- auditor.name %> <small class="text-muted"><%- auditor.role %></small>
  252. </div>
  253. <% } %>
  254. </div>
  255. <div class="col-auto">
  256. <% if (inspection.auditorGroups[i][0].audit_type !== auditType.key.common) { %>
  257. <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>
  258. <% } %>
  259. <% if ((ctx.tender.info.shenpi.inspection === shenpiConst.sp_status.sqspr ||
  260. (ctx.tender.info.shenpi.inspection === shenpiConst.sp_status.gdzs && i+1 !== iLen)) && ctx.session.sessionUser.accountId === inspection.uid) { %>
  261. <a href="javascript: void(0)" class="text-danger pull-right">移除</a>
  262. <% } %>
  263. </div>
  264. </li>
  265. <% } %>
  266. </ul>
  267. </div>
  268. </td>
  269. </tr>
  270. </tbody>
  271. </table>
  272. <% } else {%>
  273. <table class="table table-bordered mt-3">
  274. <thead>
  275. <tr>
  276. <th colspan="2" class="text-center">审批流程</th>
  277. </tr>
  278. </thead>
  279. <tbody>
  280. <tr>
  281. <td width="30%" style="vertical-align: top">
  282. <div class="card">
  283. <ul class="list-group list-group-flush">
  284. <% inspection.auditors2.forEach((item, idx) => { %>
  285. <% if (idx === 0) { %>
  286. <li class="list-group-item d-flex justify-content-between align-items-center">
  287. <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
  288. <span class="text-muted">
  289. <% for (const u of item) { %>
  290. <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
  291. <% } %>
  292. </span>
  293. <span class="badge badge-light badge-pill ml-auto"><small>原报</small></span>
  294. </li>
  295. <% } else if(idx === inspection.auditors2.length -1 && idx !== 0) { %>
  296. <li class="list-group-item d-flex justify-content-between align-items-center" data-auditorid="<%- item[0].aid %>">
  297. <span class="mr-1"><i class="fa <% if (inspection.rectification_uid && inspection.rectification_user) { %>fa-chevron-circle-down<% } else { %>fa-stop-circle<% } %>"></i></span>
  298. <span class="text-muted">
  299. <% for (const u of item) { %>
  300. <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
  301. <% } %>
  302. </span>
  303. <div class="d-flex ml-auto">
  304. <% if (item[0].audit_type !== auditType.key.common) { %>
  305. <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>
  306. <% } %>
  307. <span class="badge badge-light badge-pill"><small>终审</small></span>
  308. </div>
  309. </li>
  310. <% } else {%>
  311. <li class="list-group-item d-flex justify-content-between align-items-center" data-auditorid="<%- item[0].aid %>">
  312. <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
  313. <span class="text-muted">
  314. <% for (const u of item) { %>
  315. <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
  316. <% } %>
  317. </span>
  318. <div class="d-flex ml-auto">
  319. <% if (item[0].audit_type !== auditType.key.common) { %>
  320. <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>
  321. <% } %>
  322. <span class="badge badge-light badge-pill"><small><%= ctx.helper.transFormToChinese(idx) %>审</small></span>
  323. </div>
  324. </li>
  325. <% } %>
  326. <% }) %>
  327. <% if (inspection.rectification_uid && inspection.rectification_user) { %>
  328. <li class="list-group-item d-flex justify-content-between align-items-center">
  329. <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
  330. <span class="text-muted">
  331. <small class="d-inline-block text-dark mx-1" title="<%- inspection.rectification_user.role %>"><%- inspection.rectification_user.name %></small>
  332. </span>
  333. <div class="d-flex ml-auto">
  334. <span class="badge badge-light badge-pill"><small>整改</small></span>
  335. </div>
  336. </li>
  337. <% } %>
  338. </ul>
  339. </div>
  340. </td>
  341. <td width="70%">
  342. <% inspection.auditHistory.forEach((his, idx) => { %>
  343. <!-- 展开/收起历史流程 -->
  344. <% if(idx === inspection.auditHistory.length - 1 && inspection.auditHistory.length !== 1) { %>
  345. <div class="text-right">
  346. <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
  347. </div>
  348. <% } %>
  349. <div class="<%- idx < inspection.auditHistory.length - 1 ? 'fold-card' : '' %>">
  350. <div class="text-center text-muted"><%- idx+1 %>#</div>
  351. <ul class="timeline-list list-unstyled mt-2 <% if (idx === inspection.auditHistory.length - 1) { %>last-auditor-list<% } %>">
  352. <% his.forEach((group, index) => { %>
  353. <% if (index === 0) { %>
  354. <li class="timeline-list-item pb-2">
  355. <div class="timeline-item-date">
  356. <%- group.beginYear %>
  357. <span><%- group.beginDate %></span>
  358. <span><%- group.beginTime %></span>
  359. </div>
  360. <div class="timeline-item-tail"></div>
  361. <div class="timeline-item-icon bg-success text-light"><i class="fa fa-caret-down"></i></div>
  362. <div class="timeline-item-content">
  363. <div class="py-1">
  364. <span class="text-black-50">原报</span>
  365. <span class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
  366. </div>
  367. <div class="card">
  368. <div class="card-body px-3 py-0">
  369. <div class="card-text p-2 py-3 row">
  370. <div class="col">
  371. <span class="h6"><%- inspection.user.name %></span>
  372. <span class="text-muted ml-1"><%- inspection.user.role %></span>
  373. </div>
  374. <div class="col">
  375. <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
  376. </div>
  377. </div>
  378. </div>
  379. </div>
  380. </div>
  381. </li>
  382. <% } %>
  383. <li class="timeline-list-item pb-2 <% if (group.status === auditConst.status.uncheck && idx === inspection.auditHistory.length - 1) { %>is_uncheck<% } %>">
  384. <% if (group.endYear) { %>
  385. <div class="timeline-item-date">
  386. <%- group.endYear %>
  387. <span><%- group.endDate %></span>
  388. <span><%- group.endTime %></span>
  389. </div>
  390. <% } %>
  391. <% if (index < his.length - 1) { %>
  392. <div class="timeline-item-tail"></div>
  393. <% } %>
  394. <% if (group.status === auditConst.status.checked) { %>
  395. <div class="timeline-item-icon bg-success text-light"><i class="fa fa-check"></i></div>
  396. <% } else if (ctx.helper._.includes([auditConst.status.checkNo, auditConst.status.checkNoPre], group.status)) { %>
  397. <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-level-up"></i></div>
  398. <% } else if (ctx.helper._.includes([auditConst.status.checking, auditConst.status.rectification], group.status)) { %>
  399. <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-ellipsis-h"></i></div>
  400. <% } else if (group.status === auditConst.status.checkStop) { %>
  401. <div class="timeline-item-icon bg-danger text-light"><i class="fa fa-stop"></i></div>
  402. <% } else { %>
  403. <div class="timeline-item-icon bg-secondary text-light"></div>
  404. <% } %>
  405. <div class="timeline-item-content">
  406. <div class="py-1">
  407. <span class="text-black-50">
  408. <%- (group.is_rectification ? '整改人' : (group.audit_order === 0 ? '原报' : !group.is_final ? group.audit_order + '审' : '终审')) %>
  409. <% if (group.audit_type !== auditType.key.common) { %><span class="text-<%- auditType.info[group.audit_type].class %> "><%- auditType.info[group.audit_type].long %></span><% } %>
  410. </span>
  411. <% if (group.status !== auditConst.status.uncheck) { %>
  412. <span class="pull-right <%- auditConst.statusClass[group.status] %>"><%- auditConst.statusString[group.status] %></span>
  413. <% } %>
  414. </div>
  415. <div class="card">
  416. <div class="card-body px-3 py-0">
  417. <% for (const [i, auditor] of group.auditors.entries()) { %>
  418. <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
  419. <div class="col">
  420. <span class="h6"><%- auditor.name %></span>
  421. <span class="text-muted ml-1"><%- auditor.role %></span>
  422. </div>
  423. <div class="col">
  424. <% if (auditor.status === auditConst.status.checked) { %>
  425. <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
  426. <% } else if (ctx.helper._.includes([auditConst.status.checkNo, auditConst.status.checkNoPre], auditor.status)) { %>
  427. <span class="pull-right text-warning"><i class="fa fa-share-square fa-rotate-270"></i></span>
  428. <% } else if (ctx.helper._.includes([auditConst.status.checking, auditConst.status.rectification], auditor.status)) { %>
  429. <span class="pull-right text-warning"><i class="fa fa-commenting"></i></span>
  430. <% } else if (auditor.status === auditConst.status.checkStop) {%>
  431. <span class="pull-right text-danger"><i class="fa fa-stop-circle"></i></span>
  432. <% } %>
  433. </div>
  434. <% if (auditor.opinion) { %>
  435. <div class="col-12 py-1 bg-light"><i class="fa fa-commenting-o mr-1"></i><%- auditor.opinion %></div>
  436. <% } %>
  437. </div>
  438. <% } %>
  439. </div>
  440. </div>
  441. </div>
  442. </li>
  443. <% }) %>
  444. </ul>
  445. </div>
  446. <% }) %>
  447. </td>
  448. </tr>
  449. </tbody>
  450. </table>
  451. <% } %>
  452. </div>
  453. </div>
  454. </div>
  455. </div>
  456. </div>
  457. <script>
  458. const cur_uid = parseInt('<%- ctx.session.sessionUser.accountId %>');
  459. const tender_id = parseInt('<%- ctx.tender.id %>');
  460. const auditConst = JSON.parse('<%- JSON.stringify(auditConst) %>');
  461. const auditType = JSON.parse('<%- JSON.stringify(auditType) %>');
  462. const inspection = JSON.parse(unescape('<%- escape(JSON.stringify(inspection)) %>'));
  463. const preUrl = '<%- preUrl %>';
  464. const fileList = JSON.parse(unescape('<%- escape(JSON.stringify(fileList)) %>')) || [];
  465. const whiteList = JSON.parse('<%- JSON.stringify(whiteList) %>');
  466. const deleteFilePermission = <%- deleteFilePermission %>;
  467. </script>
  468. <% if(!inspection.readOnly) { %>
  469. <script>
  470. const accountList = JSON.parse(unescape('<%- escape(JSON.stringify(accountList)) %>'));
  471. const accountGroup = JSON.parse(unescape('<%- escape(JSON.stringify(accountGroup)) %>'));
  472. const shenpi_status = <%- ctx.tender.info.shenpi.inspection %>;
  473. const shenpiConst = JSON.parse('<%- JSON.stringify(shenpiConst) %>');
  474. </script>
  475. <% } else if (inspection.shenpiPower) { %>
  476. <script>
  477. const accountList = JSON.parse(unescape('<%- escape(JSON.stringify(accountList)) %>'));
  478. const accountGroup = JSON.parse(unescape('<%- escape(JSON.stringify(accountGroup)) %>'));
  479. </script>
  480. <% } %>