@pisell/private-materials 3.3.25 → 3.3.27

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 (253) 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 +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +6 -6
  11. package/es/components/Sales/Customer/index.js +3 -1
  12. package/es/components/Sales/Event/Detail.js +5 -1
  13. package/es/components/Sales/Event/serve.d.ts +3 -0
  14. package/es/components/Sales/Init/index.d.ts +1 -0
  15. package/es/components/Sales/Init/index.js +3 -2
  16. package/es/components/Sales/Step/index.d.ts +2 -0
  17. package/es/components/Sales/Step/index.js +13 -4
  18. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +5 -5
  19. package/es/components/appointmentBooking/components/Services/index.js +2 -0
  20. package/es/components/appointmentBooking/deposit/index.js +2 -2
  21. package/es/components/booking/addons/model.d.ts +1 -10
  22. package/es/components/booking/addons/model.js +5 -5
  23. package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
  24. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  25. package/es/components/booking/components/browserSelect/index.js +1 -1
  26. package/es/components/booking/components/footer/index.d.ts +1 -0
  27. package/es/components/booking/components/footer/utils.js +16 -15
  28. package/es/components/booking/forms/model.d.ts +1 -10
  29. package/es/components/booking/forms/model.js +5 -5
  30. package/es/components/booking/forms/single/index.d.ts +1 -0
  31. package/es/components/booking/hooks/useQuotation.d.ts +4 -0
  32. package/es/components/booking/hooks/useQuotation.js +256 -0
  33. package/es/components/booking/info/model.d.ts +1 -10
  34. package/es/components/booking/info/service/addService/index.js +4 -4
  35. package/es/components/booking/info/service/editService/index.js +6 -3
  36. package/es/components/booking/info/service/index.js +4 -1
  37. package/es/components/booking/info/service/like/index.js +1 -1
  38. package/es/components/booking/info/service2/Group/utils.js +1 -1
  39. package/es/components/booking/info/service2/hooks/useSelectPet.js +6 -4
  40. package/es/components/booking/info/service2/index.js +4 -1
  41. package/es/components/booking/info/utils.js +1 -1
  42. package/es/components/booking/info2/service/addService/index.d.ts +1 -0
  43. package/es/components/booking/info2/service/addService/index.js +29 -9
  44. package/es/components/booking/info2/service/editService/index.js +2 -0
  45. package/es/components/booking/info2/service/index.js +4 -1
  46. package/es/components/booking/locales.d.ts +6 -0
  47. package/es/components/booking/locales.js +9 -3
  48. package/es/components/booking/materiels/startTime/index.js +1 -1
  49. package/es/components/booking/model.d.ts +1 -9
  50. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  51. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  52. package/es/components/booking/notes/model.d.ts +1 -10
  53. package/es/components/booking/notes/model.js +5 -5
  54. package/es/components/booking/payments/model.d.ts +1 -10
  55. package/es/components/booking/payments/model.js +5 -5
  56. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +122 -31
  57. package/es/components/eventBooking/components/Provider/Event/index.js +20 -4
  58. package/es/components/eventBooking/components/Provider/Resource/index.js +26 -5
  59. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +2 -2
  60. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +1 -1
  61. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.js +5 -2
  62. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  63. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.js +7 -2
  64. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +3 -0
  65. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.js +60 -0
  66. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.less +63 -0
  67. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.d.ts +9 -0
  68. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.js +59 -0
  69. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.less +7 -0
  70. package/es/components/eventBooking/components/scheduleCalendar/index.d.ts +1 -0
  71. package/es/components/eventBooking/components/scheduleCalendar/index.js +30 -21
  72. package/es/components/eventBooking/components/scheduleCalendar/index.less +2 -0
  73. package/es/components/eventBooking/index.js +2 -2
  74. package/es/components/eventBooking/locales.d.ts +6 -0
  75. package/es/components/eventBooking/locales.js +166 -160
  76. package/es/components/listComponent/index.js +5 -5
  77. package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +3 -0
  78. package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.js +3 -2
  79. package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
  80. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +73 -20
  81. package/es/components/pay/toC/PaymentMethods/WalletPass/index.less +30 -0
  82. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +2 -0
  83. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -1
  84. package/es/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.d.ts +16 -0
  85. package/es/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.js +60 -0
  86. package/es/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.less +38 -0
  87. package/es/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.d.ts +17 -0
  88. package/es/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.js +98 -0
  89. package/es/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.less +133 -0
  90. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +7 -0
  91. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.js +34 -0
  92. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.less +23 -0
  93. package/es/components/pay/toC/WalletPassBlock/index.d.ts +9 -2
  94. package/es/components/pay/toC/WalletPassBlock/index.js +119 -21
  95. package/es/components/pay/toC/WalletPassBlock/index.less +82 -13
  96. package/es/components/pay/toC/index.js +138 -89
  97. package/es/components/pay/toC/locales.d.ts +69 -3
  98. package/es/components/pay/toC/locales.js +132 -6
  99. package/es/components/pay/toC/model.d.ts +5 -9
  100. package/es/components/pay/toC/model.js +9 -0
  101. package/es/components/pay/toC/serve.d.ts +23 -0
  102. package/es/components/pay/toC/serve.js +34 -2
  103. package/es/components/pay/toC/utils.d.ts +3 -1
  104. package/es/components/pay/toC/utils.js +8 -3
  105. package/es/components/productExtension/card/index.js +3 -3
  106. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  107. package/es/components/productExtension/fields/Forms/index.js +12 -12
  108. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  109. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  110. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  111. package/es/components/productExtension/server.js +2 -2
  112. package/es/components/productSelect/components/productGroup/index.less +4 -12
  113. package/es/components/productSelect/index.less +1 -1
  114. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  115. package/es/components/schedules/calendar/index.js +4 -4
  116. package/es/components/schedules/calendar/serve.js +2 -2
  117. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  118. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  119. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  120. package/es/components/schedules/components/ResourceList/index.js +1 -1
  121. package/es/components/schedules/components/Search/index.js +5 -5
  122. package/es/components/schedules/model.d.ts +1 -9
  123. package/es/components/schedules/model.js +5 -5
  124. package/es/components/schedules/openHours/index.js +1 -1
  125. package/es/components/schedules/openHours/serve.js +2 -2
  126. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  127. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  128. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  129. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  130. package/es/components/schedules/products/serve.js +2 -2
  131. package/es/components/schedules/products/utils.js +5 -5
  132. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  133. package/es/components/schedules/resources/detail/index.js +10 -10
  134. package/es/components/schedules/resources/list/index.js +2 -2
  135. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  136. package/es/components/schedules/resources/serve.js +2 -2
  137. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  138. package/es/components/schedules/utils.js +4 -4
  139. package/es/components/selectModal/index.js +2 -2
  140. package/es/components/ticketBooking/components/addServiceVariant/addService.js +15 -20
  141. package/es/components/ticketBooking/components/menuBar/index.less +0 -1
  142. package/es/components/ticketBooking/components/ticketBooking/index.less +2 -4
  143. package/es/components/wallet/Detail/model.d.ts +1 -13
  144. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  145. package/es/components/wallet/PointCard/model.d.ts +1 -13
  146. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  147. package/es/components/wallet/Voucher/model.d.ts +1 -13
  148. package/es/components/wallet/model.d.ts +1 -9
  149. package/es/hooks/useComponents.js +1 -1
  150. package/es/hooks/useLocale.d.ts +2 -0
  151. package/es/hooks/useLocale.js +7 -0
  152. package/es/hooks/useLoginUser.d.ts +2 -0
  153. package/es/hooks/useLoginUser.js +19 -0
  154. package/lib/components/Sales/Customer/index.js +3 -1
  155. package/lib/components/Sales/Event/Detail.js +5 -1
  156. package/lib/components/Sales/Event/serve.d.ts +3 -0
  157. package/lib/components/Sales/Init/index.d.ts +1 -0
  158. package/lib/components/Sales/Init/index.js +3 -2
  159. package/lib/components/Sales/Step/index.d.ts +2 -0
  160. package/lib/components/Sales/Step/index.js +13 -4
  161. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +2 -2
  162. package/lib/components/appointmentBooking/components/Services/index.js +2 -0
  163. package/lib/components/appointmentBooking/deposit/index.js +2 -2
  164. package/lib/components/booking/addons/model.d.ts +1 -10
  165. package/lib/components/booking/components/footer/index.d.ts +1 -0
  166. package/lib/components/booking/components/footer/utils.js +5 -4
  167. package/lib/components/booking/forms/model.d.ts +1 -10
  168. package/lib/components/booking/forms/single/index.d.ts +1 -0
  169. package/lib/components/booking/hooks/useQuotation.d.ts +4 -0
  170. package/lib/components/booking/hooks/useQuotation.js +210 -0
  171. package/lib/components/booking/info/model.d.ts +1 -10
  172. package/lib/components/booking/info/service/addService/index.js +2 -3
  173. package/lib/components/booking/info/service/editService/index.js +5 -2
  174. package/lib/components/booking/info/service/index.js +3 -1
  175. package/lib/components/booking/info/service2/Group/utils.js +2 -2
  176. package/lib/components/booking/info/service2/hooks/useSelectPet.js +5 -3
  177. package/lib/components/booking/info/service2/index.js +3 -1
  178. package/lib/components/booking/info/utils.js +1 -1
  179. package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
  180. package/lib/components/booking/info2/service/addService/index.js +25 -17
  181. package/lib/components/booking/info2/service/editService/index.js +2 -1
  182. package/lib/components/booking/info2/service/index.js +3 -1
  183. package/lib/components/booking/locales.d.ts +6 -0
  184. package/lib/components/booking/locales.js +9 -3
  185. package/lib/components/booking/model.d.ts +1 -9
  186. package/lib/components/booking/notes/model.d.ts +1 -10
  187. package/lib/components/booking/payments/model.d.ts +1 -10
  188. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +52 -4
  189. package/lib/components/eventBooking/components/Provider/Event/index.js +15 -3
  190. package/lib/components/eventBooking/components/Provider/Resource/index.js +16 -3
  191. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +2 -2
  192. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +7 -7
  193. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.js +3 -1
  194. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  195. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.js +6 -5
  196. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +3 -0
  197. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.js +75 -0
  198. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.less +63 -0
  199. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.d.ts +9 -0
  200. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.js +64 -0
  201. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.less +7 -0
  202. package/lib/components/eventBooking/components/scheduleCalendar/index.d.ts +1 -0
  203. package/lib/components/eventBooking/components/scheduleCalendar/index.js +17 -11
  204. package/lib/components/eventBooking/components/scheduleCalendar/index.less +2 -0
  205. package/lib/components/eventBooking/index.js +2 -2
  206. package/lib/components/eventBooking/locales.d.ts +6 -0
  207. package/lib/components/eventBooking/locales.js +10 -4
  208. package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +3 -0
  209. package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.js +2 -2
  210. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
  211. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +52 -11
  212. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.less +30 -0
  213. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +2 -0
  214. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -1
  215. package/lib/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.d.ts +16 -0
  216. package/lib/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.js +87 -0
  217. package/lib/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.less +38 -0
  218. package/lib/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.d.ts +17 -0
  219. package/lib/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.js +103 -0
  220. package/lib/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.less +133 -0
  221. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +7 -0
  222. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.js +52 -0
  223. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.less +23 -0
  224. package/lib/components/pay/toC/WalletPassBlock/index.d.ts +9 -2
  225. package/lib/components/pay/toC/WalletPassBlock/index.js +115 -20
  226. package/lib/components/pay/toC/WalletPassBlock/index.less +82 -13
  227. package/lib/components/pay/toC/index.js +35 -9
  228. package/lib/components/pay/toC/locales.d.ts +69 -3
  229. package/lib/components/pay/toC/locales.js +72 -6
  230. package/lib/components/pay/toC/model.d.ts +5 -9
  231. package/lib/components/pay/toC/model.js +10 -0
  232. package/lib/components/pay/toC/serve.d.ts +23 -0
  233. package/lib/components/pay/toC/serve.js +12 -6
  234. package/lib/components/pay/toC/utils.d.ts +3 -1
  235. package/lib/components/pay/toC/utils.js +8 -3
  236. package/lib/components/productSelect/components/productGroup/index.less +4 -12
  237. package/lib/components/productSelect/index.less +1 -1
  238. package/lib/components/schedules/model.d.ts +1 -9
  239. package/lib/components/schedules/utils.js +1 -1
  240. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +13 -16
  241. package/lib/components/ticketBooking/components/menuBar/index.less +0 -1
  242. package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -4
  243. package/lib/components/wallet/Detail/model.d.ts +1 -13
  244. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  245. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  246. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  247. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  248. package/lib/components/wallet/model.d.ts +1 -9
  249. package/lib/hooks/useLocale.d.ts +2 -0
  250. package/lib/hooks/useLocale.js +41 -0
  251. package/lib/hooks/useLoginUser.d.ts +2 -0
  252. package/lib/hooks/useLoginUser.js +50 -0
  253. package/package.json +2 -2
