@pisell/private-materials 6.5.4 → 6.5.6

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 (249) 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/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +160 -146
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/components/booking/addons/model.d.ts +1 -10
  12. package/es/components/booking/components/actionButtons/index.js +37 -42
  13. package/es/components/booking/components/actionButtons/index.less +0 -28
  14. package/es/components/booking/components/footer/amount.d.ts +3 -3
  15. package/es/components/booking/components/footer/amount.js +51 -31
  16. package/es/components/booking/components/footer/index.js +177 -68
  17. package/es/components/booking/components/footer/utils.js +62 -33
  18. package/es/components/booking/forms/model.d.ts +1 -10
  19. package/es/components/booking/info/model.d.ts +1 -10
  20. package/es/components/booking/info/model.js +5 -0
  21. package/es/components/booking/info/service/addService/index.js +2 -1
  22. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  23. package/es/components/booking/info/service2/utils.d.ts +1 -1
  24. package/es/components/booking/info2/index.js +42 -2
  25. package/es/components/booking/info2/service/addService/index.js +2 -1
  26. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  27. package/es/components/booking/info2/service/editService/index.js +12 -4
  28. package/es/components/booking/model.d.ts +1 -9
  29. package/es/components/booking/notes/model.d.ts +1 -10
  30. package/es/components/booking/payments/model.d.ts +1 -10
  31. package/es/components/booking/utils.js +10 -5
  32. package/es/components/checkout/PaymentModal.d.ts +2 -0
  33. package/es/components/checkout/PaymentModal.js +462 -263
  34. package/es/components/checkout/components/AdditionalModule/index.less +1 -1
  35. package/es/components/checkout/components/AmountSummary/index.js +176 -65
  36. package/es/components/checkout/components/AmountSummary/index.less +13 -0
  37. package/es/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
  38. package/es/components/checkout/components/CashPaymentModule/index.js +110 -132
  39. package/es/components/checkout/components/CashPaymentModule/index.less +200 -176
  40. package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
  41. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +29 -0
  42. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +214 -0
  43. package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -4
  44. package/es/components/checkout/components/PaymentOptionsModule/index.js +12 -114
  45. package/es/components/checkout/components/PaymentOptionsModule/index.less +23 -0
  46. package/es/components/checkout/components/PaymentResultToast/index.js +38 -8
  47. package/es/components/checkout/components/PaymentResultToast/types.d.ts +2 -0
  48. package/es/components/checkout/components/SavePayLaterHandler/index.js +1 -1
  49. package/es/components/checkout/components/SearchAndClientModule/index.js +40 -39
  50. package/es/components/checkout/components/WalletPassModule/index.js +4 -3
  51. package/es/components/checkout/components/WalletPassModule/utils.js +10 -4
  52. package/es/components/checkout/hooks/useWalletPass.js +11 -4
  53. package/es/components/checkout/index.less +1 -1
  54. package/es/components/checkout/locales.d.ts +36 -0
  55. package/es/components/checkout/locales.js +43 -4
  56. package/es/components/checkout/types.d.ts +1 -0
  57. package/es/components/eftposPay/amount.d.ts +1 -1
  58. package/es/components/eftposPay/device.d.ts +1 -1
  59. package/es/components/eftposPay/hooks.d.ts +1 -1
  60. package/es/components/eftposPay/store/index.d.ts +3 -3
  61. package/es/components/pay/toC/model.d.ts +1 -9
  62. package/es/components/schedules/model.d.ts +1 -9
  63. package/es/components/shoppingCart/components/Cart/Product.js +143 -71
  64. package/es/components/shoppingCart/components/Cart/index.js +1 -1
  65. package/es/components/shoppingCart/components/Cart/index.less +31 -0
  66. package/es/components/shoppingCart/locales.d.ts +3 -0
  67. package/es/components/shoppingCart/locales.js +12 -3
  68. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -1
  69. package/es/components/ticketBooking/components/addServiceVariant/addService.js +9 -12
  70. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  71. package/es/components/ticketBooking/components/menuBar/index.js +3 -1
  72. package/es/components/ticketBooking/components/menuBar/index.less +7 -0
  73. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  74. package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +7 -7
  75. package/es/components/ticketBooking/index.d.ts +0 -1
  76. package/es/components/ticketBooking/utils/index.d.ts +1 -1
  77. package/es/components/ticketBooking/utils/index.js +2 -1
  78. package/es/components/wallet/Detail/model.d.ts +1 -13
  79. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  80. package/es/components/wallet/PointCard/model.d.ts +1 -13
  81. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  82. package/es/components/wallet/Voucher/model.d.ts +1 -13
  83. package/es/components/wallet/model.d.ts +1 -9
  84. package/es/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +1 -1
  85. package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
  86. package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.js +148 -0
  87. package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
  88. package/es/pro/pisellSimplePriceKeyboardPopover/index.d.ts +2 -0
  89. package/es/pro/pisellSimplePriceKeyboardPopover/index.js +1 -0
  90. package/es/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
  91. package/es/pro/pisellSimplePriceKeyboardPopover/types.js +1 -0
  92. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +5 -0
  93. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +331 -0
  94. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.d.ts +13 -0
  95. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +349 -0
  96. package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +12 -0
  97. package/es/pro/priceKeyboard/components/cashKeyboard/index.js +49 -0
  98. package/es/pro/priceKeyboard/components/cashKeyboard/index.less +103 -0
  99. package/es/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
  100. package/es/pro/priceKeyboard/components/cashKeyboard/locales.js +41 -0
  101. package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +97 -0
  102. package/es/pro/priceKeyboard/components/cashKeyboard/types.js +1 -0
  103. package/es/pro/priceKeyboard/components/discountKeyboard/index.d.ts +22 -0
  104. package/es/pro/priceKeyboard/components/discountKeyboard/index.js +465 -0
  105. package/es/pro/priceKeyboard/components/discountKeyboard/index.less +47 -0
  106. package/es/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
  107. package/es/pro/priceKeyboard/components/discountKeyboard/locales.js +44 -0
  108. package/es/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
  109. package/es/pro/priceKeyboard/components/discountKeyboard/types.js +1 -0
  110. package/es/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +12 -0
  111. package/es/pro/priceKeyboard/components/paymentKeyboard/index.js +444 -0
  112. package/es/pro/priceKeyboard/components/paymentKeyboard/index.less +64 -0
  113. package/es/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
  114. package/es/pro/priceKeyboard/components/paymentKeyboard/locales.js +47 -0
  115. package/es/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
  116. package/es/pro/priceKeyboard/components/paymentKeyboard/types.js +1 -0
  117. package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +17 -0
  118. package/es/pro/priceKeyboard/components/shortcuts/index.js +47 -0
  119. package/es/pro/priceKeyboard/components/shortcuts/index.less +39 -0
  120. package/es/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
  121. package/es/pro/priceKeyboard/hooks/keyActions.js +252 -0
  122. package/es/pro/priceKeyboard/hooks/rightItems.d.ts +28 -0
  123. package/es/pro/priceKeyboard/hooks/rightItems.js +50 -0
  124. package/es/pro/priceKeyboard/index.d.ts +3 -0
  125. package/es/pro/priceKeyboard/index.js +3 -0
  126. package/es/pro/priceKeyboard/index.less +215 -0
  127. package/es/pro/priceKeyboard/utils.d.ts +31 -0
  128. package/es/pro/priceKeyboard/utils.js +51 -0
  129. package/es/pro/skuDetailModal/index.js +19 -16
  130. package/lib/components/booking/addons/model.d.ts +1 -10
  131. package/lib/components/booking/components/actionButtons/index.js +31 -28
  132. package/lib/components/booking/components/actionButtons/index.less +0 -28
  133. package/lib/components/booking/components/footer/amount.d.ts +3 -3
  134. package/lib/components/booking/components/footer/amount.js +49 -34
  135. package/lib/components/booking/components/footer/index.js +114 -40
  136. package/lib/components/booking/components/footer/utils.js +35 -7
  137. package/lib/components/booking/forms/model.d.ts +1 -10
  138. package/lib/components/booking/info/model.d.ts +1 -10
  139. package/lib/components/booking/info/model.js +3 -0
  140. package/lib/components/booking/info/service/addService/index.js +2 -1
  141. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  142. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  143. package/lib/components/booking/info2/index.js +18 -1
  144. package/lib/components/booking/info2/service/addService/index.js +2 -1
  145. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  146. package/lib/components/booking/info2/service/editService/index.js +12 -4
  147. package/lib/components/booking/model.d.ts +1 -9
  148. package/lib/components/booking/notes/model.d.ts +1 -10
  149. package/lib/components/booking/payments/model.d.ts +1 -10
  150. package/lib/components/booking/utils.js +10 -5
  151. package/lib/components/checkout/PaymentModal.d.ts +2 -0
  152. package/lib/components/checkout/PaymentModal.js +208 -91
  153. package/lib/components/checkout/components/AdditionalModule/index.less +1 -1
  154. package/lib/components/checkout/components/AmountSummary/index.js +120 -50
  155. package/lib/components/checkout/components/AmountSummary/index.less +13 -0
  156. package/lib/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
  157. package/lib/components/checkout/components/CashPaymentModule/index.js +101 -134
  158. package/lib/components/checkout/components/CashPaymentModule/index.less +200 -176
  159. package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
  160. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +29 -0
  161. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +163 -0
  162. package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -4
  163. package/lib/components/checkout/components/PaymentOptionsModule/index.js +11 -123
  164. package/lib/components/checkout/components/PaymentOptionsModule/index.less +23 -0
  165. package/lib/components/checkout/components/PaymentResultToast/index.js +26 -1
  166. package/lib/components/checkout/components/PaymentResultToast/types.d.ts +2 -0
  167. package/lib/components/checkout/components/SavePayLaterHandler/index.js +1 -1
  168. package/lib/components/checkout/components/SearchAndClientModule/index.js +3 -29
  169. package/lib/components/checkout/components/WalletPassModule/index.js +4 -3
  170. package/lib/components/checkout/components/WalletPassModule/utils.js +8 -4
  171. package/lib/components/checkout/hooks/useWalletPass.js +11 -6
  172. package/lib/components/checkout/index.less +1 -1
  173. package/lib/components/checkout/locales.d.ts +36 -0
  174. package/lib/components/checkout/locales.js +43 -4
  175. package/lib/components/checkout/types.d.ts +1 -0
  176. package/lib/components/eftposPay/amount.d.ts +1 -1
  177. package/lib/components/eftposPay/device.d.ts +1 -1
  178. package/lib/components/eftposPay/hooks.d.ts +1 -1
  179. package/lib/components/eftposPay/store/index.d.ts +3 -3
  180. package/lib/components/pay/toC/model.d.ts +1 -9
  181. package/lib/components/schedules/model.d.ts +1 -9
  182. package/lib/components/shoppingCart/components/Cart/Product.js +111 -51
  183. package/lib/components/shoppingCart/components/Cart/index.js +1 -1
  184. package/lib/components/shoppingCart/components/Cart/index.less +31 -0
  185. package/lib/components/shoppingCart/locales.d.ts +3 -0
  186. package/lib/components/shoppingCart/locales.js +6 -3
  187. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -1
  188. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -4
  189. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  190. package/lib/components/ticketBooking/components/menuBar/index.js +1 -1
  191. package/lib/components/ticketBooking/components/menuBar/index.less +7 -0
  192. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  193. package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +7 -7
  194. package/lib/components/ticketBooking/index.d.ts +0 -1
  195. package/lib/components/ticketBooking/utils/index.d.ts +1 -1
  196. package/lib/components/ticketBooking/utils/index.js +2 -1
  197. package/lib/components/wallet/Detail/model.d.ts +1 -13
  198. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  199. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  200. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  201. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  202. package/lib/components/wallet/model.d.ts +1 -9
  203. package/lib/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +2 -2
  204. package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
  205. package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.js +144 -0
  206. package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
  207. package/lib/pro/pisellSimplePriceKeyboardPopover/index.d.ts +2 -0
  208. package/lib/pro/pisellSimplePriceKeyboardPopover/index.js +35 -0
  209. package/lib/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
  210. package/lib/pro/pisellSimplePriceKeyboardPopover/types.js +17 -0
  211. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +5 -0
  212. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +360 -0
  213. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.d.ts +13 -0
  214. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +399 -0
  215. package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +12 -0
  216. package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +76 -0
  217. package/lib/pro/priceKeyboard/components/cashKeyboard/index.less +103 -0
  218. package/lib/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
  219. package/lib/pro/priceKeyboard/components/cashKeyboard/locales.js +65 -0
  220. package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +97 -0
  221. package/lib/pro/priceKeyboard/components/cashKeyboard/types.js +17 -0
  222. package/lib/pro/priceKeyboard/components/discountKeyboard/index.d.ts +22 -0
  223. package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +504 -0
  224. package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +47 -0
  225. package/lib/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
  226. package/lib/pro/priceKeyboard/components/discountKeyboard/locales.js +68 -0
  227. package/lib/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
  228. package/lib/pro/priceKeyboard/components/discountKeyboard/types.js +17 -0
  229. package/lib/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +12 -0
  230. package/lib/pro/priceKeyboard/components/paymentKeyboard/index.js +488 -0
  231. package/lib/pro/priceKeyboard/components/paymentKeyboard/index.less +64 -0
  232. package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
  233. package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.js +71 -0
  234. package/lib/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
  235. package/lib/pro/priceKeyboard/components/paymentKeyboard/types.js +17 -0
  236. package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +17 -0
  237. package/lib/pro/priceKeyboard/components/shortcuts/index.js +79 -0
  238. package/lib/pro/priceKeyboard/components/shortcuts/index.less +39 -0
  239. package/lib/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
  240. package/lib/pro/priceKeyboard/hooks/keyActions.js +176 -0
  241. package/lib/pro/priceKeyboard/hooks/rightItems.d.ts +28 -0
  242. package/lib/pro/priceKeyboard/hooks/rightItems.js +81 -0
  243. package/lib/pro/priceKeyboard/index.d.ts +3 -0
  244. package/lib/pro/priceKeyboard/index.js +45 -0
  245. package/lib/pro/priceKeyboard/index.less +215 -0
  246. package/lib/pro/priceKeyboard/utils.d.ts +31 -0
  247. package/lib/pro/priceKeyboard/utils.js +75 -0
  248. package/lib/pro/skuDetailModal/index.js +18 -22
  249. package/package.json +12 -12
