audit_modal.ejs 65 KB

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