audit_modal.ejs 66 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898
  1. <% if (ctx.phasePay && (ctx.phasePay.audit_status === auditConst.status.uncheck || ctx.phasePay.audit_status === auditConst.status.checkNo) && ctx.session.sessionUser.accountId === ctx.phasePay.create_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="dropdown text-right">
  11. <% if (ctx.tender.info.shenpi.phasePay !== shenpiConst.sp_status.gdspl && ctx.session.sessionUser.accountId === ctx.phasePay.create_user_id) { %>
  12. <button class="btn btn-outline-primary btn-sm dropdown-toggle" type="button" id="dropdownMenuButton"
  13. data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  14. 添加审批流程
  15. </button>
  16. <div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton" style="width:220px">
  17. <div class="mb-2 p-2"><input class="form-control form-control-sm" placeholder="姓名/手机 检索"
  18. id="gr-search" autocomplete="off"></div>
  19. <dl class="list-unstyled book-list" id="book-list">
  20. <% accountGroup.forEach((group, idx) => { %>
  21. <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>"
  22. data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
  23. <div class="dd-content" data-toggleid="<%- idx %>">
  24. <% group.groupList.forEach(item => { %>
  25. <% if (item.id !== ctx.session.sessionUser.accountId) { %>
  26. <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>">
  27. <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
  28. class="ml-auto"><%- item.mobile %></span></p>
  29. <span class="text-muted"><%- item.role %></span>
  30. </dd>
  31. <% } %>
  32. <% });%>
  33. </div>
  34. <% }) %>
  35. </dl>
  36. </div>
  37. <% } %>
  38. </div>
  39. <div class="card mt-3">
  40. <div class="card-header">
  41. 审批流程
  42. </div>
  43. <div class="modal-height-500" style="overflow: auto">
  44. <ul class="list-group list-group-flush" id="auditors">
  45. <% for (let i = 0, iLen = ctx.phasePay.auditorGroups.length; i < iLen; i++) { %>
  46. <% if (ctx.phasePay.auditorGroups[i][0].audit_order === 0) continue; %>
  47. <li class="list-group-item d-flex" auditorId="<%- ctx.phasePay.auditorGroups[i][0].audit_id %>">
  48. <div class="col-auto"><%- ctx.phasePay.auditorGroups[i][0].audit_order %></div>
  49. <div class="col">
  50. <% for (const auditor of ctx.phasePay.auditorGroups[i]) { %>
  51. <div class="d-inline-block mx-1" auditorId="<%- auditor.audit_id %>">
  52. <i class="fa fa-user text-muted"></i> <%- auditor.name %> <small class="text-muted"><%- auditor.role %></small>
  53. </div>
  54. <% } %>
  55. </div>
  56. <div class="col-auto">
  57. <% if (ctx.phasePay.auditorGroups[i][0].audit_type !== auditType.key.common) { %>
  58. <span class="badge badge-pill badge-<%- auditType.info[ctx.phasePay.auditorGroups[i][0].audit_type].class %> badge-bg-small"><small><%- auditType.info[ctx.phasePay.auditorGroups[i][0].audit_type].long%></small></span>
  59. <% } %>
  60. <% if ((ctx.tender.info.shenpi.phasePay === shenpiConst.sp_status.sqspr ||
  61. (ctx.tender.info.shenpi.phasePay === shenpiConst.sp_status.gdzs && i+1 !== iLen)) && ctx.session.sessionUser.accountId === ctx.phasePay.create_user_id && !ctx.tender.isTourist) { %>
  62. <a href="javascript: void(0)" class="text-danger pull-right">移除</a>
  63. <% } %>
  64. </div>
  65. </li>
  66. <% } %>
  67. </ul>
  68. </div>
  69. </div>
  70. </div>
  71. <form class="modal-footer" method="post" action="audit/start" name="phase-start">
  72. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  73. <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>">
  74. <% if (ctx.session.sessionUser.accountId === ctx.phasePay.create_user_id) { %>
  75. <button class="btn btn-primary btn-sm" type="submit">确认上报</button>
  76. <% } %>
  77. </form>
  78. </div>
  79. </div>
  80. </div>
  81. <% } %>
  82. <% if(ctx.phasePay && (ctx.phasePay.audit_status !== auditConst.status.uncheck)) { %>
  83. <!--审批流程/结果-->
  84. <div class="modal fade" id="sp-list" data-backdrop="static">
  85. <div class="modal-dialog modal-lg" role="document">
  86. <div class="modal-content">
  87. <div class="modal-header">
  88. <h5 class="modal-title">审批流程</h5>
  89. </div>
  90. <div class="modal-body">
  91. <div class="row">
  92. <div class="col-4">
  93. <% if(ctx.phasePay.audit_status === auditConst.status.checkNo && ctx.session.sessionUser.accountId === ctx.phasePay.create_user_id) { %>
  94. <a class="sp-list-item" href="#sub-sp" data-toggle="modal" data-target="#sub-sp"
  95. id="hideSp">修改审批流程</a>
  96. <% } else if(ctx.phasePay.audit_status !== auditConst.status.checked && ctx.session.sessionUser.is_admin) { %>
  97. <a class="sp-list-item" href="#sub-sp2" data-toggle="modal" data-target="#sub-sp2"
  98. id="hideSp" style="display: none;">修改审批流程</a>
  99. <% } %>
  100. <div class="card modal-height-500 mt-3" style="overflow: auto">
  101. <ul class="list-group list-group-flush auditors-list" id="auditors-list">
  102. <% ctx.phasePay.userGroups.forEach((item, idx) => { %>
  103. <% if (idx === 0) { %>
  104. <li class="list-group-item d-flex justify-content-between align-items-center">
  105. <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
  106. <span class="text-muted">
  107. <% for (const u of item) { %>
  108. <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.audit_id %>"><%- u.name %></small>
  109. <% } %>
  110. </span>
  111. <span class="badge badge-light badge-pill ml-auto"><small>原报</small></span>
  112. </li>
  113. <% } else if(idx === ctx.phasePay.userGroups.length -1 && idx !== 0) { %>
  114. <li class="list-group-item d-flex justify-content-between align-items-center">
  115. <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
  116. <span class="text-muted">
  117. <% for (const u of item) { %>
  118. <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.audit_id %>"><%- u.name %></small>
  119. <% } %>
  120. </span>
  121. <div class="d-flex ml-auto">
  122. <% if (item[0].audit_type !== auditType.key.common) { %>
  123. <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>
  124. <% } %>
  125. <span class="badge badge-light badge-pill"><small>终审</small></span>
  126. </div>
  127. </li>
  128. <% } else {%>
  129. <li class="list-group-item d-flex justify-content-between align-items-center">
  130. <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
  131. <span class="text-muted">
  132. <% for (const u of item) { %>
  133. <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.audit_id %>"><%- u.name %></small>
  134. <% } %>
  135. </span>
  136. <div class="d-flex ml-auto">
  137. <% if (item[0].audit_type !== auditType.key.common) { %>
  138. <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>
  139. <% } %>
  140. <span class="badge badge-light badge-pill"><small><%= ctx.helper.transFormToChinese(idx) %>审</small></span>
  141. </div>
  142. </li>
  143. <% } %>
  144. <% }) %>
  145. </ul>
  146. </div>
  147. </div>
  148. <div class="col-8 modal-height-500" style="overflow: auto">
  149. <% ctx.phasePay.auditHistory.forEach((his, idx) => { %>
  150. <!-- 展开/收起历史流程 -->
  151. <% if(idx === ctx.phasePay.auditHistory.length - 1 && ctx.phasePay.auditHistory.length !== 1) { %>
  152. <div class="text-right">
  153. <a href="javascript: void(0);" id="fold-btn" data-target="show" >展开历史审批流程</a>
  154. </div>
  155. <% } %>
  156. <div class="<%- idx < ctx.phasePay.auditHistory.length - 1 ? 'fold-card' : '' %>">
  157. <div class="text-center text-muted"><%- idx+1 %>#</div>
  158. <ul class="timeline-list list-unstyled mt-2 <% if (idx === ctx.phasePay.auditHistory.length - 1 && ctx.phasePay.auditHistory.length !== 1) { %>last-auditor-list<% } %>">
  159. <% his.forEach((group, index) => { %>
  160. <li class="timeline-list-item pb-2 <% if (group.audit_status === auditConst.status.uncheck && idx === ctx.phasePay.auditHistory.length - 1 && ctx.phasePay.auditHistory.length !== 1) { %>is_uncheck<% } %>">
  161. <% if (group.auditYear) { %>
  162. <div class="timeline-item-date">
  163. <%- group.auditYear %>
  164. <span><%- group.auditDate %></span>
  165. <span><%- group.auditTime %></span>
  166. </div>
  167. <% } %>
  168. <% if (index < his.length - 1) { %>
  169. <div class="timeline-item-tail"></div>
  170. <% } %>
  171. <% if (group.audit_order === 0) { %>
  172. <div class="timeline-item-icon bg-success text-light"><i class="fa fa-caret-down"></i></div>
  173. <% } else if (group.audit_status === auditConst.status.checked) { %>
  174. <div class="timeline-item-icon bg-success text-light"><i class="fa fa-check"></i></div>
  175. <% } else if (group.audit_status === auditConst.status.checkNo || group.audit_status === auditConst.status.checkNoPre || group.audit_status === auditConst.status.checkCancel) { %>
  176. <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-level-up"></i></div>
  177. <% } else if (group.audit_status === auditConst.status.checking) { %>
  178. <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-ellipsis-h"></i></div>
  179. <% } else { %>
  180. <div class="timeline-item-icon bg-secondary text-light"></div>
  181. <% } %>
  182. <div class="timeline-item-content">
  183. <div class="py-1">
  184. <span class="text-black-50">
  185. <%- group.auditName %>
  186. <% if (group.audit_type !== auditType.key.common) { %><span class="text-<%- auditType.info[group.audit_type].class %> "><%- auditType.info[group.audit_type].long %></span><% } %>
  187. </span>
  188. <% if (group.audit_order === 0) { %>
  189. <span class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
  190. <% } else if (group.audit_status !== auditConst.status.uncheck) { %>
  191. <span class="pull-right <%- auditConst.info[group.audit_status].class %>"><%- auditConst.info[group.audit_status].title %></span>
  192. <% } %>
  193. </div>
  194. <div class="card">
  195. <div class="card-body px-3 py-0">
  196. <% for (const [i, auditor] of group.auditors.entries()) { %>
  197. <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
  198. <div class="col-10">
  199. <span class="h6"><%- auditor.name %></span>
  200. <% if (group.audit_order === 0) { %>
  201. <% if (auditor.role && auditor.role.trim()) { %>
  202. <span class="text-muted ml-1"><%- auditor.role %></span>
  203. <% } %>
  204. <% } else { %>
  205. <span class="text-muted ml-1">
  206. <%- auditor.company %>
  207. <% if (auditor.role && auditor.role.trim()) { %>
  208. - <%- auditor.role %>
  209. <% } %>
  210. </span>
  211. <% } %>
  212. </div>
  213. <div class="col">
  214. <% if (auditor.audit_status === auditConst.status.checked) { %>
  215. <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
  216. <% } if (auditor.audit_status === auditConst.status.checkNo || auditor.audit_status === auditConst.status.checkNoPre || auditor.audit_status === auditConst.status.checkCancel) { %>
  217. <span class="pull-right text-warning"><i class="fa fa-share-square fa-rotate-270"></i></span>
  218. <% } %>
  219. </div>
  220. <% if (auditor.opinion) { %>
  221. <div class="col-12 py-1 bg-light"><i class="fa fa-commenting-o mr-1"></i><%- auditor.opinion%></div>
  222. <% } %>
  223. </div>
  224. <% } %>
  225. </div>
  226. </div>
  227. </div>
  228. </li>
  229. <% }) %>
  230. </ul>
  231. </div>
  232. <% }) %>
  233. </div>
  234. </div>
  235. </div>
  236. <form class="modal-footer" method="post" action="audit/start" name="phase-start">
  237. <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>">
  238. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  239. <% if(ctx.phasePay.audit_status === auditConst.status.checkNo && ctx.session.sessionUser.accountId === ctx.phasePay.create_user_id) { %>
  240. <button class="btn btn-primary btn-sm sp-list-item" type="submit">确认上报</button>
  241. <% } %>
  242. </form>
  243. </div>
  244. </div>
  245. </div>
  246. <% } %>
  247. <% if (ctx.phasePay && (ctx.phasePay.audit_status === auditConst.status.checking || ctx.phasePay.audit_status === auditConst.status.checkNoPre) && ctx.phasePay.curAuditorIds.indexOf(ctx.session.sessionUser.accountId) >= 0) { %>
  248. <!--审批通过-->
  249. <div class="modal fade sp-location-list" id="sp-done" data-backdrop="static">
  250. <div class="modal-dialog modal-lg" role="document">
  251. <form class="modal-content" action="audit/check" method="post" id="audit-check">
  252. <div class="modal-header">
  253. <h5 class="modal-title">审批通过</h5>
  254. </div>
  255. <div class="modal-body">
  256. <div class="row">
  257. <div class="col-4">
  258. <% if(ctx.phasePay.audit_status !== auditConst.status.checked && ctx.session.sessionUser.is_admin) { %>
  259. <a class="sp-list-item" href="#sub-sp2" data-toggle="modal" data-target="#sub-sp2" id="hideSp">修改审批流程</a>
  260. <% } %>
  261. <div class="card modal-height-500 mt-3" style="overflow: auto">
  262. <ul class="list-group list-group-flush auditors-list">
  263. <% ctx.phasePay.userGroups.forEach((item, idx) => { %>
  264. <li class="list-group-item d-flex justify-content-between align-items-center">
  265. <% if (idx === 0) { %>
  266. <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
  267. <% } else if (idx === ctx.phasePay.userGroups.length -1 && idx !== 0) { %>
  268. <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
  269. <% } else { %>
  270. <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
  271. <% } %>
  272. <span class="text-muted">
  273. <% for (const u of item) { %>
  274. <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.audit_id %>"><%- u.name %></small>
  275. <% } %>
  276. </span>
  277. <div class="d-flex ml-auto">
  278. <% if (item[0].audit_type !== auditType.key.common) { %>
  279. <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>
  280. <% } %>
  281. <span class="badge badge-light badge-pill"><small><%- item.auditName %></small></span>
  282. </div>
  283. </li>
  284. <% }) %>
  285. </ul>
  286. </div>
  287. </div>
  288. <div class="col-8 modal-height-500" style="overflow: auto">
  289. <% ctx.phasePay.auditHistory.forEach((his, idx) => { %>
  290. <!-- 展开/收起历史流程 -->
  291. <% if(idx === ctx.phasePay.auditHistory.length - 1 && ctx.phasePay.auditHistory.length !== 1) { %>
  292. <div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a></div>
  293. <% } %>
  294. <div class="<%- idx < ctx.phasePay.auditHistory.length - 1 ? 'fold-card' : '' %>">
  295. <div class="text-center text-muted"><%- idx+1 %>#</div>
  296. <ul class="timeline-list list-unstyled mt-2 <% if (idx === ctx.phasePay.auditHistory.length - 1 && ctx.phasePay.auditHistory.length !== 1) { %>last-auditor-list<% } %>">
  297. <% his.forEach((group, index) => { %>
  298. <li class="timeline-list-item pb-2 <% if (group.audit_status === auditConst.status.uncheck && idx === ctx.phasePay.auditHistory.length - 1 && ctx.phasePay.auditHistory.length !== 1) { %>is_uncheck<% } %>">
  299. <% if (group.auditYear) { %>
  300. <div class="timeline-item-date">
  301. <%- group.auditYear %>
  302. <span><%- group.auditDate %></span>
  303. <span><%- group.auditTime %></span>
  304. </div>
  305. <% } %>
  306. <% if (index < his.length - 1) { %>
  307. <div class="timeline-item-tail"></div>
  308. <% } %>
  309. <% if (group.audit_order === 0) { %>
  310. <div class="timeline-item-icon bg-success text-light"><i class="fa fa-caret-down"></i></div>
  311. <% } else if (group.audit_status === auditConst.status.checked) { %>
  312. <div class="timeline-item-icon bg-success text-light"><i class="fa fa-check"></i></div>
  313. <% } else if (group.audit_status === auditConst.status.checkNo || group.audit_status === auditConst.status.checkNoPre || group.audit_status === auditConst.status.checkCancel) { %>
  314. <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-level-up"></i></div>
  315. <% } else if (group.audit_status === auditConst.status.checking) { %>
  316. <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-ellipsis-h"></i></div>
  317. <% } else { %>
  318. <div class="timeline-item-icon bg-secondary text-light"></div>
  319. <% } %>
  320. <div class="timeline-item-content">
  321. <div class="py-1">
  322. <span class="text-black-50">
  323. <%- group.auditName %>
  324. <% if (group.audit_type !== auditType.key.common) { %><span class="text-<%- auditType.info[group.audit_type].class %> "><%- auditType.info[group.audit_type].long %></span><% } %>
  325. </span>
  326. <% if (group.audit_order === 0) { %>
  327. <span class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
  328. <% } else if (group.audit_status !== auditConst.status.uncheck) { %>
  329. <span class="pull-right <%- auditConst.info[group.audit_status].class %>"><%- auditConst.info[group.audit_status].title %></span>
  330. <% } %>
  331. </div>
  332. <div class="card">
  333. <div class="card-body px-3 py-0">
  334. <% for (const [i, auditor] of group.auditors.entries()) { %>
  335. <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
  336. <div class="col-10">
  337. <span class="h6"><%- auditor.name %></span>
  338. <% if (group.audit_order === 0) { %>
  339. <% if (auditor.role && auditor.role.trim()) { %>
  340. <span class="text-muted ml-1"><%- auditor.role %></span>
  341. <% } %>
  342. <% } else { %>
  343. <span class="text-muted ml-1">
  344. <%- auditor.company %>
  345. <% if (auditor.role && auditor.role.trim()) { %>
  346. - <%- auditor.role %>
  347. <% } %>
  348. </span>
  349. <% } %>
  350. </div>
  351. <div class="col">
  352. <% if (auditor.audit_status === auditConst.status.checked) { %>
  353. <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
  354. <% } if (auditor.audit_status === auditConst.status.checkNo || auditor.audit_status === auditConst.status.checkNoPre || auditor.audit_status === auditConst.status.checkCancel) { %>
  355. <span class="pull-right text-warning"><i class="fa fa-share-square fa-rotate-270"></i></span>
  356. <% } else if (auditor.audit_status === auditConst.status.checking) { %>
  357. <span class="pull-right text-warning"><i class="fa fa-commenting"></i></span>
  358. <% } %>
  359. </div>
  360. <% if (auditor.audit_status !== auditConst.status.uncheck && auditor.opinion) { %>
  361. <div class="col-12 py-1 bg-light"><i class="fa fa-commenting-o mr-1"></i><%- auditor.opinion%></div>
  362. <% } %>
  363. <% if (auditor.audit_status === auditConst.status.checking && auditor.audit_id === ctx.session.sessionUser.accountId) { %>
  364. <div class="col-12 py-1 bg-light">
  365. <textarea class="form-control form-control-sm" name="opinion">同意</textarea>
  366. </div>
  367. <% } %>
  368. </div>
  369. <% } %>
  370. </div>
  371. </div>
  372. </div>
  373. </li>
  374. <% }) %>
  375. </ul>
  376. </div>
  377. <% }) %>
  378. </div>
  379. </div>
  380. </div>
  381. <div class="modal-footer">
  382. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  383. <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
  384. <input type="hidden" name="checkType" value="<%= auditConst.status.checked %>" />
  385. <button type="submit" class="btn btn-success btn-sm">确认通过</button>
  386. </div>
  387. </form>
  388. </div>
  389. </div>
  390. <!--审批退回-->
  391. <div class="modal fade sp-location-list" id="sp-back" data-backdrop="static">
  392. <div class="modal-dialog modal-lg" role="document">
  393. <form class="modal-content modal-lg" action="audit/check" method="post" id="audit-check-no">
  394. <div class="modal-header">
  395. <h5 class="modal-title">审批退回</h5>
  396. </div>
  397. <div class="modal-body">
  398. <div class="row">
  399. <div class="col-4">
  400. <% if(ctx.phasePay.audit_status !== auditConst.status.checked && ctx.session.sessionUser.is_admin) { %>
  401. <a class="sp-list-item" href="#sub-sp2" data-toggle="modal" data-target="#sub-sp2" id="hideSp">修改审批流程</a>
  402. <% } %>
  403. <div class="card modal-height-500 mt-3" style="overflow: auto">
  404. <ul class="list-group list-group-flush auditors-list">
  405. <% ctx.phasePay.userGroups.forEach((item, idx) => { %>
  406. <li class="list-group-item d-flex justify-content-between align-items-center">
  407. <% if (idx === 0) { %>
  408. <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
  409. <% } else if (idx === ctx.phasePay.userGroups.length -1 && idx !== 0) { %>
  410. <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
  411. <% } else { %>
  412. <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
  413. <% } %>
  414. <span class="text-muted">
  415. <% for (const u of item) { %>
  416. <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.audit_id %>"><%- u.name %></small>
  417. <% } %>
  418. </span>
  419. <div class="d-flex ml-auto">
  420. <% if (item[0].audit_type !== auditType.key.common) { %>
  421. <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>
  422. <% } %>
  423. <span class="badge badge-light badge-pill"><small><%- item.auditName %></small></span>
  424. </div>
  425. </li>
  426. <% }) %>
  427. </ul>
  428. </div>
  429. </div>
  430. <div class="col-8 modal-height-500" style="overflow: auto">
  431. <% ctx.phasePay.auditHistory.forEach((his, idx) => { %>
  432. <!-- 展开/收起历史流程 -->
  433. <% if(idx === ctx.phasePay.auditHistory.length - 1 && ctx.phasePay.auditHistory.length !== 1) { %>
  434. <div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show" data-idx="<%- idx + 1 %>">展开历史审批流程</a></div>
  435. <% } %>
  436. <div class="<%- idx < ctx.phasePay.auditHistory.length - 1 ? 'fold-card' : '' %>">
  437. <div class="text-center text-muted"><%- idx+1 %>#</div>
  438. <ul class="timeline-list list-unstyled mt-2 <% if (idx === ctx.phasePay.auditHistory.length - 1 && ctx.phasePay.auditHistory.length !== 1) { %>last-auditor-list<% } %>">
  439. <% his.forEach((group, index) => { %>
  440. <li class="timeline-list-item pb-2 <% if (group.audit_status === auditConst.status.uncheck && idx === ctx.phasePay.auditHistory.length - 1 && ctx.phasePay.auditHistory.length !== 1) { %>is_uncheck<% } %>">
  441. <% if (group.auditYear) { %>
  442. <div class="timeline-item-date">
  443. <%- group.auditYear %>
  444. <span><%- group.auditDate %></span>
  445. <span><%- group.auditTime %></span>
  446. </div>
  447. <% } %>
  448. <% if (index < his.length - 1) { %>
  449. <div class="timeline-item-tail"></div>
  450. <% } %>
  451. <% if (group.audit_order === 0) { %>
  452. <div class="timeline-item-icon bg-success text-light"><i class="fa fa-caret-down"></i></div>
  453. <% } else if (group.audit_status === auditConst.status.checked) { %>
  454. <div class="timeline-item-icon bg-success text-light"><i class="fa fa-check"></i></div>
  455. <% } else if (group.audit_status === auditConst.status.checkNo || group.audit_status === auditConst.status.checkNoPre || group.audit_status === auditConst.status.checkCancel) { %>
  456. <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-level-up"></i></div>
  457. <% } else if (group.audit_status === auditConst.status.checking) { %>
  458. <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-ellipsis-h"></i></div>
  459. <% } else { %>
  460. <div class="timeline-item-icon bg-secondary text-light"></div>
  461. <% } %>
  462. <div class="timeline-item-content">
  463. <div class="py-1">
  464. <span class="text-black-50">
  465. <%- group.auditName %>
  466. <% if (group.audit_type !== auditType.key.common) { %><span class="text-<%- auditType.info[group.audit_type].class %> "><%- auditType.info[group.audit_type].long %></span><% } %>
  467. </span>
  468. <% if (group.audit_order === 0) { %>
  469. <span class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
  470. <% } else if (group.audit_status !== auditConst.status.uncheck) { %>
  471. <span class="pull-right <%- auditConst.info[group.audit_status].class %>"><%- auditConst.info[group.audit_status].title %></span>
  472. <% } %>
  473. </div>
  474. <div class="card">
  475. <div class="card-body px-3 py-0">
  476. <% for (const [i, auditor] of group.auditors.entries()) { %>
  477. <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
  478. <div class="col-10">
  479. <span class="h6"><%- auditor.name %></span>
  480. <% if (group.audit_order === 0) { %>
  481. <% if (auditor.role && auditor.role.trim()) { %>
  482. <span class="text-muted ml-1"><%- auditor.role %></span>
  483. <% } %>
  484. <% } else { %>
  485. <span class="text-muted ml-1">
  486. <%- auditor.company %>
  487. <% if (auditor.role && auditor.role.trim()) { %>
  488. - <%- auditor.role %>
  489. <% } %>
  490. </span>
  491. <% } %>
  492. </div>
  493. <div class="col">
  494. <% if (auditor.audit_status === auditConst.status.checked) { %>
  495. <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
  496. <% } if (auditor.audit_status === auditConst.status.checkNo || auditor.audit_status === auditConst.status.checkNoPre || auditor.audit_status === auditConst.status.checkCancel) { %>
  497. <span class="pull-right text-warning"><i class="fa fa-share-square fa-rotate-270"></i></span>
  498. <% } else if (auditor.audit_status === auditConst.status.checking) { %>
  499. <span class="pull-right text-warning"><i class="fa fa-commenting"></i></span>
  500. <% } %>
  501. </div>
  502. <% if (auditor.audit_status !== auditConst.status.uncheck && auditor.opinion) { %>
  503. <div class="col-12 py-1 bg-light"><i class="fa fa-commenting-o mr-1"></i><%- auditor.opinion%></div>
  504. <% } %>
  505. <% if (auditor.audit_status === auditConst.status.checking && auditor.audit_id === ctx.session.sessionUser.accountId) { %>
  506. <div class="col-12 py-1 bg-light">
  507. <textarea class="form-control form-control-sm" name="opinion">不同意</textarea>
  508. <div id="reject-process" class="alert alert-warning mt-1 mb-0 p-2">
  509. <div class="form-check form-check-inline">
  510. <input class="form-check-input" type="radio" name="checkType" id="inlineRadio1" value="<%- auditConst.status.checkNo %>">
  511. <label class="form-check-label" for="inlineRadio1">退回原报 <%- ctx.phasePay.user.name %></label>
  512. </div>
  513. <% if (auditor.audit_order > 1) { %>
  514. <div class="form-check form-check-inline">
  515. <input class="form-check-input" type="radio" name="checkType" id="inlineRadio2" value="<%- auditConst.status.checkNoPre %>">
  516. <label class="form-check-label" for="inlineRadio2">退回上一审批人
  517. <% const pre = his.find(x => { return x.audit_order === auditor.audit_order - 1}); %>
  518. <%- ( pre ? pre.name : '') %>
  519. </label>
  520. </div>
  521. <% } %>
  522. </div>
  523. </div>
  524. <% } %>
  525. </div>
  526. <% } %>
  527. </div>
  528. </div>
  529. </div>
  530. </li>
  531. <% }) %>
  532. </ul>
  533. </div>
  534. <% }) %>
  535. </div>
  536. </div>
  537. </div>
  538. <div class="modal-footer">
  539. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  540. <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
  541. <button type="submit" class="btn btn-warning btn-sm">确认退回</button>
  542. </div>
  543. </form>
  544. </div>
  545. </div>
  546. <% } %>
  547. <% if (ctx.phasePay && ctx.phasePay.finalAuditorIds.indexOf(ctx.session.sessionUser.accountId) >= 0 && ctx.phasePay.audit_status === auditConst.status.checked && ctx.phasePay.isLatest) { %>
  548. <% if (!authMobile && ctx.session.sessionUser.loginStatus === 0) { %>
  549. <!--终审重新审批-->
  550. <div class="modal fade" id="sp-down-back" data-backdrop="static">
  551. <div class="modal-dialog" role="document">
  552. <div class="modal-content">
  553. <div class="modal-header">
  554. <h5 class="modal-title">重新审批</h5>
  555. </div>
  556. <div class="modal-body">
  557. <h5>重新审批需要您的手机短信验证</h5>
  558. <h5>您目前还没设置认证手机,请先设置。</h5>
  559. </div>
  560. <div class="modal-footer">
  561. <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
  562. <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">取消</button>
  563. <a href="/profile/sms" class="btn btn-sm btn-primary">去设置</a>
  564. </div>
  565. </div>
  566. </div>
  567. </div>
  568. <% } else { %>
  569. <div class="modal fade" id="sp-down-back" data-backdrop="static">
  570. <div class="modal-dialog" role="document">
  571. <form class="modal-content" method="post" action="audit/checkAgain" name="pay-checkAgain">
  572. <div class="modal-header">
  573. <h5 class="modal-title">重新审批</h5>
  574. </div>
  575. <div class="modal-body">
  576. <h5>确认由「终审-<%= ctx.session.sessionUser.name %>」重新审批「第<%= ctx.phasePay.phase_order %>期」?
  577. </h5>
  578. <% if (ctx.session.sessionUser.loginStatus === 0) { %>
  579. <div class="form-group">
  580. <label>重审需要验证码确认,验证码将发送至尾号<%- authMobile.slice(-4) %>的手机</label>
  581. <div class="input-group input-group-sm mb-3">
  582. <input class="form-control" type="text" readonly="readonly" name="code"
  583. placeholder="输入短信中的6位验证码" />
  584. <div class="input-group-append">
  585. <button class="btn btn-outline-secondary" type="button" id="get-code">获取验证码</button>
  586. </div>
  587. </div>
  588. </div>
  589. <% } %>
  590. </div>
  591. <div class="modal-footer">
  592. <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
  593. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  594. <button <% if (ctx.session.sessionUser.loginStatus === 0) { %>disabled<% } %> id="re-shenpi-btn" class="btn btn-warning btn-sm" type="submit">确定重审</button>
  595. </div>
  596. </form>
  597. </div>
  598. </div>
  599. <% } %>
  600. <% } %>
  601. <% if (ctx.phasePay && ctx.phasePay.create_user_id === ctx.session.sessionUser.accountId && ctx.phasePay.isLatest && (ctx.phasePay.audit_status === auditConst.status.checkNo || ctx.phasePay.audit_status === auditConst.status.uncheck)) { %>
  602. <div class="modal fade" id="del-qi" data-backdrop="static">
  603. <div class="modal-dialog" role="document">
  604. <form class="modal-content" action='/tender/<%= ctx.tender.id %>/pay/delete' method="post">
  605. <div class="modal-header">
  606. <h5 class="modal-title">删除期</h5>
  607. </div>
  608. <div class="modal-body">
  609. <h5>确认删除「第<%= ctx.phasePay.phase_order %>期」?</h5>
  610. <h5>删除后,数据无法恢复,请谨慎操作。</h5>
  611. </div>
  612. <div class="modal-footer">
  613. <input type="hidden" name="phase_id" value="<%= ctx.phasePay.id %>">
  614. <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
  615. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">取消</button>
  616. <button type="submit" class="btn btn-danger btn-sm">确定删除</button>
  617. </div>
  618. </form>
  619. </div>
  620. </div>
  621. <% } %>
  622. <% if (ctx.phasePay && ctx.phasePay.cancancel) { %>
  623. <div class="modal fade" id="sp-down-cancel" data-backdrop="static">
  624. <div class="modal-dialog" role="document">
  625. <div class="modal-content">
  626. <div class="modal-header">
  627. <h5 class="modal-title">撤回</h5>
  628. </div>
  629. <div class="modal-body">
  630. <h5>确定撤回?</h5>
  631. </div>
  632. <form class="modal-footer" action="audit/checkCancel" method="post">
  633. <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
  634. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">取消</button>
  635. <button type="submit" class="btn btn-danger btn-sm" type="submit">确定撤回</button>
  636. </form>
  637. </div>
  638. </div>
  639. </div>
  640. <% } %>
  641. <% if (ctx.phasePay && ctx.phasePay.audit_status !== auditConst.status.checked && ctx.session.sessionUser.is_admin) { %>
  642. <!--上报审批-->
  643. <div class="modal fade" id="sub-sp2" data-backdrop="static">
  644. <div class="modal-dialog" style="max-width: 650px" role="document">
  645. <div class="modal-content">
  646. <div class="modal-header">
  647. <h5 class="modal-title">修改审批流程</h5>
  648. </div>
  649. <div class="modal-body">
  650. <div class="card mt-1">
  651. <div class="modal-height-500" style="overflow: auto">
  652. <style>
  653. #admin-edit-shenpi thead th {
  654. border-bottom: 0;
  655. }
  656. #admin-edit-shenpi td, #admin-edit-shenpi th {
  657. padding: 0.75rem;
  658. }
  659. #admin-edit-shenpi th {
  660. background: none;
  661. color: #212529;
  662. border-top: 0;
  663. }
  664. </style>
  665. <table class="table table-hover" id="admin-edit-shenpi">
  666. <thead>
  667. <tr class="card-header text-center">
  668. <th width="100px">审批流程</th>
  669. <th>审批人员</th>
  670. <th width="80" style="text-align: center">审批状态</th>
  671. <th width="200" style="text-align: center">操作</th>
  672. </tr>
  673. </thead>
  674. <tbody id="admin-edit-shenpi-list">
  675. <% for (const [i, group] of ctx.phasePay.userGroups.entries()) { %>
  676. <% if (i === 0) continue; %>
  677. <% for (const [j, auditor] of group.entries()) { %>
  678. <tr>
  679. <td class="text-left d-flex">
  680. <% if (j === 0) { %>
  681. <%- i + '审' %>
  682. <% if (auditor.audit_type !== auditType.key.common) { %>
  683. <span class="ml-2 badge badge-pill badge-<%- auditType.info[auditor.audit_type].class %> p-1"><small><%- auditType.info[auditor.audit_type].short %></small></span>
  684. <% } %>
  685. <% } %>
  686. </td>
  687. <td></span> <%- auditor.name %> <small class="text-muted"><%- auditor.role %></small></td>
  688. <td style="text-align: center"><span class="<%- auditConst.info[auditor.audit_status].class %>"><%- auditor.audit_status !== auditConst.status.uncheck ? auditConst.info[auditor.audit_status].title : '待审批' %></span></td>
  689. <td style="text-align: center">
  690. <% if (auditor.audit_status === auditConst.status.checking && j === group.length - 1) { %>
  691. <span class="dropdown mr-2">
  692. <a href="javascript: void(0)" class="add-audit" id="<%- auditor.audit_id %>_add_dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">增加</a>
  693. <div class="dropdown-menu dropdown-menu-right" id="<%- auditor.audit_id %>_add_dropdownMenu" aria-labelledby="<%- auditor.audit_id %>_add_dropdownMenuButton" style="width:220px">
  694. <div class="mb-2 p-2"><input class="form-control form-control-sm gr-search"
  695. placeholder="姓名/手机 检索" autocomplete="off" data-code="<%- auditor.audit_id %>_add"></div>
  696. <dl class="list-unstyled book-list" data-aid="<%- auditor.audit_id %>" data-operate="add">
  697. <% accountGroup.forEach((group, idx) => { %>
  698. <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>"
  699. data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
  700. <div class="dd-content" data-toggleid="<%- idx %>">
  701. <% group.groupList.forEach(item => { %>
  702. <% if (item.id !== ctx.phasePay.create_user_id) { %>
  703. <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>">
  704. <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
  705. class="ml-auto"><%- item.mobile %></span></p>
  706. <span class="text-muted"><%- item.role %></span>
  707. </dd>
  708. <% } %>
  709. <% });%>
  710. </div>
  711. <% }) %>
  712. </dl>
  713. </div>
  714. </span>
  715. <% } %>
  716. <% if (auditor.audit_status === auditConst.status.uncheck) { %>
  717. <% if (j === group.length - 1) { %>
  718. <span class="dropdown mr-2">
  719. <a href="javascript: void(0)" class="add-audit" id="<%- auditor.audit_id %>_add_dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">增加</a>
  720. <div class="dropdown-menu dropdown-menu-right" id="<%- auditor.audit_id %>_add_dropdownMenu" aria-labelledby="<%- auditor.audit_id %>_add_dropdownMenuButton" style="width:220px">
  721. <div class="mb-2 p-2"><input class="form-control form-control-sm gr-search"
  722. placeholder="姓名/手机 检索" autocomplete="off" data-code="<%- auditor.audit_id %>_add"></div>
  723. <dl class="list-unstyled book-list" data-aid="<%- auditor.audit_id %>" data-operate="add">
  724. <% accountGroup.forEach((group, idx) => { %>
  725. <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>"
  726. data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
  727. <div class="dd-content" data-toggleid="<%- idx %>">
  728. <% group.groupList.forEach(item => { %>
  729. <% if (item.id !== ctx.phasePay.create_user_id) { %>
  730. <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>">
  731. <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
  732. class="ml-auto"><%- item.mobile %></span></p>
  733. <span class="text-muted"><%- item.role %></span>
  734. </dd>
  735. <% } %>
  736. <% });%>
  737. </div>
  738. <% }) %>
  739. </dl>
  740. </div>
  741. </span>
  742. <% if (auditor.audit_type !== auditType.key.common) { %>
  743. <span class="dropdown mr-2">
  744. <a href="javascript: void(0)" class="add-audit" id="<%- auditor.audit_id %>_add-sibling_dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">平级</a>
  745. <div class="dropdown-menu dropdown-menu-right" id="<%- auditor.audit_id %>_add-sibling_dropdownMenu" aria-labelledby="<%- auditor.audit_id %>_add-sibling_dropdownMenuButton" style="width:220px">
  746. <div class="mb-2 p-2"><input class="form-control form-control-sm gr-search"
  747. placeholder="姓名/手机 检索" autocomplete="off" data-code="<%- auditor.audit_id %>_add-sibling"></div>
  748. <dl class="list-unstyled book-list" data-aid="<%- auditor.audit_id %>" data-operate="add-sibling">
  749. <% accountGroup.forEach((group, idx) => { %>
  750. <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>"
  751. data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
  752. <div class="dd-content" data-toggleid="<%- idx %>">
  753. <% group.groupList.forEach(item => { %>
  754. <% if (item.id !== ctx.phasePay.create_user_id) { %>
  755. <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>">
  756. <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
  757. class="ml-auto"><%- item.mobile %></span></p>
  758. <span class="text-muted"><%- item.role %></span>
  759. </dd>
  760. <% } %>
  761. <% });%>
  762. </div>
  763. <% }) %>
  764. </dl>
  765. </div>
  766. </span>
  767. <% } %>
  768. <% } %>
  769. <span class="dropdown mr-2">
  770. <a href="javascript: void(0)" class="change-audit" id="<%- auditor.audit_id %>_change_dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">更换</a>
  771. <div class="dropdown-menu dropdown-menu-right" id="<%- auditor.audit_id %>_change_dropdownMenu" aria-labelledby="<%- auditor.audit_id %>_change_dropdownMenuButton" style="width:220px">
  772. <div class="mb-2 p-2"><input class="form-control form-control-sm gr-search"
  773. placeholder="姓名/手机 检索" autocomplete="off" data-code="<%- auditor.audit_id %>_change"></div>
  774. <dl class="list-unstyled book-list" data-aid="<%- auditor.audit_id %>" data-operate="change">
  775. <% accountGroup.forEach((group, idx) => { %>
  776. <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>"
  777. data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
  778. <div class="dd-content" data-toggleid="<%- idx %>">
  779. <% group.groupList.forEach(item => { %>
  780. <% if (item.id !== ctx.phasePay.create_user_id) { %>
  781. <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>">
  782. <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
  783. class="ml-auto"><%- item.mobile %></span></p>
  784. <span class="text-muted"><%- item.role %></span>
  785. </dd>
  786. <% } %>
  787. <% });%>
  788. </div>
  789. <% }) %>
  790. </dl>
  791. </div>
  792. </span>
  793. <span class="dropdown">
  794. <a href="javascript: void(0)" class="text-danger" title="移除" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">移除</a>
  795. <div class="dropdown-menu">
  796. <span class="dropdown-item" href="javascript:void(0);">确认移除审批人?</span>
  797. <div class="dropdown-divider"></div>
  798. <div class="px-2 py-1 text-center">
  799. <button class="remove-audit btn btn-sm btn-danger" data-id="<%- auditor.audit_id %>">移除</button>
  800. <button class="btn btn-sm btn-secondary">取消</button>
  801. </div>
  802. </div>
  803. </span>
  804. <% } %>
  805. </td>
  806. </tr>
  807. <% } %>
  808. <% } %>
  809. </tbody>
  810. </table>
  811. </div>
  812. </div>
  813. </div>
  814. <form class="modal-footer">
  815. <div class="mr-auto text-warning">
  816. <span class="mr-3">增加:后级审核人</span>
  817. <span class="">平级:会签/或签增加平级审核人</span>
  818. </div>
  819. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  820. </form>
  821. </div>
  822. </div>
  823. </div>
  824. <% } %>
  825. <script>
  826. const accountGroup = JSON.parse(unescape('<%- escape(JSON.stringify(accountGroup)) %>'));
  827. const accountList = JSON.parse(unescape('<%- escape(JSON.stringify(accountList)) %>'));
  828. const shenpi_status = <%- ctx.tender.info.shenpi.phasePay %>;
  829. const shenpiConst = JSON.parse('<%- JSON.stringify(shenpiConst) %>');
  830. const phaseUserId = parseInt('<%= ctx.phasePay.create_user_id %>');
  831. const auditType = JSON.parse(unescape('<%- escape(JSON.stringify(auditType)) %>'));
  832. </script>
  833. <script>
  834. $('[name=phase-start]').submit(function (e) {
  835. if (checkAuditorFrom()) {
  836. $(this).parent().parent().parent().modal('hide');
  837. $('#hide-all').hide();
  838. } else {
  839. return false;
  840. }
  841. });
  842. $('#audit-check-no').submit(function (e) {
  843. const checkType = parseInt($('[name=checkType]:checked').val());
  844. if ($('#warning-text').length) $('#warning-text').remove();
  845. if (!checkType && !$('#warning-text').length) {
  846. $('#reject-process').prepend('<p id="warning-text" style="color: red; margin: 0;">请选择退回流程</p>');
  847. return false;
  848. }
  849. $('#hide-all').hide();
  850. });
  851. $('.sp-location-list').on('shown.bs.modal', function () {
  852. const scrollBox = $(this).find('div[class="col-8 modal-height-500"]');
  853. const bdiv = (scrollBox.offset() && scrollBox.offset().top) || 0;
  854. scrollBox.scrollTop(0);
  855. const hdiv = divSearch($(this).find('textarea')) ? $(this).find('textarea') : null;
  856. const hdheight = hdiv ? hdiv.parents('.timeline-item-content').offset().top : null;
  857. if (hdiv && scrollBox.length && scrollBox[0].scrollHeight > 200 && hdheight - bdiv > 200) {
  858. scrollBox.scrollTop(hdheight - bdiv);
  859. }
  860. });
  861. function divSearch(div) {
  862. if (div.length > 0) {
  863. return true;
  864. }
  865. return false;
  866. }
  867. // 展开历史审核记录
  868. $('.modal-body #fold-btn').click(function () {
  869. const type = $(this).data('target')
  870. const auditCard = $(this).parent().parent()
  871. if (type === 'show') {
  872. $(this).data('target', 'hide')
  873. auditCard.find('.fold-card').slideDown('swing', () => {
  874. auditCard.find('#fold-btn').text('收起历史审核记录')
  875. })
  876. } else {
  877. $(this).data('target', 'show')
  878. auditCard.find('.fold-card').slideUp('swing', () => {
  879. auditCard.find('#fold-btn').text('展开历史审核记录')
  880. })
  881. }
  882. });
  883. // 重新审批
  884. $('[name=phase-checkAgain]').submit(function (e) {
  885. <% if (ctx.session.sessionUser.loginStatus === 0) { %>
  886. const code = $("#sp-down-back input[name='code']").val();
  887. if ($(this).hasClass('disabled')) return false;
  888. if (code.length < 6) {
  889. toast('请填写正确的验证码', 'error');
  890. return false;
  891. }
  892. <% } %>
  893. $('#hide-all').hide();
  894. });
  895. </script>