@pisell/private-materials 6.5.4 → 6.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +1 -1
- package/build/lowcode/preview.js +160 -146
- 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/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/actionButtons/index.js +37 -42
- package/es/components/booking/components/actionButtons/index.less +0 -28
- package/es/components/booking/components/footer/amount.d.ts +3 -3
- package/es/components/booking/components/footer/amount.js +51 -31
- package/es/components/booking/components/footer/index.js +177 -68
- package/es/components/booking/components/footer/utils.js +62 -33
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/model.js +5 -0
- package/es/components/booking/info/service/addService/index.js +2 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/index.js +42 -2
- package/es/components/booking/info2/service/addService/index.js +2 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/editService/index.js +12 -4
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/utils.js +10 -5
- package/es/components/checkout/PaymentModal.d.ts +2 -0
- package/es/components/checkout/PaymentModal.js +462 -263
- package/es/components/checkout/components/AdditionalModule/index.less +1 -1
- package/es/components/checkout/components/AmountSummary/index.js +176 -65
- package/es/components/checkout/components/AmountSummary/index.less +13 -0
- package/es/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
- package/es/components/checkout/components/CashPaymentModule/index.js +110 -132
- package/es/components/checkout/components/CashPaymentModule/index.less +200 -176
- package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +29 -0
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +214 -0
- package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -4
- package/es/components/checkout/components/PaymentOptionsModule/index.js +12 -114
- package/es/components/checkout/components/PaymentOptionsModule/index.less +23 -0
- package/es/components/checkout/components/PaymentResultToast/index.js +38 -8
- package/es/components/checkout/components/PaymentResultToast/types.d.ts +2 -0
- package/es/components/checkout/components/SavePayLaterHandler/index.js +1 -1
- package/es/components/checkout/components/SearchAndClientModule/index.js +40 -39
- package/es/components/checkout/components/WalletPassModule/index.js +4 -3
- package/es/components/checkout/components/WalletPassModule/utils.js +10 -4
- package/es/components/checkout/hooks/useWalletPass.js +11 -4
- package/es/components/checkout/index.less +1 -1
- package/es/components/checkout/locales.d.ts +36 -0
- package/es/components/checkout/locales.js +43 -4
- package/es/components/checkout/types.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/shoppingCart/components/Cart/Product.js +143 -71
- package/es/components/shoppingCart/components/Cart/index.js +1 -1
- package/es/components/shoppingCart/components/Cart/index.less +31 -0
- package/es/components/shoppingCart/locales.d.ts +3 -0
- package/es/components/shoppingCart/locales.js +12 -3
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +9 -12
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/es/components/ticketBooking/components/menuBar/index.js +3 -1
- package/es/components/ticketBooking/components/menuBar/index.less +7 -0
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +7 -7
- package/es/components/ticketBooking/index.d.ts +0 -1
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/components/ticketBooking/utils/index.js +2 -1
- package/es/components/wallet/Detail/model.d.ts +1 -13
- package/es/components/wallet/DiscountCard/model.d.ts +1 -14
- package/es/components/wallet/PointCard/model.d.ts +1 -13
- package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/es/components/wallet/Voucher/model.d.ts +1 -13
- package/es/components/wallet/model.d.ts +1 -9
- package/es/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +1 -1
- package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.js +148 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/index.d.ts +2 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/index.js +1 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/types.js +1 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +5 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +331 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.d.ts +13 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +349 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +12 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.js +49 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.less +103 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/locales.js +41 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +97 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/types.js +1 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.d.ts +22 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.js +465 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.less +47 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/locales.js +44 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/types.js +1 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +12 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.js +444 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.less +64 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/locales.js +47 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/types.js +1 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +17 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.js +47 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.less +39 -0
- package/es/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
- package/es/pro/priceKeyboard/hooks/keyActions.js +252 -0
- package/es/pro/priceKeyboard/hooks/rightItems.d.ts +28 -0
- package/es/pro/priceKeyboard/hooks/rightItems.js +50 -0
- package/es/pro/priceKeyboard/index.d.ts +3 -0
- package/es/pro/priceKeyboard/index.js +3 -0
- package/es/pro/priceKeyboard/index.less +215 -0
- package/es/pro/priceKeyboard/utils.d.ts +31 -0
- package/es/pro/priceKeyboard/utils.js +51 -0
- package/es/pro/skuDetailModal/index.js +19 -16
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/actionButtons/index.js +31 -28
- package/lib/components/booking/components/actionButtons/index.less +0 -28
- package/lib/components/booking/components/footer/amount.d.ts +3 -3
- package/lib/components/booking/components/footer/amount.js +49 -34
- package/lib/components/booking/components/footer/index.js +114 -40
- package/lib/components/booking/components/footer/utils.js +35 -7
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/model.js +3 -0
- package/lib/components/booking/info/service/addService/index.js +2 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/index.js +18 -1
- package/lib/components/booking/info2/service/addService/index.js +2 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/editService/index.js +12 -4
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/booking/utils.js +10 -5
- package/lib/components/checkout/PaymentModal.d.ts +2 -0
- package/lib/components/checkout/PaymentModal.js +208 -91
- package/lib/components/checkout/components/AdditionalModule/index.less +1 -1
- package/lib/components/checkout/components/AmountSummary/index.js +120 -50
- package/lib/components/checkout/components/AmountSummary/index.less +13 -0
- package/lib/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
- package/lib/components/checkout/components/CashPaymentModule/index.js +101 -134
- package/lib/components/checkout/components/CashPaymentModule/index.less +200 -176
- package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +29 -0
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +163 -0
- package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -4
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +11 -123
- package/lib/components/checkout/components/PaymentOptionsModule/index.less +23 -0
- package/lib/components/checkout/components/PaymentResultToast/index.js +26 -1
- package/lib/components/checkout/components/PaymentResultToast/types.d.ts +2 -0
- package/lib/components/checkout/components/SavePayLaterHandler/index.js +1 -1
- package/lib/components/checkout/components/SearchAndClientModule/index.js +3 -29
- package/lib/components/checkout/components/WalletPassModule/index.js +4 -3
- package/lib/components/checkout/components/WalletPassModule/utils.js +8 -4
- package/lib/components/checkout/hooks/useWalletPass.js +11 -6
- package/lib/components/checkout/index.less +1 -1
- package/lib/components/checkout/locales.d.ts +36 -0
- package/lib/components/checkout/locales.js +43 -4
- package/lib/components/checkout/types.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/shoppingCart/components/Cart/Product.js +111 -51
- package/lib/components/shoppingCart/components/Cart/index.js +1 -1
- package/lib/components/shoppingCart/components/Cart/index.less +31 -0
- package/lib/components/shoppingCart/locales.d.ts +3 -0
- package/lib/components/shoppingCart/locales.js +6 -3
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -4
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/menuBar/index.js +1 -1
- package/lib/components/ticketBooking/components/menuBar/index.less +7 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +7 -7
- package/lib/components/ticketBooking/index.d.ts +0 -1
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/components/ticketBooking/utils/index.js +2 -1
- package/lib/components/wallet/Detail/model.d.ts +1 -13
- package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
- package/lib/components/wallet/PointCard/model.d.ts +1 -13
- package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
- package/lib/components/wallet/Voucher/model.d.ts +1 -13
- package/lib/components/wallet/model.d.ts +1 -9
- package/lib/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +2 -2
- package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.js +144 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/index.d.ts +2 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/index.js +35 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/types.js +17 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +5 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +360 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.d.ts +13 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +399 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +12 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +76 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.less +103 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/locales.js +65 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +97 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.js +17 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.d.ts +22 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +504 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +47 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/locales.js +68 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/types.js +17 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +12 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.js +488 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.less +64 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.js +71 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/types.js +17 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +17 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.js +79 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.less +39 -0
- package/lib/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
- package/lib/pro/priceKeyboard/hooks/keyActions.js +176 -0
- package/lib/pro/priceKeyboard/hooks/rightItems.d.ts +28 -0
- package/lib/pro/priceKeyboard/hooks/rightItems.js +81 -0
- package/lib/pro/priceKeyboard/index.d.ts +3 -0
- package/lib/pro/priceKeyboard/index.js +45 -0
- package/lib/pro/priceKeyboard/index.less +215 -0
- package/lib/pro/priceKeyboard/utils.d.ts +31 -0
- package/lib/pro/priceKeyboard/utils.js +75 -0
- package/lib/pro/skuDetailModal/index.js +18 -22
- package/package.json +12 -12
@@ -0,0 +1,215 @@
|
|
1
|
+
.price-keyboard {
|
2
|
+
display: flex;
|
3
|
+
flex-direction: column;
|
4
|
+
gap: 20px;
|
5
|
+
background-color: #ffffff;
|
6
|
+
border-radius: 12px;
|
7
|
+
padding: 20px;
|
8
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
9
|
+
}
|
10
|
+
|
11
|
+
.price-keyboard-inputs {
|
12
|
+
display: flex;
|
13
|
+
flex-direction: column;
|
14
|
+
gap: 16px;
|
15
|
+
}
|
16
|
+
|
17
|
+
.price-keyboard-inputs-default {
|
18
|
+
display: flex;
|
19
|
+
flex-direction: column;
|
20
|
+
gap: 16px;
|
21
|
+
}
|
22
|
+
|
23
|
+
.price-keyboard-input-wrapper {
|
24
|
+
display: flex;
|
25
|
+
align-items: center;
|
26
|
+
padding: 12px 16px;
|
27
|
+
background-color: #f9fafb;
|
28
|
+
border: 1px solid #d0d5dd;
|
29
|
+
border-radius: 8px;
|
30
|
+
transition: all 0.2s ease;
|
31
|
+
|
32
|
+
&:hover {
|
33
|
+
border-color: #98a2b3;
|
34
|
+
}
|
35
|
+
|
36
|
+
&:focus-within {
|
37
|
+
border-color: #1570ef;
|
38
|
+
box-shadow: 0 0 0 3px rgba(21, 112, 239, 0.1);
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
.price-keyboard-input {
|
43
|
+
flex: 1;
|
44
|
+
}
|
45
|
+
|
46
|
+
.price-keyboard-keyboard {
|
47
|
+
display: flex;
|
48
|
+
gap: 12px;
|
49
|
+
}
|
50
|
+
|
51
|
+
.price-keyboard-keyboard-numbers {
|
52
|
+
flex: 1;
|
53
|
+
display: grid;
|
54
|
+
grid-template-columns: repeat(3, 1fr);
|
55
|
+
gap: 8px;
|
56
|
+
}
|
57
|
+
|
58
|
+
.price-keyboard-keyboard-actions {
|
59
|
+
display: flex;
|
60
|
+
flex-direction: column;
|
61
|
+
gap: 8px;
|
62
|
+
width: 80px;
|
63
|
+
}
|
64
|
+
|
65
|
+
.price-keyboard-key {
|
66
|
+
display: flex;
|
67
|
+
align-items: center;
|
68
|
+
justify-content: center;
|
69
|
+
height: 48px;
|
70
|
+
border: 1px solid #d0d5dd;
|
71
|
+
border-radius: 8px;
|
72
|
+
background-color: #ffffff;
|
73
|
+
color: #344054;
|
74
|
+
font-size: 16px;
|
75
|
+
font-weight: 500;
|
76
|
+
cursor: pointer;
|
77
|
+
transition: all 0.2s ease;
|
78
|
+
outline: none;
|
79
|
+
|
80
|
+
&:hover {
|
81
|
+
background-color: #f9fafb;
|
82
|
+
border-color: #98a2b3;
|
83
|
+
}
|
84
|
+
|
85
|
+
&:active {
|
86
|
+
background-color: #f2f4f7;
|
87
|
+
transform: translateY(1px);
|
88
|
+
}
|
89
|
+
|
90
|
+
&:disabled {
|
91
|
+
opacity: 0.5;
|
92
|
+
cursor: not-allowed;
|
93
|
+
|
94
|
+
&:hover {
|
95
|
+
background-color: #ffffff;
|
96
|
+
border-color: #d0d5dd;
|
97
|
+
transform: none;
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
&.price-keyboard-key-primary {
|
102
|
+
background-color: #1570ef;
|
103
|
+
color: #ffffff;
|
104
|
+
border-color: #1570ef;
|
105
|
+
|
106
|
+
&:hover {
|
107
|
+
background-color: #1366d9;
|
108
|
+
border-color: #1366d9;
|
109
|
+
}
|
110
|
+
|
111
|
+
&:active {
|
112
|
+
background-color: #0f5bc4;
|
113
|
+
border-color: #0f5bc4;
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
&.price-keyboard-key-size-2 {
|
118
|
+
height: 104px; /* 48px * 2 + 8px gap */
|
119
|
+
}
|
120
|
+
|
121
|
+
&.price-keyboard-key-size-3 {
|
122
|
+
height: 160px; /* 48px * 3 + 16px gap */
|
123
|
+
}
|
124
|
+
}
|
125
|
+
|
126
|
+
.price-keyboard-delete-icon {
|
127
|
+
width: 20px;
|
128
|
+
height: 20px;
|
129
|
+
}
|
130
|
+
|
131
|
+
/* 响应式设计 */
|
132
|
+
@media (max-width: 768px) {
|
133
|
+
.price-keyboard {
|
134
|
+
padding: 16px;
|
135
|
+
gap: 16px;
|
136
|
+
}
|
137
|
+
|
138
|
+
.price-keyboard-keyboard {
|
139
|
+
flex-direction: column;
|
140
|
+
gap: 16px;
|
141
|
+
}
|
142
|
+
|
143
|
+
.price-keyboard-keyboard-actions {
|
144
|
+
flex-direction: row;
|
145
|
+
width: auto;
|
146
|
+
height: auto;
|
147
|
+
}
|
148
|
+
|
149
|
+
.price-keyboard-key {
|
150
|
+
height: 44px;
|
151
|
+
font-size: 14px;
|
152
|
+
}
|
153
|
+
|
154
|
+
.price-keyboard-key.price-keyboard-key-size-2 {
|
155
|
+
height: 44px;
|
156
|
+
flex: 2;
|
157
|
+
}
|
158
|
+
|
159
|
+
.price-keyboard-key.price-keyboard-key-size-3 {
|
160
|
+
height: 44px;
|
161
|
+
flex: 3;
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
/* 深色主题支持 */
|
166
|
+
@media (prefers-color-scheme: dark) {
|
167
|
+
.price-keyboard {
|
168
|
+
background-color: #1f2937;
|
169
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
170
|
+
}
|
171
|
+
|
172
|
+
.price-keyboard-input-wrapper {
|
173
|
+
background-color: #374151;
|
174
|
+
border-color: #4b5563;
|
175
|
+
|
176
|
+
&:hover {
|
177
|
+
border-color: #6b7280;
|
178
|
+
}
|
179
|
+
|
180
|
+
&:focus-within {
|
181
|
+
border-color: #3b82f6;
|
182
|
+
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
|
183
|
+
}
|
184
|
+
}
|
185
|
+
|
186
|
+
.price-keyboard-key {
|
187
|
+
background-color: #374151;
|
188
|
+
border-color: #4b5563;
|
189
|
+
color: #f9fafb;
|
190
|
+
|
191
|
+
&:hover {
|
192
|
+
background-color: #4b5563;
|
193
|
+
border-color: #6b7280;
|
194
|
+
}
|
195
|
+
|
196
|
+
&:active {
|
197
|
+
background-color: #6b7280;
|
198
|
+
}
|
199
|
+
|
200
|
+
&.price-keyboard-key-primary {
|
201
|
+
background-color: #3b82f6;
|
202
|
+
border-color: #3b82f6;
|
203
|
+
|
204
|
+
&:hover {
|
205
|
+
background-color: #2563eb;
|
206
|
+
border-color: #2563eb;
|
207
|
+
}
|
208
|
+
|
209
|
+
&:active {
|
210
|
+
background-color: #1d4ed8;
|
211
|
+
border-color: #1d4ed8;
|
212
|
+
}
|
213
|
+
}
|
214
|
+
}
|
215
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
export declare const DEFAULT_THEME_CONFIG: {
|
2
|
+
dark: {
|
3
|
+
titleColor: string;
|
4
|
+
subtitleColor: string;
|
5
|
+
keyboardBgColor: string;
|
6
|
+
keyboardWrapperBgColor: string;
|
7
|
+
bgColor: string;
|
8
|
+
bgColorGray200: string;
|
9
|
+
bgColorGray300: string;
|
10
|
+
textGray500: string;
|
11
|
+
textGray600: string;
|
12
|
+
textGray900: string;
|
13
|
+
};
|
14
|
+
light: {
|
15
|
+
titleColor: string;
|
16
|
+
subtitleColor: string;
|
17
|
+
keyboardBgColor: string;
|
18
|
+
keyboardWrapperBgColor: string;
|
19
|
+
bgColor: string;
|
20
|
+
bgColorGray200: string;
|
21
|
+
bgColorGray300: string;
|
22
|
+
textGray500: string;
|
23
|
+
textGray600: string;
|
24
|
+
textGray900: string;
|
25
|
+
};
|
26
|
+
};
|
27
|
+
/**
|
28
|
+
* 设置键盘主题
|
29
|
+
* @param theme 主题
|
30
|
+
*/
|
31
|
+
export declare const setKeyboardTheme: (theme?: 'dark' | 'light') => void;
|
@@ -0,0 +1,51 @@
|
|
1
|
+
//@ts-ignore
|
2
|
+
import { setTheme } from '@pisell/utils';
|
3
|
+
export var DEFAULT_THEME_CONFIG = {
|
4
|
+
dark: {
|
5
|
+
titleColor: '#FFFFFF',
|
6
|
+
subtitleColor: '#D0D5DD',
|
7
|
+
keyboardBgColor: 'rgba(0, 0, 0, 0.4)',
|
8
|
+
keyboardWrapperBgColor: 'rgba(0, 0, 0, 0.7)',
|
9
|
+
bgColor: 'rgba(0, 0, 0, 0.70)',
|
10
|
+
bgColorGray200: 'rgba(0, 0, 0, 0.40)',
|
11
|
+
bgColorGray300: 'rgba(0, 0, 0, 0.40)',
|
12
|
+
textGray500: '#D0D5DD',
|
13
|
+
textGray600: '#FFFFFF',
|
14
|
+
textGray900: '#FFFFFF'
|
15
|
+
},
|
16
|
+
light: {
|
17
|
+
titleColor: '#101828',
|
18
|
+
subtitleColor: '#667085',
|
19
|
+
keyboardBgColor: '#D0D5DD',
|
20
|
+
keyboardWrapperBgColor: 'white',
|
21
|
+
bgColor: '#FFFFFF',
|
22
|
+
bgColorGray200: '#EAECF0',
|
23
|
+
bgColorGray300: '#D0D5DD',
|
24
|
+
textGray500: '#667085',
|
25
|
+
textGray600: '#475467',
|
26
|
+
textGray900: '#101828'
|
27
|
+
}
|
28
|
+
};
|
29
|
+
|
30
|
+
/**
|
31
|
+
* 设置键盘主题
|
32
|
+
* @param theme 主题
|
33
|
+
*/
|
34
|
+
export var setKeyboardTheme = function setKeyboardTheme(theme) {
|
35
|
+
var currentTheme = DEFAULT_THEME_CONFIG[theme || 'light'];
|
36
|
+
setTheme({
|
37
|
+
// 标题颜色
|
38
|
+
'--pisell-pro-price-keyboard-title-color': currentTheme.titleColor,
|
39
|
+
// 副标题颜色
|
40
|
+
'--pisell-pro-price-keyboard-subtitle-color': currentTheme.subtitleColor,
|
41
|
+
// 背景颜色梯度
|
42
|
+
'--pisell-pro-price-keyboard-wrapper-bg-color': currentTheme.keyboardWrapperBgColor,
|
43
|
+
'--pisell-pro-price-keyboard-bg-color': currentTheme.keyboardBgColor,
|
44
|
+
'--pisell-pro-price-keyboard-bg-color-gray-200': currentTheme.bgColorGray200,
|
45
|
+
'--pisell-pro-price-keyboard-bg-color-gray-300': currentTheme.bgColorGray300,
|
46
|
+
// 文本颜色梯度
|
47
|
+
'--pisell-pro-price-keyboard-text-gray-500': currentTheme.textGray500,
|
48
|
+
'--pisell-pro-price-keyboard-text-gray-600': currentTheme.textGray600,
|
49
|
+
'--pisell-pro-price-keyboard-text-gray-900': currentTheme.textGray900
|
50
|
+
});
|
51
|
+
};
|
@@ -13,8 +13,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import React, { forwardRef, useImperativeHandle, useState, useMemo } from 'react';
|
14
14
|
import { PisellModal, Button } from '@pisell/materials';
|
15
15
|
import Decimal from 'decimal.js';
|
16
|
-
import { PisellAdjustPrice } from '@pisell/materials';
|
17
|
-
import { createPortal } from 'react-dom';
|
18
16
|
import cloneDeep from 'lodash/cloneDeep';
|
19
17
|
import { locales } from '@pisell/utils';
|
20
18
|
import Delete_wght300_24px from '@pisell/icon/es/Delete_wght300_24px';
|
@@ -23,6 +21,7 @@ import "./index.less";
|
|
23
21
|
import PisellNumberSelector from "../pisellNumberSelector";
|
24
22
|
import NoteModal from "../../plus/noteModal";
|
25
23
|
import useEngineContext from "../../hooks/useEngineContext";
|
24
|
+
import { DiscountKeyboard } from "../priceKeyboard";
|
26
25
|
var SkuDetailModal = function SkuDetailModal(_ref, ref) {
|
27
26
|
var _context$appHelper, _store$getState, _context$engine, _productData$_extend2, _productData$_extend4, _productData$_extend6;
|
28
27
|
var onConfirm = _ref.onConfirm,
|
@@ -346,21 +345,25 @@ var SkuDetailModal = function SkuDetailModal(_ref, ref) {
|
|
346
345
|
onCancel: onNoteCancel,
|
347
346
|
onConfirm: onNoteConfirm,
|
348
347
|
onDelete: onNoteDelete
|
349
|
-
}),
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
348
|
+
}), /*#__PURE__*/React.createElement(DiscountKeyboard, {
|
349
|
+
containerProps: {
|
350
|
+
renderType: 'modal',
|
351
|
+
open: showPriceAdjustModal,
|
352
|
+
onCancel: function onCancel() {
|
353
|
+
return setShowPriceAdjustModal(false);
|
354
|
+
}
|
356
355
|
}
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
356
|
+
// 允许一口价超出原价
|
357
|
+
,
|
358
|
+
enableExceedMaxAmount: true,
|
359
|
+
originalValue: priceOverride,
|
360
|
+
defaultValue: priceOverride,
|
361
|
+
onEnter: function onEnter(discountAmount) {
|
362
|
+
// 将折扣值转化为最终值
|
363
|
+
var finalPrice = new Decimal(priceOverride || 0).minus(discountAmount).toNumber();
|
364
|
+
handlePriceAdjustConfirm(finalPrice);
|
365
|
+
},
|
363
366
|
selectType: "dark"
|
364
|
-
})))
|
367
|
+
})));
|
365
368
|
};
|
366
369
|
export default /*#__PURE__*/forwardRef(SkuDetailModal);
|
@@ -1,10 +1 @@
|
|
1
|
-
|
2
|
-
import { FormState } from "../model";
|
3
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
4
|
-
state: FormState;
|
5
|
-
} & {
|
6
|
-
dispatch: (params: {
|
7
|
-
type: string;
|
8
|
-
payload: any;
|
9
|
-
}) => void;
|
10
|
-
}>;
|
1
|
+
export declare const Provider: any, Context: any;
|
@@ -33,8 +33,8 @@ __export(actionButtons_exports, {
|
|
33
33
|
});
|
34
34
|
module.exports = __toCommonJS(actionButtons_exports);
|
35
35
|
var import_react = __toESM(require("react"));
|
36
|
-
var import_react_dom = require("react-dom");
|
37
36
|
var import_antd = require("antd");
|
37
|
+
var import_decimal = __toESM(require("decimal.js"));
|
38
38
|
var import_icon = require("@pisell/icon");
|
39
39
|
var import_utils = require("@pisell/utils");
|
40
40
|
var import_materials = require("@pisell/materials");
|
@@ -49,6 +49,7 @@ var import_ahooks = require("ahooks");
|
|
49
49
|
var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
|
50
50
|
var import_useScanManager = __toESM(require("../../../ticketBooking/hooks/pisellos/useScanManager"));
|
51
51
|
var import_hooks = require("../../../appointmentBooking/hooks");
|
52
|
+
var import_priceKeyboard = require("../../../../pro/priceKeyboard");
|
52
53
|
var createToastContent = (text) => /* @__PURE__ */ import_react.default.createElement("div", { className: "action-buttons-toast-content" }, text);
|
53
54
|
var ActionButtons = ({
|
54
55
|
state,
|
@@ -148,6 +149,9 @@ var ActionButtons = ({
|
|
148
149
|
return 0;
|
149
150
|
}
|
150
151
|
}, [state, hasCartItems]);
|
152
|
+
const currentTotalPriceAfterDiscount = (0, import_react.useMemo)(() => {
|
153
|
+
return new import_decimal.default(currentTotalPrice).minus(state.shop_discount || 0).toNumber();
|
154
|
+
}, [state.shop_discount, currentTotalPrice]);
|
151
155
|
const [discountList, setDiscountList] = (0, import_react.useState)([]);
|
152
156
|
const usedVouchersCount = (0, import_react.useMemo)(() => {
|
153
157
|
var _a2, _b2;
|
@@ -219,6 +223,12 @@ var ActionButtons = ({
|
|
219
223
|
shop_discount: "0"
|
220
224
|
}
|
221
225
|
});
|
226
|
+
dispatch({
|
227
|
+
type: "setPaymentPaid",
|
228
|
+
payload: {
|
229
|
+
value: {}
|
230
|
+
}
|
231
|
+
});
|
222
232
|
setShowClearModal(false);
|
223
233
|
Toast == null ? void 0 : Toast.success(
|
224
234
|
createToastContent(
|
@@ -265,6 +275,12 @@ var ActionButtons = ({
|
|
265
275
|
orderNote: ""
|
266
276
|
}
|
267
277
|
});
|
278
|
+
dispatch({
|
279
|
+
type: "setPaymentPaid",
|
280
|
+
payload: {
|
281
|
+
value: {}
|
282
|
+
}
|
283
|
+
});
|
268
284
|
(_a2 = shopDiscount == null ? void 0 : shopDiscount.clear) == null ? void 0 : _a2.call(shopDiscount);
|
269
285
|
setShowClearModal(false);
|
270
286
|
Toast == null ? void 0 : Toast.success(
|
@@ -295,13 +311,7 @@ var ActionButtons = ({
|
|
295
311
|
});
|
296
312
|
}
|
297
313
|
}, [(_g = state.service) == null ? void 0 : _g.value, (_h = state.addons) == null ? void 0 : _h.value]);
|
298
|
-
const handlePriceAdjustConfirm = (
|
299
|
-
const { productAmount } = (0, import_amount.getSumTotal)(state, {
|
300
|
-
isEdit: true,
|
301
|
-
ScheduleModule,
|
302
|
-
...getDataFromHost()
|
303
|
-
});
|
304
|
-
const discountAmount = Math.max(0, productAmount - newPrice);
|
314
|
+
const handlePriceAdjustConfirm = (discountAmount) => {
|
305
315
|
dispatch({
|
306
316
|
type: "setState",
|
307
317
|
payload: {
|
@@ -421,26 +431,19 @@ var ActionButtons = ({
|
|
421
431
|
onClearItemsOnly: handleClearItemsOnly,
|
422
432
|
onClearAllAndReset: handleClearAllAndReset
|
423
433
|
}
|
424
|
-
),
|
425
|
-
|
426
|
-
|
427
|
-
{
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
selectType: "dark",
|
438
|
-
originValue: currentTotalPrice,
|
439
|
-
value: currentTotalPrice,
|
440
|
-
onChange: handlePriceAdjustConfirm
|
441
|
-
}
|
442
|
-
))),
|
443
|
-
document.body
|
434
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
435
|
+
import_priceKeyboard.DiscountKeyboard,
|
436
|
+
{
|
437
|
+
containerProps: {
|
438
|
+
renderType: "modal",
|
439
|
+
open: showPriceAdjustModal,
|
440
|
+
onCancel: () => setShowPriceAdjustModal(false)
|
441
|
+
},
|
442
|
+
selectType: "dark",
|
443
|
+
originalValue: currentTotalPrice,
|
444
|
+
defaultValue: currentTotalPriceAfterDiscount,
|
445
|
+
onEnter: handlePriceAdjustConfirm
|
446
|
+
}
|
444
447
|
), /* @__PURE__ */ import_react.default.createElement(
|
445
448
|
import_customiseItemModal.default,
|
446
449
|
{
|
@@ -185,31 +185,3 @@
|
|
185
185
|
font-weight: 400 !important;
|
186
186
|
color: inherit !important;
|
187
187
|
}
|
188
|
-
|
189
|
-
// 价格调整覆盖层样式 - 现在通过 Portal 渲染到 document.body
|
190
|
-
.pisell-price-adjust-overlay {
|
191
|
-
position: fixed;
|
192
|
-
top: 0;
|
193
|
-
left: 0;
|
194
|
-
right: 0;
|
195
|
-
bottom: 0;
|
196
|
-
z-index: 9999; // 由于现在渲染到 document.body,使用更高的 z-index
|
197
|
-
display: flex;
|
198
|
-
align-items: center;
|
199
|
-
justify-content: center;
|
200
|
-
}
|
201
|
-
|
202
|
-
.pisell-price-adjust-backdrop {
|
203
|
-
position: absolute;
|
204
|
-
top: 0;
|
205
|
-
left: 0;
|
206
|
-
right: 0;
|
207
|
-
bottom: 0;
|
208
|
-
background: transparent; // 纯透明遮罩
|
209
|
-
cursor: pointer; // 显示点击手势
|
210
|
-
}
|
211
|
-
|
212
|
-
.pisell-price-adjust-container {
|
213
|
-
position: relative;
|
214
|
-
z-index: 10000; // 确保键盘在遮罩之上
|
215
|
-
}
|
@@ -23,12 +23,12 @@ export declare const getSumTotal: (state: any, options: {
|
|
23
23
|
surcharge: any;
|
24
24
|
otherAmount: any;
|
25
25
|
sumTotalAmount: number;
|
26
|
-
paidAmount:
|
26
|
+
paidAmount: any;
|
27
27
|
notPaidAmount: number;
|
28
28
|
paySurchargeFee: number;
|
29
29
|
expectAmount: number;
|
30
|
-
actualPaidAmount:
|
31
|
-
orderPaidAmount:
|
30
|
+
actualPaidAmount: any;
|
31
|
+
orderPaidAmount: any;
|
32
32
|
totalRefundAmount: number;
|
33
33
|
dueAmount: number;
|
34
34
|
roundingAmount: number;
|
@@ -39,63 +39,68 @@ var import_utils2 = require("@pisell/utils");
|
|
39
39
|
var import_decimal = __toESM(require("decimal.js"));
|
40
40
|
var import_utils3 = require("../../info/service2/utils");
|
41
41
|
var getRelationDetailsTotal = (relation_details) => {
|
42
|
-
let total = 0;
|
42
|
+
let total = new import_decimal.default(0);
|
43
43
|
for (let item of relation_details) {
|
44
|
-
const number = item.product_quantity || item.num;
|
45
|
-
const price = item.selling_price || item.payment_price || item.price;
|
46
|
-
total
|
44
|
+
const number = new import_decimal.default(item.product_quantity || item.num || 0);
|
45
|
+
const price = new import_decimal.default(item.selling_price || item.payment_price || item.price || 0);
|
46
|
+
total = total.add(price.mul(number));
|
47
47
|
}
|
48
|
-
return total;
|
48
|
+
return total.toNumber();
|
49
49
|
};
|
50
50
|
var getProductExpectAmount = (state, isEdit) => {
|
51
51
|
var _a, _b, _c, _d;
|
52
|
-
let price = 0;
|
53
|
-
let duration = 0;
|
52
|
+
let price = new import_decimal.default(0);
|
53
|
+
let duration = new import_decimal.default(0);
|
54
54
|
const isDay = (0, import_utils3.isDayBooking)(state);
|
55
55
|
if (isEdit) {
|
56
56
|
if ((state == null ? void 0 : state.service) || (state == null ? void 0 : state.addons)) {
|
57
57
|
if (Array.isArray((_a = state == null ? void 0 : state.service) == null ? void 0 : _a.value)) {
|
58
58
|
for (let item of state.service.value) {
|
59
59
|
if (isDay || (0, import_utils3.isNormalProductByDurationSchedule)(item)) {
|
60
|
-
const quantity = item._extend.quantity || 1;
|
61
|
-
|
62
|
-
|
63
|
-
duration
|
60
|
+
const quantity = new import_decimal.default(item._extend.quantity || 1);
|
61
|
+
const itemTotal = new import_decimal.default(item._extend.total || 0);
|
62
|
+
price = price.add(itemTotal.mul(quantity));
|
63
|
+
const _duration = (0, import_utils3.isDayBookingProduct)(item, state) ? new import_decimal.default(item._extend.duration || 0) : new import_decimal.default(0);
|
64
|
+
duration = duration.add(_duration);
|
64
65
|
} else {
|
65
|
-
const quantity = item._extend.quantity || 1;
|
66
|
-
|
67
|
-
price
|
66
|
+
const quantity = new import_decimal.default(item._extend.quantity || 1);
|
67
|
+
const itemTotal = new import_decimal.default(item._extend.total || 0);
|
68
|
+
price = price.add(itemTotal.mul(quantity));
|
69
|
+
const relationTotal = new import_decimal.default(getRelationDetailsTotal(
|
68
70
|
item._extend.relation_details || []
|
69
|
-
);
|
70
|
-
|
71
|
+
));
|
72
|
+
price = price.add(relationTotal);
|
73
|
+
const itemDuration = new import_decimal.default(import_utils.flexibleObj.getValue(item._extend.duration) || 0);
|
74
|
+
duration = duration.add(itemDuration);
|
71
75
|
}
|
72
76
|
}
|
73
77
|
}
|
74
78
|
if (!isDay && Array.isArray((_b = state.addons) == null ? void 0 : _b.value)) {
|
75
79
|
for (let item of state.addons.value) {
|
76
|
-
const quantity = item._extend.quantity || 1;
|
77
|
-
|
80
|
+
const quantity = new import_decimal.default(item._extend.quantity || 1);
|
81
|
+
const itemTotal = new import_decimal.default(item._extend.total || 0);
|
82
|
+
price = price.add(itemTotal.mul(quantity));
|
78
83
|
}
|
79
84
|
}
|
80
85
|
}
|
81
86
|
} else {
|
82
|
-
price =
|
87
|
+
price = new import_decimal.default(((_c = state.bookingDetail) == null ? void 0 : _c.product_expect_amount) || 0);
|
83
88
|
let services = ((_d = state == null ? void 0 : state.service) == null ? void 0 : _d.value) || [];
|
84
89
|
duration = services.reduce((pre, cur) => {
|
85
90
|
var _a2;
|
86
|
-
let current = 0;
|
91
|
+
let current = new import_decimal.default(0);
|
87
92
|
if (isDay) {
|
88
|
-
const _duration = (0, import_utils3.isDayBookingProduct)(cur, state) ? cur._extend.duration : 0;
|
89
|
-
current = _duration
|
93
|
+
const _duration = (0, import_utils3.isDayBookingProduct)(cur, state) ? new import_decimal.default(cur._extend.duration || 0) : new import_decimal.default(0);
|
94
|
+
current = _duration;
|
90
95
|
} else {
|
91
|
-
current = import_utils.flexibleObj.getValue(((_a2 = cur._extend) == null ? void 0 : _a2.duration) || 0);
|
96
|
+
current = new import_decimal.default(import_utils.flexibleObj.getValue(((_a2 = cur._extend) == null ? void 0 : _a2.duration) || 0) || 0);
|
92
97
|
}
|
93
|
-
return pre
|
94
|
-
}, 0);
|
98
|
+
return pre.add(current);
|
99
|
+
}, new import_decimal.default(0));
|
95
100
|
}
|
96
101
|
return {
|
97
|
-
productExpectAmount:
|
98
|
-
duration: (0, import_utils.getDiscountTime)(duration, isDay)
|
102
|
+
productExpectAmount: price.toNumber(),
|
103
|
+
duration: (0, import_utils.getDiscountTime)(duration.toNumber(), isDay)
|
99
104
|
};
|
100
105
|
};
|
101
106
|
var getProductItemTax = (item, state, options) => {
|
@@ -236,7 +241,9 @@ var getTaxInfo = (state, options) => {
|
|
236
241
|
var getPaySurchargeFee = (state) => {
|
237
242
|
const { bookingDetail, bookingId } = state;
|
238
243
|
if (!bookingDetail || !bookingId) return 0;
|
239
|
-
|
244
|
+
const processingFee = new import_decimal.default(bookingDetail.pay_processing_fee || 0);
|
245
|
+
const gatewayFee = new import_decimal.default(bookingDetail.gateway_fee || 0);
|
246
|
+
return processingFee.add(gatewayFee).toNumber();
|
240
247
|
};
|
241
248
|
var isProductMatchSurchargeCondition = (item, options) => {
|
242
249
|
var _a;
|
@@ -419,16 +426,22 @@ var getSurchargeAmount = (state, surcharge, options) => {
|
|
419
426
|
}, 0);
|
420
427
|
};
|
421
428
|
var getPaidAmount = (state) => {
|
422
|
-
var _a;
|
429
|
+
var _a, _b, _c, _d, _e;
|
423
430
|
const { bookingDetail, bookingId } = state;
|
431
|
+
if ((_b = (_a = state.paymentPaid) == null ? void 0 : _a.value) == null ? void 0 : _b.paidAmount) {
|
432
|
+
return (_d = (_c = state.paymentPaid) == null ? void 0 : _c.value) == null ? void 0 : _d.paidAmount;
|
433
|
+
}
|
424
434
|
if (!bookingDetail || !bookingId) return 0;
|
425
|
-
return Number((
|
435
|
+
return Number((_e = state.bookingDetail) == null ? void 0 : _e.paid_amount) || 0;
|
426
436
|
};
|
427
437
|
var getOrderPaidAmount = (state) => {
|
428
|
-
var _a;
|
438
|
+
var _a, _b, _c, _d, _e;
|
429
439
|
const { bookingDetail, bookingId } = state;
|
440
|
+
if ((_b = (_a = state.paymentPaid) == null ? void 0 : _a.value) == null ? void 0 : _b.paidAmountWithoutSurcharge) {
|
441
|
+
return (_d = (_c = state.paymentPaid) == null ? void 0 : _c.value) == null ? void 0 : _d.paidAmountWithoutSurcharge;
|
442
|
+
}
|
430
443
|
if (!bookingDetail || !bookingId) return 0;
|
431
|
-
return Number((
|
444
|
+
return Number((_e = state.bookingDetail) == null ? void 0 : _e.order_paid_amount) || 0;
|
432
445
|
};
|
433
446
|
var getIsPriceIncludeTax = (state) => {
|
434
447
|
var _a;
|
@@ -505,9 +518,11 @@ var getSumTotal = (state, options) => {
|
|
505
518
|
options
|
506
519
|
});
|
507
520
|
const sumTotalAmount = getSumTotalAmount({ expectAmount, roundingAmount });
|
508
|
-
const
|
521
|
+
const sumTotalAmountDecimal = new import_decimal.default((0, import_utils2.formatAmount)(sumTotalAmount, 2, "") || 0);
|
522
|
+
const orderPaidAmountDecimal = new import_decimal.default(orderPaidAmount || 0);
|
523
|
+
const notPaidAmount = sumTotalAmountDecimal.sub(orderPaidAmountDecimal).toNumber();
|
509
524
|
const actualPaidAmount = paidAmount;
|
510
|
-
const dueAmount = notPaidAmount < 0 ? Number((0, import_utils2.formatAmount)(notPaidAmount
|
525
|
+
const dueAmount = notPaidAmount < 0 ? Number((0, import_utils2.formatAmount)(new import_decimal.default(notPaidAmount).add(new import_decimal.default(totalRefundAmount)).toNumber(), 2, "")) : 0;
|
511
526
|
return {
|
512
527
|
productAmount: productExpectAmount,
|
513
528
|
duration,
|