@pisell/pisellos 2.3.62 → 2.3.64

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 (56) hide show
  1. package/dist/core/index.d.ts +0 -7
  2. package/dist/core/index.js +65 -109
  3. package/dist/model/strategy/adapter/walletPass/evaluator.js +0 -1
  4. package/dist/model/strategy/adapter/walletPass/utils.js +0 -2
  5. package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +7 -3
  6. package/dist/modules/Customer/index.d.ts +4 -0
  7. package/dist/modules/Customer/index.js +91 -59
  8. package/dist/modules/Customer/types.d.ts +2 -0
  9. package/dist/modules/Order/index.js +4 -1
  10. package/dist/modules/Order/utils.js +36 -30
  11. package/dist/modules/Payment/walletpass.js +4 -5
  12. package/dist/modules/Quotation/index.d.ts +0 -6
  13. package/dist/modules/Quotation/index.js +19 -75
  14. package/dist/plugins/request.d.ts +0 -1
  15. package/dist/server/index.d.ts +2 -6
  16. package/dist/server/index.js +92 -133
  17. package/dist/server/modules/floor-plan/index.d.ts +0 -4
  18. package/dist/server/modules/floor-plan/index.js +98 -240
  19. package/dist/server/modules/menu/index.js +23 -48
  20. package/dist/server/modules/order/index.d.ts +8 -12
  21. package/dist/server/modules/order/index.js +348 -342
  22. package/dist/server/modules/products/index.d.ts +2 -8
  23. package/dist/server/modules/products/index.js +75 -167
  24. package/dist/server/modules/resource/index.js +13 -21
  25. package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +6 -3
  26. package/dist/solution/BookingTicket/index.d.ts +2 -0
  27. package/dist/solution/BookingTicket/index.js +34 -10
  28. package/lib/core/index.d.ts +0 -7
  29. package/lib/core/index.js +2 -20
  30. package/lib/model/strategy/adapter/promotion/index.js +0 -51
  31. package/lib/model/strategy/adapter/walletPass/evaluator.js +0 -1
  32. package/lib/model/strategy/adapter/walletPass/utils.js +0 -1
  33. package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +3 -0
  34. package/lib/modules/Customer/index.d.ts +4 -0
  35. package/lib/modules/Customer/index.js +11 -0
  36. package/lib/modules/Customer/types.d.ts +2 -0
  37. package/lib/modules/Order/index.js +3 -2
  38. package/lib/modules/Order/utils.js +3 -0
  39. package/lib/modules/Payment/walletpass.js +0 -1
  40. package/lib/modules/Quotation/index.d.ts +0 -6
  41. package/lib/modules/Quotation/index.js +5 -49
  42. package/lib/plugins/request.d.ts +0 -1
  43. package/lib/server/index.d.ts +2 -6
  44. package/lib/server/index.js +12 -34
  45. package/lib/server/modules/floor-plan/index.d.ts +0 -4
  46. package/lib/server/modules/floor-plan/index.js +6 -54
  47. package/lib/server/modules/menu/index.js +5 -31
  48. package/lib/server/modules/order/index.d.ts +8 -12
  49. package/lib/server/modules/order/index.js +94 -145
  50. package/lib/server/modules/products/index.d.ts +2 -8
  51. package/lib/server/modules/products/index.js +24 -97
  52. package/lib/server/modules/resource/index.js +2 -7
  53. package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +1 -0
  54. package/lib/solution/BookingTicket/index.d.ts +2 -0
  55. package/lib/solution/BookingTicket/index.js +18 -2
  56. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
1
  var _excluded = ["skip", "num", "search"],
2
2
  _excluded2 = ["skip", "num"];
3
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
3
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
5
4
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
5
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
7
6
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
8
7
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
9
8
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
10
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
11
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
12
12
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
@@ -322,6 +322,38 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
322
322
  }
323
323
  return queryCustomerList;
324
324
  }()
