浏览代码

1.计算基数定额建安费字段更新
2.稳定土调整状态顺序更新

zeweizhong 6 年之前
父节点
当前提交
1a109a8ea2
共有 2 个文件被更改,包括 10 次插入10 次删除
  1. 9 9
      modules/ration_glj/facade/glj_calculate_facade.js
  2. 1 1
      web/over_write/js/neimeng_2019.js

+ 9 - 9
modules/ration_glj/facade/glj_calculate_facade.js

@@ -22,11 +22,11 @@ module.exports={
     calculateQuantity:calculateQuantity,
     getGLJTypeByID:getGLJTypeByID
 }
-//辅助定额调整、替换工料机、稳定土配合比、标准附注条件调整、添加工料机、自定义消耗量(包括删除工料机)、自定义乘系数、市场单价调整
+//辅助定额调整、稳定土配合比、替换工料机、标准附注条件调整、添加工料机、自定义消耗量(包括删除工料机)、自定义乘系数、市场单价调整
 let stateSeq ={
     ass:1,
-    replace:2,
-    proportion: 3,
+    proportion: 2,
+    replace:3,
     coe:4,
     add:5,
     cusQuantity:6,
@@ -83,6 +83,11 @@ async function calculateQuantity(query,noNeedCal=null,refreshRationName = false)
                 }
             }
         }
+        // 稳定土调整状态
+        const proportionStr = gljList.filter(glj => glj.rationProportion).map(glj => glj.adjustProportion || 0).join(':');
+        if (proportionStr) {
+            adjustState.push({ index: stateSeq.proportion, content: proportionStr });
+        }
         for(let glj of gljList){//先把混凝土,砂浆,配合比有自定义消耗的挑出来
             if(gljUtil.isConcreteType(glj.type)) await getMixRatioMap(glj,gljList,coeList,assList,mixRatioMap);
         }
@@ -94,11 +99,6 @@ async function calculateQuantity(query,noNeedCal=null,refreshRationName = false)
         if(noNeedCal==null && result.glj_result.length > 0){
             await ration_glj.bulkWrite(generateUpdateTasks(result.glj_result));
         }
-        // 稳定土调整状态
-        const proportionStr = gljList.filter(glj => glj.rationProportion).map(glj => glj.adjustProportion || 0).join(':');
-        if (proportionStr) {
-            adjustState.push({ index: stateSeq.proportion, content: proportionStr });
-        }
         adjustState= _.sortByOrder(adjustState, ['index'], ['asc']);
         adjustState=_.map(adjustState, _.property('content'));
         let adjustStateString = adjustState.join(';');
@@ -209,7 +209,7 @@ async function calculateQuantityPerGLJ(glj,gljList,coeList,assList,adjustState,m
         }
     };
     try {
-        if(noNeedCal==null){//计算顺序:辅助定额,附注条件,自定义消耗(如果有就不用前计算两项),自定义乘系数
+        if(noNeedCal==null){//计算顺序:辅助定额, 稳定土配合比、附注条件,自定义消耗(如果有就不用前计算两项),自定义乘系数
             if(noCustomQuantiyt(glj)){
                 quantity = await calcWhenNoCustomQuantiyt(decimal,glj,gljList,coeList,assList);
                 let mIndex = gljUtil.getIndex(glj);

+ 1 - 1
web/over_write/js/neimeng_2019.js

@@ -166,7 +166,7 @@ if (typeof baseFigureTemplate !== 'undefined' && baseFigureTemplate.budget) {
     baseFigureTemplate.budget = {
         // 定额建筑安装工程费(定额设备购置费按40%计):取清单固定类别是“建筑安装工程”的定额建安费,其中定额设备购置费按40%计算
         DEJZAZGCFSBSS(tender) {
-            const feeField = 'rCommon';
+            const feeField = 'rationCommon';
             const subFeeField = tender ? 'tenderTotalFee' : 'totalFee';
             const deductFlags = [fixedFlag.EQUIPMENT_ACQUISITION_FEE];
             //建安费扣除定额设备购置费