|
@@ -3,9 +3,17 @@
|
|
|
<div class="panel-title">
|
|
|
<div class="title-main d-flex">
|
|
|
<% include ../tender/tender_sub_mini_menu.ejs %>
|
|
|
- <h2>
|
|
|
+ <div class="d-inline-block">
|
|
|
材料调差期列表
|
|
|
- </h2>
|
|
|
+ </div>
|
|
|
+ <% if (ctx.session.sessionUser.accountId === ctx.tender.data.user_id || ctx.session.sessionUser.is_admin) { %>
|
|
|
+ <div class="d-inline-block mx-1">
|
|
|
+ <button href="#cate-set" class="btn btn-sm btn-light text-primary" data-toggle="modal" data-target="#row-view"><i class="fa fa-table"></i> 列显示</button>
|
|
|
+ </div>
|
|
|
+ <% } %>
|
|
|
+ <div class="d-inline-block">
|
|
|
+ <button href="#zjhj" class="btn btn-sm btn-light text-primary" data-toggle="modal" data-target="#zjhj">期合计</button>
|
|
|
+ </div>
|
|
|
<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)) { %>
|
|
@@ -20,26 +28,41 @@
|
|
|
<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" rowspan="2">调差周期</th>
|
|
|
+ <% const rowSpan = ctx.helper._.findIndex(materialColShow, { checked: true}) !== -1 ? 2 : 1%>
|
|
|
+ <th rowspan="<%- rowSpan %>">期数</th>
|
|
|
+ <th class="text-center" rowspan="<%- rowSpan %>">添加时间</th>
|
|
|
+ <th class="text-center" rowspan="<%- rowSpan %>">计量期</th>
|
|
|
+ <th class="text-center" rowspan="<%- rowSpan %>">调差周期</th>
|
|
|
+ <% if (materialColShow[0].checked) { %>
|
|
|
<th class="text-center" colspan="<% if (openMaterialTax && !allMaterialTax) { %>3<% } else { %>2<% } %>">信息价调差</th>
|
|
|
+ <% } %>
|
|
|
+ <% if (materialColShow[1].checked) { %>
|
|
|
<th class="text-center" colspan="2">指数法调差</th>
|
|
|
+ <% } %>
|
|
|
+ <% if (materialColShow[2].checked) { %>
|
|
|
<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>
|
|
|
+ <% } %>
|
|
|
+ <th class="text-center" rowspan="<%- rowSpan %>">审批进度</th>
|
|
|
+ <th class="text-center" rowspan="<%- rowSpan %>" width="140">操作</th>
|
|
|
</tr>
|
|
|
+ <% if (rowSpan === 2) { %>
|
|
|
<tr>
|
|
|
+ <% if (materialColShow[0].checked) { %>
|
|
|
<th class="text-center">价差费用</th>
|
|
|
<% if (openMaterialTax) { %><th class="text-center">价差费用(含材料税)</th><% } %>
|
|
|
<% if ((openMaterialTax && !allMaterialTax) || !openMaterialTax) { %><th class="text-center">价差费用(含建筑税)</th><% } %>
|
|
|
+ <% } %>
|
|
|
+ <% if (materialColShow[1].checked) { %>
|
|
|
<th class="text-center">价差费用</th>
|
|
|
<th class="text-center">价差费用(含建筑税)</th>
|
|
|
+ <% } %>
|
|
|
+ <% if (materialColShow[2].checked) { %>
|
|
|
<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) { %>
|
|
@@ -55,14 +78,20 @@
|
|
|
</span>
|
|
|
<a href="#edit" class="edit-material" data-mid="<%- m.id %>" data-order="<%- m.order %>" data-period="<%- m.period %>" data-toggle="modal" data-target="#edit"><i class="fa fa-pencil-square-o "></i></a>
|
|
|
</td>
|
|
|
+ <% if (materialColShow[0].checked) { %>
|
|
|
<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><% } %>
|
|
|
+ <% } %>
|
|
|
+ <% if (materialColShow[1].checked) { %>
|
|
|
<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.exponent_rate/100), m.decimal.tp) : null %></td>
|
|
|
+ <% } %>
|
|
|
+ <% if (materialColShow[2].checked) { %>
|
|
|
<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.exponent_rate/100), m.decimal.tp) : null %><% } else { %><%= ctx.helper.add(ctx.helper.round(ctx.helper.mul(m.ex_tp, 1+m.exponent_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>
|
|
@@ -104,6 +133,7 @@
|
|
|
const auditConst = JSON.parse('<%- auditConst2 %>');
|
|
|
const preUrl = JSON.parse(unescape('<%- escape(JSON.stringify(preUrl)) %>'));
|
|
|
const lastMaterialListNum = parseInt('<%- lastMaterialList ? lastMaterialList.length : 0 %>');
|
|
|
+ const materialColShow = JSON.parse(unescape('<%- escape(JSON.stringify(materialColShow)) %>'));
|
|
|
$.subMenu({
|
|
|
menu: '#sub-menu', miniMenu: '#sub-mini-menu', miniMenuList: '#mini-menu-list',
|
|
|
toMenu: '#to-menu', toMiniMenu: '#to-mini-menu',
|