Browse Source

复测debug

zhongzewei 7 years ago
parent
commit
cd55634b84

+ 1 - 1
web/maintain/ration_repository/js/ration.js

@@ -349,7 +349,7 @@ let rationOprObj = {
             args.cancel = true;
         }
     },
-    //todo: overwrite
+    //todo: overwrite?
     onClipboardPasted: function(e, info) {
         let me = rationOprObj;
         let cacheSection = me.getCache();

+ 12 - 6
web/maintain/ration_repository/js/ration_assist.js

@@ -66,8 +66,8 @@ var rationAssistOprObj = {
             me.sheet.getParent().focus(true);
         });
         sheetCommonObj.cleanData(me.sheet, me.setting, -1);
-        sheetCommonObj.setStaticCombo(me.sheet, 0, 5, assList.length, me.setting.comboItems, false, false);
-        sheetCommonObj.setDynamicCombo(me.sheet, assList.length, 5, me.sheet.getRowCount() - assList.length, me.setting.comboItems, false, false);
+        sheetCommonObj.setStaticCombo(me.sheet, 0, 5, me.ration.rationAssList.length, me.setting.comboItems, false, false);
+        sheetCommonObj.setDynamicCombo(me.sheet, me.ration.rationAssList.length, 5, me.sheet.getRowCount() - me.ration.rationAssList.length, me.setting.comboItems, false, false);
         sheetCommonObj.showData(me.sheet, me.setting, me.ration.rationAssList);
     },
 
@@ -75,6 +75,7 @@ var rationAssistOprObj = {
         var me = rationAssistOprObj;
         if (!me.ration) {return;};
         var assList = me.ration.rationAssList;
+        if(assList == undefined) assList = [];
         //var assObj = sheetCommonObj.combineRowData(me.sheet, me.setting, args.row);
         var assObj = sheetsOprObj.combineRationRowData(me.sheet, me.setting, args.row);
         let dataCode = me.setting.header[args.col].dataCode;
@@ -163,11 +164,16 @@ var rationAssistOprObj = {
         sheetCommonObj.cleanSheet(me.sheet, me.setting, -1);
         sheetCommonObj.unShieldAllCells(me.sheet);
 
-        sheetCommonObj.setStaticCombo(me.sheet, 0, 5, ration.rationAssList.length, me.setting.comboItems, false);
-        sheetCommonObj.setDynamicCombo(me.sheet, ration.rationAssList.length, 5, me.sheet.getRowCount() - ration.rationAssList.length, me.setting.comboItems, false, false);
-
         if (ration == undefined || ration.rationAssList == undefined ||
-            ration.rationAssList.length == 0){return;};
+            ration.rationAssList.length == 0){
+            sheetCommonObj.setStaticCombo(me.sheet, 0, 5, 0, me.setting.comboItems, false);
+            sheetCommonObj.setDynamicCombo(me.sheet, 0, 5, me.sheet.getRowCount(), me.setting.comboItems, false, false);
+            return;
+        }
+        else {
+            sheetCommonObj.setStaticCombo(me.sheet, 0, 5, ration.rationAssList.length, me.setting.comboItems, false);
+            sheetCommonObj.setDynamicCombo(me.sheet, ration.rationAssList.length, 5, me.sheet.getRowCount() - ration.rationAssList.length, me.setting.comboItems, false, false);
+        }
         sheetCommonObj.showData(me.sheet, me.setting, ration.rationAssList);
     }
 }

+ 0 - 2
web/maintain/ration_repository/js/ration_glj.js

@@ -516,8 +516,6 @@ var rationGLJOprObj = {
     getGljItems: function(rationItem, callback) {
         var me = this, rationID = rationItem.ID, rationGljList = rationItem.rationGljList;
         me.currentRationItem = rationItem;
-        console.log(`me.cache["_GLJ_" + rationID]`);
-        console.log(me.cache["_GLJ_" + rationID]);
         if (me.cache["_GLJ_" + rationID]) {
             me.showGljItems(rationID);
             sheetCommonObj.lockCells(me.sheet, me.setting);