@@ -0,0 +1,256 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
8
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
9
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
10
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
12
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
13
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
14
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
15
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
16
+ import React, { useEffect, useMemo, useRef, useState } from 'react';
17
+ import { getProductTotalPrice } from "../utils";
18
+ import useEngineContext from "../../../../es/hooks/useEngineContext";
19
+ import { locales } from "@pisell/utils";
20
+ import { PisellModal } from "@pisell/materials";
21
+ var formatBundleItemMap = function formatBundleItemMap(product) {
22
+ return product.bundle_group.reduce(function (pre, cur) {
23
+ var curObj = {};
24
+ cur.bundle_item.forEach(function (item) {
25
+ curObj[item.id] = item;
26
+ });
27
+ return _objectSpread(_objectSpread({}, pre), curObj);
28
+ }, {});
29
+ };
30
+ var setNewCartValue = function setNewCartValue(cartValue, newProducts) {
31
+ if (!newProducts.length) {
32
+ return {
33
+ isChange: false,
34
+ value: cartValue
35
+ };
36
+ }
37
+
38
+ // 是否有报价单价格有改动
39
+ var isChange = false;
40
+
41
+ // 是否是套餐内子商品变更
42
+ var isBundleChange = false;
43
+
44
+ // 是否套餐子商品被删除
45
+ var isNotFoundBundle = false;
46
+ var notFoundProducts = [];
47
+ var value = cartValue.map(function (item) {
48
+ var _item$_extend, _item$_extend2;
49
+ var newProduct = newProducts.find(function (newItem) {
50
+ return newItem.id === item.product_id;
51
+ });
52
+ if (!newProduct) {
53
+ return item;
54
+ }
55
+ // 是否报价单变更价格更新
56
+ var isChangePrice = newProduct.price != item.price;
57
+ var bundleItemMap = formatBundleItemMap(newProduct);
58
+ var newBundle = (((_item$_extend = item._extend) === null || _item$_extend === void 0 || (_item$_extend = _item$_extend.other) === null || _item$_extend === void 0 ? void 0 : _item$_extend.bundle) || []).map(function (bundle) {
59
+ if (!bundleItemMap[bundle.id]) {
60
+ isNotFoundBundle = true;
61
+ if (!notFoundProducts.some(function (p) {
62
+ return p._id === bundle._id;
63
+ })) {
64
+ notFoundProducts.push(item);
65
+ }
66
+ return bundle;
67
+ }
68
+ if (bundle.price != bundleItemMap[bundle.id].price) {
69
+ isChangePrice = true;
70
+ isBundleChange = true;
71
+ }
72
+ return _objectSpread(_objectSpread({}, bundle), {}, {
73
+ base_price: bundleItemMap[bundle.id].base_price,
74
+ price: bundleItemMap[bundle.id].price
75
+ // product_price: bundleItemMap[item.id].product_price,
76
+ });
77
+ });
78
+
79
+ // 价格都没有变动时返回原始信息
80
+ if (!isChangePrice) {
81
+ return item;
82
+ } else {
83
+ isChange = true;
84
+ }
85
+ var newItem = _objectSpread(_objectSpread({}, item), {}, {
86
+ original_price: newProduct.original_price,
87
+ price: newProduct.price,
88
+ base_price: newProduct.base_price,
89
+ _extend: _objectSpread(_objectSpread({}, item._extend), {}, {
90
+ price: newProduct.price,
91
+ // total: newProduct.total,
92
+ bundle_edit: isBundleChange ? 1 : item._extend.bundle_edit,
93
+ other: _objectSpread(_objectSpread({}, item._extend.other), {}, {
94
+ option: (_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 || (_item$_extend2 = _item$_extend2.other) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.option,
95
+ bundle: newBundle
96
+ })
97
+ })
98
+ });
99
+ var total = getProductTotalPrice(newItem);
100
+ newItem._extend.total = total;
101
+ newItem._extend.origin_total = total;
102
+ return newItem;
103
+ });
104
+ return {
105
+ isChange: isChange,
106
+ value: value,
107
+ isNotFoundBundle: isNotFoundBundle,
108
+ notFoundProducts: notFoundProducts
109
+ };
110
+ };
111
+ var useQuotation = function useQuotation(state, dispatch) {
112
+ var _state$client3;
113
+ var context = useEngineContext();
114
+ var _useState = useState(false),
115
+ _useState2 = _slicedToArray(_useState, 2),
116
+ open = _useState2[0],
117
+ setOpen = _useState2[1];
118
+ var _useState3 = useState([]),
119
+ _useState4 = _slicedToArray(_useState3, 2),
120
+ products = _useState4[0],
121
+ setProducts = _useState4[1];
122
+ var cartValueRef = useRef(state.service.value || []);
123
+ cartValueRef.current = state.service.value;
124
+ var getCartQuotation = /*#__PURE__*/function () {
125
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
126
+ var data;
127
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
128
+ while (1) switch (_context.prev = _context.next) {
129
+ case 0:
130
+ if (cartValueRef.current.length) {
131
+ _context.next = 2;
132
+ break;
133
+ }
134
+ return _context.abrupt("return");
135
+ case 2:
136
+ _context.next = 4;
137
+ return state.apis.getServices({
138
+ skip: 1,
139
+ num: 500,
140
+ extension_type: state.renderType === 'eventBooking' ? undefined : ['product_appointment', 'appointment_ticket', 'service_product', 'session_product', 'session_ticket'],
141
+ with: ['category', 'resourceRelation'],
142
+ ids: cartValueRef.current.map(function (item) {
143
+ return item.product_id;
144
+ }),
145
+ open_quotation: 1,
146
+ with_schedule: 1,
147
+ with_count: ['bundleGroup', 'optionGroup'],
148
+ order_by_string: 'sort:desc',
149
+ status: 'published',
150
+ schedule_date: params === null || params === void 0 ? void 0 : params.schedule_date,
151
+ customer_id: params === null || params === void 0 ? void 0 : params.customer_id,
152
+ open_bundle: 1
153
+ });
154
+ case 4:
155
+ data = _context.sent;
156
+ return _context.abrupt("return", data);
157
+ case 6:
158
+ case "end":
159
+ return _context.stop();
160
+ }
161
+ }, _callee);
162
+ }));
163
+ return function getCartQuotation(_x) {
164
+ return _ref.apply(this, arguments);
165
+ };
166
+ }();
167
+ var currentDate = useMemo(function () {
168
+ return state.date.value.format('YYYY-MM-DD');
169
+ }, [state.date.value]);
170
+ var updateCartQuotation = /*#__PURE__*/function () {
171
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
172
+ var data, _setNewCartValue, isChange, newCartValue, isNotFoundBundle, notFoundProducts;
173
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
174
+ while (1) switch (_context2.prev = _context2.next) {
175
+ case 0:
176
+ _context2.next = 2;
177
+ return getCartQuotation(params);
178
+ case 2:
179
+ data = _context2.sent;
180
+ if (data) {
181
+ _context2.next = 5;
182
+ break;
183
+ }
184
+ return _context2.abrupt("return");
185
+ case 5:
186
+ _setNewCartValue = setNewCartValue(cartValueRef.current, data.list), isChange = _setNewCartValue.isChange, newCartValue = _setNewCartValue.value, isNotFoundBundle = _setNewCartValue.isNotFoundBundle, notFoundProducts = _setNewCartValue.notFoundProducts;
187
+ if (!isNotFoundBundle) {
188
+ _context2.next = 10;
189
+ break;
190
+ }
191
+ setProducts(notFoundProducts);
192
+ setOpen(true);
193
+ return _context2.abrupt("return");
194
+ case 10:
195
+ if (isChange) {
196
+ _context2.next = 12;
197
+ break;
198
+ }
199
+ return _context2.abrupt("return");
200
+ case 12:
201
+ dispatch({
202
+ type: "setService",
203
+ payload: {
204
+ value: newCartValue,
205
+ edit: true
206
+ }
207
+ });
208
+ case 13:
209
+ case "end":
210
+ return _context2.stop();
211
+ }
212
+ }, _callee2);
213
+ }));
214
+ return function updateCartQuotation(_x2) {
215
+ return _ref2.apply(this, arguments);
216
+ };
217
+ }();
218
+ var isEditClientOrDate = useMemo(function () {
219
+ var _state$client, _state$date;
220
+ return (state === null || state === void 0 || (_state$client = state.client) === null || _state$client === void 0 ? void 0 : _state$client.edit) || (state === null || state === void 0 || (_state$date = state.date) === null || _state$date === void 0 ? void 0 : _state$date.edit);
221
+ }, [state]);
222
+ useEffect(function () {
223
+ var _context$appHelper, _context$appHelper$ge, _state$client2;
224
+ var isQuotation = context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.businessUtils) === null || _context$appHelper === void 0 || (_context$appHelper$ge = _context$appHelper.getAppByModal) === null || _context$appHelper$ge === void 0 ? void 0 : _context$appHelper$ge.call(_context$appHelper, 'quotation');
225
+
226
+ // 没有报价单不走该流程 没有更新客户信息或者日期不更新不走该流程
227
+ if (!isQuotation || !isEditClientOrDate) return;
228
+ updateCartQuotation({
229
+ customer_id: (_state$client2 = state.client) === null || _state$client2 === void 0 || (_state$client2 = _state$client2.value) === null || _state$client2 === void 0 ? void 0 : _state$client2.id,
230
+ schedule_date: currentDate
231
+ });
232
+ }, [(_state$client3 = state.client) === null || _state$client3 === void 0 || (_state$client3 = _state$client3.value) === null || _state$client3 === void 0 ? void 0 : _state$client3.id, currentDate, isEditClientOrDate]);
233
+ var dom = useMemo(function () {
234
+ return /*#__PURE__*/React.createElement(PisellModal.Information, {
235
+ open: open,
236
+ platform: "pc",
237
+ title: locales.getText('pisell2.text.quotation.product.change.title'),
238
+ describe: /*#__PURE__*/React.createElement("div", null, locales.getText('pisell2.text.quotation.product.change.describe'), products.map(function (item) {
239
+ return /*#__PURE__*/React.createElement("div", null, item === null || item === void 0 ? void 0 : item.product_title);
240
+ })),
241
+ okText: locales.getText('pisell2.text.ok'),
242
+ closable: true,
243
+ cancelVisible: false,
244
+ onOk: function onOk() {
245
+ return setOpen(false);
246
+ },
247
+ onCancel: function onCancel() {
248
+ return setOpen(false);
249
+ }
250
+ });
251
+ }, [open, products]);
252
+ return {
253
+ dom: dom
254
+ };
255
+ };
256
+ export default useQuotation;
@@ -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;
@@ -126,9 +126,8 @@ var Info = function Info(props) {
126
126
  */
127
127
  var customerId = useMemo(function () {
128
128
  var _state$client;
129
- if (!isDay) return undefined;
130
129
  return ((_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id) || 1;
131
- }, [(_state$client2 = state.client) === null || _state$client2 === void 0 || (_state$client2 = _state$client2.value) === null || _state$client2 === void 0 ? void 0 : _state$client2.id, isDay]);
130
+ }, [(_state$client2 = state.client) === null || _state$client2 === void 0 || (_state$client2 = _state$client2.value) === null || _state$client2 === void 0 ? void 0 : _state$client2.id]);
132
131
 
