@pisell/pisellos 0.10.3 → 0.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -667,7 +667,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
667
667
  }, {
668
668
  key: "hydrateLatestLoadedSalesDetail",
669
669
  value: function () {
670
- var _hydrateLatestLoadedSalesDetail = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(record, loadSequence) {
670
+ var _hydrateLatestLoadedSalesDetail = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(record, loadSequence, hydrateSource) {
671
671
  var _this4 = this;
672
672
  var hydratedSales, skippedBeforeHydrate, hydrateTask, queuedTask;
673
673
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
@@ -695,7 +695,10 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
695
695
  throw new Error('order 模块未初始化');
696
696
  case 5:
697
697
  _context4.next = 7;
698
- return _this4.store.order.hydrateTempOrderFromRecord(record, {
698
+ return _this4.store.order.hydrateTempOrderFromRecord(record, hydrateSource === 'sessionStorage' ? {
699
+ recalcOnHydrate: true,
700
+ source: 'sessionStorage'
701
+ } : {
699
702
  recalcOnHydrate: false
700
703
  });
701
704
  case 7:
@@ -746,7 +749,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
746
749
  }
747
750
  }, _callee5, this);
748
751
  }));
749
- function hydrateLatestLoadedSalesDetail(_x2, _x3) {
752
+ function hydrateLatestLoadedSalesDetail(_x2, _x3, _x4) {
750
753
  return _hydrateLatestLoadedSalesDetail.apply(this, arguments);
751
754
  }
752
755
  return hydrateLatestLoadedSalesDetail;
@@ -849,7 +852,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
849
852
  }
850
853
  }, _callee6, this);
851
854
  }));
852
- function loadQuotationForPriceQuery(_x4) {
855
+ function loadQuotationForPriceQuery(_x5) {
853
856
  return _loadQuotationForPriceQuery.apply(this, arguments);
854
857
  }
855
858
  return loadQuotationForPriceQuery;
@@ -954,7 +957,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
954
957
  }
955
958
  }, _callee7, this, [[4, 15]]);
956
959
  }));
957
- function loadProductsForPriceQuery(_x5) {
960
+ function loadProductsForPriceQuery(_x6) {
958
961
  return _loadProductsForPriceQuery.apply(this, arguments);
959
962
  }
960
963
  return loadProductsForPriceQuery;
@@ -992,7 +995,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
992
995
  }
993
996
  }, _callee8, this);
994
997
  }));
