Browse Source

bug fixed

zhangweicheng 7 years ago
parent
commit
345851c9d9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      web/building_saas/main/js/views/glj_view.js

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

@@ -1221,7 +1221,7 @@ var gljOprObj = {
             return offset;
             return offset;
         }
         }
 
 
-        if(index && data[index] && data[index].isMixRatio !==true){
+        if(isDef(index) && data[index] && data[index].isMixRatio !==true){
             TreeNodeCellType.prototype =  sheetCommonObj.getDynamicCombo();
             TreeNodeCellType.prototype =  sheetCommonObj.getDynamicCombo();
         }else {
         }else {
             TreeNodeCellType.prototype =  new ns.CellTypes.Text();
             TreeNodeCellType.prototype =  new ns.CellTypes.Text();
@@ -1281,7 +1281,7 @@ var gljOprObj = {
         };
         };
         let cellType = new TreeNodeCellType();
         let cellType = new TreeNodeCellType();
         let options = [];
         let options = [];
-        if(index && data[index] && data[index].isMixRatio !==true){
+        if(isDef(index) && data[index] && data[index].isMixRatio !==true){
             let code = data[index].code;
             let code = data[index].code;
             if(code) {
             if(code) {
                 let preCode = code.split("-")[0];
                 let preCode = code.split("-")[0];