@@ -128,11 +128,12 @@ var WalletPassModule = /*#__PURE__*/forwardRef(function (props, ref) {
128
128
  return selectedWalletIds.length + selectedDiscountList.length;
129
129
  }, [selectedWalletIds.length, selectedDiscountList.length]);
130
130
  var discountDisabled = useMemo(function () {
131
+ if (Number(orderInfo === null || orderInfo === void 0 ? void 0 : orderInfo.totalAmount) === 0) return true;
131
132
  return !!(paymentItems !== null && paymentItems !== void 0 && paymentItems.some(function (item) {
132
- return !WALLET_PASS_CODE_ARRAY.includes(item.code);
133
+ return !WALLET_PASS_CODE_ARRAY.includes(item.code) && !item.isSynced;
133
134
  }));
134
- }, [paymentItems]);
135
- if (cardData.length === 0 && availableDiscountList.length === 0) {
135
+ }, [paymentItems, orderInfo]);
136
+ if (cardData.length === 0 && availableDiscountList.length === 0 && disabledWalletData.length === 0) {
136
137
  return null;
137
138
  }
138
139
  return /*#__PURE__*/React.createElement("div", {
@@ -63,7 +63,7 @@ export var formatDiscountWalletData = function formatDiscountWalletData(data) {
63
63
  var _item$product2;
64
64
  var name = "";
65
65
  var storeName = "";
66
- if (item.tag === 'product_discount_card') {
66
+ if (item.tag === 'product_discount_card' || item.tag === 'discount_card') {
67
67
  var _item$metadata;
68
68
  if ((item === null || item === void 0 || (_item$metadata = item.metadata) === null || _item$metadata === void 0 ? void 0 : _item$metadata.discount_card_type) === "fixed_amount") {
69
69
  var amountValue = item !== null && item !== void 0 && item.savedAmount ? item === null || item === void 0 ? void 0 : item.savedAmount : item.par_value;
@@ -72,9 +72,9 @@ export var formatDiscountWalletData = function formatDiscountWalletData(data) {
72
72
  showCurrencySymbol: true
73
73
  }));
74
74
  } else {
75
- name = locales.getText('pisell2.checkout.discount.percentage.off')(item.par_value);
75
+ name = locales.getText('pisell2.checkout.discount.percentage.off')(item.par_value || item.discount.percent);
76
76
  }
77
- storeName = item.product_name;
77
+ storeName = item.product_name || item.format_title.auto;
78
78
  } else if (item.tag === 'good_pass') {
79
79
  var _locales$getText;
80
80
  name = item.product_name;
@@ -85,6 +85,12 @@ export var formatDiscountWalletData = function formatDiscountWalletData(data) {
85
85
  } else {
86
86
  name = item.product_name;
87
87
  }
88
+
89
+ // 如果处理完最后还没有 name,并且是 isEditMode,则 name 为 item.amount
90
+ if (!name && item.isEditMode) {
91
+ name = item.amount;
92
+ storeName = item.format_title.auto;
93
+ }
88
94
  return _objectSpread(_objectSpread({}, item), {}, {
89
95
  id: item.id,
90
96
  name: name,
@@ -103,7 +109,7 @@ export var formatDiscountWalletData = function formatDiscountWalletData(data) {
103
109
  code: item.code,
104
110
  disabled: item.isDisabled,
105
111
  showStatus: true,
106
- cardStatus: item.isDisabled ? 'conflict' : undefined,
112
+ cardStatus: item.isEditMode ? 'lastPayment' : item.isDisabled ? 'conflict' : undefined,
107
113
  cover: (_item$product2 = item.product) === null || _item$product2 === void 0 ? void 0 : _item$product2.cover,
108
114
  qrCode: item.code,
109
115
  validDate: voucherTime(item, 'expire_time'),
@@ -514,6 +514,7 @@ export var useWalletPass = function useWalletPass(props) {
514
514
  // 注册事件监听器
515
515
  core.effects.on('wallet:onWalletRecommendListUpdated', handleWalletRecommendListUpdated);
516
516
  core.effects.on('checkout:onPaymentStarted', handlePaymentStarted);
517
+ core.effects.on('checkout:onPaymentItemAdded', handlePaymentStarted);
517
518
  core.effects.on('wallet:onUserIdentificationCodesUpdated', handleUserIdentificationCodesUpdated);
518
519
  core.effects.on('wallet:onWalletCacheCleared', handleWalletCacheCleared);
519
520
  core.effects.on('wallet:onSearchIdentificationCodeCompleted', handleSearchIdentificationCodeCompleted);
@@ -526,6 +527,7 @@ export var useWalletPass = function useWalletPass(props) {
526
527
  return function () {
527
528
  core.effects.off('wallet:onWalletRecommendListUpdated', handleWalletRecommendListUpdated);
528
529
  core.effects.off('checkout:onPaymentStarted', handlePaymentStarted);
530
+ core.effects.off('checkout:onPaymentItemAdded', handlePaymentStarted);
529
531
  core.effects.off('wallet:onUserIdentificationCodesUpdated', handleUserIdentificationCodesUpdated);
530
532
  core.effects.off('wallet:onWalletCacheCleared', handleWalletCacheCleared);
531
533
  core.effects.off('wallet:onSearchIdentificationCodeCompleted', handleSearchIdentificationCodeCompleted);
@@ -706,11 +708,16 @@ export var useWalletPass = function useWalletPass(props) {
706
708
  }))) {
707
709
  Toast === null || Toast === void 0 || Toast.info(locales.getText('wallet-pass-module-already-best-combination'));
708
710
  } else {
709
- setWalletSelect(searchIdentificationCodeList);
710
- handleFetchUserIdentificationCodes(searchIdentificationCodeList.map(function (item) {
711
+ var _select2 = searchIdentificationCodeList.filter(function (item) {
712
+ return item.unified_available_status;
713
+ });
714
+ setWalletSelect(_select2);
715
+ handleFetchUserIdentificationCodes(_select2.map(function (item) {
711
716
  return item.id;
712
- }), searchIdentificationCodeList);
713
- Toast === null || Toast === void 0 || Toast.success(locales.getText('wallet-pass-module-best-combination-selected'));
717
+ }), _select2);
718
+ if (_select2.length) {
719
+ Toast === null || Toast === void 0 || Toast.success(locales.getText('wallet-pass-module-best-combination-selected'));
720
+ }
714
721
  }
715
722
  }
716
723
  return;
@@ -69,7 +69,7 @@
69
69
  display: grid;
70
70
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); // 强制等宽分配
71
71
  grid-template-rows: auto auto;
72
- gap: 16px;
72
+ gap: 8px 16px;
73
73
  background-color: #f6f2ff;
74
74
  padding: 16px 16px 0 16px;
75
75
  border-radius: 0 0 12px 12px;
@@ -23,7 +23,9 @@ declare const _default: {
23
23
  'balance.due': string;
24
24
  'deposit.due': string;
25
25
  'partial.paid': string;
26
+ 'deposit.partial.paid': string;
26
27
  'split.payment': string;
28
+ 'split.cancel': string;
27
29
  cash: string;
28
30
  rounding: string;
29
31
  'cash.payment': string;
@@ -78,6 +80,7 @@ declare const _default: {
78
80
  'wallet-pass-module-disabled-modal-title': string;
79
81
  'wallet-pass-module-disabled-modal-empty': string;
80
82
  'wallet-pass-module-discount-partially-paid': string;
83
+ 'wallet-pass-module-discount-order-free': string;
81
84
  'additional.options': string;
82
85
  'add.tip': string;
83
86
  'service.charge': string;
@@ -153,6 +156,15 @@ declare const _default: {
153
156
  'pisell2.checkout.sync-retry-hint': string;
154
157
  'pisell2.checkout.tips': string;
155
158
  retry: string;
159
+ 'cash-payment-title': string;
160
+ 'cash-payment-balance-due': string;
161
+ 'cash-payment-cash-received': string;
162
+ 'cash-payment-change-due': string;
163
+ 'cash-payment-rounding': string;
164
+ 'cash-payment-other': string;
165
+ 'cash-payment-reset': string;
166
+ 'cash-payment-pay': string;
167
+ 'cash-payment-amount-cannot-be-zero': string;
156
168
  };
157
169
  'zh-CN': {
158
170
  'order.total': string;
@@ -178,7 +190,9 @@ declare const _default: {
178
190
  'balance.due': string;
179
191
  'deposit.due': string;
180
192
  'partial.paid': string;
193
+ 'deposit.partial.paid': string;
181
194
  'split.payment': string;
195
+ 'split.cancel': string;
182
196
  cash: string;
183
197
  rounding: string;
184
198
  'cash.payment': string;
@@ -233,6 +247,7 @@ declare const _default: {
233
247
  'wallet-pass-module-disabled-modal-title': string;
234
248
  'wallet-pass-module-disabled-modal-empty': string;
235
249
  'wallet-pass-module-discount-partially-paid': string;
250
+ 'wallet-pass-module-discount-order-free': string;
236
251
  'additional.options': string;
237
252
  'add.tip': string;
238
253
  'service.charge': string;
@@ -308,6 +323,15 @@ declare const _default: {
308
323
  'pisell2.checkout.sync-retry-hint': string;
309
324
  'pisell2.checkout.tips': string;
310
325
  retry: string;
326
+ 'cash-payment-title': string;
327
+ 'cash-payment-balance-due': string;
328
+ 'cash-payment-cash-received': string;
329
+ 'cash-payment-change-due': string;
330
+ 'cash-payment-rounding': string;
331
+ 'cash-payment-other': string;
332
+ 'cash-payment-reset': string;
333
+ 'cash-payment-pay': string;
334
+ 'cash-payment-amount-cannot-be-zero': string;
311
335
  };
312
336
  'zh-HK': {
313
337
  'order.total': string;
@@ -333,7 +357,9 @@ declare const _default: {
333
357
  'balance.due': string;
334
358
  'deposit.due': string;
335
359
  'partial.paid': string;
360
+ 'deposit.partial.paid': string;
336
361
  'split.payment': string;
362
+ 'split.cancel': string;
337
363
  cash: string;
338
364
  rounding: string;
339
365
  'cash.payment': string;
@@ -394,6 +420,7 @@ declare const _default: {
394
420
  'wallet-pass-module-disabled-modal-title': string;
395
421
  'wallet-pass-module-disabled-modal-empty': string;
396
422
  'wallet-pass-module-discount-partially-paid': string;
423
+ 'wallet-pass-module-discount-order-free': string;
397
424
  'pisell2.checkout.search-section.placeholder': string;
398
425
  'pisell2.checkout.discount.percentage.off': (value: string) => string;
399
426
  'pisell2.checkout.discount.fixed_amount': string;
@@ -463,6 +490,15 @@ declare const _default: {
463
490
  'pisell2.checkout.sync-retry-hint': string;
464
491
  'pisell2.checkout.tips': string;
465
492
  retry: string;
493
+ 'cash-payment-title': string;
494
+ 'cash-payment-balance-due': string;
495
+ 'cash-payment-cash-received': string;
496
+ 'cash-payment-change-due': string;
497
+ 'cash-payment-rounding': string;
498
+ 'cash-payment-other': string;
499
+ 'cash-payment-reset': string;
500
+ 'cash-payment-pay': string;
501
+ 'cash-payment-amount-cannot-be-zero': string;
466
502
  };
467
503
  };
468
504
  export default _default;
@@ -27,7 +27,9 @@ export default {
27
27
  'balance.due': 'Balance Due',
28
28
  'deposit.due': 'Deposit Due',
29
29
  'partial.paid': 'Partial Paid',
30
+ 'deposit.partial.paid': 'Deposit Paid',
30
31
  'split.payment': 'Pay\nPartially',
32
+ 'split.cancel': 'Cancel\nPartial',
31
33
  // Cash Payment
32
34
  'cash': 'Cash',
33
35
  'rounding': 'Rounding',
@@ -81,7 +83,7 @@ export default {
81
83
  return "".concat(count, " Expired");
82
84
  },
83
85
  'wallet-pass-module-best-saving': 'Select Best',
84
- 'wallet-pass-module-clear-all': 'Clear All',
86
+ 'wallet-pass-module-clear-all': 'Clear Selection',
85
87
  'wallet-pass-module-expired-modal-title': function walletPassModuleExpiredModalTitle(count) {
86
88
  return "".concat(count, " Expired Vouchers");
87
89
  },
@@ -98,6 +100,7 @@ export default {
98
100
  'wallet-pass-module-disabled-modal-title': 'Unable to use',
99
101
  'wallet-pass-module-disabled-modal-empty': 'No unusable cards',
100
102
  'wallet-pass-module-discount-partially-paid': 'Promotion cannot be changed on partially paid orders or used wallet',
103
+ 'wallet-pass-module-discount-order-free': 'The order total is free, can not use wallet',
101
104
  // Additional Module
102
105
  'additional.options': 'Additional Options',
103
106
  'add.tip': 'Add Tip',
@@ -198,7 +201,17 @@ export default {
198
201
  'pisell2.checkout.order-sync-failed': 'Order sync failed, please check your network',
199
202
  'pisell2.checkout.sync-retry-hint': 'Network error, please click the retry button to resync the order',
200
203
  'pisell2.checkout.tips': 'Tips',
201
- 'retry': 'Retry'
204
+ 'retry': 'Retry',
205
+ // Cash Payment Module
206
+ 'cash-payment-title': 'Cash Payment',
207
+ 'cash-payment-balance-due': 'Balance Due',
208
+ 'cash-payment-cash-received': 'Cash Received',
209
+ 'cash-payment-change-due': 'Change Due',
210
+ 'cash-payment-rounding': 'Rounding',
211
+ 'cash-payment-other': 'Other',
212
+ 'cash-payment-reset': 'Reset',
213
+ 'cash-payment-pay': 'Pay',
214
+ 'cash-payment-amount-cannot-be-zero': 'The amount cannot be 0'
202
215
  },
203
216
  'zh-CN': {
204
217
  // Order and Payment
@@ -228,7 +241,9 @@ export default {
228
241
  'balance.due': '应付金额',
229
242
  'deposit.due': '定金待支付金额',
230
243
  'partial.paid': '部分支付',
244
+ 'deposit.partial.paid': '定金部分支付',
231
245
  'split.payment': '部分付款',
246
+ 'split.cancel': '取消\n部分支付',
232
247
  // Cash Payment
233
248
  'cash': '现金',
234
249
  'rounding': '舍入',
@@ -299,6 +314,7 @@ export default {
299
314
  'wallet-pass-module-disabled-modal-title': '无法使用的卡券',
300
315
  'wallet-pass-module-disabled-modal-empty': '暂无不可用卡券',
301
316
  'wallet-pass-module-discount-partially-paid': '部分付款或已使用钱包的订单不可修改促销',
317
+ 'wallet-pass-module-discount-order-free': '订单金额为0,不可使用折扣卡或商品券',
302
318
  // Additional Module
303
319
  'additional.options': '附加选项',
304
320
  'add.tip': '添加小费',
@@ -402,7 +418,17 @@ export default {
402
418
  'pisell2.checkout.order-sync-failed': '订单同步失败,请检查网络',
403
419
  'pisell2.checkout.sync-retry-hint': '网络异常,请点击重试按钮重新同步订单',
404
420
  'pisell2.checkout.tips': '提示',
405
- 'retry': '重试'
421
+ 'retry': '重试',
422
+ // 现金支付模块
423
+ 'cash-payment-title': '现金支付',
424
+ 'cash-payment-balance-due': '应付金额',
425
+ 'cash-payment-cash-received': '实收金额',
426
+ 'cash-payment-change-due': '找零金额',
427
+ 'cash-payment-rounding': '抹零',
428
+ 'cash-payment-other': '其他',
429
+ 'cash-payment-reset': '重置',
430
+ 'cash-payment-pay': '支付',
431
+ 'cash-payment-amount-cannot-be-zero': '金额不能为0'
406
432
  },
407
433
  'zh-HK': {
408
434
  // Order and Payment
@@ -432,7 +458,9 @@ export default {
432
458
  'balance.due': '應付金額',
433
459
  'deposit.due': '定金待支付金額',
434
460
  'partial.paid': '部分支付',
461
+ 'deposit.partial.paid': '定金部分支付',
435
462
  'split.payment': '部分付款',
463
+ 'split.cancel': '取消\n部分支付',
436
464
  // Cash Payment
437
465
  'cash': '現金',
438
466
  'rounding': '捨入',
@@ -510,6 +538,7 @@ export default {
510
538
  'wallet-pass-module-disabled-modal-title': '無法使用的卡券',
511
539
  'wallet-pass-module-disabled-modal-empty': '暫無不可用卡券',
512
540
  'wallet-pass-module-discount-partially-paid': '部分付款或已使用錢包的訂單不可修改促銷',
541
+ 'wallet-pass-module-discount-order-free': '訂單金額為0,不可使用折扣卡或商品券',
513
542
  // search section
514
543
  'pisell2.checkout.search-section.placeholder': '錢包碼 / 短碼',
515
544
  // discount formatting
@@ -606,6 +635,16 @@ export default {
606
635
  'pisell2.checkout.order-sync-failed': '訂單同步失敗,請檢查網絡',
607
636
  'pisell2.checkout.sync-retry-hint': '網絡異常,請點擊重試按鈕重新同步訂單',
608
637
  'pisell2.checkout.tips': '提示',
609
- 'retry': '重試'
638
+ 'retry': '重試',
639
+ // 現金支付模組
640
+ 'cash-payment-title': '現金支付',
641
+ 'cash-payment-balance-due': '應付金額',
642
+ 'cash-payment-cash-received': '實收金額',
643
+ 'cash-payment-change-due': '找零金額',
644
+ 'cash-payment-rounding': '抹零',
645
+ 'cash-payment-other': '其他',
646
+ 'cash-payment-reset': '重置',
647
+ 'cash-payment-pay': '支付',
648
+ 'cash-payment-amount-cannot-be-zero': '金額不能為0'
610
649
  }
611
650
  };
@@ -121,6 +121,7 @@ export interface PaymentMethod {
121
121
  type: string;
122
122
  fixed?: number;
123
123
  percentage?: number;
124
+ totalAmount?: string;
124
125
  }
125
126
  export interface PaymentMethodSelection {
126
127
  method: PaymentMethod;
@@ -9,7 +9,7 @@ import { PosProps } from './const';
9
9
  */
10
10
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
11
11
  className?: string | undefined;
12
- onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
12
+ onChange?: ((status: "page" | "success" | "fail" | "print" | "mark_tx_processed", params?: string | {
13
13
  [keys: string]: unknown;
14
14
  } | undefined, other?: any) => void) | undefined;
15
15
  onClose: () => void;
@@ -11,7 +11,7 @@ import './device.less';
11
11
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, containerStyle, }: {
12
12
  api: PayProps['api'];
13
13
  className?: string | undefined;
14
- onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
14
+ onChange?: ((status: "page" | "success" | "fail" | "print" | "mark_tx_processed", params?: string | {
15
15
  [keys: string]: unknown;
16
16
  } | undefined, other?: any) => void) | undefined;
17
17
  onClose: () => void;
@@ -15,7 +15,7 @@ export declare const useStoreRef: <T extends {
15
15
  readonly numRef: React.MutableRefObject<string | number | undefined>;
16
16
  readonly orderIdRef: React.MutableRefObject<string | number>;
17
17
  readonly modeRef: React.MutableRefObject<ModeEnum>;
18
- readonly statusRef: React.MutableRefObject<"success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question">;
18
+ readonly statusRef: React.MutableRefObject<"loading" | "success" | "fail" | "warn" | "pedding" | "resove" | "reject" | "question">;
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
174
174
  export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
175
175
  type: EActionTypes;
176
176
  payload: {
177
- status: "success" | "warn" | "loading" | "fail" | "question";
177
+ status: "loading" | "success" | "fail" | "warn" | "question";
178
178
  };
179
179
  };
180
180
  /**
@@ -295,7 +295,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
295
295
  name?: string | undefined;
296
296
  symbol?: string | undefined;
297
297
  amount?: string | number | undefined;
298
- mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
298
+ mode?: "pay" | "refund" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
300
  eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
301
301
  action?: "amount" | "pay" | "deviceList" | undefined;
@@ -308,7 +308,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
308
308
  net?: boolean | undefined;
309
309
  component?: string | undefined;
310
310
  form?: string | undefined;
311
- status?: "success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
311
+ status?: "loading" | "success" | "fail" | "warn" | "pedding" | "resove" | "reject" | "question" | undefined;
312
312
  warn?: string | undefined;
313
313
  steps?: {
314
314
  /** 用于重置当前步骤 */
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface FormState {
3
2
  platform: 'pc' | 'h5' | '' | undefined;
4
3
  order: any;
@@ -29,11 +28,4 @@ export interface PayGroup {
29
28
  pay_number?: string;
30
29
  _order: any;
31
30
  }
32
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
33
- state: FormState;
34
- } & {
35
- dispatch: (params: {
36
- type: string;
37
- payload: any;
38
- }) => void;
39
- }>;
31
+ export declare const Provider: any, Context: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CalendarDataItem, ScheduleItem } from "./type";
3
2
  import dayjs from "dayjs";
4
3
  export interface FormState {
@@ -69,11 +68,4 @@ export interface FormState {
69
68
  };
70
69
  setGlobalState: Function | null;
71
70
  }
72
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
73
- state: FormState;
74
- } & {
75
- dispatch: (params: {
76
- type: string;
77
- payload: any;
78
- }) => void;
79
- }>;
71
+ export declare const Provider: any, Context: any;