995
- function loadProductForPriceQuery(_x6, _x7) {
998
+ function loadProductForPriceQuery(_x7, _x8) {
996
999
  return _loadProductForPriceQuery.apply(this, arguments);
997
1000
  }
998
1001
  return loadProductForPriceQuery;
@@ -1130,13 +1133,23 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
1130
1133
  * const params = this.buildSubModuleOtherParams();
1131
1134
  * this.core.registerModule(orderModule, { otherParams: params });
1132
1135
  */
1136
+ }, {
1137
+ key: "isSessionStoragePersistEnabled",
1138
+ value: function isSessionStoragePersistEnabled() {
1139
+ return Boolean(this.cacheId);
1140
+ }
1141
+ }, {
1142
+ key: "shouldUseSessionStorageForSubModule",
1143
+ value: function shouldUseSessionStorageForSubModule(_moduleName) {
1144
+ return this.isSessionStoragePersistEnabled();
1145
+ }
1133
1146
  }, {
1134
1147
  key: "buildSubModuleOtherParams",
1135
- value: function buildSubModuleOtherParams() {
1148
+ value: function buildSubModuleOtherParams(moduleName) {
1136
1149
  return _objectSpread(_objectSpread({}, this.otherParams), {}, {
1137
1150
  salesSummaryModuleName: "".concat(this.name, "_salesSummary"),
1138
1151
  fatherModule: this.name,
1139
- openCache: this.cacheId ? true : false,
1152
+ openCache: this.shouldUseSessionStorageForSubModule(moduleName),
1140
1153
  cacheId: this.cacheId
1141
1154
  });
1142
1155
  }
@@ -1155,17 +1168,15 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
1155
1168
  var _ref20,
1156
1169
  _ref20$cover,
1157
1170
  cover,
1158
- nextSubModuleOtherParams,
1159
1171
  _args10 = arguments;
1160
1172
  return _regeneratorRuntime().wrap(function _callee10$(_context10) {
1161
1173
  while (1) switch (_context10.prev = _context10.next) {
1162
1174
  case 0:
1163
1175
  _ref20 = _args10.length > 1 && _args10[1] !== undefined ? _args10[1] : {}, _ref20$cover = _ref20.cover, cover = _ref20$cover === void 0 ? false : _ref20$cover;
1164
- nextSubModuleOtherParams = this.buildSubModuleOtherParams();
1165
- _context10.next = 4;
1176
+ _context10.next = 3;
1166
1177
  return Promise.all(Object.entries(this.store).map( /*#__PURE__*/function () {
1167
1178
  var _ref22 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(_ref21) {
1168
- var _ref23, moduleName, subModule, targetModule;
1179
+ var _ref23, moduleName, subModule, targetModule, nextSubModuleOtherParams;
1169
1180
  return _regeneratorRuntime().wrap(function _callee9$(_context9) {
1170
1181
  while (1) switch (_context9.prev = _context9.next) {
1171
1182
  case 0:
@@ -1183,28 +1194,29 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
1183
1194
  }
1184
1195
  return _context9.abrupt("return");
1185
1196
  case 6:
1186
- _context9.next = 8;
1197
+ nextSubModuleOtherParams = _this6.buildSubModuleOtherParams(moduleName);
1198
+ _context9.next = 9;
1187
1199
  return targetModule.updateOtherParams(nextSubModuleOtherParams, {
1188
1200
  changedParams: changedParams,
1189
1201
  cover: cover
1190
1202
  });
1191
- case 8:
1203
+ case 9:
1192
1204
  case "end":
1193
1205
  return _context9.stop();
1194
1206
  }
1195
1207
  }, _callee9);
1196
1208
  }));
1197
- return function (_x9) {
1209
+ return function (_x10) {
1198
1210
  return _ref22.apply(this, arguments);
1199
1211
  };
1200
1212
  }()));
1201
- case 4:
1213
+ case 3:
1202
1214
  case "end":
1203
1215
  return _context10.stop();
1204
1216
  }
1205
1217
  }, _callee10, this);
1206
1218
  }));
1207
- function syncOtherParamsToSubModules(_x8) {
1219
+ function syncOtherParamsToSubModules(_x9) {
1208
1220
  return _syncOtherParamsToSubModules.apply(this, arguments);
1209
1221
  }
1210
1222
  return syncOtherParamsToSubModules;
@@ -1217,12 +1229,15 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
1217
1229
  }, {
1218
1230
  key: "readSessionCacheData",
1219
1231
  value: function readSessionCacheData() {
1220
- if (!this.cacheId || !this.window) return {};
1232
+ var cacheId = this.cacheId;
1233
+ if (!cacheId || !this.isSessionStoragePersistEnabled() || !this.window) {
1234
+ return {};
1235
+ }
1221
1236
  try {
1222
1237
  var sessionData = this.window.sessionStorage.getItem(this.name);
1223
1238
  if (!sessionData) return {};
1224
1239
  var data = JSON.parse(sessionData);
1225
- return data && data[this.cacheId] || {};
1240
+ return data && data[cacheId] || {};
1226
1241
  } catch (_unused3) {
1227
1242
  return {};
1228
1243
  }
@@ -1358,11 +1373,11 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
1358
1373
  var hooks = _this9.getSubModuleHooks(step);
1359
1374
  _this9.store[step] = targetModule;
1360
1375
  _this9.core.registerModule(targetModule, _objectSpread(_objectSpread({
1361
- initialState: (targetCacheData === null || targetCacheData === void 0 ? void 0 : targetCacheData[targetModule.name]) || {}
1376
+ initialState: _this9.shouldUseSessionStorageForSubModule(step) ? (targetCacheData === null || targetCacheData === void 0 ? void 0 : targetCacheData[targetModule.name]) || {} : {}
1362
1377
  }, hooks ? {
1363
1378
  hooks: hooks
1364
1379
  } : {}), {}, {
1365
- otherParams: _this9.buildSubModuleOtherParams()
1380
+ otherParams: _this9.buildSubModuleOtherParams(step)
1366
1381
  }));
1367
1382
  });
