@pisell/pisellos 2.3.51 → 2.3.53

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 (161) hide show
  1. package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +12 -10
  2. package/dist/modules/Discount/index.d.ts +0 -1
  3. package/dist/modules/Discount/index.js +11 -40
  4. package/dist/modules/Discount/types.d.ts +0 -1
  5. package/dist/modules/OpenData/index.js +2 -2
  6. package/dist/modules/Order/index.d.ts +7 -9
  7. package/dist/modules/Order/index.js +165 -140
  8. package/dist/modules/Order/types.d.ts +21 -12
  9. package/dist/modules/Order/types.js +11 -0
  10. package/dist/modules/Order/utils.d.ts +0 -10
  11. package/dist/modules/Order/utils.js +3 -35
  12. package/dist/modules/Product/types.d.ts +0 -1
  13. package/dist/modules/ProductList/index.js +14 -33
  14. package/dist/modules/Quotation/index.d.ts +1 -1
  15. package/dist/modules/Quotation/index.js +2 -2
  16. package/dist/modules/Rules/index.js +32 -56
  17. package/dist/modules/SalesSummary/index.js +13 -12
  18. package/dist/modules/SalesSummary/utils.js +7 -1
  19. package/dist/modules/ScanOrderLogger/index.d.ts +0 -2
  20. package/dist/modules/ScanOrderLogger/index.js +2 -15
  21. package/dist/modules/ScanOrderLogger/providers/feishu.js +27 -45
  22. package/dist/modules/ScanOrderLogger/types.d.ts +0 -1
  23. package/dist/modules/Schedule/index.d.ts +1 -3
  24. package/dist/modules/Schedule/index.js +16 -21
  25. package/dist/modules/Summary/utils.js +13 -38
  26. package/dist/modules/index.d.ts +0 -2
  27. package/dist/modules/index.js +1 -3
  28. package/dist/plugins/window.d.ts +0 -1
  29. package/dist/server/index.d.ts +0 -14
  30. package/dist/server/index.js +793 -907
  31. package/dist/solution/BaseSales/index.d.ts +15 -12
  32. package/dist/solution/BaseSales/index.js +194 -178
  33. package/dist/solution/BaseSales/utils/cartPromotion.js +5 -3
  34. package/dist/solution/BookingByStep/index.d.ts +1 -16
  35. package/dist/solution/BookingByStep/index.js +215 -294
  36. package/dist/solution/BookingByStep/types.d.ts +1 -2
  37. package/dist/solution/BookingByStep/types.js +1 -3
  38. package/dist/solution/BookingByStep/utils/capacity.js +1 -17
  39. package/dist/solution/BookingByStep/utils/timeslots.d.ts +1 -3
  40. package/dist/solution/BookingByStep/utils/timeslots.js +12 -19
  41. package/dist/solution/BookingTicket/index.d.ts +2 -14
  42. package/dist/solution/BookingTicket/index.js +2 -2
  43. package/dist/solution/BookingTicket/types.d.ts +3 -0
  44. package/dist/solution/BookingTicket/utils/cartView.js +44 -32
  45. package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +1 -3
  46. package/dist/solution/BookingTicket/utils/scan/handleScan.js +2 -10
  47. package/dist/solution/Sales/index.d.ts +1 -0
  48. package/dist/solution/Sales/index.js +16 -2
  49. package/dist/solution/ScanOrder/index.d.ts +14 -26
  50. package/dist/solution/ScanOrder/index.js +739 -1142
  51. package/dist/solution/ScanOrder/types.d.ts +1 -21
  52. package/dist/solution/ScanOrder/utils.d.ts +0 -8
  53. package/dist/solution/ScanOrder/utils.js +25 -66
  54. package/dist/solution/ShopDiscount/index.d.ts +0 -1
  55. package/dist/solution/ShopDiscount/index.js +87 -125
  56. package/dist/solution/VenueBooking/index.d.ts +11 -39
  57. package/dist/solution/VenueBooking/index.js +841 -1167
  58. package/dist/solution/VenueBooking/types.d.ts +0 -3
  59. package/dist/solution/VenueBooking/utils/resource.js +0 -1
  60. package/dist/solution/VenueBooking/utils/slotMerge.d.ts +4 -4
  61. package/dist/solution/VenueBooking/utils/slotMerge.js +5 -10
  62. package/dist/solution/index.d.ts +0 -1
  63. package/dist/solution/index.js +1 -2
  64. package/dist/types/index.d.ts +0 -1
  65. package/lib/model/strategy/adapter/promotion/index.js +0 -51
  66. package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +3 -1
  67. package/lib/modules/Discount/index.d.ts +0 -1
  68. package/lib/modules/Discount/index.js +0 -9
  69. package/lib/modules/Discount/types.d.ts +0 -1
  70. package/lib/modules/OpenData/index.js +1 -1
  71. package/lib/modules/Order/index.d.ts +7 -9
  72. package/lib/modules/Order/index.js +89 -38
  73. package/lib/modules/Order/types.d.ts +21 -12
  74. package/lib/modules/Order/utils.d.ts +0 -10
  75. package/lib/modules/Order/utils.js +5 -36
  76. package/lib/modules/Product/types.d.ts +0 -1
  77. package/lib/modules/ProductList/index.js +31 -40
  78. package/lib/modules/Quotation/index.d.ts +1 -1
  79. package/lib/modules/Quotation/index.js +2 -2
  80. package/lib/modules/Rules/index.js +32 -44
  81. package/lib/modules/SalesSummary/index.js +7 -6
  82. package/lib/modules/SalesSummary/utils.js +5 -1
  83. package/lib/modules/ScanOrderLogger/index.d.ts +0 -2
  84. package/lib/modules/ScanOrderLogger/index.js +1 -13
  85. package/lib/modules/ScanOrderLogger/providers/feishu.js +6 -15
  86. package/lib/modules/ScanOrderLogger/types.d.ts +0 -1
  87. package/lib/modules/Schedule/index.d.ts +1 -3
  88. package/lib/modules/Schedule/index.js +8 -10
  89. package/lib/modules/Summary/utils.js +1 -21
  90. package/lib/modules/index.d.ts +0 -2
  91. package/lib/modules/index.js +1 -5
  92. package/lib/plugins/window.d.ts +0 -1
  93. package/lib/server/index.d.ts +0 -14
  94. package/lib/server/index.js +15 -72
  95. package/lib/solution/BaseSales/index.d.ts +15 -12
  96. package/lib/solution/BaseSales/index.js +52 -35
  97. package/lib/solution/BaseSales/utils/cartPromotion.js +5 -2
  98. package/lib/solution/BookingByStep/index.d.ts +1 -16
  99. package/lib/solution/BookingByStep/index.js +18 -60
  100. package/lib/solution/BookingByStep/types.d.ts +1 -2
  101. package/lib/solution/BookingByStep/types.js +0 -5
  102. package/lib/solution/BookingByStep/utils/capacity.js +1 -20
  103. package/lib/solution/BookingByStep/utils/timeslots.d.ts +1 -3
  104. package/lib/solution/BookingByStep/utils/timeslots.js +11 -19
  105. package/lib/solution/BookingTicket/index.d.ts +2 -14
  106. package/lib/solution/BookingTicket/index.js +2 -10
  107. package/lib/solution/BookingTicket/types.d.ts +3 -0
  108. package/lib/solution/BookingTicket/utils/cartView.js +43 -30
  109. package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +1 -3
  110. package/lib/solution/BookingTicket/utils/scan/handleScan.js +2 -2
  111. package/lib/solution/Sales/index.d.ts +1 -0
  112. package/lib/solution/Sales/index.js +15 -3
  113. package/lib/solution/ScanOrder/index.d.ts +14 -26
  114. package/lib/solution/ScanOrder/index.js +182 -449
  115. package/lib/solution/ScanOrder/types.d.ts +1 -21
  116. package/lib/solution/ScanOrder/utils.d.ts +0 -8
  117. package/lib/solution/ScanOrder/utils.js +0 -31
  118. package/lib/solution/ShopDiscount/index.d.ts +0 -1
  119. package/lib/solution/ShopDiscount/index.js +0 -14
  120. package/lib/solution/VenueBooking/index.d.ts +11 -39
  121. package/lib/solution/VenueBooking/index.js +110 -322
  122. package/lib/solution/VenueBooking/types.d.ts +0 -3
  123. package/lib/solution/VenueBooking/utils/resource.js +0 -1
  124. package/lib/solution/VenueBooking/utils/slotMerge.d.ts +4 -4
  125. package/lib/solution/VenueBooking/utils/slotMerge.js +4 -6
  126. package/lib/solution/index.d.ts +0 -1
  127. package/lib/solution/index.js +1 -3
  128. package/lib/types/index.d.ts +0 -1
  129. package/package.json +1 -1
  130. package/dist/modules/Holder/index.d.ts +0 -48
  131. package/dist/modules/Holder/index.js +0 -640
  132. package/dist/modules/Holder/types.d.ts +0 -123
  133. package/dist/modules/Holder/types.js +0 -1
  134. package/dist/modules/Holder/utils.d.ts +0 -13
  135. package/dist/modules/Holder/utils.js +0 -34
  136. package/dist/modules/ResourcePlanner/index.d.ts +0 -24
  137. package/dist/modules/ResourcePlanner/index.js +0 -181
  138. package/dist/modules/ResourcePlanner/planner.d.ts +0 -14
  139. package/dist/modules/ResourcePlanner/planner.js +0 -1069
  140. package/dist/modules/ResourcePlanner/types.d.ts +0 -227
  141. package/dist/modules/ResourcePlanner/types.js +0 -1
  142. package/dist/solution/UnifiedBookingSales/index.d.ts +0 -183
  143. package/dist/solution/UnifiedBookingSales/index.js +0 -1891
  144. package/dist/solution/UnifiedBookingSales/types.d.ts +0 -143
  145. package/dist/solution/UnifiedBookingSales/types.js +0 -11
  146. package/lib/modules/Holder/index.d.ts +0 -48
  147. package/lib/modules/Holder/index.js +0 -402
  148. package/lib/modules/Holder/types.d.ts +0 -123
  149. package/lib/modules/Holder/types.js +0 -17
  150. package/lib/modules/Holder/utils.d.ts +0 -13
  151. package/lib/modules/Holder/utils.js +0 -71
  152. package/lib/modules/ResourcePlanner/index.d.ts +0 -24
  153. package/lib/modules/ResourcePlanner/index.js +0 -148
  154. package/lib/modules/ResourcePlanner/planner.d.ts +0 -14
  155. package/lib/modules/ResourcePlanner/planner.js +0 -933
  156. package/lib/modules/ResourcePlanner/types.d.ts +0 -227
  157. package/lib/modules/ResourcePlanner/types.js +0 -17
  158. package/lib/solution/UnifiedBookingSales/index.d.ts +0 -183
  159. package/lib/solution/UnifiedBookingSales/index.js +0 -1084
  160. package/lib/solution/UnifiedBookingSales/types.d.ts +0 -143
  161. package/lib/solution/UnifiedBookingSales/types.js +0 -33