325
+ /**
326
+ * 查询单个客户详情,不写入 customerList / pagination 状态。
327
+ */
328
+ )
329
+ }, {
330
+ key: "queryCustomerDetail",
331
+ value: (function () {
332
+ var _queryCustomerDetail = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(id) {
333
+ var _result$data;
334
+ var result, customer;
335
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
336
+ while (1) switch (_context5.prev = _context5.next) {
337
+ case 0:
338
+ _context5.next = 2;
339
+ return this.request.get("/customer/info/".concat(id), {
340
+ with_trashed: 1
341
+ });
342
+ case 2:
343
+ result = _context5.sent;
344
+ customer = (result === null || result === void 0 || (_result$data = result.data) === null || _result$data === void 0 ? void 0 : _result$data.customer) || (result === null || result === void 0 ? void 0 : result.data) || (result === null || result === void 0 ? void 0 : result.customer) || null;
345
+ return _context5.abrupt("return", customer && _typeof(customer) === 'object' ? customer : null);
346
+ case 5:
347
+ case "end":
348
+ return _context5.stop();
349
+ }
350
+ }, _callee5, this);
351
+ }));
352
+ function queryCustomerDetail(_x5) {
353
+ return _queryCustomerDetail.apply(this, arguments);
354
+ }
355
+ return queryCustomerDetail;
356
+ }()
325
357
  /**
326
358
  * 获取客户列表
327
359
  * @param params 查询参数
@@ -331,7 +363,7 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
331
363
  }, {
332
364
  key: "getCustomerList",
333
365
  value: (function () {
334
- var _getCustomerList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
366
+ var _getCustomerList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
335
367
  var params,
336
368
  _yield$this$fetchCust2,
337
369
  customerList,
@@ -342,18 +374,18 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
342
374
  num,
343
375
  searchParams,
344
376
  response,
345
- _args5 = arguments;
346
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
347
- while (1) switch (_context5.prev = _context5.next) {
377
+ _args6 = arguments;
378
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
379
+ while (1) switch (_context6.prev = _context6.next) {
348
380
  case 0:
349
- params = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
350
- _context5.prev = 1;
381
+ params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
382
+ _context6.prev = 1;
351
383
  this.store.loading = true;
352
384
  this.store.error = null;
353
- _context5.next = 6;
385
+ _context6.next = 6;
354
386
  return this.fetchCustomerListData(params);
355
387
  case 6:
356
- _yield$this$fetchCust2 = _context5.sent;
388
+ _yield$this$fetchCust2 = _context6.sent;
357
389
  customerList = _yield$this$fetchCust2.customerList;
358
390
  total = _yield$this$fetchCust2.total;
359
391
  page = _yield$this$fetchCust2.page;
@@ -386,27 +418,27 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
386
418
  page: page,
387
419
  pageSize: pageSize
388
420
  };
389
- return _context5.abrupt("return", response);
421
+ return _context6.abrupt("return", response);
390
422
  case 23:
391
- _context5.prev = 23;
392
- _context5.t0 = _context5["catch"](1);
393
- _context5.next = 27;
394
- return this.handleCustomerListError(_context5.t0, 'fetch customer list');
423
+ _context6.prev = 23;
424
+ _context6.t0 = _context6["catch"](1);
425
+ _context6.next = 27;
426
+ return this.handleCustomerListError(_context6.t0, 'fetch customer list');
395
427
  case 27:
396
- throw _context5.t0;
428
+ throw _context6.t0;
397
429
  case 28:
398
- _context5.prev = 28;
430
+ _context6.prev = 28;
399
431
  this.store.loading = false;
400
432
  this.storeChange();
401
- _context5.next = 33;
433
+ _context6.next = 33;
402
434
  return this.core.effects.emit("".concat(this.name, ":onCustomerListUpdate"), this.store);
403
435
  case 33:
404
- return _context5.finish(28);
436
+ return _context6.finish(28);
405
437
  case 34:
406
438
  case "end":
407
- return _context5.stop();
439
+ return _context6.stop();
408
440
  }
409
- }, _callee5, this, [[1, 23, 28, 34]]);
441
+ }, _callee6, this, [[1, 23, 28, 34]]);
410
442
  }));
411
443
  function getCustomerList() {
412
444
  return _getCustomerList.apply(this, arguments);
@@ -583,10 +615,10 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
583
615
  }, {
584
616
  key: "changeCustomerPage",
585
617
  value: (function () {
586
- var _changeCustomerPage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(page, pageSize) {
618
+ var _changeCustomerPage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(page, pageSize) {
587
619
  var targetPageSize, skip, num;
588
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
589
- while (1) switch (_context6.prev = _context6.next) {
620
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
621
+ while (1) switch (_context7.prev = _context7.next) {
590
622
  case 0:
591
623
  targetPageSize = pageSize || this.store.pageSize; // 先更新分页状态
592
624
  this.setPaginationInfo(page, targetPageSize);
@@ -594,20 +626,20 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
594
626
  // skip直接使用page,num使用pageSize
595
627
  skip = page;
596
628
  num = targetPageSize; // 自动调用获取客户列表,使用存储的搜索条件
597
- _context6.next = 6;
629
+ _context7.next = 6;
598
630
  return this.getCustomerList(_objectSpread({
599
631
  skip: skip,
600
632
  num: num
601
633
  }, this.store.searchParams));
602
634
  case 6:
603
- return _context6.abrupt("return", _context6.sent);
635
+ return _context7.abrupt("return", _context7.sent);
604
636
  case 7:
605
637
  case "end":
606
- return _context6.stop();
638
+ return _context7.stop();
607
639
  }
608
- }, _callee6, this);
640
+ }, _callee7, this);
609
641
  }));
610
- function changeCustomerPage(_x5, _x6) {
642
+ function changeCustomerPage(_x6, _x7) {
611
643
  return _changeCustomerPage.apply(this, arguments);
612
644
  }
613
645
  return changeCustomerPage;
@@ -620,16 +652,16 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
620
652
  }, {
621
653
  key: "loadMoreCustomers",
622
654
  value: (function () {
623
- var _loadMoreCustomers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
655
+ var _loadMoreCustomers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
624
656
  var nextPage, loadMoreParams, _yield$this$fetchCust3, newCustomers, total, page, pageSize, updatedCustomerList, response;
625
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
626
- while (1) switch (_context7.prev = _context7.next) {
657
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
658
+ while (1) switch (_context8.prev = _context8.next) {
627
659
  case 0:
628
660
  if (!(!this.store.hasMore || this.store.loadingMore)) {
629
- _context7.next = 2;
661
+ _context8.next = 2;
630
662
  break;
631
663
  }
632
- return _context7.abrupt("return", {
664
+ return _context8.abrupt("return", {
633
665
  list: [],
634
666
  total: this.store.total,
635
667
  page: this.store.currentPage,
@@ -638,17 +670,17 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
638
670
  case 2:
639
671
  // 计算下一页
640
672
  nextPage = this.store.currentPage + 1;
641
- _context7.prev = 3;
673
+ _context8.prev = 3;
642
674
  this.store.loadingMore = true;
643
675
  this.store.error = null;
644
676
  loadMoreParams = _objectSpread({
645
677
  skip: nextPage,
646
678
  num: this.store.pageSize
647
679
  }, this.store.searchParams); // 使用公共方法获取数据,传入存储的搜索条件
648
- _context7.next = 9;
680
+ _context8.next = 9;
649
681
  return this.fetchCustomerListData(loadMoreParams);
650
682
  case 9:
651
- _yield$this$fetchCust3 = _context7.sent;
683
+ _yield$this$fetchCust3 = _context8.sent;
652
684
  newCustomers = _yield$this$fetchCust3.customerList;
653
685
  total = _yield$this$fetchCust3.total;
654
686
  page = _yield$this$fetchCust3.page;
@@ -661,7 +693,7 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
661
693
  this.store.hasMore = page * pageSize < total;
662
694
 
663
695
  // 触发滚动加载特定事件
664
- _context7.next = 21;
696
+ _context8.next = 21;
665
697
  return this.core.effects.emit("".concat(this.name, ":onScrollLoadMore"), {
666
698
  newCustomers: newCustomers,
667
699
  allCustomers: this.store.customerList,
@@ -683,27 +715,27 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
683
715
  page: page,
684
716
  pageSize: pageSize
685
717
  };
686
- return _context7.abrupt("return", response);
718
+ return _context8.abrupt("return", response);
687
719
  case 26:
688
- _context7.prev = 26;
689
- _context7.t0 = _context7["catch"](3);
690
- _context7.next = 30;
691
- return this.handleCustomerListError(_context7.t0, 'load more customers');
720
+ _context8.prev = 26;
721
+ _context8.t0 = _context8["catch"](3);
722
+ _context8.next = 30;
723
+ return this.handleCustomerListError(_context8.t0, 'load more customers');
692
724
  case 30:
693
- throw _context7.t0;
725
+ throw _context8.t0;
694
726
  case 31:
695
- _context7.prev = 31;
727
+ _context8.prev = 31;
696
728
  this.store.loadingMore = false;
697
729
  this.storeChange();
698
- _context7.next = 36;
730
+ _context8.next = 36;
699
731
  return this.core.effects.emit("".concat(this.name, ":onCustomerListUpdate"), this.store);
700
732
  case 36:
701
- return _context7.finish(31);
733
+ return _context8.finish(31);
702
734
  case 37:
703
735
  case "end":
704
- return _context7.stop();
736
+ return _context8.stop();
705
737
  }
706
- }, _callee7, this, [[3, 26, 31, 37]]);
738
+ }, _callee8, this, [[3, 26, 31, 37]]);
707
739
  }));
708
740
  function loadMoreCustomers() {
709
741
  return _loadMoreCustomers.apply(this, arguments);
@@ -719,15 +751,15 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
719
751
  }, {
720
752
  key: "resetAndLoadCustomers",
721
753
  value: (function () {
722
- var _resetAndLoadCustomers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
754
+ var _resetAndLoadCustomers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
723
755
  var params,
724
756
  resetParams,
725
757
  response,
726
- _args8 = arguments;
727
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
728
- while (1) switch (_context8.prev = _context8.next) {
758
+ _args9 = arguments;
759
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
760
+ while (1) switch (_context9.prev = _context9.next) {
729
761
  case 0:
730
- params = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
762
+ params = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
731
763
  // 重置状态
732
764
  this.store.customerList = [];
733
765
  this.store.currentPage = 1;
@@ -739,23 +771,23 @@ export var CustomerModule = /*#__PURE__*/function (_BaseModule) {
739
771
  skip: 1,
740
772
  num: params.num || this.store.pageSize
741
773
  }); // 调用普通的获取列表方法
