chenshilong 6 lat temu
rodzic
commit
d112b646b2

+ 9 - 2
web/building_saas/main/js/controllers/block_controller.js

@@ -242,8 +242,15 @@ let BlockController = {
         if(blockData.firstNodeType == blockType.RATION){ //复制的是定额,需根据新的父项信息和工程量明细计算工程量
             for(let d of blockData.datas){
                 d.billsItemID = parentID;
-                let billsQuantity = scMathUtil.roundForObj(parent.data.quantity,getDecimal("quantity",parent));
-                this.calcRationQuantityAndContain(billsQuantity,d,parent.data.unit);
+                if (blockData.zeroRationQuantity){
+                    d.quantity = 0;
+                    d.quantityEXP = '';
+                    d.contain = '';
+                }else{
+                    let billsQuantity = scMathUtil.roundForObj(parent.data.quantity,getDecimal("quantity",parent));
+                    this.calcRationQuantityAndContain(billsQuantity,d,parent.data.unit);
+                }
+
                 //如果粘贴位置不属于分部分项工程,或者不是安装工程,则把安装增加费内容置空
                 if(!Bills.isFBFX(parent)|| !project.isInstall()){
                     d.ration_installations = [];

+ 1 - 0
web/building_saas/main/js/views/block_lib.js

@@ -544,6 +544,7 @@ var blockLibObj = {
             copyTime: block.data.copyTime,
             firstNodeType: 1,           // 强制改成1 (因为是从清单下的定额开始。清单自身的还是保留,暂不使用使用)。
             isFBFX: block.data.isFBFX,
+            zeroRationQuantity: true,
             datas: block.data.children       // rations
         };
         BlockController.confirmPaste(vBlock_WC, projectNode, 'sub');