| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393 | 
							- <% include ../tender/tender_sub_menu.ejs %>
 
- <div class="panel-content">
 
-     <div class="panel-title">
 
-         <div class="title-main d-flex justify-content-between">
 
-             <% include ../tender/tender_sub_mini_menu.ejs %>
 
-             <div>
 
-                 <div class="d-inline-block">
 
-                     第<%- advance.order %>期
 
-                 </div>
 
-             </div>
 
-             <div id="au-btn">
 
-                 <% include ./audit_btn.ejs %>
 
-             </div>
 
-         </div>
 
-     </div>
 
-     <div class="content-wrap">
 
-         <div class="c-body">
 
-             <div class="sjs-height-0">
 
-                 <div class="col-xl-8 mx-auto">
 
-                     <h4 class="mt-3 text-center mb-3">第<%- advance.order %>期
 
-                         <%- typeColMap[advance.type].text %></h4>
 
-                     <table class="table table-bordered">
 
-                         <thead>
 
-                             <tr>
 
-                                 <th colspan="4" class="text-center">
 
-                                     <%- typeColMap[advance.type].text %>:<%- ctx.helper.formatMoney(advancePayTotal, ',', parseFloat(advancePayTotal).toString().split('.')[1] && parseFloat(advancePayTotal).toString().split('.')[1].length || 0) %>
 
-                                     元
 
-                                 </th>
 
-                             </tr>
 
-                         </thead>
 
-                         <tbody id="pay-content">
 
-                             <tr>
 
-                                 <th width="150" class="text-center">支付比例</th>
 
-                                 <td class="text-right" width="405">
 
-                                     <div class="input-group input-group-sm">
 
-                                         <input type="number" class="pay-input form-control nospin text-right"
 
-                                             max="<%- max_pr %>" min="1" step="0.01" placeholder="请填写支付比例,将自动计算本期金额" data-type="0" <%- isEdited ? '' : 'disabled' %>
 
-                                             value="<%- advance.pay_ratio && ctx.helper.mul(ctx.helper.div(advance.cur_amount, advancePayTotal), 100, 2) || 0 %>">
 
-                                         <div class="input-group-append"><span class="input-group-text">%</span></div>
 
-                                     </div>
 
-                                 </td>
 
-                                 <th width="150" class="text-center">本期金额</th>
 
-                                 <td class="text-right" width="405">
 
-                                     <div class="input-group input-group-sm">
 
-                                         <input type="number" class="pay-input form-control nospin text-right" min="1" <%- isEdited  ? '' : 'disabled' %>
 
-                                             placeholder="请填写本期金额,将自动计算支付比例" data-type="1"
 
-                                             value="<%- cur_amount %>">
 
-                                         <div class="input-group-append"><span class="input-group-text">元</span></div>
 
-                                     </div>
 
-                                 </td>
 
-                             </tr>
 
-                             <tr>
 
-                                 <th class="text-center">截止上期</th>
 
-                                 <td class="text-right" id="p_total1" width="405">
 
-                                     <%- prev_amount %>元
 
-                                 </td>
 
-                                 <th class="text-center">截止本期金额</th>
 
-                                 <td class="text-right" id="p_total2" width="405">
 
-                                     <%- prev_total_amount %>元
 
-                                 </td>
 
-                             </tr>
 
-                             <tr>
 
-                                 <th class="text-center" >备注</th>
 
-                                 <td colspan="3">
 
-                                     <textarea id="ad-remark" class="form-control form-control-sm" rows="2"
 
-                                         <%- isEdited ? '' : 'disabled' %>></textarea>
 
-                                 </td>
 
-                             </tr>
 
-                         </tbody>
 
-                     </table>
 
-                     <table class="table table-bordered mt-3">
 
-                         <thead>
 
-                             <tr>
 
-                                 <th colspan="3" class="text-center">附件</th>
 
-                             </tr>
 
-                         </thead>
 
-                         <tbody id="file-content">
 
-                         </tbody>
 
-                     </table>
 
