|
@@ -43,15 +43,23 @@
|
|
<div class="input-group-prepend">
|
|
<div class="input-group-prepend">
|
|
<span class="input-group-text" id="basic-addon1">增值税税率</span>
|
|
<span class="input-group-text" id="basic-addon1">增值税税率</span>
|
|
</div>
|
|
</div>
|
|
- <select class="form-control form-control-sm col-1" id="changeRate">
|
|
|
|
- <% if (!material.readOnly) { %>
|
|
|
|
- <option value="9" <% if(material.rate === 9) { %>selected<% } %>>9%</option>
|
|
|
|
- <option value="10" <% if(material.rate === 10) { %>selected<% } %>>10%</option>
|
|
|
|
- <option value="11" <% if(material.rate === 11) { %>selected<% } %>>11%</option>
|
|
|
|
- <% } else { %>
|
|
|
|
- <option value="<%= material.rate %>" selected><%= material.rate %>%</option>
|
|
|
|
- <% } %>
|
|
|
|
- </select>
|
|
|
|
|
|
+ <input id="rateInput" class="form-control form-control-sm col-1" <% if (material.readOnly) { %>disabled<% } %> type="number" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" min="0" step="1" max="100" value="<%- material.exponent_rate %>">
|
|
|
|
+ <% if (!material.readOnly) { %>
|
|
|
|
+ <div class="dropdown-menu">
|
|
|
|
+ <a class="dropdown-item changeRate" href="javascript:void(0);" data-value="9">9%</a>
|
|
|
|
+ <a class="dropdown-item changeRate" href="javascript:void(0);" data-value="10">10%</a>
|
|
|
|
+ <a class="dropdown-item changeRate" href="javascript:void(0);" data-value="11">11%</a>
|
|
|
|
+ </div>
|
|
|
|
+ <% } %>
|
|
|
|
+ <!--<select class="form-control form-control-sm col-1" id="changeRate">-->
|
|
|
|
+ <!--<% if (!material.readOnly) { %>-->
|
|
|
|
+ <!--<option value="9" <% if(material.exponent_rate === 9) { %>selected<% } %>>9%</option>-->
|
|
|
|
+ <!--<option value="10" <% if(material.exponent_rate === 10) { %>selected<% } %>>10%</option>-->
|
|
|
|
+ <!--<option value="11" <% if(material.exponent_rate === 11) { %>selected<% } %>>11%</option>-->
|
|
|
|
+ <!--<% } else { %>-->
|
|
|
|
+ <!--<option value="<%= material.exponent_rate %>" selected><%= material.exponent_rate %>%</option>-->
|
|
|
|
+ <!--<% } %>-->
|
|
|
|
+ <!--</select>-->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<% if (!material.material_tax && !old_had_tax) { %>
|
|
<% if (!material.material_tax && !old_had_tax) { %>
|
|
@@ -72,8 +80,8 @@
|
|
<tr id="rate_set"><td>材料价差费用(含建筑税)</td>
|
|
<tr id="rate_set"><td>材料价差费用(含建筑税)</td>
|
|
<td class="text-center"><%= material.m_tp !== null ? ctx.helper.round(ctx.helper.mul(material.m_tp, 1+material.rate/100), material.decimal.tp) : null %></td>
|
|
<td class="text-center"><%= material.m_tp !== null ? ctx.helper.round(ctx.helper.mul(material.m_tp, 1+material.rate/100), material.decimal.tp) : null %></td>
|
|
<td class="text-center"><%= material.m_tp !== null || pre_tp_hs !== null ? ctx.helper.round(ctx.helper.add(pre_tp_hs, ctx.helper.round(ctx.helper.mul(material.m_tp, 1+material.rate/100), material.decimal.tp)), material.decimal.tp) : null %></td>
|
|
<td class="text-center"><%= material.m_tp !== null || pre_tp_hs !== null ? ctx.helper.round(ctx.helper.add(pre_tp_hs, ctx.helper.round(ctx.helper.mul(material.m_tp, 1+material.rate/100), material.decimal.tp)), material.decimal.tp) : null %></td>
|
|
- <td class="text-center"><%= material.ex_tp !== null ? ctx.helper.round(ctx.helper.mul(material.ex_tp, 1+material.rate/100), material.decimal.tp) : null %></td>
|
|
|
|
- <td class="text-center"><%= material.ex_tp !== null || ex_pre_tp_hs !== null ? ctx.helper.round(ctx.helper.add(ex_pre_tp_hs, ctx.helper.round(ctx.helper.mul(material.ex_tp, 1+material.rate/100), material.decimal.tp)), material.decimal.tp) : null %></td>
|
|
|
|
|
|
+ <td class="text-center"><%= material.ex_tp !== null ? ctx.helper.round(ctx.helper.mul(material.ex_tp, 1+material.exponent_rate/100), material.decimal.tp) : null %></td>
|
|
|
|
+ <td class="text-center"><%= material.ex_tp !== null || ex_pre_tp_hs !== null ? ctx.helper.round(ctx.helper.add(ex_pre_tp_hs, ctx.helper.round(ctx.helper.mul(material.ex_tp, 1+material.exponent_rate/100), material.decimal.tp)), material.decimal.tp) : null %></td>
|
|
</tr>
|
|
</tr>
|
|
</table>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
@@ -93,17 +101,17 @@
|
|
<td class="text-center"><%= material.ex_tp !== null ? ctx.helper.round(material.ex_tp, material.decimal.tp) : null %></td>
|
|
<td class="text-center"><%= material.ex_tp !== null ? ctx.helper.round(material.ex_tp, material.decimal.tp) : null %></td>
|
|
<td class="text-center"><%= material.ex_tp !== null || material.ex_pre_tp !== null ? ctx.helper.round(ctx.helper.add(material.ex_pre_tp, material.ex_tp), material.decimal.tp) : null %></td>
|
|
<td class="text-center"><%= material.ex_tp !== null || material.ex_pre_tp !== null ? ctx.helper.round(ctx.helper.add(material.ex_pre_tp, material.ex_tp), material.decimal.tp) : null %></td>
|
|
</tr>
|
|
</tr>
|
|
- <tr><td>材料价差费用(含材料税)</td>
|
|
|
|
- <td class="text-center"><%= material.material_tax ? (material.m_tax_tp !== null ? material.m_tax_tp : null) : '-' %></td>
|
|
|
|
- <td class="text-center"><%= material.material_tax ? (material.m_tax_tp !== null || material.m_tax_pre_tp !== null ? ctx.helper.round(ctx.helper.add(material.m_tax_pre_tp, material.m_tax_tp), material.decimal.tp) : null) : material.m_tax_pre_tp %></td>
|
|
|
|
- <td class="text-center">-</td>
|
|
|
|
- <td class="text-center">-</td>
|
|
|
|
- </tr>
|
|
|
|
|
|
+ <!--<tr><td>材料价差费用(含材料税)</td>-->
|
|
|
|
+ <!--<td class="text-center"><%= material.material_tax ? (material.m_tax_tp !== null ? material.m_tax_tp : null) : '-' %></td>-->
|
|
|
|
+ <!--<td class="text-center"><%= material.material_tax ? (material.m_tax_tp !== null || material.m_tax_pre_tp !== null ? ctx.helper.round(ctx.helper.add(material.m_tax_pre_tp, material.m_tax_tp), material.decimal.tp) : null) : material.m_tax_pre_tp %></td>-->
|
|
|
|
+ <!--<td class="text-center">-</td>-->
|
|
|
|
+ <!--<td class="text-center">-</td>-->
|
|
|
|
+ <!--</tr>-->
|
|
<tr id="rate_set"><td>材料价差费用(含建筑税)</td>
|
|
<tr id="rate_set"><td>材料价差费用(含建筑税)</td>
|
|
<td class="text-center"><%= !material.material_tax ? (material.m_tp !== null ? ctx.helper.round(ctx.helper.mul(material.m_tp, 1+material.rate/100), material.decimal.tp) : null) : '-' %></td>
|
|
<td class="text-center"><%= !material.material_tax ? (material.m_tp !== null ? ctx.helper.round(ctx.helper.mul(material.m_tp, 1+material.rate/100), material.decimal.tp) : null) : '-' %></td>
|
|
<td class="text-center"><%= !material.material_tax ? (material.m_tp !== null || pre_tp_hs !== null ? ctx.helper.round(ctx.helper.add(pre_tp_hs, ctx.helper.round(ctx.helper.mul(material.m_tp, 1+material.rate/100), material.decimal.tp)), material.decimal.tp) : null) : pre_tp_hs !== null ? pre_tp_hs : '-' %></td>
|
|
<td class="text-center"><%= !material.material_tax ? (material.m_tp !== null || pre_tp_hs !== null ? ctx.helper.round(ctx.helper.add(pre_tp_hs, ctx.helper.round(ctx.helper.mul(material.m_tp, 1+material.rate/100), material.decimal.tp)), material.decimal.tp) : null) : pre_tp_hs !== null ? pre_tp_hs : '-' %></td>
|
|
- <td class="text-center"><%= material.ex_tp !== null ? ctx.helper.round(ctx.helper.mul(material.ex_tp, 1+material.rate/100), material.decimal.tp) : null %></td>
|
|
|
|
- <td class="text-center"><%= material.ex_tp !== null || ex_pre_tp_hs !== null ? ctx.helper.round(ctx.helper.add(ex_pre_tp_hs, ctx.helper.round(ctx.helper.mul(material.ex_tp, 1+material.rate/100), material.decimal.tp)), material.decimal.tp) : null %></td>
|
|
|
|
|
|
+ <td class="text-center"><%= material.ex_tp !== null ? ctx.helper.round(ctx.helper.mul(material.ex_tp, 1+material.exponent_rate/100), material.decimal.tp) : null %></td>
|
|
|
|
+ <td class="text-center"><%= material.ex_tp !== null || ex_pre_tp_hs !== null ? ctx.helper.round(ctx.helper.add(ex_pre_tp_hs, ctx.helper.round(ctx.helper.mul(material.ex_tp, 1+material.exponent_rate/100), material.decimal.tp)), material.decimal.tp) : null %></td>
|
|
</tr>
|
|
</tr>
|
|
</table>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
@@ -164,5 +172,6 @@
|
|
const materialType = JSON.parse('<%- JSON.stringify(materialType) %>');
|
|
const materialType = JSON.parse('<%- JSON.stringify(materialType) %>');
|
|
const ex_calc = JSON.parse('<%- JSON.stringify(ex_calc) %>');
|
|
const ex_calc = JSON.parse('<%- JSON.stringify(ex_calc) %>');
|
|
let ex_expr = '<%- material.ex_expr %>';
|
|
let ex_expr = '<%- material.ex_expr %>';
|
|
|
|
+ let materialRate = parseInt('<%- material.exponent_rate %>');
|
|
let materialExponentData = JSON.parse(unescape('<%- escape(JSON.stringify(materialExponentData)) %>'));
|
|
let materialExponentData = JSON.parse(unescape('<%- escape(JSON.stringify(materialExponentData)) %>'));
|
|
</script>
|
|
</script>
|