Просмотр исходного кода

标准定额库多单价基价bug

zhongzewei 7 лет назад
Родитель
Сommit
8cbbd3ae3a

+ 6 - 0
web/maintain/ration_repository/js/gljSelect.js

@@ -50,6 +50,12 @@ let gljSelOprObj = {
             timeout:20000,
             success:function(result){
                 if(!result.error) {
+                    if(priceProperties && priceProperties.length > 0){
+                        let priceField = priceProperties[0].price.dataCode;
+                        for(let glj of result.data){
+                            glj.basePrice = glj.priceProperty && glj.priceProperty[priceField] ? glj.priceProperty[priceField] : 0;
+                        }
+                    }
                     me.stdGljList = result.data;
                     me.switchToGljId(me.stdGljList);
                     me.sortGlj(me.stdGljList);

+ 6 - 0
web/maintain/ration_repository/js/ration_glj.js

@@ -439,6 +439,12 @@ var rationGLJOprObj = {
             success:function(result){
                 if (result) {
                     if(result.data.length > 0){
+                        if(priceProperties && priceProperties.length > 0){
+                            let priceField = priceProperties[0].price.dataCode;
+                            for(let glj of result.data){
+                                glj.basePrice = glj.priceProperty && glj.priceProperty[priceField] ? glj.priceProperty[priceField] : 0;
+                            }
+                        }
                         sheetCommonObj.cleanData(me.sheet, me.setting, -1);
                         var rstArr = [], dummyR = {gljId: 0, consumeAmt:0}, newAddArr = [];
                         for (var i = 0; i < result.data.length; i++) {