1368
1383
  if (!(this.store.schedule && !this.isScheduleListLoaded(this.store.schedule))) {
@@ -1386,7 +1401,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
1386
1401
  }
1387
1402
  }, _callee11, this);
1388
1403
  }));
1389
- function initialize(_x10) {
1404
+ function initialize(_x11) {
1390
1405
  return _initialize.apply(this, arguments);
1391
1406
  }
1392
1407
  return initialize;
@@ -1444,7 +1459,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
1444
1459
  key: "loadSalesDetail",
1445
1460
  value: (function () {
1446
1461
  var _loadSalesDetail = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(orderIdOrParams) {
1447
- var loadSequence, _ref24, _ref25, _ref26, _ref27, _params$orderId, params, externalSaleNumber, preloadedSalesDetail, lookup, loadedRecord, message, remoteRecord, currentTempOrder, mergedRecord, record;
1462
+ var loadSequence, _ref24, _ref25, _ref26, _ref27, _params$orderId, params, externalSaleNumber, preloadedSalesDetail, lookup, loadedRecord, message, loadedSalesDetail, shouldFilterPendingPayments, remoteRecord, currentTempOrder, mergedRecord, record;
1448
1463
  return _regeneratorRuntime().wrap(function _callee13$(_context13) {
1449
1464
  while (1) switch (_context13.prev = _context13.next) {
1450
1465
  case 0:
@@ -1493,42 +1508,44 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
1493
1508
  message = loadedRecord && (loadedRecord.message || loadedRecord.msg) || "\u52A0\u8F7D\u9500\u552E\u8BE6\u60C5\u5931\u8D25: ".concat(lookup);
1494
1509
  throw new Error(message);
1495
1510
  case 22:
1496
- remoteRecord = filterPendingPaymentsFromLoadedSalesDetail(preloadedSalesDetail !== null && preloadedSalesDetail !== void 0 ? preloadedSalesDetail : loadedRecord.data);
1511
+ loadedSalesDetail = preloadedSalesDetail !== null && preloadedSalesDetail !== void 0 ? preloadedSalesDetail : loadedRecord.data; // payment_pending 只存在于本地;远端详情需过滤,但会话快照必须完整恢复。
1512
+ shouldFilterPendingPayments = params.hydrateSource !== 'sessionStorage';
1513
+ remoteRecord = shouldFilterPendingPayments ? filterPendingPaymentsFromLoadedSalesDetail(loadedSalesDetail) : loadedSalesDetail;
1497
1514
  currentTempOrder = params.merge ? this.store.order.getTempOrder() : null;
1498
1515
  mergedRecord = params.merge ? mergeSalesDetailRecordWithTempOrder(currentTempOrder, remoteRecord, 'preserve-local') : remoteRecord;
1499
- record = filterPendingPaymentsFromLoadedSalesDetail(mergedRecord);
1500
- _context13.next = 28;
1501
- return this.hydrateLatestLoadedSalesDetail(record, loadSequence);
1502
- case 28:
1516
+ record = shouldFilterPendingPayments ? filterPendingPaymentsFromLoadedSalesDetail(mergedRecord) : mergedRecord;
1517
+ _context13.next = 30;
1518
+ return this.hydrateLatestLoadedSalesDetail(record, loadSequence, params.hydrateSource);
1519
+ case 30:
1503
1520
  return _context13.abrupt("return", _context13.sent);
1504
- case 29:
1505
- _context13.prev = 29;
1521
+ case 31:
1522
+ _context13.prev = 31;
1506
1523
  this.salesDetailLoadInFlightCount = Math.max(0, this.salesDetailLoadInFlightCount - 1);
1507
1524
  if (!(this.salesDetailLoadInFlightCount === 0)) {
1508
- _context13.next = 40;
1525
+ _context13.next = 42;
1509
1526
  break;
1510
1527
  }
1511
- _context13.prev = 32;
1512
- _context13.next = 35;
1528
+ _context13.prev = 34;
1529
+ _context13.next = 37;
1513
1530
  return this.drainQueuedServerOrderChanges();
1514
- case 35:
1515
- _context13.next = 40;
1516
- break;
1517
1531
  case 37:
1518
- _context13.prev = 37;
1519
- _context13.t1 = _context13["catch"](32);
1532
+ _context13.next = 42;
1533
+ break;
1534
+ case 39:
1535
+ _context13.prev = 39;
1536
+ _context13.t1 = _context13["catch"](34);
1520
1537
  this.logError('drain queued server order changes failed', {
1521
1538
  error: _context13.t1 instanceof Error ? _context13.t1.message : String(_context13.t1)
1522
1539
  });
1523
- case 40:
1524
- return _context13.finish(29);
1525
- case 41:
1540
+ case 42:
1541
+ return _context13.finish(31);
1542
+ case 43:
1526
1543
  case "end":
1527
1544
  return _context13.stop();
1528
1545
  }
1529
- }, _callee13, this, [[4,, 29, 41], [32, 37]]);
1546
+ }, _callee13, this, [[4,, 31, 43], [34, 39]]);
1530
1547
  }));