@@ -134,9 +134,11 @@ function resolveMainProductPrice(product, fallback) {
134
134
  }
135
135
  function mapOrderBundleToOtherBundle(bundle) {
136
136
  return bundle.map(function (item) {
137
- var _ref7, _item$original_price;
137
+ var _ref7, _ref8, _item$original_price;
138
138
  return _objectSpread(_objectSpread({}, item), {}, {
139
- original_price: (_ref7 = (_item$original_price = item.original_price) !== null && _item$original_price !== void 0 ? _item$original_price : item.bundle_selling_price) !== null && _ref7 !== void 0 ? _ref7 : item.price
139
+ // 后端历史订单可能没有 original_price;此时 price 是折前毛价,
140
+ // bundle_selling_price 已包含折扣,不能把它当成编辑时的新原价。
141
+ original_price: (_ref7 = (_ref8 = (_item$original_price = item.original_price) !== null && _item$original_price !== void 0 ? _item$original_price : item.product_price) !== null && _ref8 !== void 0 ? _ref8 : item.price) !== null && _ref7 !== void 0 ? _ref7 : item.bundle_selling_price
140
142
  });
141
143
  });
142
144
  }
@@ -167,10 +169,10 @@ function synthesizeProductResourceFromBooking(booking) {
167
169
  });
