Browse Source

Merge branch 'master' of http://192.168.1.41:3000/SmartCost/ConstructionCost

vian 4 years ago
parent
commit
f5a685aa2b

+ 1 - 1
modules/pm/models/project_property_template.js

@@ -6,7 +6,7 @@
 const defaultDecimal = {
     bills: { unitPrice: 2, totalPrice: 2 },
     ration: { quantity: 4, unitPrice: 2, totalPrice: 2 },
-    glj: { quantity: 4, unitPriceHasMix: 2, unitPrice: 3 },
+    glj: { quantity: 4, unitPriceHasMix: 2, unitPrice: 2 },
     feeRate: 3,
     quantity_detail: 4,
     material: 5,//三材系数

+ 5 - 5
modules/reports/rpt_component/helper/jpc_helper_field.js

@@ -66,11 +66,11 @@ let JpcFieldHelper = {
     },
     decorateValue: function (cell, controls) {
         if (controls) {
-            let val = cell[JV.PROP_VALUE];
-            let showZero = controls[cell[JV.PROP_CONTROL]][JV.PROP_SHOW_ZERO];
-            if (showZero && showZero === 'F' ) {
-                if (0.0 === 1.0 * (0 + val)) {
-                    cell[JV.PROP_VALUE] = "";
+            const showZero = controls[cell[JV.PROP_CONTROL]][JV.PROP_SHOW_ZERO];
+            if (showZero && showZero === 'F') {
+                const val = parseFloat(cell[JV.PROP_VALUE]);
+                if (val === 0) {
+                    cell[JV.PROP_VALUE] = '';
                 }
             }
         }

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

@@ -9,7 +9,7 @@ let defaultDecimal = {
     _def: {//editable: 开放给用户编辑的
         bills: {editable: true, data: {unitPrice: 2, totalPrice: 2}},
         ration: {editable: true, data: {quantity: 4, unitPrice: 2, totalPrice: 2}},
-        glj: {editable: true, data: {quantity: 4, unitPriceHasMix: 2, unitPrice: 3}},
+        glj: {editable: true, data: {quantity: 4, unitPriceHasMix: 2, unitPrice: 2}},
         material: {editable: false, data: 5},
         feeRate: {editable: true, data: 3},
         quantity_detail: {editable: false, data: 4},

+ 2 - 2
web/building_saas/pm/js/pm_newMain.js

@@ -1691,8 +1691,8 @@ const projTreeObj = {
         }else if(selectNode){
             let projectNode = null;
             if(selectNode.data.projType == projectType.project) projectNode = selectNode;
-            if(selectNode.data.projType == projectType.engineering) projectNode = selectNode.parent
-            if(selectNode.data.projType == projectType.tender)projectNode = selectNode.parent.parent
+            if(selectNode.data.projType == projectType.engineering) projectNode = selectNode.parent;
+            if(selectNode.data.projType == projectType.tender)projectNode = selectNode.parent.parent;
             parent = projectNode.parent;
             next = projectNode.nextSibling;
             updateData["update"] = {query:{ID:projectNode.id()}}

+ 1 - 1
web/building_saas/report/js/rpt_jspdf.js

@@ -127,7 +127,7 @@ let JpcJsPDFHelper = {
         }
 
         function private_drawCellText(doc, ctx, cell, fonts, controls) {
-            if (cell[JV.PROP_VALUE]) {
+            if (cell[JV.PROP_VALUE] !== undefined && cell[JV.PROP_VALUE] !== null) {
                 let values = ("" + cell[JV.PROP_VALUE]).split('|');
                 // let font = fonts[cell[JV.PROP_FONT]];
                 let font = null;

+ 1 - 1
web/building_saas/report/js/rpt_print.js

@@ -183,7 +183,7 @@ function buildText(destRst, cell, font, control, offsetX, offsetY, adjustY, canv
         text_anchor = "start"
     ;
     let value = cell[JV.PROP_VALUE];
-    if (!(value)) {
+    if (value === undefined || value === null) {
         value = "";
     }
     let values = null;

+ 1 - 1
web/building_saas/unit_price_file/index.js

@@ -390,7 +390,7 @@ let unitPriceObj = {
   getPrice:function(pricefield,unitprice){
     let quantity = 3;
     let unitPriceHasMix = 2;
-    let unitPrice = 3;
+    let unitPrice = 2;
     let process_decimal = 6;
     let uIndex = gljUtil.getIndex(unitprice);
     if(mixRatioMap[uIndex] && mixRatioMap[uIndex].length > 0){