laiguoran 2 роки тому
батько
коміт
500ced095b
1 змінених файлів з 4 додано та 4 видалено
  1. 4 4
      app/public/js/measure_material.js

+ 4 - 4
app/public/js/measure_material.js

@@ -299,8 +299,8 @@ $(function () {
                 for (const sid of stage_id) {
                     const curLedger = _.find(result.curLedgerData, {sid: sid});
                     const curPos = _.find(result.curPosData, {sid: sid});
-                    gclGatherModel.loadLedgerData(ledger, curLedger.ledgerData);
-                    gclGatherModel.loadPosData(pos, curPos.posData);
+                    gclGatherModel.loadLedgerData(_.cloneDeep(ledger), curLedger.ledgerData);
+                    gclGatherModel.loadPosData(_.cloneDeep(pos), curPos.posData);
                     const gclGatherData = gclGatherModel.gatherGclData();
                     // console.log(gclGatherData);
                     const insertGcl = [];
@@ -385,8 +385,8 @@ $(function () {
             } else {
                 const curLedgerData = result.curLedgerData;
                 const curPosData = result.curPosData;
-                gclGatherModel.loadLedgerData(ledger, curLedgerData);
-                gclGatherModel.loadPosData(pos, curPosData);
+                gclGatherModel.loadLedgerData(_.cloneDeep(ledger), curLedgerData);
+                gclGatherModel.loadPosData(_.cloneDeep(pos), curPosData);
                 const gclGatherData = gclGatherModel.gatherGclData();
                 const insertGcl = [];
                 for (const g of gclList) {