133
132
  /**
134
133
  * @title: 如果商品只有一个, 则自动设置默认商品
@@ -248,7 +247,7 @@ var Info = function Info(props) {
248
247
  dayParams = {}; // 跨日预约
249
248
  if (isDay && !isEventBooking(state)) {
250
249
  dayParams.extension_type = ['normal', 'product_appointment'];
251
- dayParams.customer_id = customerId;
250
+ // dayParams.customer_id = customerId;
252
251
  }
253
252
  _context2.next = 9;
254
253
  return state.apis.getServices(_objectSpread({
@@ -262,7 +261,8 @@ var Info = function Info(props) {
262
261
  with_count: ['bundleGroup', 'optionGroup'],
263
262
  order_by_string: 'sort:desc',
264
263
  status: 'published',
265
- schedule_date: params === null || params === void 0 ? void 0 : params.schedule_date
264
+ schedule_date: params === null || params === void 0 ? void 0 : params.schedule_date,
265
+ customer_id: customerId
266
266
  }, dayParams));
267
267
  case 9:
268
268
  data = _context2.sent;
@@ -39,7 +39,7 @@ import { getNoResource } from "../../../mock";
39
39
  import { getDays, getErrorList, getProductTotalPrice, isSessionProduct } from "../../../utils";
40
40
  import { createBookingItemsByGroup, filterItemByGroupId, getGroupTotalPrice, isGroupBooking } from "../../service2/Group/utils";
41
41
  import useSelectPet from "../../service2/hooks/useSelectPet";
42
- import { disabledDate as _disabledDate, formatDayTime, isDayBooking, isDayBookingProduct, isEventBooking } from "../../service2/utils";
42
+ import { disabledDate as _disabledDate, formatDayTime, isDayBooking, isDayBookingProduct, isDaysBooking, isEventBooking } from "../../service2/utils";
43
43
  import { formatResources, getDurationProps, getFlexibleOption, getMultiDay, getTimeObj } from "../addService/utils";
44
44
  import Like from "../like";
45
45
  import { editSessionProduct, getMultiDayPrices } from "../../utils";
@@ -86,6 +86,9 @@ var Info = function Info(_, ref) {
86
86
  var isDayBookingMode = useMemo(function () {
87
87
  return isDayBooking(state);
88
88
  }, [state === null || state === void 0 ? void 0 : state.renderType]);
89
+ var isDaysBookingMode = useMemo(function () {
90
+ return isDaysBooking(state);
91
+ }, [state === null || state === void 0 ? void 0 : state.renderType]);
89
92
  var isEventBookingMode = useMemo(function () {
90
93
  return isEventBooking(state);
91
94
  }, [state === null || state === void 0 ? void 0 : state.renderType]);
@@ -692,7 +695,7 @@ var Info = function Info(_, ref) {
692
695
  },
693
696
  value: _objectSpread(_objectSpread(_objectSpread({}, ((_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.other) || {}), dayValue), sessionValue),
694
697
  isOS: isSession,
695
- customer_id: isDayBookingMode ? ((_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id) || 1 : undefined
698
+ customer_id: (_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id
696
699
  },
697
700
  callback: function () {
698
701
  var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(e, extension_type, detail) {
@@ -733,7 +736,7 @@ var Info = function Info(_, ref) {
733
736
  cacheItem: cacheItem
734
737
  }
735
738
  });
736
- if (isDayBookingMode) {
739
+ if (isDaysBookingMode) {
737
740
  setTimeout(function () {
738
741
  updateMultiDay({
739
742
  start_date: values.start_date,
@@ -6,6 +6,7 @@ import "./index.less";
6
6
  import ServiceList from "./serviceList";
7
7
  import AddTimeModal from "./addTimeModal";
8
8
  import useClearCart from "../../hooks/useClearCart";
9
+ import useQuotation from "../../hooks/useQuotation";
9
10
  var Service = function Service() {
10
11
  var _state$bookingConfig2;
11
12
  var _useContext = useContext(Context),
@@ -45,6 +46,8 @@ var Service = function Service() {
45
46
  }, 100);
46
47
  };
47
48
  var clearCart = useClearCart(state, dispatch);
49
+ var _useQuotation = useQuotation(state, dispatch),
50
+ dom = _useQuotation.dom;
48
51
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
49
52
  className: "pisell-lowcode__booking-service-wrap"
50
53
  }, clearCart, /*#__PURE__*/React.createElement(ServiceList, {
@@ -53,6 +56,6 @@ var Service = function Service() {
53
56
  onEdit: handleEdit
54
57
  }) : null), /*#__PURE__*/React.createElement(EditService, {
55
58
  ref: detailRef
56
- }), showAddTimeModal && /*#__PURE__*/React.createElement(AddTimeModal, null));
59
+ }), showAddTimeModal && /*#__PURE__*/React.createElement(AddTimeModal, null), dom);
57
60
  };
