<% include ../tender/tender_sub_menu.ejs %>
第<%- advance.order %>期
<% include ./audit_btn.ejs %>

第<%- advance.order %>期 <%- advance.type === auditConst.type.start ? '开工' : '材料' %>预付款

<% if(isEdited && ctx.session.sessionUser.accountId === ctx.advance.uid) { %> <% } else {%> <% } %>
签约<%- advance.type === auditConst.type.start ? '开工' : '材料' %>预付款:<%- ctx.helper.formatMoney(advancePayTotal) %> 元
支付比例
%
本期金额
支付比例 <%- advance.cur_amount && ctx.helper.mul(ctx.helper.div(advance.cur_amount, advancePayTotal), 100, 2) || 0 %>% 本期金额 <%- ctx.helper.formatMoney((advance.cur_amount || 0), ',', decimal) %>
截止上期 <%- ctx.helper.formatMoney((prevAdvance && prevAdvance.prev_total_amount || 0), ',', decimal) %> 截止本期金额 <%- ctx.helper.formatMoney((prevAdvance && prevAdvance.prev_total_amount + advance.cur_amount || (advance.cur_amount || 0)), ',', decimal) %>
备注
附件
<% if(isEdited && ctx.session.sessionUser.accountId === ctx.advance.uid) { %>
审批流程
    <% auditors.forEach((item, idx) => { %> <% if (idx === 0) { %>
  • <%- item.name %> <%- item.role %>
  • <% } else if(idx === auditors.length -1 && idx !== 0) { %>
  • <%- item.name %> <%- item.role %>
  • <% } else {%>
  • <%- item.name %> <%- item.role %>
  • <% } %> <% }) %>
审批流程
    <% ctx.advance.auditors && ctx.advance.auditors.forEach((item, idx) => { %>
  • 移除<%- idx+1 %> <%- item.name %> <%- item.role %>

    <%- item.company %>

  • <% }) %>
<% } else {%>
审批流程
    <% auditors.forEach((item, idx) => { %> <% if (idx === 0) { %>
  • <%- item.name %> <%- item.role %> 原报
  • <% } else if(idx === auditors.length -1 && idx !== 0) { %>
  • <%- item.name %> <%- item.role %> 终审
  • <% } else {%>
  • <%- item.name %> <%- item.role %> <%= ctx.helper.transFormToChinese(idx) %>审
  • <% } %> <% }) %>
<% auditHistory.forEach((auditors, idx) => { %>
> <%- idx === auditHistory.length - 1 ? 1 : idx+1 %>#
    <% auditors.forEach((auditor, index) => { %> <% if (index === 0) { %>
  • <%- ctx.helper.formatDate(auditor.create_time) %>

    <%- advance.user.name %><%- idx !== 0 ? '重新' : '' %>上报审批

    <%- advance.user.role %>

  • <%- ctx.helper.formatDate(auditor.end_time) %>
    <% if(index < auditors.length - 1) { %>
    <% } %> <% if(auditor.status === auditConst.status.checked) { %>
    <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
    <% } else if(auditor.status === auditConst.status.checking) { %>
    <% } else {%>
    <% } %>

    <%- auditor.name %><%- auditConst.statusString[auditor.status] %>

    <%- auditor.role %>

    <% if (auditor.opinion) { %>

    <%- auditor.opinion %>

    <% } %>
  • <% } else {%>
  • <%- ctx.helper.formatDate(auditor.end_time) %>
    <% if(index < auditors.length - 1) { %>
    <% } %> <% if(auditor.status === auditConst.status.checked) { %>
    <% } else if(auditor.status === auditConst.status.checkNo || auditor.status === auditConst.status.checkNoPre) {%>
    <% } else if(auditor.status === auditConst.status.checking) { %>
    <% } else { %>
    <% } %>

    <%- auditor.name %> <%- auditor.status !== auditConst.status.uncheck ? auditConst.statusString[auditor.status] : ''%> <%- auditor.status === auditConst.status.checkNo ? advance.user.name : '' %> <%- auditor.status === auditConst.status.checkNoPre ? auditors[index-1].name : '' %>

    <%- auditor.role %>

    <% if (auditor.opinion) { %>

    <%- auditor.opinion %>

    <% } %>
  • <% } %> <% }) %>
<% if(idx === auditHistory.length - 1 && auditHistory.length !== 1) { %> <% } %> <% }) %>
<% } %>
<% if(isEdited && ctx.session.sessionUser.accountId === ctx.advance.uid) { %> <% } %>