1531
- function loadSalesDetail(_x11) {
1548
+ function loadSalesDetail(_x12) {
1532
1549
  return _loadSalesDetail.apply(this, arguments);
1533
1550
  }
1534
1551
  return loadSalesDetail;
@@ -1635,7 +1652,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
1635
1652
  }
1636
1653
  }, _callee14, this);
1637
1654
  }));
1638
- function replaceTempOrder(_x12) {
1655
+ function replaceTempOrder(_x13) {
1639
1656
  return _replaceTempOrder.apply(this, arguments);
1640
1657
  }
1641
1658
  return replaceTempOrder;
@@ -2275,7 +2292,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2275
2292
  }
2276
2293
  }, _callee20, this, [[46, 65, 68, 71]]);
2277
2294
  }));
2278
- function loadDiscountConfig(_x13) {
2295
+ function loadDiscountConfig(_x14) {
2279
2296
  return _loadDiscountConfig.apply(this, arguments);
2280
2297
  }
2281
2298
  return loadDiscountConfig;
@@ -2373,7 +2390,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2373
2390
  }
2374
2391
  }, _callee21, this);
2375
2392
  }));
2376
- function bestDiscount(_x14) {
2393
+ function bestDiscount(_x15) {
2377
2394
  return _bestDiscount.apply(this, arguments);
2378
2395
  }
2379
2396
  return bestDiscount;
@@ -2436,7 +2453,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2436
2453
  }
2437
2454
  }, _callee22, this);
2438
2455
  }));
2439
- function replaceDiscountStoreLists(_x15) {
2456
+ function replaceDiscountStoreLists(_x16) {
2440
2457
  return _replaceDiscountStoreLists.apply(this, arguments);
2441
2458
  }
2442
2459
  return replaceDiscountStoreLists;
@@ -2498,7 +2515,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2498
2515
  }
2499
2516
  }, _callee23, this, [[0, 16]]);
2500
2517
  }));
