| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552 | 
							- <!--添加附件-->
 
- <div class="modal fade" id="addfujian">
 
-     <div class="modal-dialog" role="document">
 
-         <div class="modal-content">
 
-             <div class="modal-header">
 
-                 <h5 class="modal-title" id="myModalLabel">上传附件</h5>
 
-                 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
 
-                     <span aria-hidden="true">×</span>
 
-                 </button>
 
-             </div>
 
-             <div class="modal-body">
 
-                 <div class="form-group">
 
-                     <label for="file-modal">单个文件大小限制:30MB,支持office等文档格式、图片格式、压缩包格式</label>
 
-                     <!-- <p><a href="javascript: void(0);" class="btn btn-primary" id="file-modal-target">选择文件</a></p> -->
 
-                     <input type="file" id="file-modal" multiple="multiple">
 
-                 </div>
 
-                 <div>
 
-                     <% for (const t of changeConst.file_type) { %>
 
-                         <div class="form-check form-check-inline">
 
-                             <input class="form-check-input" type="radio" name="type" id="file_type_<%- t.key %>" value="<%- t.key %>">
 
-                             <label class="form-check-label" for="file_type_<%- t.key %>"><%- t.value %></label>
 
-                         </div>
 
-                     <% } %>
 
-                 </div>
 
-             </div>
 
-             <div class="modal-footer">
 
-                 <button id="file-cancel" type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">取消</button>
 
-                 <button id="file-ok" type="button" class="btn btn-primary btn-sm">添加</button>
 
-             </div>
 
-         </div>
 
-     </div>
 
- </div>
 
- <% if ((ctx.change.status === auditConst.status.uncheck || ctx.change.status === auditConst.status.checkNo || ctx.change.status === auditConst.status.revise) && (ctx.session.sessionUser.accountId === ctx.change.uid || ctx.tender.isTourist)) { %>
 
-     <!--上报审批-->
 
-     <div class="modal fade" id="sub-sp" data-backdrop="static">
 
-         <div class="modal-dialog" role="document">
 
-             <div class="modal-content">
 
-                 <div class="modal-header">
 
-                     <h5 class="modal-title">上报审批</h5>
 
-                 </div>
 
-                 <div class="modal-body">
 
-                     <div class="dropdown text-right">
 
-                         <% if (ctx.tender.info.shenpi.change !== shenpiConst.sp_status.gdspl) { %>
 
-                             <button class="btn btn-outline-primary btn-sm dropdown-toggle" type="button"
 
-                                     id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true"
 
-                                     aria-expanded="false">
 
-                                 添加审批流程
 
-                             </button>
 
-                             <div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton"
 
-                                  style="width:220px">
 
-                                 <div class="mb-2 p-2"><input class="form-control form-control-sm"
 
-                                                              placeholder="姓名/手机 检索" id="gr-search" autocomplete="off"></div>
 
-                                 <dl class="list-unstyled book-list search-user-list">
 
-                                     <% accountGroup.forEach((group, idx) => { %>
 
-                                         <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>" data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
 
-                                         <div class="dd-content" data-toggleid="<%- idx %>">
 
-                                             <% group.groupList.forEach(item => { %>
 
-                                                 <% if (item.id !== ctx.session.sessionUser.accountId) { %>
 
-                                                     <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>" >
 
-                                                         <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
 
-                                                                     class="ml-auto"><%- item.mobile %></span></p>
 
-                                                         <span class="text-muted"><%- item.role %></span>
 
-                                                     </dd>
 
-                                                 <% } %>
 
-                                             <% });%>
 
-                                         </div>
 
-                                     <% }) %>
 
-                                 </dl>
 
-                             </div>
 
-                         <% } else if(spGroupList.length > 0) { %>
 
-                             <div class="row">
 
-                                 <div class="col-7"></div>
 
-                                 <div class="col-5">
 
-                                     <select class="form-control form-control-sm" id="change-sp-group">
 
-                                         <% for (const g of spGroupList) { %>
 
-                                             <option value="<%= g.id %>" <% if (g.id === change.sp_group) { %>selected<% } %>><%= g.name %></option>
 
-                                         <% } %>
 
-                                     </select>
 
-                                 </div>
 
-                             </div>
 
-                         <% } %>
 
-                     </div>
 
-                     <div class="card mt-3">
 
-                         <div class="card-header">
 
-                             审批流程
 
-                         </div>
 
-                         <div class="modal-height-500" style="overflow: auto">
 
-                             <ul class="list-group list-group-flush" id="auditors">
 
-                                 <% for (let i = 0, iLen = ctx.change.auditorGroups.length; i < iLen; i++) { %>
 
-                                     <li class="list-group-item d-flex" auditorId="<%- ctx.change.auditorGroups[i][0].aid %>">
 
-                                         <div class="col-auto"><%- i+1 %></div>
 
-                                         <div class="col">
 
-                                             <% for (const auditor of ctx.change.auditorGroups[i]) { %>
 
-                                                 <div class="d-inline-block mx-1" auditorId="<%- auditor.aid %>">
 
-                                                     <i class="fa fa-user text-muted"></i> <%- auditor.name %> <small class="text-muted"><%- auditor.role %></small>
 
-                                                 </div>
 
-                                             <% } %>
 
-                                         </div>
 
-                                         <div class="col-auto">
 
-                                             <% if (ctx.change.auditorGroups[i][0].audit_type !== auditType.key.common) { %>
 
-                                                 <span class="badge badge-pill badge-<%- auditType.info[ctx.change.auditorGroups[i][0].audit_type].class %> badge-bg-small"><small><%- auditType.info[ctx.change.auditorGroups[i][0].audit_type].long%></small></span>
 
-                                             <% } %>
 
-                                             <% if ((ctx.tender.info.shenpi.change === shenpiConst.sp_status.sqspr ||
 
-                                                     (ctx.tender.info.shenpi.change === shenpiConst.sp_status.gdzs && i+1 !== iLen)) && ctx.session.sessionUser.accountId === ctx.change.uid) { %>
 
-                                                 <a href="javascript: void(0)" class="text-danger pull-right">移除</a>
 
-                                             <% } %>
 
-                                         </div>
 
-                                     </li>
 
-                                 <% } %>
 
-                             </ul>
 
-                         </div>
 
-                     </div>
 
-                 </div>
 
-                 <form class="modal-footer" method="post" action="<%- preUrl %>/audit/start" onsubmit="return checkAuditorFrom()">
 
-                     <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
 
-                     <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>">
 
-                     <% if (ctx.session.sessionUser.accountId === ctx.change.uid) { %>
 
-                         <button class="btn btn-primary btn-sm" type="submit">确认上报</button>
 
-                     <% } %>
 
-                 </form>
 
-             </div>
 
-         </div>
 
-     </div>
 
-     <!-- 数量读取规则 -->
 
-     <div class="modal fade" id="shuliangguize" data-backdrop="static">
 
-         <div class="modal-dialog" role="document">
 
-             <div class="modal-content">
 
-                 <div class="modal-header">
 
-                     <h5 class="modal-title">原设计数量读取规则</h5>
 
-                 </div>
 
-                 <div class="modal-body">
 
-                     <div class="form-group">
 
-                         <label for="">数据来源</label>
 
-                         <div>
 
-                             <div class="form-check form-check-inline">
 
-                                 <input class="form-check-input" type="radio" name="data_source" id="gclGather" value="1" <% if(listRule.source === 1) { %>checked<% } %>>
 
-                                 <label class="form-check-label" for="gclGather">台账数量</label>
 
-                             </div>
 
-                             <div class="form-check form-check-inline">
 
-                                 <input class="form-check-input" type="radio" name="data_source" id="dealBills" value="2" <% if(listRule.source === 2) { %>checked<% } %>>
 
-                                 <label class="form-check-label" for="dealBills">签约数量</label>
 
-                             </div>
 
-                         </div>
 
-                     </div>
 
-                     <div class="form-group">
 
-                         <label for="">匹配规则</label>
 
-                         <div>
 
-                             <div class="form-check form-check-inline">
 
-                                 <input class="form-check-input" type="checkbox" id="rule_code" value="code" disabled checked>
 
-                                 <label class="form-check-label" for="rule_code">编号</label>
 
-                             </div>
 
-                             <div class="form-check form-check-inline">
 
-                                 <input class="form-check-input" type="checkbox" id="rule_code" value="name" disabled checked>
 
-                                 <label class="form-check-label" for="rule_code">名称</label>
 
-                             </div>
 
-                             <div class="form-check form-check-inline">
 
-                                 <input class="form-check-input" name="data_rule" type="checkbox" id="rule_unit" value="unit" <% if(ctx.helper._.indexOf(listRule.rule, 'unit') !== -1) { %>checked<% } %>>
 
-                                 <label class="form-check-label" for="rule_unit">单位</label>
 
-                             </div>
 
-                             <div class="form-check form-check-inline">
 
-                                 <input class="form-check-input" name="data_rule" type="checkbox" id="rule_unitprice" value="unit_price" <% if(ctx.helper._.indexOf(listRule.rule, 'unit_price') !== -1) { %>checked<% } %>>
 
-                                 <label class="form-check-label" for="rule_unitprice">单价</label>
 
-                             </div>
 
-                         </div>
 
-                     </div>
 
-                 </div>
 
-                 <div class="modal-footer">
 
-                     <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">取消</button>
 
-                     <button type="button" class="btn btn-primary btn-sm" id="setListRule">确定</button>
 
-                 </div>
 
-             </div>
 
-         </div>
 
-     </div>
 
-     <% if (ctx.change.status === auditConst.status.revise && (ctx.session.sessionUser.accountId === ctx.change.uid || ctx.session.sessionUser.is_admin)) { %>
 
-         <!--撤销修订-->
 
-         <div class="modal fade" id="sub-revoke"  role="dialog" aria-labelledby="myModalLabel">
 
-             <div class="modal-dialog" role="document">
 
-                 <form id="reviseForm" class="modal-content" method="post" action="/tender/<%- tender.id %>/change/apply/cancel/revise" onsubmit="return false;">
 
-                     <div class="modal-header">
 
-                         <h5 class="modal-title" id="myModalLabel">撤销修订</h5>
 
-                         <button type="button" class="close" data-dismiss="modal" aria-label="Close">
 
-                             <span aria-hidden="true">×</span>
 
-                         </button>
 
-                     </div>
 
-                     <div class="modal-body">
 
-                         <h5>撤销修订,所有修改的数据将全部会被还原。</h5>
 
-                         <h5>确认撤销修订?</h5>
 
-                     </div>
 
-                     <div class="modal-footer">
 
-                         <input type="hidden" name="caid" value="<%= ctx.change.id %>">
 
-                         <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
 
-                         <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
 
-                         <button type="button" id="cancel-revise-btn" class="btn btn-primary btn-sm">确认</button>
 
-                     </div>
 
-                 </form>
 
-             </div>
 
-         </div>
 
-     <% } %>
 
- <% } %>
 