742
- _context8.next = 8;
774
+ _context9.next = 8;
743
775
  return this.getCustomerList(resetParams);
744
776
  case 8:
745
- response = _context8.sent;
746
- _context8.next = 11;
777
+ response = _context9.sent;
778
+ _context9.next = 11;
747
779
  return this.core.effects.emit("".concat(this.name, ":onScrollLoadComplete"), {
748
780
  customers: this.store.customerList,
749
781
  total: this.store.total,
750
782
  hasMore: this.store.hasMore
751
783
  });
752
784
  case 11:
753
- return _context8.abrupt("return", response);
785
+ return _context9.abrupt("return", response);
754
786
  case 12:
755
787
  case "end":
756
- return _context8.stop();
788
+ return _context9.stop();
757
789
  }
758
- }, _callee8, this);
790
+ }, _callee9, this);
759
791
  }));
760
792
  function resetAndLoadCustomers() {
761
793
  return _resetAndLoadCustomers.apply(this, arguments);
@@ -112,6 +112,8 @@ export interface CustomerModuleAPI {
112
112
  getCustomerList: (params?: ShopGetCustomerListParams) => Promise<ICustomerListResponse>;
113
113
  /** 查询客户列表但不更新列表分页状态 */
114
114
  queryCustomerList: (params?: ShopGetCustomerListParams) => Promise<ICustomerListResponse>;
115
+ /** 查询单个客户详情但不修改客户列表状态 */
116
+ queryCustomerDetail: (id: string | number) => Promise<ShopCustomer | null>;
115
117
  /** 设置客户列表 */
116
118
  setCustomerList: (customers: ShopCustomer[], total?: number) => void;
117
119
  /** 设置当前选择的客户 */
@@ -6358,7 +6358,10 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
6358
6358
  });
