@pisell/private-materials 6.3.177 → 6.3.178

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 (191) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +9 -9
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +1 -1
  9. package/es/businessModel/SalesModel/index.d.ts +1 -0
  10. package/es/components/appointmentBooking/components/Cart/Item/index.js +91 -24
  11. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +24 -20
  12. package/es/components/appointmentBooking/components/Header/index.js +4 -24
  13. package/es/components/appointmentBooking/components/Voucher/index.js +10 -0
  14. package/es/components/appointmentBooking/hooks.d.ts +1 -17
  15. package/es/components/appointmentBooking/hooks.js +54 -128
  16. package/es/components/appointmentBooking/utils.d.ts +1 -0
  17. package/es/components/appointmentBooking/utils.js +54 -33
  18. package/es/components/booking/addons/model.d.ts +1 -10
  19. package/es/components/booking/components/TabProduct/index.d.ts +1 -0
  20. package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  21. package/es/components/booking/deposit/index.d.ts +1 -0
  22. package/es/components/booking/forms/model.d.ts +1 -10
  23. package/es/components/booking/forms/single/index.d.ts +1 -0
  24. package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
  25. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  26. package/es/components/booking/info/date/index.d.ts +1 -0
  27. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  28. package/es/components/booking/info/index.d.ts +1 -0
  29. package/es/components/booking/info/model.d.ts +1 -10
  30. package/es/components/booking/info/notes/index.d.ts +1 -0
  31. package/es/components/booking/info/service/Lists.d.ts +1 -0
  32. package/es/components/booking/info/service/actions/index.d.ts +1 -0
  33. package/es/components/booking/info/service/addService/index.d.ts +1 -0
  34. package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  35. package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
  36. package/es/components/booking/info/service2/Lists.d.ts +1 -0
  37. package/es/components/booking/info2/service/actions/index.d.ts +1 -0
  38. package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
  39. package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
  40. package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
  41. package/es/components/booking/materiels/holder/index.d.ts +1 -0
  42. package/es/components/booking/model.d.ts +1 -9
  43. package/es/components/booking/notes/model.d.ts +1 -10
  44. package/es/components/booking/payments/model.d.ts +1 -10
  45. package/es/components/booking/utils.d.ts +2 -2
  46. package/es/components/eftposPay/aggregatePayment/utils/payment.js +1 -2
  47. package/es/components/eftposPay/amount.d.ts +1 -0
  48. package/es/components/eftposPay/app.d.ts +1 -0
  49. package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  50. package/es/components/eftposPay/device.js +4 -11
  51. package/es/components/eftposPay/hooks.d.ts +1 -1
  52. package/es/components/eftposPay/index.d.ts +1 -0
  53. package/es/components/eftposPay/linkly/index.d.ts +1 -0
  54. package/es/components/eftposPay/pay.d.ts +1 -0
  55. package/es/components/eftposPay/store/index.d.ts +1 -1
  56. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
  57. package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  58. package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  59. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  60. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  61. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  62. package/es/components/eventBooking/components/progressBar/index.d.ts +1 -8
  63. package/es/components/eventBooking/components/progressBar/index.js +10 -30
  64. package/es/components/eventBooking/index.d.ts +1 -0
  65. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  66. package/es/components/pay/toC/model.d.ts +1 -9
  67. package/es/components/pisellCashCounting/hooks.d.ts +1 -0
  68. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  69. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  70. package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
  71. package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
  72. package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
  73. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  74. package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  75. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  76. package/es/components/productExtension/index.d.ts +1 -0
  77. package/es/components/ruleSetting/index.d.ts +1 -0
  78. package/es/components/scanOrder/components/Check/index.js +46 -187
  79. package/es/components/scanOrder/components/Check/index.less +0 -39
  80. package/es/components/scanOrder/components/Content/index.js +72 -189
  81. package/es/components/scanOrder/components/Menu/index.js +5 -11
  82. package/es/components/scanOrder/hooks.js +0 -7
  83. package/es/components/scanOrder/locales.d.ts +0 -75
  84. package/es/components/scanOrder/locales.js +0 -75
  85. package/es/components/schedules/model.d.ts +1 -9
  86. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  87. package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
  88. package/es/components/shoppingCart/index.d.ts +1 -0
  89. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
  90. package/es/components/venueBooking/components/Cart/index.js +159 -46
  91. package/es/components/venueBooking/components/Voucher/index.js +1 -6
  92. package/es/components/venueBooking/context.js +15 -2
  93. package/es/components/venueBooking/locales.d.ts +5 -0
  94. package/es/components/venueBooking/locales.js +10 -5
  95. package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
  96. package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
  97. package/es/pro/Login2.0/locales.js +1 -1
  98. package/es/utils/buildCartHolderParams.d.ts +92 -0
  99. package/es/utils/buildCartHolderParams.js +191 -0
  100. package/lib/businessModel/SalesModel/index.d.ts +1 -0
  101. package/lib/components/appointmentBooking/components/Cart/Item/index.js +71 -9
  102. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +6 -2
  103. package/lib/components/appointmentBooking/components/Header/index.js +1 -13
  104. package/lib/components/appointmentBooking/components/Voucher/index.js +10 -0
  105. package/lib/components/appointmentBooking/hooks.d.ts +1 -17
  106. package/lib/components/appointmentBooking/hooks.js +16 -91
  107. package/lib/components/appointmentBooking/utils.d.ts +1 -0
  108. package/lib/components/appointmentBooking/utils.js +24 -13
  109. package/lib/components/booking/addons/model.d.ts +1 -10
  110. package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
  111. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  112. package/lib/components/booking/deposit/index.d.ts +1 -0
  113. package/lib/components/booking/forms/model.d.ts +1 -10
  114. package/lib/components/booking/forms/single/index.d.ts +1 -0
  115. package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
  116. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  117. package/lib/components/booking/info/date/index.d.ts +1 -0
  118. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  119. package/lib/components/booking/info/index.d.ts +1 -0
  120. package/lib/components/booking/info/model.d.ts +1 -10
  121. package/lib/components/booking/info/notes/index.d.ts +1 -0
  122. package/lib/components/booking/info/service/Lists.d.ts +1 -0
  123. package/lib/components/booking/info/service/actions/index.d.ts +1 -0
  124. package/lib/components/booking/info/service/addService/index.d.ts +1 -0
  125. package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  126. package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
  127. package/lib/components/booking/info/service2/Lists.d.ts +1 -0
  128. package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
  129. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
  130. package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
  131. package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
  132. package/lib/components/booking/materiels/holder/index.d.ts +1 -0
  133. package/lib/components/booking/model.d.ts +1 -9
  134. package/lib/components/booking/notes/model.d.ts +1 -10
  135. package/lib/components/booking/payments/model.d.ts +1 -10
  136. package/lib/components/booking/utils.d.ts +2 -2
  137. package/lib/components/eftposPay/aggregatePayment/utils/payment.js +1 -2
  138. package/lib/components/eftposPay/amount.d.ts +1 -0
  139. package/lib/components/eftposPay/app.d.ts +1 -0
  140. package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  141. package/lib/components/eftposPay/device.js +4 -6
  142. package/lib/components/eftposPay/hooks.d.ts +1 -1
  143. package/lib/components/eftposPay/index.d.ts +1 -0
  144. package/lib/components/eftposPay/linkly/index.d.ts +1 -0
  145. package/lib/components/eftposPay/pay.d.ts +1 -0
  146. package/lib/components/eftposPay/store/index.d.ts +1 -1
  147. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
  148. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  149. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  150. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  151. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  152. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  153. package/lib/components/eventBooking/components/progressBar/index.d.ts +1 -8
  154. package/lib/components/eventBooking/components/progressBar/index.js +9 -29
  155. package/lib/components/eventBooking/index.d.ts +1 -0
  156. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  157. package/lib/components/pay/toC/model.d.ts +1 -9
  158. package/lib/components/pisellCashCounting/hooks.d.ts +1 -0
  159. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  160. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  161. package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
  162. package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
  163. package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
  164. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  165. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  166. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  167. package/lib/components/productExtension/index.d.ts +1 -0
  168. package/lib/components/ruleSetting/index.d.ts +1 -0
  169. package/lib/components/scanOrder/components/Check/index.js +3 -116
  170. package/lib/components/scanOrder/components/Check/index.less +0 -39
  171. package/lib/components/scanOrder/components/Content/index.js +25 -106
  172. package/lib/components/scanOrder/components/Menu/index.js +0 -2
  173. package/lib/components/scanOrder/hooks.js +0 -7
  174. package/lib/components/scanOrder/locales.d.ts +0 -75
  175. package/lib/components/scanOrder/locales.js +0 -75
  176. package/lib/components/schedules/model.d.ts +1 -9
  177. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  178. package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
  179. package/lib/components/shoppingCart/index.d.ts +1 -0
  180. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
  181. package/lib/components/venueBooking/components/Cart/index.js +92 -14
  182. package/lib/components/venueBooking/components/Voucher/index.js +1 -5
  183. package/lib/components/venueBooking/context.js +12 -2
  184. package/lib/components/venueBooking/locales.d.ts +5 -0
  185. package/lib/components/venueBooking/locales.js +10 -5
  186. package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
  187. package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
  188. package/lib/pro/Login2.0/locales.js +1 -1
  189. package/lib/utils/buildCartHolderParams.d.ts +92 -0
  190. package/lib/utils/buildCartHolderParams.js +167 -0
  191. package/package.json +1 -1