- <% if(ctx.change && (ctx.change.status !== auditConst.status.uncheck)) { %>
 
-     <!--审批流程/结果-->
 
-     <div class="modal fade" id="sp-list" data-backdrop="static">
 
-         <div class="modal-dialog modal-lg" role="document">
 
-             <div class="modal-content">
 
-                 <div class="modal-header">
 
-                     <h5 class="modal-title"><%- ctx.change.status === auditConst.status.checkNo || ctx.change.status === auditConst.status.revise ? '重新上报' : '审批流程' %></h5>
 
-                 </div>
 
-                 <div class="modal-body">
 
-                     <div class="row">
 
-                         <div class="col-4">
 
-                             <% if(ctx.change.status === auditConst.status.checkNo || ctx.change.status === auditConst.status.revise) { %>
 
-                                 <a class="sp-list-item" href="#sub-sp" data-toggle="modal" data-target="#sub-sp" id="hideSp">修改审批流程</a>
 
-                             <% } else if(ctx.change.status !== auditConst.status.checked && ctx.session.sessionUser.is_admin) { %>
 
-                                 <a class="sp-list-item" href="#sub-sp2" data-toggle="modal" data-target="#sub-sp2" id="hideSp">修改审批流程</a>
 
-                             <% } %>
 
-                             <div class="card modal-height-500 mt-3" style="overflow: auto">
 
-                                 <ul class="list-group list-group-flush auditors-list" id="auditors-list">
 
-                                     <% ctx.change.auditors2.forEach((item, idx) => { %>
 
-                                         <% if (idx === 0) { %>
 
-                                             <li class="list-group-item d-flex justify-content-between align-items-center">
 
-                                                 <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
 
-                                                 <span class="text-muted">
 
-                                                     <% for (const u of item) { %>
 
-                                                         <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
 
-                                                     <% } %>
 
-                                                 </span>
 
-                                                 <span class="badge badge-light badge-pill ml-auto"><small>原报</small></span>
 
-                                             </li>
 
-                                         <% } else if(idx === ctx.change.auditors2.length -1 && idx !== 0) { %>
 
-                                             <li class="list-group-item d-flex justify-content-between align-items-center" data-auditorid="<%- item[0].aid %>">
 
-                                                 <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
 
-                                                 <span class="text-muted">
 
-                                                     <% for (const u of item) { %>
 
-                                                         <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
 
-                                                     <% } %>
 
-                                                 </span>
 
-                                                 <div class="d-flex ml-auto">
 
-                                                     <% if (item[0].audit_type !== auditType.key.common) { %>
 
-                                                         <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>
 
-                                                     <% } %>
 
-                                                     <span class="badge badge-light badge-pill"><small>终审</small></span>
 
-                                                 </div>
 
-                                             </li>
 
-                                         <% } else {%>
 
-                                             <li class="list-group-item d-flex justify-content-between align-items-center" data-auditorid="<%- item[0].aid %>">
 
-                                                 <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
 
-                                                 <span class="text-muted">
 
-                                                     <% for (const u of item) { %>
 
-                                                         <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
 
-                                                     <% } %>
 
-                                                 </span>
 
-                                                 <div class="d-flex ml-auto">
 
-                                                     <% if (item[0].audit_type !== auditType.key.common) { %>
 
-                                                         <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>
 
-                                                     <% } %>
 
-                                                     <span class="badge badge-light badge-pill"><small><%= ctx.helper.transFormToChinese(idx) %>审</small></span>
 
-                                                 </div>
 
-                                             </li>
 
-                                         <% } %>
 
-                                     <% }) %>
 
-                                 </ul>
 
-                             </div>
 
-                         </div>
 
-                         <div class="col-8 modal-height-500" style="overflow: auto">
 
-                             <% ctx.change.auditHistory.forEach((his, idx) => { %>
 
-                                 <!-- 展开/收起历史流程 -->
 
-                                 <% if(idx === ctx.change.auditHistory.length - 1 && ctx.change.auditHistory.length !== 1) { %>
 
-                                     <div class="text-right">
 
-                                         <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
 
-                                     </div>
 
-                                 <% } %>
 
-                                 <div class="<%- idx < ctx.change.auditHistory.length - 1 ? 'fold-card' : '' %>">
 
-                                     <div class="text-center text-muted"><%- idx+1 %>#</div>
 
-                                     <ul class="timeline-list list-unstyled mt-2 <% if (idx === ctx.change.auditHistory.length - 1) { %>last-auditor-list<% } %>">
 
-                                         <% his.forEach((group, index) => { %>
 
-                                             <% if (index === 0) { %>
 
-                                                 <li class="timeline-list-item pb-2">
 
-                                                     <div class="timeline-item-date">
 
-                                                         <%- group.beginYear %>
 
-                                                         <span><%- group.beginDate %></span>
 
-                                                         <span><%- group.beginTime %></span>
 
-                                                     </div>
 
-                                                     <div class="timeline-item-tail"></div>
 
-                                                     <div class="timeline-item-icon bg-success text-light"><i class="fa fa-caret-down"></i></div>
 
-                                                     <div class="timeline-item-content">
 
-                                                         <div class="py-1">
 
-                                                             <span class="text-black-50">原报</span>
 
-                                                             <span class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
 
-                                                         </div>
 
-                                                         <div class="card">
 
-                                                             <div class="card-body px-3 py-0">
 
-                                                                 <div class="card-text p-2 py-3 row">
 
-                                                                     <div class="col">
 
-                                                                         <span class="h6"><%- ctx.change.user.name %></span>
 
-                                                                         <span class="text-muted ml-1"><%- ctx.change.user.role %></span>
 
-                                                                     </div>
 
-                                                                     <div class="col">
 
-                                                                         <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
 
-                                                                     </div>
 
-                                                                 </div>
 
-                                                             </div>
 
-                                                         </div>
 
-                                                     </div>
 
-                                                 </li>
 
-                                             <% } %>
 
-                                             <li class="timeline-list-item pb-2 <% if (group.status === auditConst.status.uncheck && idx === ctx.change.auditHistory.length - 1) { %>is_uncheck<% } %>">
 
-                                                 <% if (group.endYear) { %>
 
-                                                     <div class="timeline-item-date">
 
-                                                         <%- group.endYear %>
 
-                                                         <span><%- group.endDate %></span>
 
-                                                         <span><%- group.endTime %></span>
 
-                                                     </div>
 
-                                                 <% } %>
 
-                                                 <% if (index < his.length - 1) { %>
 
-                                                     <div class="timeline-item-tail"></div>
 
-                                                 <% } %>
 
-                                                 <% if (group.status === auditConst.status.checked || group.status === auditConst.status.cancelRevise) { %>
 
-                                                     <div class="timeline-item-icon bg-success text-light"><i class="fa fa-check"></i></div>
 
-                                                 <% } else if (ctx.helper._.includes([auditConst.status.checkNo, auditConst.status.revise, auditConst.status.checkCancel], group.status)) { %>
 
-                                                     <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-level-up"></i></div>
 
-                                                 <% } else if (group.status === auditConst.status.checking) { %>
 
-                                                     <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-ellipsis-h"></i></div>
 
-                                                 <% } else if(group.status === auditConst.status.checkAgain) {%>
 
-                                                     <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-check"></i></div>
 
-                                                 <% } else { %>
 
-                                                     <div class="timeline-item-icon bg-secondary text-light"></div>
 
-                                                 <% } %>
 
-                                                 <div class="timeline-item-content">
 
-                                                     <div class="py-1">
 
-                                                     <span class="text-black-50">
 
-                                                         <%- (group.audit_order === 0 ? '原报' : !group.is_final ? group.audit_order + '审' : '终审') %>
 
-                                                         <% if (group.audit_type !== auditType.key.common) { %><span class="text-<%- auditType.info[group.audit_type].class %> "><%- auditType.info[group.audit_type].long %></span><% } %>
 
-                                                     </span>
 
-                                                         <% if (group.status !== auditConst.status.uncheck) { %>
 
-                                                             <span class="pull-right <%- auditConst.statusClass[group.status] %>"><%- auditConst.statusString[group.status] %></span>
 
-                                                         <% } %>
 
-                                                     </div>
 
-                                                     <div class="card">
 
-                                                         <div class="card-body px-3 py-0">
 
-                                                             <% for (const [i, auditor] of group.auditors.entries()) { %>
 
-                                                                 <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
 
-                                                                     <div class="col">
 
-                                                                         <span class="h6"><%- auditor.name %></span>
 
-                                                                         <span class="text-muted ml-1"><%- auditor.role %></span>
 
-                                                                     </div>
 
-                                                                     <div class="col">
 
-                                                                         <% if (auditor.status === auditConst.status.checked || auditor.status === auditConst.status.cancelRevise) { %>
 
-                                                                             <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
 
-                                                                         <% } else if (ctx.helper._.includes([auditConst.status.checkNo, auditConst.status.revise, auditConst.status.checkCancel], auditor.status)) { %>
 
-                                                                             <span class="pull-right text-warning"><i class="fa fa-share-square fa-rotate-270"></i></span>
 
-                                                                         <% } else if(auditor.status === auditConst.status.checkAgain) {%>
 
-                                                                             <span class="pull-right text-warning"><i class="fa fa-check-circle"></i></span>
 
-                                                                         <% } else if (auditor.status === auditConst.status.checking) { %>
 
-                                                                             <span class="pull-right text-warning"><i class="fa fa-commenting"></i></span>
 
-                                                                         <% } %>
 
-                                                                     </div>
 
-                                                                     <% if (auditor.opinion) { %>
 
-                                                                         <div class="col-12 py-1 bg-light"><i class="fa fa-commenting-o mr-1"></i><%- auditor.opinion %></div>
 
-                                                                     <% } %>
 
-                                                                 </div>
 
-                                                             <% } %>
 
-                                                         </div>
 
-                                                     </div>
 
-                                                 </div>
 
-                                             </li>
 
-                                         <% }) %>
 
-                                     </ul>
 
-                                 </div>
 
-                             <% }) %>
 
-                         </div>
 
-                     </div>
 
-                 </div>
 
-                 <form class="modal-footer" method="post" action="<%- preUrl %>/audit/start" onsubmit="return checkAuditorFrom()">
 
-                     <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>">
 
-                     <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
 
-                     <% if((ctx.change.status === auditConst.status.checkNo || ctx.change.status === auditConst.status.revise) && ctx.session.sessionUser.accountId === ctx.change.uid) { %>
 
-                         <button class="btn btn-primary btn-sm sp-list-item" type="submit">确认上报</button>
 
-                     <% } %>
 
-                 </form>
 
-             </div>
 
-         </div>
 
-     </div>
 
- <% } %>
 