2501
- function scanPromotionCode(_x16, _x17) {
2518
+ function scanPromotionCode(_x17, _x18) {
2502
2519
  return _scanPromotionCode.apply(this, arguments);
2503
2520
  }
2504
2521
  return scanPromotionCode;
@@ -2689,7 +2706,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2689
2706
  }
2690
2707
  }, _callee24, this, [[0, 54], [17, 38, 41, 44]]);
2691
2708
  }));
2692
- function setDiscountSelected(_x18) {
2709
+ function setDiscountSelected(_x19) {
2693
2710
  return _setDiscountSelected.apply(this, arguments);
2694
2711
  }
2695
2712
  return setDiscountSelected;
@@ -2759,7 +2776,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2759
2776
  }
2760
2777
  }, _callee25, this, [[0, 21]]);
2761
2778
  }));
2762
- function applyDiscountCalculationResult(_x19) {
2779
+ function applyDiscountCalculationResult(_x20) {
2763
2780
  return _applyDiscountCalculationResult.apply(this, arguments);
2764
2781
  }
2765
2782
  return applyDiscountCalculationResult;
@@ -2778,7 +2795,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2778
2795
  }
2779
2796
  }, _callee26, this);
2780
2797
  }));
2781
- function submitScanOrder(_x20) {
2798
+ function submitScanOrder(_x21) {
2782
2799
  return _submitScanOrder.apply(this, arguments);
2783
2800
  }
2784
2801
  return submitScanOrder;
@@ -2832,7 +2849,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2832
2849
  }
2833
2850
  }, _callee27, this);
2834
2851
  }));
2835
- function submitSalesOrder(_x21) {
2852
+ function submitSalesOrder(_x22) {
2836
2853
  return _submitSalesOrder.apply(this, arguments);
2837
2854
  }
2838
2855
  return submitSalesOrder;
@@ -2866,7 +2883,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2866
2883
  }
2867
2884
  }, _callee28, this);
2868
2885
  }));
2869
- function saveSalesOrderDraft(_x22) {
2886
+ function saveSalesOrderDraft(_x23) {
2870
2887
  return _saveSalesOrderDraft.apply(this, arguments);
2871
2888
  }
2872
2889
  return saveSalesOrderDraft;
@@ -2913,7 +2930,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2913
2930
  }
2914
2931
  }, _callee29, this);
2915
2932
  }));
2916
- function submitTempOrderAsync(_x23) {
2933
+ function submitTempOrderAsync(_x24) {
2917
2934
  return _submitTempOrderAsync.apply(this, arguments);
2918
2935
  }
2919
2936
  return submitTempOrderAsync;
@@ -2998,7 +3015,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2998
3015
  }
2999
3016
  }, _callee30, this);
3000
3017
  }));
3001
- function printLocalOrderReceipt(_x24) {
3018
+ function printLocalOrderReceipt(_x25) {
3002
3019
  return _printLocalOrderReceipt.apply(this, arguments);
3003
3020
  }
3004
3021
  return printLocalOrderReceipt;
@@ -3112,7 +3129,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3112
3129
  }
3113
3130
  }, _callee31, this, [[12, 29]]);
3114
3131
  }));
3115
- function syncPaymentsToOrder(_x25) {
3132
+ function syncPaymentsToOrder(_x26) {
3116
3133
  return _syncPaymentsToOrder.apply(this, arguments);
3117
3134
  }
3118
3135
  return syncPaymentsToOrder;
@@ -3282,7 +3299,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3282
3299
  }
3283
3300
  }, _callee33, this);
3284
3301
  }));
3285
- function addOrderPaymentAsync(_x26) {
3302
+ function addOrderPaymentAsync(_x27) {
3286
3303
  return _addOrderPaymentAsync.apply(this, arguments);
3287
3304
  }
3288
3305
  return addOrderPaymentAsync;
@@ -3470,7 +3487,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3470
3487
  }
3471
3488
  }, _callee34, this, [[17, 23]]);
3472
3489
  }));