6359
6359
  delete row["product_".concat('option', "_item")];
6360
6360
  if (!Array.isArray(row.product_bundle)) row.product_bundle = [];
6361
- if (!row.metadata || _typeof(row.metadata) !== 'object') row.metadata = {};
6361
+ row.metadata = row.metadata && _typeof(row.metadata) === 'object' ? _objectSpread({}, row.metadata) : {};
6362
+ // bundle_edit 只描述当前编辑会话中的套餐修改状态,不能从本地缓存或详情响应带入新会话。
6363
+ delete row.bundle_edit;
6364
+ delete row.metadata.bundle_edit;
6362
6365
  if (row.booking_uid && !row.metadata.booking_uid) {
6363
6366
  row.metadata.booking_uid = row.booking_uid;
6364
6367
  }
@@ -910,7 +910,7 @@ function formatSubmitBundleItems(bundle) {
910
910
  * 本函数不再改造价格字段形状,仅做字段/metadata 裁剪。
911
911
  */
912
912
  function normalizeSubmitProduct(product) {
913
- var _rawMetadata$product_, _submitProduct$produc, _submitProduct$paymen;
913
+ var _ref29, _submitProduct$bundle, _rawMetadata$product_, _submitProduct$produc, _submitProduct$paymen;
914
914
  var _ref28 = product,
915
915
  _runtimeUid = _ref28.unique_identification_number,
916
916
  submitProduct = _objectWithoutProperties(_ref28, _excluded2);
@@ -925,6 +925,10 @@ function normalizeSubmitProduct(product) {
925
925
  delete productRest["product_".concat('option', "_item")];
926
926
  var rawMetadata = submitProduct.metadata || {};
927
927
  var bookingUid = rawMetadata.booking_uid;
928
+ // 兼容历史 BigSale 编辑链路:bundle_edit 曾被写入 metadata,
929
+ // 出站时需提升到商品顶层;套餐未编辑时也必须显式提交 0。
930
+ var hasProductBundle = Array.isArray(submitProduct.product_bundle) && submitProduct.product_bundle.length > 0;
931
+ var bundleEdit = (_ref29 = (_submitProduct$bundle = submitProduct.bundle_edit) !== null && _submitProduct$bundle !== void 0 ? _submitProduct$bundle : rawMetadata.bundle_edit) !== null && _ref29 !== void 0 ? _ref29 : hasProductBundle ? 0 : undefined;
928
932
  var cleanMetadata = {};
929
933
  if (rawMetadata.unique_identification_number) {
930
934
  cleanMetadata.unique_identification_number = rawMetadata.unique_identification_number;
@@ -949,8 +953,10 @@ function normalizeSubmitProduct(product) {
949
953
  var productSku = _objectSpread(_objectSpread({}, submitProduct.product_sku && _typeof(submitProduct.product_sku) === 'object' ? submitProduct.product_sku : {}), {}, {
950
954
  option: formatSubmitOptionItems((_submitProduct$produc = submitProduct.product_sku) === null || _submitProduct$produc === void 0 ? void 0 : _submitProduct$produc.option)
951
955
  });
952
- return _objectSpread(_objectSpread(_objectSpread({}, productRest), bookingUid ? {
956
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, productRest), bookingUid ? {
953
957
  booking_uid: bookingUid
958
+ } : {}), bundleEdit !== undefined ? {
959
+ bundle_edit: bundleEdit
954
960
  } : {}), {}, {
955
961
  product_quantity: toBundleNumber(num !== null && num !== void 0 ? num : submitProduct.product_quantity, 1),
956
962
  product_sku: productSku,
@@ -1080,7 +1086,7 @@ export function createDefaultTempOrder(params) {
1080
1086
  };
1081
1087
  }
1082
1088
  export function buildSubmitPayload(params) {
1083
- var _tempOrder$customer_i, _tempOrder$country_ca, _tempOrder$phone, _tempOrder$email, _tempOrder$order_numb, _tempOrder$shop_order, _tempOrder$shop_full_, _ref30, _tempOrder$is_price_i, _tempOrder$is_deposit, _enhancedPayload$summ;
1089
+ var _tempOrder$customer_i, _tempOrder$country_ca, _tempOrder$phone, _tempOrder$email, _tempOrder$order_numb, _tempOrder$shop_order, _tempOrder$shop_full_, _ref31, _tempOrder$is_price_i, _tempOrder$is_deposit, _enhancedPayload$summ;
1084
1090
  var tempOrder = params.tempOrder,
1085
1091
  cacheId = params.cacheId,
1086
1092
  _params$now = params.now,
@@ -1093,26 +1099,26 @@ export function buildSubmitPayload(params) {
1093
1099
  enhance = params.enhance;
1094
1100
  var scheduleDate = tempOrder.schedule_date || tempOrder.created_at || formatDateTime(now);
1095
1101
  var bookingUuid = createUuidV4();
1096
- var _ref29 = tempOrder,
1097
- _extend = _ref29._extend,
1098
- _relationId = _ref29.relation_id,
1099
- _tableFormId = _ref29.table_form_id,
1100
- _resourceId = _ref29.resource_id,
1101
- _summary = _ref29.summary,
1102
- _lastOrderInfo = _ref29.lastOrderInfo,
1103
- _paidAmount = _ref29.paid_amount,
1104
- _shopId = _ref29.shop_id,
1105
- _shopNote = _ref29.shop_note,
1106
- _shopServiceType = _ref29.shop_service_type,
1107
- _startTime = _ref29.start_time,
1108
- _customer = _ref29.customer,
1109
- _discountList = _ref29.discount_list,
1110
- _rootTaxFee = _ref29.tax_fee,
1111
- _totalAmount = _ref29.total_amount,
1112
- _totalRefundAmount = _ref29.total_refund_amount,
1113
- _createDate = _ref29.create_date,
1114
- _holderId = _ref29.holder_id,
1115
- tempOrderRest = _objectWithoutProperties(_ref29, _excluded4);
1102
+ var _ref30 = tempOrder,
1103
+ _extend = _ref30._extend,
1104
+ _relationId = _ref30.relation_id,
1105
+ _tableFormId = _ref30.table_form_id,
1106
+ _resourceId = _ref30.resource_id,
1107
+ _summary = _ref30.summary,
1108
+ _lastOrderInfo = _ref30.lastOrderInfo,
1109
+ _paidAmount = _ref30.paid_amount,
1110
+ _shopId = _ref30.shop_id,
1111
+ _shopNote = _ref30.shop_note,
1112
+ _shopServiceType = _ref30.shop_service_type,
1113
+ _startTime = _ref30.start_time,
1114
+ _customer = _ref30.customer,
1115
+ _discountList = _ref30.discount_list,
1116
+ _rootTaxFee = _ref30.tax_fee,
1117
+ _totalAmount = _ref30.total_amount,
1118
+ _totalRefundAmount = _ref30.total_refund_amount,
1119
+ _createDate = _ref30.create_date,
1120
+ _holderId = _ref30.holder_id,
1121
+ tempOrderRest = _objectWithoutProperties(_ref30, _excluded4);
1116
1122
  var submitType = type !== null && type !== void 0 ? type : tempOrder.type;
1117
1123
  if (!submitType) {
1118
1124
  var _tempOrder$bookings;
@@ -1137,7 +1143,7 @@ export function buildSubmitPayload(params) {
1137
1143
  type: submitType,
1138
1144
  business_code: businessCode !== null && businessCode !== void 0 ? businessCode : tempOrder.business_code,
1139
1145
  sales_channel: tempOrder.sales_channel || 'my_pisel',
1140
- order_sales_channel: (_ref30 = channel !== null && channel !== void 0 ? channel : tempOrder.order_sales_channel) !== null && _ref30 !== void 0 ? _ref30 : 'online_store',
1146
+ order_sales_channel: (_ref31 = channel !== null && channel !== void 0 ? channel : tempOrder.order_sales_channel) !== null && _ref31 !== void 0 ? _ref31 : 'online_store',
1141
1147
  status: tempOrder.status || 'normal',
1142
1148
  payment_status: tempOrder.payment_status || 'payment_processing',
1143
1149
  // shipping_status: tempOrder.shipping_status || 'unfulfilled',
@@ -1163,10 +1169,10 @@ export function buildSubmitPayload(params) {
1163
1169
  // holder: tempOrder.holder || null,
1164
1170
  summary: summary || tempOrder.summary || createEmptySummary(),
1165
1171
  metadata: function () {
1166
- var _ref31 = tempOrder.metadata || {},
1167
- _collectPax = _ref31.collect_pax,
1168
- _tableOccupancyDuration = _ref31.table_occupancy_duration,
1169
- rest = _objectWithoutProperties(_ref31, _excluded5);
1172
+ var _ref32 = tempOrder.metadata || {},
1173
+ _collectPax = _ref32.collect_pax,
1174
+ _tableOccupancyDuration = _ref32.table_occupancy_duration,
1175
+ rest = _objectWithoutProperties(_ref32, _excluded5);
1170
1176
  return _objectSpread({}, rest);
1171
1177
  }(),
1172
1178
  products: (tempOrder.products || []).map(function (product) {
@@ -1374,8 +1380,8 @@ export function getRuntimeProductOrigin(tempOrder, product) {
1374
1380
  return tempOrder._extend.productsByUid[uid].origin;
1375
1381
  }
1376
1382
  var matchedProduct = ((tempOrder === null || tempOrder === void 0 ? void 0 : tempOrder.products) || []).find(function (item) {
1377
- var _ref32, _item$product_id, _ref33, _product$product_id;
1378
- return item === product || getOrderProductLineUid(item) === uid || String((_ref32 = (_item$product_id = item === null || item === void 0 ? void 0 : item.product_id) !== null && _item$product_id !== void 0 ? _item$product_id : item === null || item === void 0 ? void 0 : item.id) !== null && _ref32 !== void 0 ? _ref32 : '') === String((_ref33 = (_product$product_id = product === null || product === void 0 ? void 0 : product.product_id) !== null && _product$product_id !== void 0 ? _product$product_id : product === null || product === void 0 ? void 0 : product.id) !== null && _ref33 !== void 0 ? _ref33 : '');
1383
+ var _ref33, _item$product_id, _ref34, _product$product_id;
1384
+ return item === product || getOrderProductLineUid(item) === uid || String((_ref33 = (_item$product_id = item === null || item === void 0 ? void 0 : item.product_id) !== null && _item$product_id !== void 0 ? _item$product_id : item === null || item === void 0 ? void 0 : item.id) !== null && _ref33 !== void 0 ? _ref33 : '') === String((_ref34 = (_product$product_id = product === null || product === void 0 ? void 0 : product.product_id) !== null && _product$product_id !== void 0 ? _product$product_id : product === null || product === void 0 ? void 0 : product.id) !== null && _ref34 !== void 0 ? _ref34 : '');
1379
1385
  });
1380
1386
  var matchedUid = matchedProduct ? getOrderProductLineUid(matchedProduct) : '';
1381
1387
  return matchedUid ? (tempOrder === null || tempOrder === void 0 || (_tempOrder$_extend3 = tempOrder._extend) === null || _tempOrder$_extend3 === void 0 || (_tempOrder$_extend3 = _tempOrder$_extend3.productsByUid) === null || _tempOrder$_extend3 === void 0 || (_tempOrder$_extend3 = _tempOrder$_extend3[matchedUid]) === null || _tempOrder$_extend3 === void 0 ? void 0 : _tempOrder$_extend3.origin) || null : null;
@@ -620,7 +620,6 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
620
620
  vouchers: allList
621
621
  });
622
622
  recommended = res.recommended, transformList = res.transformList, noApplicableVoucher = res.noApplicableVoucher, recommendedAmount = res.recommendedAmount;
623
- console.log(res, 'resres12');
624
623
  this.walletRecommendList = recommended;
625
624
 
626
625
  // 存储初始化数据到内存中,供 useWalletPass 使用
@@ -640,19 +639,19 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
640
639
  noApplicableVoucher: noApplicableVoucher,
641
640
  products: products || []
642
641
  });
643
- case 20:
644
- _context3.prev = 20;
642
+ case 19:
643
+ _context3.prev = 19;
645
644
  _context3.t0 = _context3["catch"](0);
646
645
  this.paymentModule.logError('[WalletPass] 初始化钱包数据失败', _context3.t0, {
647
646
  customer_id: baseParams.customer_id,
648
647
  order_expect_amount: baseParams.order_expect_amount
649
648
  });
650
649
  throw _context3.t0;
651
- case 24:
650
+ case 23:
652
651
  case "end":
653
652
  return _context3.stop();
654
653
  }
655
- }, _callee3, this, [[0, 20]]);
654
+ }, _callee3, this, [[0, 19]]);
656
655
  }));
