ellisran 1 неделя назад
Родитель
Сommit
fc9f9b40dd
2 измененных файлов с 4 добавлено и 4 удалено
  1. 1 1
      app/controller/material_controller.js
  2. 3 3
      app/view/material/exponent.ejs

+ 1 - 1
app/controller/material_controller.js

@@ -855,7 +855,7 @@ module.exports = app => {
                 }
 
                 // 取当前期截止上期含税金额
-                renderData.ex_pre_tp_hs = await ctx.service.material.getExPreTpHs(ctx.tender.id, ctx.material.order, ctx.material.decimal.tp);
+                // renderData.ex_pre_tp_hs = await ctx.service.material.getExPreTpHs(ctx.tender.id, ctx.material.order, ctx.material.decimal.tp);
                 renderData.materialType = materialConst;
                 renderData.jsFiles = this.app.jsFiles.common.concat(this.app.jsFiles.material.exponent);
                 // 判断之前期有无调用过材料税

+ 3 - 3
app/view/material/exponent.ejs

@@ -134,7 +134,7 @@
                                                 <td class="text-center"><%= material.ex_tp !== null ? ctx.helper.round(material.ex_tp, material.exponent_decimal.tp) : null %></td>
                                                 <td class="text-center"><%= material.ex_tax_tp !== null ? ctx.helper.round(material.ex_tax_tp,  material.exponent_decimal.tp) : null %></td>
                                                 <td class="text-center"><%= material.ex_tp !== null || material.ex_pre_tp !== null ? ctx.helper.add(ctx.helper.round(material.ex_tp, material.exponent_decimal.tp), material.ex_pre_tp) : null %></td>
-                                                <td class="text-center"><%= material.ex_tax_tp !== null || ex_pre_tp_hs !== null ? ctx.helper.add(ex_pre_tp_hs, ctx.helper.round(material.ex_tax_tp, material.exponent_decimal.tp)) : null %></td>
+                                                <td class="text-center"><%= material.ex_tax_tp !== null || material.ex_tax_pre_tp !== null ? ctx.helper.add(material.ex_tax_pre_tp, ctx.helper.round(material.ex_tax_tp, material.exponent_decimal.tp)) : null %></td>
                                             </tr>
                                         <% } %>
                                         <tr id="total_set">
@@ -142,7 +142,7 @@
                                             <td class="text-center"><%= material.ex_tp !== null ? ctx.helper.round(material.ex_tp, material.exponent_decimal.tp) : null %></td>
                                             <td class="text-center"><%= material.ex_tax_tp !== null ? ctx.helper.round(material.ex_tax_tp,  material.exponent_decimal.tp) : null %></td>
                                             <td class="text-center"><%= material.ex_tp !== null || material.ex_pre_tp !== null ? ctx.helper.add(ctx.helper.round(material.ex_tp, material.exponent_decimal.tp), material.ex_pre_tp) : null %></td>
-                                            <td class="text-center"><%= material.ex_tax_tp !== null || ex_pre_tp_hs !== null ? ctx.helper.add(ex_pre_tp_hs, ctx.helper.round(material.ex_tax_tp, material.exponent_decimal.tp)) : null %></td>
+                                            <td class="text-center"><%= material.ex_tax_tp !== null || material.ex_tax_pre_tp !== null ? ctx.helper.add(material.ex_tax_pre_tp, ctx.helper.round(material.ex_tax_tp, material.exponent_decimal.tp)) : null %></td>
                                         </tr>
                                     </table>
                                 </div>
@@ -210,7 +210,7 @@
     let ex_tp = <%= material.ex_tp !== null ? material.ex_tp : 0 %>;
     let ex_tax_tp = <%= material.ex_tax_tp !== null ? material.ex_tax_tp : 0 %>;
     const ex_pre_tp = <%= material.ex_pre_tp !== null ? material.ex_pre_tp : 0 %>;
-    const ex_pre_tp_hs = <%= ex_pre_tp_hs !== null ? ex_pre_tp_hs : 0 %>;
+    const ex_pre_tp_hs = <%= material.ex_tax_pre_tp !== null ? material.ex_tax_pre_tp : 0 %>;
     const materialType = JSON.parse('<%- JSON.stringify(materialType) %>');
     let ex_calc = JSON.parse('<%- JSON.stringify(ex_calc) %>');
     let ex_calcList = [];