| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- <% include ./list_menu.ejs %>
- <div class="panel-content">
- <div class="panel-title">
- <div class="title-main d-flex">
- <% include ./list_mini_menu.ejs %>
- <h2>
- 审批列表
- </h2>
- <div class="ml-auto">
- <a href="#cost-ledger-col" data-toggle="modal" data-target="#cost-ledger-col" class="btn btn-primary btn-sm">列设置</a>
- <% if (ctx.permission.cost.ledger_add && (stages.length === 0 || stages[0].audit_status === auditConst.status.checked)) { %>
- <a href="#add-qi" data-toggle="modal" data-target="#add-qi" class="btn btn-primary btn-sm">新建报审</a>
- <% } %>
- </div>
- </div>
- </div>
- <div class="content-wrap">
- <div class="c-body">
- <div class="sjs-height-0">
- <table class="table table-bordered table-hover">
- <thead>
- <tr class="text-center">
- <th width="80px" rowspan="2">期数</th>
- <th width="70px" rowspan="2">报审月份</th>
- <% if (colSet.cur) { %>
- <th colspan="4">本期金额</th>
- <% } %>
- <% if (colSet.cur_excl_tax) { %>
- <th colspan="2">本期金额(不含税)</th>
- <% } %>
- <% if (colSet.end) { %>
- <th colspan="4">截止本期金额</th>
- <% } %>
- <% if (colSet.end_excl_tax) { %>
- <th colspan="2">截止本期金额(不含税)</th>
- <% } %>
- <th rowspan="2">审批进度</th>
- <th width="100px" rowspan="2">操作</th>
- </tr>
- <tr class="text-center">
- <% if (colSet.cur) { %>
- <th width="100px" name="tp-col">付款</th>
- <th width="100px" name="tp-col">扣款</th>
- <th width="100px" name="tp-col">应付</th>
- <th width="100px" name="tp-col">实付</th>
- <% } %>
- <% if (colSet.cur_excl_tax) { %>
- <th width="100px" name="tp-col">应付</th>
- <th width="100px" name="tp-col">实付</th>
- <% } %>
- <% if (colSet.end) { %>
- <th width="100px" name="tp-col">付款</th>
- <th width="100px" name="tp-col">扣款</th>
- <th width="100px" name="tp-col">应付</th>
- <th width="100px" name="tp-col">实付</th>
- <% } %>
- <% if (colSet.end_excl_tax) { %>
- <th width="100px" name="tp-col">应付</th>
- <th width="100px" name="tp-col">实付</th>
- <% } %>
- </tr>
- </thead>
- <tbody>
- <% for (const s of stages) { %>
- <tr>
- <td>
- <a href="/sp/<%- ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/ledger/<%- s.stage_order %>/stage" target="_blank">第 <%- s.stage_order %> 期</a>
- </td>
- <td class="text-center"><%- s.stage_date %></td>
- <% if (colSet.cur) { %>
- <td class="text-right"><%- s.stage_tp.pay_tp %></td>
- <td class="text-right"><%- s.stage_tp.cut_tp %></td>
- <td class="text-right"><%- s.stage_tp.yf_tp %></td>
- <td class="text-right"><%- s.stage_tp.sf_tp %></td>
- <% } %>
- <% if (colSet.cur_excl_tax) { %>
- <td class="text-right"><%- s.stage_tp.yf_excl_tax_tp %></td>
- <td class="text-right"><%- s.stage_tp.sf_excl_tax_tp %></td>
- <% } %>
- <% if (colSet.end) { %>
- <td class="text-right"><%- s.stage_end_tp.pay_tp %></td>
- <td class="text-right"><%- s.stage_end_tp.cut_tp %></td>
- <td class="text-right"><%- s.stage_end_tp.yf_tp %></td>
- <td class="text-right"><%- s.stage_end_tp.sf_tp %></td>
- <% } %>
- <% if (colSet.end_excl_tax) { %>
- <td class="text-right"><%- s.stage_end_tp.yf_excl_tax_tp %></td>
- <td class="text-right"><%- s.stage_end_tp.sf_excl_tax_tp %></td>
- <% } %>
- <td class="<%- auditConst.info[s.audit_status].class %>">
- <% if (s.audit_status === auditConst.status.checked && s.final_auditor_str) { %>
- <a href="#sp-list" data-toggle="modal" data-target="#sp-list" stage-order="<%- s.stage_order %>"><%- s.final_auditor_str %></a>
- <% } else { %>
- <% if (s.curAuditors.length > 0) { %>
- <% if (s.curAuditors[0].audit_type === auditType.key.common) { %>
- <a href="#sp-list" data-toggle="modal" data-target="#sp-list" stage-order="<%- s.stage_order %>"><%- s.curAuditors[0].name %><%if (s.curAuditors[0].role !== '' && s.curAuditors[0].role !== null) { %>-<%- s.curAuditors[0].role %><% } %></a>
- <% } else { %>
- <a href="#sp-list" data-toggle="modal" data-target="#sp-list" stage-order="<%- s.stage_order %>"><%- ctx.helper.transFormToChinese(s.curAuditors[0].audit_order) + '审' %></a>
- <% } %>
- <% } %>
- <% } %>
- <%- auditConst.info[s.audit_status].title %>
- </td>
- <td class="text-center">
- <% if (s.audit_status === auditConst.status.uncheck && s.create_user_id === ctx.session.sessionUser.accountId) { %>
- <a href="/sp/<%- ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/ledger/<%- s.stage_order %>/stage" target="_blank" class="btn <%- auditConst.info[s.audit_status].btnClass %> btn-sm"><%- auditConst.info[s.audit_status].btnTitle %></a>
- <% } else if (s.audit_status === auditConst.status.checkNo && s.create_user_id === ctx.session.sessionUser.accountId) { %>
- <a href="/sp/<%- ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/ledger/<%- s.stage_order %>/stage" target="_blank" class="btn <%- auditConst.info[s.audit_status].btnClass %> btn-sm"><%- auditConst.info[s.audit_status].btnTitle %></a>
- <% } else if ((s.audit_status === auditConst.status.checking || s.audit_status === auditConst.status.checkNoPre) && s.curAuditors && s.curAuditors.findIndex(x => { return x.audit_id === ctx.session.sessionUser.accountId; }) >= 0) { %>
- <a href="/sp/<%- ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/ledger/<%- s.stage_order %>/stage" target="_blank" class="btn <%- auditConst.info[s.audit_status].btnClass %> btn-sm"><%- auditConst.info[s.audit_status].btnTitle %></a>
- <% } else { %>
- <span class="<%- auditConst.info[s.audit_status].class %>"><%- auditConst.info[s.audit_status].title %></span>
- <% } %>
- </td>
- </tr>
- <% } %>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- <script>
- const stages = JSON.parse('<%- JSON.stringify(stages) %>');
- const auditType = JSON.parse('<%- JSON.stringify(auditType) %>');
- const auditConst = JSON.parse('<%- JSON.stringify(auditConst) %>');
- if ($('[name="tp-col"]').length > 0) $('[name="tp-col"]').attr('width', (1200/$('[name="tp-col"]').length) + 'px')
- </script>
|