168
170
  if (relationIdsByForm.size === 0) return undefined;
169
171
  return {
170
- resources: Array.from(relationIdsByForm.entries()).map(function (_ref8) {
171
- var _ref9 = _slicedToArray(_ref8, 2),
172
- formId = _ref9[0],
173
- relationIds = _ref9[1];
172
+ resources: Array.from(relationIdsByForm.entries()).map(function (_ref9) {
173
+ var _ref10 = _slicedToArray(_ref9, 2),
174
+ formId = _ref10[0],
175
+ relationIds = _ref10[1];
174
176
  return {
175
177
  id: formId,
176
178
  status: 1,
@@ -190,7 +192,7 @@ function synthesizeProductResourceFromBooking(booking) {
190
192
  * 调用方须传入与该行关联的 booking(通常 bookings[].product_uid === product.metadata.unique_identification_number)。
191
193
  */
192
194
  export function buildCacheItemFromOrderLine(input) {
193
- var _product$product_id, _product$selling_pric, _product$original_pri, _booking$metadata$hol, _booking$metadata2, _product$product_vari, _product$num, _ref10, _product$note, _booking$detail2, _product$metadata, _product$metadata2, _ref11, _extension_type, _booking$product2, _booking$product3, _price, _product$product_sku, _product$order_detail, _ref12, _booking$id;
195
+ var _product$product_id, _product$selling_pric, _product$original_pri, _booking$metadata$hol, _booking$metadata2, _product$product_vari, _product$num, _ref11, _product$note, _booking$detail2, _product$metadata, _product$metadata2, _ref12, _extension_type, _booking$product2, _booking$product3, _price, _product$product_sku, _product$order_detail, _ref13, _booking$id;
194
196
  var product = input.product,
195
197
  booking = input.booking,
196
198
  sourceProduct = input.sourceProduct;
@@ -225,7 +227,7 @@ export function buildCacheItemFromOrderLine(input) {
225
227
  quantity: (_product$num = product.num) !== null && _product$num !== void 0 ? _product$num : 1,
226
228
  product_name: productTitle,
227
229
  product_cover: productCover,
228
- note: (_ref10 = (_product$note = product.note) !== null && _product$note !== void 0 ? _product$note : booking === null || booking === void 0 || (_booking$detail2 = booking.detail) === null || _booking$detail2 === void 0 ? void 0 : _booking$detail2.note) !== null && _ref10 !== void 0 ? _ref10 : '',
230
+ note: (_ref11 = (_product$note = product.note) !== null && _product$note !== void 0 ? _product$note : booking === null || booking === void 0 || (_booking$detail2 = booking.detail) === null || _booking$detail2 === void 0 ? void 0 : _booking$detail2.note) !== null && _ref11 !== void 0 ? _ref11 : '',
229
231
  price: mainProductPrice,
230
232
  total: selling,
231
233
  origin_total: original,
@@ -260,7 +262,7 @@ export function buildCacheItemFromOrderLine(input) {
260
262
  var base = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, sourceProduct || {}), {}, {
261
263
  id: resolvedId,
262
264
  product_id: resolvedId,
263
- extension_type: (_ref11 = (_extension_type = sourceProduct === null || sourceProduct === void 0 ? void 0 : sourceProduct.extension_type) !== null && _extension_type !== void 0 ? _extension_type : booking === null || booking === void 0 || (_booking$product2 = booking.product) === null || _booking$product2 === void 0 ? void 0 : _booking$product2.extension_type) !== null && _ref11 !== void 0 ? _ref11 : sourceProduct === null || sourceProduct === void 0 ? void 0 : sourceProduct.extension_type,
265
+ extension_type: (_ref12 = (_extension_type = sourceProduct === null || sourceProduct === void 0 ? void 0 : sourceProduct.extension_type) !== null && _extension_type !== void 0 ? _extension_type : booking === null || booking === void 0 || (_booking$product2 = booking.product) === null || _booking$product2 === void 0 ? void 0 : _booking$product2.extension_type) !== null && _ref12 !== void 0 ? _ref12 : sourceProduct === null || sourceProduct === void 0 ? void 0 : sourceProduct.extension_type,
264
266
  title: productTitle || (sourceProduct === null || sourceProduct === void 0 ? void 0 : sourceProduct.title) || (booking === null || booking === void 0 || (_booking$product3 = booking.product) === null || _booking$product3 === void 0 ? void 0 : _booking$product3.title),
265
267
  price: (_price = sourceProduct === null || sourceProduct === void 0 ? void 0 : sourceProduct.price) !== null && _price !== void 0 ? _price : selling,
266
268
  selling_price: product.selling_price,
@@ -274,7 +276,7 @@ export function buildCacheItemFromOrderLine(input) {
274
276
  new: 0,
275
277
  autoClose: false,
276
278
  order_detail_id: (_product$order_detail = product.order_detail_id) !== null && _product$order_detail !== void 0 ? _product$order_detail : null,
277
- booking_id: (_ref12 = (_booking$id = booking.id) !== null && _booking$id !== void 0 ? _booking$id : booking.booking_id) !== null && _ref12 !== void 0 ? _ref12 : 0
279
+ booking_id: (_ref13 = (_booking$id = booking.id) !== null && _booking$id !== void 0 ? _booking$id : booking.booking_id) !== null && _ref13 !== void 0 ? _ref13 : 0
278
280
  });
279
281
  if ((sourceProduct === null || sourceProduct === void 0 ? void 0 : sourceProduct.capacity) !== undefined) {
280
282
  base.capacity = sourceProduct.capacity;
@@ -32,7 +32,6 @@ export declare class DiscountModule extends BaseModule implements Module, Discou
32
32
  customerId?: number;
33
33
  orderId?: number;
34
34
  }): Promise<DiscountWithReason>;
35
- batchSearchByProductIds(productIds: number[]): Promise<any>;
36
35
  filterEnabledDiscountList(discountList: Discount[]): Discount[];
37
36
  private checkUsageCreditsLimit;
38
37
  filterEnabledDiscountListWithReason(discountList: Discount[]): DiscountWithReason;
@@ -244,35 +244,6 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
244
244
  }
245
245
  return batchSearch;
246
246
  }()
247
- }, {
248
- key: "batchSearchByProductIds",
249
- value: function () {
250
- var _batchSearchByProductIds = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(productIds) {
251
- var result;
252
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
253
- while (1) switch (_context6.prev = _context6.next) {
254
- case 0:
255
- _context6.next = 2;
256
- return this.request.get("/machinecode/batch-search", {
257
- ids: productIds,
258
- translate_flag: 1,
259
- tags: ['good_pass', 'product_discount_card'],
260
- relation_product: 1
261
- });
262
- case 2:
263
- result = _context6.sent;
264
- return _context6.abrupt("return", (result === null || result === void 0 ? void 0 : result.data) || []);
265
- case 4:
266
- case "end":
267
- return _context6.stop();
268
- }
269
- }, _callee6, this);
270
- }));
271
- function batchSearchByProductIds(_x8) {
272
- return _batchSearchByProductIds.apply(this, arguments);
273
- }
274
- return batchSearchByProductIds;
275
- }()
276
247
  }, {
277
248
  key: "filterEnabledDiscountList",
278
249
  value: function filterEnabledDiscountList(discountList) {
@@ -459,22 +430,22 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
459
430
  }, {
460
431
  key: "destroy",
461
432
  value: function () {
462
- var _destroy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
463
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
464
- while (1) switch (_context7.prev = _context7.next) {
433
+ var _destroy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
434
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
435
+ while (1) switch (_context6.prev = _context6.next) {
465
436
  case 0:
466
437
  this.store.discountList = [];
467
438
  this.core.effects.offByModuleDestroy(this.name);
468
- _context7.next = 4;
439
+ _context6.next = 4;
469
440
  return this.core.effects.emit("".concat(this.name, ":onDestroy"), {});
470
441
  case 4:
471
442
  console.log('[Discount] 已销毁');
472
443
  _get(_getPrototypeOf(DiscountModule.prototype), "destroy", this).call(this);
473
444
  case 6:
474
445
  case "end":
475
- return _context7.stop();
446
+ return _context6.stop();
476
447
  }
477
- }, _callee7, this);
448
+ }, _callee6, this);
478
449
  }));
