info_modal.ejs 65 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951
  1. <!--批量添加清单部位-->
  2. <div class="modal fade" id="batch" data-backdrop="static">
  3. <div class="modal-dialog modal-xl" role="document">
  4. <div class="modal-content">
  5. <div class="modal-header">
  6. <h5 class="modal-title">批量插入清单-计量单元</h5>
  7. </div>
  8. <div class="modal-body">
  9. <div class="row">
  10. <div class="col-6">
  11. <div class="d-inline-flex">
  12. <h6 class="mr-2 mt-1">签约清单</h6>
  13. <div class="mx-2 mb-2">
  14. <div class="input-group input-group-sm">
  15. <input type="text" class="form-control" id="batch-dbs-keyword" placeholder="输入编号/名称查找">
  16. <div class="input-group-append" >
  17. <span class="input-group-text" id="batch-dbs-count">结果:0</span>
  18. </div>
  19. <div class="input-group-append" >
  20. <button class="btn btn-outline-secondary" id="batch-dbs-pre" type="button" title="上一个"><i class="fa fa-angle-double-left"></i></button>
  21. <button class="btn btn-outline-secondary" id="batch-dbs-next" type="button" title="下一个"><i class="fa fa-angle-double-right"></i></button>
  22. </div>
  23. </div>
  24. </div>
  25. </div>
  26. <div class="batch-r">
  27. </div>
  28. </div>
  29. <div class="col-6">
  30. <div class="d-flex">
  31. <h6 class="mr-2 mt-1">清单信息</h6>
  32. <div class="ml-auto">
  33. <div class="custom-control custom-checkbox mb-2 d-inline-block">
  34. <label class="form-check-label">
  35. <input class="form-check-input" type="checkbox" name="batch-filter">
  36. 过滤无计量单元的清单
  37. </label>
  38. </div>
  39. <div class="custom-control custom-checkbox mb-2 d-inline-block">
  40. <label class="form-check-label">
  41. <input class="form-check-input" type="checkbox" name="batch-transpose">
  42. 竖向粘贴
  43. </label>
  44. </div>
  45. </div>
  46. </div>
  47. <div class="batch-l-t">
  48. </div>
  49. <h6>计量单元数量复核表</h6>
  50. <div class="batch-l-b">
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. <div class="modal-footer">
  56. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">取消</button>
  57. <button type="button" class="btn btn-primary btn-sm" id="batch-ok">确定</button>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. <% if ((revise.status === audit.status.uncheck || revise.status === audit.status.checkNo) && ctx.session.sessionUser.accountId === revise.uid) { %>
  63. <!--上报审批-->
  64. <div class="modal fade" id="sub-sp" data-backdrop="static">
  65. <div class="modal-dialog" role="document">
  66. <div class="modal-content">
  67. <div class="modal-header">
  68. <h5 class="modal-title">上报审批</h5>
  69. </div>
  70. <div class="modal-body">
  71. <div class="dropdown text-right">
  72. <% if (ctx.tender.info.shenpi.revise !== shenpiConst.sp_status.gdspl) { %>
  73. <button class="btn btn-outline-primary btn-sm dropdown-toggle" type="button" id="dropdownMenuButton"
  74. data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  75. 添加审批流程
  76. </button>
  77. <div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton"
  78. style="width:220px">
  79. <div class="mb-2 p-2"><input class="form-control form-control-sm" placeholder="姓名/手机 检索"
  80. id="gr-search" autocomplete="off"></div>
  81. <dl class="list-unstyled book-list">
  82. <% accountGroup.forEach((group, idx) => { %>
  83. <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>"
  84. data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
  85. <div class="dd-content" data-toggleid="<%- idx %>">
  86. <% group.groupList.forEach(item => { %>
  87. <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>">
  88. <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
  89. class="ml-auto"><%- item.mobile %></span></p>
  90. <span class="text-muted"><%- item.role %></span>
  91. </dd>
  92. <% });%>
  93. </div>
  94. <% }) %>
  95. </dl>
  96. </div>
  97. <% } %>
  98. </div>
  99. <div class="card mt-3">
  100. <div class="card-header">
  101. 审批流程
  102. </div>
  103. <div class="modal-height-500" style="overflow: auto">
  104. <ul class="list-group list-group-flush" id="auditors">
  105. <% for (let i = 0, iLen = revise.auditorGroups.length; i < iLen; i++) { %>
  106. <li class="list-group-item d-flex" auditorId="<%- revise.auditorGroups[i][0].audit_id %>">
  107. <div class="col-auto"><%- i+1 %></div>
  108. <div class="col">
  109. <% for (const auditor of revise.auditorGroups[i]) { %>
  110. <div class="d-inline-block mx-1" auditorId="<%- auditor.audit_id %>">
  111. <i class="fa fa-user text-muted"></i> <%- auditor.name %> <small class="text-muted"><%- auditor.role %></small>
  112. </div>
  113. <% } %>
  114. </div>
  115. <div class="col-auto">
  116. <% if (revise.auditorGroups[i][0].audit_type !== auditType.key.common) { %>
  117. <span class="badge badge-pill badge-<%- auditType.info[revise.auditorGroups[i][0].audit_type].class %> badge-bg-small"><small><%- auditType.info[revise.auditorGroups[i][0].audit_type].long%></small></span>
  118. <% } %>
  119. <% if (ctx.tender.info.shenpi.revise === shenpiConst.sp_status.sqspr ||
  120. (ctx.tender.info.shenpi.revise === shenpiConst.sp_status.gdzs && i+1 !== iLen)) { %>
  121. <a href="javascript: void(0)" class="text-danger pull-right">移除</a>
  122. <% } %>
  123. </div>
  124. </li>
  125. <% } %>
  126. </ul>
  127. </div>
  128. </div>
  129. </div>
  130. <form class="modal-footer" method="post" action="/tender/<%- ctx.tender.id %>/revise/audit/start"
  131. name="revise-start">
  132. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  133. <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>">
  134. <button class="btn btn-primary btn-sm" type="submit">确认上报</button>
  135. </form>
  136. </div>
  137. </div>
  138. </div>
  139. <% } %>
  140. <% if (revise.status === auditConst.status.checking && revise.curAuditorIds.indexOf(ctx.session.sessionUser.accountId) >= 0) { %>
  141. <<!--审批通过-->
  142. <div class="modal fade sp-location-list" id="sp-done" data-backdrop="static">
  143. <div class="modal-dialog modal-lg" role="document">
  144. <form class="modal-content" action="/tender/<%- ctx.tender.id %>/revise/audit/check" method="post" onsubmit="return auditCheck(0);">
  145. <div class="modal-header">
  146. <h5 class="modal-title">审批通过</h5>
  147. </div>
  148. <div class="modal-body">
  149. <div class="row">
  150. <div class="col-4">
  151. <div class="card mt-3 modal-height-500 scroll-y">
  152. <ul class="list-group list-group-flush auditors-list" id="auditors-list">
  153. <% revise.userGroups.forEach((group, idx) => { %>
  154. <% if (idx === 0) { %>
  155. <li class="list-group-item d-flex justify-content-between align-items-center">
  156. <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
  157. <span class="text-muted">
  158. <% for (const u of group) { %>
  159. <small class="d-inline-block text-dark mx-1" title="<%- u.company %>" data-auditorId="<%- u.audit_id %>"><%- u.name %></small>
  160. <% } %>
  161. </span>
  162. <span class="badge badge-light badge-pill ml-auto"><small>原报</small></span>
  163. </li>
  164. <% } else if(idx === revise.userGroups.length -1 && idx !== 0) { %>
  165. <li class="list-group-item d-flex justify-content-between align-items-center">
  166. <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
  167. <span class="text-muted">
  168. <% for (const u of group) { %>
  169. <small class="d-inline-block text-dark mx-1" title="<%- u.company %>" data-auditorId="<%- u.audit_id %>"><%- u.name %></small>
  170. <% } %>
  171. </span>
  172. <div class="d-flex ml-auto">
  173. <% if (group[0].audit_type !== auditType.key.common) { %>
  174. <span class="badge badge-pill badge-<%- auditType.info[group[0].audit_type].class %> p-1"><small><%- auditType.info[group[0].audit_type].short %></small></span>
  175. <% } %>
  176. <span class="badge badge-light badge-pill"><small>终审</small></span>
  177. </div>
  178. </li>
  179. <% } else {%>
  180. <li class="list-group-item d-flex justify-content-between align-items-center">
  181. <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
  182. <span class="text-muted">
  183. <% for (const u of group) { %>
  184. <small class="d-inline-block text-dark mx-1" title="<%- u.company %>" data-auditorId="<%- u.audit_id %>"><%- u.name %></small>
  185. <% } %>
  186. </span>
  187. <div class="d-flex ml-auto">
  188. <% if (group[0].audit_type !== auditType.key.common) { %>
  189. <span class="badge badge-pill badge-<%- auditType.info[group[0].audit_type].class %> p-1"><small><%- auditType.info[group[0].audit_type].short %></small></span>
  190. <% } %>
  191. <span class="badge badge-light badge-pill"><small><%= ctx.helper.transFormToChinese(idx) %>审</small></span>
  192. </div>
  193. </li>
  194. <% } %>
  195. <% }) %>
  196. </ul>
  197. </div>
  198. </div>
  199. <div class="col-8 modal-height-500 scroll-y">
  200. <% revise.auditHistory.forEach((his, idx) => { %>
  201. <!-- 展开/收起历史流程 -->
  202. <% if(idx === revise.auditHistory.length - 1 && revise.auditHistory.length !== 1) { %>
  203. <div class="text-right">
  204. <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
  205. </div>
  206. <% } %>
  207. <div class="<%- idx < revise.auditHistory.length - 1 ? 'fold-card' : '' %>">
  208. <div class="text-center text-muted"><%- idx+1 %>#</div>
  209. <ul class="timeline-list list-unstyled mt-2 <% if (idx === revise.auditHistory.length - 1 && revise.auditHistory.length > 1) { %>last-auditor-list<% } %>">
  210. <% his.forEach((group, index) => { %>
  211. <% if (index === 0) { %>
  212. <li class="timeline-list-item pb-2">
  213. <div class="timeline-item-date">
  214. <%- group.beginYear %>
  215. <span><%- group.beginDate %></span>
  216. <span><%- group.beginTime %></span>
  217. </div>
  218. <div class="timeline-item-tail"></div>
  219. <div class="timeline-item-icon bg-success text-light"><i class="fa fa-caret-down"></i></div>
  220. <div class="timeline-item-content">
  221. <div class="py-1">
  222. <span class="text-black-50">原报</span>
  223. <span class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
  224. </div>
  225. <div class="card">
  226. <div class="card-body px-3 py-0">
  227. <div class="card-text p-2 py-3 row">
  228. <div class="col-10">
  229. <span class="h6"><%- revise.user.name %></span>
  230. <span class="text-muted ml-1">
  231. <%- revise.user.company %>
  232. <% if (revise.user.role) { %>
  233. - <%= revise.user.role %>
  234. <% } %>
  235. </span>
  236. </div>
  237. <div class="col">
  238. <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
  239. </div>
  240. </div>
  241. </div>
  242. </div>
  243. </div>
  244. </li>
  245. <% } %>
  246. <li class="timeline-list-item pb-2 <% if (group.status === auditConst.status.uncheck && idx === revise.auditHistory.length - 1 && revise.auditHistory.length > 1) { %>is_uncheck<% } %>">
  247. <% if (group.endYear) { %>
  248. <div class="timeline-item-date">
  249. <%- group.endYear %>
  250. <span><%- group.endDate %></span>
  251. <span><%- group.endTime %></span>
  252. </div>
  253. <% } %>
  254. <% if (index < his.length - 1) { %>
  255. <div class="timeline-item-tail"></div>
  256. <% } %>
  257. <% if (group.status === auditConst.status.checked) { %>
  258. <div class="timeline-item-icon bg-success text-light"><i class="fa fa-check"></i></div>
  259. <% } else if (group.status === auditConst.status.checkNo || group.status === auditConst.status.checkNoPre || group.status === auditConst.status.checkCancel) { %>
  260. <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-level-up"></i></div>
  261. <% } else if (group.status === auditConst.status.checking) { %>
  262. <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-ellipsis-h"></i></div>
  263. <% } else { %>
  264. <div class="timeline-item-icon bg-secondary text-light"></div>
  265. <% } %>
  266. <div class="timeline-item-content">
  267. <div class="py-1">
  268. <span class="text-black-50">
  269. <%- (!group.is_final ? group.audit_order : '终') %>审
  270. <% if (group.audit_type !== auditType.key.common) { %><span class="text-<%- auditType.info[group.audit_type].class %> "><%- auditType.info[group.audit_type].long %></span><% } %>
  271. </span>
  272. <% if (group.status !== auditConst.status.uncheck) { %>
  273. <span class="pull-right <%- auditConst.statusClass[group.status] %>"><%- auditConst.statusString[group.status] %></span>
  274. <% } %>
  275. </div>
  276. <div class="card">
  277. <div class="card-body px-3 py-0">
  278. <% for (const [i, auditor] of group.auditors.entries()) { %>
  279. <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
  280. <div class="col-10">
  281. <span class="h6"><%- auditor.name %></span>
  282. <span class="text-muted ml-1">
  283. <%- auditor.company %>
  284. <% if (auditor.role) { %>
  285. - <%= auditor.role %>
  286. <% } %>
  287. </span>
  288. </div>
  289. <div class="col">
  290. <% if (auditor.status === auditConst.status.checked) { %>
  291. <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
  292. <% } if (auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre || auditor.status === auditConst.status.checkCancel) { %>
  293. <span class="pull-right text-warning"><i class="fa fa-share-square fa-rotate-270"></i></span>
  294. <% } else if (auditor.status === auditConst.status.checking) { %>
  295. <span class="pull-right text-warning"><i class="fa fa-commenting"></i></span>
  296. <% } %>
  297. </div>
  298. <% if (auditor.status !== auditConst.status.uncheck && auditor.opinion) { %>
  299. <div class="col-12 py-1 bg-light"><i class="fa fa-commenting-o mr-1"></i><%- auditor.opinion%></div>
  300. <% } %>
  301. <% if (auditor.status === auditConst.status.checking && auditor.audit_id === ctx.session.sessionUser.accountId) { %>
  302. <div class="col-12 py-1 bg-light">
  303. <textarea class="form-control form-control-sm" name="opinion">同意</textarea>
  304. </div>
  305. <% } %>
  306. </div>
  307. <% } %>
  308. </div>
  309. </div>
  310. </div>
  311. </li>
  312. <% }) %>
  313. </ul>
  314. </div>
  315. <% }) %>
  316. </div>
  317. </div>
  318. </div>
  319. <div class="modal-footer">
  320. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  321. <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
  322. <input type="hidden" name="checkType" value="<%= auditConst.status.checked %>" />
  323. <button type="submit" class="btn btn-success btn-sm">确认通过</button>
  324. </div>
  325. </form>
  326. </div>
  327. </div>
  328. <!--审批退回-->
  329. <div class="modal fade sp-location-list" id="sp-back" data-backdrop="static">
  330. <div class="modal-dialog modal-lg" role="document">
  331. <form class="modal-content modal-lg" action="/tender/<%- ctx.tender.id %>/revise/audit/check" method="post" onsubmit="return auditCheck(1);">
  332. <div class="modal-header">
  333. <h5 class="modal-title">审批退回</h5>
  334. </div>
  335. <div class="modal-body">
  336. <div class="row">
  337. <div class="col-4">
  338. <div class="card mt-3 modal-height-500 scroll-y">
  339. <ul class="list-group list-group-flush auditors-list" id="auditors-list">
  340. <% revise.userGroups.forEach((group, idx) => { %>
  341. <% if (idx === 0) { %>
  342. <li class="list-group-item d-flex justify-content-between align-items-center">
  343. <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
  344. <span class="text-muted">
  345. <% for (const u of group) { %>
  346. <small class="d-inline-block text-dark mx-1" title="<%- u.company %>" data-auditorId="<%- u.audit_id %>"><%- u.name %></small>
  347. <% } %>
  348. </span>
  349. <span class="badge badge-light badge-pill ml-auto"><small>原报</small></span>
  350. </li>
  351. <% } else if(idx === revise.userGroups.length -1 && idx !== 0) { %>
  352. <li class="list-group-item d-flex justify-content-between align-items-center">
  353. <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
  354. <span class="text-muted">
  355. <% for (const u of group) { %>
  356. <small class="d-inline-block text-dark mx-1" title="<%- u.company %>" data-auditorId="<%- u.audit_id %>"><%- u.name %></small>
  357. <% } %>
  358. </span>
  359. <div class="d-flex ml-auto">
  360. <% if (group[0].audit_type !== auditType.key.common) { %>
  361. <span class="badge badge-pill badge-<%- auditType.info[group[0].audit_type].class %> p-1"><small><%- auditType.info[group[0].audit_type].short %></small></span>
  362. <% } %>
  363. <span class="badge badge-light badge-pill"><small>终审</small></span>
  364. </div>
  365. </li>
  366. <% } else {%>
  367. <li class="list-group-item d-flex justify-content-between align-items-center">
  368. <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
  369. <span class="text-muted">
  370. <% for (const u of group) { %>
  371. <small class="d-inline-block text-dark mx-1" title="<%- u.company %>" data-auditorId="<%- u.audit_id %>"><%- u.name %></small>
  372. <% } %>
  373. </span>
  374. <div class="d-flex ml-auto">
  375. <% if (group[0].audit_type !== auditType.key.common) { %>
  376. <span class="badge badge-pill badge-<%- auditType.info[group[0].audit_type].class %> p-1"><small><%- auditType.info[group[0].audit_type].short %></small></span>
  377. <% } %>
  378. <span class="badge badge-light badge-pill"><small><%= ctx.helper.transFormToChinese(idx) %>审</small></span>
  379. </div>
  380. </li>
  381. <% } %>
  382. <% }) %>
  383. </ul>
  384. </div>
  385. </div>
  386. <div class="col-8 modal-height-500" style="overflow: auto">
  387. <% revise.auditHistory.forEach((his, idx) => { %>
  388. <!-- 展开/收起历史流程 -->
  389. <% if(idx === revise.auditHistory.length - 1 && revise.auditHistory.length !== 1) { %>
  390. <div class="text-right"><a href="javascript: void(0);" id="fold-btn" data-target="show"
  391. data-idx="<%- idx + 1 %>">展开历史审批流程</a></div>
  392. <% } %>
  393. <div class="<%- idx < revise.auditHistory.length - 1 ? 'fold-card' : '' %>">
  394. <div class="text-center text-muted"><%- idx+1 %>#</div>
  395. <ul class="timeline-list list-unstyled mt-2 <% if (idx === revise.auditHistory.length - 1 && revise.auditHistory.length !== 1) { %>last-auditor-list<% } %>">
  396. <% his.forEach((group, index) => { %>
  397. <% if (index === 0) { %>
  398. <li class="timeline-list-item pb-2">
  399. <div class="timeline-item-date">
  400. <%- group.beginYear %>
  401. <span><%- group.beginDate %></span>
  402. <span><%- group.beginTime %></span>
  403. </div>
  404. <div class="timeline-item-tail"></div>
  405. <div class="timeline-item-icon bg-success text-light"><i class="fa fa-caret-down"></i></div>
  406. <div class="timeline-item-content">
  407. <div class="py-1">
  408. <span class="text-black-50">原报</span>
  409. <span class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
  410. </div>
  411. <div class="card">
  412. <div class="card-body px-3 py-0">
  413. <div class="card-text p-2 py-3 row">
  414. <div class="col-10">
  415. <span class="h6"><%- revise.user.name %></span>
  416. <span class="text-muted ml-1">
  417. <%- revise.user.company %>
  418. <% if (revise.user.role) { %>
  419. - <%= revise.user.role %>
  420. <% } %>
  421. </span>
  422. </div>
  423. <div class="col">
  424. <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
  425. </div>
  426. </div>
  427. </div>
  428. </div>
  429. </div>
  430. </li>
  431. <% } %>
  432. <li class="timeline-list-item pb-2 <% if (group.status === auditConst.status.uncheck && idx === revise.auditHistory.length - 1 && revise.auditHistory.length !== 1) { %>is_uncheck<% } %>">
  433. <% if (his.endYear) { %>
  434. <div class="timeline-item-date">
  435. <%- group.endYear %>
  436. <span><%- group.endDate %></span>
  437. <span><%- group.endTime %></span>
  438. </div>
  439. <% } %>
  440. <% if (index < his.length - 1) { %>
  441. <div class="timeline-item-tail"></div>
  442. <% } %>
  443. <% if (group.status === auditConst.status.checked) { %>
  444. <div class="timeline-item-icon bg-success text-light"><i class="fa fa-check"></i></div>
  445. <% } else if (group.status === auditConst.status.checkNo || group.status === auditConst.status.checkNoPre || group.status === auditConst.status.checkCancel) { %>
  446. <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-level-up"></i></div>
  447. <% } else if (group.status === auditConst.status.checking) { %>
  448. <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-ellipsis-h"></i></div>
  449. <% } else { %>
  450. <div class="timeline-item-icon bg-secondary text-light"></div>
  451. <% } %>
  452. <div class="timeline-item-content">
  453. <div class="py-1">
  454. <span class="text-black-50">
  455. <%- (!group.is_final ? group.audit_order : '终') %>审
  456. <% if (group.audit_type !== auditType.key.common) { %><span class="text-<%- auditType.info[group.audit_type].class %> "><%- auditType.info[group.audit_type].long %></span><% } %>
  457. </span>
  458. <% if (group.status !== auditConst.status.uncheck) { %>
  459. <span class="pull-right <%- auditConst.statusClass[group.status] %>"><%- auditConst.statusString[group.status] %></span>
  460. <% } %>
  461. </div>
  462. <div class="card">
  463. <div class="card-body px-3 py-0">
  464. <% for (const [i, auditor] of group.auditors.entries()) { %>
  465. <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
  466. <div class="col-10">
  467. <span class="h6"><%- auditor.name %></span>
  468. <span class="text-muted ml-1"><%- auditor.company %>
  469. <% if (auditor.role) { %>
  470. - <%= auditor.role %>
  471. <% } %>
  472. </span>
  473. </div>
  474. <div class="col">
  475. <% if (auditor.status === auditConst.status.checked) { %>
  476. <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
  477. <% } if (auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre || auditor.status === auditConst.status.checkCancel) { %>
  478. <span class="pull-right text-warning"><i class="fa fa-share-square fa-rotate-270"></i></span>
  479. <% } else if (auditor.status === auditConst.status.checking) { %>
  480. <span class="pull-right text-warning"><i class="fa fa-commenting"></i></span>
  481. <% } %>
  482. </div>
  483. <% if (auditor.status !== auditConst.status.uncheck && auditor.opinion) { %>
  484. <div class="col-12 py-1 bg-light"><i class="fa fa-commenting-o mr-1"></i><%- auditor.opinion%></div>
  485. <% } %>
  486. <% if (auditor.status === auditConst.status.checking && auditor.audit_id === ctx.session.sessionUser.accountId) { %>
  487. <div class="col-12 py-1 bg-light">
  488. <textarea class="form-control form-control-sm" name="opinion">不同意</textarea>
  489. </div>
  490. <% } %>
  491. </div>
  492. <% } %>
  493. </div>
  494. </div>
  495. </div>
  496. </li>
  497. <% }) %>
  498. </ul>
  499. </div>
  500. <% }) %>
  501. </div>
  502. </div>
  503. </div>
  504. <div class="modal-footer">
  505. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  506. <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
  507. <input type="hidden" name="checkType" value="<%= auditConst.status.checkNo %>" />
  508. <button type="submit" class="btn btn-warning btn-sm">确认退回</button>
  509. </div>
  510. </form>
  511. </div>
  512. </div>
  513. <% } %>
  514. <!--审批流程/结果-->
  515. <div class="modal fade" id="sp-list" data-backdrop="static">
  516. <div class="modal-dialog modal-lg" role="document">
  517. <div class="modal-content">
  518. <div class="modal-header">
  519. <h5 class="modal-title"><%- revise.status === auditConst.status.checking ? '审批流程' : '重新上报' %></h5>
  520. </div>
  521. <div class="modal-body">
  522. <div class="row">
  523. <div class="col-4">
  524. <% if(revise.status === auditConst.status.checkNo && revise.uid === ctx.session.sessionUser.accountId) { %>
  525. <a class="sp-list-item" href="#sub-sp" data-toggle="modal" data-target="#sub-sp"
  526. id="hideSp">修改审批流程</a>
  527. <% } %>
  528. <div class="card modal-height-500 mt-3 scroll-y">
  529. <ul class="list-group list-group-flush auditors-list" id="auditors-list">
  530. <% revise.userGroups.forEach((item, idx) => { %>
  531. <% if (idx === 0) { %>
  532. <li class="list-group-item d-flex justify-content-between align-items-center">
  533. <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
  534. <span class="text-muted">
  535. <% for (const u of item) { %>
  536. <small class="d-inline-block text-dark mx-1" title="<%- u.company %>" data-auditorId="<%- u.audit_id %>"><%- u.name %></small>
  537. <% } %>
  538. </span>
  539. <span class="badge badge-light badge-pill ml-auto"><small>原报</small></span>
  540. </li>
  541. <% } else if(idx === revise.userGroups.length -1 && idx !== 0) { %>
  542. <li class="list-group-item d-flex justify-content-between align-items-center">
  543. <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
  544. <span class="text-muted">
  545. <% for (const u of item) { %>
  546. <small class="d-inline-block text-dark mx-1" title="<%- u.company %>" data-auditorId="<%- u.audit_id %>"><%- u.name %></small>
  547. <% } %>
  548. </span>
  549. <div class="d-flex ml-auto">
  550. <% if (item[0].audit_type !== auditType.key.common) { %>
  551. <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>
  552. <% } %>
  553. <span class="badge badge-light badge-pill"><small>终审</small></span>
  554. </div>
  555. </li>
  556. <% } else {%>
  557. <li class="list-group-item d-flex justify-content-between align-items-center">
  558. <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
  559. <span class="text-muted">
  560. <% for (const u of item) { %>
  561. <small class="d-inline-block text-dark mx-1" title="<%- u.company %>" data-auditorId="<%- u.audit_id %>"><%- u.name %></small>
  562. <% } %>
  563. </span>
  564. <div class="d-flex ml-auto">
  565. <% if (item[0].audit_type !== auditType.key.common) { %>
  566. <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>
  567. <% } %>
  568. <span class="badge badge-light badge-pill"><small><%= ctx.helper.transFormToChinese(idx) %>审</small></span>
  569. </div>
  570. </li>
  571. <% } %>
  572. <% }) %>
  573. </ul>
  574. </div>
  575. </div>
  576. <div class="col-8 modal-height-500 scroll-y">
  577. <% revise.auditHistory.forEach((his, idx) => { %>
  578. <!-- 展开/收起历史流程 -->
  579. <% if(idx === revise.auditHistory.length - 1 && revise.auditHistory.length !== 1) { %>
  580. <div class="text-right">
  581. <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
  582. </div>
  583. <% } %>
  584. <div class="<%- idx < revise.auditHistory.length - 1 ? 'fold-card' : '' %>">
  585. <div class="text-center text-muted"><%- idx+1 %>#</div>
  586. <ul class="timeline-list list-unstyled mt-2 <% if (idx === revise.auditHistory.length - 1) { %>last-auditor-list<% } %>">
  587. <% his.forEach((group, index) => { %>
  588. <% if (index === 0) { %>
  589. <li class="timeline-list-item pb-2">
  590. <div class="timeline-item-date">
  591. <%- group.beginYear %>
  592. <span><%- group.beginDate %></span>
  593. <span><%- group.beginTime %></span>
  594. </div>
  595. <div class="timeline-item-tail"></div>
  596. <div class="timeline-item-icon bg-success text-light"><i class="fa fa-caret-down"></i></div>
  597. <div class="timeline-item-content">
  598. <div class="py-1">
  599. <span class="text-black-50">原报</span>
  600. <span class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
  601. </div>
  602. <div class="card">
  603. <div class="card-body px-3 py-0">
  604. <div class="card-text p-2 py-3 row">
  605. <div class="col-10">
  606. <span class="h6"><%- revise.user.name %></span>
  607. <span class="text-muted ml-1">
  608. <%- revise.user.company %>
  609. <% if (revise.user.role) { %>
  610. - <%= revise.user.role %>
  611. <% } %>
  612. </span>
  613. </div>
  614. <div class="col">
  615. <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
  616. </div>
  617. </div>
  618. </div>
  619. </div>
  620. </div>
  621. </li>
  622. <% } %>
  623. <li class="timeline-list-item pb-2 <% if (group.status === auditConst.status.uncheck && idx === revise.auditHistory.length - 1 && revise.auditHistory.length !== 1) { %>is_uncheck<% } %>">
  624. <% if (group.endYear) { %>
  625. <div class="timeline-item-date">
  626. <%- group.endYear %>
  627. <span><%- group.endDate %></span>
  628. <span><%- group.endTime %></span>
  629. </div>
  630. <% } %>
  631. <% if (index < his.length - 1) { %>
  632. <div class="timeline-item-tail"></div>
  633. <% } %>
  634. <% if (group.status === auditConst.status.checked) { %>
  635. <div class="timeline-item-icon bg-success text-light"><i class="fa fa-check"></i></div>
  636. <% } else if (group.status === auditConst.status.checkNo || group.status === auditConst.status.checkNoPre || group.status === auditConst.status.checkCancel) { %>
  637. <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-level-up"></i></div>
  638. <% } else if (group.status === auditConst.status.checking) { %>
  639. <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-ellipsis-h"></i></div>
  640. <% } else { %>
  641. <div class="timeline-item-icon bg-secondary text-light"></div>
  642. <% } %>
  643. <div class="timeline-item-content">
  644. <div class="py-1">
  645. <span class="text-black-50">
  646. <%- (!group.is_final ? group.audit_order : '终') %>审
  647. <% if (group.audit_type !== auditType.key.common) { %><span class="text-<%- auditType.info[group.audit_type].class %> "><%- auditType.info[group.audit_type].long %></span><% } %>
  648. </span>
  649. <% if (group.status !== auditConst.status.uncheck) { %>
  650. <span class="pull-right <%- auditConst.statusClass[group.status] %>"><%- auditConst.statusString[group.status] %></span>
  651. <% } %>
  652. </div>
  653. <div class="card">
  654. <div class="card-body px-3 py-0">
  655. <% for (const [i, auditor] of group.auditors.entries()) { %>
  656. <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
  657. <div class="col-10">
  658. <span class="h6"><%- auditor.name %></span>
  659. <span class="text-muted ml-1"><%- auditor.company %>
  660. <% if (auditor.role) { %>
  661. - <%= auditor.role %>
  662. <% } %>
  663. </span>
  664. </div>
  665. <div class="col">
  666. <% if (auditor.status === auditConst.status.checked) { %>
  667. <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
  668. <% } else if (auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre || auditor.status === auditConst.status.checkCancel) { %>
  669. <span class="pull-right text-warning"><i class="fa fa-share-square fa-rotate-270"></i></span>
  670. <% } %>
  671. </div>
  672. <% if (auditor.opinion) { %>
  673. <div class="col-12 py-1 bg-light"><i class="fa fa-commenting-o mr-1"></i><%- auditor.opinion%></div>
  674. <% } %>
  675. </div>
  676. <% } %>
  677. </div>
  678. </div>
  679. </div>
  680. </li>
  681. <% }) %>
  682. </ul>
  683. </div>
  684. <% }) %>
  685. </div>
  686. </div>
  687. </div>
  688. <form class="modal-footer" method="post" action="/tender/<%- ctx.tender.id %>/revise/audit/start" name="revise-start">
  689. <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>">
  690. <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
  691. <% if(revise.status === auditConst.status.checkNo && ctx.session.sessionUser.accountId === revise.uid) { %>
  692. <button class="btn btn-primary btn-sm sp-list-item" type="submit">确认上报</button>
  693. <% } %>
  694. </form>
  695. </div>
  696. </div>
  697. </div>
  698. <% include ../shares/batch_replace_modal.ejs %>
  699. <% include ../shares/upload_att.ejs %>
  700. <% include ../shares/merge_peg_modal.ejs %>
  701. <% include ../shares/import_excel_modal.ejs %>
  702. <% include ../shares/delete_hint_modal.ejs %>
  703. <% include ../shares/check_data_modal.ejs %>
  704. <% include ../shares/check_modal2.ejs %>
  705. <% include ../shares/new_tag_modal.ejs %>
  706. <% include ../shares/tender_select_modal.ejs %>';
  707. <% if(ctx.session.sessionUser.accountId === revise.uid && (revise.status === auditConst.status.uncheck || revise.status === auditConst.status.checkNo)) { %>
  708. <script>
  709. const cur_uid = '<%- ctx.session.sessionUser.accountId %>';
  710. const accountList = JSON.parse(unescape('<%- escape(JSON.stringify(accountList)) %>'));
  711. const accountGroup = JSON.parse(unescape('<%- escape(JSON.stringify(accountGroup )) %>'));
  712. const shenpi_status = <%- ctx.tender.info.shenpi.revise %>;
  713. const shenpiConst = JSON.parse('<%- JSON.stringify(shenpiConst) %>');
  714. let timer = null;
  715. let oldSearchVal = null;
  716. $('#gr-search').bind('input propertychange', function (e) {
  717. oldSearchVal = e.target.value
  718. timer && clearTimeout(timer)
  719. timer = setTimeout(() => {
  720. const newVal = $('#gr-search').val()
  721. let html = ''
  722. if (newVal && newVal === oldSearchVal) {
  723. accountList.filter(item => item && (item.name.indexOf(newVal) !== -1 || (item.mobile && item.mobile.indexOf(newVal) !== -1))).forEach(item => {
  724. html += `<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. $('.book-list').empty()
  731. $('.book-list').append(html)
  732. } else {
  733. if (!$('.acc-btn').length) {
  734. accountGroup.forEach((group, idx) => {
  735. if (!group) return
  736. html += `<dt><a href="javascript: void(0);" class="acc-btn" data-groupid="${idx}" data-type="hide"><i class="fa fa-plus-square"></i>
  737. </a> ${group.groupName}</dt>
  738. <div class="dd-content" data-toggleid="${idx}">`
  739. group.groupList.forEach(item => {
  740. if (item.id !== cur_uid) {
  741. html += `<dd class="border-bottom p-2 mb-0 " data-id="${item.id}" >
  742. <p class="mb-0 d-flex"><span class="text-primary">${item.name}</span><span
  743. class="ml-auto">${item.mobile || ''}</span></p>
  744. <span class="text-muted">${item.role || ''}</span>
  745. </dd>`
  746. }
  747. });
  748. html += '</div>'
  749. })
  750. $('.book-list').empty()
  751. $('.book-list').append(html)
  752. }
  753. }
  754. }, 400);
  755. });
  756. $('dl').on('click', 'dd', function () {
  757. const auditorId = parseInt($(this).data('id'));
  758. if (!auditorId) return;
  759. postData('/tender/<%- ctx.tender.id %>/revise/audit/add', { auditorId }, (datas) => {
  760. const html = [];
  761. // 如果是重新上报,添加到重新上报列表中
  762. const auditorshtml = [];
  763. for (const [index,data] of datas.entries()) {
  764. if (index !== 0) {
  765. html.push('<li class="list-group-item d-flex" auditorId="'+ data[0].audit_id +'">');
  766. html.push(`<div class="col-auto">${index}</div>`);
  767. html.push('<div class="col">');
  768. for (const auditor of data) {
  769. html.push(`<div class="d-inline-block mx-1"><i class="fa fa-user text-muted"></i> ${auditor.name} <small class="text-muted">${auditor.role}</small></div>`);
  770. }
  771. html.push('</div>');
  772. html.push('<div class="col-auto">');
  773. if (data[0].audit_type !== auditType.key.common) {
  774. html.push(`<span class="badge badge-pill badge-${auditType.info[data[0].audit_type].class} badge-bg-small"><small>${auditType.info[data[0].audit_type].long}</small></span>`);
  775. }
  776. if (shenpi_status === shenpiConst.sp_status.sqspr || (shenpi_status === shenpiConst.sp_status.gdzs && index+1 !== datas.length)) {
  777. html.push('<a href="javascript: void(0)" class="text-danger pull-right ml-1">移除</a>');
  778. }
  779. html.push('</div>');
  780. html.push('</li>');
  781. }
  782. auditorshtml.push('<li class="list-group-item" data-auditorid="' + data.audit_id + '">');
  783. auditorshtml.push('<i class="fa ' + (index+1 === datas.length ? 'fa-stop-circle' : 'fa-chevron-circle-down') + '"></i> ');
  784. auditorshtml.push(data.name + ' <small class="text-muted">' + data.role + '</small>');
  785. if (index === 0) {
  786. auditorshtml.push('<span class="pull-right">原报</span>');
  787. } else if (index+1 === datas.length) {
  788. auditorshtml.push('<span class="pull-right">终审</span>');
  789. } else {
  790. auditorshtml.push('<span class="pull-right">'+ transFormToChinese(index) +'审</span>');
  791. }
  792. auditorshtml.push('</li>');
  793. }
  794. $('#auditors').html(html.join(''));
  795. $('#auditors-list').html(auditorshtml.join(''));
  796. });
  797. });
  798. $('body').on('click', '#auditors li>div>a', function () {
  799. const li = $(this).parent().parent();
  800. const data = {
  801. auditorId: parseInt(li.attr('auditorId')),
  802. };
  803. postData('/tender/<%- ctx.tender.id %>/revise/audit/remove', data, (data2) => {
  804. li.remove();
  805. for (const a of data2) {
  806. const aLi = $('li[auditorId=' + a.audit_id + ']');
  807. aLi.children
  808. $('div:first', aLi).text(a.audit_order);
  809. }
  810. // 如果是重新上报
  811. // 令最后一个图标转换
  812. $('#auditors-list li[data-auditorid="' + data.auditorId + '"]').remove();
  813. if ($('#auditors-list li').length !== 0 && !$('#auditors-list li i').hasClass('fa-stop-circle')) {
  814. $('#auditors-list li').eq($('#auditors-list li').length - 1).children('i')
  815. .removeClass('fa-chevron-circle-down').addClass('fa-stop-circle');
  816. }
  817. // $('#auditors-list2 li[data-auditid="' + data.auditorId + '"]').remove();
  818. // if ($('#auditors-list2 li').length !== 0 && !$('#auditors-list2 li i').hasClass('fa-stop-circle')) {
  819. // $('#auditors-list2 li').eq($('#auditors-list2 li').length - 1).children('i')
  820. // .removeClass('fa-chevron-circle-down').addClass('fa-stop-circle');
  821. // }
  822. for (let i = 0; i < $('#auditors-list li').length; i++) {
  823. $('#auditors-list li').eq(i).find('.pull-right').text(i === 0 ? '原报' : (i+1 === $('#auditors-list li').length ? '终' : transFormToChinese(i)) + '审');
  824. // $('#auditors-list2 li').eq(i).find('.pull-right').text((i + 1 === $('#auditors-list2 li').length ? '终' : transFormToChinese(i + 1)) + '审');
  825. }
  826. });
  827. });
  828. // 添加审批流程按钮逻辑
  829. $('.book-list').on('click', 'dt', function () {
  830. const idx = $(this).find('.acc-btn').attr('data-groupid')
  831. const type = $(this).find('.acc-btn').attr('data-type')
  832. if (type === 'hide') {
  833. $(this).parent().find(`div[data-toggleid="${idx}"]`).show(() => {
  834. $(this).children().find('i').removeClass('fa-plus-square').addClass('fa-minus-square-o')
  835. $(this).find('.acc-btn').attr('data-type', 'show')
  836. })
  837. } else {
  838. $(this).parent().find(`div[data-toggleid="${idx}"]`).hide(() => {
  839. $(this).children().find('i').removeClass('fa-minus-square-o').addClass('fa-plus-square')
  840. $(this).find('.acc-btn').attr('data-type', 'hide')
  841. })
  842. }
  843. return false
  844. });
  845. $('#hideSp').click(function () {
  846. $('#sub-sp').modal('hide');
  847. });
  848. // 多层modal关闭后的滚动bug修复
  849. $('#sub-sp').on('hidden.bs.modal', function (e) {
  850. $(document.body).addClass('modal-open');
  851. });
  852. </script>
  853. <% } %>
  854. <script>
  855. $('.sp-list-btn').click(function () {
  856. const type = $(this).data('type')
  857. if (type === 'hide') {
  858. $('.sp-list-item').hide()
  859. $('.modal-title').text('审批流程')
  860. } else {
  861. $('.sp-list-item').show()
  862. $('.modal-title').text('重新上报')
  863. }
  864. });
  865. // 检查上报情况
  866. function checkAuditorFrom() {
  867. const content = $('#content').val();
  868. const orgContent = $('#content').attr('org-value');
  869. if (!content || content === '') {
  870. toastr.error('请先填写修订内容,再上报数据');
  871. return false;
  872. } else if (orgContent !== content) {
  873. toastr.warning('修订内容未保存,请先保存,再上报数据');
  874. return false;
  875. }
  876. if ($('#auditors li').length === 0) {
  877. if(shenpi_status === shenpiConst.sp_status.gdspl) {
  878. toastr.error('请联系管理员添加审批人');
  879. } else {
  880. toastr.error('请先选择审批人,再上报数据');
  881. }
  882. return false;
  883. }
  884. $('#hide-all').show();
  885. return true;
  886. }
  887. // texterea换行
  888. function auditCheck(i) {
  889. const opinion = $('textarea[name="opinion"]').eq(i).val().replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').replace(/\s/g, ' ');
  890. $('textarea[name="opinion"]').eq(i).val(opinion);
  891. return true;
  892. }
  893. $('.sp-location-list').on('shown.bs.modal', function () {
  894. const scrollBox = $(this).find('div[class="col-8 modal-height-500"]');
  895. const bdiv = (scrollBox.offset() && scrollBox.offset().top) || 0;
  896. scrollBox.scrollTop(0);
  897. const hdiv = divSearch($(this).find('textarea')) ? $(this).find('textarea') : null;
  898. const hdheight = hdiv ? hdiv.parents('.timeline-item-content').offset().top : null;
  899. if (hdiv && scrollBox.length && scrollBox[0].scrollHeight > 200 && hdheight - bdiv > 200) {
  900. scrollBox.scrollTop(hdheight - bdiv);
  901. }
  902. });
  903. function divSearch(div) {
  904. if (div.length > 0) {
  905. return true;
  906. }
  907. return false;
  908. }
  909. // 退回选择修改审批人流程
  910. $('#hideSp').click(function () {
  911. $('#sp-list').modal('hide');
  912. });
  913. $('a[f-target]').click(function () {
  914. $($(this).attr('f-target')).modal('show');
  915. });
  916. // 多层modal关闭后的滚动bug修复
  917. $('#sp-list').on('hidden.bs.modal', function (e) {
  918. $(document.body).addClass('modal-open');
  919. });
  920. // 展开历史审核记录
  921. $('.modal-body #fold-btn').click(function () {
  922. const type = $(this).data('target')
  923. const auditCard = $(this).parent().parent()
  924. if (type === 'show') {
  925. $(this).data('target', 'hide')
  926. auditCard.find('.fold-card').slideDown('swing', () => {
  927. auditCard.find('#fold-btn').text('收起历史审核记录')
  928. })
  929. } else {
  930. $(this).data('target', 'show')
  931. auditCard.find('.fold-card').slideUp('swing', () => {
  932. auditCard.find('#fold-btn').text('展开历史审核记录')
  933. })
  934. }
  935. });
  936. </script>