@@ -82,6 +82,7 @@ function ReadyState() {
82
82
  resumeStep = _useScanOrderContext.resumeStep,
83
83
  consumeResumeStep = _useScanOrderContext.consumeResumeStep;
84
84
  var _useScanOrderLogin = useScanOrderLogin(),
85
+ isLogin = _useScanOrderLogin.isLogin,
85
86
  openLoginModal = _useScanOrderLogin.openLoginModal;
86
87
  var utils = contextUtils();
87
88
  var _useComponents = useComponents({
@@ -214,7 +215,6 @@ function ReadyState() {
214
215
  var requestPaxMinRef = useRef(1);
215
216
  var requestPaxMaxRef = useRef(1);
216
217
  var tableFormRecordRef = useRef(null);
217
- var entryLoginPromptedRef = useRef(false);
218
218
  /** 本次会话是否曾实际弹出过入口人数弹窗(商品页返回首页前可二次弹窗) */
219
219
  var entryPaxModalWasPresentedRef = useRef(false);
220
220
 
@@ -258,10 +258,6 @@ function ReadyState() {
258
258
  };
259
259
  };
260
260
  var app = utils === null || utils === void 0 || (_utils$getApp = utils.getApp) === null || _utils$getApp === void 0 ? void 0 : _utils$getApp.call(utils);
261
- var getCurrentIsLogin = function getCurrentIsLogin() {
262
- var _utils$token, _utils$token$get;
263
- return Boolean(utils === null || utils === void 0 || (_utils$token = utils.token) === null || _utils$token === void 0 || (_utils$token$get = _utils$token.get) === null || _utils$token$get === void 0 ? void 0 : _utils$token$get.call(_utils$token));
264
- };
265
261
 
266
262
  /** 回站点首页(与商品步返回兜底一致) */
267
263
  var navigateToHome = function navigateToHome() {
@@ -525,17 +521,17 @@ function ReadyState() {
525
521
  return utils === null || utils === void 0 || (_utils$request = utils.request) === null || _utils$request === void 0 || (_utils$request$get = _utils$request.get) === null || _utils$request$get === void 0 ? void 0 : _utils$request$get.call(_utils$request, "/h5/shop-policy/".concat(id), {});
526
522
  };
527
523
  useEffect(function () {
528
- var runResourceCheck = /*#__PURE__*/function () {
529
- var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
530
- var hasOrderId, _yield$runModuleActio, mode, order_id, errorTips, policy, form, partyroom_booking, requestEntryPax, requestPaxMin, requestPaxMax, table_form_record, normalizedFormPayload, isAdditionalOrder, normalizedPolicyPayload, allowAddItems, openLoginForOrderDetail, tips, _openLoginForOrderDetail, content, _content;
531
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
532
- while (1) switch (_context7.prev = _context7.next) {
524
+ var checkResourceAvailable = /*#__PURE__*/function () {
525
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
526
+ var hasOrderId, _yield$runModuleActio, mode, order_id, errorTips, policy, form, partyroom_booking, requestEntryPax, requestPaxMin, requestPaxMax, table_form_record, normalizedFormPayload, isAdditionalOrder, normalizedPolicyPayload, tips, _scanOrderModule$setU, content, _content;
527
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
528
+ while (1) switch (_context6.prev = _context6.next) {
533
529
  case 0:
534
530
  hasOrderId = !!(entryContext !== null && entryContext !== void 0 && entryContext.order_id);
535
- _context7.next = 3;
531
+ _context6.next = 3;
536
532
  return runModuleAction('checkResourceAvailable', entryContext === null || entryContext === void 0 ? void 0 : entryContext.resource_id, hasOrderId);
537
533
  case 3:
538
- _yield$runModuleActio = _context7.sent;
534
+ _yield$runModuleActio = _context6.sent;
539
535
  mode = _yield$runModuleActio.mode;
540
536
  order_id = _yield$runModuleActio.order_id;
541
537
  errorTips = _yield$runModuleActio.errorTips;
@@ -556,14 +552,14 @@ function ReadyState() {
556
552
  setEntryMode(isAdditionalOrder ? 'additional_order' : 'default');
557
553
  // 资源空闲:按需依次弹 协议 -> 表单 -> 人数,最后进入商品选择
558
554
  if (!(mode === 'idle')) {
559
- _context7.next = 35;
555
+ _context6.next = 35;
560
556
  break;
561
557
  }
562
558
  normalizedPolicyPayload = _typeof(policy) === 'object' && policy !== null ? policy : {
563
559
  id: policy
564
560
  }; // 步骤缓存:同一 resourceId 会话内已确认过协议则跳过
565
561
  if (!(normalizedPolicyPayload !== null && normalizedPolicyPayload !== void 0 && normalizedPolicyPayload.id && !isGatePassed('policyAccepted'))) {
566
- _context7.next = 28;
562
+ _context6.next = 28;
567
563
  break;
568
564
  }
569
565
  setPendingFormPayload(normalizedFormPayload);
@@ -571,172 +567,76 @@ function ReadyState() {
571
567
  open: true,
572
568
  content: normalizedPolicyPayload
573
569
  });
574
- return _context7.abrupt("return");
570
+ return _context6.abrupt("return");
575
571
  case 28:
576
572
  if (!(normalizedFormPayload && !isGatePassed('formSubmitted'))) {
577
- _context7.next = 31;
573
+ _context6.next = 31;
578
574
  break;
579
575
  }
580
576
  openFormModal(normalizedFormPayload);
581
- return _context7.abrupt("return");
577
+ return _context6.abrupt("return");
582
578
  case 31:
583
- _context7.next = 33;
579
+ _context6.next = 33;
584
580
  return runEntryPaxGateThenEnterProduct();
585
581
  case 33:
586
- _context7.next = 62;
582
+ _context6.next = 48;
587
583
  break;
588
584
  case 35:
589
585
  if (!isAdditionalOrder) {
590
- _context7.next = 54;
586
+ _context6.next = 40;
591
587
  break;
592
588
  }
593
- _context7.next = 38;
594
- return runModuleAction('checkAllowAddItems');
595
- case 38:
596
- allowAddItems = _context7.sent;
597
- if (getCurrentIsLogin()) {
598
- _context7.next = 45;
599
- break;
600
- }
601
- openLoginForOrderDetail = function openLoginForOrderDetail() {
602
- var _scanOrderModule$setU;
603
- scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$setU = scanOrderModule.setUIState) === null || _scanOrderModule$setU === void 0 || _scanOrderModule$setU.call(scanOrderModule, 'pendingStep', currentStep);
604
- openLoginModal({
605
- callback: function () {
606
- var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(status) {
607
- var loginRequiredModal;
608
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
609
- while (1) switch (_context6.prev = _context6.next) {
610
- case 0:
611
- if (!(status === 'success')) {
612
- _context6.next = 9;
613
- break;
614
- }
615
- if (!(!(entryContext !== null && entryContext !== void 0 && entryContext.order_id) || !allowAddItems.enabled)) {
616
- _context6.next = 4;
617
- break;
618
- }
619
- handleOrderDetail(order_id);
620
- return _context6.abrupt("return");
621
- case 4:
622
- _context6.next = 6;
623
- return runModuleAction('restorePreviousOrderData');
624
- case 6:
625
- _context6.next = 8;
626
- return enterProductStep();
627
- case 8:
628
- return _context6.abrupt("return");
629
- case 9:
630
- console.log('status>>>>>>>', status);
631
- loginRequiredModal = Modal.info({
632
- title: locales.getText('pisell2.scan.order.add.on.login.required.title'),
633
- content: String(locales.getText('pisell2.scan.order.add.on.login.required') || '').trim(),
634
- okText: String(locales.getText('pisell2.event.confirm') || 'OK'),
635
- maskClosable: false,
636
- onOk: function onOk() {
637
- loginRequiredModal.destroy();
638
- openLoginForOrderDetail();
639
- }
640
- });
641
- case 11:
642
- case "end":
643
- return _context6.stop();
644
- }
645
- }, _callee6);
646
- }));
647
- function callback(_x) {
648
- return _callback.apply(this, arguments);
649
- }
650
- return callback;
651
- }()
652
- });
653
- };
654
- openLoginForOrderDetail();
655
- return _context7.abrupt("return");
656
- case 45:
657
- if (!(!(entryContext !== null && entryContext !== void 0 && entryContext.order_id) || !allowAddItems.enabled)) {
658
- _context7.next = 48;
659
- break;
660
- }
661
- handleOrderDetail(order_id);
662
- return _context7.abrupt("return");
663
- case 48:
664
- _context7.next = 50;
665
- return runModuleAction('restorePreviousOrderData');
666
- case 50:
667
- _context7.next = 52;
589
+ _context6.next = 38;
668
590
  return enterProductStep();
669
- case 52:
670
- _context7.next = 62;
591
+ case 38:
592
+ _context6.next = 48;
671
593
  break;
672
- case 54:
594
+ case 40:
673
595
  if (!(mode === 'submit_disabled')) {
674
- _context7.next = 61;
596
+ _context6.next = 47;
675
597
  break;
676
598
  }
677
599
  // 禁止下单模式:允许进入商品选择,但下一步按钮需被禁用,点击提示 errorTips
678
600
  tips = resolveLocalizedText(errorTips) || String(locales.getText('pisell2.scan.order.submit.disabled.default') || '');
679
601
  setSubmitDisabledTips(tips);
680
- _context7.next = 59;
602
+ _context6.next = 45;
681
603
  return enterProductStep();
682
- case 59:
683
- _context7.next = 62;
604
+ case 45:
605
+ _context6.next = 48;
684
606
  break;
685
- case 61:
686
- if (mode === 'multiple_orders') {
687
- Modal.info({
688
- title: locales.getText('pisell2.scan.order.step.error'),
689
- content: String(locales.getText('pisell2.scan.order.multiple.orders.tip') || '').trim(),
690
- okText: String(locales.getText('pisell2.scan.order.multiple.orders.confirm') || 'I Got It'),
691
- maskClosable: false,
692
- onOk: function onOk() {
693
- navigateToHome();
694
- }
695
- });
696
- } else if (mode === 'resource_busy') {
607
+ case 47:
608
+ if (mode === 'resource_busy') {
697
609
  // 如果资源是占用,则跳转到订单详情页
698
610
  // 需要检测当前是否已经登录,如果未登录则先登录再跳转
699
- // 若用户直接关闭登录弹窗(非登录成功),提示需要登录,确定后再次拉起登录弹窗。
611
+ // 若用户直接关闭登录弹窗(非登录成功),由于当前还卡在 initialize 步骤,
612
+ // 没有合法后续状态,统一兜底回首页避免卡死。
700
613
  if (Number(order_id) !== 0) {
701
- if (!getCurrentIsLogin()) {
614
+ if (!isLogin) {
702
615
  // 登录回流意图:登录成功后 hydrate 阶段消费 pendingStep,避免卡在 init
703
- _openLoginForOrderDetail = function _openLoginForOrderDetail() {
704
- var _scanOrderModule$setU2;
705
- scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$setU2 = scanOrderModule.setUIState) === null || _scanOrderModule$setU2 === void 0 || _scanOrderModule$setU2.call(scanOrderModule, 'pendingStep', currentStep);
706
- openLoginModal({
707
- callback: function callback(status) {
708
- if (status === 'success') {
709
- var _scanOrderModule$dele;
710
- scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$dele = scanOrderModule.deleteUIState) === null || _scanOrderModule$dele === void 0 || _scanOrderModule$dele.call(scanOrderModule, 'pendingStep');
711
- handleOrderDetail(order_id);
712
- return;
713
- }
714
- Modal.info({
715
- title: locales.getText('pisell2.scan.order.add.on.login.required.title'),
716
- content: String(locales.getText('pisell2.scan.order.add.on.login.required') || '').trim(),
717
- okText: String(locales.getText('pisell2.event.confirm') || 'OK'),
718
- maskClosable: false,
719
- onOk: function onOk() {
720
- _openLoginForOrderDetail();
721
- }
722
- });
616
+ scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$setU = scanOrderModule.setUIState) === null || _scanOrderModule$setU === void 0 || _scanOrderModule$setU.call(scanOrderModule, 'pendingStep', currentStep);
617
+ openLoginModal({
618
+ callback: function callback(status) {
619
+ var _scanOrderModule$dele2;
620
+ if (status === 'success') {
621
+ var _scanOrderModule$dele;
622
+ scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$dele = scanOrderModule.deleteUIState) === null || _scanOrderModule$dele === void 0 || _scanOrderModule$dele.call(scanOrderModule, 'pendingStep');
623
+ handleOrderDetail(order_id);
624
+ return;
723
625
  }
724
- });
725
- };
726
- _openLoginForOrderDetail();
626
+ scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$dele2 = scanOrderModule.deleteUIState) === null || _scanOrderModule$dele2 === void 0 || _scanOrderModule$dele2.call(scanOrderModule, 'pendingStep');
627
+ location.replace('/');
628
+ }
629
+ });
727
630
  } else {
728
631
  handleOrderDetail(order_id);
729
632
  }
730
633
  } else {
731
- content = String(locales.getText('pisell2.scan.order.add.on.unavailable.description') || '');
634
+ content = resolveLocalizedText(errorTips);
635
+ content = String(locales.getText('pisell2.scan.order.resource.status.exception') || '');
732
636
  Modal.info({
733
- title: locales.getText('pisell2.scan.order.add.on.unavailable.title'),
734
- content: /*#__PURE__*/React.createElement("div", {
735
- style: {
736
- whiteSpace: 'pre-line'
737
- }
738
- }, content.trim()),
739
- okText: String(locales.getText('pisell2.scan.order.add.on.unavailable.confirm') || 'Got it'),
637
+ title: locales.getText('pisell2.scan.order.step.error'),
638
+ content: content.trim(),
639
+ okText: String(locales.getText('pisell2.event.confirm') || 'OK'),
740
640
  maskClosable: false,
741
641
  onOk: function onOk() {
742
642
  location.replace('/');
@@ -763,36 +663,19 @@ function ReadyState() {
763
663
  }
764
664
  });
765
665
  }
766
- case 62:
666
+ case 48:
767
667
  case "end":
768
- return _context7.stop();
668
+ return _context6.stop();
769
669
  }
770
- }, _callee7);
670
+ }, _callee6);
771
671
  }));
