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