3473
- function updateOrderPayment(_x27, _x28) {
3490
+ function updateOrderPayment(_x28, _x29) {
3474
3491
  return _updateOrderPayment.apply(this, arguments);
3475
3492
  }
3476
3493
  return updateOrderPayment;
@@ -3509,7 +3526,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3509
3526
  }
3510
3527
  }, _callee35, this);
3511
3528
  }));
3512
- function updateVoucherOrderPaymentsAsync(_x29, _x30) {
3529
+ function updateVoucherOrderPaymentsAsync(_x30, _x31) {
3513
3530
  return _updateVoucherOrderPaymentsAsync.apply(this, arguments);
3514
3531
  }
3515
3532
  return updateVoucherOrderPaymentsAsync;
@@ -3675,7 +3692,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3675
3692
  }
3676
3693
  }, _callee36, this);
3677
3694
  }));
3678
- function initWalletData(_x31) {
3695
+ function initWalletData(_x32) {
3679
3696
  return _initWalletData.apply(this, arguments);
3680
3697
  }
3681
3698
  return initWalletData;
@@ -3742,7 +3759,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3742
3759
  }
3743
3760
  }, _callee37, this);
3744
3761
  }));
3745
- function publishWalletAssetsState(_x32) {
3762
+ function publishWalletAssetsState(_x33) {
3746
3763
  return _publishWalletAssetsState.apply(this, arguments);
3747
3764
  }
3748
3765
  return publishWalletAssetsState;
@@ -3823,7 +3840,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3823
3840
  }
3824
3841
  }, _callee38, this);
3825
3842
  }));
3826
- function syncSelectedWalletAssets(_x33) {
3843
+ function syncSelectedWalletAssets(_x34) {
3827
3844
  return _syncSelectedWalletAssets.apply(this, arguments);
3828
3845
  }
3829
3846
  return syncSelectedWalletAssets;
@@ -3879,7 +3896,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3879
3896
  }
3880
3897
  }, _callee39, this);
3881
3898
  }));
3882
- function importWalletAssetsSnapshot(_x34) {
3899
+ function importWalletAssetsSnapshot(_x35) {
3883
3900
  return _importWalletAssetsSnapshot.apply(this, arguments);
3884
3901
  }
3885
3902
  return importWalletAssetsSnapshot;
@@ -3967,7 +3984,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3967
3984
  }
3968
3985
  }, _callee40, this);
3969
3986
  }));
3970
- function refreshWalletAssets(_x35) {
3987
+ function refreshWalletAssets(_x36) {
3971
3988
  return _refreshWalletAssets.apply(this, arguments);
3972
3989
  }
3973
3990
  return refreshWalletAssets;
@@ -4000,7 +4017,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4000
4017
  }
4001
4018
  }, _callee41, this);
4002
4019
  }));
4003
- function selectWalletAsset(_x36) {
4020
+ function selectWalletAsset(_x37) {
4004
4021
  return _selectWalletAsset.apply(this, arguments);
4005
4022
  }
4006
4023
  return selectWalletAsset;
@@ -4040,7 +4057,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4040
4057
  }
4041
4058
  }, _callee42, this);
4042
4059
  }));
4043
- function scanWalletAsset(_x37) {
4060
+ function scanWalletAsset(_x38) {
4044
4061
  return _scanWalletAsset.apply(this, arguments);
4045
4062
  }
4046
4063
  return scanWalletAsset;
@@ -4463,7 +4480,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4463
4480
  }
4464
4481
  }, _callee47, this, [[29, 41]]);
4465
4482
  }));
4466
- function payCash(_x38) {
4483
+ function payCash(_x39) {
4467
4484
  return _payCash.apply(this, arguments);
4468
4485
  }
4469
4486
  return payCash;
@@ -4619,7 +4636,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4619
4636
  }
4620
4637
  }, _callee48, this, [[30, 42]]);
4621
4638
  }));
