ellisran 4 дней назад
Родитель
Сommit
dc7648e783
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      app/public/js/cost_stage_duty.js

+ 2 - 2
app/public/js/cost_stage_duty.js

@@ -431,7 +431,7 @@ $(document).ready(function() {
             const profit = ZhCalc.sub(in_tp, out_tp);
             const profit_rate = in_tp ? ZhCalc.mul(ZhCalc.div(profit, in_tp), 100, 2) : 0;
             html.push(`<tr><td>项目收入</td><td><input type="number" class="form-control form-control-sm nospin" name="in_tp" value="${in_tp}" ${readOnly ? 'readOnly' : ''}></td></tr>`);
-            html.push(`<tr><td>项目支出</td><td>${out_tp}</td></tr>`);
+            html.push(`<tr><td>项目支出</td><td>${out_tp || 0}</td></tr>`);
             html.push(`<tr><td>利润</td><td>${profit}</td></tr>`);
             html.push(`<tr><td>利润率</td><td>${profit_rate}</td></tr>`);
             $('#duty-extra').html(html.join(''));
@@ -547,4 +547,4 @@ $(document).ready(function() {
             }, 100);
         });
     })('a[name=showLevel]', billsObj.sheet);
-});
+});