-                     <% if(isEdited) { %>
 
-                     <table class="table table-bordered mt-3">
 
-                         <thead>
 
-                             <tr>
 
-                                 <th colspan="2" class="text-center">审批流程</th>
 
-                             </tr>
 
-                         </thead>
 
-                         <tbody>
 
-                             <tr>
 
-                                 <td width="30%">
 
-                                     <div class="card">
 
-                                         <ul class="list-group list-group-flush" id="auditors2">
 
-                                             <% auditors.forEach((item, idx) => { %>
 
-                                             <% if (idx === 0) { %>
 
-                                             <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
 
-                                                 <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- item.name %>
 
-                                                 <small class="text-muted"><%- item.role %></small>
 
-                                                 <span class="pull-right">原报</span>
 
-                                             </li>
 
-                                             <% } else if(idx === auditors.length -1 && idx !== 0) { %>
 
-                                             <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
 
-                                                 <i class="fa fa fa-stop-circle"></i> <%- item.name %>
 
-                                                 <small class="text-muted"><%- item.role %></small>
 
-                                                 <span class="pull-right">终审</span>
 
-                                             </li>
 
-                                             <% } else {%>
 
-                                             <li class="list-group-item" data-auditorId="<%- item.audit_id %>">
 
-                                                 <i class="fa fa-chevron-circle-down"></i> <%- item.name %>
 
-                                                 <small class="text-muted"><%- item.role %></small>
 
-                                                 <span class="pull-right"><%- ctx.helper.transFormToChinese(idx) -%>审</span>
 
-                                             </li>
 
-                                             <% } %>
 
-                                             <% }) %>
 
-                                         </ul>
 
-                                     </div>
 
-                                 </td>
 
-                                 <td width="70%">
 
-                                     <div class="dropdown text-right">
 
-                                         <% if (ctx.tender.info.shenpi.advance !== 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">
 
-                                                 <% 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>
 
-                                         <% } %>
 
-                                     </div>
 
-                                     <div class="card mt-3">
 
-                                         <div class="card-header">
 
-                                             审批流程
 
-                                         </div>
 
-                                         <ul class="list-group list-group-flush" id="auditors">
 
-                                             <% auditorList.forEach((item, idx) => { %>
 
-                                             <li class="list-group-item" auditorId="<%- item.audit_id %>">
 
-                                                 <% if (ctx.tender.info.shenpi.advance === shenpiConst.sp_status.sqspr ||
 
-                                                         (ctx.tender.info.shenpi.advance === shenpiConst.sp_status.gdzs && idx+1 !== auditorList.length)) { %>
 
-                                                 <a href="javascript: void(0)" class="text-danger pull-right">移除</a>
 
-                                                 <% } %>
 
-                                                 <span><%- idx+1 %> <%- item.name %></span>
 
-                                                 <small class="text-muted"><%- item.role %> </small>
 
-                                                 <p class="m-0 ml-2">
 
-                                                     <small class="text-muted"><%- item.company %></small>
 
-                                                 </p>
 
-                                             </li>
 
-                                             <% }) %>
 
-                                         </ul>
 
-                                     </div>
 
-                                 </td>
 
-                             </tr>
 
-                         </tbody>
 
-                     </table>
 
-                     <% } else {%>
 
-                     <table class="table table-bordered mt-3">
 
-                         <thead>
 
-                             <tr>
 
-                                 <th colspan="2" class="text-center">审批流程</th>
 
-                             </tr>
 
-                         </thead>
 
-                         <tbody>
 
-                             <tr>
 
-                                 <td width="30%">
 
-                                     <div class="card">
 
-                                         <ul class="list-group list-group-flush">
 
-                                             <% auditors.forEach((item, idx) => { %>
 
-                                             <% if (idx === 0) { %>
 
-                                             <li class="list-group-item" data-auditorid="<%- item.audit_id %>">
 
-                                                 <i class="fa fa fa-play-circle fa-rotate-90"></i> <%- item.name %>
 
-                                                 <small class="text-muted"><%- item.role %></small>
 
-                                                 <span class="pull-right">原报</span>
 
-                                             </li>
 
-                                             <% } else if(idx === auditors.length -1 && idx !== 0) { %>
 
-                                             <li class="list-group-item" data-auditorid="<%- item.audit_id %>">
 
-                                                 <i class="fa fa fa-stop-circle"></i> <%- item.name %>
 
-                                                 <small class="text-muted"><%- item.role %></small>
 
-                                                 <span class="pull-right">终审</span>
 
-                                             </li>
 
-                                             <% } else {%>
 
-                                             <li class="list-group-item" data-auditorid="<%- item.audit_id %>">
 
-                                                 <i class="fa fa-chevron-circle-down"></i> <%- item.name %>
 
-                                                 <small class="text-muted"><%- item.role %></small>
 
-                                                 <span
 
-                                                     class="pull-right"><%= ctx.helper.transFormToChinese(idx) %>审</span>
 
-                                             </li>
 
-                                             <% } %>
 
-                                             <% }) %>
 
-                                         </ul>
 
-                                     </div>
 
-                                 </td>
 
-                                 <td width="70%">
 
-                                     <% auditHistory.forEach((history, idx) => { %>
 
-                                         <!-- 展开/收起历史流程 -->
 
-                                         <% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %>
 
-                                             <div class="text-right">
 
-                                                 <a href="javascript: void(0);" id="fold-btn" data-target="show">展开历史审批流程</a>
 
-                                             </div>
 
-                                         <% } %>
 
-                                         <div class="<%- idx < auditHistory.length - 1 ? 'fold-card' : '' %>">
 
-                                             <div class="text-center text-muted" ><%- idx+1 %>#</div>
 
-                                             <ul class="timeline-list list-unstyled mt-2">
 
-                                                 <% history.forEach((auditor, index) => { %>
 
-                                                 <% if (index === 0) { %>
 
-                                                 <li class="timeline-list-item pb-2">
 
-                                                     <div class="timeline-item-date">
 
-                                                         <%- ctx.helper.formatDate(auditor.create_time) %>
 
-                                                     </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="card">
 
-                                                             <div class="card-body p-3">
 
-                                                                 <div class="card-text">
 
-                                                                     <p class="mb-1"><span
 
-                                                                             class="h5"><%- advance.user.name %></span><span
 
-                                                                             class="pull-right text-success"><%- idx !== 0 ? '重新' : '' %>上报审批</span>
 
-                                                                     </p>
 
-                                                                     <p class="text-muted mb-0"><%- advance.user.role %></p>
 
-                                                                 </div>
 
-                                                             </div>
 
-                                                         </div>
 
-                                                     </div>
 
-                                                 </li>
 
-                                                 <li class="timeline-list-item pb-2">
 
-                                                     <div class="timeline-item-date">
 
-                                                         <%- ctx.helper.formatDate(auditor.end_time) %>
 
-                                                     </div>
 
-                                                     <% if(index < history.length - 1) { %>
 
-                                                     <div class="timeline-item-tail"></div>
 
-                                                     <% } %>
 
-                                                     <% if(auditor.status === auditConst.status.checked) { %>
 
-                                                     <div class="timeline-item-icon bg-success text-light">
 
-                                                         <i class="fa fa-check"></i>
 
-                                                     </div>
 
-                                                     <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
 
-                                                     <div class="timeline-item-icon bg-warning text-light">
 
-                                                         <i class="fa fa-level-up"></i>
 
-                                                     </div>
 
-                                                     <% } else if(auditor.status === auditConst.status.checking) { %>
 
-                                                     <div class="timeline-item-icon bg-warning text-light">
 
-                                                         <i class="fa fa-ellipsis-h"></i>
 
-                                                     </div>
 
-                                                     <% } else {%>
 
-                                                     <div class="timeline-item-icon bg-secondary text-light">
 
-                                                     </div>
 
-                                                     <% } %>
 
-                                                     <div class="timeline-item-content">
 
-                                                         <div class="card">
 
-                                                             <div class="card-body p-3">
 
-                                                                 <div class="card-text">
 
-                                                                     <p class="mb-1"><span
 
-                                                                             class="h5"><%- auditor.name %></span><span
 
-                                                                             class="pull-right <%- auditConst.statusClass[auditor.status] %>"><%- auditConst.statusString[auditor.status] %></span>
 
-                                                                     </p>
 
-                                                                     <p class="text-muted mb-0"><%- auditor.role %></p>
 
-                                                                 </div>
 
-                                                             </div>
 
-                                                             <!--审批意见-->
 
-                                                             <% if (auditor.opinion) { %>
 
-                                                             <div class="card-body p-3 border-top">
 
-                                                                 <p style="margin: 0;"><%- auditor.opinion %></p>
 
-                                                             </div>
 
-                                                             <% } %>
 
-                                                         </div>
 
-                                                     </div>
 
-                                                 </li>
 
-                                                 <% } else {%>
 
-                                                 <li class="timeline-list-item pb-2">
 
-                                                     <div class="timeline-item-date">
 
-                                                         <%- ctx.helper.formatDate(auditor.end_time) %>
 
-                                                     </div>
 
-                                                     <% if(index < history.length - 1) { %>
 
-                                                     <div class="timeline-item-tail"></div>
 
-                                                     <% } %>
 
-                                                     <% if(auditor.status === auditConst.status.checked) { %>
 
-                                                     <div class="timeline-item-icon bg-success text-light">
 
-                                                         <i class="fa fa-check"></i>
 
-                                                     </div>
 
-                                                     <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
 
-                                                     <div class="timeline-item-icon bg-warning text-light">
 
-                                                         <i class="fa fa-level-up"></i>
 
-                                                     </div>
 
-                                                     <% } else if(auditor.status === auditConst.status.checking) { %>
 
-                                                     <div class="timeline-item-icon bg-warning text-light">
 
-                                                         <i class="fa fa-ellipsis-h"></i>
 
-                                                     </div>
 
-                                                     <% } else { %>
 
-                                                     <div class="timeline-item-icon bg-secondary text-light">
 
-                                                     </div>
 
-                                                     <% } %>
 
-                                                     <div class="timeline-item-content">
 
-                                                         <div class="card">
 
-                                                             <div class="card-body p-3">
 
-                                                                 <div class="card-text">
 
-                                                                     <p class="mb-1"><span
 
-                                                                             class="h5"><%- auditor.name %></span>
 
-                                                                         <span
 
-                                                                             class="pull-right
 
-                                                                                         <%- auditConst.statusClass[auditor.status] %>"><%- auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''%>
 
-                                                                             <%- auditor.status === auditConst.status.checkNo ? advance.user.name : '' %>
 
-                                                                             <%- auditor.status === auditConst.status.checkNoPre ? auditors.find(item => item.order === auditor.sort-1).name : '' %>
 
-                                                                         </span>
 
-                                                                     </p>
 
-                                                                     <p class="text-muted mb-0"><%- auditor.role %></p>
 
-                                                                 </div>
 
-                                                             </div>
 
-                                                             <!--审批意见-->
 
-                                                             <% if (auditor.opinion) { %>
 
-                                                             <div class="card-body p-3 border-top">
 
-                                                                 <p style="margin: 0;"><%- auditor.opinion %></p>
 
-                                                             </div>
 
-                                                             <% } %>
 
-                                                         </div>
 
-                                                     </div>
 
-                                                 </li>
 
-                                                 <% } %>
 
-                                                 <% }) %>
 
-                                             </ul>
 
-                                         </div>
 
-                                     <% }) %>
 