- <% if (ctx.change.status === auditConst.status.checking) { %>
 
-     <% if (ctx.change.curAuditorIds.indexOf(ctx.session.sessionUser.accountId) >= 0) { %>
 
-         <!--审批通过-->
 
-         <div class="modal fade sp-location-list" id="sp-done" data-backdrop="static">
 
-             <div class="modal-dialog modal-lg" role="document">
 
-                 <form class="modal-content" action="<%- preUrl %>/audit/check" method="post" onsubmit="return auditCheck(0);">
 
-                     <div class="modal-header">
 
-                         <h5 class="modal-title">审批通过</h5>
 
-                     </div>
 
-                     <div class="modal-body">
 
-                         <div class="row">
 
-                             <div class="col-4">
 
-                                 <% if(ctx.change.status !== auditConst.status.checked && ctx.session.sessionUser.is_admin) { %>
 
-                                     <a class="sp-list-item" href="#sub-sp2" data-toggle="modal" data-target="#sub-sp2" id="hideSp">修改审批流程</a>
 
-                                 <% } %>
 
-                                 <div class="card modal-height-500 mt-3" style="overflow: auto">
 
-                                     <ul class="list-group list-group-flush auditors-list">
 
-                                         <% ctx.change.auditors2.forEach((item, idx) => { %>
 
-                                             <% if (idx === 0) { %>
 
-                                                 <li class="list-group-item d-flex justify-content-between align-items-center">
 
-                                                     <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
 
-                                                     <span class="text-muted">
 
-                                                         <% for (const u of item) { %>
 
-                                                             <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
 
-                                                         <% } %>
 
-                                                     </span>
 
-                                                     <span class="badge badge-light badge-pill ml-auto"><small>原报</small></span>
 
-                                                 </li>
 
-                                             <% } else if(idx === ctx.change.auditors2.length -1 && idx !== 0) { %>
 
-                                                 <li class="list-group-item d-flex justify-content-between align-items-center">
 
-                                                     <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
 
-                                                     <span class="text-muted">
 
-                                                         <% for (const u of item) { %>
 
-                                                             <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
 
-                                                         <% } %>
 
-                                                     </span>
 
-                                                     <div class="d-flex ml-auto">
 
-                                                         <% if (item[0].audit_type !== auditType.key.common) { %>
 
-                                                             <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>
 
-                                                         <% } %>
 
-                                                         <span class="badge badge-light badge-pill"><small>终审</small></span>
 
-                                                     </div>
 
-                                                 </li>
 
-                                             <% } else {%>
 
-                                                 <li class="list-group-item d-flex justify-content-between align-items-center">
 
-                                                     <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
 
-                                                     <span class="text-muted">
 
-                                                         <% for (const u of item) { %>
 
-                                                             <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
 
-                                                         <% } %>
 
-                                                     </span>
 
-                                                     <div class="d-flex ml-auto">
 
-                                                         <% if (item[0].audit_type !== auditType.key.common) { %>
 
-                                                             <span class="badge badge-pill badge-<%-  auditType.info[item[0].audit_type].class %> p-1 ml-auto"><small><%- auditType.info[item[0].audit_type].short %></small></span>
 
-                                                         <% } %>
 
-                                                         <span class="badge badge-light badge-pill"><small><%= ctx.helper.transFormToChinese(idx) %>审</small></span>
 
-                                                     </div>
 
-                                                 </li>
 
-                                             <% } %>
 
-                                         <% }) %>
 
-                                     </ul>
 
-                                 </div>
 
-                             </div>
 
-                             <div class="col-8 modal-height-500" style="overflow: auto">
 
-                                 <% ctx.change.auditHistory.forEach((his, idx) => { %>
 
-                                     <!-- 展开/收起历史流程 -->
 
-                                     <% if(idx === ctx.change.auditHistory.length - 1 && ctx.change.auditHistory.length !== 1) { %>
 
-                                         <div class="text-right">
 
-                                             <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
 
-                                         </div>
 
-                                     <% } %>
 
-                                     <div class="<%- idx < ctx.change.auditHistory.length - 1 ? 'fold-card' : '' %>">
 
-                                         <div class="text-center text-muted"><%- idx+1 %>#</div>
 
-                                         <ul class="timeline-list list-unstyled mt-2 <% if (idx === ctx.change.auditHistory.length - 1) { %>last-auditor-list<% } %>">
 
-                                             <% his.forEach((group, index) => { %>
 
-                                                 <% if (index === 0) { %>
 
-                                                     <li class="timeline-list-item pb-2">
 
-                                                         <div class="timeline-item-date">
 
-                                                             <%- group.beginYear %>
 
-                                                             <span><%- group.beginDate %></span>
 
-                                                             <span><%- group.beginTime %></span>
 
-                                                         </div>
 
-                                                         <div class="timeline-item-tail"></div>
 
-                                                         <div class="timeline-item-icon bg-success text-light"><i class="fa fa-caret-down"></i></div>
 
-                                                         <div class="timeline-item-content">
 
-                                                             <div class="py-1">
 
-                                                                 <span class="text-black-50">原报</span>
 
-                                                                 <span class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
 
-                                                             </div>
 
-                                                             <div class="card">
 
-                                                                 <div class="card-body px-3 py-0">
 
-                                                                     <div class="card-text p-2 py-3 row">
 
-                                                                         <div class="col">
 
-                                                                             <span class="h6"><%- ctx.change.user.name %></span>
 
-                                                                             <span class="text-muted ml-1"><%- ctx.change.user.role %></span>
 
-                                                                         </div>
 
-                                                                         <div class="col">
 
-                                                                             <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
 
-                                                                         </div>
 
-                                                                     </div>
 
-                                                                 </div>
 
-                                                             </div>
 
-                                                         </div>
 
-                                                     </li>
 
-                                                 <% } %>
 
-                                                 <li class="timeline-list-item pb-2 <% if (group.status === auditConst.status.uncheck && idx === ctx.change.auditHistory.length - 1) { %>is_uncheck<% } %>">
 
-                                                     <% if (group.endYear) { %>
 
-                                                         <div class="timeline-item-date">
 
-                                                             <%- group.endYear %>
 
-                                                             <span><%- group.endDate %></span>
 
-                                                             <span><%- group.endTime %></span>
 
-                                                         </div>
 
-                                                     <% } %>
 
-                                                     <% if (index < his.length - 1) { %>
 
-                                                         <div class="timeline-item-tail"></div>
 
-                                                     <% } %>
 
-                                                     <% if (group.status === auditConst.status.checked || group.status === auditConst.status.cancelRevise) { %>
 
-                                                         <div class="timeline-item-icon bg-success text-light"><i class="fa fa-check"></i></div>
 
-                                                     <% } else if (ctx.helper._.includes([auditConst.status.checkNo, auditConst.status.revise, auditConst.status.checkCancel], group.status)) { %>
 
-                                                         <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-level-up"></i></div>
 
-                                                     <% } else if (group.status === auditConst.status.checking) { %>
 
-                                                         <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-ellipsis-h"></i></div>
 
-                                                     <% } else if(group.status === auditConst.status.checkAgain) {%>
 
-                                                         <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-check"></i></div>
 
-                                                     <% } else { %>
 
-                                                         <div class="timeline-item-icon bg-secondary text-light"></div>
 
-                                                     <% } %>
 
-                                                     <div class="timeline-item-content">
 
-                                                         <div class="py-1">
 
-                                                         <span class="text-black-50">
 
-                                                             <%- (group.audit_order === 0 ? '原报' : !group.is_final ? group.audit_order + '审' : '终审') %>
 
-                                                             <% if (group.audit_type !== auditType.key.common) { %><span class="text-<%- auditType.info[group.audit_type].class %> "><%- auditType.info[group.audit_type].long %></span><% } %>
 
-                                                         </span>
 
-                                                             <% if (group.status !== auditConst.status.uncheck) { %>
 
-                                                                 <span class="pull-right <%- auditConst.statusClass[group.status] %>"><%- auditConst.statusString[group.status] %></span>
 
-                                                             <% } %>
 
-                                                         </div>
 
-                                                         <div class="card">
 
-                                                             <div class="card-body px-3 py-0">
 
-                                                                 <% for (const [i, auditor] of group.auditors.entries()) { %>
 
-                                                                     <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
 
-                                                                         <div class="col">
 
-                                                                             <span class="h6"><%- auditor.name %></span>
 
-                                                                             <span class="text-muted ml-1"><%- auditor.role %></span>
 
-                                                                         </div>
 
-                                                                         <div class="col">
 
-                                                                             <% if (auditor.status === auditConst.status.checked || auditor.status === auditConst.status.cancelRevise) { %>
 
-                                                                                 <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
 
-                                                                             <% } else if (ctx.helper._.includes([auditConst.status.checkNo, auditConst.status.revise, auditConst.status.checkCancel], auditor.status)) { %>
 
-                                                                                 <span class="pull-right text-warning"><i class="fa fa-share-square fa-rotate-270"></i></span>
 
-                                                                             <% } else if(auditor.status === auditConst.status.checkAgain) {%>
 
-                                                                                 <span class="pull-right text-warning"><i class="fa fa-check-circle"></i></span>
 
-                                                                             <% } else if (auditor.status === auditConst.status.checking) { %>
 
-                                                                                 <span class="pull-right text-warning"><i class="fa fa-commenting"></i></span>
 
-                                                                             <% } %>
 
-                                                                         </div>
 
-                                                                         <% if (auditor.status !== auditConst.status.uncheck && auditor.opinion) { %>
 
-                                                                             <div class="col-12 py-1 bg-light"><i class="fa fa-commenting-o mr-1"></i><%- auditor.opinion%></div>
 
-                                                                         <% } %>
 
-                                                                         <% if (auditor.status === auditConst.status.checking && auditor.aid === ctx.session.sessionUser.accountId) { %>
 
-                                                                             <div class="col-12 py-1 bg-light">
 
-                                                                                 <textarea class="form-control form-control-sm" name="opinion">同意</textarea>
 
-                                                                             </div>
 
-                                                                         <% } %>
 
-                                                                     </div>
 
-                                                                 <% } %>
 
-                                                             </div>
 
-                                                         </div>
 
-                                                     </div>
 
-                                                 </li>
 
-                                             <% }) %>
 
-                                         </ul>
 
-                                     </div>
 
-                                 <% }) %>
 
-                             </div>
 
-                         </div>
 
-                     </div>
 
-                     <div class="modal-footer">
 
-                         <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
 
-                         <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
 
-                         <input type="hidden" name="checkType" value="<%= auditConst.status.checked %>" />
 
-                         <button type="submit" class="btn btn-success btn-sm">确认通过</button>
 
-                     </div>
 
-                 </form>
 
-             </div>
 
-         </div>
 
-         <!--审批退回-->
 
-         <div class="modal fade sp-location-list" id="sp-back" data-backdrop="static">
 
-             <div class="modal-dialog modal-lg" role="document">
 
-                 <form class="modal-content modal-lg" action="<%- preUrl %>/audit/check" method="post"
 
-                       onsubmit="return auditCheck(1);">
 
-                     <div class="modal-header">
 
-                         <h5 class="modal-title">审批退回</h5>
 
-                     </div>
 
-                     <div class="modal-body">
 
-                         <div class="row">
 
-                             <div class="col-4">
 
-                                 <% if(ctx.change.status !== auditConst.status.checked && ctx.session.sessionUser.is_admin) { %>
 
-                                     <a class="sp-list-item" href="#sub-sp2" data-toggle="modal" data-target="#sub-sp2" id="hideSp">修改审批流程</a>
 
-                                 <% } %>
 
-                                 <div class="card modal-height-500 mt-3" style="overflow: auto">
 
-                                     <ul class="list-group list-group-flush auditors-list">
 
-                                         <% ctx.change.auditors2.forEach((item, idx) => { %>
 
-                                             <% if (idx === 0) { %>
 
-                                                 <li class="list-group-item d-flex justify-content-between align-items-center">
 
-                                                     <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
 
-                                                     <span class="text-muted">
 
-                                                         <% for (const u of item) { %>
 
-                                                             <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
 
-                                                         <% } %>
 
-                                                     </span>
 
-                                                     <span class="badge badge-light badge-pill ml-auto"><small>原报</small></span>
 
-                                                 </li>
 
-                                             <% } else if(idx === ctx.change.auditors2.length -1 && idx !== 0) { %>
 
-                                                 <li class="list-group-item d-flex justify-content-between align-items-center">
 
-                                                     <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
 
-                                                     <span class="text-muted">
 
-                                                         <% for (const u of item) { %>
 
-                                                             <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
 
-                                                         <% } %>
 
-                                                     </span>
 
-                                                     <div class="d-flex ml-auto">
 
-                                                         <% if (item[0].audit_type !== auditType.key.common) { %>
 
-                                                             <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>
 
-                                                         <% } %>
 
-                                                         <span class="badge badge-light badge-pill"><small>终审</small></span>
 
-                                                     </div>
 
-                                                 </li>
 
-                                             <% } else {%>
 
-                                                 <li class="list-group-item d-flex justify-content-between align-items-center">
 
-                                                     <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
 
-                                                     <span class="text-muted">
 
-                                                         <% for (const u of item) { %>
 
-                                                             <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
 
-                                                         <% } %>
 
-                                                     </span>
 
-                                                     <div class="d-flex ml-auto">
 
-                                                         <% if (item[0].audit_type !== auditType.key.common) { %>
 
-                                                             <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>
 
-                                                         <% } %>
 
-                                                         <span class="badge badge-light badge-pill"><small><%= ctx.helper.transFormToChinese(idx) %>审</small></span>
 
-                                                     </div>
 
-                                                 </li>
 
-                                             <% } %>
 
-                                         <% }) %>
 
-                                     </ul>
 
-                                 </div>
 
-                             </div>
 
-                             <div class="col-8 modal-height-500" style="overflow: auto">
 
-                                 <% ctx.change.auditHistory.forEach((his, idx) => { %>
 
-                                     <!-- 展开/收起历史流程 -->
 
-                                     <% if(idx === ctx.change.auditHistory.length - 1 && ctx.change.auditHistory.length !== 1) { %>
 
-                                         <div class="text-right">
 
-                                             <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
 
-                                         </div>
 
-                                     <% } %>
 
-                                     <div class="<%- idx < ctx.change.auditHistory.length - 1 ? 'fold-card' : '' %>">
 
-                                         <div class="text-center text-muted"><%- idx+1 %>#</div>
 
-                                         <ul class="timeline-list list-unstyled mt-2 <% if (idx === ctx.change.auditHistory.length - 1) { %>last-auditor-list<% } %>">
 
-                                             <% his.forEach((group, index) => { %>
 
-                                                 <% if (index === 0) { %>
 
-                                                     <li class="timeline-list-item pb-2">
 
-                                                         <div class="timeline-item-date">
 
-                                                             <%- group.beginYear %>
 
-                                                             <span><%- group.beginDate %></span>
 
-                                                             <span><%- group.beginTime %></span>
 
-                                                         </div>
 
-                                                         <div class="timeline-item-tail"></div>
 
-                                                         <div class="timeline-item-icon bg-success text-light"><i class="fa fa-caret-down"></i></div>
 
-                                                         <div class="timeline-item-content">
 
-                                                             <div class="py-1">
 
-                                                                 <span class="text-black-50">原报</span>
 
-                                                                 <span class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
 
-                                                             </div>
 
-                                                             <div class="card">
 
-                                                                 <div class="card-body px-3 py-0">
 
-                                                                     <div class="card-text p-2 py-3 row">
 
-                                                                         <div class="col">
 
-                                                                             <span class="h6"><%- ctx.change.user.name %></span>
 
-                                                                             <span class="text-muted ml-1"><%- ctx.change.user.role %></span>
 
-                                                                         </div>
 
-                                                                         <div class="col">
 
-                                                                             <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
 
-                                                                         </div>
 
-                                                                     </div>
 
-                                                                 </div>
 
-                                                             </div>
 
-                                                         </div>
 
-                                                     </li>
 
-                                                 <% } %>
 
-                                                 <li class="timeline-list-item pb-2 <% if (group.status === auditConst.status.uncheck && idx === ctx.change.auditHistory.length - 1) { %>is_uncheck<% } %>">
 
-                                                     <% if (his.endYear) { %>
 
-                                                         <div class="timeline-item-date">
 
-                                                             <%- group.endYear %>
 
-                                                             <span><%- group.endDate %></span>
 
-                                                             <span><%- group.endTime %></span>
 
-                                                         </div>
 
-                                                     <% } %>
 
-                                                     <% if (index < his.length - 1) { %>
 
-                                                         <div class="timeline-item-tail"></div>
 
-                                                     <% } %>
 
-                                                     <% if (group.status === auditConst.status.checked || group.status === auditConst.status.cancelRevise) { %>
 
-                                                         <div class="timeline-item-icon bg-success text-light"><i class="fa fa-check"></i></div>
 
-                                                     <% } else if (ctx.helper._.includes([auditConst.status.checkNo, auditConst.status.revise, auditConst.status.checkCancel], group.status)) { %>
 
-                                                         <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-level-up"></i></div>
 
-                                                     <% } else if (group.status === auditConst.status.checking) { %>
 
-                                                         <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-ellipsis-h"></i></div>
 
-                                                     <% } else if(group.status === auditConst.status.checkAgain) {%>
 
-                                                         <div class="timeline-item-icon bg-warning text-light"><i class="fa fa-check"></i></div>
 
-                                                     <% } else { %>
 
-                                                         <div class="timeline-item-icon bg-secondary text-light"></div>
 
-                                                     <% } %>
 
-                                                     <div class="timeline-item-content">
 
-                                                         <div class="py-1">
 
-                                                         <span class="text-black-50">
 
-                                                             <%- (group.audit_order === 0 ? '原报' : !group.is_final ? group.audit_order + '审' : '终审') %>
 
-                                                             <% if (group.audit_type !== auditType.key.common) { %><span class="text-<%- auditType.info[group.audit_type].class %> "><%- auditType.info[group.audit_type].long %></span><% } %>
 
-                                                         </span>
 
-                                                             <% if (group.status !== auditConst.status.uncheck) { %>
 
-                                                                 <span class="pull-right <%- auditConst.statusClass[group.status] %>"><%- auditConst.statusString[group.status] %></span>
 
-                                                             <% } %>
 
-                                                         </div>
 
-                                                         <div class="card">
 
-                                                             <div class="card-body px-3 py-0">
 
-                                                                 <% for (const [i, auditor] of group.auditors.entries()) { %>
 
-                                                                     <div class="card-text p-2 py-3 row <%- ( i > 0 ? 'border-top' : '') %>">
 
-                                                                         <div class="col">
 
-                                                                             <span class="h6"><%- auditor.name %></span>
 
-                                                                             <span class="text-muted ml-1"><%- auditor.role %></span>
 
-                                                                         </div>
 
-                                                                         <div class="col">
 
-                                                                             <% if (auditor.status === auditConst.status.checked || auditor.status === auditConst.status.cancelRevise) { %>
 
-                                                                                 <span class="pull-right text-success"><i class="fa fa-check-circle"></i></span>
 
-                                                                             <% } else if (ctx.helper._.includes([auditConst.status.checkNo, auditConst.status.revise, auditConst.status.checkCancel], auditor.status)) { %>
 
-                                                                                 <span class="pull-right text-warning"><i class="fa fa-share-square fa-rotate-270"></i></span>
 
-                                                                             <% } else if(auditor.status === auditConst.status.checkAgain) {%>
 
-                                                                                 <span class="pull-right text-warning"><i class="fa fa-check-circle"></i></span>
 
-                                                                             <% } else if (auditor.status === auditConst.status.checking) { %>
 
-                                                                                 <span class="pull-right text-warning"><i class="fa fa-commenting"></i></span>
 
-                                                                             <% } %>
 
-                                                                         </div>
 
-                                                                         <% if (auditor.status !== auditConst.status.uncheck && auditor.opinion) { %>
 
-                                                                             <div class="col-12 py-1 bg-light"><i class="fa fa-commenting-o mr-1"></i><%- auditor.opinion%></div>
 
-                                                                         <% } %>
 
-                                                                         <% if (auditor.status === auditConst.status.checking && auditor.aid === ctx.session.sessionUser.accountId) { %>
 
-                                                                             <div class="col-12 py-1 bg-light">
 
-                                                                                 <textarea class="form-control form-control-sm" name="opinion">不同意</textarea>
 
-                                                                                 <div class="alert alert-warning mt-1 mb-0 p-2">
 
-                                                                                     <div class="form-check form-check-inline">
 
-                                                                                         <input class="form-check-input" type="radio" name="checkType" id="inlineRadio1" value="<%- auditConst.status.checkNo %>" checked>
 
-                                                                                         <label class="form-check-label" for="inlineRadio1">退回原报 <%- ctx.change.user.name %></label>
 
-                                                                                     </div>
 
-                                                                                 </div>
 
-                                                                             </div>
 
-                                                                         <% } %>
 
-                                                                     </div>
 
-                                                                 <% } %>
 
-                                                             </div>
 
-                                                         </div>
 
-                                                     </div>
 
-                                                 </li>
 
-                                             <% }) %>
 
-                                         </ul>
 
-                                     </div>
 
-                                 <% }) %>
 
-                             </div>
 
-                         </div>
 
-                     </div>
 
-                     <div class="modal-footer">
 
-                         <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
 
-                         <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
 
-                         <button type="submit" class="btn btn-warning btn-sm">确认退回</button>
 
-                     </div>
 
-                 </form>
 
-             </div>
 
-         </div>
 
-     <% } %>
 
- <% } %>
 
