audit_modal.ejs 68 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804
  1. <% if ((ctx.material.status === auditConst.status.uncheck || ctx.material.status === auditConst.status.checkNo) && ctx.session.sessionUser.accountId === ctx.material.user_id) { %>
  2. <!--上报审批-->
  3. <div class="modal fade" id="sub-sp" data-backdrop="static">
  4. <div class="modal-dialog" role="document">
  5. <div class="modal-content">
  6. <div class="modal-header">
  7. <h5 class="modal-title">上报审批</h5>
  8. </div>
  9. <div class="modal-body">
  10. <div class="form-group">
  11. <label>选择审批人</label>
  12. <div class="input-group">
  13. <div class="input-group-prepend">
  14. <select class="form-control form-control-sm" id="account_group">
  15. <option value="0">所有分组</option>
  16. <% for (const dw in accountGroup) { %>
  17. <option value="<%= dw %>"><%= accountGroup[dw] %></option>
  18. <% } %>
  19. </select>
  20. </div>
  21. <select class="form-control form-control-sm" id="account_list">
  22. <option value="0">选择审批人</option>
  23. <% for (const account of accountList) { %>
  24. <option value="<%= account.id %>"><%= account.name %><% if (account.role !== '') { %>(<%= account.role %>)<% } %><% if (account.company !== '') { %> -<%= account.company %><% } %></option>
  25. <% } %>
  26. </select>
  27. </div>
  28. </div>
  29. <div class="card mt-3">
  30. <div class="card-header">
  31. 审批流程
  32. </div>
  33. <div class="modal-height-500" style="overflow: auto">
  34. <ul class="list-group list-group-flush" id="auditors">
  35. <% for (let i = 0, iLen = ctx.material.auditorList.length; i < iLen; i++) { %>
  36. <li class="list-group-item" auditorId="<%- ctx.material.auditorList[i].aid %>">
  37. <a href="javascript: void(0)" class="text-danger pull-right">移除</a>
  38. <%- ctx.material.auditorList[i].order %> <%- ctx.material.auditorList[i].name %>
  39. <small class="text-muted"><%- ctx.material.auditorList[i].role %></small>
  40. </li>
  41. <% } %>
  42. </ul>
  43. </div>
  44. </div>
  45. </div>
  46. <form class="modal-footer" method="post" action="<%- preUrl %>/audit/start" onsubmit="return checkAuditorFrom()">
  47. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  48. <input type="hidden" name="_csrf" value="<%= ctx.csrf %>">
  49. <button class="btn btn-primary btn-sm" type="submit">确认上报</button>
  50. </form>
  51. </div>
  52. </div>
  53. </div>
  54. <% } %>
  55. <% if (ctx.material.status === auditConst.status.checking) { %>
  56. <% if (ctx.material.curAuditor && ctx.material.curAuditor.aid === ctx.session.sessionUser.accountId) { %>
  57. <!--审批通过-->
  58. <div class="modal fade" id="sp-done" data-backdrop="static">
  59. <div class="modal-dialog modal-lg" role="document">
  60. <form class="modal-content" action="<%- preUrl %>/audit/check" method="post" onsubmit="return auditCheck(0);">
  61. <div class="modal-header">
  62. <h5 class="modal-title">审批通过</h5>
  63. </div>
  64. <div class="modal-body">
  65. <div class="row">
  66. <div class="col-4">
  67. <div class="card mt-3">
  68. <ul class="list-group list-group-flush">
  69. <li class="list-group-item">
  70. <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
  71. </li>
  72. <% for (let i = 0; i < ctx.material.auditors2.length; i++) { %>
  73. <li class="list-group-item">
  74. <% if (i < ctx.material.auditors2.length - 1) { %>
  75. <i class="fa fa-chevron-circle-down"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[i].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(i+1) %>审</span>
  76. <% } else { %>
  77. <i class="fa fa fa-stop-circle"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[i].role %></small><span class="pull-right">终审</span>
  78. <% } %>
  79. </li>
  80. <% } %>
  81. </ul>
  82. </div>
  83. </div>
  84. <div class="col-8 modal-height-500" style="overflow: auto">
  85. <% for (const ah of ctx.material.auditHistory) { %>
  86. <div class="card mt-3">
  87. <ul class="list-group list-group-flush">
  88. <% for (let iA = 0; iA < ah.length; iA++) { %>
  89. <% if (iA === 0) { %>
  90. <li class="list-group-item">
  91. <h5 class="card-title">
  92. <i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
  93. </h5>
  94. <div class="ml-3">
  95. <span class="text-success"><small><%- ctx.helper.formatFullDate(ah[iA].begin_time) %></small> <% if (ctx.material.auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
  96. </div>
  97. </li>
  98. <li class="list-group-item">
  99. <h5 class="card-title">
  100. <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
  101. </h5>
  102. <div class="ml-3">
  103. <% if (ah[iA].status !== auditConst.status.uncheck) { %>
  104. <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  105. <% } %>
  106. <p class="card-text"><%- ah[iA].opinion %></p>
  107. </div>
  108. </li>
  109. <% } else if (iA === ah.length - 1) { %>
  110. <li class="list-group-item">
  111. <h5 class="card-title">
  112. <i class="fa fa-stop-circle <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right">终审</span>
  113. </h5>
  114. <div class="ml-3">
  115. <% if (ah[iA].status !== auditConst.status.uncheck) { %>
  116. <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  117. <% } %>
  118. <p class="card-text"><%- ah[iA].opinion %></p>
  119. </div>
  120. </li>
  121. <% } else { %>
  122. <li class="list-group-item">
  123. <h5 class="card-title">
  124. <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
  125. </h5>
  126. <div class="ml-3">
  127. <% if (ah[iA].status !== auditConst.status.uncheck) { %>
  128. <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  129. <% } %>
  130. <p class="card-text"><%- ah[iA].opinion %></p>
  131. </div>
  132. </li>
  133. <% } %>
  134. <% } %>
  135. </ul>
  136. </div>
  137. <% } %>
  138. <div class="card mt-3">
  139. <ul class="list-group list-group-flush">
  140. <li class="list-group-item">
  141. <h5 class="card-title">
  142. <i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
  143. </h5>
  144. <div class="ml-3">
  145. <span class="text-success"><small><%- ctx.helper.formatFullDate(ctx.material.auditors[0].begin_time) %></small> 上报</span>
  146. </div>
  147. </li>
  148. <% for (let iA = 0; iA < ctx.material.auditors.length; iA++) { %>
  149. <% const auditors = ctx.material.auditors; %>
  150. <li class="list-group-item">
  151. <% if (auditors[iA].status === auditConst.status.checked) { %>
  152. <h5 class="card-title">
  153. <i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down text-success' : 'fa fa-stop-circle text-success') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%= auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
  154. </h5>
  155. <div class="ml-3">
  156. <span class="text-success"><small><%- ctx.helper.formatFullDate(auditors[iA].end_time) %></small> 审批通过</span>
  157. <p class="card-text"><%- auditors[iA].opinion %></p>
  158. </div>
  159. <% } else if (auditors[iA].stauts == auditConst.status.checking) { %>
  160. <h5 class="card-title">
  161. <i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down' : 'fa fa-stop-circle') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%= auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
  162. </h5>
  163. <div class="ml-3">
  164. <span>审批中</span>
  165. <p class="card-text"><%- auditors[iA].opinion %></p>
  166. </div>
  167. <% } else { %>
  168. <h5 class="card-title">
  169. <i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down' : 'fa fa-stop-circle') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%= auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
  170. </h5>
  171. <div class="ml-3">
  172. <p class="card-text"><%- auditors[iA].opinion %></p>
  173. </div>
  174. <% } %>
  175. <% if (auditors[iA].status === auditConst.status.checked) { %>
  176. <% } else if (auditors[iA].status === auditConst.status.checking) { %>
  177. <div class="form-group">
  178. <label>审批意见<b class="text-danger">*</b></label>
  179. <textarea class="form-control form-control-sm" name="opinion">同意</textarea>
  180. </div>
  181. <% } %>
  182. </li>
  183. <% } %>
  184. </ul>
  185. </div>
  186. </div>
  187. </div>
  188. </div>
  189. <div class="modal-footer">
  190. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  191. <input type="hidden" name="_csrf" value="<%= ctx.csrf %>" />
  192. <input type="hidden" name="checkType" value="<%= auditConst.status.checked %>" />
  193. <button type="submit" class="btn btn-success btn-sm" >确认通过</button>
  194. </div>
  195. </form>
  196. </div>
  197. </div>
  198. <!--审批退回-->
  199. <div class="modal fade" id="sp-back" data-backdrop="static">
  200. <div class="modal-dialog modal-lg" role="document">
  201. <form class="modal-content modal-lg" action="<%- preUrl %>/audit/check" method="post" onsubmit="return auditCheck(1);">
  202. <div class="modal-header">
  203. <h5 class="modal-title">审批退回</h5>
  204. </div>
  205. <div class="modal-body">
  206. <div class="row">
  207. <div class="col-4">
  208. <div class="card mt-3">
  209. <ul class="list-group list-group-flush">
  210. <li class="list-group-item">
  211. <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
  212. </li>
  213. <% for (let i = 0; i < ctx.material.auditors2.length; i++) { %>
  214. <li class="list-group-item">
  215. <% if (i < ctx.material.auditors2.length - 1) { %>
  216. <i class="fa fa-chevron-circle-down"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[i].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(i+1) %>审</span>
  217. <% } else { %>
  218. <i class="fa fa fa-stop-circle"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[i].role %></small><span class="pull-right">终审</span>
  219. <% } %>
  220. </li>
  221. <% } %>
  222. </ul>
  223. </div>
  224. </div>
  225. <div class="col-8 modal-height-500" style="overflow: auto">
  226. <% for (const ah of ctx.material.auditHistory) { %>
  227. <div class="card mt-3">
  228. <ul class="list-group list-group-flush">
  229. <% for (let iA = 0; iA < ah.length; iA++) { %>
  230. <% if (iA === 0) { %>
  231. <li class="list-group-item">
  232. <h5 class="card-title">
  233. <i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
  234. </h5>
  235. <div class="ml-3">
  236. <span class="text-success"><small><%- ctx.helper.formatFullDate(ah[iA].begin_time) %></small> <% if (ctx.material.auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
  237. </div>
  238. </li>
  239. <li class="list-group-item">
  240. <h5 class="card-title">
  241. <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
  242. </h5>
  243. <div class="ml-3">
  244. <% if (ah[iA].status !== auditConst.status.uncheck) { %>
  245. <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  246. <% } %>
  247. <p class="card-text"><%- ah[iA].opinion %></p>
  248. </div>
  249. </li>
  250. <% } else if (iA === ah.length - 1) { %>
  251. <li class="list-group-item">
  252. <h5 class="card-title">
  253. <i class="fa fa-stop-circle <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right">终审</span>
  254. </h5>
  255. <div class="ml-3">
  256. <% if (ah[iA].status !== auditConst.status.uncheck) { %>
  257. <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  258. <% } %>
  259. <p class="card-text"><%- ah[iA].opinion %></p>
  260. </div>
  261. </li>
  262. <% } else { %>
  263. <li class="list-group-item">
  264. <h5 class="card-title">
  265. <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
  266. </h5>
  267. <div class="ml-3">
  268. <% if (ah[iA].status !== auditConst.status.uncheck) { %>
  269. <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  270. <% } %>
  271. <p class="card-text"><%- ah[iA].opinion %></p>
  272. </div>
  273. </li>
  274. <% } %>
  275. <% } %>
  276. </ul>
  277. </div>
  278. <% } %>
  279. <div class="card mt-3">
  280. <ul class="list-group list-group-flush">
  281. <li class="list-group-item">
  282. <h5 class="card-title">
  283. <i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
  284. </h5>
  285. <div class="ml-3">
  286. <span class="text-success"><small><%- ctx.helper.formatFullDate(ctx.material.auditors[0].begin_time) %></small> 上报</span>
  287. </div>
  288. </li>
  289. <% for (let iA = 0; iA < ctx.material.auditors.length; iA++) { %>
  290. <% const auditors = ctx.material.auditors; %>
  291. <li class="list-group-item">
  292. <% if (auditors[iA].status === auditConst.status.checked) { %>
  293. <h5 class="card-title">
  294. <i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down text-success' : 'fa fa-stop-circle text-success') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%= auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
  295. </h5>
  296. <div class="ml-3">
  297. <span class="text-success"><small><%- ctx.helper.formatFullDate(auditors[iA].end_time) %></small> 审批通过</span>
  298. <p class="card-text"><%- auditors[iA].opinion %></p>
  299. </div>
  300. <% } else if (auditors[iA].stauts == auditConst.status.checking) { %>
  301. <h5 class="card-title">
  302. <i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down' : 'fa fa-stop-circle') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%= auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
  303. </h5>
  304. <div class="ml-3">
  305. <span>审批中</span>
  306. <p class="card-text"><%- auditors[iA].opinion %></p>
  307. </div>
  308. <% } else { %>
  309. <h5 class="card-title">
  310. <i class="<%- (iA < auditors.length - 1 ? 'fa fa-chevron-circle-down' : 'fa fa-stop-circle') %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%= auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
  311. </h5>
  312. <div class="ml-3">
  313. <p class="card-text"><%- auditors[iA].opinion %></p>
  314. </div>
  315. <% } %>
  316. <% if (auditors[iA].status === auditConst.status.checked) { %>
  317. <% } else if (auditors[iA].status === auditConst.status.checking) { %>
  318. <div class="form-group">
  319. <label>审批意见<b class="text-danger">*</b></label>
  320. <textarea class="form-control form-control-sm" name="opinion">不同意</textarea>
  321. </div>
  322. <div class="alert alert-warning">
  323. <div class="form-check form-check-inline">
  324. <input class="form-check-input" type="radio" name="checkType" id="inlineRadio1" value="<%- auditConst.status.checkNo %>" <% if (auditors[iA].order === 1 || auditors[iA].aid === auditors[0].aid) { %>checked<% } %>>
  325. <label class="form-check-label" for="inlineRadio1">退回原报 <%- ctx.material.user.name %></label>
  326. </div>
  327. <% if (auditors[iA].order > 1 && auditors[iA].aid !== auditors[0].aid) { %>
  328. <% const auditorIndex = ctx.material.auditors.findIndex(function (item) { return item.aid === auditors[iA].aid }) %>
  329. <div class="form-check form-check-inline">
  330. <input class="form-check-input" type="radio" name="checkType" id="inlineRadio2" value="<%- auditConst.status.checkNoPre %>" checked>
  331. <label class="form-check-label" for="inlineRadio2">退回上一审批人 <%- ctx.material.auditors[auditorIndex-1].name %></label>
  332. </div>
  333. <% } %>
  334. </div>
  335. <% } %>
  336. </li>
  337. <% } %>
  338. </ul>
  339. </div>
  340. </div>
  341. </div>
  342. </div>
  343. <div class="modal-footer">
  344. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  345. <input type="hidden" name="_csrf" value="<%= ctx.csrf %>" />
  346. <button type="submit" class="btn btn-warning btn-sm" >确认退回</button>
  347. </div>
  348. </form>
  349. </div>
  350. </div>
  351. <% } else { %>
  352. <!--审批流程/结果-->
  353. <div class="modal fade" id="sp-list" data-backdrop="static">
  354. <div class="modal-dialog modal-lg" role="document">
  355. <div class="modal-content">
  356. <div class="modal-header">
  357. <h5 class="modal-title">审批流程</h5>
  358. </div>
  359. <div class="modal-body">
  360. <div class="row">
  361. <div class="col-4">
  362. <div class="card mt-3">
  363. <ul class="list-group list-group-flush">
  364. <li class="list-group-item">
  365. <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
  366. </li>
  367. <% for (let i = 0; i < ctx.material.auditors2.length; i++) { %>
  368. <li class="list-group-item">
  369. <% if (i < ctx.material.auditors2.length - 1) { %>
  370. <i class="fa fa-chevron-circle-down"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[i].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(i+1) %>审</span>
  371. <% } else { %>
  372. <i class="fa fa fa-stop-circle"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[i].role %></small><span class="pull-right">终审</span>
  373. <% } %>
  374. </li>
  375. <% } %>
  376. </ul>
  377. </div>
  378. </div>
  379. <div class="col-8 modal-height-500" style="overflow: auto">
  380. <% for (const ah of ctx.material.auditHistory) { %>
  381. <div class="card mt-3">
  382. <ul class="list-group list-group-flush">
  383. <% for (let iA = 0; iA < ah.length; iA++) { %>
  384. <% if (iA === 0) { %>
  385. <li class="list-group-item">
  386. <h5 class="card-title">
  387. <i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
  388. </h5>
  389. <div class="ml-3">
  390. <span class="text-success"><small><%- ctx.helper.formatFullDate(ah[iA].begin_time) %></small> <% if (ctx.material.auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
  391. </div>
  392. </li>
  393. <li class="list-group-item">
  394. <h5 class="card-title">
  395. <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
  396. </h5>
  397. <div class="ml-3">
  398. <% if (ah[iA].status !== auditConst.status.uncheck) { %>
  399. <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  400. <% } %>
  401. <p class="card-text"><%- ah[iA].opinion %></p>
  402. </div>
  403. </li>
  404. <% } else if (iA === ah.length - 1) { %>
  405. <li class="list-group-item">
  406. <h5 class="card-title">
  407. <i class="fa fa-stop-circle <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right">终审</span>
  408. </h5>
  409. <div class="ml-3">
  410. <% if (ah[iA].status !== auditConst.status.uncheck) { %>
  411. <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  412. <% } %>
  413. <p class="card-text"><%- ah[iA].opinion %></p>
  414. </div>
  415. </li>
  416. <% } else { %>
  417. <li class="list-group-item">
  418. <h5 class="card-title">
  419. <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
  420. </h5>
  421. <div class="ml-3">
  422. <% if (ah[iA].status !== auditConst.status.uncheck) { %>
  423. <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  424. <% } %>
  425. <p class="card-text"><%- ah[iA].opinion %></p>
  426. </div>
  427. </li>
  428. <% } %>
  429. <% } %>
  430. </ul>
  431. </div>
  432. <% } %>
  433. <% if (ctx.material.status === auditConst.status.checking) {%>
  434. <div class="card mt-3">
  435. <ul class="list-group list-group-flush">
  436. <% const auditors = ctx.material.auditors; %>
  437. <% for (let iA = 0; iA < auditors.length; iA++) { %>
  438. <% if (iA === 0) { %>
  439. <li class="list-group-item">
  440. <h5 class="card-title">
  441. <i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
  442. </h5>
  443. <div class="ml-3">
  444. <span class="text-success"><small><%- auditors[iA].begin_time.toLocaleDateString() %></small> <% if (ctx.material.times > 1) { %>重新<% } %>上报</span>
  445. </div>
  446. </li>
  447. <li class="list-group-item">
  448. <h5 class="card-title">
  449. <i class="fa <%if (iA === auditors.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[auditors[iA].status] %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%- auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
  450. </h5>
  451. <div class="ml-3">
  452. <% if (auditors[iA].status !== auditConst.status.uncheck) { %>
  453. <span class="<%- auditConst.statusClass[auditors[iA].status] %>"><% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(auditors[iA].end_time) %></small> <% } %><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  454. <% } %>
  455. <p class="card-text"><%- auditors[iA].opinion %></p>
  456. </div>
  457. </li>
  458. <% } else if (iA === auditors.length - 1) { %>
  459. <li class="list-group-item">
  460. <h5 class="card-title">
  461. <i class="fa fa-stop-circle <%- auditConst.statusClass[auditors[iA].status] %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right">终审</span>
  462. </h5>
  463. <div class="ml-3">
  464. <% if (auditors[iA].status !== auditConst.status.uncheck) { %>
  465. <span class="<%- auditConst.statusClass[auditors[iA].status] %>"><% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(auditors[iA].end_time) %></small> <% } %><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  466. <% } %>
  467. <p class="card-text"><%- auditors[iA].opinion %></p>
  468. </div>
  469. </li>
  470. <% } else { %>
  471. <li class="list-group-item">
  472. <h5 class="card-title">
  473. <i class="fa <%if (iA === auditors.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[auditors[iA].status] %>"></i> <%- auditors[iA].name %> <small class="text-muted"><%- auditors[iA].role %></small><span class="pull-right"><%- auditors[iA].sort === auditors[iA].max_sort ? '终' : ctx.helper.transFormToChinese(auditors[iA].sort) %>审</span>
  474. </h5>
  475. <div class="ml-3">
  476. <% if (auditors[iA].status !== auditConst.status.uncheck) { %>
  477. <span class="<%- auditConst.statusClass[auditors[iA].status] %>"><% if (auditors[iA].status === auditConst.status.checked || auditors[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(auditors[iA].end_time) %></small> <% } %><%- auditConst.statusString[auditors[iA].status]%><% if (auditors[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  478. <% } %>
  479. <p class="card-text"><%- auditors[iA].opinion %></p>
  480. </div>
  481. </li>
  482. <% } %>
  483. <% } %>
  484. </ul>
  485. </div>
  486. <% } %>
  487. </div>
  488. </div>
  489. </div>
  490. <div class="modal-footer">
  491. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  492. </div>
  493. </div>
  494. </div>
  495. </div>
  496. <% } %>
  497. <% } else if (ctx.material.status === auditConst.status.checked) { %>
  498. <!--审批流程/结果-->
  499. <div class="modal fade" id="sp-list" data-backdrop="static">
  500. <div class="modal-dialog modal-lg" role="document">
  501. <div class="modal-content">
  502. <div class="modal-header">
  503. <h5 class="modal-title">审批流程</h5>
  504. </div>
  505. <div class="modal-body">
  506. <div class="row">
  507. <div class="col-4">
  508. <div class="card mt-3">
  509. <ul class="list-group list-group-flush">
  510. <li class="list-group-item">
  511. <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
  512. </li>
  513. <% for (let i = 0; i < ctx.material.auditors2.length; i++) { %>
  514. <li class="list-group-item">
  515. <% if (i < ctx.material.auditors2.length - 1) { %>
  516. <i class="fa fa-chevron-circle-down"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[i].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(i+1) %>审</span>
  517. <% } else { %>
  518. <i class="fa fa fa-stop-circle"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[i].role %></small><span class="pull-right">终审</span>
  519. <% } %>
  520. </li>
  521. <% } %>
  522. </ul>
  523. </div>
  524. </div>
  525. <div class="col-8 modal-height-500" style="overflow: auto">
  526. <% for (const ah of ctx.material.auditHistory) { %>
  527. <div class="card mt-3">
  528. <ul class="list-group list-group-flush">
  529. <% for (let iA = 0; iA < ah.length; iA++) { %>
  530. <% if (iA === 0) { %>
  531. <li class="list-group-item">
  532. <h5 class="card-title">
  533. <i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
  534. </h5>
  535. <div class="ml-3">
  536. <span class="text-success"><small><%- ctx.helper.formatFullDate(ah[iA].begin_time) %></small> <% if (ctx.material.auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
  537. </div>
  538. </li>
  539. <li class="list-group-item">
  540. <h5 class="card-title">
  541. <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
  542. </h5>
  543. <div class="ml-3">
  544. <% if (ah[iA].status !== auditConst.status.uncheck) { %>
  545. <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  546. <% } %>
  547. <p class="card-text"><%- ah[iA].opinion %></p>
  548. </div>
  549. </li>
  550. <% } else if (iA === ah.length - 1) { %>
  551. <li class="list-group-item">
  552. <h5 class="card-title">
  553. <i class="fa fa-stop-circle <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right">终审</span>
  554. </h5>
  555. <div class="ml-3">
  556. <% if (ah[iA].status !== auditConst.status.uncheck) { %>
  557. <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  558. <% } %>
  559. <p class="card-text"><%- ah[iA].opinion %></p>
  560. </div>
  561. </li>
  562. <% } else { %>
  563. <li class="list-group-item">
  564. <h5 class="card-title">
  565. <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
  566. </h5>
  567. <div class="ml-3">
  568. <% if (ah[iA].status !== auditConst.status.uncheck) { %>
  569. <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  570. <% } %>
  571. <p class="card-text"><%- ah[iA].opinion %></p>
  572. </div>
  573. </li>
  574. <% } %>
  575. <% } %>
  576. </ul>
  577. </div>
  578. <% } %>
  579. </div>
  580. </div>
  581. </div>
  582. <div class="modal-footer">
  583. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  584. </div>
  585. </div>
  586. </div>
  587. </div>
  588. <% } else if (ctx.material.status === auditConst.status.checkNo) { %>
  589. <!--审批流程/结果-->
  590. <div class="modal fade" id="sp-list" data-backdrop="static">
  591. <div class="modal-dialog modal-lg" role="document">
  592. <div class="modal-content">
  593. <div class="modal-header">
  594. <h5 class="modal-title">审批流程</h5>
  595. </div>
  596. <div class="modal-body">
  597. <div class="row">
  598. <div class="col-4">
  599. <div class="card mt-3">
  600. <ul class="list-group list-group-flush">
  601. <li class="list-group-item">
  602. <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
  603. </li>
  604. <% for (let i = 0; i < ctx.material.auditors2.length; i++) { %>
  605. <li class="list-group-item">
  606. <% if (i < ctx.material.auditors2.length - 1) { %>
  607. <i class="fa fa-chevron-circle-down"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[i].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(i+1) %>审</span>
  608. <% } else { %>
  609. <i class="fa fa fa-stop-circle"></i> <%- ctx.material.auditors2[i].name %> <small class="text-muted"><%- ctx.material.auditors2[i].role %></small><span class="pull-right">终审</span>
  610. <% } %>
  611. </li>
  612. <% } %>
  613. </ul>
  614. </div>
  615. </div>
  616. <div class="col-8 modal-height-500" style="overflow: auto">
  617. <% for (const ah of ctx.material.auditHistory) { %>
  618. <div class="card mt-3">
  619. <ul class="list-group list-group-flush">
  620. <% for (let iA = 0; iA < ah.length; iA++) { %>
  621. <% if (iA === 0) { %>
  622. <li class="list-group-item">
  623. <h5 class="card-title">
  624. <i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
  625. </h5>
  626. <div class="ml-3">
  627. <span class="text-success"><small><%- ctx.helper.formatFullDate(ah[iA].begin_time) %></small> <% if (ctx.material.auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
  628. </div>
  629. </li>
  630. <li class="list-group-item">
  631. <h5 class="card-title">
  632. <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
  633. </h5>
  634. <div class="ml-3">
  635. <% if (ah[iA].status !== auditConst.status.uncheck) { %>
  636. <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  637. <% } %>
  638. <p class="card-text"><%- ah[iA].opinion %></p>
  639. </div>
  640. </li>
  641. <% } else if (iA === ah.length - 1) { %>
  642. <li class="list-group-item">
  643. <h5 class="card-title">
  644. <i class="fa fa-stop-circle <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right">终审</span>
  645. </h5>
  646. <div class="ml-3">
  647. <% if (ah[iA].status !== auditConst.status.uncheck) { %>
  648. <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  649. <% } %>
  650. <p class="card-text"><%- ah[iA].opinion %></p>
  651. </div>
  652. </li>
  653. <% } else { %>
  654. <li class="list-group-item">
  655. <h5 class="card-title">
  656. <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
  657. </h5>
  658. <div class="ml-3">
  659. <% if (ah[iA].status !== auditConst.status.uncheck) { %>
  660. <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  661. <% } %>
  662. <p class="card-text"><%- ah[iA].opinion %></p>
  663. </div>
  664. </li>
  665. <% } %>
  666. <% } %>
  667. </ul>
  668. </div>
  669. <% } %>
  670. </div>
  671. </div>
  672. </div>
  673. <div class="modal-footer">
  674. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  675. </div>
  676. </div>
  677. </div>
  678. </div>
  679. <% if (ctx.session.sessionUser.accountId === ctx.material.user_id) { %>
  680. <!--重新上报-->
  681. <div class="modal fade" id="sp-list2" data-backdrop="static">
  682. <div class="modal-dialog modal-lg" role="document">
  683. <div class="modal-content">
  684. <div class="modal-header">
  685. <h5 class="modal-title">重新上报</h5>
  686. </div>
  687. <div class="modal-body">
  688. <div class="row">
  689. <div class="col-4 modal-height-500" style="overflow: auto">
  690. <a href="#sub-sp" data-toggle="modal" data-target="#sub-sp" id="hideSp">修改审批流程</a>
  691. <div class="card mt-3">
  692. <ul class="list-group list-group-flush">
  693. <li class="list-group-item">
  694. <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span>
  695. </li>
  696. </ul>
  697. <ul class="list-group list-group-flush" id="auditors-list">
  698. <% const auditorList = ctx.material.auditorList; %>
  699. <% for (let i = 0; i < auditorList.length; i++) { %>
  700. <li class="list-group-item" data-auditid="<%- auditorList[i].aid %>">
  701. <% if (i < auditorList.length - 1) { %>
  702. <i class="fa fa-chevron-circle-down"></i> <%- auditorList[i].name %> <small class="text-muted"><%- auditorList[i].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(i+1) %>审</span>
  703. <% } else { %>
  704. <i class="fa fa fa-stop-circle"></i> <%- auditorList[i].name %> <small class="text-muted"><%- auditorList[i].role %></small><span class="pull-right">终审</span>
  705. <% } %>
  706. </li>
  707. <% } %>
  708. </ul>
  709. </div>
  710. </div>
  711. <div class="col-8 modal-height-500" style="overflow: auto">
  712. <% for (const ah of ctx.material.auditHistory) { %>
  713. <div class="card mt-3">
  714. <ul class="list-group list-group-flush">
  715. <% for (let iA = 0; iA < ah.length; iA++) { %>
  716. <% if (iA === 0) { %>
  717. <li class="list-group-item">
  718. <h5 class="card-title"><i class="fa fa-play-circle fa-rotate-90 text-success"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span></h5>
  719. <div class="ml-3">
  720. <span class="text-success"><small><%- ctx.helper.formatFullDate(ah[iA].begin_time) %></small> <% if (ctx.material.auditHistory.indexOf(ah) > 0) { %>重新<% } %>上报</span>
  721. <p class="card-text"></p>
  722. </div>
  723. </li>
  724. <li class="list-group-item">
  725. <h5 class="card-title">
  726. <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
  727. </h5>
  728. <div class="ml-3">
  729. <% if (ah[iA].status !== auditConst.status.uncheck) { %>
  730. <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  731. <% } %>
  732. <p class="card-text"><%- ah[iA].opinion %></p>
  733. </div>
  734. </li>
  735. <% } else if (iA === ah.length - 1) { %>
  736. <li class="list-group-item">
  737. <h5 class="card-title"><i class="fa fa-stop-circle <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right">终审</span></h5>
  738. <div class="ml-3">
  739. <% if (ah[iA].status !== auditConst.status.uncheck) { %>
  740. <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  741. <% } %>
  742. <p class="card-text"><%- ah[iA].opinion %></p>
  743. </div>
  744. </li>
  745. <% } else { %>
  746. <li class="list-group-item">
  747. <h5 class="card-title">
  748. <i class="fa <%if (iA === ah.length - 1) { %>fa-stop-circle<% } else { %>fa-chevron-circle-down<% } %> <%- auditConst.statusClass[ah[iA].status] %>"></i> <%- ah[iA].name %> <small class="text-muted"><%- ah[iA].role %></small><span class="pull-right"><%= ah[iA].sort === ah[iA].max_sort ? '终' : ctx.helper.transFormToChinese(ah[iA].sort) %>审</span>
  749. </h5>
  750. <div class="ml-3">
  751. <% if (ah[iA].status !== auditConst.status.uncheck) { %>
  752. <span class="<%- auditConst.statusClass[ah[iA].status] %>"><% if (ah[iA].status === auditConst.status.checked || ah[iA].status === auditConst.status.checkNo) { %><small><%- ctx.helper.formatFullDate(ah[iA].end_time) %></small> <% } %><%- auditConst.statusString[ah[iA].status]%><% if (ah[iA].status === auditConst.status.checkNo) { %> <%- ctx.material.user.name %><% } %></span>
  753. <% } %>
  754. <p class="card-text"><%- ah[iA].opinion %></p>
  755. </div>
  756. </li>
  757. <% } %>
  758. <% } %>
  759. </ul>
  760. </div>
  761. <% } %>
  762. <% if (ctx.material.status === auditConst.status.checkNo) {%>
  763. <div class="card mt-3">
  764. <ul class="list-group list-group-flush">
  765. <li class="list-group-item">
  766. <h5 class="card-title"><i class="fa fa-play-circle fa-rotate-90"></i> <%- ctx.material.user.name %> <small class="text-muted"><%- ctx.material.user.role %></small><span class="pull-right">原报</span></h5>
  767. <div class="ml-3">
  768. <span>重新上报中</span>
  769. <p class="card-text"><small class="text-muted"></small></p>
  770. </div>
  771. </li>
  772. </ul>
  773. <ul class="list-group list-group-flush" id="auditors-list2">
  774. <% const auditorList = ctx.material.auditorList; %>
  775. <% for (let iA = 0; iA < auditorList.length; iA++) { %>
  776. <% if (iA === auditorList.length - 1) { %>
  777. <li class="list-group-item" data-auditid="<%- auditorList[iA].aid %>">
  778. <h5 class="card-title"><i class="fa fa-stop-circle"></i> <%- auditorList[iA].name %> <small class="text-muted"><%- auditorList[iA].role %></small><span class="pull-right">终审</span></h5>
  779. </li>
  780. <% } else { %>
  781. <li class="list-group-item" data-auditid="<%- auditorList[iA].aid %>">
  782. <h5 class="card-title">
  783. <i class="fa fa-chevron-circle-down"></i> <%- auditorList[iA].name %> <small class="text-muted"><%- auditorList[iA].role %></small><span class="pull-right"><%= ctx.helper.transFormToChinese(iA+1) %>审</span>
  784. </h5>
  785. </li>
  786. <% } %>
  787. <% } %>
  788. </ul>
  789. </div>
  790. <% } %>
  791. </div>
  792. </div>
  793. </div>
  794. <form class="modal-footer" method="post" action="<%- preUrl %>/audit/start" onsubmit="return checkAuditorFrom()">
  795. <input type="hidden" name="_csrf" value="<%= ctx.csrf %>">
  796. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  797. <button class="btn btn-primary btn-sm" type="submit">确认上报</button>
  798. </form>
  799. </div>
  800. </div>
  801. </div>
  802. <% } %>
  803. <% } %>