772
- return function runResourceCheck() {
672
+ return function checkResourceAvailable() {
773
673
  return _ref8.apply(this, arguments);
774
674
  };
775
675
  }();
776
676
  // 等 ScanOrderProvider 的步骤缓存 hydrate 完成再跑,确保 gate 标记已就位
777
677
  if (!isCacheHydrated) return;
778
- // if (!getCurrentIsLogin()) {
779
- // if (entryLoginPromptedRef.current) return;
780
- // entryLoginPromptedRef.current = true;
781
- // scanOrderModule?.setUIState?.('pendingStep', currentStep);
782
- // // openLoginModal({
783
- // // callback: (status: string) => {
784
- // // scanOrderModule?.deleteUIState?.('pendingStep');
785
- // // // if (status === 'success') {
786
- // // // void runResourceCheck();
787
- // // // return;
788
- // // // }
789
- // // // navigateToHome();
790
- // // void runResourceCheck();
791
- // // },
792
- // // });
793
- // return;
794
- // }
795
- runResourceCheck();
678
+ checkResourceAvailable();
796
679
  }, [isCacheHydrated]);
797
680
  useEffect(function () {
798
681
  window.scrollTo({
@@ -889,22 +772,22 @@ function ReadyState() {
889
772
 
890
773
  // 跳转到订单确认页
891
774
  var gotoCheckOrder = /*#__PURE__*/function () {
892
- var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
775
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
893
776
  var _otherParams$dineInCo;
894
- var firstFailure, failedProductIds, failureTips, otherParams, dineInConfig, isPauseOrder, _dineInConfig$availab, _scanOrderModule$setU3;
895
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
896
- while (1) switch (_context8.prev = _context8.next) {
777
+ var firstFailure, failedProductIds, failureTips, otherParams, dineInConfig, isPauseOrder, _dineInConfig$availab, _scanOrderModule$setU2;
778
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
779
+ while (1) switch (_context7.prev = _context7.next) {
897
780
  case 0:
898
781
  if (!submitDisabledTips) {
899
- _context8.next = 3;
782
+ _context7.next = 3;
900
783
  break;
901
784
  }
902
785
  message.warning(submitDisabledTips, 2);
903
- return _context8.abrupt("return");
786
+ return _context7.abrupt("return");
904
787
  case 3:
905
788
  firstFailure = Array.isArray(cartValidation === null || cartValidation === void 0 ? void 0 : cartValidation.failures) ? cartValidation.failures[0] : null;
906
789
  if (!((cartValidation === null || cartValidation === void 0 ? void 0 : cartValidation.passed) === false)) {
907
- _context8.next = 10;
790
+ _context7.next = 10;
908
791
  break;
909
792
  }
910
793
  failedProductIds = getFirstFailedProductIds();
@@ -913,17 +796,17 @@ function ReadyState() {
913
796
  }
914
797
  failureTips = String((firstFailure === null || firstFailure === void 0 ? void 0 : firstFailure.validationMessage) || '').trim();
915
798
  message.warning(failureTips, 2);
916
- return _context8.abrupt("return");
799
+ return _context7.abrupt("return");
917
800
  case 10:
918
- _context8.next = 12;
801
+ _context7.next = 12;
919
802
  return runModuleAction('getOtherParams');
920
803
  case 12:
921
- otherParams = _context8.sent;
804
+ otherParams = _context7.sent;
922
805
  console.log('otherParams >>>>> ', otherParams);
923
806
  dineInConfig = (_otherParams$dineInCo = otherParams === null || otherParams === void 0 ? void 0 : otherParams.dineInConfig) !== null && _otherParams$dineInCo !== void 0 ? _otherParams$dineInCo : {};
924
807
  isPauseOrder = dineInConfig === null || dineInConfig === void 0 ? void 0 : dineInConfig['availability.paused']; // 如果暂停接单直接弹提示,点完确定回首页
925
808
  if (!isPauseOrder) {
926
- _context8.next = 19;
809
+ _context7.next = 19;
927
810
  break;
928
811
  }
929
812
  Modal.info({
@@ -934,30 +817,30 @@ function ReadyState() {
934
817
  location.replace('/');
935
818
  }
936
819
  });
937
- return _context8.abrupt("return");
820
+ return _context7.abrupt("return");
938
821
  case 19:
939
- if (getCurrentIsLogin()) {
940
- _context8.next = 23;
822
+ if (isLogin) {
823
+ _context7.next = 23;
941
824
  break;
942
825
  }
943
826
  // 登录前落盘跳转意图:弹窗 callback 能触发时由本函数消费,
944
827
  // 整页跳转回流时由 Provider 的 hydrate 消费(参见 venueBooking 同名实现)
945
- scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$setU3 = scanOrderModule.setUIState) === null || _scanOrderModule$setU3 === void 0 || _scanOrderModule$setU3.call(scanOrderModule, 'pendingStep', 'check');
828
+ scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$setU2 = scanOrderModule.setUIState) === null || _scanOrderModule$setU2 === void 0 || _scanOrderModule$setU2.call(scanOrderModule, 'pendingStep', 'check');
946
829
  openLoginModal({
947
830
  callback: function callback(status) {
948
- var _scanOrderModule$dele2;
949
- scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$dele2 = scanOrderModule.deleteUIState) === null || _scanOrderModule$dele2 === void 0 || _scanOrderModule$dele2.call(scanOrderModule, 'pendingStep');
831
+ var _scanOrderModule$dele3;
832
+ scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$dele3 = scanOrderModule.deleteUIState) === null || _scanOrderModule$dele3 === void 0 || _scanOrderModule$dele3.call(scanOrderModule, 'pendingStep');
950
833
  if (status === 'success') goToStep('check');
951
834
  }
952
835
  });
953
- return _context8.abrupt("return");
836
+ return _context7.abrupt("return");
954
837
  case 23:
955
838
  goToStep('check');
956
839
  case 24:
957
840
  case "end":
958
- return _context8.stop();
841
+ return _context7.stop();
959
842
  }
960
- }, _callee8);
843
+ }, _callee7);
961
844
  }));