58
61
  export default /*#__PURE__*/React.memo(Service);
@@ -19,7 +19,7 @@ var Like = function Like(_ref) {
19
19
  }
20
20
  e.preventDefault();
21
21
  e.stopPropagation();
22
- onChange === null || onChange === void 0 ? void 0 : onChange(status === "like" ? "common" : "like");
22
+ onChange === null || onChange === void 0 || onChange(status === "like" ? "common" : "like");
23
23
  }
24
24
  });
25
25
  };
@@ -85,7 +85,7 @@ export var createBookingItemsByGroup = function createBookingItemsByGroup(item,
85
85
  var startDate = _extend.start_date.add(i, 'day');
86
86
  var endDate = _extend.start_date.add(i + 1, 'day');
87
87
  // 商品原始价格
88
- var price = ((_extend$multiDayPrice = _extend.multiDayPrices[startDate.format('YYYY-MM-DD')]) === null || _extend$multiDayPrice === void 0 ? void 0 : _extend$multiDayPrice.total) || item._extend.price;
88
+ var price = ((_extend$multiDayPrice = _extend.multiDayPrices) === null || _extend$multiDayPrice === void 0 || (_extend$multiDayPrice = _extend$multiDayPrice[startDate.format('YYYY-MM-DD')]) === null || _extend$multiDayPrice === void 0 ? void 0 : _extend$multiDayPrice.total) || item._extend.price;
89
89
  var cacheItem = _objectSpread(_objectSpread({}, item), {}, {
90
90
  // 编辑时组商品需要清空booking_id 否则会重复
91
91
  booking_id: isBatchEdit ? 0 : item.booking_id,
@@ -1,9 +1,9 @@
1
1
  import { useMemo } from 'react';
2
- import { formatHolderLists, isDaysBooking } from "../utils";
2
+ import { formatHolderLists, isDayBooking } from "../utils";
3
3
  var useSelectPet = function useSelectPet(state) {
4
4
  var _state$pet2, _state$pet4;
5
5
  var isDaysBookingBol = useMemo(function () {
6
- return isDaysBooking(state);
6
+ return isDayBooking(state);
7
7
  }, [state === null || state === void 0 ? void 0 : state.renderType]);
8
8
 
9
9
  /**
@@ -30,9 +30,11 @@ var useSelectPet = function useSelectPet(state) {
30
30
  */
31
31
  var holderLists = useMemo(function () {
32
32
  var _state$pet3;
33
+ var _lists = formatHolderLists(petLists);
34
+ return _lists;
33
35
  if (isDaysBookingBol) {
34
- var _lists = formatHolderLists(petLists);
35
- return _lists;
36
+ var _lists2 = formatHolderLists(petLists);
37
+ return _lists2;
36
38
  }
37
39
  return (state === null || state === void 0 || (_state$pet3 = state.pet) === null || _state$pet3 === void 0 ? void 0 : _state$pet3.holders) || [];
38
40
  }, [petLists, isDaysBookingBol, state === null || state === void 0 || (_state$pet4 = state.pet) === null || _state$pet4 === void 0 ? void 0 : _state$pet4.holders]);
@@ -9,6 +9,7 @@ import AddService from "../service/addService";
9
9
  import EditService from "../service/editService";
10
10
  import { Context } from "../model";
11
11
  import Lists from "./Lists";
12
+ import useQuotation from "../../hooks/useQuotation";
12
13
  export var Service2Context = /*#__PURE__*/createContext({});
13
14
  export var Service2Cart = function Service2Cart(_ref) {
14
15
  var hideAdd = _ref.hideAdd,
@@ -42,6 +43,8 @@ export var Service2Cart = function Service2Cart(_ref) {
42
43
  (_detailRef$current = detailRef.current) === null || _detailRef$current === void 0 || (_detailRef$current$in = _detailRef$current.init) === null || _detailRef$current$in === void 0 || _detailRef$current$in.call(_detailRef$current, cacheItem);
43
44
  }, 100);
44
45
  };
46
+ var _useQuotation = useQuotation(state, dispatch),
47
+ dom = _useQuotation.dom;
45
48
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
46
49
  className: "pisell-lowcode__booking-service-wrap"
47
50
  }, /*#__PURE__*/React.createElement(Lists, {
@@ -53,5 +56,5 @@ export var Service2Cart = function Service2Cart(_ref) {
53
56
  onEdit: handleEdit
54
57
  })), !hideEdit && /*#__PURE__*/React.createElement(EditService, {
55
58
  ref: detailRef
56
- }));
59
+ }), dom);
57
60
  };
