audit_modal.ejs 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  1. <% if (tender.ledger_status === auditConst.status.checking && curAuditor.audit_id === ctx.session.sessionUser.accountId) { %>
  2. <!--审批通过-->
  3. <div class="modal fade sp-location-list" id="sp-done" data-backdrop="static">
  4. <div class="modal-dialog modal-lg" role="document">
  5. <form class="modal-content" action="<%- preUrl %>/ledger/audit/check" method="post" onsubmit="return auditCheck(0);">
  6. <div class="modal-header">
  7. <h5 class="modal-title">审批通过</h5>
  8. </div>
  9. <div class="modal-body">
  10. <div class="row">
  11. <div class="col-4">
  12. <div class="card mt-3">
  13. <ul class="list-group list-group-flush">
  14. <% auditors.forEach((item, idx) => { %>
  15. <% if (idx === 0) { %>
  16. <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
  17. <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- item.name %>
  18. <small class="text-muted"><%- item.role %></small>
  19. <span class="pull-right">原报</span>
  20. </li>
  21. <% } else if(idx === auditors.length -1 && idx !== 0) { %>
  22. <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
  23. <i class="fa fa fa-stop-circle"></i> <%- item.name %>
  24. <small class="text-muted"><%- item.role %></small>
  25. <span class="pull-right">终审</span>
  26. </li>
  27. <% } else {%>
  28. <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
  29. <i class="fa fa-chevron-circle-down"></i> <%- item.name %>
  30. <small class="text-muted"><%- item.role %></small>
  31. <span class="pull-right"><%= ctx.helper.transFormToChinese(idx) %>审</span>
  32. </li>
  33. <% } %>
  34. <% }) %>
  35. </ul>
  36. </div>
  37. </div>
  38. <div class="col-8 modal-height-500" style="overflow: auto">
  39. <% auditHistory.forEach((auditors, idx) => { %>
  40. <!-- 展开/收起历史流程 -->
  41. <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
  42. <div class="text-right">
  43. <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
  44. </div>
  45. <% } %>
  46. <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
  47. <div class="text-center text-muted"><%- idx+1 %>#</div>
  48. <ul class="timeline-list list-unstyled mt-2">
  49. <% auditors.forEach((auditor, index) => { %>
  50. <% if (index === 0) { %>
  51. <li class="timeline-list-item pb-2">
  52. <div class="timeline-item-date">
  53. <%- ctx.helper.formatDate(auditor.begin_time) %>
  54. </div>
  55. <div class="timeline-item-tail"></div>
  56. <div class="timeline-item-icon bg-success text-light">
  57. <i class="fa fa-caret-down"></i>
  58. </div>
  59. <div class="timeline-item-content">
  60. <div class="card">
  61. <div class="card-body p-3">
  62. <div class="card-text">
  63. <p class="mb-1"><span
  64. class="h5"><%- user.name %></span><span
  65. class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
  66. </p>
  67. <p class="text-muted mb-0"><%- user.role %></p>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </li>
  73. <li class="timeline-list-item pb-2">
  74. <div class="timeline-item-date">
  75. <%- ctx.helper.formatDate(auditor.end_time) %>
  76. </div>
  77. <% if(index < auditors.length - 1) { %>
  78. <div class="timeline-item-tail"></div>
  79. <% } %>
  80. <% if(auditor.status === auditConst.status.checked) { %>
  81. <div class="timeline-item-icon bg-success text-light">
  82. <i class="fa fa-check"></i>
  83. </div>
  84. <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
  85. <div class="timeline-item-icon bg-warning text-light">
  86. <i class="fa fa-level-up"></i>
  87. </div>
  88. <% } else if(auditor.status === auditConst.status.checking) { %>
  89. <div class="timeline-item-icon bg-warning text-light">
  90. <i class="fa fa-ellipsis-h"></i>
  91. </div>
  92. <% } else {%>
  93. <div class="timeline-item-icon bg-secondary text-light">
  94. </div>
  95. <% } %>
  96. <div class="timeline-item-content">
  97. <div class="card">
  98. <div class="card-body p-3">
  99. <div class="card-text">
  100. <p class="mb-1"><span class="h5"><%- auditor.name %></span><span
  101. class="pull-right <%- auditConst.statusClass[auditor.status] %>"><%- auditConst.statusString[auditor.status] %></span>
  102. </p>
  103. <p class="text-muted mb-0"><%- auditor.role %></p>
  104. </div>
  105. </div>
  106. <!--审批意见-->
  107. <% if(auditor.status !== auditConst.status.uncheck) { %>
  108. <div class="card-body p-3 border-top">
  109. <% if (tender.ledger_times === idx + 1 && auditor.status === auditConst.status.checking) { %>
  110. <label>审批意见<b class="text-danger">*</b></label>
  111. <textarea class="form-control form-control-sm"
  112. name="opinion">同意</textarea>
  113. <% } else { %>
  114. <p style="margin: 0;"><%- auditor.opinion %></p>
  115. <% } %>
  116. </div>
  117. <% } %>
  118. </div>
  119. </div>
  120. </li>
  121. <% } else {%>
  122. <li class="timeline-list-item pb-2">
  123. <div class="timeline-item-date">
  124. <%- ctx.helper.formatDate(auditor.end_time) %>
  125. </div>
  126. <% if(index < auditors.length - 1) { %>
  127. <div class="timeline-item-tail"></div>
  128. <% } %>
  129. <% if(auditor.status === auditConst.status.checked) { %>
  130. <div class="timeline-item-icon bg-success text-light">
  131. <i class="fa fa-check"></i>
  132. </div>
  133. <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
  134. <div class="timeline-item-icon bg-warning text-light">
  135. <i class="fa fa-level-up"></i>
  136. </div>
  137. <% } else if(auditor.status === auditConst.status.checking) { %>
  138. <div class="timeline-item-icon bg-warning text-light">
  139. <i class="fa fa-ellipsis-h"></i>
  140. </div>
  141. <% } else { %>
  142. <div class="timeline-item-icon bg-secondary text-light">
  143. </div>
  144. <% } %>
  145. <div class="timeline-item-content">
  146. <div class="card">
  147. <div class="card-body p-3">
  148. <div class="card-text">
  149. <p class="mb-1"><span class="h5"><%- auditor.name %></span>
  150. <span class="pull-right <%- auditConst.statusClass[auditor.status] %>">
  151. <%- auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''%>
  152. <%- auditor.status === auditConst.status.checkNo ? user.name : '' %>
  153. <%- auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : '' %>
  154. </span>
  155. </p>
  156. <p class="text-muted mb-0"><%- auditor.role %></p>
  157. </div>
  158. </div>
  159. <!--审批意见-->
  160. <% if(auditor.status !== auditConst.status.uncheck) { %>
  161. <div class="card-body p-3 border-top">
  162. <% if (tender.ledger_times === idx + 1 && auditor.status === auditConst.status.checking) { %>
  163. <label>审批意见<b class="text-danger">*</b></label>
  164. <textarea class="form-control form-control-sm"
  165. name="opinion">同意</textarea>
  166. <% } else { %>
  167. <p style="margin: 0;"><%- auditor.opinion %></p>
  168. <% } %>
  169. </div>
  170. <% } %>
  171. </div>
  172. </div>
  173. </li>
  174. <% } %>
  175. <% }) %>
  176. </ul>
  177. </div>
  178. <% }) %>
  179. </div>
  180. </div>
  181. </div>
  182. <div class="modal-footer">
  183. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  184. <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
  185. <input type="hidden" name="checkType" value="<%= auditConst.status.checked %>" />
  186. <button type="submit" class="btn btn-success btn-sm">确认通过</button>
  187. </div>
  188. </form>
  189. </div>
  190. </div>
  191. <!--审批退回-->
  192. <div class="modal fade sp-location-list" id="sp-back" data-backdrop="static">
  193. <div class="modal-dialog modal-lg" role="document">
  194. <form class="modal-content modal-lg" action="<%- preUrl %>/ledger/audit/check" method="post"
  195. onsubmit="return auditCheck(1);">
  196. <div class="modal-header">
  197. <h5 class="modal-title">审批退回</h5>
  198. </div>
  199. <div class="modal-body">
  200. <div class="row">
  201. <div class="col-4">
  202. <div class="card mt-3">
  203. <ul class="list-group list-group-flush">
  204. <% auditors.forEach((item, idx) => { %>
  205. <% if (idx === 0) { %>
  206. <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
  207. <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- item.name %>
  208. <small class="text-muted"><%- item.role %></small>
  209. <span class="pull-right">原报</span>
  210. </li>
  211. <% } else if(idx === auditors.length -1 && idx !== 0) { %>
  212. <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
  213. <i class="fa fa fa-stop-circle"></i> <%- item.name %>
  214. <small class="text-muted"><%- item.role %></small>
  215. <span class="pull-right">终审</span>
  216. </li>
  217. <% } else {%>
  218. <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
  219. <i class="fa fa-chevron-circle-down"></i> <%- item.name %>
  220. <small class="text-muted"><%- item.role %></small>
  221. <span class="pull-right"><%= ctx.helper.transFormToChinese(idx) %>审</span>
  222. </li>
  223. <% } %>
  224. <% }) %>
  225. </ul>
  226. </div>
  227. </div>
  228. <div class="col-8 modal-height-500" style="overflow: auto">
  229. <% auditHistory.forEach((auditors, idx) => { %>
  230. <!-- 展开/收起历史流程 -->
  231. <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
  232. <div class="text-right">
  233. <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
  234. </div>
  235. <% } %>
  236. <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
  237. <div class="text-center text-muted"><%- idx+1 %>#</div>
  238. <ul class="timeline-list list-unstyled mt-2">
  239. <% auditors.forEach((auditor, index) => { %>
  240. <% if (index === 0) { %>
  241. <li class="timeline-list-item pb-2">
  242. <div class="timeline-item-date">
  243. <%- ctx.helper.formatDate(auditor.begin_time) %>
  244. </div>
  245. <div class="timeline-item-tail"></div>
  246. <div class="timeline-item-icon bg-success text-light">
  247. <i class="fa fa-caret-down"></i>
  248. </div>
  249. <div class="timeline-item-content">
  250. <div class="card">
  251. <div class="card-body p-3">
  252. <div class="card-text">
  253. <p class="mb-1"><span
  254. class="h5"><%- user.name %></span><span
  255. class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
  256. </p>
  257. <p class="text-muted mb-0"><%- user.role %></p>
  258. </div>
  259. </div>
  260. </div>
  261. </div>
  262. </li>
  263. <li class="timeline-list-item pb-2">
  264. <div class="timeline-item-date">
  265. <%- ctx.helper.formatDate(auditor.end_time) %>
  266. </div>
  267. <% if(index < auditors.length - 1) { %>
  268. <div class="timeline-item-tail"></div>
  269. <% } %>
  270. <% if(auditor.status === auditConst.status.checked) { %>
  271. <div class="timeline-item-icon bg-success text-light">
  272. <i class="fa fa-check"></i>
  273. </div>
  274. <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
  275. <div class="timeline-item-icon bg-warning text-light">
  276. <i class="fa fa-level-up"></i>
  277. </div>
  278. <% } else if(auditor.status === auditConst.status.checking) { %>
  279. <div class="timeline-item-icon bg-warning text-light">
  280. <i class="fa fa-ellipsis-h"></i>
  281. </div>
  282. <% } else {%>
  283. <div class="timeline-item-icon bg-secondary text-light">
  284. </div>
  285. <% } %>
  286. <div class="timeline-item-content">
  287. <div class="card">
  288. <div class="card-body p-3">
  289. <div class="card-text">
  290. <p class="mb-1"><span class="h5"><%- auditor.name %></span><span
  291. class="pull-right <%- auditConst.statusClass[auditor.status] %>"><%- auditConst.statusString[auditor.status] %></span>
  292. </p>
  293. <p class="text-muted mb-0"><%- auditor.role %></p>
  294. </div>
  295. </div>
  296. <!--审批意见-->
  297. <% if(auditor.times === tender.ledger_times && auditor.status !== auditConst.status.uncheck) { %>
  298. <div class="card-body p-3 border-top">
  299. <% if (tender.ledger_times === idx + 1 && auditor.status === auditConst.status.checking) { %>
  300. <label>审批意见<b class="text-danger">*</b></label>
  301. <textarea class="form-control form-control-sm"
  302. name="opinion">不同意</textarea>
  303. <% } else if(auditor.status === auditConst.status.checked){ %>
  304. <p style="margin: 0;"><%- auditor.opinion %></p>
  305. <% } %>
  306. </div>
  307. <% } %>
  308. </div>
  309. </div>
  310. </li>
  311. <% } else {%>
  312. <li class="timeline-list-item pb-2">
  313. <div class="timeline-item-date">
  314. <%- ctx.helper.formatDate(auditor.end_time) %>
  315. </div>
  316. <% if(index < auditors.length - 1) { %>
  317. <div class="timeline-item-tail"></div>
  318. <% } %>
  319. <% if(auditor.status === auditConst.status.checked) { %>
  320. <div class="timeline-item-icon bg-success text-light">
  321. <i class="fa fa-check"></i>
  322. </div>
  323. <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
  324. <div class="timeline-item-icon bg-warning text-light">
  325. <i class="fa fa-level-up"></i>
  326. </div>
  327. <% } else if(auditor.status === auditConst.status.checking) { %>
  328. <div class="timeline-item-icon bg-warning text-light">
  329. <i class="fa fa-ellipsis-h"></i>
  330. </div>
  331. <% } else { %>
  332. <div class="timeline-item-icon bg-secondary text-light">
  333. </div>
  334. <% } %>
  335. <div class="timeline-item-content">
  336. <div class="card">
  337. <div class="card-body p-3">
  338. <div class="card-text">
  339. <p class="mb-1"><span class="h5"><%- auditor.name %></span>
  340. <span
  341. class="pull-right
  342. <%- auditConst.statusClass[auditor.status] %>"><%- auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''%>
  343. <%- auditor.status === auditConst.status.checkNo ? user.name : '' %>
  344. <%- auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : '' %>
  345. </span>
  346. </p>
  347. <p class="text-muted mb-0"><%- auditor.role %></p>
  348. </div>
  349. </div>
  350. <!--审批意见-->
  351. <% if(auditor.times === tender.ledger_times && auditor.status !== auditConst.status.uncheck) { %>
  352. <div class="card-body p-3 border-top">
  353. <% if (tender.ledger_times === idx + 1 && auditor.status === auditConst.status.checking) { %>
  354. <label>审批意见<b class="text-danger">*</b></label>
  355. <textarea class="form-control form-control-sm"
  356. name="opinion">不同意</textarea>
  357. <% } else { %>
  358. <p style="margin: 0;"><%- auditor.opinion %></p>
  359. <% } %>
  360. </div>
  361. <% } %>
  362. </div>
  363. </div>
  364. </li>
  365. <% } %>
  366. <% }) %>
  367. </ul>
  368. </div>
  369. <% }) %>
  370. </div>
  371. </div>
  372. </div>
  373. <div class="modal-footer">
  374. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  375. <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
  376. <input type="hidden" name="checkType" value="<%= auditConst.status.checkNo %>" />
  377. <button type="submit" class="btn btn-warning btn-sm">确认退回</button>
  378. </div>
  379. </form>
  380. </div>
  381. </div>
  382. <% } %>
  383. <% if (tender.ledger_status === auditConst.status.checked && auditors[auditors.length - 1].audit_id === ctx.session.sessionUser.accountId && !tender.hasStage && !tender.hasRevise) { %>
  384. <% if (!authMobile && ctx.session.sessionUser.loginStatus === 0) { %>
  385. <!--终审重新审批-->
  386. <div class="modal fade" id="sp-down-back" data-backdrop="static">
  387. <div class="modal-dialog" role="document">
  388. <div class="modal-content">
  389. <div class="modal-header">
  390. <h5 class="modal-title">重新审批</h5>
  391. </div>
  392. <div class="modal-body">
  393. <h5>重新审批需要您的手机短信验证</h5>
  394. <h5>您目前还没设置认证手机,请先设置。</h5>
  395. </div>
  396. <div class="modal-footer">
  397. <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">取消</button>
  398. <a href="/profile/sms" class="btn btn-sm btn-primary">去设置</a>
  399. </div>
  400. </div>
  401. </div>
  402. </div>
  403. <% } else { %>
  404. <div class="modal fade" id="sp-down-back" data-backdrop="static">
  405. <div class="modal-dialog" role="document">
  406. <form class="modal-content" action="<%- preUrl %>/ledger/audit/check/again" method="post"
  407. onsubmit="return auditAgainCheck();">
  408. <div class="modal-header">
  409. <h5 class="modal-title">重新审批</h5>
  410. </div>
  411. <div class="modal-body">
  412. <h5>确认由「终审-<%= auditors[auditors.length-1].name %>」重新审批 ?
  413. </h5>
  414. <% if (ctx.session.sessionUser.loginStatus === 0) { %>
  415. <div class="form-group">
  416. <label>重审需要验证码确认,验证码将发送至尾号<%- authMobile.slice(-4) %>的手机</label>
  417. <div class="input-group input-group-sm mb-3">
  418. <input class="form-control" type="text" readonly="readonly" name="code"
  419. placeholder="输入短信中的6位验证码" />
  420. <div class="input-group-append">
  421. <button class="btn btn-outline-secondary" type="button" id="get-code">获取验证码</button>
  422. </div>
  423. </div>
  424. </div>
  425. <% } %>
  426. </div>
  427. <div class="modal-footer">
  428. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  429. <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
  430. <button <% if (ctx.session.sessionUser.loginStatus === 0) { %>disabled<% } %> id="re-shenpi-btn"
  431. class="btn btn-warning btn-sm">确定重审</button>
  432. </div>
  433. </form>
  434. </div>
  435. </div>
  436. <% } %>
  437. <% } %>
  438. <script>
  439. $('.sp-location-list').on('shown.bs.modal', function () {
  440. const scrollBox = $(this).find('div[class="col-8 modal-height-500"]');
  441. const bdiv = (scrollBox.offset() && scrollBox.offset().top) || 0;
  442. scrollBox.scrollTop(0);
  443. const hdiv = divSearch($(this).find('textarea')) ? $(this).find('textarea') : null;
  444. const hdheight = hdiv ? hdiv.parents('.timeline-item-content').offset().top : null;
  445. if (hdiv && scrollBox.length && scrollBox[0].scrollHeight > 200 && hdheight - bdiv > 200) {
  446. scrollBox.scrollTop(hdheight - bdiv);
  447. }
  448. });
  449. function divSearch(div) {
  450. if (div.length > 0) {
  451. return true;
  452. }
  453. return false;
  454. }
  455. // 展开历史审核记录
  456. $('.modal-body #fold-btn').click(function () {
  457. const type = $(this).data('target')
  458. const auditCard = $(this).parent().parent()
  459. if (type === 'show') {
  460. $(this).data('target', 'hide')
  461. auditCard.find('.fold-card').slideDown('swing', () => {
  462. auditCard.find('#fold-btn').text('收起历史审核记录')
  463. })
  464. } else {
  465. $(this).data('target', 'show')
  466. auditCard.find('.fold-card').slideUp('swing', () => {
  467. auditCard.find('#fold-btn').text('展开历史审核记录')
  468. })
  469. }
  470. });
  471. // 重新审批获取手机验证码
  472. // 获取验证码
  473. let isPosting = false;
  474. $("#get-code").click(function() {
  475. if (isPosting) {
  476. return false;
  477. }
  478. const btn = $(this);
  479. $.ajax({
  480. url: '/profile/code?_csrf_j=<%= ctx.csrf %>',
  481. type: 'post',
  482. data: { mobile: '<%- authMobile %>', type: 'shenpi' },
  483. dataTye: 'json',
  484. error: function() {
  485. isPosting = false;
  486. },
  487. beforeSend: function() {
  488. isPosting = true;
  489. },
  490. success: function(response) {
  491. isPosting = false;
  492. if (response.err === 0) {
  493. codeSuccess(btn);
  494. $("input[name='code']").removeAttr('readonly');
  495. $("#re-shenpi-btn").removeAttr('disabled');
  496. } else {
  497. toast(response.msg, 'error');
  498. }
  499. }
  500. });
  501. });
  502. /**
  503. * 获取成功后的操作
  504. *
  505. * @param {Object} btn - 点击的按钮
  506. * @return {void}
  507. */
  508. function codeSuccess(btn) {
  509. let counter = 60;
  510. btn.addClass('disabled').text('重新获取 ' + counter + 'S');
  511. btn.parent().siblings('input').removeAttr('readonly').attr('placeholder', '输入短信中的6位验证码');
  512. const bindBtn = $("#bind-btn");
  513. bindBtn.removeClass('btn-secondary disabled').addClass('btn-primary');
  514. const countDown = setInterval(function() {
  515. const countString = counter - 1 <= 0 ? '' : ' ' + (counter - 1) + 'S';
  516. // 倒数结束后
  517. if (countString === '') {
  518. clearInterval(countDown);
  519. btn.removeClass('disabled');
  520. }
  521. const text = '重新获取' + countString;
  522. btn.text(text);
  523. counter -= 1;
  524. }, 1000);
  525. }
  526. // 重新审批按钮
  527. $("#re-shenpi-btn").click(function () {
  528. const data = {
  529. };
  530. $.ajax({
  531. url: '<%- preUrl %>/audit/check/again',
  532. type: 'get',
  533. data: data,
  534. dataTye: 'json',
  535. success: function (response) {
  536. if (response.err === 0) {
  537. window.location.href = response.url;
  538. } else {
  539. toast(response.msg, 'error');
  540. }
  541. }
  542. });
  543. });
  544. function auditAgainCheck() {
  545. <% if (ctx.session.sessionUser.loginStatus === 0) { %>
  546. const code = $("#sp-down-back input[name='code']").val();
  547. if ($(this).hasClass('disabled')) {
  548. return false;
  549. }
  550. if (code.length < 6) {
  551. toastr.error('请填写正确的验证码');
  552. return false;
  553. }
  554. <% } %>
  555. return true;
  556. }
  557. </script>