Selaa lähdekoodia

修改组成物消耗量不计算父工料机定额价

zhangweicheng 6 vuotta sitten
vanhempi
commit
22984b78bc

+ 1 - 1
modules/glj/controllers/glj_controller.js

@@ -145,7 +145,7 @@ class GLJController extends BaseController {
                             }
                         }
                         let unitPriceUpdate = {
-                            base_price: basePrice,
+                           // base_price: basePrice, ---- 20190218 修改机械台班的组成物,仅重新计算机械预算价,定额价保持不变。
                             market_price: marketPrice
                         };
                         let unitPriceModel = new UnitPriceModel();

+ 8 - 1
modules/glj/models/glj_list_model.js

@@ -786,7 +786,14 @@ class GLJListModel extends BaseModel {
             let u_index = this.getIndex(tmp,['code','name','specs','unit','type']);
             unitPriceData[u_index] = tmp;
         }
-        return [gljData,mixRatioData,unitPriceData];
+        let c_gljData = [];
+        for(let g of gljData){//过滤掉不是组成物的工料机
+            let g_index =  this.getIndex(g,['code','name','specs','unit','type']);
+            if(mixRatioData[g_index]) c_gljData.push(g);
+        }
+
+
+        return [c_gljData,mixRatioData,unitPriceData];
 
     }
 

+ 1 - 1
web/building_saas/main/js/models/composition.js

@@ -133,7 +133,7 @@ Composition.prototype.updateConsumptionInCache = function (pid,recode,updateData
         }
         // 设置父级3个价格
         parentGlj.unit_price.market_price =  updateData.market_price;
-        parentGlj.unit_price.base_price =  updateData.base_price;
+       // parentGlj.unit_price.base_price =  updateData.base_price;
         return mglj.id;
     }
 }

+ 1 - 1
web/building_saas/main/js/views/project_glj_view.js

@@ -767,7 +767,7 @@ projectGljObject={
         }
         value = scMathUtil.roundToString(value,getDecimal("glj.quantity"));
         let [parentMarketPrice, parentBasePrice] = me.getCompositionSumPrice('modify', row, value);
-        let updateData ={id: recode.mix_ratio_id, field: 'mix_ratio.' + dataCode, value: value, market_price: parentMarketPrice, base_price: parentBasePrice};
+        let updateData ={id: recode.mix_ratio_id, field: 'mix_ratio.' + dataCode, value: value, market_price: parentMarketPrice};//, base_price: parentBasePrice ---20190218 修改机械台班的组成物,仅重新计算机械预算价,定额价保持不变。
         let prow = parentSheet.getActiveRowIndex();//取父机械或组成物的下标
         let prowData = parentSheet.name() == 'projectGljSheet'?me.projectGljSheetData[prow]:me.materialTree.items[prow].data;
         composition.updateConsumption(updateData,recode,prowData.id,function (sid) {