962
845
  return function gotoCheckOrder() {
963
846
  return _ref9.apply(this, arguments);
@@ -293,7 +293,7 @@ export default function Menu(props) {
293
293
  },
294
294
  callback: function () {
295
295
  var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(data) {
296
- var _data$origin, _data$origin2, _data$origin3, _item$product_id2;
296
+ var _item$product_id2;
297
297
  var orderProduct;
298
298
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
299
299
  while (1) switch (_context5.prev = _context5.next) {
@@ -304,30 +304,24 @@ export default function Menu(props) {
304
304
  }
305
305
  return _context5.abrupt("return");
306
306
  case 2:
307
- if (!(data !== null && data !== void 0 && (_data$origin = data.origin) !== null && _data$origin !== void 0 && _data$origin.is_track && !(data !== null && data !== void 0 && (_data$origin2 = data.origin) !== null && _data$origin2 !== void 0 && _data$origin2.over_sold) && (data === null || data === void 0 || (_data$origin3 = data.origin) === null || _data$origin3 === void 0 ? void 0 : _data$origin3.stock_quantity) <= 0)) {
308
- _context5.next = 4;
309
- break;
310
- }
311
- return _context5.abrupt("return");
312
- case 4:
313
307
  orderProduct = transformProductDetailToOrderProduct({
314
308
  payload: data,
315
309
  fallbackProductId: (_item$product_id2 = item === null || item === void 0 ? void 0 : item.product_id) !== null && _item$product_id2 !== void 0 ? _item$product_id2 : item === null || item === void 0 ? void 0 : item.id,
316
310
  sourceItem: sourceItem
317
311
  });
318
312
  if (orderProduct) {
319
- _context5.next = 8;
313
+ _context5.next = 6;
320
314
  break;
321
315
  }
322
316
  console.warn('[scanOrder] productDetail callback missing product_id', data);
323
317
  return _context5.abrupt("return");
324
- case 8:
325
- _context5.next = 10;
318
+ case 6:
319
+ _context5.next = 8;
326
320
  return addOrderProduct({
327
321
  orderProduct: orderProduct,
328
322
  sourceData: data
329
323
  });
330
- case 10:
324
+ case 8:
331
325
  case "end":
332
326
  return _context5.stop();
333
327
  }
@@ -99,13 +99,6 @@ export var useScanOrderLogin = function useScanOrderLogin() {
99
99
  var openLoginModal = function openLoginModal(params) {
100
100
  var _ref = params || {},
101
101
  callback = _ref.callback;
102
- var pubsub = utils.pubsub;
103
- pubsub.once('pisell1.login.success', function (res) {
104
- if (res === 'success') {
105
- callback(res);
106
- }
107
- callback('close');
108
- });
109
102
  utils.action({
110
103
  type: 'pisell1.login',
111
104
  data: {
@@ -30,21 +30,6 @@ declare const _default: {
30
30
  'pisell2.scan.order.products.empty.tip': string;
31
31
  'pisell2.scan.order.check.cart.empty.tip': string;
32
32
  'pisell2.scan.order.submit.disabled.default': string;
33
- 'pisell2.scan.order.multiple.orders.tip': string;
34
- 'pisell2.scan.order.multiple.orders.confirm': string;
35
- 'pisell2.scan.order.settled.cannot.add.tip': string;
36
- 'pisell2.scan.order.inventory.insufficient.title': string;
37
- 'pisell2.scan.order.inventory.insufficient.description': string;
38
- 'pisell2.scan.order.inventory.insufficient.products.label': string;
39
- 'pisell2.scan.order.add.on.confirm.title': string;
40
- 'pisell2.scan.order.add.on.confirm.description': string;
41
- 'pisell2.scan.order.add.on.confirm.button': string;
42
- 'pisell2.scan.order.add.on.return.button': string;
43
- 'pisell2.scan.order.add.on.unavailable.title': string;
44
- 'pisell2.scan.order.add.on.unavailable.description': string;
45
- 'pisell2.scan.order.add.on.unavailable.confirm': string;
46
- 'pisell2.scan.order.add.on.login.required.title': string;
47
- 'pisell2.scan.order.add.on.login.required': string;
48
33
  'pisell2.text.goodpass': string;
49
34
  'pisell2.text.goodpass.product-vouchers': string;
50
35
  'pisell2.text.goodpass.view-more': string;
@@ -94,21 +79,6 @@ declare const _default: {
94
79
  'pisell2.scan.order.products.empty.tip': string;
95
80
  'pisell2.scan.order.check.cart.empty.tip': string;
96
81
  'pisell2.scan.order.submit.disabled.default': string;
97
- 'pisell2.scan.order.multiple.orders.tip': string;
98
- 'pisell2.scan.order.multiple.orders.confirm': string;
99
- 'pisell2.scan.order.settled.cannot.add.tip': string;
100
- 'pisell2.scan.order.inventory.insufficient.title': string;
101
- 'pisell2.scan.order.inventory.insufficient.description': string;
102
- 'pisell2.scan.order.inventory.insufficient.products.label': string;
103
- 'pisell2.scan.order.add.on.confirm.title': string;
104
- 'pisell2.scan.order.add.on.confirm.description': string;
105
- 'pisell2.scan.order.add.on.confirm.button': string;
106
- 'pisell2.scan.order.add.on.return.button': string;
107
- 'pisell2.scan.order.add.on.unavailable.title': string;
108
- 'pisell2.scan.order.add.on.unavailable.description': string;
109
- 'pisell2.scan.order.add.on.unavailable.confirm': string;
110
- 'pisell2.scan.order.add.on.login.required.title': string;
111
- 'pisell2.scan.order.add.on.login.required': string;
112
82
  'pisell2.text.goodpass': string;
113
83
  'pisell2.text.goodpass.product-vouchers': string;
114
84
  'pisell2.text.goodpass.view-more': string;
@@ -158,21 +128,6 @@ declare const _default: {
158
128
  'pisell2.scan.order.products.empty.tip': string;
159
129
  'pisell2.scan.order.check.cart.empty.tip': string;
160
130
  'pisell2.scan.order.submit.disabled.default': string;
161
- 'pisell2.scan.order.multiple.orders.tip': string;
162
- 'pisell2.scan.order.multiple.orders.confirm': string;
163
- 'pisell2.scan.order.settled.cannot.add.tip': string;
164
- 'pisell2.scan.order.inventory.insufficient.title': string;
165
- 'pisell2.scan.order.inventory.insufficient.description': string;
166
- 'pisell2.scan.order.inventory.insufficient.products.label': string;
167
- 'pisell2.scan.order.add.on.confirm.title': string;
168
- 'pisell2.scan.order.add.on.confirm.description': string;
169
- 'pisell2.scan.order.add.on.confirm.button': string;
170
- 'pisell2.scan.order.add.on.return.button': string;
171
- 'pisell2.scan.order.add.on.unavailable.title': string;
172
- 'pisell2.scan.order.add.on.unavailable.description': string;
173
- 'pisell2.scan.order.add.on.unavailable.confirm': string;
174
- 'pisell2.scan.order.add.on.login.required.title': string;
175
- 'pisell2.scan.order.add.on.login.required': string;
176
131
  'pisell2.text.goodpass': string;
177
132
  'pisell2.text.goodpass.product-vouchers': string;
178
133
  'pisell2.text.goodpass.view-more': string;
@@ -222,21 +177,6 @@ declare const _default: {
222
177
  'pisell2.scan.order.products.empty.tip': string;
223
178
  'pisell2.scan.order.check.cart.empty.tip': string;
224
179
  'pisell2.scan.order.submit.disabled.default': string;
225
- 'pisell2.scan.order.multiple.orders.tip': string;
226
- 'pisell2.scan.order.multiple.orders.confirm': string;
227
- 'pisell2.scan.order.settled.cannot.add.tip': string;
228
- 'pisell2.scan.order.inventory.insufficient.title': string;
229
- 'pisell2.scan.order.inventory.insufficient.description': string;
230
- 'pisell2.scan.order.inventory.insufficient.products.label': string;
231
- 'pisell2.scan.order.add.on.confirm.title': string;
232
- 'pisell2.scan.order.add.on.confirm.description': string;
233
- 'pisell2.scan.order.add.on.confirm.button': string;
234
- 'pisell2.scan.order.add.on.return.button': string;
235
- 'pisell2.scan.order.add.on.unavailable.title': string;
236
- 'pisell2.scan.order.add.on.unavailable.description': string;
237
- 'pisell2.scan.order.add.on.unavailable.confirm': string;
238
- 'pisell2.scan.order.add.on.login.required.title': string;
239
- 'pisell2.scan.order.add.on.login.required': string;
240
180
  'pisell2.text.goodpass': string;
241
181
  'pisell2.text.goodpass.product-vouchers': string;
242
182
  'pisell2.text.goodpass.view-more': string;
@@ -286,21 +226,6 @@ declare const _default: {
286
226
  'pisell2.scan.order.products.empty.tip': string;
287
227
  'pisell2.scan.order.check.cart.empty.tip': string;
288
228
  'pisell2.scan.order.submit.disabled.default': string;
289
- 'pisell2.scan.order.multiple.orders.tip': string;
290
- 'pisell2.scan.order.multiple.orders.confirm': string;
291
- 'pisell2.scan.order.settled.cannot.add.tip': string;
292
- 'pisell2.scan.order.inventory.insufficient.title': string;
293
- 'pisell2.scan.order.inventory.insufficient.description': string;
294
- 'pisell2.scan.order.inventory.insufficient.products.label': string;
295
- 'pisell2.scan.order.add.on.confirm.title': string;
296
- 'pisell2.scan.order.add.on.confirm.description': string;
297
- 'pisell2.scan.order.add.on.confirm.button': string;
298
- 'pisell2.scan.order.add.on.return.button': string;
299
- 'pisell2.scan.order.add.on.unavailable.title': string;
300
- 'pisell2.scan.order.add.on.unavailable.description': string;
301
- 'pisell2.scan.order.add.on.unavailable.confirm': string;
302
- 'pisell2.scan.order.add.on.login.required.title': string;
303
- 'pisell2.scan.order.add.on.login.required': string;
304
229
  'pisell2.text.goodpass': string;
305
230
  'pisell2.text.goodpass.product-vouchers': string;
306
231
  'pisell2.text.goodpass.view-more': string;