657
656
  function initializeWalletDataAsync(_x3) {
658
657
  return _initializeWalletDataAsync.apply(this, arguments);
@@ -9,8 +9,6 @@ export declare class QuotationModule extends BaseModule implements Module {
9
9
  private request;
10
10
  private store;
11
11
  private scheduleResolver?;
12
- private app;
13
- private quotationListUpdatedListener?;
14
12
  constructor(name?: string, version?: string);
15
13
  initialize(core: PisellCore, options: ModuleOptions): Promise<void>;
16
14
  loadQuotations(params?: {
@@ -18,7 +16,6 @@ export declare class QuotationModule extends BaseModule implements Module {
18
16
  customer_id?: number | string;
19
17
  }): Promise<void>;
20
18
  getQuotationList(): QuotationItem[];
21
- setQuotationListUpdatedListener(listener?: () => void): void;
22
19
  getQuotationCustomerScopeInfo(): QuotationCustomerScopeInfo;
23
20
  /**
24
21
  * Look up the quotation price for a specific product (+ optional variant) at a given datetime.
@@ -63,9 +60,6 @@ export declare class QuotationModule extends BaseModule implements Module {
63
60
  customer_id?: number | string;
64
61
  }): Map<string, string | null>;
65
62
  setScheduleResolver(resolver: (id: number) => ScheduleItem | undefined): void;
66
- private applyQuotationResponse;
67
- private notifyQuotationListUpdated;
68
- private getQuotationCacheKeyData;
69
63
  private isQuotationVisibleForCustomer;
70
64
  private hasValidCustomerId;
71
65
  private normalizeCustomerId;