479
450
  function destroy() {
480
451
  return _destroy.apply(this, arguments);
@@ -484,18 +455,18 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
484
455
  }, {
485
456
  key: "clear",
486
457
  value: function () {
487
- var _clear = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
488
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
489
- while (1) switch (_context8.prev = _context8.next) {
458
+ var _clear = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
459
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
460
+ while (1) switch (_context7.prev = _context7.next) {
490
461
  case 0:
491
462
  this.store.discountList = [];
492
463
  this.store.originalDiscountList = [];
493
464
  console.log('[Discount] clear');
494
465
  case 3:
495
466
  case "end":
496
- return _context8.stop();
467
+ return _context7.stop();
497
468
  }
498
- }, _callee8, this);
469
+ }, _callee7, this);
499
470
  }));
500
471
  function clear() {
501
472
  return _clear.apply(this, arguments);
@@ -157,7 +157,6 @@ export interface Discount {
157
157
  num?: number;
158
158
  start_date?: string;
159
159
  start_time?: string;
160
- discount_rule_uncheck_flag?: boolean;
161
160
  usageLimitFailKey?: string | null;
162
161
  unified_available_status?: number | undefined | null;
163
162
  }
@@ -105,12 +105,12 @@ export var OpenDataModule = /*#__PURE__*/function (_BaseModule) {
105
105
  key: "fetchOpenData",
106
106
  value: function () {
107
107
  var _fetchOpenData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
108
- var _this$appPlugin, _this$appPlugin$getDa;
108
+ var _this$appPlugin$getDa, _this$appPlugin;
109
109
  var getData, shopId, tenantId, headers, response, data;
110
110
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
111
111
  while (1) switch (_context2.prev = _context2.next) {
112
112
  case 0:
113
- getData = (_this$appPlugin = this.appPlugin) === null || _this$appPlugin === void 0 || (_this$appPlugin$getDa = _this$appPlugin.getData) === null || _this$appPlugin$getDa === void 0 ? void 0 : _this$appPlugin$getDa.call(_this$appPlugin);
113
+ getData = (_this$appPlugin$getDa = (_this$appPlugin = this.appPlugin).getData) === null || _this$appPlugin$getDa === void 0 ? void 0 : _this$appPlugin$getDa.call(_this$appPlugin);
114
114
  shopId = getData === null || getData === void 0 ? void 0 : getData('shop_id');
115
115
  if (shopId) {
116
116
  _context2.next = 4;
@@ -1,9 +1,9 @@
1
1
  import { Module, PisellCore, ModuleOptions } from '../../types';
2
2
  import { BaseModule } from '../BaseModule';
3
- import { OrderModuleAPI, CommitOrderParams, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductQuantityParams, CancelOrderParams, ChangeBookingStatusParams, CheckoutOrderParams } from './types';
3
+ import { OrderModuleAPI, CommitOrderParams, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductQuantityParams, CheckoutOrderParams, CancelOrderParams, ChangeBookingStatusParams } from './types';
4
4
  import { CartItem } from '../Cart/types';
5
5
  import { type SubmitPayloadEnhancer } from './utils';
6
- import type { OrderAmountSnapshot, AddProductBookingInput, OrderIdentitySnapshot, OrderPaymentSource, OrderSnapshot, OrderSyncState, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, SubmitSalesOrderParams, OrderProduct, OrderProductIdentity, OrderSummary, OrderTempOrder, OrderPaymentData, OrderPaymentUpdateOptions, OrderPaymentUpdateResult, SendCustomerPayLinkParams, UpdateTempOrderCustomerInput, OrderCustomerPatch, OrderCustomerView, ReplaceTempOrderOptions, OrderPromotionEvaluator, OrderGiftSelectResolver, OrderUnfulfilledPromotion, OrderLastGiftActions } from './types';
6
+ import type { OrderAmountSnapshot, AddProductBookingInput, AddProductToOrderOptions, OrderIdentitySnapshot, OrderPaymentSource, OrderSnapshot, OrderSyncState, SyncPaymentsToOrderParams, SyncPaymentsToOrderResult, SubmitSalesOrderParams, OrderProduct, OrderProductIdentity, OrderSummary, OrderTempOrder, OrderPaymentData, OrderPaymentUpdateOptions, OrderPaymentUpdateResult, SendCustomerPayLinkParams, UpdateTempOrderCustomerInput, OrderCustomerPatch, OrderCustomerView, ReplaceTempOrderOptions, OrderPromotionEvaluator, OrderGiftSelectResolver, OrderUnfulfilledPromotion, OrderLastGiftActions, RemoveProductsFromOrderOptions } from './types';
7
7
  import type { ICustomer } from '../AccountList/types';
8
8
  import type { Discount } from '../Discount/types';
9
9
  import { UnavailableReason } from '../Rules/types';
@@ -147,7 +147,6 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
147
147
  isTempOrderPersistEnabled(): boolean;
148
148
  /** @deprecated OrderModule 不再负责 tempOrder localStorage 持久化;草稿保存请使用 IndexedDB saveDraft。 */
149
149
  persistTempOrder(): void;
150
- notifyTempOrderChanged(): void;
151
150
  private createDefaultTempOrderInstance;
152
151
  private createExternalSaleNumber;
153
152
  private ensureExternalSaleNumber;
@@ -385,7 +384,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
385
384
  * await order.addProductToOrder({ product_id: 1, num: 3 }, { start_time: '10:00' });
386
385
  * // → tempOrder.products 新增 3 行,每行 num=1,bookings 3 条
387
386
  */
388
- addProductToOrder(product: Partial<OrderProduct> & OrderProductIdentity, booking?: AddProductBookingInput): Promise<OrderProduct[]>;
387
+ addProductToOrder(product: Partial<OrderProduct> & OrderProductIdentity, booking?: AddProductBookingInput, options?: AddProductToOrderOptions): Promise<OrderProduct[]>;
389
388
  /**
390
389
  * 批量添加商品行,所有行追加完成后只触发一次促销、折扣、summary 重算与持久化。
391
390
  *
@@ -423,8 +422,8 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
423
422
  * @example
424
423
  * await order.removeProductsFromOrder([identityA, identityB]);
425
424
  */
426
- removeProductsFromOrder(identities: OrderProductIdentity[]): Promise<OrderProduct[]>;
427
- removeProductFromOrder(identity: OrderProductIdentity): Promise<OrderProduct[]>;
425
+ removeProductsFromOrder(identities: OrderProductIdentity[], options?: RemoveProductsFromOrderOptions): Promise<OrderProduct[]>;
426
+ removeProductFromOrder(identity: OrderProductIdentity, options?: RemoveProductsFromOrderOptions): Promise<OrderProduct[]>;
428
427
  /**
429
428
  * 仅清空购物车行(products / bookings),不重置整单。
430
429
  * 用于「仅清空商品」;客户、备注、支付等协议字段保持不变。
@@ -487,7 +486,7 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
487
486
  generateIdempotencyToken(): string;
488
487
  syncPaymentsToOrder<T = any>(params: SyncPaymentsToOrderParams): Promise<SyncPaymentsToOrderResult<T>>;
489
488
  createOrder(params: CommitOrderParams['query']): {
490
- type: "virtual" | "appointment_booking";
489
+ type: "appointment_booking" | "virtual";
491
490
  platform: string;
492
491
  sales_channel: string;
493
492
  order_sales_channel: string;
@@ -497,7 +496,6 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
497
496
  is_deposit: number;
498
497
  relation_products: any[];
499
498
  relation_forms: any[];
500
- business_code: string | undefined;
501
499
  };
502
500
  checkBeforeSubmitOrder(params: {
503
501
  cartItems: CartItem[];
@@ -563,4 +561,4 @@ export declare class OrderModule extends BaseModule implements Module, OrderModu
563
561
  getOrderInfo(order_id: number): Promise<any>;
564
562
  getVouchers(): any[];
565
563
  }
566
- export type { UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductQuantityParams, } from './types';
564
+ export type { AddProductToOrderOptions, RemoveProductsFromOrderOptions, UpdateOrderBookingParams, UpdateOrderProductParams, UpdateOrderProductQuantityParams, } from './types';