@pisell/pisellos 2.2.285 → 2.2.287

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.
@@ -136,6 +136,9 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
136
136
  private getAuthoritativeBundleUnitPrice;
137
137
  private mergeProductForPriceQuery;
138
138
  protected getSubmitOrderSalesChannel(): string | undefined;
139
+ private getFulfillmentRefModeConfigs;
140
+ private getFulfillmentRefMode;
141
+ private buildSubmitPayloadEnhancerWithFulfillmentRefMode;
139
142
  /**
140
143
  * 工厂入口:根据子模块名实例化对应模块。
141
144
  * 默认使用 BookingByStep 公共 `createModule`。子类若需引入额外类型(如 customer),
@@ -46,6 +46,7 @@ import { QuotationModule } from "../../modules/Quotation";
46
46
  import { transformBaseProductToOrderProduct as _transformBaseProductToOrderProduct } from "./utils/transformBaseProductToOrderProduct";
47
47
  import { calculateBaseSalesProductBookingPrice } from "./utils/quotationPrice";
48
48
  var SERVER_ORDER_CHANGED_EVENT = 'order:onOrdersChanged';
49
+ var OS_FULFILLMENT_REF_MODE_FIELD = '_os_fulfillment_ref_mode';
49
50
  var WALLET_PAYMENT_CODE_BY_TAG = {
50
51
  product_voucher: 'PRODUCTVOUCHER',
51
52
  gift_card: 'GIFTCARD',
@@ -1200,6 +1201,45 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
1200
1201
  var _this$otherParams8;
1201
1202
  return (_this$otherParams8 = this.otherParams) === null || _this$otherParams8 === void 0 ? void 0 : _this$otherParams8.channel;
1202
1203
  }
1204
+ }, {
1205
+ key: "getFulfillmentRefModeConfigs",
1206
+ value: function getFulfillmentRefModeConfigs() {
1207
+ var _this$otherParams9, _this$otherParams10, _this$store, _this$store$getOpenDa;
1208
+ var candidates = [(_this$otherParams9 = this.otherParams) === null || _this$otherParams9 === void 0 ? void 0 : _this$otherParams9.openData, (_this$otherParams10 = this.otherParams) === null || _this$otherParams10 === void 0 ? void 0 : _this$otherParams10.dineInConfig, (_this$store = this.store) === null || _this$store === void 0 || (_this$store = _this$store.openData) === null || _this$store === void 0 || (_this$store$getOpenDa = _this$store.getOpenData) === null || _this$store$getOpenDa === void 0 ? void 0 : _this$store$getOpenDa.call(_this$store)];
1209
+ return candidates.filter(function (candidate) {
1210
+ return candidate && _typeof(candidate) === 'object' && !Array.isArray(candidate);
1211
+ });
1212
+ }
1213
+ }, {
1214
+ key: "getFulfillmentRefMode",
1215
+ value: function getFulfillmentRefMode() {
1216
+ var _iterator2 = _createForOfIteratorHelper(this.getFulfillmentRefModeConfigs()),
1217
+ _step2;
1218
+ try {
1219
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
1220
+ var config = _step2.value;
1221
+ var mode = config['fulfillment.fulfillment_ref_mode'];
1222
+ if (mode === undefined || mode === null) continue;
1223
+ var normalized = String(mode).trim();
1224
+ if (normalized) return normalized;
1225
+ }
1226
+ } catch (err) {
1227
+ _iterator2.e(err);
1228
+ } finally {
1229
+ _iterator2.f();
1230
+ }
1231
+ return undefined;
1232
+ }
1233
+ }, {
1234
+ key: "buildSubmitPayloadEnhancerWithFulfillmentRefMode",
1235
+ value: function buildSubmitPayloadEnhancerWithFulfillmentRefMode(enhancePayload) {
1236
+ var fulfillmentRefMode = this.getFulfillmentRefMode();
1237
+ if (!fulfillmentRefMode) return enhancePayload;
1238
+ return function (payload, ctx) {
1239
+ var enhancedPayload = enhancePayload ? enhancePayload(payload, ctx) : payload;
1240
+ return _objectSpread(_objectSpread({}, enhancedPayload), {}, _defineProperty({}, OS_FULFILLMENT_REF_MODE_FIELD, fulfillmentRefMode));
1241
+ };
1242
+ }
1203
1243
 
1204
1244
  /**
1205
1245
  * 工厂入口:根据子模块名实例化对应模块。
@@ -1428,11 +1468,11 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
1428
1468
  key: "initialize",
1429
1469
  value: function () {
1430
1470
  var _initialize = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(core) {
1431
- var _this$otherParams9,
1471
+ var _this$otherParams11,
1432
1472
  _this$appPlugin2,
1433
1473
  _this$appPlugin2$getA,
1434
1474
  _this9 = this,
1435
- _this$otherParams10;
1475
+ _this$otherParams12;
1436
1476
  var options,
1437
1477
  app,
1438
1478
  targetCacheData,
@@ -1447,7 +1487,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
1447
1487
  this.paymentNumberDevicePrefix = null;
1448
1488
  // this.store = { ...this.store, ...(options.store as Partial<BaseSalesState>) };
1449
1489
  this.otherParams = options.otherParams || {};
1450
- this.cacheId = (_this$otherParams9 = this.otherParams) === null || _this$otherParams9 === void 0 ? void 0 : _this$otherParams9.cacheId;
1490
+ this.cacheId = (_this$otherParams11 = this.otherParams) === null || _this$otherParams11 === void 0 ? void 0 : _this$otherParams11.cacheId;
1451
1491
  this.reusedSharedSubModuleNames.clear();
1452
1492
  this.window = core.getPlugin('window');
1453
1493
  this.request = core.getPlugin('request');
@@ -1489,7 +1529,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
1489
1529
  _context12.next = 19;
1490
1530
  return this.store.schedule.loadAllSchedule();
1491
1531
  case 19:
1492
- if (this.store.order && typeof ((_this$otherParams10 = this.otherParams) === null || _this$otherParams10 === void 0 ? void 0 : _this$otherParams10.enableTempOrderPersist) === 'boolean') {
1532
+ if (this.store.order && typeof ((_this$otherParams12 = this.otherParams) === null || _this$otherParams12 === void 0 ? void 0 : _this$otherParams12.enableTempOrderPersist) === 'boolean') {
1493
1533
  this.store.order.setEnableTempOrderPersist(this.otherParams.enableTempOrderPersist);
1494
1534
  }
1495
1535
  _context12.next = 22;
@@ -2207,7 +2247,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2207
2247
  value: function () {
2208
2248
  var _loadDiscountConfig = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(params) {
2209
2249
  var _this$getOrderIdentit, _tempOrder$customer, _tempOrder$_extend, _tempOrder$_extend2, _discountModule$getDi, _discountModule$getOr, _discountModule$getDi2;
2210
- var tempOrder, orderStore, discountModule, rulesModule, orderId, customerId, currentDiscountList, originalDiscountList, hasManualDiscountSelection, discountAction, discountConfigCacheKey, preparedDiscountList, _discountModule$setOr, nextDiscountList, shouldSkipAutoApplyFetchedDiscounts, _summary, _orderStore$summary, orderTotalAmount, result, _iterator2, _step2, _product$metadata5, _tempOrder$_extend3, _product$metadata$sou, _product$metadata6, _product$metadata7, _product$original_pri, product, productUid, runtimeOrigin, totalPerUnitDiscount, optionSum, sourcePrice, newSourceSellingPrice, newMainSellingPrice, summary;
2250
+ var tempOrder, orderStore, discountModule, rulesModule, orderId, customerId, currentDiscountList, originalDiscountList, hasManualDiscountSelection, discountAction, discountConfigCacheKey, preparedDiscountList, _discountModule$setOr, nextDiscountList, shouldSkipAutoApplyFetchedDiscounts, _summary, _orderStore$summary, orderTotalAmount, result, _iterator3, _step3, _product$metadata5, _tempOrder$_extend3, _product$metadata$sou, _product$metadata6, _product$metadata7, _product$original_pri, product, productUid, runtimeOrigin, totalPerUnitDiscount, optionSum, sourcePrice, newSourceSellingPrice, newMainSellingPrice, summary;
2211
2251
  return _regeneratorRuntime().wrap(function _callee21$(_context21) {
2212
2252
  while (1) switch (_context21.prev = _context21.next) {
2213
2253
  case 0:
@@ -2322,15 +2362,15 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2322
2362
  if (result.productList) {
2323
2363
  tempOrder.products = preserveManualProductDiscountProducts(tempOrder.products, result.productList);
2324
2364
  }
2325
- _iterator2 = _createForOfIteratorHelper(tempOrder.products || []);
2365
+ _iterator3 = _createForOfIteratorHelper(tempOrder.products || []);
2326
2366
  _context21.prev = 45;
2327
- _iterator2.s();
2367
+ _iterator3.s();
2328
2368
  case 47:
2329
- if ((_step2 = _iterator2.n()).done) {
2369
+ if ((_step3 = _iterator3.n()).done) {
2330
2370
  _context21.next = 62;
2331
2371
  break;
2332
2372
  }
2333
- product = _step2.value;
2373
+ product = _step3.value;
2334
2374
  productUid = (_product$metadata5 = product.metadata) === null || _product$metadata5 === void 0 ? void 0 : _product$metadata5.unique_identification_number;
2335
2375
  runtimeOrigin = productUid ? (_tempOrder$_extend3 = tempOrder._extend) === null || _tempOrder$_extend3 === void 0 || (_tempOrder$_extend3 = _tempOrder$_extend3.productsByUid) === null || _tempOrder$_extend3 === void 0 || (_tempOrder$_extend3 = _tempOrder$_extend3[productUid]) === null || _tempOrder$_extend3 === void 0 ? void 0 : _tempOrder$_extend3.origin : undefined;
2336
2376
  if (!(runtimeOrigin !== null && runtimeOrigin !== void 0 && runtimeOrigin.isManualDiscount || isBaseSalesManualProductDiscountProduct(product))) {
@@ -2363,10 +2403,10 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2363
2403
  case 64:
2364
2404
  _context21.prev = 64;
2365
2405
  _context21.t0 = _context21["catch"](45);
2366
- _iterator2.e(_context21.t0);
2406
+ _iterator3.e(_context21.t0);
2367
2407
  case 67:
2368
2408
  _context21.prev = 67;
2369
- _iterator2.f();
2409
+ _iterator3.f();
2370
2410
  return _context21.finish(67);
2371
2411
  case 70:
2372
2412
  if (!result.discountList) {
@@ -2639,7 +2679,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2639
2679
  key: "setDiscountSelected",
2640
2680
  value: function () {
2641
2681
  var _setDiscountSelected = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(params) {
2642
- var list, updated, tempOrder, orderStore, discountModule, rulesModule, nextDiscountList, _orderStore$summary3, orderTotalAmount, result, beforeSelectedIds, _iterator3, _step3, d, selectedResourceIds, filterSelectedDiscountDetails, _iterator4, _step4, _product$metadata8, _tempOrder$_extend4, _product$metadata$sou2, _product$metadata9, _product$metadata10, _product$original_pri2, product, productUid, runtimeOrigin, totalPerUnitDiscount, optionSum, sourcePrice, newSourceSellingPrice, newMainSellingPrice;
2682
+ var list, updated, tempOrder, orderStore, discountModule, rulesModule, nextDiscountList, _orderStore$summary3, orderTotalAmount, result, beforeSelectedIds, _iterator4, _step4, d, selectedResourceIds, filterSelectedDiscountDetails, _iterator5, _step5, _product$metadata8, _tempOrder$_extend4, _product$metadata$sou2, _product$metadata9, _product$metadata10, _product$original_pri2, product, productUid, runtimeOrigin, totalPerUnitDiscount, optionSum, sourcePrice, newSourceSellingPrice, newMainSellingPrice;
2643
2683
  return _regeneratorRuntime().wrap(function _callee25$(_context25) {
2644
2684
  while (1) switch (_context25.prev = _context25.next) {
2645
2685
  case 0:
@@ -2694,10 +2734,10 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2694
2734
  }).map(function (d) {
2695
2735
  return d.id;
2696
2736
  }));
2697
- _iterator3 = _createForOfIteratorHelper(nextDiscountList);
2737
+ _iterator4 = _createForOfIteratorHelper(nextDiscountList);
2698
2738
  try {
2699
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
2700
- d = _step3.value;
2739
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
2740
+ d = _step4.value;
2701
2741
  if (d.isSelected && !beforeSelectedIds.has(d.id)) {
2702
2742
  d.isSelected = false;
2703
2743
  d.isManualSelect = true;
@@ -2705,9 +2745,9 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2705
2745
  }
2706
2746
  }
2707
2747
  } catch (err) {
2708
- _iterator3.e(err);
2748
+ _iterator4.e(err);
2709
2749
  } finally {
2710
- _iterator3.f();
2750
+ _iterator4.f();
2711
2751
  }
2712
2752
  }
2713
2753
  }
@@ -2724,15 +2764,15 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2724
2764
  return rid != null && selectedResourceIds.has(rid);
2725
2765
  });
2726
2766
  };
2727
- _iterator4 = _createForOfIteratorHelper(tempOrder.products);
2767
+ _iterator5 = _createForOfIteratorHelper(tempOrder.products);
2728
2768
  _context25.prev = 17;
2729
- _iterator4.s();
2769
+ _iterator5.s();
2730
2770
  case 19:
2731
- if ((_step4 = _iterator4.n()).done) {
2771
+ if ((_step5 = _iterator5.n()).done) {
2732
2772
  _context25.next = 36;
2733
2773
  break;
2734
2774
  }
2735
- product = _step4.value;
2775
+ product = _step5.value;
2736
2776
  productUid = (_product$metadata8 = product.metadata) === null || _product$metadata8 === void 0 ? void 0 : _product$metadata8.unique_identification_number;
2737
2777
  runtimeOrigin = productUid ? (_tempOrder$_extend4 = tempOrder._extend) === null || _tempOrder$_extend4 === void 0 || (_tempOrder$_extend4 = _tempOrder$_extend4.productsByUid) === null || _tempOrder$_extend4 === void 0 || (_tempOrder$_extend4 = _tempOrder$_extend4[productUid]) === null || _tempOrder$_extend4 === void 0 ? void 0 : _tempOrder$_extend4.origin : undefined;
2738
2778
  if (!(runtimeOrigin !== null && runtimeOrigin !== void 0 && runtimeOrigin.isManualDiscount || isBaseSalesManualProductDiscountProduct(product))) {
@@ -2783,10 +2823,10 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2783
2823
  case 38:
2784
2824
  _context25.prev = 38;
2785
2825
  _context25.t0 = _context25["catch"](17);
2786
- _iterator4.e(_context25.t0);
2826
+ _iterator5.e(_context25.t0);
2787
2827
  case 41:
2788
2828
  _context25.prev = 41;
2789
- _iterator4.f();
2829
+ _iterator5.f();
2790
2830
  return _context25.finish(41);
2791
2831
  case 44:
2792
2832
  OrderModule.populateSavedAmounts(tempOrder.products, nextDiscountList);
@@ -2924,8 +2964,8 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2924
2964
  key: "submitSalesOrder",
2925
2965
  value: (function () {
2926
2966
  var _submitSalesOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28(params) {
2927
- var _params$smallTicketDa, _this$otherParams11, _this$otherParams12, _this$otherParams13, _this$otherParams14;
2928
- var inferredPaymentStatus, smallTicketDataFlag, submitParams;
2967
+ var _params$smallTicketDa, _this$otherParams13, _this$otherParams14, _this$otherParams15, _this$otherParams16;
2968
+ var inferredPaymentStatus, smallTicketDataFlag, enhancePayload, submitParams;
2929
2969
  return _regeneratorRuntime().wrap(function _callee28$(_context28) {
2930
2970
  while (1) switch (_context28.prev = _context28.next) {
2931
2971
  case 0:
@@ -2938,12 +2978,13 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2938
2978
  // this.store.order.persistTempOrder();
2939
2979
  inferredPaymentStatus = this.getSubmitPaymentStatus(params === null || params === void 0 ? void 0 : params.paymentStatus);
2940
2980
  smallTicketDataFlag = (_params$smallTicketDa = params === null || params === void 0 ? void 0 : params.smallTicketDataFlag) !== null && _params$smallTicketDa !== void 0 ? _params$smallTicketDa : this.getDefaultCheckoutSmallTicketDataFlag();
2981
+ enhancePayload = this.buildSubmitPayloadEnhancerWithFulfillmentRefMode(params === null || params === void 0 ? void 0 : params.enhancePayload);
2941
2982
  submitParams = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
2942
2983
  cacheId: this.cacheId,
2943
- platform: (_this$otherParams11 = this.otherParams) === null || _this$otherParams11 === void 0 ? void 0 : _this$otherParams11.platform,
2944
- businessCode: ((_this$otherParams12 = this.otherParams) === null || _this$otherParams12 === void 0 ? void 0 : _this$otherParams12.businessCode) || ((_this$otherParams13 = this.otherParams) === null || _this$otherParams13 === void 0 ? void 0 : _this$otherParams13.business_code),
2984
+ platform: (_this$otherParams13 = this.otherParams) === null || _this$otherParams13 === void 0 ? void 0 : _this$otherParams13.platform,
2985
+ businessCode: ((_this$otherParams14 = this.otherParams) === null || _this$otherParams14 === void 0 ? void 0 : _this$otherParams14.businessCode) || ((_this$otherParams15 = this.otherParams) === null || _this$otherParams15 === void 0 ? void 0 : _this$otherParams15.business_code),
2945
2986
  channel: this.getSubmitOrderSalesChannel(),
2946
- type: (_this$otherParams14 = this.otherParams) === null || _this$otherParams14 === void 0 ? void 0 : _this$otherParams14.type,
2987
+ type: (_this$otherParams16 = this.otherParams) === null || _this$otherParams16 === void 0 ? void 0 : _this$otherParams16.type,
2947
2988
  request_unique_idempotency_token: this.store.order.generateIdempotencyToken()
2948
2989
  }, (params === null || params === void 0 ? void 0 : params.payments) !== undefined ? {
2949
2990
  payments: params.payments
@@ -2953,11 +2994,11 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2953
2994
  smallTicketDataFlag: smallTicketDataFlag
2954
2995
  } : {}), (params === null || params === void 0 ? void 0 : params.confirmPendingVoucherPayments) !== undefined ? {
2955
2996
  confirmPendingVoucherPayments: params.confirmPendingVoucherPayments
2956
- } : {}), (params === null || params === void 0 ? void 0 : params.enhancePayload) !== undefined ? {
2957
- enhancePayload: params.enhancePayload
2997
+ } : {}), enhancePayload !== undefined ? {
2998
+ enhancePayload: enhancePayload
2958
2999
  } : {});
2959
3000
  return _context28.abrupt("return", this.shouldUseCheckoutSyncTask() ? this.store.order.submitTempOrder(submitParams) : this.store.order.submitTempOrderAsync(submitParams));
2960
- case 6:
3001
+ case 7:
2961
3002
  case "end":
2962
3003
  return _context28.stop();
2963
3004
  }
@@ -2972,7 +3013,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2972
3013
  key: "saveSalesOrderDraft",
2973
3014
  value: function () {
2974
3015
  var _saveSalesOrderDraft = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29(params) {
2975
- var _params$platform, _this$otherParams15, _this$otherParams16, _this$otherParams17, _params$channel, _params$type, _this$otherParams18;
3016
+ var _params$platform, _this$otherParams17, _this$otherParams18, _this$otherParams19, _params$channel, _params$type, _this$otherParams20;
2976
3017
  return _regeneratorRuntime().wrap(function _callee29$(_context29) {
2977
3018
  while (1) switch (_context29.prev = _context29.next) {
2978
3019
  case 0:
@@ -2984,10 +3025,10 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
2984
3025
  case 2:
2985
3026
  return _context29.abrupt("return", this.store.order.saveTempOrderAsDraft(_objectSpread({
2986
3027
  cacheId: this.cacheId,
2987
- platform: (_params$platform = params === null || params === void 0 ? void 0 : params.platform) !== null && _params$platform !== void 0 ? _params$platform : (_this$otherParams15 = this.otherParams) === null || _this$otherParams15 === void 0 ? void 0 : _this$otherParams15.platform,
2988
- businessCode: (params === null || params === void 0 ? void 0 : params.businessCode) || ((_this$otherParams16 = this.otherParams) === null || _this$otherParams16 === void 0 ? void 0 : _this$otherParams16.businessCode) || ((_this$otherParams17 = this.otherParams) === null || _this$otherParams17 === void 0 ? void 0 : _this$otherParams17.business_code),
3028
+ platform: (_params$platform = params === null || params === void 0 ? void 0 : params.platform) !== null && _params$platform !== void 0 ? _params$platform : (_this$otherParams17 = this.otherParams) === null || _this$otherParams17 === void 0 ? void 0 : _this$otherParams17.platform,
3029
+ businessCode: (params === null || params === void 0 ? void 0 : params.businessCode) || ((_this$otherParams18 = this.otherParams) === null || _this$otherParams18 === void 0 ? void 0 : _this$otherParams18.businessCode) || ((_this$otherParams19 = this.otherParams) === null || _this$otherParams19 === void 0 ? void 0 : _this$otherParams19.business_code),
2989
3030
  channel: (_params$channel = params === null || params === void 0 ? void 0 : params.channel) !== null && _params$channel !== void 0 ? _params$channel : this.getSubmitOrderSalesChannel(),
2990
- type: (_params$type = params === null || params === void 0 ? void 0 : params.type) !== null && _params$type !== void 0 ? _params$type : (_this$otherParams18 = this.otherParams) === null || _this$otherParams18 === void 0 ? void 0 : _this$otherParams18.type
3031
+ type: (_params$type = params === null || params === void 0 ? void 0 : params.type) !== null && _params$type !== void 0 ? _params$type : (_this$otherParams20 = this.otherParams) === null || _this$otherParams20 === void 0 ? void 0 : _this$otherParams20.type
2991
3032
  }, (params === null || params === void 0 ? void 0 : params.enhancePayload) !== undefined ? {
2992
3033
  enhancePayload: params.enhancePayload
2993
3034
  } : {})));
@@ -3006,8 +3047,8 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3006
3047
  key: "submitTempOrderAsync",
3007
3048
  value: function () {
3008
3049
  var _submitTempOrderAsync = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30(params) {
3009
- var _params$smallTicketDa2, _this$otherParams19, _this$otherParams20, _this$otherParams21, _this$otherParams22;
3010
- var inferredPaymentStatus, smallTicketDataFlag, submitParams;
3050
+ var _params$smallTicketDa2, _this$otherParams21, _this$otherParams22, _this$otherParams23, _this$otherParams24;
3051
+ var inferredPaymentStatus, smallTicketDataFlag, enhancePayload, submitParams;
3011
3052
  return _regeneratorRuntime().wrap(function _callee30$(_context30) {
3012
3053
  while (1) switch (_context30.prev = _context30.next) {
3013
3054
  case 0:
@@ -3019,12 +3060,13 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3019
3060
  case 2:
3020
3061
  inferredPaymentStatus = this.getSubmitPaymentStatus(params === null || params === void 0 ? void 0 : params.paymentStatus);
3021
3062
  smallTicketDataFlag = (_params$smallTicketDa2 = params === null || params === void 0 ? void 0 : params.smallTicketDataFlag) !== null && _params$smallTicketDa2 !== void 0 ? _params$smallTicketDa2 : this.getDefaultCheckoutSmallTicketDataFlag();
3063
+ enhancePayload = this.buildSubmitPayloadEnhancerWithFulfillmentRefMode(params === null || params === void 0 ? void 0 : params.enhancePayload);
3022
3064
  submitParams = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
3023
3065
  cacheId: this.cacheId,
3024
- platform: (_this$otherParams19 = this.otherParams) === null || _this$otherParams19 === void 0 ? void 0 : _this$otherParams19.platform,
3025
- businessCode: ((_this$otherParams20 = this.otherParams) === null || _this$otherParams20 === void 0 ? void 0 : _this$otherParams20.businessCode) || ((_this$otherParams21 = this.otherParams) === null || _this$otherParams21 === void 0 ? void 0 : _this$otherParams21.business_code),
3066
+ platform: (_this$otherParams21 = this.otherParams) === null || _this$otherParams21 === void 0 ? void 0 : _this$otherParams21.platform,
3067
+ businessCode: ((_this$otherParams22 = this.otherParams) === null || _this$otherParams22 === void 0 ? void 0 : _this$otherParams22.businessCode) || ((_this$otherParams23 = this.otherParams) === null || _this$otherParams23 === void 0 ? void 0 : _this$otherParams23.business_code),
3026
3068
  channel: this.getSubmitOrderSalesChannel(),
3027
- type: (_this$otherParams22 = this.otherParams) === null || _this$otherParams22 === void 0 ? void 0 : _this$otherParams22.type,
3069
+ type: (_this$otherParams24 = this.otherParams) === null || _this$otherParams24 === void 0 ? void 0 : _this$otherParams24.type,
3028
3070
  request_unique_idempotency_token: this.store.order.generateIdempotencyToken()
3029
3071
  }, (params === null || params === void 0 ? void 0 : params.payments) !== undefined ? {
3030
3072
  payments: params.payments
@@ -3034,11 +3076,11 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3034
3076
  smallTicketDataFlag: smallTicketDataFlag
3035
3077
  } : {}), (params === null || params === void 0 ? void 0 : params.confirmPendingVoucherPayments) !== undefined ? {
3036
3078
  confirmPendingVoucherPayments: params.confirmPendingVoucherPayments
3037
- } : {}), (params === null || params === void 0 ? void 0 : params.enhancePayload) !== undefined ? {
3038
- enhancePayload: params.enhancePayload
3079
+ } : {}), enhancePayload !== undefined ? {
3080
+ enhancePayload: enhancePayload
3039
3081
  } : {});
3040
3082
  return _context30.abrupt("return", this.store.order.submitTempOrderAsync(submitParams));
3041
- case 6:
3083
+ case 7:
3042
3084
  case "end":
3043
3085
  return _context30.stop();
3044
3086
  }
@@ -3056,8 +3098,8 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3056
3098
  }, {
3057
3099
  key: "shouldUseCheckoutSyncTask",
3058
3100
  value: function shouldUseCheckoutSyncTask() {
3059
- var _this$otherParams23;
3060
- var configured = (_this$otherParams23 = this.otherParams) === null || _this$otherParams23 === void 0 ? void 0 : _this$otherParams23.checkoutSyncTaskEnabled;
3101
+ var _this$otherParams25;
3102
+ var configured = (_this$otherParams25 = this.otherParams) === null || _this$otherParams25 === void 0 ? void 0 : _this$otherParams25.checkoutSyncTaskEnabled;
3061
3103
  return typeof configured === 'boolean' ? configured : true;
3062
3104
  }
3063
3105
 
@@ -3071,7 +3113,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3071
3113
  key: "printLocalOrderReceipt",
3072
3114
  value: function () {
3073
3115
  var _printLocalOrderReceipt = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31(lookup) {
3074
- var _this$otherParams24, _this$otherParams25, _this$otherParams26, _this$otherParams27;
3116
+ var _this$otherParams26, _this$otherParams27, _this$otherParams28, _this$otherParams29;
3075
3117
  var hasLookup, lookupPayload, context, payload, response, _this$store$order$app, _this$store$order5, _data;
3076
3118
  return _regeneratorRuntime().wrap(function _callee31$(_context31) {
3077
3119
  while (1) switch (_context31.prev = _context31.next) {
@@ -3089,10 +3131,10 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3089
3131
  external_sale_number: lookup
3090
3132
  };
3091
3133
  context = {
3092
- platform: (_this$otherParams24 = this.otherParams) === null || _this$otherParams24 === void 0 ? void 0 : _this$otherParams24.platform,
3093
- businessCode: ((_this$otherParams25 = this.otherParams) === null || _this$otherParams25 === void 0 ? void 0 : _this$otherParams25.businessCode) || ((_this$otherParams26 = this.otherParams) === null || _this$otherParams26 === void 0 ? void 0 : _this$otherParams26.business_code),
3134
+ platform: (_this$otherParams26 = this.otherParams) === null || _this$otherParams26 === void 0 ? void 0 : _this$otherParams26.platform,
3135
+ businessCode: ((_this$otherParams27 = this.otherParams) === null || _this$otherParams27 === void 0 ? void 0 : _this$otherParams27.businessCode) || ((_this$otherParams28 = this.otherParams) === null || _this$otherParams28 === void 0 ? void 0 : _this$otherParams28.business_code),
3094
3136
  channel: this.getSubmitOrderSalesChannel(),
3095
- type: (_this$otherParams27 = this.otherParams) === null || _this$otherParams27 === void 0 ? void 0 : _this$otherParams27.type
3137
+ type: (_this$otherParams29 = this.otherParams) === null || _this$otherParams29 === void 0 ? void 0 : _this$otherParams29.type
3096
3138
  };
3097
3139
  payload = hasLookup ? _objectSpread(_objectSpread({}, lookupPayload), {}, {
3098
3140
  lookup_order_from_db: 1,
@@ -3151,8 +3193,8 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3151
3193
  key: "syncPaymentsToOrder",
3152
3194
  value: function () {
3153
3195
  var _syncPaymentsToOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32(params) {
3154
- var _ref32, _params$businessCode, _this$otherParams28, _this$otherParams29, _params$channel2;
3155
- var businessCode, channel, syncParams, syncState, payments, syncResult, latestPayments, amountSnapshot, orderSnapshot, syncPayload;
3196
+ var _ref32, _params$businessCode, _this$otherParams30, _this$otherParams31, _params$channel2;
3197
+ var businessCode, channel, enhancePayload, syncParams, syncState, payments, syncResult, latestPayments, amountSnapshot, orderSnapshot, syncPayload;
3156
3198
  return _regeneratorRuntime().wrap(function _callee32$(_context32) {
3157
3199
  while (1) switch (_context32.prev = _context32.next) {
3158
3200
  case 0:
@@ -3162,36 +3204,39 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3162
3204
  }
3163
3205
  throw new Error('order 模块未初始化');
3164
3206
  case 2:
3165
- businessCode = (_ref32 = (_params$businessCode = params.businessCode) !== null && _params$businessCode !== void 0 ? _params$businessCode : (_this$otherParams28 = this.otherParams) === null || _this$otherParams28 === void 0 ? void 0 : _this$otherParams28.businessCode) !== null && _ref32 !== void 0 ? _ref32 : (_this$otherParams29 = this.otherParams) === null || _this$otherParams29 === void 0 ? void 0 : _this$otherParams29.business_code;
3207
+ businessCode = (_ref32 = (_params$businessCode = params.businessCode) !== null && _params$businessCode !== void 0 ? _params$businessCode : (_this$otherParams30 = this.otherParams) === null || _this$otherParams30 === void 0 ? void 0 : _this$otherParams30.businessCode) !== null && _ref32 !== void 0 ? _ref32 : (_this$otherParams31 = this.otherParams) === null || _this$otherParams31 === void 0 ? void 0 : _this$otherParams31.business_code;
3166
3208
  channel = (_params$channel2 = params.channel) !== null && _params$channel2 !== void 0 ? _params$channel2 : this.getSubmitOrderSalesChannel();
3167
- syncParams = _objectSpread(_objectSpread(_objectSpread({}, params), {}, {
3209
+ enhancePayload = this.buildSubmitPayloadEnhancerWithFulfillmentRefMode(params.enhancePayload);
3210
+ syncParams = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, params), {}, {
3168
3211
  checkoutSyncTaskEnabled: this.shouldUseCheckoutSyncTask()
3169
3212
  }, businessCode !== undefined ? {
3170
3213
  businessCode: businessCode
3171
3214
  } : {}), channel !== undefined ? {
3172
3215
  channel: channel
3216
+ } : {}), enhancePayload !== undefined ? {
3217
+ enhancePayload: enhancePayload
3173
3218
  } : {});
3174
3219
  syncState = this.store.order.getOrderSyncState();
3175
3220
  if (!(params.submitWhenPaid && syncState === 'submitting')) {
3176
- _context32.next = 9;
3221
+ _context32.next = 10;
3177
3222
  break;
3178
3223
  }
3179
3224
  this.queueLatestAutoPaymentSync();
3180
3225
  return _context32.abrupt("return", this.store.order.syncPaymentsToOrder(syncParams));
3181
- case 9:
3226
+ case 10:
3182
3227
  payments = params.payments || [];
3183
- _context32.next = 12;
3228
+ _context32.next = 13;
3184
3229
  return this.effectsEmit(BaseSalesHookNames.onPaymentSyncStart, {
3185
3230
  payments: payments,
3186
3231
  params: syncParams,
3187
3232
  amountSnapshot: this.store.order.getOrderAmountSnapshot(),
3188
3233
  orderSnapshot: this.store.order.getOrderSnapshot()
3189
3234
  });
3190
- case 12:
3191
- _context32.prev = 12;
3192
- _context32.next = 15;
3235
+ case 13:
3236
+ _context32.prev = 13;
3237
+ _context32.next = 16;
3193
3238
  return this.store.order.syncPaymentsToOrder(syncParams);
3194
- case 15:
3239
+ case 16:
3195
3240
  syncResult = _context32.sent;
3196
3241
  latestPayments = this.store.order.getOrderPayments();
3197
3242
  amountSnapshot = this.store.order.getOrderAmountSnapshot();
@@ -3210,22 +3255,22 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3210
3255
  depositAmount: syncResult.depositAmount,
3211
3256
  orderExpectedAmount: syncResult.orderExpectedAmount
3212
3257
  };
3213
- _context32.next = 22;
3258
+ _context32.next = 23;
3214
3259
  return this.effectsEmit(BaseSalesHookNames.onPaymentSyncEnd, syncPayload);
3215
- case 22:
3260
+ case 23:
3216
3261
  if (!(syncResult.isDepositFullyPaid && !syncResult.isOrderFullyPaid)) {
3217
- _context32.next = 25;
3262
+ _context32.next = 26;
3218
3263
  break;
3219
3264
  }
3220
- _context32.next = 25;
3265
+ _context32.next = 26;
3221
3266
  return this.effectsEmit(BaseSalesHookNames.onDepositPaymentSyncEnd, syncPayload);
3222
- case 25:
3267
+ case 26:
3223
3268
  this.scheduleQueuedAutoPaymentSyncFlush(0);
3224
3269
  return _context32.abrupt("return", syncResult);
3225
- case 29:
3226
- _context32.prev = 29;
3227
- _context32.t0 = _context32["catch"](12);
3228
- _context32.next = 33;
3270
+ case 30:
3271
+ _context32.prev = 30;
3272
+ _context32.t0 = _context32["catch"](13);
3273
+ _context32.next = 34;
3229
3274
  return this.effectsEmit(BaseSalesHookNames.onPaymentSyncEnd, {
3230
3275
  ok: false,
3231
3276
  error: _context32.t0,
@@ -3234,14 +3279,14 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3234
3279
  amountSnapshot: this.store.order.getOrderAmountSnapshot(),
3235
3280
  orderSnapshot: this.store.order.getOrderSnapshot()
3236
3281
  });
3237
- case 33:
3282
+ case 34:
3238
3283
  this.scheduleQueuedAutoPaymentSyncFlush(0);
3239
3284
  throw _context32.t0;
3240
- case 35:
3285
+ case 36:
3241
3286
  case "end":
3242
3287
  return _context32.stop();
3243
3288
  }
3244
- }, _callee32, this, [[12, 29]]);
3289
+ }, _callee32, this, [[13, 30]]);
3245
3290
  }));
3246
3291
  function syncPaymentsToOrder(_x28) {
3247
3292
  return _syncPaymentsToOrder.apply(this, arguments);
@@ -3421,7 +3466,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3421
3466
  }, {
3422
3467
  key: "addOrderPaymentWithDevicePrefix",
3423
3468
  value: function addOrderPaymentWithDevicePrefix(payment, devicePrefix) {
3424
- var _this$otherParams30,
3469
+ var _this$otherParams32,
3425
3470
  _paymentRecord$paymen,
3426
3471
  _paymentRecord$create,
3427
3472
  _ref33,
@@ -3437,7 +3482,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
3437
3482
  return this.store.order.getOrderPayments();
3438
3483
  }
3439
3484
  var metadata = paymentRecord.metadata && _typeof(paymentRecord.metadata) === 'object' ? _objectSpread({}, paymentRecord.metadata) : {};
3440
- var shopWalletPassId = (_this$otherParams30 = this.otherParams) === null || _this$otherParams30 === void 0 ? void 0 : _this$otherParams30.shop_wallet_pass_id;
3485
+ var shopWalletPassId = (_this$otherParams32 = this.otherParams) === null || _this$otherParams32 === void 0 ? void 0 : _this$otherParams32.shop_wallet_pass_id;
3441
3486
  if (shopWalletPassId !== undefined && shopWalletPassId !== null) {
3442
3487
  metadata.shop_wallet_pass_id = shopWalletPassId;
3443
3488
  }
@@ -4336,7 +4381,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4336
4381
  key: "getCashPaymentConfig",
4337
4382
  value: (function () {
4338
4383
  var _getCashPaymentConfig = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee47() {
4339
- var _this$store$order11, _this$store$order11$g, _this$store$order12, _this$store$order12$g, _this$otherParams31;
4384
+ var _this$store$order11, _this$store$order11$g, _this$store$order12, _this$store$order12$g, _this$otherParams33;
4340
4385
  var paymentMethods, paymentMethod, amountSnapshot, pendingWalletAmount, amountDue, currency, recommendedAmounts;
4341
4386
  return _regeneratorRuntime().wrap(function _callee47$(_context47) {
4342
4387
  while (1) switch (_context47.prev = _context47.next) {
@@ -4362,7 +4407,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4362
4407
  amountSnapshot = (_this$store$order11 = this.store.order) === null || _this$store$order11 === void 0 || (_this$store$order11$g = _this$store$order11.getOrderAmountSnapshot) === null || _this$store$order11$g === void 0 ? void 0 : _this$store$order11$g.call(_this$store$order11);
4363
4408
  pendingWalletAmount = this.getPendingWalletPaymentAmount();
4364
4409
  amountDue = Decimal.max(new Decimal((amountSnapshot === null || amountSnapshot === void 0 ? void 0 : amountSnapshot.amountGap) || 0).minus(pendingWalletAmount), 0).toDecimalPlaces(2).toNumber();
4365
- currency = ((_this$store$order12 = this.store.order) === null || _this$store$order12 === void 0 || (_this$store$order12$g = _this$store$order12.getTempOrder) === null || _this$store$order12$g === void 0 || (_this$store$order12$g = _this$store$order12$g.call(_this$store$order12)) === null || _this$store$order12$g === void 0 ? void 0 : _this$store$order12$g.currency_code) || ((_this$otherParams31 = this.otherParams) === null || _this$otherParams31 === void 0 ? void 0 : _this$otherParams31.currency) || 'USD';
4410
+ currency = ((_this$store$order12 = this.store.order) === null || _this$store$order12 === void 0 || (_this$store$order12$g = _this$store$order12.getTempOrder) === null || _this$store$order12$g === void 0 || (_this$store$order12$g = _this$store$order12$g.call(_this$store$order12)) === null || _this$store$order12$g === void 0 ? void 0 : _this$store$order12$g.currency_code) || ((_this$otherParams33 = this.otherParams) === null || _this$otherParams33 === void 0 ? void 0 : _this$otherParams33.currency) || 'USD';
4366
4411
  recommendedAmounts = amountDue > 0 ? this.store.payment.cash.getRecommendedAmount(amountDue, currency) : [];
4367
4412
  return _context47.abrupt("return", {
4368
4413
  available: Boolean(paymentMethod && amountDue > 0),
@@ -4497,7 +4542,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4497
4542
  key: "payCash",
4498
4543
  value: (function () {
4499
4544
  var _payCash = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee49(params) {
4500
- var _this$store$order$get6, _params$actualPaidAmo, _this$otherParams32, _this$window, _this$window$postMess;
4545
+ var _this$store$order$get6, _params$actualPaidAmo, _this$otherParams34, _this$window, _this$window$postMess;
4501
4546
  var amount, config, paymentMethod, roundingAmount, effectivePaymentAmount, beforePayments, beforePaymentStatus, uniquePaymentNumber, paymentTimestamp, actualPaidAmount, changeAmount, shopWalletPassId, payments, payment, syncResult, committed, walletState, restoredTempOrder;
4502
4547
  return _regeneratorRuntime().wrap(function _callee49$(_context49) {
4503
4548
  while (1) switch (_context49.prev = _context49.next) {
@@ -4546,7 +4591,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
4546
4591
  paymentTimestamp = dayjs().format('YYYY-MM-DD HH:mm:ss');
4547
4592
  actualPaidAmount = Number((_params$actualPaidAmo = params.actualPaidAmount) !== null && _params$actualPaidAmo !== void 0 ? _params$actualPaidAmo : amount);
4548
4593
  changeAmount = Number(params.changeAmount || 0);
4549
- shopWalletPassId = (_this$otherParams32 = this.otherParams) === null || _this$otherParams32 === void 0 ? void 0 : _this$otherParams32.shop_wallet_pass_id;
4594
+ shopWalletPassId = (_this$otherParams34 = this.otherParams) === null || _this$otherParams34 === void 0 ? void 0 : _this$otherParams34.shop_wallet_pass_id;
4550
4595
  if (!(!Number.isFinite(actualPaidAmount) || actualPaidAmount + 0.01 < amount)) {
4551
4596
  _context49.next = 26;
4552
4597
  break;
@@ -5481,13 +5526,13 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
5481
5526
  key: "getProductList",
5482
5527
  value: function () {
5483
5528
  var _getProductList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee64() {
5484
- var _this$otherParams33;
5529
+ var _this$otherParams35;
5485
5530
  var menu_list_ids, _this$store$products, res;
5486
5531
  return _regeneratorRuntime().wrap(function _callee64$(_context64) {
5487
5532
  while (1) switch (_context64.prev = _context64.next) {
5488
5533
  case 0:
5489
5534
  // 可以直接通过配置里的 menu 读取
5490
- menu_list_ids = ((_this$otherParams33 = this.otherParams) === null || _this$otherParams33 === void 0 || (_this$otherParams33 = _this$otherParams33.dineInConfig) === null || _this$otherParams33 === void 0 ? void 0 : _this$otherParams33['menu.associated_menus'].map(function (n) {
5535
+ menu_list_ids = ((_this$otherParams35 = this.otherParams) === null || _this$otherParams35 === void 0 || (_this$otherParams35 = _this$otherParams35.dineInConfig) === null || _this$otherParams35 === void 0 ? void 0 : _this$otherParams35['menu.associated_menus'].map(function (n) {
5491
5536
  return Number(n.value);
5492
5537
  })) || [];
5493
5538
  _context64.prev = 1;
@@ -5525,7 +5570,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
5525
5570
  key: "setOtherParams",
5526
5571
  value: function () {
5527
5572
  var _setOtherParams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee65(params) {
5528
- var _this$otherParams34;
5573
+ var _this$otherParams36;
5529
5574
  var _ref42,
5530
5575
  _ref42$cover,
5531
5576
  cover,
@@ -5539,7 +5584,7 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
5539
5584
  } else {
5540
5585
  this.otherParams = _objectSpread(_objectSpread({}, this.otherParams), params);
5541
5586
  }
5542
- this.cacheId = (_this$otherParams34 = this.otherParams) === null || _this$otherParams34 === void 0 ? void 0 : _this$otherParams34.cacheId;
5587
+ this.cacheId = (_this$otherParams36 = this.otherParams) === null || _this$otherParams36 === void 0 ? void 0 : _this$otherParams36.cacheId;
5543
5588
  _context65.next = 5;
5544
5589
  return this.syncOtherParamsToSubModules(params, {
5545
5590
  cover: cover
@@ -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 | 5 | 1 | 2 | 3 | 4 | 6;
330
330
  }[]>;
331
331
  submitTimeSlot(timeSlots: TimeSliceItem): void;
332
332
  private getScheduleDataByIds;
@@ -453,7 +453,19 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
453
453
  * 加车两阶段主决策(规格弹窗 / 资源编辑 / 直接加车)。
454
454
  * 与 ticketBooking `handleSelectProduct` + `handleBooking4Service` 等价。
455
455
  */
