| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <% 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>
- <% if (ctx.permission.cost.analysis_add && (stages.length === 0 || stages[0].audit_status === auditConst.status.checked) && validRelaStages.length > 0) { %>
- <div class="ml-auto">
- <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">期数</th>
- <th width="70px">报审月份</th>
- <th width="70px">关联成本</th>
- <th width="70px">创建人</th>
- <th width="200px">项目收入</th>
- <th width="200px">项目支出</th>
- <th width="200px">利润</th>
- <th width="200px">利润率</th>
- <th>审批进度</th>
- <th width="100px">操作</th>
- </tr>
- </thead>
- <tbody>
- <% for (const s of stages) { %>
- <tr>
- <td>
- <a href="/sp/<%- ctx.subProject.id %>/cost/tender/<%- ctx.tender.id %>/analysis/<%- s.stage_order %>/stage" target="_blank">第 <%- s.stage_order %> 期</a>
- </td>
- <td class="text-center"><%- s.stage_date %></td>
- <td class="text-center">第<%- s.rela_stage.sorder %>期</td>
- <td class="text-center"><%- s.user_name %></td>
- <td class="text-right"><%- s.stage_tp.in_tp %></td>
- <td class="text-right"><%- s.stage_tp.out_tp %></td>
- <td class="text-right"><%- s.stage_tp.profit %></td>
- <td class="text-right"><%- s.stage_tp.profit_percent %></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 %>/analysis/<%- 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 %>/analysis/<%- 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 %>/analysis/<%- 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) %>');
- </script>
|