zhongzewei пре 7 година
родитељ
комит
35118953c7

+ 8 - 0
web/maintain/ration_repository/js/ration.js

@@ -138,10 +138,18 @@ let rationOprObj = {
             for (let j = 0; j < cacheSection.length; j++) {
                 if (updateArr[i]["ID"] && cacheSection[j]["ID"]) {
                     if (cacheSection[j]["ID"] == updateArr[i]["ID"]) {
+                        updateArr[i]['rationGljList'] = rationGLJOprObj.cache['_GLJ_' + cacheSection[j]['ID']] ? rationGLJOprObj.cache['_GLJ_' + cacheSection[j]['ID']] : [];
+                        updateArr[i]['rationCoeList'] = rationCoeOprObj.cache['_Coe_' + cacheSection[j]['ID']] ? rationCoeOprObj.cache['_Coe_' + cacheSection[j]['ID']] : [];
+                        updateArr[i]['rationAssList'] = cacheSection[j]['rationAssList'];
+                        updateArr[i]['rationInstList'] = cacheSection[j]['rationInstList'];
                         cacheSection[j] = updateArr[i];
                     }
                 } else {
                     if (cacheSection[j][me.setting.header[0].dataCode] == updateArr[i][me.setting.header[0].dataCode]) {
+                        updateArr[i]['rationGljList'] = rationGLJOprObj.cache['_GLJ_' + cacheSection[j]['ID']] ? rationGLJOprObj.cache['_GLJ_' + cacheSection[j]['ID']] : [];
+                        updateArr[i]['rationCoeList'] = rationCoeOprObj.cache['_Coe_' + cacheSection[j]['ID']] ? rationCoeOprObj.cache['_Coe_' + cacheSection[j]['ID']] : [];
+                        updateArr[i]['rationAssList'] = cacheSection[j]['rationAssList'];
+                        updateArr[i]['rationInstList'] = cacheSection[j]['rationInstList'];
                         cacheSection[j] = updateArr[i];
                     }
                 }

+ 5 - 5
web/maintain/ration_repository/js/ration_glj.js

@@ -79,8 +79,8 @@ var rationGLJOprObj = {
         var me = this;
         me.sheet = sheet;
         me.getGljDistType(function () {
-            gljSelOprObj.getGljClassTree(pageOprObj.gljLibId, function () {
-                gljSelOprObj.getSelGljItems(pageOprObj.gljLibId, function () {
+           // gljSelOprObj.getGljClassTree(pageOprObj.gljLibId, function () {
+                //gljSelOprObj.getSelGljItems(pageOprObj.gljLibId, function () {
                     sheetCommonObj.initSheet(me.sheet, me.setting, 30);
                     me.onContextmenuOpr();
                     me.bindRationGljDelOpr();
@@ -88,8 +88,8 @@ var rationGLJOprObj = {
                     me.sheet.bind(GC.Spread.Sheets.Events.ClipboardPasted, me.onClipboardPasted);
                     me.sheet.bind(GC.Spread.Sheets.Events.EditStarting, me.onEditStarting);
                     me.sheet.bind(GC.Spread.Sheets.Events.EditEnded, me.onCellEditEnd);
-                });
-            });
+              //  });
+            //});
         });
     },
     bindRationGljDelOpr: function () {
@@ -600,7 +600,7 @@ var rationGLJOprObj = {
         return rst;
     },
     getGljItems: function(rationItem, callback) {
-        var me = this, rationID = rationItem.ID, rationGljList = rationItem.rationGljList;
+        var me = this, rationID = rationItem.ID, rationGljList = rationItem.rationGljList ? rationItem.rationGljList : [];
         me.currentRationItem = rationItem;
         if (me.cache["_GLJ_" + rationID]) {
             me.showGljItems(rationID);

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

@@ -32,6 +32,8 @@ let pageOprObj = {
                     $('#fzUpdateConBtn').click(annotationOprObj.bindUpdateConBtn());
                     annotationOprObj.bindAllEvents($('#fzTxtareaAll'));
                 }
+                gljSelOprObj.getGljClassTree(pageOprObj.gljLibId, function () {
+                    gljSelOprObj.getSelGljItems(pageOprObj.gljLibId, function () {})});
             }
         });
     },