@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
@@ -11,9 +11,10 @@ import { getSumCapacity } from "../../info2/utilsByBooking";
11
11
  import { getDays } from "../../utils";
12
12
  import { appointmentTypes } from "../../info/service2/status";
13
13
  import { isDaysBooking, formatDayTime, isEventBooking, isNormalProductByDurationSchedule, genRowKey } from "../../info/service2/utils";
14
- import { isArr, locales, sendWarningLog } from '@pisell/utils';
14
+ import { isArr, locales, sendWarningLog, getUniqueId } from '@pisell/utils';
15
15
  import { PisellToast } from "@pisell/materials";
16
16
  import { getClientName } from "../../../../plus/clientName/utils";
17
+ import { cloneDeep } from 'lodash';
17
18
  var formatNote = function formatNote(data) {
18
19
  var _data$notes;
19
20
  return ((_data$notes = data.notes) === null || _data$notes === void 0 ? void 0 : _data$notes.orderNote) || "";
@@ -274,7 +275,7 @@ var formatSellingPrice = function formatSellingPrice(item) {
274
275
  return Number((_item$_extend9 = item._extend) === null || _item$_extend9 === void 0 ? void 0 : _item$_extend9.total);
275
276
  };
276
277
  var formatMetaData = function formatMetaData(item) {
277
- var _item$_extend10, _item$_extend11, _item$_extend13;
278
+ var _item$_extend10, _item$_extend11, _item$_extend13, _item$_extend15;
278
279
  var metadata = {};
279
280
  if ((_item$_extend10 = item._extend) !== null && _item$_extend10 !== void 0 && _item$_extend10.capacity) {
280
281
  metadata.capacity = item._extend.capacity;
@@ -290,6 +291,10 @@ var formatMetaData = function formatMetaData(item) {
290
291
  var _item$_extend14;
291
292
  metadata.multiDayPrices = (_item$_extend14 = item._extend) === null || _item$_extend14 === void 0 ? void 0 : _item$_extend14.multiDayPrices;
292
293
  }
294
+ if ((_item$_extend15 = item._extend) !== null && _item$_extend15 !== void 0 && _item$_extend15.unique_identification_number) {
295
+ var _item$_extend16;
296
+ metadata.unique_identification_number = (_item$_extend16 = item._extend) === null || _item$_extend16 === void 0 ? void 0 : _item$_extend16.unique_identification_number;
297
+ }
293
298
  return metadata;
294
299
  };
295
300
 
@@ -309,9 +314,9 @@ var formatMetaData = function formatMetaData(item) {
309
314
 
310
315
  // 获取商品价格 包含组合规格
311
316
  var getSourceProductPrice = function getSourceProductPrice(item) {
312
- var _item$_extend15, _item$_extend16, _item$variant2;
313
- var other = (_item$_extend15 = item._extend) === null || _item$_extend15 === void 0 ? void 0 : _item$_extend15.other;
314
- var price = Number((_item$_extend16 = item._extend) === null || _item$_extend16 === void 0 ? void 0 : _item$_extend16.price);
317
+ var _item$_extend17, _item$_extend18, _item$variant2;
318
+ var other = (_item$_extend17 = item._extend) === null || _item$_extend17 === void 0 ? void 0 : _item$_extend17.other;
319
+ var price = Number((_item$_extend18 = item._extend) === null || _item$_extend18 === void 0 ? void 0 : _item$_extend18.price);
315
320
 
316
321
  // 组合规格: 根据当前选择的组合规格id 和商品的组合规格列表 获取当前商品的价格
317
322
  if ((other === null || other === void 0 ? void 0 : other.product_variant_id) > 0 && (item === null || item === void 0 || (_item$variant2 = item.variant) === null || _item$variant2 === void 0 ? void 0 : _item$variant2.length) > 0) {
@@ -334,7 +339,7 @@ var getSourceProductPrice = function getSourceProductPrice(item) {
334
339
  * @Date: 2024-12-07 14:21
335
340
  */
336
341
  var formatProducts = function formatProducts(item, quantity) {
337
- var _item$_extend17, _item$_extend18, _item$_extend19, _item$_extend20;
342
+ var _item$_extend19, _item$_extend20, _item$_extend21, _item$_extend22;
338
343
  var total = Number(item._extend.total);
339
344
  var origin_total = Number(item._extend.origin_total);
340
345
  var discount_amount = origin_total - total;
@@ -342,6 +347,11 @@ var formatProducts = function formatProducts(item, quantity) {
342
347
 
343
348
  // 加价时type使用change_price
344
349
  var discount_type = discount_amount < 0 ? 'change_price' : 'discount';
350
+ discount_list.forEach(function (d) {
351
+ d.metadata = _objectSpread(_objectSpread({}, d.metadata), {}, {
352
+ unique_identification_number: "".concat(item._extend.unique_identification_number, "_").concat(d.discount.resource_id)
353
+ });
354
+ });
345
355
 
346
356
  // 非手动折扣
347
357
  var notManualDiscount = discount_list.filter(function (item) {
@@ -359,21 +369,22 @@ var formatProducts = function formatProducts(item, quantity) {
359
369
  "discount_amount": notManualDiscount.length > 0 ? 0 : discount_amount,
360
370
  "product_discount_reason": item._extend.discount_reason || '',
361
371
  "is_charge_tax": item.is_charge_tax,
362
- "note": ((_item$_extend17 = item._extend) === null || _item$_extend17 === void 0 ? void 0 : _item$_extend17.note) || '',
372
+ "note": ((_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.note) || '',
363
373
  "discountway": item._extend.discountway || "num",
364
374
  "discount_per": item._extend.discount_per,
365
375
  "discount_type": item._extend.discount_type || discount_type,
366
376
  "order_detail_id": item._extend.order_detail_id || 0,
367
- "product_bundle": formatProductBundle((_item$_extend18 = item._extend) === null || _item$_extend18 === void 0 || (_item$_extend18 = _item$_extend18.other) === null || _item$_extend18 === void 0 ? void 0 : _item$_extend18.bundle),
377
+ "product_bundle": formatProductBundle((_item$_extend20 = item._extend) === null || _item$_extend20 === void 0 || (_item$_extend20 = _item$_extend20.other) === null || _item$_extend20 === void 0 ? void 0 : _item$_extend20.bundle),
368
378
  "bundle_edit": item._extend.bundle_edit,
369
- "product_option_item": formatProductOption((_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 || (_item$_extend19 = _item$_extend19.other) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.option),
370
- "product_variant_id": ((_item$_extend20 = item._extend) === null || _item$_extend20 === void 0 || (_item$_extend20 = _item$_extend20.other) === null || _item$_extend20 === void 0 ? void 0 : _item$_extend20.product_variant_id) || 0,
379
+ "product_option_item": formatProductOption((_item$_extend21 = item._extend) === null || _item$_extend21 === void 0 || (_item$_extend21 = _item$_extend21.other) === null || _item$_extend21 === void 0 ? void 0 : _item$_extend21.option),
380
+ "product_variant_id": ((_item$_extend22 = item._extend) === null || _item$_extend22 === void 0 || (_item$_extend22 = _item$_extend22.other) === null || _item$_extend22 === void 0 ? void 0 : _item$_extend22.product_variant_id) || 0,
371
381
  "discount_list": notManualDiscount,
372
382
  metadata: formatMetaData(item),
373
383
  // checkout 需求新增字段
374
384
  "calculated_original_price": formatOriginalPrice(item),
375
385
  "calculated_selling_price": formatSellingPrice(item),
376
- "tax_fee": item._extend.tax_fee
386
+ "tax_fee": item._extend.tax_fee,
387
+ "custom_deposit_data": item.custom_deposit_data
377
388
  };
378
389
  };
379
390
 
@@ -391,8 +402,8 @@ var formatDayRelationProducts = function formatDayRelationProducts(data, booking
391
402
 
392
403
  // 过滤出卡片中的普通商品
393
404
  var relation_products = list === null || list === void 0 ? void 0 : list.filter(function (item) {
394
- var _item$_extend21;
395
- var holderId = (_item$_extend21 = item._extend) === null || _item$_extend21 === void 0 ? void 0 : _item$_extend21.holder_id;
405
+ var _item$_extend23;
406
+ var holderId = (_item$_extend23 = item._extend) === null || _item$_extend23 === void 0 ? void 0 : _item$_extend23.holder_id;
396
407
  var bookingHolderId = booking_item._extend.holder_id;
397
408
  var isDayBookingProduct = appointmentTypes.includes(item.extension_type);
398
409
  return holderId && holderId === bookingHolderId && !isDayBookingProduct;
@@ -418,15 +429,15 @@ var formatAppointmentProductLists = function formatAppointmentProductLists(data)
418
429
 
419
430
  // 找出预约商品
420
431
  list = list.filter(function (item) {
421
- var _item$_extend22;
422
- return ((_item$_extend22 = item._extend) === null || _item$_extend22 === void 0 ? void 0 : _item$_extend22.holder_id) && !isNormalProductByDurationSchedule(item);
432
+ var _item$_extend24;
433
+ return ((_item$_extend24 = item._extend) === null || _item$_extend24 === void 0 ? void 0 : _item$_extend24.holder_id) && !isNormalProductByDurationSchedule(item);
423
434
  });
424
435
 
425
436
  // 对预约商品列表根据holder_id进行分组
426
437
  var groupMap = new Map();
427
438
  list.forEach(function (item) {
428
- var _item$_extend23;
429
- var key = (_item$_extend23 = item._extend) === null || _item$_extend23 === void 0 ? void 0 : _item$_extend23.holder_id; // 分组键
439
+ var _item$_extend25;
440
+ var key = (_item$_extend25 = item._extend) === null || _item$_extend25 === void 0 ? void 0 : _item$_extend25.holder_id; // 分组键
430
441
  if (!groupMap.has(key)) {
431
442
  groupMap.set(key, []);
432
443
  }
@@ -487,6 +498,7 @@ var formatBookings = function formatBookings(data, values) {
487
498
  var eventOtherParams = data.eventOtherParams;
488
499
  var bookings = [];
489
500
  list.forEach(function (item) {
501
+ var _item$_extend30;
490
502
  // 自定义商品直接使用 _extend 中的数据,并将 id 转换为 0 提交给后端
491
503
  if (item.isCustomItem) {
492
504
  bookings.push(_objectSpread(_objectSpread({}, item._extend), {}, {
@@ -507,9 +519,9 @@ var formatBookings = function formatBookings(data, values) {
507
519
 
508
520
  // 跨日预约下的普通商品
509
521
  if (isDay) {
510
- var _item$_extend24, _item$_extend25, _item$_extend26, _item$_extend27;
511
- var startDate = ((_item$_extend24 = item._extend) === null || _item$_extend24 === void 0 ? void 0 : _item$_extend24.startDate) || ((_item$_extend25 = item._extend) === null || _item$_extend25 === void 0 ? void 0 : _item$_extend25.start_date);
512
- var endDate = ((_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.endDate) || ((_item$_extend27 = item._extend) === null || _item$_extend27 === void 0 ? void 0 : _item$_extend27.end_date);
522
+ var _item$_extend26, _item$_extend27, _item$_extend28, _item$_extend29;
523
+ var startDate = ((_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.startDate) || ((_item$_extend27 = item._extend) === null || _item$_extend27 === void 0 ? void 0 : _item$_extend27.start_date);
524
+ var endDate = ((_item$_extend28 = item._extend) === null || _item$_extend28 === void 0 ? void 0 : _item$_extend28.endDate) || ((_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.end_date);
513
525
  var _formatDayTime = formatDayTime({
514
526
  startDate: startDate,
515
527
  endDate: endDate
@@ -531,8 +543,13 @@ var formatBookings = function formatBookings(data, values) {
531
543
  }
532
544
  }, 'minutes');
533
545
  }
546
+ if (!((_item$_extend30 = item._extend) !== null && _item$_extend30 !== void 0 && _item$_extend30.unique_identification_number)) {
547
+ var unique_identification_number = getUniqueId();
548
+ item._extend.unique_identification_number = unique_identification_number;
549
+ }
534
550
  var booking = _objectSpread(_objectSpread({
535
551
  "product": formatProducts(item),
552
+ "metadata": formatMetaData(item),
536
553
  "relation_products": formatRelationDetails(item._extend.relation_details),
537
554
  'id': item.booking_id || 0,
538
555
  "relation_id": item._extend.relation_id || 0,
@@ -551,7 +568,6 @@ var formatBookings = function formatBookings(data, values) {
551
568
  cacheItem: item
552
569
  }) : item._extend.number || 1,
553
570
  "resources": formatResource(item),
554
- "metadata": formatMetaData(item),
555
571
  "note": item._extend.note
556
572
  }, eventOtherParams || {}), dayParams);
557
573
  if (isDay) {
@@ -559,12 +575,15 @@ var formatBookings = function formatBookings(data, values) {
559
575
  return;
560
576
  }
561
577
  for (var i = 0; i < (item._extend.quantity || 1); i++) {
578
+ var newItem = cloneDeep(item);
579
+ newItem._extend.unique_identification_number = "".concat(item._extend.unique_identification_number, "_").concat(i);
562
580
  bookings.push(_objectSpread(_objectSpread({}, booking), {}, {
563
- "product": formatProducts(item, 1),
581
+ "product": formatProducts(newItem, 1),
564
582
  "number": item._extend.capacity ? getSumCapacity({
565
- cacheItem: item
566
- }, false) : item._extend.number || 1,
567
- "holder": getHolderByIndex(booking.holder, i)
583
+ cacheItem: newItem
584
+ }, false) : newItem._extend.number || 1,
585
+ "holder": getHolderByIndex(booking.holder, i),
586
+ "metadata": formatMetaData(newItem)
568
587
  }));
569
588
  }
570
589
  });
@@ -584,14 +603,19 @@ var formatRelationProducts = function formatRelationProducts(data, type) {
584
603
  var list = ((_data$service = data.service) === null || _data$service === void 0 ? void 0 : _data$service.value) || [];
585
604
  // open items 下的商品
586
605
  list = list.filter(function (item) {
587
- var _item$_extend28;
606
+ var _item$_extend31;
588
607
  return (
589
608
  // 跨日预约把普通商品加在relationProducts 活动预约按之前逻辑
590
- type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$_extend28 = item._extend) === null || _item$_extend28 === void 0 ? void 0 : _item$_extend28.holder_id) && appointmentTypes.includes(item.extension_type)
609
+ type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$_extend31 = item._extend) === null || _item$_extend31 === void 0 ? void 0 : _item$_extend31.holder_id) && appointmentTypes.includes(item.extension_type)
591
610
  );
592
611
  });
593
612
  var relationProducts = [];
594
613
  relationProducts = list.map(function (item) {
614
+ var _item$_extend32;
615
+ if (!((_item$_extend32 = item._extend) !== null && _item$_extend32 !== void 0 && _item$_extend32.unique_identification_number)) {
616
+ var unique_identification_number = getUniqueId();
617
+ item._extend.unique_identification_number = unique_identification_number;
618
+ }
595
619
  return formatProducts(item);
596
620
  });
597
621
  return relationProducts || [];
@@ -607,6 +631,11 @@ var formatNormalProducts = function formatNormalProducts(data) {
607
631
  });
608
632
  var relationProducts = [];
609
633
  relationProducts = list.map(function (item) {
634
+ var _item$_extend33;
635
+ if (!((_item$_extend33 = item._extend) !== null && _item$_extend33 !== void 0 && _item$_extend33.unique_identification_number)) {
636
+ var unique_identification_number = getUniqueId();
637
+ item._extend.unique_identification_number = unique_identification_number;
638
+ }
610
639
  return formatProducts(item);
611
640
  });
612
641
  return relationProducts || [];
@@ -721,19 +750,19 @@ export var checkHolderIsError = function checkHolderIsError(state) {
721
750
  var _state$client;
722
751
  var errorRowKey = "";
723
752
  var holderError = state.service.value.some(function (item) {
724
- var _item$_extend30;
753
+ var _item$_extend35;
725
754
  // 普通商品不需要检测holder
726
755
  if (isNormalProductByDurationSchedule(item)) {
727
756
  return false;
728
757
  }
729
758
  if (item._extend.quantity === 1 && !item._extend.holder_id) {
730
- var _item$_extend29;
731
- errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 || (_item$_extend29 = _item$_extend29.other) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.rowKey);
759
+ var _item$_extend34;
760
+ errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend34 = item._extend) === null || _item$_extend34 === void 0 || (_item$_extend34 = _item$_extend34.other) === null || _item$_extend34 === void 0 ? void 0 : _item$_extend34.rowKey);
732
761
  return true;
733
762
  }
734
- if (item._extend.quantity > 1 && ((_item$_extend30 = item._extend) === null || _item$_extend30 === void 0 || (_item$_extend30 = _item$_extend30.holder_id) === null || _item$_extend30 === void 0 ? void 0 : _item$_extend30.length) !== item._extend.quantity) {
735
- var _item$_extend31;
736
- errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend31 = item._extend) === null || _item$_extend31 === void 0 || (_item$_extend31 = _item$_extend31.other) === null || _item$_extend31 === void 0 ? void 0 : _item$_extend31.rowKey);
763
+ if (item._extend.quantity > 1 && ((_item$_extend35 = item._extend) === null || _item$_extend35 === void 0 || (_item$_extend35 = _item$_extend35.holder_id) === null || _item$_extend35 === void 0 ? void 0 : _item$_extend35.length) !== item._extend.quantity) {
764
+ var _item$_extend36;
765
+ errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend36 = item._extend) === null || _item$_extend36 === void 0 || (_item$_extend36 = _item$_extend36.other) === null || _item$_extend36 === void 0 ? void 0 : _item$_extend36.rowKey);
737
766
  return true;
738
767
  }
739
768
  return false;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,14 +1,5 @@
1
- /// <reference types="react" />
2
- import { FormState } from '../model';
3
1
  export declare const walkInData: {
4
2
  id: number;
5
3
  nickname: string;
6
4
  };
7
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
- state: FormState;
9
- } & {
10
- dispatch: (params: {
11
- type: string;
12
- payload: any;
13
- }) => void;
14
- }>;
5
+ export declare const Provider: any, Context: any;
@@ -31,6 +31,11 @@ var _miniRedux = miniRedux({
31
31
  service: _objectSpread(_objectSpread(_objectSpread({}, state.service), payload), obj)
32
32
  });
33
33
  },
34
+ setPaymentPaid: function setPaymentPaid(state, payload) {
35
+ state.setGlobalState({
36
+ paymentPaid: _objectSpread(_objectSpread({}, state.paymentPaid), payload)
37
+ });
38
+ },
34
39
  setDate: function setDate(state, payload) {
35
40
  state.setGlobalState({
36
41
  date: _objectSpread(_objectSpread({}, state.date), payload)
@@ -173,7 +173,8 @@ var Info = function Info(props) {
173
173
  _context.next = 13;
174
174
  return getProductDetail(product.id, {
175
175
  schedule_date: state.date.value.format('YYYY-MM-DD'),
176
- customer_id: customerId
176
+ customer_id: customerId,
177
+ open_deposit: 1
177
178
  });
178
179
  case 13:
179
180
  detail = _context.sent;
@@ -6,7 +6,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
6
6
  type: string;
7
7
  value: number;
8
8
  };
9
- locale: string;
9
+ locale: any;
10
10
  slice: any;
11
11
  selectProps: {
12
12
  size: string;
@@ -248,4 +248,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
248
248
  * @Author: WangHan
249
249
  * @Date: 2024-12-24 11:32
250
250
  */
251
- export declare const updateServicePrice: (state: any) => Promise<any> | never[];
251
+ export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
@@ -34,7 +34,7 @@ import useCreateBookingPageHeader from "../hooks/useCreateBookingPageHeader";
34
34
  import { getLocale } from "../../../utils/locales";
35
35
  import { useDebounceEffect } from 'ahooks';
36
36
  import CartClientCard from "./cartClientCard";
37
- import { Iconfont } from '@pisell/materials';
37
+ import { Iconfont, useToast } from '@pisell/materials';
38
38
  var defaultModules = {
39
39
  client: 1,
40
40
  date: 1,
@@ -80,6 +80,7 @@ var Info = Provider(function (props) {
80
80
  });
81
81
  }
82
82
  }, []);
83
+ var Toast = useToast();
83
84
  useMemo(function () {
84
85
  var _context$appHelper, _context$appHelper$ge, _context$appHelper2, _context$appHelper2$i, _context$appHelper3;
85
86
  // TODO: 优化 内部每次设置state会触发两次渲染
@@ -95,6 +96,41 @@ var Info = Provider(function (props) {
95
96
  })
96
97
  });
97
98
  }, [globalState]);
99
+ var dropdownProps = useMemo(function () {
100
+ var icon = /*#__PURE__*/React.createElement(Iconfont, {
101
+ type: 'pisell2-switch-horizontal-01',
102
+ size: 24,
103
+ style: {
104
+ color: '#667085'
105
+ }
106
+ });
107
+ // if (globalState?.isBookingTicket2) {
108
+ // if (modal.state?.service?.value?.some((n: any) => n?.edit)) {
109
+ // return {
110
+ // open: false,
111
+ // buttonProps: {
112
+ // icon,
113
+ // size: 'default',
114
+ // onClick: () => {
115
+ // // todo 根据当前订单付款情况判断是否可以切换
116
+ // Toast?.info?.(
117
+ // locales.getText(
118
+ // 'pisell2.checkout.client-card.tip.partially-paid'
119
+ // )
120
+ // );
121
+ // },
122
+ // style: { cursor: 'not-allowed' },
123
+ // },
124
+ // };
125
+ // }
126
+ // }
127
+ return {
128
+ buttonProps: {
129
+ icon: icon,
130
+ size: 'default'
131
+ }
132
+ };
133
+ }, [modal.state]);
98
134
  var addNote = function addNote(e) {
99
135
  modal.dispatch({
100
136
  type: 'setNotes',
@@ -288,7 +324,11 @@ var Info = Provider(function (props) {
288
324
  flex: 1,
289
325
  overflow: 'hidden'
290
326
  }
291
- }, /*#__PURE__*/React.createElement(CartClientCard, null)) : /*#__PURE__*/React.createElement(Client, null) : null, globalState !== null && globalState !== void 0 && globalState.isBookingTicket2 ? /*#__PURE__*/React.createElement("div", {
327
+ }, /*#__PURE__*/React.createElement(CartClientCard, {
328
+ clientCardProps: {
329
+ dropdown: dropdownProps
330
+ }
331
+ })) : /*#__PURE__*/React.createElement(Client, null) : null, globalState !== null && globalState !== void 0 && globalState.isBookingTicket2 ? /*#__PURE__*/React.createElement("div", {
292
332
  className: "booking-info-client-line-code",
293
333
  onClick: function onClick() {
294
334
  var _globalState$onQrCode;
@@ -115,7 +115,8 @@ var Info = function Info(props) {
115
115
  product = list[0];
116
116
  _context.next = 13;
117
117
  return getProductDetail(product.id, {
118
- schedule_date: state.date.value.format('YYYY-MM-DD')
118
+ schedule_date: state.date.value.format('YYYY-MM-DD'),
119
+ open_deposit: 1
119
120
  });
120
121
  case 13:
121
122
  detail = _context.sent;
@@ -7,7 +7,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
7
7
  type: string;
8
8
  value: number;
9
9
  };
10
- locale: string;
10
+ locale: any;
11
11
  slice: any;
12
12
  selectProps: {
13
13
  size: string;
@@ -30,7 +30,7 @@ import { renderBundles } from "../../../components/collapsibleList/utils";
30
30
  import "./index.less";
31
31
  import { useUpdateEffect, useMemoizedFn, useDebounceFn } from 'ahooks';
32
32
  // import SelectTime from "../../../../../../../materials/src/components/select-time";
33
- import { PisellAdjustPriceInputNumber, ConfigProvider } from '@pisell/materials';
33
+ import { ConfigProvider, Iconfont } from '@pisell/materials';
34
34
  import { addService, genServiceKey, getIsShowNumber } from "../../../../ticketBooking/utils";
35
35
  import { isNormalProductByDurationSchedule } from "../../../info/service2/utils";
36
36
  import { editSessionProduct } from "../../../info/utils";
@@ -38,6 +38,7 @@ import { deleteCacheParams, getProductTotalPrice, getServiceTimes, isSessionProd
38
38
  import { getErrorList, getIsNoSpecAndPackage } from "../../utilsByBooking";
39
39
  import { formatResources, getDurationProps, getFlexibleOption, getTimeObj, setDefaultCapacitys } from "../addService/utils";
40
40
  import NoteModal from "../../../../../plus/noteModal";
41
+ import { DiscountKeyboard } from "../../../../../pro/priceKeyboard";
41
42
  var submitLock = false;
42
43
  var Info = function Info(_, ref) {
43
44
  var _state$service4, _state$bookingConfig2, _state$bookingConfig3, _state$service$cacheI5, _state$service$cacheI6, _state$service6, _window$BaseMaterials, _state$service8, _state$service$cacheI11, _state$bookingConfig5, _state$service$cacheI12, _state$service$cacheI13, _state$service9, _state$service$resour2, _state$service$cacheI14, _state$service$cacheI15;
@@ -666,7 +667,7 @@ var Info = function Info(_, ref) {
666
667
  required: true
667
668
  }],
668
669
  extra: useTotal !== ((_state$service$cacheI7 = state.service.cacheItem) === null || _state$service$cacheI7 === void 0 || (_state$service$cacheI7 = _state$service$cacheI7._extend) === null || _state$service$cacheI7 === void 0 ? void 0 : _state$service$cacheI7.origin_total) && locales.getText('page.booking.text.price-extra')(formatAmount((_state$service$cacheI8 = state.service.cacheItem) === null || _state$service$cacheI8 === void 0 || (_state$service$cacheI8 = _state$service$cacheI8._extend) === null || _state$service$cacheI8 === void 0 ? void 0 : _state$service$cacheI8.origin_total, 2, state.amountSymbol), formatAmount(useTotal, 2, state.amountSymbol))
669
- }, /*#__PURE__*/React.createElement(PisellAdjustPriceInputNumber, {
670
+ }, /*#__PURE__*/React.createElement(DiscountKeyboard.InputNumber, {
670
671
  style: {
671
672
  width: '100%'
672
673
  },
@@ -675,8 +676,15 @@ var Info = function Info(_, ref) {
675
676
  prefix: state.amountSymbol,
676
677
  onChange: handleTotalChange,
677
678
  disabled: state.channelDisabledEdit,
678
- originValue: ((_state$service$cacheI9 = state.service.cacheItem) === null || _state$service$cacheI9 === void 0 || (_state$service$cacheI9 = _state$service$cacheI9._extend) === null || _state$service$cacheI9 === void 0 ? void 0 : _state$service$cacheI9.origin_total) || 0,
679
- placeholder: ((_state$service$cacheI10 = state.service.cacheItem) === null || _state$service$cacheI10 === void 0 || (_state$service$cacheI10 = _state$service$cacheI10._extend) === null || _state$service$cacheI10 === void 0 ? void 0 : _state$service$cacheI10.origin_total) || '0'
679
+ originalValue: ((_state$service$cacheI9 = state.service.cacheItem) === null || _state$service$cacheI9 === void 0 || (_state$service$cacheI9 = _state$service$cacheI9._extend) === null || _state$service$cacheI9 === void 0 ? void 0 : _state$service$cacheI9.origin_total) || 0,
680
+ placeholder: ((_state$service$cacheI10 = state.service.cacheItem) === null || _state$service$cacheI10 === void 0 || (_state$service$cacheI10 = _state$service$cacheI10._extend) === null || _state$service$cacheI10 === void 0 ? void 0 : _state$service$cacheI10.origin_total) || '0',
681
+ size: "large",
682
+ keyboardProps: {
683
+ containerProps: {
684
+ renderType: 'modal'
685
+ },
686
+ selectType: 'dark'
687
+ }
680
688
  })));
681
689
  }, [useTotal, (_state$service$cacheI11 = state.service.cacheItem) === null || _state$service$cacheI11 === void 0 || (_state$service$cacheI11 = _state$service$cacheI11._extend) === null || _state$service$cacheI11 === void 0 ? void 0 : _state$service$cacheI11.origin_total, state.amountSymbol, state.channelDisabledEdit]);
682
690
  var reason = useMemo(function () {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface FormState {
3
2
  amountSymbol: string;
4
3
  apis: {
@@ -106,11 +105,4 @@ export declare const walkInData: {
106
105
  id: number;
107
106
  nickname: string;
108
107
  };
109
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
110
- state: FormState;
111
- } & {
112
- dispatch: (params: {
113
- type: string;
114
- payload: any;
115
- }) => void;
116
- }>;
108
+ export declare const Provider: any, Context: any;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -18,6 +18,7 @@ import { locales } from '@pisell/utils';
18
18
  import { isDayBooking, formatDayDate } from "./info/service2/utils";
19
19
  import { intersectionBy } from 'lodash';
20
20
  import { getAppointmentTimingPreference } from "./info2/utilsByBooking";
21
+ import Decimal from 'decimal.js';
21
22
  var Request = /*#__PURE__*/function () {
22
23
  function Request() {
23
24
  _classCallCheck(this, Request);
@@ -757,27 +758,31 @@ export var getServerItemExtend = function getServerItemExtend(state, cacheItem,
757
758
  // 商品价格: (商品价格 + (套餐价格 + 单规格价格 * 单规格数量) * 套餐数量 + 单规格价格 * 单规格数量) * 商品数量
758
759
  export var getProductTotalPrice = function getProductTotalPrice(item) {
759
760
  var _item$_extend;
760
- var price = Number(item._extend.price);
761
+ var price = new Decimal(item._extend.price || 0);
761
762
  var other = (_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : _item$_extend.other;
762
763
 
763
764
  // 多规格
764
765
  if (other !== null && other !== void 0 && other.product_variant_id) {
765
- price = Number(other === null || other === void 0 ? void 0 : other.price);
766
+ price = new Decimal((other === null || other === void 0 ? void 0 : other.price) || 0);
766
767
  }
767
768
  if (other !== null && other !== void 0 && other.bundle) {
768
769
  // bundle
769
770
  price = other === null || other === void 0 ? void 0 : other.bundle.reduce(function (accumulator, currentValue) {
770
- return accumulator + Number(currentValue.price) * Number(currentValue.num);
771
+ var currentPrice = new Decimal(currentValue.price || 0);
772
+ var currentNum = new Decimal(currentValue.num || 0);
773
+ return accumulator.add(currentPrice.mul(currentNum));
771
774
  }, price);
772
775
  }
773
776
 
774
777
  // 单规格
775
778
  if (other !== null && other !== void 0 && other.option) {
776
779
  price = other === null || other === void 0 ? void 0 : other.option.reduce(function (accumulator, currentValue) {
777
- return accumulator + Number(currentValue.price) * Number(currentValue.num);
780
+ var currentPrice = new Decimal(currentValue.price || 0);
781
+ var currentNum = new Decimal(currentValue.num || 0);
782
+ return accumulator.add(currentPrice.mul(currentNum));
778
783
  }, price);
779
784
  }
780
- return price;
785
+ return price.toNumber();
781
786
  };
782
787
  /**
783
788
  * @title: 判断 duration
@@ -23,6 +23,8 @@ interface PaymentModalProps {
23
23
  }
24
24
  interface PaymentModalMainProps extends PaymentModalProps {
25
25
  onClose?: (reset?: boolean) => void;
26
+ setEditCartMode?: (order_id: number, payData: any, closeModal: boolean) => void;
27
+ editOrderId?: number;
26
28
  }
27
29
  declare const PaymentModal: React.FC<PaymentModalMainProps>;
28
30
  export type { PaymentModalData, PaymentModalProps };