- <% if (ctx.change.status === auditConst.status.checked && ctx.change.finalAuditorIds.indexOf(ctx.session.sessionUser.accountId) >= 0) { %>
 
-     <% if (!authMobile && ctx.session.sessionUser.loginStatus === 0) { %>
 
-         <!--终审重新审批-->
 
-         <div class="modal fade" id="sp-down-back" data-backdrop="static">
 
-             <div class="modal-dialog" role="document">
 
-                 <div class="modal-content">
 
-                     <div class="modal-header">
 
-                         <h5 class="modal-title">重新审批</h5>
 
-                     </div>
 
-                     <div class="modal-body">
 
-                         <h5>重新审批需要您的手机短信验证</h5>
 
-                         <h5>您目前还没设置认证手机,请先设置。</h5>
 
-                     </div>
 
-                     <div class="modal-footer">
 
-                         <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">取消</button>
 
-                         <a href="/profile/sms" class="btn btn-sm btn-primary">去设置</a>
 
-                     </div>
 
-                 </div>
 
-             </div>
 
-         </div>
 
-     <% } else { %>
 
-         <!--重新审批-->
 
-         <div class="modal fade" id="sp-down-back" data-backdrop="static">
 
-             <div class="modal-dialog" role="document">
 
-                 <form id="againForm" class="modal-content" method="post" action="/tender/<%- tender.id %>/change/apply/check/again" onsubmit="return false;">
 
-                     <div class="modal-header">
 
-                         <h5 class="modal-title">重新审批</h5>
 
-                     </div>
 
-                     <div class="modal-body">
 
-                         <h5>确认由「终审-<%= ctx.change.auditors2[ctx.change.auditors2.length-1].name %>」重新审批「<%= change.code %>」?</h5>
 
-                         <% if (ctx.session.sessionUser.loginStatus === 0) { %>
 
-                             <div class="form-group">
 
-                                 <label>重审需要验证码确认,验证码将发送至尾号<%- authMobile.slice(-4) %>的手机</label>
 
-                                 <div class="input-group input-group-sm mb-3">
 
-                                     <input class="form-control" type="text" readonly="readonly" name="code" placeholder="输入短信中的6位验证码" />
 
-                                     <div class="input-group-append">
 
-                                         <button class="btn btn-outline-secondary get-code" type="button">获取验证码</button>
 
-                                     </div>
 
-                                 </div>
 
-                             </div>
 
-                         <% } %>
 
-                     </div>
 
-                     <div class="modal-footer">
 
-                         <input type="hidden" name="caid" value="<%= change.id %>">
 
-                         <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
 
-                         <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
 
-                         <button type="button" id="re-shenpi-btn" class="btn btn-warning btn-sm" <% if (ctx.session.sessionUser.loginStatus === 0) { %>disabled<% } %>>确定重审</button>
 
-                     </div>
 
-                 </form>
 
-             </div>
 
-         </div>
 
-     <% } %>
 
- <% } %>
 