@@ -95,7 +95,7 @@ export var isBooking4Shop = function isBooking4Shop(shopId, renderType) {
95
95
  if (renderType === 'eventBooking') {
96
96
  return false;
97
97
  }
98
- var booking4Shops = [1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 6813];
98
+ var booking4Shops = [1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 6813, 8609, 8610, 8782];
99
99
  return booking4Shops.includes(shopId);
100
100
  };
101
101
  function generateDateRange(start, end) {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PisellDrawerProps } from '../../../components/drawer';
2
3
  import '../../../info/service/addService/index.less';
3
4
  interface AddServiceProps {
@@ -35,7 +35,7 @@ import { locales, getUniqueId } from '@pisell/utils';
35
35
  import { useUpdateEffect } from 'ahooks';
36
36
  var shopList = [2886, 4422, 5538, 6930, 6814, 6813, 6812, 6087, 6303, 6080, 6978, 7386, 6848, 6305];
37
37
  var Info = function Info(props) {
38
- var _state$service2, _state$service4, _state$service5;
38
+ var _state$client2, _state$service2, _state$service4, _state$service5;
39
39
  var onEdit = props.onEdit,
40
40
  drawerProps = props.drawerProps,
41
41
  renderMode = props.renderMode;
@@ -56,6 +56,20 @@ var Info = function Info(props) {
56
56
  dispatch = dispatch || (props === null || props === void 0 ? void 0 : props.dispatch);
57
57
  request.setRequest(context.appHelper.utils.request);
58
58
 
59
+ /**
60
+ * @title: 客户id
61
+ * @description:
62
+ * @param {*} useMemo
63
+ * @return {*}
64
+ * @Author: WangHan
65
+ * @Date: 2024-12-24 10:33
66
+ */
67
+ var customerId = useMemo(function () {
68
+ var _state$client;
69
+ return ((_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id) || undefined;
70
+ }, [(_state$client2 = state.client) === null || _state$client2 === void 0 || (_state$client2 = _state$client2.value) === null || _state$client2 === void 0 ? void 0 : _state$client2.id]);
71
+ console.log(customerId, 'customerIdcustomerId');
72
+
59
73
  /**
60
74
  * @title: 如果商品只有一个, 则自动设置默认商品
61
75
  * @description:
@@ -182,7 +196,8 @@ var Info = function Info(props) {
182
196
  with_count: ['bundleGroup', 'optionGroup'],
183
197
  order_by_string: 'sort:desc',
184
198
  status: 'published',
185
- schedule_date: params === null || params === void 0 ? void 0 : params.schedule_date
199
+ schedule_date: params === null || params === void 0 ? void 0 : params.schedule_date,
200
+ customer_id: params === null || params === void 0 ? void 0 : params.customer_id
186
201
  });
187
202
  case 7:
188
203
  data = _context2.sent;
@@ -223,6 +238,7 @@ var Info = function Info(props) {
223
238
  }
224
239
  };
225
240
  var handleSelectProduct = function handleSelectProduct(item, type) {
241
+ var _state$client3;
226
242
  var isSession = isSessionProduct(item);
227
243
  // 是否有单规格 组合规格 套餐, 或者session商品 如果没有不需要打开弹窗
228
244
  var isEject = type === 'detail' || item.bundle_group_count > 0 || isSession;
@@ -239,7 +255,8 @@ var Info = function Info(props) {
239
255
  package: true
240
256
  },
241
257
  is_eject: isEject ? 1 : 0,
242
- isOS: isSession
258
+ isOS: isSession,
259
+ customer_id: (_state$client3 = state.client) === null || _state$client3 === void 0 || (_state$client3 = _state$client3.value) === null || _state$client3 === void 0 ? void 0 : _state$client3.id
243
260
  },
244
261
  callback: function callback(e, extension_type, detail) {
245
262
  // 防止选择商品弹窗多次触发callback
@@ -369,25 +386,28 @@ var Info = function Info(props) {
369
386
  useUpdateEffect(function () {
370
387
  if (state.service.addModal) {
371
388
  getServices({
372
- schedule_date: currentDate
389
+ schedule_date: currentDate,
390
+ customer_id: customerId
373
391
  });
374
392
  setSearch('');
375
393
  }
376
- }, [state.service.addModal, currentDate]);
394
+ }, [state.service.addModal, currentDate, customerId]);
377
395
  useEffect(function () {
378
396
  if (renderMode === 'current') {
379
397
  getServices({
380
- schedule_date: currentDate
398
+ schedule_date: currentDate,
399
+ customer_id: customerId
381
400
  });
382
401
  }
383
- }, [renderMode, currentDate]);
402
+ }, [renderMode, currentDate, customerId]);
384
403
  useEffect(function () {
385
404
  if (state.renderType === 'eventBooking' && state.modalOpen) {
386
405
  getServices({
387
- schedule_date: currentDate
406
+ schedule_date: currentDate,
407
+ customer_id: customerId
388
408
  });
389
409
  }
390
- }, [state.renderType, state.modalOpen, currentDate]);
410
+ }, [state.renderType, state.modalOpen, currentDate, customerId]);
391
411
  var addButton = useMemo(function () {
392
412
  if (state.isBookingCreatePage) {
393
413
  return /*#__PURE__*/React.createElement("div", {
@@ -386,6 +386,7 @@ var Info = function Info(_, ref) {
386
386
  * @Date: 2024-08-28 17:08
387
387
  */
388
388
  var handleEdit = function handleEdit(e) {
389
+ var _state$client;
389
390
  // 当前商品
390
391
  var item = state.service.cacheItem;
391
392
 
@@ -415,6 +416,7 @@ var Info = function Info(_, ref) {
415
416
  package: true
416
417
  },
417
418
  isOS: isSession,
419
+ customer_id: (_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id,
418
420
  value: _objectSpread(_objectSpread({}, item._extend.other), sessionValue)
419
421
  },
420
422
  callback: function callback(e, extension_type, detail) {
@@ -7,6 +7,7 @@ import AddTimeModal from "./addTimeModal";
7
7
  import useInfoHolder from "../../info/hooks/useInfoHolder";
8
8
  import Lists from "../../info/service/Lists";
9
9
  import useClearCart from "../../hooks/useClearCart";
10
+ import useQuotation from "../../hooks/useQuotation";
10
11
  var Service = function Service() {
11
12
  var _useContext = useContext(Context),
12
13
  state = _useContext.state,
@@ -21,6 +22,8 @@ var Service = function Service() {
21
22
  document.body.id = 'body';
22
23
  }, []);
23
24
  var clearCart = useClearCart(state, dispatch);
25
+ var _useQuotation = useQuotation(state, dispatch),
26
+ dom = _useQuotation.dom;
24
27
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
25
28
  className: "pisell-lowcode__booking-service-wrap"
26
29
  }, clearCart, /*#__PURE__*/React.createElement(Lists, {
@@ -34,6 +37,6 @@ var Service = function Service() {
34
37
  onEdit: handleEdit
35
38
  }) : null), /*#__PURE__*/React.createElement(EditService, {
36
39
  ref: detailRef
37
- }), showAddTimeModal && /*#__PURE__*/React.createElement(AddTimeModal, null));
40
+ }), showAddTimeModal && /*#__PURE__*/React.createElement(AddTimeModal, null), dom);
38
41
  };
39
42
  export default /*#__PURE__*/React.memo(Service);
@@ -266,6 +266,8 @@ declare const _default: {
266
266
  'pisell2.text.validity.expired': (str: string) => string;
267
267
  'pisell2.text.validity.expiring_soon': (str: string) => string;
268
268
  'pisell2.text.validity.valid_through': (str: string) => string;
269
+ 'pisell2.text.quotation.product.change.title': string;
270
+ 'pisell2.text.quotation.product.change.describe': string;
269
271
  };
270
272
  'zh-CN': {
271
273
  'pisell2.text.refunded-amount': string;
@@ -534,6 +536,8 @@ declare const _default: {
534
536
  'pisell2.text.validity.expired': (str: string) => string;
535
537
  'pisell2.text.validity.expiring_soon': (str: string) => string;
536
538
  'pisell2.text.validity.valid_through': (str: string) => string;
539
+ 'pisell2.text.quotation.product.change.title': string;
540
+ 'pisell2.text.quotation.product.change.describe': string;
537
541
  };
538
542
  'zh-HK': {
539
543
  'pisell2.text.refunded-amount': string;
@@ -802,6 +806,8 @@ declare const _default: {
802
806
  'pisell2.text.validity.expired': (str: string) => string;
803
807
  'pisell2.text.validity.expiring_soon': (str: string) => string;
804
808
  'pisell2.text.validity.valid_through': (str: string) => string;
809
+ 'pisell2.text.quotation.product.change.title': string;
810
+ 'pisell2.text.quotation.product.change.describe': string;
805
811
  };
806
812
  };
807
813
  export default _default;