Browse Source

添加定额bug

MaiXinRong 7 years ago
parent
commit
384178be24
1 changed files with 2 additions and 2 deletions
  1. 2 2
      web/building_saas/main/js/models/ration.js

+ 2 - 2
web/building_saas/main/js/models/ration.js

@@ -160,7 +160,7 @@ var Ration = {
             return newRation;
         };
         ration.prototype.insertStdRation = function (billsID, preRation, std) {
-            var br = this.getBillsSortRation(billsID), updateData = this.getInsertRationData(billsID, preRation), newRation = null;
+            var br = this.getBillsSortRation(billsID), updateData = this.getInsertRationData(billsID, preRation), newRation = null, that = this;
             updateData.forEach(function (data) {
 
                 if (data.updateType === 'ut_create') {
@@ -176,7 +176,7 @@ var Ration = {
                     }
                     data.updateData.rationAssList =  projectObj.project.ration_ass.CreateNewAss(std);
                     // calculate ration Quantity
-                    this.CalculateQuantity(updateData);
+                    that.CalculateQuantity(data.updateData);
                     newRation = data.updateData;
                 }
             });