- <% if (ctx.change.status === auditConst.status.checked && ctx.session.sessionUser.accountId === ctx.change.uid) { %>
 
-     <% if (!authMobile && ctx.session.sessionUser.loginStatus === 0) { %>
 
-         <!--原报修订变更-->
 
-         <div class="modal fade" id="sp-down-revise" data-backdrop="static">
 
-             <div class="modal-dialog" role="document">
 
-                 <div class="modal-content">
 
-                     <div class="modal-header">
 
-                         <h5 class="modal-title">修订变更</h5>
 
-                     </div>
 
-                     <div class="modal-body">
 
-                         <h5>修订变更需要您的手机短信验证</h5>
 
-                         <h5>您目前还没设置认证手机,请先设置。</h5>
 
-                     </div>
 
-                     <div class="modal-footer">
 
-                         <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">取消</button>
 
-                         <a href="/profile/sms" class="btn btn-sm btn-primary">去设置</a>
 
-                     </div>
 
-                 </div>
 
-             </div>
 
-         </div>
 
-     <% } else { %>
 
-         <!--修订变更-->
 
-         <div class="modal fade" id="sp-down-revise" data-backdrop="static">
 
-             <div class="modal-dialog" role="document">
 
-                 <form id="reviseForm" class="modal-content" method="post" action="/tender/<%- tender.id %>/change/apply/check/revise" onsubmit="return false;">
 
-                     <div class="modal-header">
 
-                         <h5 class="modal-title">修订变更</h5>
 
-                     </div>
 
-                     <div class="modal-body">
 
-                         <h5>确认需要修订变更「<%= change.code %>」?</h5>
 
-                         <% if (ctx.session.sessionUser.loginStatus === 0) { %>
 
-                             <div class="form-group">
 
-                                 <label>修订需要验证码确认,验证码将发送至尾号<%- authMobile.slice(-4) %>的手机</label>
 
-                                 <div class="input-group input-group-sm mb-3">
 
-                                     <input class="form-control" type="text" readonly="readonly" name="code" placeholder="输入短信中的6位验证码" />
 
-                                     <div class="input-group-append">
 
-                                         <button class="btn btn-outline-secondary get-code" type="button">获取验证码</button>
 
-                                     </div>
 
-                                 </div>
 
-                             </div>
 
-                         <% } %>
 
-                     </div>
 
-                     <div class="modal-footer">
 
-                         <input type="hidden" name="cpid" value="<%= ctx.change.id %>">
 
-                         <input type="hidden" name="_csrf_j" value="<%= ctx.csrf %>" />
 
-                         <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
 
-                         <button type="button" id="re-shenpi-btn2" class="btn btn-warning btn-sm" <% if (ctx.session.sessionUser.loginStatus === 0) { %>disabled<% } %>>确定修订</button>
 
-                     </div>
 
-                 </form>
 
-             </div>
 
-         </div>
 
-     <% } %>
 
- <% } %>
 
- <% if (ctx.change.cancancel) { %>
 
-     <div class="modal fade" id="sp-down-cancel" data-backdrop="static">
 
-         <div class="modal-dialog" role="document">
 
-             <div class="modal-content">
 
-                 <div class="modal-header">
 
-                     <h5 class="modal-title">撤回</h5>
 
-                 </div>
 
-                 <div class="modal-body">
 
-                     <h5>撤回后将回退到你的操作状态,确定撤回?</h5>
 
-                 </div>
 
-                 <div class="modal-footer">
 
-                     <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">取消</button>
 
-                     <button type="submit" class="btn btn-danger btn-sm" id="cancel-shenpi-btn">确定撤回</button>
 
-                 </div>
 
-             </div>
 
-         </div>
 
-     </div>
 
- <% } %>
 
- <% if (ctx.change && ctx.change.status !== auditConst.status.checked && ctx.session.sessionUser.is_admin) { %>
 
-     <!--上报审批-->
 
-     <div class="modal fade" id="sub-sp2" data-backdrop="static">
 
-         <div class="modal-dialog" style="max-width: 650px" role="document">
 
-             <div class="modal-content">
 
-                 <div class="modal-header">
 
-                     <h5 class="modal-title">修改审批流程</h5>
 
-                 </div>
 
-                 <div class="modal-body">
 
-                     <div class="card mt-1">
 
-                         <div class="modal-height-500" style="overflow: auto">
 
-                             <style>
 
-                                 #admin-edit-shenpi thead th {
 
-                                     border-bottom: 0;
 
-                                 }
 
-                                 #admin-edit-shenpi td, #admin-edit-shenpi th {
 
-                                     padding: 0.75rem;
 
-                                 }
 
-                                 #admin-edit-shenpi th {
 
-                                     background: none;
 
-                                     color: #212529;
 
-                                     border-top: 0;
 
-                                 }
 
-                             </style>
 
-                             <table class="table table-hover" id="admin-edit-shenpi">
 
-                                 <thead>
 
-                                 <tr class="card-header text-center">
 
-                                     <th width="100px">审批流程</th>
 
-                                     <th>审批人员</th>
 
-                                     <th width="80" style="text-align: center">审批状态</th>
 
-                                     <th width="200" style="text-align: center">操作</th>
 
-                                 </tr>
 
-                                 </thead>
 
-                                 <tbody id="admin-edit-shenpi-list">
 