456
- decideAddProduct(item: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
456
+ decideAddProduct(item: any, options?: Partial<AddProductDecideContext>): {
457
+ action: "reloadCatalog";
458
+ } | {
459
+ action: "add";
460
+ cacheItem: any;
461
+ } | {
462
+ action: "requiresDetail";
463
+ payload: AddProductRequiresDetailPayload;
464
+ } | {
465
+ action: "requiresBookingEdit";
466
+ cacheItem: any;
467
+ payload: import("./utils/addProductDecision").AddProductRequiresBookingEditPayload;
468
+ };
457
469
  /** 规格弹窗 callback 后的第二段决策。 */
458
470
  decideAfterDetail(cacheItem: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
459
471
  /**
@@ -434,7 +434,10 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
434
434
  prefix = this.normalizeIdPrefix((_openDataConfig3 = openDataConfig) === null || _openDataConfig3 === void 0 ? void 0 : _openDataConfig3['sale.short_number_prefix'], '');
435
435
  shopOrderPrefix = this.normalizeIdPrefix((_openDataConfig4 = openDataConfig) === null || _openDataConfig4 === void 0 ? void 0 : _openDataConfig4['sale.sale_number_prefix'], '');
436
436
  resetReceiptSequenceDaily = typeof ((_openDataConfig5 = openDataConfig) === null || _openDataConfig5 === void 0 ? void 0 : _openDataConfig5['sale.short_number_daily_reset']) === 'boolean' ? (_openDataConfig6 = openDataConfig) === null || _openDataConfig6 === void 0 ? void 0 : _openDataConfig6['sale.short_number_daily_reset'] : false;
437
- operatingDayBoundary = this.getAppData('operating_day_boundary');
437
+ operatingDayBoundary = this.getAppData('operating_day_boundary') || {
438
+ "type": "start_time",
439
+ "time": "00:00"
440
+ };
438
441
  _context5.next = 24;
439
442
  return this.getShortNumberOrDeviceId();
440
443
  case 24:
@@ -459,7 +462,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
459
462
  padReceiptSequence: false,
460
463
  receiptSequenceLength: receiptSequenceLength,
461
464
  resetReceiptSequenceDaily: resetReceiptSequenceDaily,
462
- receiptSequenceResetTime: operatingDayBoundary.time,
465
+ receiptSequenceResetTime: operatingDayBoundary === null || operatingDayBoundary === void 0 ? void 0 : operatingDayBoundary.time,
463
466
  receiptSequenceStart: receiptSequenceStart,
464
467
  shopOrderPrefix: shopOrderPrefix
465
468
  }