@pisell/private-materials 6.4.42 → 6.4.44
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 +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +8 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- 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 +13 -2
- package/es/components/booking/components/footer/index.js +168 -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.d.ts +2 -2
- package/es/components/checkout/PaymentModal.d.ts +2 -0
- package/es/components/checkout/PaymentModal.js +395 -240
- package/es/components/checkout/components/AdditionalModule/index.less +1 -1
- package/es/components/checkout/components/AmountSummary/index.js +161 -54
- package/es/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
- package/es/components/checkout/components/CashPaymentModule/index.js +114 -137
- 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 +210 -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 +29 -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 +6 -1
- package/es/components/checkout/hooks/useWalletPass.js +2 -0
- package/es/components/checkout/index.less +1 -1
- package/es/components/checkout/locales.d.ts +33 -0
- package/es/components/checkout/locales.js +39 -3
- 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 +2 -2
- package/es/components/eftposPay/store/index.d.ts +6 -6
- 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/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 +4 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +310 -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 +11 -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 +442 -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 +11 -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 +27 -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 +10 -4
- package/lib/components/booking/components/footer/index.js +107 -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.d.ts +2 -2
- package/lib/components/checkout/PaymentModal.d.ts +2 -0
- package/lib/components/checkout/PaymentModal.js +152 -73
- package/lib/components/checkout/components/AdditionalModule/index.less +1 -1
- package/lib/components/checkout/components/AmountSummary/index.js +114 -40
- package/lib/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
- package/lib/components/checkout/components/CashPaymentModule/index.js +103 -140
- 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 +172 -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 +29 -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 +4 -1
- package/lib/components/checkout/hooks/useWalletPass.js +2 -0
- package/lib/components/checkout/index.less +1 -1
- package/lib/components/checkout/locales.d.ts +33 -0
- package/lib/components/checkout/locales.js +39 -3
- 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 +2 -2
- package/lib/components/eftposPay/store/index.d.ts +6 -6
- 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/index.js +5 -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 +4 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +332 -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 +11 -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 +485 -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 +11 -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 +27 -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 +2 -2
@@ -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");
|
@@ -48,6 +48,7 @@ var import_useCustomer = require("../../../ticketBooking/hooks/pisellos/useCusto
|
|
48
48
|
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
|
+
var import_priceKeyboard = require("../../../../pro/priceKeyboard");
|
51
52
|
var createToastContent = (text) => /* @__PURE__ */ import_react.default.createElement("div", { className: "action-buttons-toast-content" }, text);
|
52
53
|
var ActionButtons = ({
|
53
54
|
state,
|
@@ -146,6 +147,9 @@ var ActionButtons = ({
|
|
146
147
|
return 0;
|
147
148
|
}
|
148
149
|
}, [state, hasCartItems]);
|
150
|
+
const currentTotalPriceAfterDiscount = (0, import_react.useMemo)(() => {
|
151
|
+
return new import_decimal.default(currentTotalPrice).minus(state.shop_discount || 0).toNumber();
|
152
|
+
}, [state.shop_discount, currentTotalPrice]);
|
149
153
|
const [discountList, setDiscountList] = (0, import_react.useState)([]);
|
150
154
|
const usedVouchersCount = (0, import_react.useMemo)(() => {
|
151
155
|
var _a2, _b2;
|
@@ -217,6 +221,12 @@ var ActionButtons = ({
|
|
217
221
|
shop_discount: "0"
|
218
222
|
}
|
219
223
|
});
|
224
|
+
dispatch({
|
225
|
+
type: "setPaymentPaid",
|
226
|
+
payload: {
|
227
|
+
value: {}
|
228
|
+
}
|
229
|
+
});
|
220
230
|
setShowClearModal(false);
|
221
231
|
Toast == null ? void 0 : Toast.success(
|
222
232
|
createToastContent(
|
@@ -264,6 +274,12 @@ var ActionButtons = ({
|
|
264
274
|
orderNote: ""
|
265
275
|
}
|
266
276
|
});
|
277
|
+
dispatch({
|
278
|
+
type: "setPaymentPaid",
|
279
|
+
payload: {
|
280
|
+
value: {}
|
281
|
+
}
|
282
|
+
});
|
267
283
|
setShowClearModal(false);
|
268
284
|
Toast == null ? void 0 : Toast.success(
|
269
285
|
createToastContent(
|
@@ -293,13 +309,7 @@ var ActionButtons = ({
|
|
293
309
|
});
|
294
310
|
}
|
295
311
|
}, [(_g = state.service) == null ? void 0 : _g.value, (_h = state.addons) == null ? void 0 : _h.value]);
|
296
|
-
const handlePriceAdjustConfirm = (
|
297
|
-
const { productAmount } = (0, import_amount.getSumTotal)(state, {
|
298
|
-
isEdit: true,
|
299
|
-
ScheduleModule,
|
300
|
-
...getDataFromHost()
|
301
|
-
});
|
302
|
-
const discountAmount = Math.max(0, productAmount - newPrice);
|
312
|
+
const handlePriceAdjustConfirm = (discountAmount) => {
|
303
313
|
dispatch({
|
304
314
|
type: "setState",
|
305
315
|
payload: {
|
@@ -419,26 +429,19 @@ var ActionButtons = ({
|
|
419
429
|
onClearItemsOnly: handleClearItemsOnly,
|
420
430
|
onClearAllAndReset: handleClearAllAndReset
|
421
431
|
}
|
422
|
-
),
|
423
|
-
|
424
|
-
|
425
|
-
{
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
selectType: "dark",
|
436
|
-
originValue: currentTotalPrice,
|
437
|
-
value: currentTotalPrice,
|
438
|
-
onChange: handlePriceAdjustConfirm
|
439
|
-
}
|
440
|
-
))),
|
441
|
-
document.body
|
432
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
433
|
+
import_priceKeyboard.DiscountKeyboard,
|
434
|
+
{
|
435
|
+
containerProps: {
|
436
|
+
renderType: "modal",
|
437
|
+
open: showPriceAdjustModal,
|
438
|
+
onCancel: () => setShowPriceAdjustModal(false)
|
439
|
+
},
|
440
|
+
selectType: "dark",
|
441
|
+
originalValue: currentTotalPrice,
|
442
|
+
defaultValue: currentTotalPriceAfterDiscount,
|
443
|
+
onEnter: handlePriceAdjustConfirm
|
444
|
+
}
|
442
445
|
), /* @__PURE__ */ import_react.default.createElement(
|
443
446
|
import_customiseItemModal.default,
|
444
447
|
{
|
@@ -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;
|
@@ -419,16 +419,22 @@ var getSurchargeAmount = (state, surcharge, options) => {
|
|
419
419
|
}, 0);
|
420
420
|
};
|
421
421
|
var getPaidAmount = (state) => {
|
422
|
-
var _a;
|
422
|
+
var _a, _b, _c, _d, _e;
|
423
423
|
const { bookingDetail, bookingId } = state;
|
424
|
+
if ((_b = (_a = state.paymentPaid) == null ? void 0 : _a.value) == null ? void 0 : _b.paidAmount) {
|
425
|
+
return (_d = (_c = state.paymentPaid) == null ? void 0 : _c.value) == null ? void 0 : _d.paidAmount;
|
426
|
+
}
|
424
427
|
if (!bookingDetail || !bookingId) return 0;
|
425
|
-
return Number((
|
428
|
+
return Number((_e = state.bookingDetail) == null ? void 0 : _e.paid_amount) || 0;
|
426
429
|
};
|
427
430
|
var getOrderPaidAmount = (state) => {
|
428
|
-
var _a;
|
431
|
+
var _a, _b, _c, _d, _e;
|
429
432
|
const { bookingDetail, bookingId } = state;
|
433
|
+
if ((_b = (_a = state.paymentPaid) == null ? void 0 : _a.value) == null ? void 0 : _b.paidAmountWithoutSurcharge) {
|
434
|
+
return (_d = (_c = state.paymentPaid) == null ? void 0 : _c.value) == null ? void 0 : _d.paidAmountWithoutSurcharge;
|
435
|
+
}
|
430
436
|
if (!bookingDetail || !bookingId) return 0;
|
431
|
-
return Number((
|
437
|
+
return Number((_e = state.bookingDetail) == null ? void 0 : _e.order_paid_amount) || 0;
|
432
438
|
};
|
433
439
|
var getIsPriceIncludeTax = (state) => {
|
434
440
|
var _a;
|
@@ -62,7 +62,7 @@ var import_ahooks = require("ahooks");
|
|
62
62
|
var import_lodash = require("lodash");
|
63
63
|
var import_hooks = require("../../../appointmentBooking/hooks");
|
64
64
|
var Footer = (props) => {
|
65
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
65
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
66
66
|
const { state, buttons, dispatch, source } = props;
|
67
67
|
const [showDetail, setShowDetail] = (0, import_react.useState)(false);
|
68
68
|
const [loading, setLoading] = (0, import_react.useState)(false);
|
@@ -71,6 +71,7 @@ var Footer = (props) => {
|
|
71
71
|
const [isPaymentModalOpen, setIsPaymentModalOpen] = (0, import_react.useState)(false);
|
72
72
|
const [paymentModalData, setPaymentModalData] = (0, import_react.useState)(null);
|
73
73
|
const [paymentCallback, setPaymentCallback] = (0, import_react.useState)(null);
|
74
|
+
const [editOrderId, setEditOrderId] = (0, import_react.useState)(0);
|
74
75
|
const [isShowPaymentLink, setIsShowPaymentLink] = (0, import_react.useState)(false);
|
75
76
|
const isBooking4Shop = (0, import_useIsBooking4Shop.useIsBooking4Shop)(state);
|
76
77
|
const appointmentProductRef = (0, import_react.useRef)(null);
|
@@ -82,7 +83,8 @@ var Footer = (props) => {
|
|
82
83
|
store,
|
83
84
|
storage,
|
84
85
|
pisellosAllModule,
|
85
|
-
getData
|
86
|
+
getData,
|
87
|
+
pisellos
|
86
88
|
} = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
87
89
|
const { disableAllScanListeners } = (0, import_useScanManager.default)();
|
88
90
|
const { ScheduleModule } = pisellosAllModule;
|
@@ -123,6 +125,12 @@ var Footer = (props) => {
|
|
123
125
|
console.error(error);
|
124
126
|
}
|
125
127
|
}, []);
|
128
|
+
(0, import_react.useEffect)(() => {
|
129
|
+
var _a2, _b2, _c2, _d2, _e2;
|
130
|
+
if ((((_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length) === 0 || !((_c2 = state.service) == null ? void 0 : _c2.value)) && !((_e2 = (_d2 = state.paymentPaid) == null ? void 0 : _d2.value) == null ? void 0 : _e2.paidAmount)) {
|
131
|
+
setEditOrderId(0);
|
132
|
+
}
|
133
|
+
}, [state.service.value, (_b = state.paymentPaid) == null ? void 0 : _b.value]);
|
126
134
|
const [modal, contextHolder] = import_antd.Modal.useModal();
|
127
135
|
const { setActiveTab } = state;
|
128
136
|
const isTeam = (0, import_react.useMemo)(() => {
|
@@ -181,21 +189,21 @@ var Footer = (props) => {
|
|
181
189
|
const params = (0, import_react.useMemo)(() => {
|
182
190
|
var _a2, _b2, _c2;
|
183
191
|
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) || {};
|
184
|
-
}, [(
|
192
|
+
}, [(_e = (_d = (_c = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _c.config) == null ? void 0 : _d.basic) == null ? void 0 : _e.appointment_subject]);
|
185
193
|
const transaction_habit_selection = (0, import_react.useMemo)(() => {
|
186
194
|
var _a2, _b2, _c2;
|
187
195
|
return ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.information_tab) == null ? void 0 : _c2.transaction_habit_selection) || {
|
188
196
|
type: "service_now_pay_later",
|
189
197
|
button_rows: 1
|
190
198
|
};
|
191
|
-
}, [(
|
199
|
+
}, [(_g = (_f = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _f.config) == null ? void 0 : _g.information_tab]);
|
192
200
|
const addonsEdit = (0, import_react.useMemo)(() => {
|
193
201
|
var _a2;
|
194
202
|
if ((_a2 = state.addons) == null ? void 0 : _a2.edit) {
|
195
203
|
return true;
|
196
204
|
}
|
197
205
|
return false;
|
198
|
-
}, [(
|
206
|
+
}, [(_h = state.addons) == null ? void 0 : _h.edit]);
|
199
207
|
const infoEdit = (0, import_react.useMemo)(() => {
|
200
208
|
var _a2, _b2, _c2, _d2, _e2, _f2;
|
201
209
|
if (!state.bookingId) {
|
@@ -290,7 +298,7 @@ var Footer = (props) => {
|
|
290
298
|
label: import_utils.locales.getText("pisell2.text.refunded-amount")
|
291
299
|
}
|
292
300
|
];
|
293
|
-
}, [total, (
|
301
|
+
}, [total, (_i = state.bookingDetail) == null ? void 0 : _i.surcharge, state.bookingId]);
|
294
302
|
const subTotalList = (0, import_react.useMemo)(() => {
|
295
303
|
return [
|
296
304
|
// 小计
|
@@ -331,7 +339,7 @@ var Footer = (props) => {
|
|
331
339
|
label: import_utils.locales.getText("pisell1.text.rounding")
|
332
340
|
}
|
333
341
|
];
|
334
|
-
}, [total, (
|
342
|
+
}, [total, (_j = state.bookingDetail) == null ? void 0 : _j.surcharge, state.bookingId]);
|
335
343
|
const isDisabled = (0, import_react.useMemo)(() => {
|
336
344
|
var _a2;
|
337
345
|
const isClient = state.client.value;
|
@@ -453,7 +461,7 @@ var Footer = (props) => {
|
|
453
461
|
JSON.stringify(total),
|
454
462
|
JSON.stringify(orderTotalList),
|
455
463
|
JSON.stringify(subTotalList),
|
456
|
-
(
|
464
|
+
(_l = (_k = state.client) == null ? void 0 : _k.value) == null ? void 0 : _l.id
|
457
465
|
]);
|
458
466
|
const handleCheckout = async () => {
|
459
467
|
(0, import_PaymentResultToast.closeAllPaymentResultToasts)();
|
@@ -551,6 +559,30 @@ var Footer = (props) => {
|
|
551
559
|
}
|
552
560
|
return _isHasDayProducts;
|
553
561
|
};
|
562
|
+
const isOnlyDeposit = (0, import_react.useMemo)(() => {
|
563
|
+
var _a2, _b2, _c2, _d2;
|
564
|
+
if (((_a2 = state == null ? void 0 : state.bookingDetail) == null ? void 0 : _a2.deposit_payment_time) && ((_d2 = (_c2 = (_b2 = state == null ? void 0 : state.bookingDetail) == null ? void 0 : _b2.payment_types) == null ? void 0 : _c2.every) == null ? void 0 : _d2.call(
|
565
|
+
_c2,
|
566
|
+
(item) => item === "deposit"
|
567
|
+
))) {
|
568
|
+
return true;
|
569
|
+
}
|
570
|
+
return false;
|
571
|
+
}, [state == null ? void 0 : state.bookingDetail]);
|
572
|
+
const arrearsText = (0, import_react.useMemo)(() => {
|
573
|
+
let str = "";
|
574
|
+
if (isOnlyDeposit) {
|
575
|
+
return str;
|
576
|
+
}
|
577
|
+
if (total.dueAmount < 0) {
|
578
|
+
str = `${import_utils.locales.getText("pisell1.text.refund-customer")}: ${(0, import_utils.formatAmount)(
|
579
|
+
total.dueAmount,
|
580
|
+
2,
|
581
|
+
(state == null ? void 0 : state.amountSymbol) || "$"
|
582
|
+
)}`;
|
583
|
+
}
|
584
|
+
return str;
|
585
|
+
}, [state, total, isOnlyDeposit]);
|
554
586
|
const handleSave = async ({
|
555
587
|
type,
|
556
588
|
messageShow = true,
|
@@ -581,7 +613,29 @@ var Footer = (props) => {
|
|
581
613
|
if (noSubmit) {
|
582
614
|
return values;
|
583
615
|
}
|
584
|
-
|
616
|
+
if (editOrderId) {
|
617
|
+
const checkout = pisellos.getModule("checkout");
|
618
|
+
const subtotal_info = {
|
619
|
+
subTotalList: (0, import_lodash.cloneDeep)(subTotalList),
|
620
|
+
orderTotalList: (0, import_lodash.cloneDeep)(orderTotalList),
|
621
|
+
total: (0, import_lodash.cloneDeep)(total),
|
622
|
+
showDetail
|
623
|
+
};
|
624
|
+
await checkout.updateLocalOrderAsync({
|
625
|
+
orderId: editOrderId,
|
626
|
+
orderData: values,
|
627
|
+
cartSummary: subtotal_info.subTotalList,
|
628
|
+
autoPayment: true,
|
629
|
+
totalInfo: subtotal_info
|
630
|
+
});
|
631
|
+
const res = await checkout.manualSyncOrderAsync();
|
632
|
+
if (res.success) {
|
633
|
+
state == null ? void 0 : state.callback(res, type);
|
634
|
+
_setLoading(false);
|
635
|
+
}
|
636
|
+
return;
|
637
|
+
}
|
638
|
+
let api = state.bookingId ? editApi : createApi;
|
585
639
|
(0, import_utils4.sendWarningLog)({
|
586
640
|
title: "saveBooking",
|
587
641
|
content: [
|
@@ -593,7 +647,7 @@ var Footer = (props) => {
|
|
593
647
|
await handleSaveAddons();
|
594
648
|
}
|
595
649
|
if (infoEdit) {
|
596
|
-
callbackData = await api(values, state.bookingId);
|
650
|
+
callbackData = await api(values, state.bookingId || editOrderId);
|
597
651
|
if (messageShow) {
|
598
652
|
import_antd.message.success(
|
599
653
|
import_utils.locales.getText(
|
@@ -684,12 +738,12 @@ var Footer = (props) => {
|
|
684
738
|
onClick: () => {
|
685
739
|
handleCheckout();
|
686
740
|
},
|
687
|
-
disabled: isDisabled || isDisabledCheckOutForNegativeOrder
|
741
|
+
disabled: isDisabled || isDisabledCheckOutForNegativeOrder || arrearsText !== ""
|
688
742
|
},
|
689
743
|
import_utils.locales.getText("pisell2.text.checkout")
|
690
744
|
)
|
691
745
|
);
|
692
|
-
}, [isEdit, checkoutLoading, isDisabled, state, source]);
|
746
|
+
}, [isEdit, checkoutLoading, isDisabled, state, source, arrearsText]);
|
693
747
|
const handleMenuClick = async (e) => {
|
694
748
|
var _a2, _b2;
|
695
749
|
let id = state.bookingId;
|
@@ -900,7 +954,7 @@ var Footer = (props) => {
|
|
900
954
|
var _a2;
|
901
955
|
const note = ((_a2 = state == null ? void 0 : state.notes) == null ? void 0 : _a2.orderNote) || "";
|
902
956
|
return note.trim().length > 0;
|
903
|
-
}, [(
|
957
|
+
}, [(_m = state == null ? void 0 : state.notes) == null ? void 0 : _m.orderNote]);
|
904
958
|
const noteButton = (0, import_react.useMemo)(() => {
|
905
959
|
return /* @__PURE__ */ import_react.default.createElement(
|
906
960
|
import_antd.ConfigProvider,
|
@@ -1073,18 +1127,8 @@ var Footer = (props) => {
|
|
1073
1127
|
isShowPaymentLink,
|
1074
1128
|
source,
|
1075
1129
|
_buttons.length,
|
1076
|
-
(
|
1130
|
+
(_n = state == null ? void 0 : state.bookingDetail) == null ? void 0 : _n.payment_status
|
1077
1131
|
]);
|
1078
|
-
const isOnlyDeposit = (0, import_react.useMemo)(() => {
|
1079
|
-
var _a2, _b2, _c2, _d2;
|
1080
|
-
if (((_a2 = state == null ? void 0 : state.bookingDetail) == null ? void 0 : _a2.deposit_payment_time) && ((_d2 = (_c2 = (_b2 = state == null ? void 0 : state.bookingDetail) == null ? void 0 : _b2.payment_types) == null ? void 0 : _c2.every) == null ? void 0 : _d2.call(
|
1081
|
-
_c2,
|
1082
|
-
(item) => item === "deposit"
|
1083
|
-
))) {
|
1084
|
-
return true;
|
1085
|
-
}
|
1086
|
-
return false;
|
1087
|
-
}, [state == null ? void 0 : state.bookingDetail]);
|
1088
1132
|
const totalText = (0, import_react.useMemo)(() => {
|
1089
1133
|
var _a2;
|
1090
1134
|
let str = "";
|
@@ -1123,20 +1167,6 @@ var Footer = (props) => {
|
|
1123
1167
|
}
|
1124
1168
|
return str;
|
1125
1169
|
}, [state, total, state.bookingId, isOnlyDeposit]);
|
1126
|
-
const arrearsText = (0, import_react.useMemo)(() => {
|
1127
|
-
let str = "";
|
1128
|
-
if (isOnlyDeposit) {
|
1129
|
-
return str;
|
1130
|
-
}
|
1131
|
-
if (total.dueAmount < 0) {
|
1132
|
-
str = `${import_utils.locales.getText("pisell1.text.refund-customer")}: ${(0, import_utils.formatAmount)(
|
1133
|
-
total.dueAmount,
|
1134
|
-
2,
|
1135
|
-
(state == null ? void 0 : state.amountSymbol) || "$"
|
1136
|
-
)}`;
|
1137
|
-
}
|
1138
|
-
return str;
|
1139
|
-
}, [state, total, isOnlyDeposit]);
|
1140
1170
|
const showFooter = (0, import_react.useMemo)(() => {
|
1141
1171
|
var _a2;
|
1142
1172
|
if (state.bookingId) {
|
@@ -1151,7 +1181,7 @@ var Footer = (props) => {
|
|
1151
1181
|
}, [
|
1152
1182
|
state.bookingId,
|
1153
1183
|
state.bookingDetail,
|
1154
|
-
(
|
1184
|
+
(_o = state.addons) == null ? void 0 : _o.load,
|
1155
1185
|
state.renderType
|
1156
1186
|
]);
|
1157
1187
|
const menuChange = (e) => {
|
@@ -1239,6 +1269,34 @@ var Footer = (props) => {
|
|
1239
1269
|
}
|
1240
1270
|
});
|
1241
1271
|
(_a2 = shopDiscount == null ? void 0 : shopDiscount.clear) == null ? void 0 : _a2.call(shopDiscount);
|
1272
|
+
setEditOrderId(0);
|
1273
|
+
};
|
1274
|
+
const setEditCartMode = (order_id2, payData, closeModal = false) => {
|
1275
|
+
setEditOrderId(order_id2);
|
1276
|
+
if (closeModal) {
|
1277
|
+
setIsPaymentModalOpen(false);
|
1278
|
+
}
|
1279
|
+
dispatch({
|
1280
|
+
type: "setService",
|
1281
|
+
payload: {
|
1282
|
+
value: state.service.value.map((item) => ({ ...item, edit: true, booking_id: "checkout_edit", discount_list: item.discount_list.map((d) => ({ ...d, id: d.discount.resource_id })) }))
|
1283
|
+
}
|
1284
|
+
});
|
1285
|
+
dispatch({
|
1286
|
+
type: "setPaymentPaid",
|
1287
|
+
payload: {
|
1288
|
+
value: {
|
1289
|
+
paidAmount: payData.paidAmount,
|
1290
|
+
paidAmountWithoutSurcharge: payData.paidAmountWithoutSurcharge
|
1291
|
+
}
|
1292
|
+
}
|
1293
|
+
});
|
1294
|
+
shopDiscount.loadPrepareConfig({
|
1295
|
+
customerId: state.client.value.id,
|
1296
|
+
action: "create",
|
1297
|
+
with_good_pass: 1,
|
1298
|
+
with_discount_card: 1
|
1299
|
+
});
|
1242
1300
|
};
|
1243
1301
|
return /* @__PURE__ */ import_react.default.createElement(import_antd.Skeleton, { title: false, round: true, loading: showFooter, active: true }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-footer-total" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left" }, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left-total" }, totalText), /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-footer-left-arrears" }, arrearsText)), /* @__PURE__ */ import_react.default.createElement(
|
1244
1302
|
"span",
|
@@ -1314,7 +1372,7 @@ var Footer = (props) => {
|
|
1314
1372
|
{
|
1315
1373
|
open: noteModalOpen,
|
1316
1374
|
title: import_utils.locales.getText("pisell2.text.add-order-notes"),
|
1317
|
-
value: ((
|
1375
|
+
value: ((_p = state.notes) == null ? void 0 : _p.orderNote) || "",
|
1318
1376
|
onConfirm: handleNoteConfirm,
|
1319
1377
|
onDelete: handleNoteDelete,
|
1320
1378
|
onCancel: handleNoteCancel
|
@@ -1323,14 +1381,23 @@ var Footer = (props) => {
|
|
1323
1381
|
import_PaymentModal.default,
|
1324
1382
|
{
|
1325
1383
|
open: true,
|
1384
|
+
editOrderId,
|
1326
1385
|
data: paymentModalData,
|
1327
1386
|
callback: paymentCallback || void 0,
|
1387
|
+
setEditCartMode,
|
1328
1388
|
state,
|
1329
1389
|
dispatch,
|
1330
1390
|
onClose: (reset) => {
|
1331
1391
|
setIsPaymentModalOpen(false);
|
1332
1392
|
setPaymentModalData(null);
|
1333
1393
|
setPaymentCallback(null);
|
1394
|
+
setEditOrderId(0);
|
1395
|
+
dispatch({
|
1396
|
+
type: "setPaymentPaid",
|
1397
|
+
payload: {
|
1398
|
+
value: {}
|
1399
|
+
}
|
1400
|
+
});
|
1334
1401
|
if (reset) {
|
1335
1402
|
setTimeout(() => {
|
1336
1403
|
handleClearAllAndReset();
|