-                                 <% for (const [i, group] of ctx.change.auditors2.entries()) { %>
 
-                                     <% if (i === 0) continue; %>
 
-                                     <% for (const [j, auditor] of group.entries()) { %>
 
-                                         <tr>
 
-                                             <td class="text-left d-flex">
 
-                                                 <% if (j === 0) { %>
 
-                                                     <%- i + '审' %>
 
-                                                     <% if (auditor.audit_type !== auditType.key.common) { %>
 
-                                                         <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>
 
-                                                     <% } %>
 
-                                                 <% } %>
 
-                                             </td>
 
-                                             <td></span> <%- auditor.name %> <small class="text-muted"><%- auditor.role %></small></td>
 
-                                             <td style="text-align: center"><span class="<%- auditConst.auditStringClass[auditor.status] %>"><%- auditor.status !== auditConst.status.uncheck ? auditConst.auditString[auditor.status] : '待审批'  %></span></td>
 
-                                             <td style="text-align: center">
 
-                                                 <% if (auditor.status === auditConst.status.checking && j === group.length - 1) { %>
 
-                                                     <span class="dropdown mr-2">
 
-                                     <a href="javascript: void(0)" class="add-audit" id="<%- auditor.aid %>_add_dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">增加</a>
 
-                                     <div class="dropdown-menu dropdown-menu-right" id="<%- auditor.aid %>_add_dropdownMenu" aria-labelledby="<%- auditor.aid %>_add_dropdownMenuButton" style="width:220px">
 
-                                         <div class="mb-2 p-2"><input class="form-control form-control-sm gr-search"
 
-                                                                      placeholder="姓名/手机 检索" autocomplete="off" data-code="<%- auditor.aid %>_add"></div>
 
-                                         <dl class="list-unstyled book-list" data-aid="<%- auditor.aid %>" data-operate="add">
 
-                                             <% accountGroup.forEach((group, idx) => { %>
 
-                                                 <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>"
 
-                                                        data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
 
-                                                 <div class="dd-content" data-toggleid="<%- idx %>">
 
-                                                     <% group.groupList.forEach(item => { %>
 
-                                                         <% if (item.id !== ctx.change.uid) { %>
 
-                                                             <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>">
 
-                                                                 <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
 
-                                                                             class="ml-auto"><%- item.mobile %></span></p>
 
-                                                                 <span class="text-muted"><%- item.role %></span>
 
-                                                             </dd>
 
-                                                         <% } %>
 
-                                                     <% });%>
 
-                                                 </div>
 
-                                             <% }) %>
 
-                                         </dl>
 
-                                     </div>
 
-                                     </span>
 
-                                                 <% } %>
 
-                                                 <% if (auditor.status === auditConst.status.uncheck) { %>
 
-                                                     <% if (j === group.length - 1) { %>
 
-                                                         <span class="dropdown mr-2">
 
-                                     <a href="javascript: void(0)" class="add-audit" id="<%- auditor.aid %>_add_dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">增加</a>
 
-                                         <div class="dropdown-menu dropdown-menu-right" id="<%- auditor.aid %>_add_dropdownMenu" aria-labelledby="<%- auditor.aid %>_add_dropdownMenuButton" style="width:220px">
 
-                                             <div class="mb-2 p-2"><input class="form-control form-control-sm gr-search"
 
-                                                                          placeholder="姓名/手机 检索" autocomplete="off" data-code="<%- auditor.aid %>_add"></div>
 
-                                             <dl class="list-unstyled book-list" data-aid="<%- auditor.aid %>" data-operate="add">
 
-                                                 <% accountGroup.forEach((group, idx) => { %>
 
-                                                     <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>"
 
-                                                            data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
 
-                                                     <div class="dd-content" data-toggleid="<%- idx %>">
 
-                                                         <% group.groupList.forEach(item => { %>
 
-                                                             <% if (item.id !== ctx.change.uid) { %>
 
-                                                                 <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>">
 
-                                                                     <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
 
-                                                                                 class="ml-auto"><%- item.mobile %></span></p>
 
-                                                                     <span class="text-muted"><%- item.role %></span>
 
-                                                                 </dd>
 
-                                                             <% } %>
 
-                                                         <% });%>
 
-                                                     </div>
 
-                                                 <% }) %>
 
-                                             </dl>
 
-                                         </div>
 
-                                     </span>
 
-                                                         <% if (auditor.audit_type !== auditType.key.common) { %>
 
-                                                             <span class="dropdown mr-2">
 
-                                     <a href="javascript: void(0)" class="add-audit" id="<%- auditor.aid %>_add-sibling_dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">平级</a>
 
-                                         <div class="dropdown-menu dropdown-menu-right" id="<%- auditor.aid %>_add-sibling_dropdownMenu" aria-labelledby="<%- auditor.aid %>_add-sibling_dropdownMenuButton" style="width:220px">
 
-                                             <div class="mb-2 p-2"><input class="form-control form-control-sm gr-search"
 
-                                                                          placeholder="姓名/手机 检索" autocomplete="off" data-code="<%- auditor.aid %>_add-sibling"></div>
 
-                                             <dl class="list-unstyled book-list" data-aid="<%- auditor.aid %>" data-operate="add-sibling">
 
-                                                 <% accountGroup.forEach((group, idx) => { %>
 
-                                                     <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>"
 
-                                                            data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
 
-                                                     <div class="dd-content" data-toggleid="<%- idx %>">
 
-                                                         <% group.groupList.forEach(item => { %>
 
-                                                             <% if (item.id !== ctx.change.uid) { %>
 
-                                                                 <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>">
 
-                                                                     <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
 
-                                                                                 class="ml-auto"><%- item.mobile %></span></p>
 
-                                                                     <span class="text-muted"><%- item.role %></span>
 
-                                                                 </dd>
 
-                                                             <% } %>
 
-                                                         <% });%>
 
-                                                     </div>
 
-                                                 <% }) %>
 
-                                             </dl>
 
-                                         </div>
 
-                                     </span>
 
-                                                         <% } %>
 
-                                                     <% } %>
 
-                                                     <span class="dropdown mr-2">
 
-                                         <a href="javascript: void(0)" class="change-audit" id="<%- auditor.aid %>_change_dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">更换</a>
 
-                                         <div class="dropdown-menu dropdown-menu-right" id="<%- auditor.aid %>_change_dropdownMenu" aria-labelledby="<%- auditor.aid %>_change_dropdownMenuButton" style="width:220px">
 
-                                             <div class="mb-2 p-2"><input class="form-control form-control-sm gr-search"
 
-                                                                          placeholder="姓名/手机 检索" autocomplete="off" data-code="<%- auditor.aid %>_change"></div>
 
-                                             <dl class="list-unstyled book-list" data-aid="<%- auditor.aid %>" data-operate="change">
 
-                                                 <% accountGroup.forEach((group, idx) => { %>
 
-                                                     <dt><a href="javascript: void(0);" class="acc-btn" data-groupid="<%- idx %>"
 
-                                                            data-type="hide"><i class="fa fa-plus-square"></i></a> <%- group.groupName %></dt>
 
-                                                     <div class="dd-content" data-toggleid="<%- idx %>">
 
-                                                         <% group.groupList.forEach(item => { %>
 
-                                                             <% if (item.id !== ctx.change.uid) { %>
 
-                                                                 <dd class="border-bottom p-2 mb-0 " data-id="<%- item.id %>">
 
-                                                                     <p class="mb-0 d-flex"><span class="text-primary"><%- item.name %></span><span
 
-                                                                                 class="ml-auto"><%- item.mobile %></span></p>
 
-                                                                     <span class="text-muted"><%- item.role %></span>
 
-                                                                 </dd>
 
-                                                             <% } %>
 
-                                                         <% });%>
 
-                                                     </div>
 
-                                                 <% }) %>
 
-                                             </dl>
 
-                                         </div>
 
-                                     </span>
 
-                                                     <span class="dropdown">
 
-                                     <a href="javascript: void(0)" class="text-danger" title="移除" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">移除</a>
 
-                                     <div class="dropdown-menu">
 
-                                         <span class="dropdown-item" href="javascript:void(0);">确认移除审批人?</span>
 
-                                         <div class="dropdown-divider"></div>
 
-                                         <div class="px-2 py-1 text-center">
 
-                                             <button class="remove-audit btn btn-sm btn-danger" data-id="<%- auditor.aid %>">移除</button>
 
-                                             <button class="btn btn-sm btn-secondary">取消</button>
 
-                                         </div>
 
-                                     </div>
 
-                                     </span>
 
-                                                 <% } %>
 
-                                             </td>
 
-                                         </tr>
 
-                                     <% } %>
 
-                                 <% } %>
 
-                                 </tbody>
 
-                             </table>
 
-                         </div>
 
-                     </div>
 
-                 </div>
 
-                 <form class="modal-footer">
 
-                     <div class="mr-auto text-warning">
 
-                         <span class="mr-3">增加:后级审核人</span>
 
-                         <span class="">平级:会签/或签增加平级审核人</span>
 
-                     </div>
 
-                     <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">关闭</button>
 
-                 </form>
 
-             </div>
 
-         </div>
 
-     </div>
 
- <% } %>
 
- <script>
 
-     const accountGroup = JSON.parse(unescape('<%- escape(JSON.stringify(accountGroup)) %>'));
 
-     const accountList = JSON.parse(unescape('<%- escape(JSON.stringify(accountList)) %>'));
 
-     const cur_uid = parseInt('<%- ctx.session.sessionUser.accountId %>');
 
-     const csrf = '<%= ctx.csrf %>';
 
-     const authMobile = '<%= authMobile %>';
 
-     const auditType = JSON.parse('<%- JSON.stringify(auditType) %>');
 
-     const shenpi_status = <%- ctx.tender.info.shenpi.change %>;
 
-     const shenpiConst =  JSON.parse('<%- JSON.stringify(shenpiConst) %>');
 
- </script>
 
- <script>
 