-                                 </td>
 
-                             </tr>
 
-                         </tbody>
 
-                     </table>
 
-                     <% } %>
 
-                 </div>
 
-             </div>
 
-         </div>
 
-     </div>
 
- </div>
 
- <script>
 
-     const cur_uid = parseInt('<%- ctx.session.sessionUser.accountId %>');
 
-     // const decimal = parseInt('<%- decimal %>');
 
-     const auditConst = JSON.parse('<%- JSON.stringify(auditConst) %>');
 
-     const advance = JSON.parse(unescape('<%- escape(JSON.stringify(advance)) %>'));
 
-     const prevAdvance = JSON.parse(unescape('<%- escape(JSON.stringify(prevAdvance)) %>'));
 
-     const isEdited = JSON.parse('<%- isEdited %>');
 
-     const advancePayTotal = parseFloat('<%- advancePayTotal %>');
 
-     const preUrl = '<%- preUrl %>';
 
-     const fileList = JSON.parse(unescape('<%- escape(JSON.stringify(fileList)) %>')) || [];
 
-     const whiteList = JSON.parse('<%- JSON.stringify(whiteList) %>');
 
-     const curAuditor = JSON.parse(unescape('<%- escape(JSON.stringify(ctx.advance.curAuditor)) %>'));
 
-     // 展开历史审核记录
 
-     $('td #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('展开历史审核记录')
 
-             })
 
-         }
 
-     });
 
-     // 处理换行
 
-     advance.remark && $('#ad-remark').html(advance.remark.replace(/<br\/>/g, '\n').replace(/' '/, '\s'));
 
- </script>
 
- <% if(isEdited && ctx.session.sessionUser.accountId === ctx.advance.uid) { %>
 
- <script>
 
-     const accountList = JSON.parse(unescape('<%- escape(JSON.stringify(accountList)) %>'));
 
-     const accountGroup = JSON.parse(unescape('<%- escape(JSON.stringify(accountGroup)) %>'));
 
-     const shenpi_status = <%- ctx.tender.info.shenpi.advance %>;
 
-     const shenpiConst =  JSON.parse('<%- JSON.stringify(shenpiConst) %>');
 
- </script>
 
- <% } %>
 
 
  |