zhongzewei 7 lat temu
rodzic
commit
0ad1cdea0f

+ 0 - 5
web/building_saas/main/js/views/project_property_basicInfo.js

@@ -142,7 +142,6 @@ let basicInfoView = {
         let me = basicInfoView;
         let items = sheetCommonObj.analyzePasteData(me.setting, args);
         let recRows = [];
-        console.log('enter');
         for(let i = 0, len = items.length; i < len; i++){
             let row = i + args.cellRange.row;
             if(me.setting.locked.rows.indexOf(row) !== -1){
@@ -150,9 +149,7 @@ let basicInfoView = {
             }
             else if(me.setting.dateRows.indexOf(row) !== -1){
                 items[i].value = me.filtDate(items[i].value);
-                console.log(items.value);
                 if(!me.isDef(items[i].value)){
-                    console.log('aa');
                     recRows.push(row);
                 }
                 else {
@@ -163,8 +160,6 @@ let basicInfoView = {
                 me.datas[row].value = items[i].value;
             }
         }
-        console.log(recRows);
-        console.log(me.datas);
         if(recRows.length > 0){
             me.renderSheetFuc(args.sheet, function () {
                 for(let i = 0, len = recRows.length; i < len; i++){

+ 10 - 3
web/building_saas/main/js/views/project_property_decimal_view.js

@@ -28,20 +28,27 @@ decimalObj.decimal = function (field, node) {
                     return billsQuanDecimal.decimal(node.data.unit);
                 }
                 else {
-                    return this['bills'][field] || this.process;
+                    returnV(this['bills'][field], this.process);
                 }
             }
             else if(node.sourceType === projectObj.project.Ration.getSourceType()){
-                return this['ration'][field] || this.process;
+                returnV(this['ration'][field], this.process);
             }
             else if(node.sourceType === projectObj.project.GLJ.getSourceType()){
-                return this['glj'][field] || this.process;
+                returnV(this['glj'][field], this.process);
             }
         }
     }
     return this.process;
 };
 
+function returnV(v, r){
+    if(isDef(v)){
+        return v;
+    }
+    return r;
+}
+
 function isUndef(v) {
     return v === undefined || v === null;
 }