-     $(function () {
 
-         $('.sp-location-list').on('shown.bs.modal', function () {
 
-             const scrollBox = $(this).find('div[class="col-8 modal-height-500"]');
 
-             const bdiv = (scrollBox.offset() && scrollBox.offset().top) || 0;
 
-             scrollBox.scrollTop(0);
 
-             const hdiv = divSearch($(this).find('textarea')) ? $(this).find('textarea') : null;
 
-             const hdheight = hdiv ? hdiv.parents('.timeline-item-content').offset().top : null;
 
-             if (hdiv && scrollBox.length && scrollBox[0].scrollHeight > 200 && hdheight - bdiv > 200) {
 
-                 scrollBox.scrollTop(hdheight - bdiv);
 
-             }
 
-         });
 
-         function divSearch(div) {
 
-             if (div.length > 0) {
 
-                 return true;
 
-             }
 
-             return false;
 
-         }
 
-         // 展开历史审核记录
 
-         $('.modal-body #fold-btn').click(function () {
 
-             const type = $(this).data('target')
 
-             const auditCard = $(this).parent().parent()
 
-             if (type === 'show') {
 
-                 $(this).data('target', 'hide')
 
-                 auditCard.find('.fold-card').slideDown('swing', () => {
 
-                     auditCard.find('#fold-btn').text('收起历史审核记录')
 
-                 })
 
-             } else {
 
-                 $(this).data('target', 'show')
 
-                 auditCard.find('.fold-card').slideUp('swing', () => {
 
-                     auditCard.find('#fold-btn').text('展开历史审核记录')
 
-                 })
 
-             }
 
-         });
 
-         $('.sp-list-btn').click(function () {
 
-             const type = $(this).data('type')
 
-             if (type === 'hide') {
 
-                 $('.sp-list-item').hide()
 
-                 $('.modal-title').text('审批流程')
 
-             } else {
 
-                 $('.sp-list-item').show()
 
-                 $('.modal-title').text('重新上报')
 
-             }
 
-         });
 
-         $('#re-shenpi-btn').click(function () {
 
-             const data = {
 
-                 caid: parseInt('<%- ctx.change.id %>'),
 
-             };
 
-             <% if (ctx.session.sessionUser.loginStatus === 0) { %>
 
-             const code = $("#againForm input[name='code']").val();
 
-             if ($(this).hasClass('disabled')) {
 
-                 return false;
 
-             }
 
-             if (code.length < 6) {
 
-                 // alert('请填写正确的验证码');
 
-                 toastr.error('请填写正确的验证码');
 
-                 return false;
 
-             }
 
-             data.code = code;
 
-             <% } %>
 
-             $.ajax({
 
-                 url: '/tender/<%- tender.id %>/change/apply/check/again?_csrf_j=' + csrf,
 
-                 type: 'post',
 
-                 data: data,
 
-                 dataTye: 'json',
 
-                 success: function(response) {
 
-                     if (response.err === 0) {
 
-                         window.location.href = response.url;
 
-                     } else {
 
-                         toastr.error(response.msg);
 
-                     }
 
-                 }
 
-             });
 
-         })
 
-         $('#re-shenpi-btn2').click(function () {
 
-             const data = {
 
-                 caid: parseInt('<%- ctx.change.id %>'),
 
-             };
 
-             <% if (ctx.session.sessionUser.loginStatus === 0) { %>
 
-             const code = $("#reviseForm input[name='code']").val();
 
-             if ($(this).hasClass('disabled')) {
 
-                 return false;
 
-             }
 
-             if (code.length < 6) {
 
-                 // alert('请填写正确的验证码');
 
-                 toast('请填写正确的验证码', 'error');
 
-                 return false;
 
-             }
 
-             data.code = code;
 
-             <% } %>
 
-             $.ajax({
 
-                 url: '/tender/<%- tender.id %>/change/apply/check/revise?_csrf_j=' + csrf,
 
-                 type: 'post',
 
-                 data: data,
 
-                 dataTye: 'json',
 
-                 success: function(response) {
 
-                     if (response.err === 0) {
 
-                         window.location.href = response.url;
 
-                     } else {
 
-                         toastr.error(response.msg);
 
-                     }
 
-                 }
 
-             });
 
-         });
 
-         <% if (ctx.session.sessionUser.loginStatus === 0) { %>
 
-         // 重新审批获取手机验证码
 
-         // 获取验证码
 
-         let isPosting = false;
 
-         $(".get-code").on('click', function() {
 
-             if (isPosting) {
 
-                 return false;
 
-             }
 
-             const btn = $(this);
 
-             $.ajax({
 
-                 url: '/profile/code?_csrf_j=' + csrf,
 
-                 type: 'post',
 
-                 data: { mobile: authMobile, type: 'shenpi' },
 
-                 dataTye: 'json',
 
-                 error: function() {
 
-                     isPosting = false;
 
-                 },
 
-                 beforeSend: function() {
 
-                     isPosting = true;
 
-                 },
 
-                 success: function(response) {
 
-                     isPosting = false;
 
-                     if (response.err === 0) {
 
-                         codeSuccess(btn);
 
-                         $("input[name='code']").removeAttr('readonly');
 
-                         $("#re-shenpi-btn").removeAttr('disabled');
 
-                         $("#re-shenpi-btn2").removeAttr('disabled');
 
-                     } else {
 
-                         toastr.error(response.msg);
 
-                     }
 
-                 }
 
-             });
 
-         });
 
-         <% } %>
 
-         $('#cancel-revise-btn').click(function () {
 
-             const data = {
 
-                 caid: parseInt('<%- ctx.change.id %>'),
 
-             };
 
-             $.ajax({
 
-                 url: '/tender/<%- tender.id %>/change/apply/cancel/revise?_csrf_j=' + csrf,
 
-                 type: 'post',
 
-                 data: data,
 
-                 dataTye: 'json',
 
-                 success: function(response) {
 
-                     if (response.err === 0) {
 
-                         window.location.href = response.url;
 
-                     } else {
 
-                         toastr.error(response.msg);
 
-                     }
 
-                 }
 
-             });
 
-         })
 
-         <% if (ctx.change && ctx.change.cancancel) { %>
 
-         $("#cancel-shenpi-btn").click(function () {
 
-             const data = {
 
-                 caid: parseInt('<%- ctx.change.id %>'),
 
-             };
 
-             $.ajax({
 
-                 url: '/tender/<%- tender.id %>/change/apply/cancel/audit?_csrf_j=' + csrf,
 
-                 type: 'post',
 
-                 data: data,
 
-                 dataTye: 'json',
 
-                 success: function (response) {
 
-                     if (response.err === 0) {
 
-                         window.location.href = response.url;
 
-                     } else {
 
-                         toastr.error(response.msg);
 
-                     }
 
-                 }
 
-             });
 
-         });
 
-         <% } %>
 
-     })
 
-     /**
 
-      * 获取成功后的操作
 
-      *
 
-      * @param {Object} btn - 点击的按钮
 
-      * @return {void}
 
-      */
 
-     function codeSuccess(btn) {
 
-         let counter = 60;
 
-         btn.addClass('disabled').text('重新获取 ' + counter + 'S');
 
-         btn.parent().siblings('input').removeAttr('readonly').attr('placeholder', '输入短信中的6位验证码');
 
-         const bindBtn = $("#bind-btn");
 
-         bindBtn.removeClass('btn-secondary disabled').addClass('btn-primary');
 
-         const countDown = setInterval(function() {
 
-             const countString = counter - 1 <= 0 ? '' : ' ' + (counter - 1) + 'S';
 
-             // 倒数结束后
 
-             if (countString === '') {
 
-                 clearInterval(countDown);
 
-                 btn.removeClass('disabled');
 
-             }
 
-             const text = '重新获取' + countString;
 
-             btn.text(text);
 
-             counter -= 1;
 
-         }, 1000);
 
-     }
 
- </script>
 
