Przeglądaj źródła

人材机小数位数

zhangweicheng 7 lat temu
rodzic
commit
32003628a3

+ 7 - 4
public/web/gljUtil.js

@@ -183,6 +183,7 @@ let gljUtil = {
     },
     getMarketPrice:function (glj,projectGLJDatas,calcOptions,labourCoeDatas,decimalObj,isRadio,_,scMathUtil,tenderCoe) {
         let price_decimal = decimalObj.glj.unitPrice;
+        let price_hasM_decimal = decimalObj.glj.unitPriceHasMix?decimalObj.glj.unitPriceHasMix:decimalObj.glj.unitPrice;
         let quantity_decimal = decimalObj.glj.quantity;
         let process_decimal = decimalObj.process;
         let priceCoe = this.isDef(tenderCoe)?tenderCoe:1;
@@ -202,7 +203,7 @@ let gljUtil = {
                     p = scMathUtil.roundForObj(temP + p,process_decimal);
                 }
             }
-            return scMathUtil.roundForObj(p,price_decimal);
+            return scMathUtil.roundForObj(p,price_hasM_decimal);
         }else {
             let tem_decimal = isRadio==true?process_decimal:price_decimal;
             return scMathUtil.roundForObj(parseFloat(glj.unit_price.market_price)*priceCoe,tem_decimal);
@@ -210,6 +211,7 @@ let gljUtil = {
     },
     getBasePrice:function (glj,projectGLJDatas,calcOptions,labourCoeDatas,decimalObj,isRadio,_,scMathUtil) {
         let price_decimal = decimalObj.glj.unitPrice;
+        let price_hasM_decimal = decimalObj.glj.unitPriceHasMix?decimalObj.glj.unitPriceHasMix:decimalObj.glj.unitPrice;
         let quantity_decimal = decimalObj.glj.quantity;
         let process_decimal = decimalObj.process;
         if (this.notEditType.indexOf(glj.unit_price.type)!=-1&&glj.ratio_data.length>0) {//对于混凝土、配合比、砂浆、机械台班等有组成物的材料,价格需根据组成物计算得出。
@@ -228,7 +230,7 @@ let gljUtil = {
                     p = scMathUtil.roundForObj(temP + p,process_decimal);
                 }
             }
-            return scMathUtil.roundForObj(p,price_decimal);
+            return scMathUtil.roundForObj(p,price_hasM_decimal);
         }else {
             let tem_decimal = isRadio==true?process_decimal:price_decimal;
             return scMathUtil.roundForObj(glj.unit_price.base_price,tem_decimal);
@@ -236,6 +238,7 @@ let gljUtil = {
     },
     getAdjustPrice:function (glj,projectGLJDatas,calcOptions,labourCoeDatas,decimalObj,isRadio,_,scMathUtil) {
         let decimal = decimalObj.glj.unitPrice;
+        let price_hasM_decimal = decimalObj.glj.unitPriceHasMix?decimalObj.glj.unitPriceHasMix:decimalObj.glj.unitPrice;
         let quantity_decimal =  decimalObj.glj.quantity;
         let process_decimal = decimalObj.process;
         let  tem_decimal = isRadio==true?process_decimal:decimal;
@@ -259,9 +262,9 @@ let gljUtil = {
                     p = scMathUtil.roundForObj(temP + p,process_decimal);
                 }
             }
-            return scMathUtil.roundForObj(p,decimal);
+            return scMathUtil.roundForObj(p,price_hasM_decimal);
         } else {//对于其他普通材料等,无调整系数,调整价=定额价。
-            return glj.unit_price.base_price
+            return  scMathUtil.roundForObj(glj.unit_price.base_price,tem_decimal)
         }
     },
     calcPriceDiff:function (glj,calcOptions) {

+ 6 - 6
web/building_saas/main/js/views/glj_col.js

@@ -13,9 +13,9 @@ let gljCol = {
             {headerName: "自定消耗", headerWidth: 80, dataCode: "customQuantity", dataType: "Number", hAlign: "right", decimalField: "glj.quantity"},
             {headerName: "消耗量", headerWidth: 80, dataCode: "quantity", dataType: "Number", hAlign: "right", decimalField: "glj.quantity"},
             {headerName: "总消耗量", headerWidth: 80, dataCode: "totalQuantity", dataType: "Number", hAlign: "right", decimalField: "glj.quantity"},
-            {headerName: "定额价", headerWidth: 80, dataCode: "basePrice", dataType: "Number", hAlign: "right", decimalField: "glj.unitPrice"},
-            {headerName: "调整价", headerWidth: 80, dataCode: "adjustPrice", dataType: "Number", hAlign: "right", decimalField: "glj.unitPrice"},
-            {headerName: "市场价", headerWidth: 80, dataCode: "marketPrice", dataType: "Number", hAlign: "right", decimalField: "glj.unitPrice"},
+            {headerName: "定额价", headerWidth: 80, dataCode: "basePrice", dataType: "Number", hAlign: "right"},//, decimalField: "glj.unitPrice"
+            {headerName: "调整价", headerWidth: 80, dataCode: "adjustPrice", dataType: "Number", hAlign: "right"},//, decimalField: "glj.unitPrice"
+            {headerName: "市场价", headerWidth: 80, dataCode: "marketPrice", dataType: "Number", hAlign: "right"},//, decimalField: "glj.unitPrice"
             {headerName: "暂估", headerWidth: 45, dataCode: "isEstimate", dataType: "String", hAlign: "center", vAlign: "center", cellType: "checkBox"
             }
         ],
@@ -58,9 +58,9 @@ let gljCol = {
             {headerName: "规格型号", headerWidth: 120, dataCode: "specs", dataType: "String"},
             {headerName: "单位", headerWidth: 120, dataCode: "unit", hAlign: "center", dataType: "String"},
             {headerName: "类型", headerWidth: 120, dataCode: "short_name", hAlign: "center", dataType: "String"},
-            {headerName: "定额价", headerWidth: 120, dataCode: "basePrice", hAlign: "right", dataType: "Number",decimalField:'glj.unitPrice',validator:"number"},
-            {headerName: "调整价", headerWidth: 120, dataCode: "adjustPrice", hAlign: "right", dataType: "Number",decimalField:"glj.unitPrice"},
-            {headerName: "市场价", headerWidth: 120, dataCode: "marketPrice", hAlign: "right", dataType: "Number",decimalField:"glj.unitPrice",validator:"number"},
+            {headerName: "定额价", headerWidth: 120, dataCode: "basePrice", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:'glj.unitPrice'
+            {headerName: "调整价", headerWidth: 120, dataCode: "adjustPrice", hAlign: "right", dataType: "Number"},//,decimalField:"glj.unitPrice"
+            {headerName: "市场价", headerWidth: 120, dataCode: "marketPrice", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:"glj.unitPrice"
             {headerName: "消耗量", headerWidth: 120, dataCode: "consumption", hAlign: "right", dataType: "Number",decimalField:"glj.quantity",validator:"number"}
         ],
         view: {

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

@@ -27,8 +27,8 @@ projectGljObject={
             {headerName: "名称", headerWidth: 160, dataCode: "name", dataType: "String"},
             {headerName: "规格型号", headerWidth: 120, dataCode: "specs", hAlign: "left", dataType: "String"},
             {headerName: "单位", headerWidth: 45, dataCode: "unit", hAlign: "center", dataType: "String"},
-            {headerName: "定额价", headerWidth: 70, dataCode: "basePrice", hAlign: "right", dataType: "Number",decimalField:'glj.unitPrice',validator:"number"},
-            {headerName: "市场价", headerWidth: 70, dataCode: "marketPrice", hAlign: "right", dataType: "Number",decimalField:"glj.unitPrice",validator:"number"},
+            {headerName: "定额价", headerWidth: 70, dataCode: "basePrice", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:'glj.unitPrice'
+            {headerName: "市场价", headerWidth: 70, dataCode: "marketPrice", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:"glj.unitPrice"
             {headerName: "总消耗量", headerWidth: 100, dataCode: "quantity", hAlign: "right", dataType: "Number",decimalField:'glj.quantity'},
             {headerName: "三材系数", headerWidth: 100, dataCode: "materialCoe", hAlign: "right", dataType: "Number",validator:"number"},//,decimalField:'material'
             {headerName: "三材量", headerWidth: 100, dataCode: "materialQuantity", hAlign: "right", dataType: "Number",decimalField:'glj.quantity'},