zhangweicheng 7 سال پیش
والد
کامیت
95d8ebd307
2فایلهای تغییر یافته به همراه21 افزوده شده و 10 حذف شده
  1. 6 0
      web/building_saas/css/main.css
  2. 15 10
      web/building_saas/main/js/models/project_glj.js

+ 6 - 0
web/building_saas/css/main.css

@@ -353,3 +353,9 @@ body {
 .custom-file-input:lang(zh) ~ .custom-file-label::after {
     content: "浏览";
 }
+div.resize{
+    height: 4px;
+    background: #f7f7f9;
+    width: 100%;
+    cursor: s-resize;
+}

+ 15 - 10
web/building_saas/main/js/models/project_glj.js

@@ -589,15 +589,17 @@ ProjectGLJ.prototype.setAdjustPrice = function (glj) {
     }
 }
 
-ProjectGLJ.prototype.getAdjustPrice = function (glj) {
+ProjectGLJ.prototype.getAdjustPrice = function (glj,isRadio) {
     GLJTypeConst = this.datas.constData.GLJTypeConst !== undefined ? JSON.parse(this.datas.constData.GLJTypeConst) : GLJTypeConst;
     let decimal = getDecimal("glj.unitPrice");
     let quantity_decimal = getDecimal("glj.quantity");
+    let process_decimal = getDecimal("process");
+    let  tem_decimal = isRadio==true?process_decimal:decimal;
     if (glj.unit_price.type == GLJTypeConst.LABOUR || glj.unit_price.type == GLJTypeConst.MACHINE_LABOUR) {//人工、机上人工,调整价根据定额价*调整系数计算得出。
         let labour = projectObj.project.calcProgram.compiledLabourCoes[glj.adjCoe];
         //let labour=1;
         let coe = labour && labour.coe ? labour.coe : 1;
-        return scMathUtil.roundTo(parseFloat(coe * scMathUtil.roundForObj(glj.unit_price.base_price,decimal)), -decimal);
+        return scMathUtil.roundTo(parseFloat(coe * scMathUtil.roundForObj(glj.unit_price.base_price,tem_decimal)), -tem_decimal);
     } else if (notEditType.indexOf(glj.unit_price.type)!=-1&&glj.ratio_data.length>0) {//对于混凝土、配合比、砂浆、机械台班,调整价根据组成物计算得出。
         let p =0;
         for(let ratio of glj.ratio_data){
@@ -610,8 +612,8 @@ ProjectGLJ.prototype.getAdjustPrice = function (glj) {
            })
             if(tem){
                 let priceData={};
-                gljOprObj.setGLJPrice(priceData,tem);
-                p+=scMathUtil.roundForObj(priceData.adjustPrice*scMathUtil.roundForObj(ratio.consumption,quantity_decimal),decimal);
+                gljOprObj.setGLJPrice(priceData,tem,true);
+                p+=scMathUtil.roundForObj(priceData.adjustPrice*scMathUtil.roundForObj(ratio.consumption,quantity_decimal),process_decimal);
             }
         }
         return scMathUtil.roundForObj(p,decimal);
@@ -620,9 +622,10 @@ ProjectGLJ.prototype.getAdjustPrice = function (glj) {
     }
 };
 
-ProjectGLJ.prototype.getBasePrice = function(glj){
+ProjectGLJ.prototype.getBasePrice = function(glj,isRadio){
     let price_decimal = getDecimal("glj.unitPrice");
     let quantity_decimal = getDecimal("glj.quantity");
+    let process_decimal = getDecimal("process");
     if (notEditType.indexOf(glj.unit_price.type)!=-1&&glj.ratio_data.length>0) {//对于混凝土、配合比、砂浆、机械台班等有组成物的材料,价格需根据组成物计算得出。
         let p =0;
         for(let ratio of glj.ratio_data){
@@ -635,13 +638,14 @@ ProjectGLJ.prototype.getBasePrice = function(glj){
             });
             if(tem){
                 let priceData={};
-                gljOprObj.setGLJPrice(priceData,tem);
-                p+=scMathUtil.roundForObj(priceData.basePrice*scMathUtil.roundForObj(ratio.consumption,quantity_decimal),price_decimal);
+                gljOprObj.setGLJPrice(priceData,tem,true);
+                p+=scMathUtil.roundForObj(priceData.basePrice*scMathUtil.roundForObj(ratio.consumption,quantity_decimal),process_decimal);
             }
         }
         return scMathUtil.roundForObj(p,price_decimal);
     }else {
-        return scMathUtil.roundForObj(glj.unit_price.base_price,price_decimal);
+        let tem_decimal = isRadio==true?process_decimal:price_decimal;
+        return scMathUtil.roundForObj(glj.unit_price.base_price,tem_decimal);
     }
 };
 
@@ -649,7 +653,7 @@ ProjectGLJ.prototype.getBasePrice = function(glj){
 ProjectGLJ.prototype.getMarketPrice = function (glj,isRadio) {
     let price_decimal = getDecimal("glj.unitPrice");
     let quantity_decimal = getDecimal("glj.quantity");
-    let process_decimal = isRadio==true?price_decimal:getDecimal("process");
+    let process_decimal = getDecimal("process");
     if (notEditType.indexOf(glj.unit_price.type)!=-1&&glj.ratio_data.length>0) {//对于混凝土、配合比、砂浆、机械台班等有组成物的材料,价格需根据组成物计算得出。
         let p =0;
         for(let ratio of glj.ratio_data){
@@ -668,7 +672,8 @@ ProjectGLJ.prototype.getMarketPrice = function (glj,isRadio) {
         }
         return scMathUtil.roundForObj(p,price_decimal);
     }else {
-        return scMathUtil.roundForObj(glj.unit_price.market_price,price_decimal);
+        let tem_decimal = isRadio==true?process_decimal:price_decimal;
+        return scMathUtil.roundForObj(glj.unit_price.market_price,tem_decimal);
     }
 }