- <% if (ctx.change && ctx.change.status !== auditConst.status.checked && ctx.session.sessionUser.is_admin) { %>
 
-     <script>
 
-         const auditorList = JSON.parse(unescape('<%- escape(JSON.stringify(change.auditors2)) %>'));
 
-         $(function () {
 
-             $('a[f-target]').click(function () {
 
-                 $($(this).attr('f-target')).modal('show');
 
-             });
 
-             // 多层modal关闭后的滚动bug修复
 
-             $('#sp-list').on('hidden.bs.modal', function (e) {
 
-                 $(document.body).addClass('modal-open');
 
-             });
 
-             // // 添加审批流程按钮逻辑
 
-             // $('body').on('click', '#admin-edit-shenpi .book-list dt', function () {
 
-             //     const idx = $(this).find('.acc-btn').attr('data-groupid')
 
-             //     const type = $(this).find('.acc-btn').attr('data-type')
 
-             //     if (type === 'hide') {
 
-             //         $(this).parent().find(`div[data-toggleid="${idx}"]`).show(() => {
 
-             //             $(this).children().find('i').removeClass('fa-plus-square').addClass('fa-minus-square-o')
 
-             //             $(this).find('.acc-btn').attr('data-type', 'show')
 
-             //
 
-             //         })
 
-             //     } else {
 
-             //         $(this).parent().find(`div[data-toggleid="${idx}"]`).hide(() => {
 
-             //             $(this).children().find('i').removeClass('fa-minus-square-o').addClass('fa-plus-square')
 
-             //             $(this).find('.acc-btn').attr('data-type', 'hide')
 
-             //         })
 
-             //     }
 
-             //     return false
 
-             // })
 
-             // 管理员更改审批流程js部分
 
-             let timer2 = null;
 
-             let oldSearchVal2 = null;
 
-             $('body').on('input propertychange', '#admin-edit-shenpi .gr-search', function(e) {
 
-                 oldSearchVal2 = e.target.value;
 
-                 timer2 && clearTimeout(timer2);
 
-                 timer2 = setTimeout(() => {
 
-                     const newVal = $(this).val();
 
-                     const code = $(this).attr('data-code');
 
-                     let html = '';
 
-                     if (newVal && newVal === oldSearchVal2) {
 
-                         accountList.filter(item => item && (item.name.indexOf(newVal) !== -1 || (item.mobile && item.mobile.indexOf(newVal) !== -1))).forEach(item => {
 
-                             html += `<dd class="border-bottom p-2 mb-0 " data-id="${item.id}" >
 
-                         <p class="mb-0 d-flex"><span class="text-primary">${item.name}</span><span
 
-                                 class="ml-auto">${item.mobile || ''}</span></p>
 
-                         <span class="text-muted">${item.role || ''}</span>
 
-                     </dd>`
 
-                         });
 
-                         $('#' + code + '_dropdownMenu .book-list').empty();
 
-                         $('#' + code + '_dropdownMenu .book-list').append(html);
 
-                     } else {
 
-                         if (!$('#' + code + '_dropdownMenu .acc-btn').length) {
 
-                             accountGroup.forEach((group, idx) => {
 
-                                 if (!group) return;
 
-                                 html += `<dt><a href="javascript: void(0);" class="acc-btn" data-groupid="${idx}" data-type="hide"><i class="fa fa-plus-square"></i>
 
-                         </a> ${group.groupName}</dt>
 
-                         <div class="dd-content" data-toggleid="${idx}">`;
 
-                                 group.groupList.forEach(item => {
 
-                                     if (item.id !== change.uid) {
 
-                                         html += `<dd class="border-bottom p-2 mb-0 " data-id="${item.id}" >
 
-                                         <p class="mb-0 d-flex"><span class="text-primary">${item.name}</span><span
 
-                                                 class="ml-auto">${item.mobile || ''}</span></p>
 
-                                         <span class="text-muted">${item.role || ''}</span>
 
-                                     </dd>`;
 
-                                     }
 
-                                 });
 
-                                 html += '</div>';
 
-                             });
 
-                             $('#' + code + '_dropdownMenu .book-list').empty();
 
-                             $('#' + code + '_dropdownMenu .book-list').append(html);
 
-                         }
 
-                     }
 
-                 }, 400);
 
-             });
 
-             $('body').on('click', '#admin-edit-shenpi dl dd', function () {
 
-                 const id = parseInt($(this).attr('data-id'));
 
-                 if (!id) return;
 
-                 let this_aid = parseInt($(this).parents('.book-list').attr('data-aid'));
 
-                 let this_operate = $(this).parents('.book-list').attr('data-operate');
 
-                 const user = _.find(accountList, function (item) {
 
-                     return item.id === id;
 
-                 });
 
-                 const auditorIndex = _.findIndex(auditorList, { aid: id });
 
-                 if (auditorIndex !== -1) {
 
-                     toastr.warning('该审核人已存在,请勿重复添加');
 
-                     return;
 
-                 }
 
-                 const prop = {
 
-                     operate: this_operate,
 
-                     old_aid: this_aid,
 
-                     new_aid: user.id,
 
-                 };
 
-                 postData(window.location.pathname + '/audit/save', prop, (datas) => {
 
-                     $('#admin-edit-shenpi-list').html(getAdminEditShenpiListHtml(datas));
 
-                     changeLiucheng(datas);
 
-                 });
 
-             });
 
-             // 移除审批人
 
-             $('body').on('click', '#admin-edit-shenpi .remove-audit', function () {
 
-                 const id = parseInt($(this).attr('data-id'));
 
-                 const prop = {
 
-                     operate: 'del',
 
-                     old_aid: id,
 
-                 };
 
-                 postData(window.location.pathname + '/audit/save', prop, (datas) => {
 
-                     $('#admin-edit-shenpi-list').html(getAdminEditShenpiListHtml(datas));
 
-                     changeLiucheng(datas);
 
-                 });
 
-             });
 
-             const getAdminEditShenpiListHtml = function(auditGroup) {
 
-                 const html = [];
 
-                 for (const [i, group] of auditGroup.entries()) {
 
-                     if (i === 0) continue;
 
-                     for (const [j, auditor] of group.entries()) {
 
-                         html.push('<tr>');
 
-                         if (j === 0) {
 
-                             const auditTypeHtml = auditor.type === auditType.key.common ? '' : `<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>`;
 
-                             html.push(`<td class="text-left d-flex">${i + '审'}${auditTypeHtml}</td>`);
 
-                         } else {
 
-                             html.push(`<td class="text-left d-flex"></td>`);
 
-                         }
 
-                         html.push(`<td></span> ${auditor.name} <small class="text-muted">${auditor.role}</small></td>`);
 
-                         html.push(`<td style="text-align: center"><span class="${auditConst.auditStringClass[auditor.status]}">${ auditor.status !== auditConst.status.uncheck ? auditConst.auditString[auditor.status] : '待审批' }</span></td>`);
 
-                         html.push('<td style="text-align: center">');
 
-                         if (auditor.status === auditConst.status.checking && j === group.length - 1) {
 
-                             html.push('<span class="dropdown mr-2">',
 
-                                 `<a href="javascript: void(0)" class="add-audit" id="${auditor.aid}_add_dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">增加</a>`,
 
-                                 makeSelectAudit(auditor.aid+'_add', auditor.aid, 'add'),'</div>', '</span>');
 
-                         }
 
-                         if (auditor.status === auditConst.status.uncheck) {
 
-                             if (j === group.length - 1) {
 
-                                 html.push('<span class="dropdown mr-2">',
 
-                                     `<a href="javascript: void(0)" class="add-audit" id="${auditor.aid}_add_dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">增加</a>`,
 
-                                     makeSelectAudit(auditor.aid+'_add', auditor.aid, 'add'),'</div>', '</span>');
 
-                                 if (auditor.audit_type !== auditType.key.common) {
 
-                                     html.push('<span class="dropdown mr-2">',
 
-                                         `<a href="javascript: void(0)" class="add-audit" id="${auditor.aid}_add_dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">平级</a>`,
 
-                                         makeSelectAudit(auditor.aid+'_add-sibling', auditor.aid, 'add-sibling'),'</div>', '</span>');
 
-                                 }
 
-                             }
 
-                             html.push('<span class="dropdown mr-2">',
 
-                                 `<a href="javascript: void(0)" class="add-audit" id="${auditor.aid}_add_dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">更换</a>`,
 
-                                 makeSelectAudit(auditor.aid+'_change', auditor.aid, 'change'),'</div>', '</span>');
 
-                             html.push(`<span class="dropdown">
 
-                                     <a href="javascript: void(0)" class="text-danger" title="移除" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">移除</a>
 
-                                     <div class="dropdown-menu">
 
-                                         <span class="dropdown-item" href="javascript:void(0);">确认移除审批人?</span>
 
-                                         <div class="dropdown-divider"></div>
 
-                                         <div class="px-2 py-1 text-center">
 
-                                             <button class="remove-audit btn btn-sm btn-danger" data-id="${auditor.aid}">移除</button>
 
-                                             <button class="btn btn-sm btn-secondary">取消</button>
 
-                                         </div>
 
-                                     </div>
 
-                                     </span>`);
 
-                         }
 
-                         html.push('</td>');
 
-                         html.push('</tr>');
 
-                     }
 
-                 }
 
-                 return html.join('');
 
-             };
 
-             function changeLiucheng(datas) {
 
-                 const auditorshtml = [];
 
-                 let lastAuditorHtml = [];
 
-                 for (const [index,data] of datas.entries()) {
 
-                     auditorshtml.push(`<li class="list-group-item d-flex justify-content-between align-items-center" data-auditid="${index !== 0 ? data[0].aid : ''}">`);
 
-                     auditorshtml.push('<span class="mr-1"><i class="fa ' + (index === 0 ? 'fa-play-circle fa-rotate-90' : index+1 === datas.length ? 'fa-stop-circle' : 'fa-chevron-circle-down') + '"></i></span>');
 
-                     auditorshtml.push('<span class="text-muted">');
 
-                     for (const u of data) {
 
-                         auditorshtml.push(`<small class="d-inline-block text-dark mx-1" title="${u.role}" data-auditorId="${u.aid}">${u.name}</small>`);
 
-                     }
 
-                     auditorshtml.push('</span>');
 
-                     auditorshtml.push('<div class="d-flex ml-auto">');
 
-                     if (data[0].audit_type !== auditType.key.common) {
 
-                         auditorshtml.push(`<span class="badge badge-pill badge-${auditType.info[data[0].audit_type].class} p-1"><small>${auditType.info[data[0].audit_type].short}</small></span>`);
 
-                     }
 
-                     if (index === 0) {
 
-                         auditorshtml.push('<span class="badge badge-light badge-pill ml-auto"><small>原报</small></span>');
 
-                     } else if (index+1 === datas.length) {
 
-                         auditorshtml.push('<span class="badge badge-light badge-pill"><small>终审</small></span>');
 
-                     } else {
 
-                         auditorshtml.push('<span class="badge badge-light badge-pill"><small>'+ transFormToChinese(index) +'审</small></span>');
 
-                     }
 
-                     auditorshtml.push('</div>');
 
-                     auditorshtml.push('</li>');
 
-                     if (data[0].status === auditConst.status.uncheck) {
 
-                         lastAuditorHtml.push('<li class="timeline-list-item pb-2 is_uncheck">');
 
-                         if (index < datas.length - 1) {
 
-                             lastAuditorHtml.push('<div class="timeline-item-tail"></div>');
 
-                         }
 
-                         lastAuditorHtml.push('<div class="timeline-item-icon bg-secondary text-light"></div>');
 
-                         lastAuditorHtml.push('<div class="timeline-item-content">');
 
-                         lastAuditorHtml.push(`<div class="py-1">
 
-                         <span class="text-black-50">
 
-                         ${ index !== datas.length - 1 ? data[0].audit_order + '' : '终' }审 ${getAuditTypeText(data[0].audit_type)}
 
-                         </span>
 
-                     </div>`);
 
-                         lastAuditorHtml.push('<div class="card"><div class="card-body px-3 py-0">');
 
-                         for (const [i, auditor] of data.entries()) {
 
-                             lastAuditorHtml.push(`<div class="card-text p-2 py-3 row ${ ( i > 0 ? 'border-top' : '') }">`);
 
-                             lastAuditorHtml.push(`<div class="col"><span class="h6">${auditor.name}</span><span class="text-muted ml-1">${auditor.role}</span></div>`);
 
-                             lastAuditorHtml.push('<div class="col">');
 
-                             lastAuditorHtml.push('</div>');
 
-                             lastAuditorHtml.push('</div>');
 
-                         }
 
-                         lastAuditorHtml.push('</div></div>');
 
-                         lastAuditorHtml.push('</div>');
 
-                         lastAuditorHtml.push('</li>');
 
-                     }
 
-                 }
 
-                 $('.last-auditor-list .is_uncheck').remove();
 
-                 $('.last-auditor-list').append(lastAuditorHtml.join(''));
 
-                 $('.auditors-list').html(auditorshtml.join(''));
 
-             }
 
-             const getAuditTypeText = function (type) {
 
-                 if (type === auditType.key.common) return '';
 
-                 return `<span class="text-${auditType.info[type].class}">${auditType.info[type].long}</span>`;
 
-             };
 
-             // 审批流程-选择审批人html 生成
 
-             function makeSelectAudit(code, aid, status) {
 
-                 let divhtml = '';
 
-                 accountGroup.forEach((group, idx) => {
 
-                     let didivhtml = '';
 
-                     if(group) {
 
-                         group.groupList.forEach(item => {
 
-                             didivhtml += item.id !== change.uid ? '<dd class="border-bottom p-2 mb-0 " data-id="' + item.id + '" >\n' +
 
-                                 '<p class="mb-0 d-flex"><span class="text-primary">' + item.name + '</span><span\n' +
 
-                                 '                                                                                class="ml-auto">' + item.mobile + '</span></p>\n' +
 
-                                 '                                                                    <span class="text-muted">' + item.role + '</span>\n' +
 
-                                 '                                                                    </dd>\n' : '';
 
-                         });
 
-                         divhtml += '<dt><a href="javascript: void(0);" class="acc-btn" data-groupid="' + idx + '" data-type="hide"><i class="fa fa-plus-square"></i></a> ' + group.groupName + '</dt>\n' +
 
-                             '                                                                <div class="dd-content" data-toggleid="' + idx + '">\n' + didivhtml +
 
-                             '                                                                </div>\n';
 
-                     }
 
-                 });
 
-                 let html = '<div class="dropdown-menu dropdown-menu-right" id="' + code + '_dropdownMenu" aria-labelledby="' + code + '_dropdownMenuButton" style="width:220px">\n' +
 
-                     '                                                        <div class="mb-2 p-2"><input class="form-control form-control-sm gr-search"\n' +
 
-                     '                                                                                     placeholder="姓名/手机 检索" autocomplete="off" data-code="' + code + '"></div>\n' +
 
-                     '                                                        <dl class="list-unstyled book-list" data-aid="'+ aid +'" data-operate="'+ status +'">\n' + divhtml +
 
-                     '                                                        </dl>\n' +
 
-                     '                                                    </div>\n' +
 
-                     '                                                </div>\n' +
 
-                     '                                            </span>\n' +
 
-                     '                                        </span>\n' +
 
-                     '                                        </li>';
 
-                 return html;
 
-             }
 
-         });
 
-     </script>
 
- <% } %>
 
 
  |