4622
- function commitPaymentMethodPayment(_x39) {
4639
+ function commitPaymentMethodPayment(_x40) {
4623
4640
  return _commitPaymentMethodPayment.apply(this, arguments);
4624
4641
  }
4625
4642
  return commitPaymentMethodPayment;
@@ -4667,7 +4684,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4667
4684
  }
4668
4685
  }, _callee49, this);
4669
4686
  }));
4670
- function roundAmount(_x40) {
4687
+ function roundAmount(_x41) {
4671
4688
  return _roundAmount.apply(this, arguments);
4672
4689
  }
4673
4690
  return roundAmount;
@@ -4724,7 +4741,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4724
4741
  }
4725
4742
  }, _callee50, this);
4726
4743
  }));
4727
- function sendCustomerPayLink(_x41) {
4744
+ function sendCustomerPayLink(_x42) {
4728
4745
  return _sendCustomerPayLink.apply(this, arguments);
4729
4746
  }
4730
4747
  return sendCustomerPayLink;
@@ -4769,7 +4786,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4769
4786
  }
4770
4787
  }, _callee51, this);
4771
4788
  }));
4772
- function calculateProductBookingPrice(_x42) {
4789
+ function calculateProductBookingPrice(_x43) {
4773
4790
  return _calculateProductBookingPrice.apply(this, arguments);
4774
4791
  }
4775
4792
  return calculateProductBookingPrice;
@@ -4898,7 +4915,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4898
4915
  }
4899
4916
  }, _callee52);
4900
4917
  }));
4901
- return function (_x44) {
4918
+ return function (_x45) {
4902
4919
  return _ref37.apply(this, arguments);
4903
4920
  };
4904
4921
  }()));
@@ -4932,7 +4949,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4932
4949
  }
4933
4950
  }, _callee53, this);
4934
4951
  }));
4935
- function calculateProductBookingPrices(_x43) {
4952
+ function calculateProductBookingPrices(_x44) {
4936
4953
  return _calculateProductBookingPrices.apply(this, arguments);
4937
4954
  }
4938
4955
  return calculateProductBookingPrices;
@@ -4967,7 +4984,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4967
4984
  }
4968
4985
  }, _callee54, this, [[0, 9]]);
4969
4986
  }));
4970
- function addProductToOrder(_x45, _x46) {
4987
+ function addProductToOrder(_x46, _x47) {
4971
4988
  return _addProductToOrder.apply(this, arguments);
4972
4989
  }
4973
4990
  return addProductToOrder;
@@ -5002,7 +5019,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
5002
5019
  }
5003
5020
  }, _callee55, this, [[0, 9]]);
5004
5021
  }));
5005
- function updateOrderProduct(_x47) {
5022
+ function updateOrderProduct(_x48) {
5006
5023
  return _updateOrderProduct.apply(this, arguments);
5007
5024
  }
5008
5025
  return updateOrderProduct;
@@ -5037,7 +5054,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
5037
5054
  }
5038
5055
  }, _callee56, this, [[0, 9]]);
5039
5056
  }));
5040
- function updateOrderProducts(_x48) {
5057
+ function updateOrderProducts(_x49) {
5041
5058
  return _updateOrderProducts.apply(this, arguments);
5042
5059
  }
5043
5060
  return updateOrderProducts;
@@ -5072,7 +5089,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
5072
5089
  }
5073
5090
  }, _callee57, this, [[0, 9]]);
5074
5091
  }));
5075
- function updateOrderProductQuantity(_x49) {
5092
+ function updateOrderProductQuantity(_x50) {
5076
5093
  return _updateOrderProductQuantity.apply(this, arguments);
5077
5094
  }
5078
5095
  return updateOrderProductQuantity;
@@ -5130,7 +5147,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
5130
5147
  }
5131
5148
  }, _callee58, this, [[0, 11]]);
5132
5149
  }));
