123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- <% include ../tender/tender_sub_menu.ejs %>
- <div class="panel-content">
- <div class="panel-title">
- <div class="title-main d-flex">
- <% include ../tender/tender_sub_mini_menu.ejs %>
- <h2>
- 材料调差期列表
- </h2>
- <div class="ml-auto">
- <% if (ctx.session.sessionUser.accountId === ctx.tender.data.user_id && stages.length > 0 &&
- (materials.length === 0 || materials[0].status === auditConst.status.checked)) { %>
- <a href="#add-qi" data-toggle="modal" data-target="#add-qi" class="btn btn-primary btn-sm pull-right">开始新一期</a>
- <% } %>
- </div>
- </div>
- </div>
- <div class="content-wrap">
- <div class="c-body">
- <div class="sjs-height-0">
- <table class="table table-bordered">
- <thead>
- <tr>
- <th rowspan="2">期数</th>
- <th class="text-center" rowspan="2">添加时间</th>
- <th class="text-center" rowspan="2">计量期</th>
- <th class="text-center" colspan="<% if (openMaterialTax && !allMaterialTax) { %>3<% } else { %>2<% } %>">信息价调差</th>
- <th class="text-center" colspan="2">指数法调差</th>
- <th class="text-center" colspan="<% if (openMaterialTax) { %>3<% } else { %>2<% } %>">合计</th>
- <th class="text-center" rowspan="2">审批进度</th>
- <th class="text-center" rowspan="2" width="140">操作</th>
- </tr>
- <tr>
- <th class="text-center">价差费用</th>
- <% if (openMaterialTax) { %><th class="text-center">价差费用(含材料税)</th><% } %>
- <% if ((openMaterialTax && !allMaterialTax) || !openMaterialTax) { %><th class="text-center">价差费用(含建筑税)</th><% } %>
- <th class="text-center">价差费用</th>
- <th class="text-center">价差费用(含建筑税)</th>
- <th class="text-center">价差费用</th>
- <% if (openMaterialTax) { %><th class="text-center">价差费用(含材料税)</th><% } %>
- <th class="text-center">价差费用(含建筑税)</th>
- </tr>
- </thead>
- <tbody>
- <% for (const m of materials) { %>
- <tr>
- <td>
- <a href="<%- '/tender/' + ctx.tender.id + '/measure/material/' + m.order %>">第 <%- m.order %> 期</a>
- </td>
- <td class="text-center"><%= moment(m.in_time).format('YYYY-MM-DD') %></td>
- <td class="text-center">第 <%= m.s_order %> 期</td>
- <td class="text-right"><%= m.m_tp !== null ? ctx.helper.round(m.m_tp, m.decimal.tp) : null %></td>
- <% if (openMaterialTax) { %><td class="text-right"><% if (m.material_tax) { %><% if (m.m_tax_tp) { %><%- m.m_tax_tp %><% } else { %><%- m.m_tp %><% } %><% } %></td><% } %>
- <% if ((openMaterialTax && !allMaterialTax) || !openMaterialTax) { %><td class="text-right"><% if (!m.material_tax) { %><%= m.m_tp !== null ? ctx.helper.round(ctx.helper.mul(m.m_tp, 1+m.rate/100), m.decimal.tp) : null %><% } %></td><% } %>
- <td class="text-right"><%= m.ex_tp !== null ? ctx.helper.round(m.ex_tp, m.decimal.tp) : null %></td>
- <td class="text-right"><%= m.ex_tp !== null ? ctx.helper.round(ctx.helper.mul(m.ex_tp, 1+m.rate/100), m.decimal.tp) : null %></td>
- <td class="text-right"><%= ctx.helper.add(ctx.helper.round(m.ex_tp, m.decimal.tp), ctx.helper.round(m.m_tp, m.decimal.tp)) %></td>
- <% if (openMaterialTax) { %><td class="text-right"><% if (m.material_tax) { %><% if (m.m_tax_tp) { %><%- m.m_tax_tp %><% } else { %><%- m.m_tp %><% } %><% } %></td><% } %>
- <td class="text-right"><% if (m.material_tax) { %><%= m.ex_tp !== null ? ctx.helper.round(ctx.helper.mul(m.ex_tp, 1+m.rate/100), m.decimal.tp) : null %><% } else { %><%= ctx.helper.add(ctx.helper.round(ctx.helper.mul(m.ex_tp, 1+m.rate/100), m.decimal.tp), ctx.helper.round(ctx.helper.mul(m.m_tp, 1+m.rate/100), m.decimal.tp)) %><% } %></td>
- <td class="<%- auditConst.auditProgressClass[m.status] %>">
- <% if (m.curAuditor) { %>
- <a href="#sp-list" data-toggle="modal" data-target="#sp-list" m-order="<%- m.order %>"><%- m.curAuditor.name %><%if (m.curAuditor.role !== '' && m.curAuditor.role !== null) { %>-<%- m.curAuditor.role %><% } %></a>
- <% } %>
- <%- auditConst.auditProgress[m.status] %>
- </td>
- <td class="text-center">
- <% if (m.status === auditConst.status.uncheck && m.user_id === ctx.session.sessionUser.accountId) { %>
- <a href="<%- '/tender/' + ctx.tender.id + '/measure/material/' + m.order %>" class="btn <%- auditConst.statusButtonClass[m.status] %> btn-sm"><%- auditConst.statusButton[m.status] %></a>
- <% } else if (m.status === auditConst.status.checkNo && m.curAuditor && m.user_id === ctx.session.sessionUser.accountId) { %>
- <a href="<%- '/tender/' + ctx.tender.id + '/measure/material/' + m.order %>" class="btn <%- auditConst.statusButtonClass[m.status] %> btn-sm"><%- auditConst.statusButton[m.status] %></a>
- <% } else if (m.status === auditConst.status.checking && m.curAuditor && m.curAuditor.aid === ctx.session.sessionUser.accountId) { %>
- <a href="<%- '/tender/' + ctx.tender.id + '/measure/material/' + m.order %>" class="btn <%- auditConst.statusButtonClass[m.status] %> btn-sm"><%- auditConst.statusButton[m.status] %></a>
- <% } else { %>
- <span class="<%- auditConst.auditProgressClass[m.status] %>"><%- auditConst.auditProgress[m.status] %></span>
- <% } %>
- <% if ((ctx.session.sessionUser.is_admin || ((m.status === auditConst.status.uncheck || m.status === auditConst.status.checkNo) && m.user_id === ctx.session.sessionUser.accountId)) && m.order === materials.length) { %>
- <a href="#del-qi" class="btn btn-outline-danger btn-sm ml-1" data-toggle="modal" data-target="#del-qi">删除</a>
- <% } %>
- </td>
- </tr>
- <% } %>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- <script src="/public/js/sub_menu.js"></script>
- <script>
- const tenderId = '<%- ctx.tender.id %>';
- const auditConst = JSON.parse('<%- auditConst2 %>');
- $.subMenu({
- menu: '#sub-menu', miniMenu: '#sub-mini-menu', miniMenuList: '#mini-menu-list',
- toMenu: '#to-menu', toMiniMenu: '#to-mini-menu',
- key: 'menu.1.0.0',
- miniHint: '#sub-mini-hint', hintKey: 'menu.hint.1.0.1',
- callback: function (info) {
- if (info.mini) {
- $('.panel-title').addClass('fluid');
- $('#sub-menu').removeClass('panel-sidebar');
- } else {
- $('.panel-title').removeClass('fluid');
- $('#sub-menu').addClass('panel-sidebar');
- }
- autoFlashHeight();
- }
- });
- </script>
|