laiguoran пре 2 година
родитељ
комит
bdcab0effe
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      app/public/js/material_exponent.js

+ 1 - 1
app/public/js/material_exponent.js

@@ -191,7 +191,7 @@ $(document).ready(() => {
                         validText = ZhCalc.round(num, 3);
                         num = ZhCalc.round(num, 3);
                     }
-                    const total_weight = ZhCalc.add(ZhCalc.sub(_.sumBy(materialExponentData, 'weight_num'), parseFloat(orgValue)), num);
+                    const total_weight = ZhCalc.add(ZhCalc.sub(ZhCalc.sum(_.map(materialExponentData, 'weight_num')), parseFloat(orgValue)), num);
                     if (total_weight > 1) {
                         toastr.error('加权系数总和不能大于1');
                         SpreadJsObj.reLoadRowData(info.sheet, info.row);