5133
- function setOrderProductLineNote(_x50, _x51) {
5150
+ function setOrderProductLineNote(_x51, _x52) {
5134
5151
  return _setOrderProductLineNote.apply(this, arguments);
5135
5152
  }
5136
5153
  return setOrderProductLineNote;
@@ -5170,7 +5187,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
5170
5187
  }
5171
5188
  }, _callee59, this, [[0, 8]]);
5172
5189
  }));
5173
- function removeProductsFromOrder(_x52) {
5190
+ function removeProductsFromOrder(_x53) {
5174
5191
  return _removeProductsFromOrder.apply(this, arguments);
5175
5192
  }
5176
5193
  return removeProductsFromOrder;
@@ -5189,7 +5206,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
5189
5206
  }
5190
5207
  }, _callee60, this);
5191
5208
  }));
5192
- function removeProductFromOrder(_x53) {
5209
+ function removeProductFromOrder(_x54) {
5193
5210
  return _removeProductFromOrder.apply(this, arguments);
5194
5211
  }
5195
5212
  return removeProductFromOrder;
@@ -5352,7 +5369,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
5352
5369
  }
5353
5370
  }, _callee63, this);
5354
5371
  }));
5355
- function setOtherParams(_x54) {
5372
+ function setOtherParams(_x55) {
5356
5373
  return _setOtherParams.apply(this, arguments);
5357
5374
  }
5358
5375
  return setOtherParams;
@@ -326,7 +326,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
326
326
  date: string;
327
327
  status: string;
328
328
  week: string;
329
- weekNum: 0 | 2 | 1 | 5 | 4 | 3 | 6;
329
+ weekNum: 0 | 1 | 2 | 3 | 4 | 5 | 6;
330
330
  }[]>;
331
331
  submitTimeSlot(timeSlots: TimeSliceItem): void;
332
332
  private getScheduleDataByIds;
@@ -445,19 +445,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
445
445
  * 加车两阶段主决策(规格弹窗 / 资源编辑 / 直接加车)。
446
446
  * 与 ticketBooking `handleSelectProduct` + `handleBooking4Service` 等价。
447
447
  */
448
- decideAddProduct(item: any, options?: Partial<AddProductDecideContext>): {
449
- action: "reloadCatalog";
450
- } | {
451
- action: "add";
452
- cacheItem: any;
453
- } | {
454
- action: "requiresDetail";
455
- payload: AddProductRequiresDetailPayload;
456
- } | {
457
- action: "requiresBookingEdit";
458
- cacheItem: any;
459
- payload: import("./utils/addProductDecision").AddProductRequiresBookingEditPayload;
460
- };
448
+ decideAddProduct(item: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
461
449
  /** 规格弹窗 callback 后的第二段决策。 */
462
450
  decideAfterDetail(cacheItem: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
463
451
  /**
@@ -63,6 +63,8 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
63
63
  private openDataTarget;
64
64
  private loadOpenDataInFlight;
65
65
  private loadOpenDataInFlightTarget;
66
+ protected isSessionStoragePersistEnabled(): boolean;
67
+ protected shouldUseSessionStorageForSubModule(moduleName?: string): boolean;
66
68
  /**
67
69
  * Kiosk 不能把已收款订单留在本地等待重试:默认直接等待云端 checkout。
68
70
  * 兼容仍需要 WebPOS 待同步模式的入口可显式传 checkoutSyncTaskEnabled: true。
@@ -72,6 +74,7 @@ export declare class UnifiedBookingSalesImpl extends BookingTicket {
72
74
  protected getDefaultCheckoutSmallTicketDataFlag(): number;
73
75
  protected getRegisteredModuleNames(): readonly string[];
74
76
  protected createSubModule(moduleName: string): Module | null;
77
+ addNewOrder(): Promise<import("../../modules/Order/types").OrderTempOrder>;
75
78
  /**
76
79
  * Loads OpenData without borrowing BookingTicket. Cache ownership is tied to the exact
77
80
  * business/channel target so a reused solution instance cannot leak another entry's menus.