@pisell/private-materials 6.5.26 → 6.6.1
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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +146 -165
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.js +4 -2
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +273 -76
- package/es/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/es/components/appointmentBooking/hooks.d.ts +1 -0
- package/es/components/appointmentBooking/hooks.js +30 -30
- package/es/components/appointmentBooking/locales.d.ts +3 -0
- package/es/components/appointmentBooking/locales.js +9 -6
- package/es/components/booking/components/actionButtons/index.js +34 -20
- package/es/components/booking/components/customSelect/index.js +1 -1
- package/es/components/booking/components/footer/amount.js +25 -8
- package/es/components/booking/components/footer/index.js +66 -33
- package/es/components/booking/components/footer/utils.d.ts +7 -0
- package/es/components/booking/components/footer/utils.js +126 -99
- package/es/components/booking/components/voucher/index.js +25 -9
- package/es/components/booking/dashboard/serve.js +1 -6
- package/es/components/booking/forms/footer.js +24 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/forms/serve.js +2 -12
- package/es/components/booking/hooks/useQuotation.js +69 -21
- package/es/components/booking/info/client/index.js +28 -13
- package/es/components/booking/info/client/serve.js +2 -11
- package/es/components/booking/info/clientVariant/hooks/useClientFn.js +16 -10
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +10 -2
- package/es/components/booking/info/clientVariant/vertical/index.js +1 -1
- package/es/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
- package/es/components/booking/info/hooks/useHolderConfig.js +9 -2
- package/es/components/booking/info/main.js +3 -2
- package/es/components/booking/info/model.js +5 -0
- package/es/components/booking/info/pet/serve.js +1 -6
- package/es/components/booking/info/service/Lists.d.ts +1 -1
- package/es/components/booking/info/service/Lists.js +10 -4
- package/es/components/booking/info/service/addTimeModal/serve.js +1 -11
- package/es/components/booking/info/service/serve.d.ts +14 -0
- package/es/components/booking/info/service/serve.js +25 -18
- package/es/components/booking/info/service2/Group/utils.js +2 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -33
- package/es/components/booking/info/service2/utils.js +92 -56
- package/es/components/booking/info/utils.js +5 -0
- package/es/components/booking/info2/cartClientCard/index.js +49 -9
- package/es/components/booking/info2/index.js +3 -2
- package/es/components/booking/info2/serve.js +1 -6
- package/es/components/booking/info2/service/addService/index.js +146 -89
- package/es/components/booking/info2/service/addService/utils.d.ts +8 -0
- package/es/components/booking/info2/service/addService/utils.js +83 -14
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/es/components/booking/info2/service/contactInfoMode/index.js +94 -0
- package/es/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
- package/es/components/booking/info2/service/editService/Holder/index.js +193 -0
- package/es/components/booking/info2/service/editService/Holder/index.less +63 -0
- package/es/components/booking/info2/service/editService/index.js +313 -57
- package/es/components/booking/info2/utilsByBooking.js +19 -14
- package/es/components/booking/locales.d.ts +36 -0
- package/es/components/booking/locales.js +48 -3
- package/es/components/booking/model.d.ts +4 -0
- package/es/components/booking/model.js +3 -0
- package/es/components/booking/utils/confirmHolderModal.d.ts +13 -0
- package/es/components/booking/utils/confirmHolderModal.js +318 -0
- package/es/components/booking/utils/confirmHolderModal.less +40 -0
- package/es/components/booking/utils/selectHolderModal.d.ts +24 -0
- package/es/components/booking/utils/selectHolderModal.js +407 -0
- package/es/components/booking/utils.d.ts +16 -7
- package/es/components/booking/utils.js +26 -37
- package/es/components/checkout/PaymentModal.js +61 -30
- package/es/components/checkout/components/CashPaymentModule/index.js +1 -7
- package/es/components/checkout/components/ScrollableList/index.js +0 -1
- package/es/components/checkout/locales.d.ts +3 -0
- package/es/components/checkout/locales.js +3 -0
- package/es/components/eftposPay/linkly/index.js +64 -2
- package/es/components/eftposPay/tyro/index.js +12 -0
- package/es/components/list/List.js +3 -0
- package/es/components/pay/toB/components/MX51/index.js +14 -44
- package/es/components/pay/toB/types/index.d.ts +0 -12
- package/es/components/pay/toB/types/index.js +0 -4
- package/es/components/shoppingCart/components/Cart/Product.js +6 -3
- package/es/components/shoppingCart/type.d.ts +1 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +0 -12
- package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
- package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +119 -0
- package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -2
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +419 -794
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -2
- package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -4
- package/es/components/ticketBooking/components/addServiceVariant/utils.js +1 -2
- package/es/components/ticketBooking/components/menuBar/index.js +109 -12
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +2 -4
- package/es/components/ticketBooking/components/ticketBooking/index.js +32 -61
- package/es/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/es/components/ticketBooking/components/timeBar/index.js +1 -4
- package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -4
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +122 -170
- package/es/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/index.js +0 -2
- package/es/components/ticketBooking/serve.js +17 -119
- package/es/components/ticketBooking/utils/index.d.ts +7 -1
- package/es/components/ticketBooking/utils/index.js +44 -28
- package/es/hooks/useEngineContext.d.ts +0 -1
- package/es/hooks/useEngineContext.js +0 -7
- package/es/index.d.ts +4 -0
- package/es/index.js +5 -1
- package/es/plus/clientCard/locales.js +3 -3
- package/es/plus/clinetSearch/index.js +28 -30
- package/es/plus/clinetSearch/locales.d.ts +3 -0
- package/es/plus/clinetSearch/locales.js +7 -4
- package/es/plus/clinetSearch/types.d.ts +12 -0
- package/es/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/es/plus/contactInfo/components/Avatar/index.js +30 -0
- package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/es/plus/contactInfo/components/SwipeAction/index.js +360 -0
- package/es/plus/contactInfo/components/SwipeAction/index.less +74 -0
- package/es/plus/contactInfo/index.d.ts +6 -0
- package/es/plus/contactInfo/index.js +198 -0
- package/es/plus/contactInfo/index.less +621 -0
- package/es/plus/contactInfo/locales.d.ts +15 -0
- package/es/plus/contactInfo/locales.js +14 -0
- package/es/plus/contactInfo/types.d.ts +91 -0
- package/es/plus/contactInfo/types.js +1 -0
- package/es/plus/contactInfo/utils.d.ts +7 -0
- package/es/plus/contactInfo/utils.js +50 -0
- package/es/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/es/plus/contactInfoModal/ContactInfoContent.js +74 -0
- package/es/plus/contactInfoModal/index.d.ts +41 -0
- package/es/plus/contactInfoModal/index.js +155 -0
- package/es/plus/contactInfoModal/index.less +19 -0
- package/es/plus/contactInfoModal/locales.d.ts +66 -0
- package/es/plus/contactInfoModal/locales.js +65 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +1 -1
- package/es/plus/productSelect/ProductCard/index.js +1 -1
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
- package/es/plus/selectHolder/components/ErrorTip/index.js +14 -0
- package/es/plus/selectHolder/components/ErrorTip/index.less +51 -0
- package/es/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
- package/es/plus/selectHolder/components/HolderItem/index.js +77 -0
- package/es/plus/selectHolder/components/HolderItem/index.less +105 -0
- package/es/plus/selectHolder/components/HolderList/index.d.ts +30 -0
- package/es/plus/selectHolder/components/HolderList/index.js +43 -0
- package/es/plus/selectHolder/index.d.ts +7 -0
- package/es/plus/selectHolder/index.js +273 -0
- package/es/plus/selectHolder/index.less +137 -0
- package/es/plus/selectHolder/locales.d.ts +24 -0
- package/es/plus/selectHolder/locales.js +29 -0
- package/es/plus/selectHolder/types.d.ts +104 -0
- package/es/plus/selectHolder/types.js +1 -0
- package/es/plus/selectHolder/utils.d.ts +9 -0
- package/es/plus/selectHolder/utils.js +16 -0
- package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/es/pro/comprehensiveSearch/locales.js +1 -1
- package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
- package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.js +357 -0
- package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
- package/es/pro/multiDayTimeSelect/index.d.ts +3 -0
- package/es/pro/multiDayTimeSelect/index.js +1 -0
- package/es/pro/multiDayTimeSelect/types.d.ts +28 -0
- package/es/pro/multiDayTimeSelect/types.js +1 -0
- package/es/pro/skuDetailModal/types.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +6 -3
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +156 -13
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +15 -0
- package/lib/components/appointmentBooking/hooks.d.ts +1 -0
- package/lib/components/appointmentBooking/hooks.js +73 -35
- package/lib/components/appointmentBooking/locales.d.ts +3 -0
- package/lib/components/appointmentBooking/locales.js +6 -3
- package/lib/components/booking/components/actionButtons/index.js +11 -2
- package/lib/components/booking/components/customSelect/index.js +1 -1
- package/lib/components/booking/components/footer/amount.js +23 -6
- package/lib/components/booking/components/footer/index.js +26 -5
- package/lib/components/booking/components/footer/utils.d.ts +7 -0
- package/lib/components/booking/components/footer/utils.js +120 -82
- package/lib/components/booking/components/voucher/index.js +10 -1
- package/lib/components/booking/dashboard/serve.js +1 -6
- package/lib/components/booking/forms/footer.js +29 -11
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/forms/serve.js +2 -12
- package/lib/components/booking/hooks/useQuotation.js +45 -13
- package/lib/components/booking/info/client/index.js +14 -1
- package/lib/components/booking/info/client/serve.js +2 -13
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.js +7 -2
- package/lib/components/booking/info/clientVariant/vertical/SelectDrawer.js +11 -4
- package/lib/components/booking/info/clientVariant/vertical/index.js +34 -17
- package/lib/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
- package/lib/components/booking/info/hooks/useHolderConfig.js +8 -3
- package/lib/components/booking/info/main.js +5 -4
- package/lib/components/booking/info/model.js +5 -0
- package/lib/components/booking/info/pet/serve.js +1 -6
- package/lib/components/booking/info/service/Lists.d.ts +1 -1
- package/lib/components/booking/info/service/Lists.js +5 -3
- package/lib/components/booking/info/service/addTimeModal/serve.js +1 -7
- package/lib/components/booking/info/service/serve.d.ts +14 -0
- package/lib/components/booking/info/service/serve.js +8 -17
- package/lib/components/booking/info/service2/Group/utils.js +2 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -33
- package/lib/components/booking/info/service2/utils.js +38 -29
- package/lib/components/booking/info/utils.js +4 -0
- package/lib/components/booking/info2/cartClientCard/index.js +34 -5
- package/lib/components/booking/info2/index.js +11 -5
- package/lib/components/booking/info2/serve.js +1 -6
- package/lib/components/booking/info2/service/addService/index.js +22 -3
- package/lib/components/booking/info2/service/addService/utils.d.ts +8 -0
- package/lib/components/booking/info2/service/addService/utils.js +48 -11
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +2 -0
- package/lib/components/booking/info2/service/contactInfoMode/index.js +111 -0
- package/lib/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
- package/lib/components/booking/info2/service/editService/Holder/index.js +199 -0
- package/lib/components/booking/info2/service/editService/Holder/index.less +63 -0
- package/lib/components/booking/info2/service/editService/index.js +254 -32
- package/lib/components/booking/info2/utilsByBooking.js +26 -19
- package/lib/components/booking/locales.d.ts +36 -0
- package/lib/components/booking/locales.js +42 -3
- package/lib/components/booking/model.d.ts +4 -0
- package/lib/components/booking/model.js +3 -0
- package/lib/components/booking/utils/confirmHolderModal.d.ts +13 -0
- package/lib/components/booking/utils/confirmHolderModal.js +253 -0
- package/lib/components/booking/utils/confirmHolderModal.less +40 -0
- package/lib/components/booking/utils/selectHolderModal.d.ts +24 -0
- package/lib/components/booking/utils/selectHolderModal.js +319 -0
- package/lib/components/booking/utils.d.ts +16 -7
- package/lib/components/booking/utils.js +18 -21
- package/lib/components/checkout/PaymentModal.js +41 -18
- package/lib/components/checkout/components/CashPaymentModule/index.js +1 -7
- package/lib/components/checkout/components/ScrollableList/index.js +0 -1
- package/lib/components/checkout/locales.d.ts +3 -0
- package/lib/components/checkout/locales.js +3 -0
- package/lib/components/eftposPay/linkly/index.js +31 -1
- package/lib/components/eftposPay/tyro/index.js +12 -0
- package/lib/components/list/List.js +3 -0
- package/lib/components/pay/toB/components/MX51/index.js +12 -37
- package/lib/components/pay/toB/types/index.d.ts +0 -12
- package/lib/components/shoppingCart/components/Cart/Product.js +7 -3
- package/lib/components/shoppingCart/type.d.ts +1 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +0 -12
- package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
- package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +118 -0
- package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -2
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +279 -313
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -2
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +5 -3
- package/lib/components/ticketBooking/components/addServiceVariant/utils.js +1 -2
- package/lib/components/ticketBooking/components/menuBar/index.js +42 -6
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +2 -4
- package/lib/components/ticketBooking/components/ticketBooking/index.js +12 -49
- package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -1
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/timeBar/index.js +1 -3
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -4
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +69 -98
- package/lib/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/index.js +0 -2
- package/lib/components/ticketBooking/serve.js +15 -117
- package/lib/components/ticketBooking/utils/index.d.ts +7 -1
- package/lib/components/ticketBooking/utils/index.js +29 -23
- package/lib/hooks/useEngineContext.d.ts +0 -1
- package/lib/hooks/useEngineContext.js +2 -10
- package/lib/index.d.ts +4 -0
- package/lib/index.js +12 -0
- package/lib/plus/clientCard/locales.js +3 -3
- package/lib/plus/clinetSearch/index.js +17 -8
- package/lib/plus/clinetSearch/locales.d.ts +3 -0
- package/lib/plus/clinetSearch/locales.js +7 -4
- package/lib/plus/clinetSearch/types.d.ts +12 -0
- package/lib/plus/contactInfo/components/Avatar/index.d.ts +10 -0
- package/lib/plus/contactInfo/components/Avatar/index.js +56 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.js +373 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.less +74 -0
- package/lib/plus/contactInfo/index.d.ts +6 -0
- package/lib/plus/contactInfo/index.js +226 -0
- package/lib/plus/contactInfo/index.less +621 -0
- package/lib/plus/contactInfo/locales.d.ts +15 -0
- package/lib/plus/contactInfo/locales.js +38 -0
- package/lib/plus/contactInfo/types.d.ts +91 -0
- package/lib/plus/contactInfo/types.js +17 -0
- package/lib/plus/contactInfo/utils.d.ts +7 -0
- package/lib/plus/contactInfo/utils.js +64 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +3 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.js +129 -0
- package/lib/plus/contactInfoModal/index.d.ts +41 -0
- package/lib/plus/contactInfoModal/index.js +139 -0
- package/lib/plus/contactInfoModal/index.less +19 -0
- package/lib/plus/contactInfoModal/locales.d.ts +66 -0
- package/lib/plus/contactInfoModal/locales.js +89 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +1 -1
- package/lib/plus/productSelect/ProductCard/index.js +1 -1
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
- package/lib/plus/selectHolder/components/ErrorTip/index.js +30 -0
- package/lib/plus/selectHolder/components/ErrorTip/index.less +51 -0
- package/lib/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
- package/lib/plus/selectHolder/components/HolderItem/index.js +101 -0
- package/lib/plus/selectHolder/components/HolderItem/index.less +105 -0
- package/lib/plus/selectHolder/components/HolderList/index.d.ts +30 -0
- package/lib/plus/selectHolder/components/HolderList/index.js +63 -0
- package/lib/plus/selectHolder/index.d.ts +7 -0
- package/lib/plus/selectHolder/index.js +223 -0
- package/lib/plus/selectHolder/index.less +137 -0
- package/lib/plus/selectHolder/locales.d.ts +24 -0
- package/lib/plus/selectHolder/locales.js +47 -0
- package/lib/plus/selectHolder/types.d.ts +104 -0
- package/lib/plus/selectHolder/types.js +17 -0
- package/lib/plus/selectHolder/utils.d.ts +9 -0
- package/lib/plus/selectHolder/utils.js +34 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/lib/pro/comprehensiveSearch/locales.js +1 -1
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.js +304 -0
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
- package/lib/pro/multiDayTimeSelect/index.d.ts +3 -0
- package/lib/{hooks/printer.js → pro/multiDayTimeSelect/index.js} +6 -31
- package/lib/pro/multiDayTimeSelect/types.d.ts +28 -0
- package/lib/pro/multiDayTimeSelect/types.js +17 -0
- package/lib/pro/skuDetailModal/types.d.ts +1 -0
- package/lowcode/contact-info/fragments/cardStyle.ts +68 -0
- package/lowcode/contact-info/fragments/nameStyle.ts +33 -0
- package/lowcode/contact-info/fragments/pisellAvatar.ts +103 -0
- package/lowcode/contact-info/fragments/textStyle.ts +33 -0
- package/lowcode/contact-info/meta.ts +199 -0
- package/lowcode/contact-info-modal/meta.ts +98 -0
- package/lowcode/event-select-holder/meta.ts +2 -2
- package/lowcode/select-holder/meta.ts +220 -0
- package/lowcode/select-holder/snippets.ts +41 -0
- package/package.json +13 -11
- package/es/hooks/printer.d.ts +0 -4
- package/es/hooks/printer.js +0 -35
- package/lib/hooks/printer.d.ts +0 -4
|
@@ -40,6 +40,7 @@ var import_utils2 = require("@pisell/utils");
|
|
|
40
40
|
var import_materials = require("@pisell/materials");
|
|
41
41
|
var import_serve = require("../info/service/serve");
|
|
42
42
|
var import_decimal = __toESM(require("decimal.js"));
|
|
43
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
43
44
|
var formatBundleItemMap = (product) => {
|
|
44
45
|
return product.bundle_group.reduce((pre, cur) => {
|
|
45
46
|
const curObj = {};
|
|
@@ -70,15 +71,19 @@ var setNewCartValue = (cartValue, newProducts) => {
|
|
|
70
71
|
let isBundleChange = false;
|
|
71
72
|
let isNotFoundBundle = false;
|
|
72
73
|
const notFoundProducts = [];
|
|
74
|
+
const multiDayPricesCache = /* @__PURE__ */ new Map();
|
|
73
75
|
const value = cartValue.map((item) => {
|
|
74
|
-
var _a, _b, _c, _d;
|
|
75
|
-
const
|
|
76
|
+
var _a, _b, _c, _d, _e, _f;
|
|
77
|
+
const itemScheduleDate = ((_a = item._extend) == null ? void 0 : _a.startDate) ? (0, import_dayjs.default)(item._extend.startDate).format("YYYY-MM-DD") : "";
|
|
78
|
+
const newProduct = newProducts.find(
|
|
79
|
+
(newItem2) => newItem2.id === item.product_id && newItem2.schedule_date === itemScheduleDate
|
|
80
|
+
);
|
|
76
81
|
if (!newProduct) {
|
|
77
82
|
return item;
|
|
78
83
|
}
|
|
79
84
|
let isChangePrice = newProduct.price != item.price;
|
|
80
85
|
const bundleItemMap = formatBundleItemMap(newProduct);
|
|
81
|
-
const newBundle = (((
|
|
86
|
+
const newBundle = (((_c = (_b = item._extend) == null ? void 0 : _b.other) == null ? void 0 : _c.bundle) || []).map((bundle) => {
|
|
82
87
|
if (!bundleItemMap[bundle.id]) {
|
|
83
88
|
isNotFoundBundle = true;
|
|
84
89
|
if (!notFoundProducts.some((p) => p._id === bundle._id)) {
|
|
@@ -102,6 +107,24 @@ var setNewCartValue = (cartValue, newProducts) => {
|
|
|
102
107
|
// product_price: bundleItemMap[item.id].product_price,
|
|
103
108
|
};
|
|
104
109
|
});
|
|
110
|
+
if ((_d = item._extend) == null ? void 0 : _d.groupId) {
|
|
111
|
+
if (!multiDayPricesCache.has(item._extend.groupId)) {
|
|
112
|
+
const productPrices = newProducts.filter((p) => p.id === item.product_id);
|
|
113
|
+
const multiDayPrices = {};
|
|
114
|
+
productPrices.forEach((priceItem) => {
|
|
115
|
+
multiDayPrices[priceItem.schedule_date] = {
|
|
116
|
+
total: Number(priceItem.price),
|
|
117
|
+
origin_total: Number(priceItem.price),
|
|
118
|
+
num: 1,
|
|
119
|
+
quotation_id: priceItem.quotation_id || 0,
|
|
120
|
+
start_date: priceItem.schedule_date,
|
|
121
|
+
end_date: (0, import_dayjs.default)(priceItem.schedule_date).add(1, "day").format("YYYY-MM-DD")
|
|
122
|
+
};
|
|
123
|
+
});
|
|
124
|
+
multiDayPricesCache.set(item._extend.groupId, multiDayPrices);
|
|
125
|
+
}
|
|
126
|
+
item._extend.multiDayPrices = multiDayPricesCache.get(item._extend.groupId);
|
|
127
|
+
}
|
|
105
128
|
if (!isChangePrice) {
|
|
106
129
|
return item;
|
|
107
130
|
} else {
|
|
@@ -119,7 +142,7 @@ var setNewCartValue = (cartValue, newProducts) => {
|
|
|
119
142
|
bundle_edit: isBundleChange ? 1 : item._extend.bundle_edit,
|
|
120
143
|
other: {
|
|
121
144
|
...item._extend.other,
|
|
122
|
-
option: (
|
|
145
|
+
option: (_f = (_e = item._extend) == null ? void 0 : _e.other) == null ? void 0 : _f.option,
|
|
123
146
|
bundle: newBundle
|
|
124
147
|
}
|
|
125
148
|
}
|
|
@@ -145,22 +168,31 @@ var useQuotation = (state, dispatch) => {
|
|
|
145
168
|
cartValueRef.current = state.service.value;
|
|
146
169
|
const getCartQuotation = async (params) => {
|
|
147
170
|
if (!cartValueRef.current.length) return;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
171
|
+
if (!(params == null ? void 0 : params.customer_id)) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
const queryData = cartValueRef.current.filter((item) => !item.isCustomItem).map((item) => {
|
|
175
|
+
var _a2;
|
|
176
|
+
return {
|
|
177
|
+
product_id: item.product_id,
|
|
178
|
+
schedule_date: ((_a2 = item._extend) == null ? void 0 : _a2.startDate) ? (0, import_dayjs.default)(item._extend.startDate).format("YYYY-MM-DD") : params == null ? void 0 : params.schedule_date
|
|
179
|
+
// 如果没有商品日期,使用传入的默认日期
|
|
180
|
+
};
|
|
181
|
+
});
|
|
182
|
+
if (!queryData.length) return;
|
|
183
|
+
const data = await (0, import_serve.getNormalAndMultiDayProductPrice)({
|
|
184
|
+
customer_id: params == null ? void 0 : params.customer_id,
|
|
185
|
+
data: queryData
|
|
154
186
|
});
|
|
155
|
-
return data;
|
|
187
|
+
return data.data;
|
|
156
188
|
};
|
|
157
189
|
const currentDate = (0, import_react.useMemo)(() => {
|
|
158
190
|
return state.date.value.format("YYYY-MM-DD");
|
|
159
191
|
}, [state.date.value]);
|
|
160
192
|
const updateCartQuotation = async (params) => {
|
|
161
193
|
const data = await getCartQuotation(params);
|
|
162
|
-
if (!
|
|
163
|
-
const { isChange, value: newCartValue, isNotFoundBundle, notFoundProducts } = setNewCartValue(cartValueRef.current, data
|
|
194
|
+
if (!data || !data.length) return;
|
|
195
|
+
const { isChange, value: newCartValue, isNotFoundBundle, notFoundProducts } = setNewCartValue(cartValueRef.current, data);
|
|
164
196
|
if (isNotFoundBundle) {
|
|
165
197
|
setProducts(notFoundProducts);
|
|
166
198
|
setOpen(true);
|
|
@@ -91,8 +91,13 @@ var Client = () => {
|
|
|
91
91
|
}
|
|
92
92
|
_setLoading(true);
|
|
93
93
|
const api = state.isFranchisee ? import_serve.getFranchiseeCustomerList : state.apis.getClientsEs;
|
|
94
|
+
const withKey = [...(resetParams == null ? void 0 : resetParams.with) || []];
|
|
95
|
+
if (!withKey.includes("contactsInfo")) {
|
|
96
|
+
withKey.push("contactsInfo");
|
|
97
|
+
}
|
|
94
98
|
const data = await api({
|
|
95
99
|
...resetParams,
|
|
100
|
+
with: withKey,
|
|
96
101
|
...!state.isFranchisee ? { _config: { abort: true } } : {}
|
|
97
102
|
});
|
|
98
103
|
const list = ((data == null ? void 0 : data.list) || []).map((d) => {
|
|
@@ -328,6 +333,14 @@ var Client = () => {
|
|
|
328
333
|
closeCallback: () => {
|
|
329
334
|
},
|
|
330
335
|
optionRender: (item) => {
|
|
336
|
+
var _a2, _b2, _c2, _d2, _e2;
|
|
337
|
+
console.log("render_optionRender", item);
|
|
338
|
+
let displayEmail = item == null ? void 0 : item.email;
|
|
339
|
+
let displayPhone = item == null ? void 0 : item.phone;
|
|
340
|
+
if (!displayEmail && !displayPhone) {
|
|
341
|
+
displayEmail = (_b2 = (_a2 = item == null ? void 0 : item.contacts_info) == null ? void 0 : _a2.value) == null ? void 0 : _b2.email;
|
|
342
|
+
displayPhone = (_e2 = (_d2 = (_c2 = item == null ? void 0 : item.contacts_info) == null ? void 0 : _c2.value) == null ? void 0 : _d2.phone) == null ? void 0 : _e2.phone;
|
|
343
|
+
}
|
|
331
344
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
332
345
|
import_antd.Avatar,
|
|
333
346
|
{
|
|
@@ -335,7 +348,7 @@ var Client = () => {
|
|
|
335
348
|
src: import_utils.image.ali(item.cover, 100) || void 0,
|
|
336
349
|
icon: /* @__PURE__ */ import_react.default.createElement(import_User01.default, { className: "pisell-lowcode__booking-client-list-item-avatar-icon" })
|
|
337
350
|
}
|
|
338
|
-
), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-list-item-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-list-item-info-name" }, getNickname(item)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-list-item-info-desc" },
|
|
351
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-list-item-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-list-item-info-name" }, getNickname(item)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-list-item-info-desc" }, displayEmail ? /* @__PURE__ */ import_react.default.createElement("div", { className: "" }, displayEmail) : null, displayPhone ? /* @__PURE__ */ import_react.default.createElement("div", { className: "" }, displayPhone) : null), /* @__PURE__ */ import_react.default.createElement(
|
|
339
352
|
"div",
|
|
340
353
|
{
|
|
341
354
|
className: "pisell-lowcode__booking-client-list-item-info-waiver",
|
|
@@ -25,22 +25,11 @@ __export(serve_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(serve_exports);
|
|
26
26
|
var import_utils = require("../../utils");
|
|
27
27
|
var getFranchiseeCustomerInfo = async (params) => {
|
|
28
|
-
let { data } = await import_utils.request.getRequest().get(`/shop/franchisee/customer/id`, params
|
|
29
|
-
cache: {
|
|
30
|
-
mode: "remote_local",
|
|
31
|
-
type: "indexDB"
|
|
32
|
-
}
|
|
33
|
-
});
|
|
28
|
+
let { data } = await import_utils.request.getRequest().get(`/shop/franchisee/customer/id`, params);
|
|
34
29
|
return data;
|
|
35
30
|
};
|
|
36
31
|
var getFranchiseeCustomerList = async (params) => {
|
|
37
|
-
let { data } = await import_utils.request.getRequest().get(`/shop/franchisee/customer/select-list`, params, {
|
|
38
|
-
abort: true,
|
|
39
|
-
cache: {
|
|
40
|
-
mode: "remote_local",
|
|
41
|
-
type: "indexDB"
|
|
42
|
-
}
|
|
43
|
-
});
|
|
32
|
+
let { data } = await import_utils.request.getRequest().get(`/shop/franchisee/customer/select-list`, params, { abort: true });
|
|
44
33
|
return data;
|
|
45
34
|
};
|
|
46
35
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -52,7 +52,7 @@ var useClientFn = (_params) => {
|
|
|
52
52
|
num: 5,
|
|
53
53
|
total: 0,
|
|
54
54
|
search: "",
|
|
55
|
-
with: ["formRecord"],
|
|
55
|
+
with: ["formRecord", "contactsInfo"],
|
|
56
56
|
relation_form_id: (_d = (_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.appointment_subject) == null ? void 0 : _d.form_id
|
|
57
57
|
});
|
|
58
58
|
const paramsRef = (0, import_react.useRef)(params);
|
|
@@ -91,11 +91,16 @@ var useClientFn = (_params) => {
|
|
|
91
91
|
}
|
|
92
92
|
_setLoading(true);
|
|
93
93
|
const api = state.isFranchisee ? import_serve.getFranchiseeCustomerList : state.apis.getClients;
|
|
94
|
+
const withKey = [...(resetParams == null ? void 0 : resetParams.with) || []];
|
|
95
|
+
if (!withKey.includes("contactsInfo")) {
|
|
96
|
+
withKey.push("contactsInfo");
|
|
97
|
+
}
|
|
94
98
|
const data = await api({
|
|
95
99
|
...resetParams,
|
|
96
100
|
...resetParams.search ? { num: 10 } : {},
|
|
97
101
|
...state.isFranchisee ? { franchisee_customer_ids: customer_ids } : { customer_ids },
|
|
98
|
-
...!state.isFranchisee && !returnResult ? { _config: { abort: true } } : {}
|
|
102
|
+
...!state.isFranchisee && !returnResult ? { _config: { abort: true } } : {},
|
|
103
|
+
with: withKey
|
|
99
104
|
});
|
|
100
105
|
const list = ((data == null ? void 0 : data.list) || []).map((d) => {
|
|
101
106
|
var _a3;
|
|
@@ -279,6 +279,7 @@ var SelectDrawer = (props, ref) => {
|
|
|
279
279
|
}
|
|
280
280
|
closeDrawer();
|
|
281
281
|
};
|
|
282
|
+
console.log("options7777", options);
|
|
282
283
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
283
284
|
import_drawer.default,
|
|
284
285
|
{
|
|
@@ -292,7 +293,7 @@ var SelectDrawer = (props, ref) => {
|
|
|
292
293
|
ref: searchRef,
|
|
293
294
|
prefix: /* @__PURE__ */ import_react.default.createElement(import_SearchLg.default, null),
|
|
294
295
|
style: { margin: "16px 0", height: 44 },
|
|
295
|
-
placeholder: import_utils.locales.getText("pisell2.text.search"),
|
|
296
|
+
placeholder: import_utils.locales.getText("pisell2.booking.text.search-placeholder"),
|
|
296
297
|
value: search,
|
|
297
298
|
allowClear: true,
|
|
298
299
|
onChange: (e) => {
|
|
@@ -335,7 +336,13 @@ var SelectDrawer = (props, ref) => {
|
|
|
335
336
|
}
|
|
336
337
|
}
|
|
337
338
|
) : null), /* @__PURE__ */ import_react.default.createElement(import_antd.Spin, { spinning: !!loading, delay: 500 }, !!options.length ? options.map((item) => {
|
|
338
|
-
var _a;
|
|
339
|
+
var _a, _b, _c, _d, _e, _f;
|
|
340
|
+
let displayEmail = item == null ? void 0 : item.email;
|
|
341
|
+
let displayPhone = item == null ? void 0 : item.phone;
|
|
342
|
+
if (!displayEmail && !displayPhone) {
|
|
343
|
+
displayEmail = (_b = (_a = item == null ? void 0 : item.contacts_info) == null ? void 0 : _a.value) == null ? void 0 : _b.email;
|
|
344
|
+
displayPhone = (_e = (_d = (_c = item == null ? void 0 : item.contacts_info) == null ? void 0 : _c.value) == null ? void 0 : _d.phone) == null ? void 0 : _e.phone;
|
|
345
|
+
}
|
|
339
346
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
340
347
|
"div",
|
|
341
348
|
{
|
|
@@ -348,7 +355,7 @@ var SelectDrawer = (props, ref) => {
|
|
|
348
355
|
onClick: () => handleClientClick(item),
|
|
349
356
|
cover: item.cover,
|
|
350
357
|
title: getNickname(item),
|
|
351
|
-
desc: [
|
|
358
|
+
desc: [displayEmail, displayPhone],
|
|
352
359
|
checked: item.id === client.id,
|
|
353
360
|
style: showPet ? { marginBottom: 6 } : {},
|
|
354
361
|
loading: franchiseeLoading === item.id,
|
|
@@ -396,7 +403,7 @@ var SelectDrawer = (props, ref) => {
|
|
|
396
403
|
},
|
|
397
404
|
style: { padding: 16 }
|
|
398
405
|
},
|
|
399
|
-
/* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_PlusCircle.default, { className: "pisell-lowcode__custom-select-create-icon" }), /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__custom-select-create-txt" }, `${import_utils.locales.getText("pisell2.text.create-new")} ${((
|
|
406
|
+
/* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_PlusCircle.default, { className: "pisell-lowcode__custom-select-create-icon" }), /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__custom-select-create-txt" }, `${import_utils.locales.getText("pisell2.text.create-new")} ${((_f = holder.form) == null ? void 0 : _f.title) || "-"}`))
|
|
400
407
|
), /* @__PURE__ */ import_react.default.createElement("div", null))
|
|
401
408
|
);
|
|
402
409
|
}) : /* @__PURE__ */ import_react.default.createElement(import_antd.Empty, { image: import_antd.Empty.PRESENTED_IMAGE_SIMPLE }), /* @__PURE__ */ import_react.default.createElement("div", null, loadMore)))
|
|
@@ -173,7 +173,11 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
|
|
|
173
173
|
const handleAddPet = (_client, cb) => {
|
|
174
174
|
var _a2, _b2, _c2;
|
|
175
175
|
let _data = {
|
|
176
|
-
formDataConfig: isMinorAndWaiver ? {
|
|
176
|
+
formDataConfig: isMinorAndWaiver ? {
|
|
177
|
+
...waiverForm,
|
|
178
|
+
customer_id: _client.id,
|
|
179
|
+
is_franchisor: (_b2 = (_a2 = state.pet.formData) == null ? void 0 : _a2[0]) == null ? void 0 : _b2.is_franchisor
|
|
180
|
+
} : { ...((_c2 = state.pet.formData) == null ? void 0 : _c2[0]) || {} }
|
|
177
181
|
};
|
|
178
182
|
_data.customerId = _client.id;
|
|
179
183
|
state.action({
|
|
@@ -278,7 +282,7 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
|
|
|
278
282
|
} else {
|
|
279
283
|
const val = await getClients(
|
|
280
284
|
{
|
|
281
|
-
with: ["formRecord"],
|
|
285
|
+
with: ["formRecord", "contactsInfo"],
|
|
282
286
|
relation_form_id: boardConfig == null ? void 0 : boardConfig.form_id,
|
|
283
287
|
skip: 1,
|
|
284
288
|
num: 20,
|
|
@@ -449,21 +453,34 @@ var VerticalClient = (0, import_react.forwardRef)((props, ref) => {
|
|
|
449
453
|
size: 64,
|
|
450
454
|
icon: /* @__PURE__ */ import_react.default.createElement(import_User01.default, { className: "pisell-lowcode__booking-client-list-item-avatar-icon" })
|
|
451
455
|
}
|
|
452
|
-
), isWalkIn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-desc" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, import_utils.locales.getText("pisell2.text.add-client")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in"))) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, getNickname(state.client.value)), ((_B = state.client.value) == null ? void 0 : _B.email) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, (_C = state.client.value) == null ? void 0 : _C.email) : null, ((_D = state.client.value) == null ? void 0 : _D.phone) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, (_E = state.client.value) == null ? void 0 : _E.phone) : null, !!((_G = (_F = state.client.value) == null ? void 0 : _F.waiver_form) == null ? void 0 : _G.length) && /* @__PURE__ */ import_react.default.createElement(
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
456
|
+
), isWalkIn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-desc" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, import_utils.locales.getText("pisell2.text.add-client")), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in"))) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-title" }, getNickname(state.client.value)), ((_B = state.client.value) == null ? void 0 : _B.email) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, (_C = state.client.value) == null ? void 0 : _C.email) : null, ((_D = state.client.value) == null ? void 0 : _D.phone) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-desc-item" }, (_E = state.client.value) == null ? void 0 : _E.phone) : null, !!((_G = (_F = state.client.value) == null ? void 0 : _F.waiver_form) == null ? void 0 : _G.length) && /* @__PURE__ */ import_react.default.createElement(
|
|
457
|
+
"div",
|
|
458
|
+
{
|
|
459
|
+
className: "pisell-lowcode__booking-client-waiver",
|
|
460
|
+
title: (0, import_utils5.getWaiverTitle)((_H = state.client.value) == null ? void 0 : _H.waiver_form)
|
|
461
|
+
},
|
|
462
|
+
(_K = (_J = (_I = state.client.value) == null ? void 0 : _I.waiver_form) == null ? void 0 : _J.map) == null ? void 0 : _K.call(_J, (item) => {
|
|
463
|
+
return /* @__PURE__ */ import_react.default.createElement("span", null, item.form_title, /* @__PURE__ */ import_react.default.createElement(
|
|
464
|
+
"span",
|
|
465
|
+
{
|
|
466
|
+
className: "pisell-lowcode__booking-client-waiver-colon"
|
|
467
|
+
},
|
|
468
|
+
":"
|
|
469
|
+
), item.is_filled ? /* @__PURE__ */ import_react.default.createElement(
|
|
470
|
+
"span",
|
|
471
|
+
{
|
|
472
|
+
className: "pisell-lowcode__booking-client-waiver-filled"
|
|
473
|
+
},
|
|
474
|
+
import_utils.locales.getText("pisell2.text.filled")
|
|
475
|
+
) : /* @__PURE__ */ import_react.default.createElement(
|
|
476
|
+
"span",
|
|
477
|
+
{
|
|
478
|
+
className: "pisell-lowcode__booking-client-waiver-not-filled"
|
|
479
|
+
},
|
|
480
|
+
import_utils.locales.getText("pisell2.text.not-filled")
|
|
481
|
+
), ` ; `);
|
|
482
|
+
})
|
|
483
|
+
)), !isWalkIn && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-action-wrap" }, !state.disabledEdit && /* @__PURE__ */ import_react.default.createElement(
|
|
467
484
|
import_antd.Dropdown.Button,
|
|
468
485
|
{
|
|
469
486
|
menu: {
|
|
@@ -25,7 +25,7 @@ module.exports = __toCommonJS(useHolderConfig_exports);
|
|
|
25
25
|
var import_react = require("react");
|
|
26
26
|
var import_utils = require("../../utils");
|
|
27
27
|
var useHolderConfig = (state) => {
|
|
28
|
-
var _a, _b, _c, _d, _e, _f;
|
|
28
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
29
29
|
const appointment_subject = (0, import_react.useMemo)(() => {
|
|
30
30
|
var _a2, _b2, _c2;
|
|
31
31
|
return ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.appointment_subject) || {};
|
|
@@ -37,10 +37,14 @@ var useHolderConfig = (state) => {
|
|
|
37
37
|
const isFormSubject = (0, import_react.useMemo)(() => {
|
|
38
38
|
return appointment_subject.type === "form";
|
|
39
39
|
}, [appointment_subject.type]);
|
|
40
|
+
const holderType = (0, import_react.useMemo)(() => {
|
|
41
|
+
var _a2, _b2, _c2;
|
|
42
|
+
return ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.holder) == null ? void 0 : _b2.form) == null ? void 0 : _c2.formType) || "minors";
|
|
43
|
+
}, [(_e = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _e.holder]);
|
|
40
44
|
const isWalkInBol = (0, import_react.useMemo)(() => {
|
|
41
45
|
var _a2, _b2;
|
|
42
46
|
return (0, import_utils.isWalkIn)((_b2 = (_a2 = state == null ? void 0 : state.client) == null ? void 0 : _a2.value) == null ? void 0 : _b2.id);
|
|
43
|
-
}, [(
|
|
47
|
+
}, [(_g = (_f = state == null ? void 0 : state.client) == null ? void 0 : _f.value) == null ? void 0 : _g.id]);
|
|
44
48
|
const isCustomerSubject = (0, import_react.useMemo)(() => {
|
|
45
49
|
return appointment_subject.type === "customer";
|
|
46
50
|
}, [appointment_subject.type]);
|
|
@@ -53,7 +57,8 @@ var useHolderConfig = (state) => {
|
|
|
53
57
|
isFormSubject,
|
|
54
58
|
isCustomerSubject,
|
|
55
59
|
isWalkInBol,
|
|
56
|
-
isShowChangeHolder
|
|
60
|
+
isShowChangeHolder,
|
|
61
|
+
holderType
|
|
57
62
|
};
|
|
58
63
|
};
|
|
59
64
|
var useHolderConfig_default = useHolderConfig;
|
|
@@ -54,6 +54,7 @@ var import_index = require("./index.less");
|
|
|
54
54
|
var import_notes = __toESM(require("./notes"));
|
|
55
55
|
var import_service2 = require("./service2");
|
|
56
56
|
var import_utils3 = require("./service2/utils");
|
|
57
|
+
var import_contactInfoMode = __toESM(require("../info2/service/contactInfoMode"));
|
|
57
58
|
var defaultModules = {
|
|
58
59
|
client: 1,
|
|
59
60
|
date: 1,
|
|
@@ -64,7 +65,7 @@ var defaultModules = {
|
|
|
64
65
|
};
|
|
65
66
|
import_utils.locales.init(import_locales.default, (0, import_locales2.getLocale)());
|
|
66
67
|
var Info = (0, import_model.Provider)((props) => {
|
|
67
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
68
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
68
69
|
const { style, globalState, modules = defaultModules, slot } = props;
|
|
69
70
|
const modal = (0, import_react.useContext)(import_model.Context);
|
|
70
71
|
const context = (0, import_useEngineContext.default)();
|
|
@@ -90,7 +91,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
90
91
|
}
|
|
91
92
|
}, []);
|
|
92
93
|
(0, import_react.useEffect)(() => {
|
|
93
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2,
|
|
94
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m;
|
|
94
95
|
const isFranchisee = (_d2 = (_c2 = (_b2 = (_a2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _a2.utils) == null ? void 0 : _b2.businessUtils) == null ? void 0 : _c2.getAppByModal) == null ? void 0 : _d2.call(_c2, "franchisee");
|
|
95
96
|
modal.dispatch({
|
|
96
97
|
type: "setState",
|
|
@@ -99,7 +100,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
99
100
|
...globalState,
|
|
100
101
|
isTerminal: (_g2 = (_f2 = (_e2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _e2.utils) == null ? void 0 : _f2.isTerminal) == null ? void 0 : _g2.call(_f2),
|
|
101
102
|
isFranchisee,
|
|
102
|
-
timezone: (_m = (
|
|
103
|
+
timezone: (_m = (_l2 = (_k2 = (_j2 = (_i2 = (_h2 = context == null ? void 0 : context.appHelper) == null ? void 0 : _h2.utils) == null ? void 0 : _i2.store) == null ? void 0 : _j2.getState()) == null ? void 0 : _k2.global) == null ? void 0 : _l2.globalConfig) == null ? void 0 : _m.timezone,
|
|
103
104
|
isDayBooking: (globalState == null ? void 0 : globalState.renderType) === "dayBooking"
|
|
104
105
|
}
|
|
105
106
|
});
|
|
@@ -171,7 +172,7 @@ var Info = (0, import_model.Provider)((props) => {
|
|
|
171
172
|
dispatch: modal.dispatch,
|
|
172
173
|
source: "info"
|
|
173
174
|
},
|
|
174
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, modules.client ? /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, modules.holder && !((
|
|
175
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "booking-info" }, createHeader, modules.client ? /* @__PURE__ */ import_react.default.createElement(import_client.default, null) : null, ((_k = (_j = (_i = (_h = (_g = modal == null ? void 0 : modal.state) == null ? void 0 : _g.bookingConfig) == null ? void 0 : _h.config) == null ? void 0 : _i.cart_settings_tab) == null ? void 0 : _j.display_contact_info) == null ? void 0 : _k.show_contact_info) === true ? /* @__PURE__ */ import_react.default.createElement(import_contactInfoMode.default, null) : null, modules.holder && !((_l = modal.state) == null ? void 0 : _l.disabledEdit) ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, params.type === "form" ? /* @__PURE__ */ import_react.default.createElement(import_pet.default, null) : null) : null, modules.date ? /* @__PURE__ */ import_react.default.createElement(import_date.default, null) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
175
176
|
import_antd.Skeleton,
|
|
176
177
|
{
|
|
177
178
|
loading: globalState.loading,
|
|
@@ -38,6 +38,11 @@ var { Provider, Context } = (0, import_utils.miniRedux)({
|
|
|
38
38
|
setClient(state, payload) {
|
|
39
39
|
state.setGlobalState({ client: { ...state.client, ...payload } });
|
|
40
40
|
},
|
|
41
|
+
setContactsInfo(state, payload) {
|
|
42
|
+
state.setGlobalState({
|
|
43
|
+
contacts_info: { ...state.contacts_info, ...payload }
|
|
44
|
+
});
|
|
45
|
+
},
|
|
41
46
|
setService(state, payload) {
|
|
42
47
|
let obj = {};
|
|
43
48
|
if (payload.value) {
|
|
@@ -24,12 +24,7 @@ __export(serve_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(serve_exports);
|
|
25
25
|
var import_utils = require("../../utils");
|
|
26
26
|
var getFormDetail = async (id) => {
|
|
27
|
-
let { data } = await import_utils.request.getRequest().get(`/shop/form/${id}
|
|
28
|
-
cache: {
|
|
29
|
-
mode: "remote_local",
|
|
30
|
-
type: "indexDB"
|
|
31
|
-
}
|
|
32
|
-
});
|
|
27
|
+
let { data } = await import_utils.request.getRequest().get(`/shop/form/${id}`);
|
|
33
28
|
return data;
|
|
34
29
|
};
|
|
35
30
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Lists: ({ onEdit, onChange, onAction, isParallelResource }: any) => JSX.Element;
|
|
1
|
+
declare const Lists: ({ onEdit, onChange, onAction, isParallelResource, isShowDelete, isShowAmountFooter }: any) => JSX.Element;
|
|
2
2
|
export default Lists;
|
|
@@ -41,7 +41,7 @@ var import_useHolderConfig = __toESM(require("../hooks/useHolderConfig"));
|
|
|
41
41
|
var import_ahooks = require("ahooks");
|
|
42
42
|
var import_utils2 = require("../../info2/service/addService/utils");
|
|
43
43
|
var import_useAddHolder = __toESM(require("../hooks/useAddHolder"));
|
|
44
|
-
var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
|
|
44
|
+
var Lists = ({ onEdit, onChange, onAction, isParallelResource, isShowDelete = true, isShowAmountFooter = true }) => {
|
|
45
45
|
var _a;
|
|
46
46
|
const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
|
|
47
47
|
const { isShowChangeHolder } = (0, import_useHolderConfig.default)(state);
|
|
@@ -60,7 +60,7 @@ var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
|
|
|
60
60
|
if (type === "view" || type === "edit_product") {
|
|
61
61
|
let product = currentItem._origin;
|
|
62
62
|
let cacheItem = { ...product, new: 0 };
|
|
63
|
-
if (isParallelResource
|
|
63
|
+
if (isParallelResource) {
|
|
64
64
|
cacheItem = (0, import_utils2.getProductExtend)({
|
|
65
65
|
cacheItem,
|
|
66
66
|
state
|
|
@@ -85,6 +85,8 @@ var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
|
|
|
85
85
|
return {
|
|
86
86
|
hideAddBtn: state.isTerminalDayBookingPage || state.isBookingCreatePage,
|
|
87
87
|
isShowNote: state.isBookingTicket2 ? true : (0, import_utils.isEventBooking)(state),
|
|
88
|
+
isShowDelete,
|
|
89
|
+
isShowAmountFooter,
|
|
88
90
|
isShowPackageNote: false,
|
|
89
91
|
accounts: [],
|
|
90
92
|
isEdit: !!(state == null ? void 0 : state.bookingId),
|
|
@@ -109,7 +111,7 @@ var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
|
|
|
109
111
|
const p = (0, import_utils.formatProducts)(
|
|
110
112
|
((_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.value) || [],
|
|
111
113
|
state,
|
|
112
|
-
|
|
114
|
+
true,
|
|
113
115
|
true,
|
|
114
116
|
isParallelResource
|
|
115
117
|
);
|
|
@@ -25,13 +25,7 @@ __export(serve_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(serve_exports);
|
|
26
26
|
var import_utils = require("../../../utils");
|
|
27
27
|
var getAddTimeProducts = async (params, config) => {
|
|
28
|
-
let { data } = await import_utils.request.getRequest().post(`/shop/product/query`, params,
|
|
29
|
-
...config,
|
|
30
|
-
cache: {
|
|
31
|
-
mode: "remote_local",
|
|
32
|
-
type: "indexDB"
|
|
33
|
-
}
|
|
34
|
-
});
|
|
28
|
+
let { data } = await import_utils.request.getRequest().post(`/shop/product/query`, params, config);
|
|
35
29
|
return data;
|
|
36
30
|
};
|
|
37
31
|
var saveAddTimeProduct = async ({ orderId, params }) => {
|
|
@@ -18,3 +18,17 @@ export declare const getProductPrice: (params: {
|
|
|
18
18
|
customer_id: number;
|
|
19
19
|
schedule_date: string;
|
|
20
20
|
}) => Promise<any>;
|
|
21
|
+
declare type MultiDayProductPriceParams = {
|
|
22
|
+
customer_id: number;
|
|
23
|
+
data: {
|
|
24
|
+
product_id: number;
|
|
25
|
+
schedule_date: string;
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* 获取普通商品和跨日预约的价格
|
|
30
|
+
* @param params
|
|
31
|
+
* @returns
|
|
32
|
+
*/
|
|
33
|
+
export declare const getNormalAndMultiDayProductPrice: (params: MultiDayProductPriceParams) => Promise<any>;
|
|
34
|
+
export {};
|
|
@@ -19,33 +19,24 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
// src/components/booking/info/service/serve.ts
|
|
20
20
|
var serve_exports = {};
|
|
21
21
|
__export(serve_exports, {
|
|
22
|
+
getNormalAndMultiDayProductPrice: () => getNormalAndMultiDayProductPrice,
|
|
22
23
|
getProductDetail: () => getProductDetail,
|
|
23
24
|
getProductPrice: () => getProductPrice,
|
|
24
25
|
postMultiDay: () => postMultiDay
|
|
25
26
|
});
|
|
26
27
|
module.exports = __toCommonJS(serve_exports);
|
|
27
28
|
var import_utils = require("../../utils");
|
|
28
|
-
var getProductDetail = async (id, params) => import_utils.request.getRequest().get(`/shop/product/query/${id}`, params
|
|
29
|
-
cache: {
|
|
30
|
-
mode: "remote_local",
|
|
31
|
-
type: "indexDB"
|
|
32
|
-
}
|
|
33
|
-
});
|
|
29
|
+
var getProductDetail = async (id, params) => import_utils.request.getRequest().get(`/shop/product/query/${id}`, params);
|
|
34
30
|
var postMultiDay = async (id, params) => import_utils.request.getRequest().post(`/shop/product/multi-day/detail/${id}`, params, {
|
|
35
|
-
useCache: true
|
|
36
|
-
cache: {
|
|
37
|
-
mode: "remote_local",
|
|
38
|
-
type: "indexDB"
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
var getProductPrice = async (params) => import_utils.request.getRequest().post(`/shop/product/query/price`, params, {
|
|
42
|
-
cache: {
|
|
43
|
-
mode: "remote_local",
|
|
44
|
-
type: "indexDB"
|
|
45
|
-
}
|
|
31
|
+
useCache: true
|
|
46
32
|
});
|
|
33
|
+
var getProductPrice = async (params) => import_utils.request.getRequest().post(`/shop/product/query/price`, params);
|
|
34
|
+
var getNormalAndMultiDayProductPrice = async (params) => {
|
|
35
|
+
return import_utils.request.getRequest().post(`/shop/product/query/shelf/price`, params);
|
|
36
|
+
};
|
|
47
37
|
// Annotate the CommonJS export names for ESM import in node:
|
|
48
38
|
0 && (module.exports = {
|
|
39
|
+
getNormalAndMultiDayProductPrice,
|
|
49
40
|
getProductDetail,
|
|
50
41
|
getProductPrice,
|
|
51
42
|
postMultiDay
|
|
@@ -31,6 +31,7 @@ module.exports = __toCommonJS(utils_exports);
|
|
|
31
31
|
var import_utils = require("@pisell/utils");
|
|
32
32
|
var import_utils2 = require("../../../utils");
|
|
33
33
|
var import_distributeDiscount = require("../../service/serviceManager/distributeDiscount");
|
|
34
|
+
var import_utils3 = require("../../../../ticketBooking/utils");
|
|
34
35
|
var getGroupTotalPrice = (items) => {
|
|
35
36
|
return items.reduce((prev, next) => {
|
|
36
37
|
prev.duration += next._extend.duration;
|
|
@@ -98,6 +99,7 @@ var createBookingItemsByGroup = (item, isBatchEdit) => {
|
|
|
98
99
|
cacheItem._extend.total = totalPrice;
|
|
99
100
|
cacheItem._extend.origin_total = totalPrice;
|
|
100
101
|
cacheItem._extend.items = void 0;
|
|
102
|
+
cacheItem._serviceKey = (0, import_utils3.genServiceKey)(cacheItem);
|
|
101
103
|
bookings.push(cacheItem);
|
|
102
104
|
}
|
|
103
105
|
if (isBatchEdit) {
|
|
@@ -67,39 +67,7 @@ export declare const genRowKey: (key: string) => string;
|
|
|
67
67
|
* @Author: WangHan
|
|
68
68
|
* @Date: 2024-11-29 17:36
|
|
69
69
|
*/
|
|
70
|
-
export declare const formatProducts: (lists: any[], state: any, isRenderGroup?: boolean, isGeneral?: boolean, isParallelResource?: boolean) =>
|
|
71
|
-
_origin: any;
|
|
72
|
-
id: any;
|
|
73
|
-
_id: any;
|
|
74
|
-
name: any;
|
|
75
|
-
title: any;
|
|
76
|
-
price: any;
|
|
77
|
-
total: number;
|
|
78
|
-
origin_total: number;
|
|
79
|
-
num: any;
|
|
80
|
-
image: any;
|
|
81
|
-
isShowNote: boolean;
|
|
82
|
-
note: any;
|
|
83
|
-
like_status: any;
|
|
84
|
-
bundle: any;
|
|
85
|
-
options: any;
|
|
86
|
-
errorMessage: string;
|
|
87
|
-
product_option_string: any;
|
|
88
|
-
discount_reason: any;
|
|
89
|
-
resource_id: any;
|
|
90
|
-
relation_form_name: any;
|
|
91
|
-
holder_title: any;
|
|
92
|
-
start_date: any;
|
|
93
|
-
end_date: any;
|
|
94
|
-
holder_id: any;
|
|
95
|
-
isNormalProduct: boolean;
|
|
96
|
-
isCustomItem: any;
|
|
97
|
-
vouchersApplicable: any;
|
|
98
|
-
locale: any;
|
|
99
|
-
symbol: any;
|
|
100
|
-
relation_products: any;
|
|
101
|
-
items: any[];
|
|
102
|
-
}[];
|
|
70
|
+
export declare const formatProducts: (lists: any[], state: any, isRenderGroup?: boolean, isGeneral?: boolean, isParallelResource?: boolean) => any[];
|
|
103
71
|
/**
|
|
104
72
|
* @title: 禁用日期
|
|
105
73
|
* @description:
|