@pisell/pisellos 2.2.204 → 2.2.205

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.
Files changed (39) hide show
  1. package/dist/model/strategy/adapter/promotion/index.js +0 -9
  2. package/dist/modules/Order/index.js +9 -3
  3. package/dist/modules/Payment/index.d.ts +0 -13
  4. package/dist/modules/Payment/index.js +449 -833
  5. package/dist/plugins/request.d.ts +1 -0
  6. package/dist/server/index.d.ts +6 -0
  7. package/dist/server/index.js +730 -619
  8. package/dist/server/modules/index.d.ts +2 -0
  9. package/dist/server/modules/index.js +2 -0
  10. package/dist/server/modules/payment/index.d.ts +28 -0
  11. package/dist/server/modules/payment/index.js +305 -0
  12. package/dist/server/modules/payment/types.d.ts +9 -0
  13. package/dist/server/modules/payment/types.js +1 -0
  14. package/dist/solution/BaseSales/index.d.ts +6 -1
  15. package/dist/solution/BaseSales/index.js +67 -18
  16. package/dist/solution/BookingTicket/index.js +1 -1
  17. package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +51 -52
  18. package/dist/solution/BookingTicket/utils/scan/index.d.ts +5 -0
  19. package/dist/solution/BookingTicket/utils/scan/index.js +20 -8
  20. package/lib/model/strategy/adapter/promotion/index.js +49 -0
  21. package/lib/modules/Order/index.js +5 -1
  22. package/lib/modules/Payment/index.d.ts +0 -13
  23. package/lib/modules/Payment/index.js +6 -149
  24. package/lib/plugins/request.d.ts +1 -0
  25. package/lib/server/index.d.ts +6 -0
  26. package/lib/server/index.js +46 -0
  27. package/lib/server/modules/index.d.ts +2 -0
  28. package/lib/server/modules/index.js +3 -0
  29. package/lib/server/modules/payment/index.d.ts +28 -0
  30. package/lib/server/modules/payment/index.js +192 -0
  31. package/lib/server/modules/payment/types.d.ts +9 -0
  32. package/lib/server/modules/payment/types.js +17 -0
  33. package/lib/solution/BaseSales/index.d.ts +6 -1
  34. package/lib/solution/BaseSales/index.js +51 -5
  35. package/lib/solution/BookingTicket/index.js +1 -1
  36. package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +1 -2
  37. package/lib/solution/BookingTicket/utils/scan/index.d.ts +5 -0
  38. package/lib/solution/BookingTicket/utils/scan/index.js +17 -3
  39. package/package.json +1 -1
@@ -1,9 +0,0 @@
1
- // 导出评估器
2
- export { PromotionEvaluator } from "./evaluator";
3
-
4
- // 导出适配器
5
- export { PromotionAdapter } from "./adapter";
6
- export { default } from "./adapter";
7
-
8
- // 导出策略配置示例常量
9
- export { X_ITEMS_FOR_Y_PRICE_STRATEGY, BUY_X_GET_Y_FREE_STRATEGY } from "./examples";
@@ -2781,6 +2781,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
2781
2781
  shouldForceNewLine = !!booking;
2782
2782
  matchedIndex = hasIncomingGoodPass || shouldForceNewLine ? -1 : tempOrder.products.findIndex(function (item) {
2783
2783
  if (_this16.hasGoodPassDiscount(item)) return false;
2784
+ if (item.order_detail_id !== undefined && item.order_detail_id !== null) return false;
2784
2785
  if (item.product_id !== productToAdd.product_id) return false;
2785
2786
  if (item.product_variant_id !== productToAdd.product_variant_id) return false;
2786
2787
  var existedFingerprint = buildProductLineFingerprint(getProductSkuOptions(item), item.product_bundle);
@@ -3472,7 +3473,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
3472
3473
  case 32:
3473
3474
  submittedOrderId = this.extractOrderIdFromSubmitResult(result);
3474
3475
  if (!(submittedOrderId !== null && submittedOrderId !== undefined)) {
3475
- _context25.next = 38;
3476
+ _context25.next = 40;
3476
3477
  break;
3477
3478
  }
3478
3479
  tempOrder.order_id = submittedOrderId;
@@ -3480,8 +3481,13 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
3480
3481
  _context25.next = 38;
3481
3482
  return this.markLocalOrderSynced(submittedOrderId, (resultRecord === null || resultRecord === void 0 ? void 0 : resultRecord.data) || resultRecord || {});
3482
3483
  case 38:
3484
+ _context25.next = 41;
3485
+ break;
3486
+ case 40:
3487
+ this.store.syncState = 'submitted';
3488
+ case 41:
3483
3489
  return _context25.abrupt("return", result);
3484
- case 39:
3490
+ case 42:
3485
3491
  case "end":
3486
3492
  return _context25.stop();
3487
3493
  }
@@ -3943,7 +3949,7 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
3943
3949
  smallTicketDataFlag: orderData.small_ticket_data_flag
3944
3950
  });
3945
3951
  _context31.next = 12;
3946
- return this.request.post('/shop/order/checkout', orderData, {
3952
+ return this.request.post('/order/checkout', orderData, {
3947
3953
  osServer: true,
3948
3954
  customToast: function customToast() {}
3949
3955
  });
@@ -25,9 +25,6 @@ export declare class PaymentModule extends BaseModule implements Module, Payment
25
25
  private dbManager;
26
26
  private logger;
27
27
  private voucherUpdateLockByOrderUuid;
28
- private payMethodMemoryCache;
29
- private payMethodListInFlight;
30
- private isRefreshingPaymentMethods;
31
28
  protected otherParams: any;
32
29
  cash: CashPayment;
33
30
  eftpos: EftposPayment;
@@ -57,20 +54,10 @@ export declare class PaymentModule extends BaseModule implements Module, Payment
57
54
  *
58
55
  */
59
56
  private registerNetworkHandlers;
60
- private filterPayMethods;
61
57
  /**
62
58
  * 获取支付方式列表
63
59
  */
64
60
  getPayMethodListAsync(): Promise<PaymentMethod[]>;
65
- private loadPayMethodListAsync;
66
- /**
67
- * 后台刷新支付方式列表
68
- */
69
- private refreshPaymentMethodsInBackground;
70
- /**
71
- * 检查支付方式列表是否有变化
72
- */
73
- private hasPaymentMethodsChanged;
74
61
  /**
75
62
  * 获取订单列表
76
63
  */