瀏覽代碼

填剩余量相关

MaiXinRong 9 月之前
父節點
當前提交
ace6617a66
共有 1 個文件被更改,包括 12 次插入7 次删除
  1. 12 7
      app/public/js/stage.js

+ 12 - 7
app/public/js/stage.js

@@ -1649,7 +1649,7 @@ $(document).ready(() => {
                     const sheet = spSpread.getActiveSheet();
                     const node = SpreadJsObj.getSelectObject(slSpread.getActiveSheet());
 
-                    const data = { updateType: 'update', updateData: [] };
+                    const data = { updateType: 'batchUpdate', updateData: [] };
                     const posterity = stageTree.getPosterity(node);
                     posterity.unshift(node);
                     for (const p of posterity) {
@@ -1669,18 +1669,23 @@ $(document).ready(() => {
                         return;
                     }
 
-                    if (updateStage.length > 0) {
-                        if (updateStage.length > 1000) {
+                    if (data.updateData.length > 0) {
+                        if (data.updateData.length > 1000) {
                             toastr.warning('提交的数据太大,仅提交1000条数据');
-                            updateStage.length = 1000;
+                            data.updateData.length = 1000;
                         }
                         postData(window.location.pathname + '/update', {pos: data}, function (result) {
-                            const nodes = stageTree.loadPostStageData(result);
+                            if (result.pos) {
+                                stagePos.updateDatas(result.pos.pos);
+                                stagePos.loadCurStageData(result.pos.curStageData);
+                            }
+                            const nodes = stageTree.loadPostStageData(result.ledger);
                             stageTreeSpreadObj.refreshTreeNodes(slSpread.getActiveSheet(), nodes);
+                            stagePosSpreadObj.loadCurPosData();
                             if (detail) {
-                                detail.loadStageLedgerUpdateData(result, nodes);
+                                detail.loadStagePosUpdateData(result, nodes);
                             } else {
-                                stageIm.loadUpdateLedgerData(result, nodes);
+                                stageIm.loadUpdatePosData(result, nodes);
                             }
                             stageTreeSpreadObj.loadExprToInput(sheet);
                         });