@pisell/private-materials 3.0.69 → 3.0.70
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/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +2 -2
- package/es/components/booking/addons/index.d.ts +1 -1
- package/es/components/booking/addons/model.d.ts +1 -2
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -1
- package/es/components/booking/components/footer/FooterMenus/index.js +71 -22
- package/es/components/booking/components/footer/index.js +254 -13
- package/es/components/booking/forms/forms.d.ts +1 -1
- package/es/components/booking/forms/index.d.ts +1 -1
- package/es/components/booking/forms/model.d.ts +1 -2
- package/es/components/booking/index.d.ts +1 -1
- package/es/components/booking/info/header/index.less +7 -1
- package/es/components/booking/info/index.d.ts +1 -1
- package/es/components/booking/info/index.js +5 -4
- package/es/components/booking/info/model.d.ts +1 -2
- package/es/components/booking/info/service/addService/index.js +6 -5
- package/es/components/booking/info/service/editService/index.js +19 -4
- package/es/components/booking/locales.js +10 -10
- package/es/components/booking/model.d.ts +1 -2
- package/es/components/booking/notes/index.d.ts +1 -1
- package/es/components/booking/notes/model.d.ts +1 -2
- package/es/components/booking/payments/index.d.ts +1 -1
- package/es/components/booking/payments/index.js +0 -6
- package/es/components/booking/payments/model.d.ts +1 -2
- package/es/components/booking/utils.js +1 -1
- package/es/components/schedules/index.d.ts +1 -1
- package/es/components/schedules/model.d.ts +1 -2
- package/lib/components/booking/addons/index.d.ts +1 -1
- package/lib/components/booking/addons/model.d.ts +1 -2
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -1
- package/lib/components/booking/components/footer/FooterMenus/index.js +4 -21
- package/lib/components/booking/components/footer/index.js +243 -16
- package/lib/components/booking/forms/forms.d.ts +1 -1
- package/lib/components/booking/forms/index.d.ts +1 -1
- package/lib/components/booking/forms/model.d.ts +1 -2
- package/lib/components/booking/index.d.ts +1 -1
- package/lib/components/booking/info/header/index.less +7 -1
- package/lib/components/booking/info/index.d.ts +1 -1
- package/lib/components/booking/info/index.js +3 -2
- package/lib/components/booking/info/model.d.ts +1 -2
- package/lib/components/booking/info/service/addService/index.js +6 -6
- package/lib/components/booking/info/service/editService/index.js +21 -6
- package/lib/components/booking/locales.js +10 -10
- package/lib/components/booking/model.d.ts +1 -2
- package/lib/components/booking/notes/index.d.ts +1 -1
- package/lib/components/booking/notes/model.d.ts +1 -2
- package/lib/components/booking/payments/index.d.ts +1 -1
- package/lib/components/booking/payments/index.js +0 -6
- package/lib/components/booking/payments/model.d.ts +1 -2
- package/lib/components/booking/utils.js +1 -1
- package/lib/components/schedules/index.d.ts +1 -1
- package/lib/components/schedules/model.d.ts +1 -2
- package/package.json +3 -3
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
2
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
4
3
|
state: FormState;
|
|
5
4
|
} & {
|
|
6
5
|
dispatch: (params: {
|
|
@@ -1,29 +1,75 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from "react";
|
|
2
2
|
import MenuButton from "../../../components/menuButton";
|
|
3
3
|
import "./index.less";
|
|
4
|
-
import { locales } from "@pisell/utils";
|
|
5
4
|
var FooterMenus = function FooterMenus(_ref) {
|
|
6
5
|
var state = _ref.state,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
6
|
+
menuChange = _ref.menuChange,
|
|
7
|
+
items = _ref.items;
|
|
8
|
+
// const items = useMemo(() => {
|
|
9
|
+
// return [
|
|
10
|
+
// {
|
|
11
|
+
// label: "Payment link",
|
|
12
|
+
// key: "payment",
|
|
13
|
+
// children: [
|
|
14
|
+
// {
|
|
15
|
+
// label: "Send email",
|
|
16
|
+
// key: "sendEmail",
|
|
17
|
+
// },
|
|
18
|
+
// {
|
|
19
|
+
// label: "Copy to clipboard",
|
|
20
|
+
// key: "copyToClipboard",
|
|
21
|
+
// },
|
|
22
|
+
// ],
|
|
23
|
+
// },
|
|
24
|
+
// {
|
|
25
|
+
// label: "Sale",
|
|
26
|
+
// key: "sale",
|
|
27
|
+
// },
|
|
28
|
+
// {
|
|
29
|
+
// label: "Print",
|
|
30
|
+
// key: "print",
|
|
31
|
+
// },
|
|
32
|
+
// {
|
|
33
|
+
// label: "Order detail",
|
|
34
|
+
// key: "orderDetail",
|
|
35
|
+
// },
|
|
36
|
+
// {
|
|
37
|
+
// label: "Refund",
|
|
38
|
+
// key: "refund",
|
|
39
|
+
// },
|
|
40
|
+
// {
|
|
41
|
+
// label: "Rebook",
|
|
42
|
+
// key: "rebook",
|
|
43
|
+
// },
|
|
44
|
+
// {
|
|
45
|
+
// label: "Cancel order",
|
|
46
|
+
// key: "cancelOrder",
|
|
47
|
+
// },
|
|
48
|
+
// ];
|
|
49
|
+
// let list = [];
|
|
50
|
+
// if (
|
|
51
|
+
// source === "info" &&
|
|
52
|
+
// state.bookingId &&
|
|
53
|
+
// state.renderType !== "eventBooking"
|
|
54
|
+
// ) {
|
|
55
|
+
// list.push({
|
|
56
|
+
// label: locales.getText("pisell2.text.rebook"),
|
|
57
|
+
// key: "rebook",
|
|
58
|
+
// });
|
|
59
|
+
// }
|
|
60
|
+
|
|
61
|
+
// return list;
|
|
62
|
+
// }, [state, source]);
|
|
63
|
+
|
|
64
|
+
// const handleRebook = () => {
|
|
65
|
+
// state.onRebook?.();
|
|
66
|
+
// };
|
|
67
|
+
|
|
68
|
+
// const menuChange = (e: any) => {
|
|
69
|
+
// if (e.key === "rebook") {
|
|
70
|
+
// handleRebook();
|
|
71
|
+
// }
|
|
72
|
+
// };
|
|
27
73
|
return items.length ? /*#__PURE__*/React.createElement("div", {
|
|
28
74
|
className: "pisell-lowcode__booking-footer-buttons-item-rebook"
|
|
29
75
|
}, /*#__PURE__*/React.createElement(MenuButton, {
|
|
@@ -31,6 +77,9 @@ var FooterMenus = function FooterMenus(_ref) {
|
|
|
31
77
|
dropdownProps: {
|
|
32
78
|
placement: "bottomLeft",
|
|
33
79
|
menu: {
|
|
80
|
+
style: {
|
|
81
|
+
minWidth: 200
|
|
82
|
+
},
|
|
34
83
|
items: items,
|
|
35
84
|
onClick: menuChange
|
|
36
85
|
}
|
|
@@ -20,7 +20,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
20
20
|
import React, { useEffect, useMemo, useState } from "react";
|
|
21
21
|
import ChevronDown from "@pisell/icon/es/ChevronDown";
|
|
22
22
|
import classNames from "classnames";
|
|
23
|
-
import { Skeleton, message, Dropdown, Space } from "antd";
|
|
23
|
+
import { Skeleton, message, Dropdown, Space, Modal } from "antd";
|
|
24
24
|
import { formatAmount, locales } from "@pisell/utils";
|
|
25
25
|
import { Button } from "antd";
|
|
26
26
|
import { formatProducts } from "../../addons";
|
|
@@ -40,7 +40,7 @@ import { DownOutlined } from "@ant-design/icons";
|
|
|
40
40
|
* @Date: 2024-01-30 16:51
|
|
41
41
|
*/
|
|
42
42
|
var Footer = function Footer(props) {
|
|
43
|
-
var _context$appHelper, _store$getState, _store$getState$call, _store$getState$call$, _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig4, _state$addons2, _state$addons4, _state$bookingDetail11;
|
|
43
|
+
var _context$appHelper, _store$getState, _store$getState$call, _store$getState$call$, _state$bookingConfig2, _state$bookingConfig3, _state$bookingConfig4, _state$bookingConfig8, _state$bookingConfig9, _state$addons2, _state$addons4, _state$bookingDetail11;
|
|
44
44
|
var state = props.state,
|
|
45
45
|
buttons = props.buttons,
|
|
46
46
|
dispatch = props.dispatch,
|
|
@@ -66,6 +66,58 @@ var Footer = function Footer(props) {
|
|
|
66
66
|
interaction = _context$appHelper$ut.interaction,
|
|
67
67
|
store = _context$appHelper$ut.store;
|
|
68
68
|
var isShowPaymentLink = store === null || store === void 0 ? void 0 : (_store$getState = store.getState) === null || _store$getState === void 0 ? void 0 : (_store$getState$call = _store$getState.call(store)) === null || _store$getState$call === void 0 ? void 0 : (_store$getState$call$ = _store$getState$call.global) === null || _store$getState$call$ === void 0 ? void 0 : _store$getState$call$.paymentLinkBtnShow;
|
|
69
|
+
var _Modal$useModal = Modal.useModal(),
|
|
70
|
+
_Modal$useModal2 = _slicedToArray(_Modal$useModal, 2),
|
|
71
|
+
modal = _Modal$useModal2[0],
|
|
72
|
+
contextHolder = _Modal$useModal2[1];
|
|
73
|
+
var setActiveTab = state.setActiveTab;
|
|
74
|
+
var actionMap = {
|
|
75
|
+
sale: {
|
|
76
|
+
label: locales.getText("pisell2.text.addons"),
|
|
77
|
+
key: "sale"
|
|
78
|
+
},
|
|
79
|
+
paymentLink: {
|
|
80
|
+
label: locales.getText("pisell2.text.payment-link"),
|
|
81
|
+
key: "payment",
|
|
82
|
+
children: [{
|
|
83
|
+
label: locales.getText("pisell2.text.send-mail"),
|
|
84
|
+
key: "sendMail"
|
|
85
|
+
}, {
|
|
86
|
+
label: locales.getText("pisell2.text.copy-to-clipboard"),
|
|
87
|
+
key: "copy"
|
|
88
|
+
}]
|
|
89
|
+
},
|
|
90
|
+
print: {
|
|
91
|
+
label: "Print",
|
|
92
|
+
key: "print"
|
|
93
|
+
},
|
|
94
|
+
orderDetail: {
|
|
95
|
+
label: locales.getText("pisell2.text.deposit-order-detail"),
|
|
96
|
+
key: "orderDetail"
|
|
97
|
+
},
|
|
98
|
+
refund: {
|
|
99
|
+
label: locales.getText("pisell2.text.refund"),
|
|
100
|
+
key: "refund"
|
|
101
|
+
},
|
|
102
|
+
rebook: {
|
|
103
|
+
label: locales.getText("pisell2.text.rebook"),
|
|
104
|
+
key: "rebook"
|
|
105
|
+
},
|
|
106
|
+
cancelOrder: {
|
|
107
|
+
label: "Cancel order",
|
|
108
|
+
key: "cancelOrder"
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
useEffect(function () {
|
|
112
|
+
if (state.bookingDetail) {
|
|
113
|
+
state.action({
|
|
114
|
+
type: "pisell1.registerPlugin",
|
|
115
|
+
data: {
|
|
116
|
+
pluginList: ["RefundPlugin"]
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}, [state.bookingDetail]);
|
|
69
121
|
useEffect(function () {
|
|
70
122
|
store === null || store === void 0 ? void 0 : store.dispatch({
|
|
71
123
|
type: "global/_getPaymentLinkBtnShow"
|
|
@@ -77,6 +129,13 @@ var Footer = function Footer(props) {
|
|
|
77
129
|
var _state$bookingConfig, _state$bookingConfig$, _state$bookingConfig$2;
|
|
78
130
|
return (state === null || state === void 0 ? void 0 : (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 ? void 0 : (_state$bookingConfig$ = _state$bookingConfig.config) === null || _state$bookingConfig$ === void 0 ? void 0 : (_state$bookingConfig$2 = _state$bookingConfig$.basic) === null || _state$bookingConfig$2 === void 0 ? void 0 : _state$bookingConfig$2.appointment_subject) || {};
|
|
79
131
|
}, [state === null || state === void 0 ? void 0 : (_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 ? void 0 : (_state$bookingConfig3 = _state$bookingConfig2.config) === null || _state$bookingConfig3 === void 0 ? void 0 : (_state$bookingConfig4 = _state$bookingConfig3.basic) === null || _state$bookingConfig4 === void 0 ? void 0 : _state$bookingConfig4.appointment_subject]);
|
|
132
|
+
var transaction_habit_selection = useMemo(function () {
|
|
133
|
+
var _state$bookingConfig5, _state$bookingConfig6, _state$bookingConfig7;
|
|
134
|
+
return (state === null || state === void 0 ? void 0 : (_state$bookingConfig5 = state.bookingConfig) === null || _state$bookingConfig5 === void 0 ? void 0 : (_state$bookingConfig6 = _state$bookingConfig5.config) === null || _state$bookingConfig6 === void 0 ? void 0 : (_state$bookingConfig7 = _state$bookingConfig6.information_tab) === null || _state$bookingConfig7 === void 0 ? void 0 : _state$bookingConfig7.transaction_habit_selection) || {
|
|
135
|
+
type: "service_now_pay_later",
|
|
136
|
+
button_rows: 1
|
|
137
|
+
};
|
|
138
|
+
}, [state === null || state === void 0 ? void 0 : (_state$bookingConfig8 = state.bookingConfig) === null || _state$bookingConfig8 === void 0 ? void 0 : (_state$bookingConfig9 = _state$bookingConfig8.config) === null || _state$bookingConfig9 === void 0 ? void 0 : _state$bookingConfig9.information_tab]);
|
|
80
139
|
|
|
81
140
|
// addons 是否有编辑
|
|
82
141
|
var addonsEdit = useMemo(function () {
|
|
@@ -415,7 +474,8 @@ var Footer = function Footer(props) {
|
|
|
415
474
|
key: "booking_refund",
|
|
416
475
|
data: {
|
|
417
476
|
order_id: state.bookingId
|
|
418
|
-
}
|
|
477
|
+
},
|
|
478
|
+
origin: "/booking"
|
|
419
479
|
});
|
|
420
480
|
}
|
|
421
481
|
state.action({
|
|
@@ -440,11 +500,21 @@ var Footer = function Footer(props) {
|
|
|
440
500
|
* @Date: 2024-01-30 16:57
|
|
441
501
|
*/
|
|
442
502
|
var checkoutButton = useMemo(function () {
|
|
503
|
+
var buttonType = "primary";
|
|
504
|
+
if (transaction_habit_selection.type === "service_now_pay_later") {
|
|
505
|
+
buttonType = "default";
|
|
506
|
+
}
|
|
507
|
+
if (source === "payment") {
|
|
508
|
+
buttonType = "primary";
|
|
509
|
+
}
|
|
510
|
+
if (!isEdit) {
|
|
511
|
+
buttonType = "primary";
|
|
512
|
+
}
|
|
443
513
|
return /*#__PURE__*/React.createElement(Button, {
|
|
444
514
|
className: "pisell-lowcode__booking-footer-buttons-item"
|
|
445
515
|
// payment页面为主按钮 info页面 编辑时默认按钮 否则是主按钮
|
|
446
516
|
,
|
|
447
|
-
type:
|
|
517
|
+
type: buttonType,
|
|
448
518
|
loading: checkoutLoading,
|
|
449
519
|
onClick: function onClick() {
|
|
450
520
|
handleCheckout();
|
|
@@ -477,6 +547,7 @@ var Footer = function Footer(props) {
|
|
|
477
547
|
} : state.bookingDetail.customer;
|
|
478
548
|
case 8:
|
|
479
549
|
if (e.key === "sendMail") {
|
|
550
|
+
console.log(e);
|
|
480
551
|
state.action({
|
|
481
552
|
type: "pisell1.sendPayLinkEmail",
|
|
482
553
|
data: {
|
|
@@ -508,6 +579,59 @@ var Footer = function Footer(props) {
|
|
|
508
579
|
return _ref7.apply(this, arguments);
|
|
509
580
|
};
|
|
510
581
|
}();
|
|
582
|
+
|
|
583
|
+
// 重新预约
|
|
584
|
+
var handleRebook = function handleRebook() {
|
|
585
|
+
var _state$onRebook;
|
|
586
|
+
(_state$onRebook = state.onRebook) === null || _state$onRebook === void 0 ? void 0 : _state$onRebook.call(state);
|
|
587
|
+
};
|
|
588
|
+
// 销售
|
|
589
|
+
var handleSale = function handleSale() {
|
|
590
|
+
if (isTerminal !== null && isTerminal !== void 0 && isTerminal()) {
|
|
591
|
+
var _interaction$utils3, _interaction$utils3$p;
|
|
592
|
+
return interaction === null || interaction === void 0 ? void 0 : (_interaction$utils3 = interaction.utils) === null || _interaction$utils3 === void 0 ? void 0 : (_interaction$utils3$p = _interaction$utils3.postMessageToApp) === null || _interaction$utils3$p === void 0 ? void 0 : _interaction$utils3$p.call(_interaction$utils3, {
|
|
593
|
+
module: "booking",
|
|
594
|
+
key: "edit_order",
|
|
595
|
+
data: {
|
|
596
|
+
order_id: state.bookingId
|
|
597
|
+
}
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
if (state.channelDisabledEdit) {
|
|
601
|
+
modal.warning({
|
|
602
|
+
okText: locales.getText("pisell2.text.ok"),
|
|
603
|
+
content: locales.getText("pisell2.text.terminal-edit-message")
|
|
604
|
+
});
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
607
|
+
setActiveTab === null || setActiveTab === void 0 ? void 0 : setActiveTab("addons");
|
|
608
|
+
};
|
|
609
|
+
// 打印
|
|
610
|
+
var handlePrint = function handlePrint() {};
|
|
611
|
+
// 订单详情
|
|
612
|
+
var handleOrderDetail = function handleOrderDetail() {
|
|
613
|
+
if (isTerminal !== null && isTerminal !== void 0 && isTerminal()) {
|
|
614
|
+
return interaction.utils.postMessageToApp({
|
|
615
|
+
module: "booking",
|
|
616
|
+
key: "view_order",
|
|
617
|
+
data: {
|
|
618
|
+
order_id: state.bookingId
|
|
619
|
+
},
|
|
620
|
+
origin: "/booking"
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
state.action({
|
|
624
|
+
type: "pisell1.goOrderDetail",
|
|
625
|
+
data: {
|
|
626
|
+
orderId: state.bookingId
|
|
627
|
+
},
|
|
628
|
+
callback: function callback() {
|
|
629
|
+
state === null || state === void 0 ? void 0 : state.callback();
|
|
630
|
+
}
|
|
631
|
+
});
|
|
632
|
+
};
|
|
633
|
+
// 取消订单
|
|
634
|
+
var handleCancel = function handleCancel() {};
|
|
511
635
|
var paymentLinkButton = useMemo(function () {
|
|
512
636
|
var items = [{
|
|
513
637
|
label: locales.getText("pisell2.text.send-mail"),
|
|
@@ -535,9 +659,13 @@ var Footer = function Footer(props) {
|
|
|
535
659
|
* @Date: 2024-01-30 16:58
|
|
536
660
|
*/
|
|
537
661
|
var saveButton = useMemo(function () {
|
|
662
|
+
var buttonType = "default";
|
|
663
|
+
if (transaction_habit_selection.type === "service_now_pay_later") {
|
|
664
|
+
buttonType = "primary";
|
|
665
|
+
}
|
|
538
666
|
return /*#__PURE__*/React.createElement(Button, {
|
|
539
667
|
className: "pisell-lowcode__booking-footer-buttons-item",
|
|
540
|
-
type:
|
|
668
|
+
type: buttonType,
|
|
541
669
|
onClick: function onClick() {
|
|
542
670
|
handleSave({
|
|
543
671
|
type: "save"
|
|
@@ -565,6 +693,21 @@ var Footer = function Footer(props) {
|
|
|
565
693
|
}, locales.getText("pisell2.text.status.completed"));
|
|
566
694
|
}, [state.appointment_status]);
|
|
567
695
|
|
|
696
|
+
/**
|
|
697
|
+
* @title: Rebook按钮
|
|
698
|
+
* @description:
|
|
699
|
+
* @param {*} useMemo
|
|
700
|
+
* @return {*}
|
|
701
|
+
* @Author: zhiwei.Wang
|
|
702
|
+
* @Date: 2024-01-30 16:58
|
|
703
|
+
*/
|
|
704
|
+
var rebookButton = useMemo(function () {
|
|
705
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
706
|
+
className: "pisell-lowcode__booking-footer-buttons-item",
|
|
707
|
+
onClick: handleRebook
|
|
708
|
+
}, locales.getText("pisell2.text.rebook"));
|
|
709
|
+
}, [state === null || state === void 0 ? void 0 : state.onRebook]);
|
|
710
|
+
|
|
568
711
|
/**
|
|
569
712
|
* @title: 退款按钮
|
|
570
713
|
* @description:
|
|
@@ -585,7 +728,8 @@ var Footer = function Footer(props) {
|
|
|
585
728
|
save: saveButton,
|
|
586
729
|
complete: completeButton,
|
|
587
730
|
refund: refundButton,
|
|
588
|
-
paymentLink: paymentLinkButton
|
|
731
|
+
paymentLink: paymentLinkButton,
|
|
732
|
+
rebook: rebookButton
|
|
589
733
|
};
|
|
590
734
|
|
|
591
735
|
/**
|
|
@@ -609,10 +753,57 @@ var Footer = function Footer(props) {
|
|
|
609
753
|
return false;
|
|
610
754
|
}
|
|
611
755
|
}, [state.bookingDetail, total.notPaidAmount]);
|
|
756
|
+
var moreButton = useMemo(function () {
|
|
757
|
+
var arr = [];
|
|
758
|
+
if (!state.bookingId) {
|
|
759
|
+
return [];
|
|
760
|
+
}
|
|
761
|
+
if (source !== "info") {
|
|
762
|
+
return [];
|
|
763
|
+
}
|
|
764
|
+
if (state.renderType === "eventBooking") {
|
|
765
|
+
return [];
|
|
766
|
+
}
|
|
767
|
+
// 支付链接
|
|
768
|
+
if (state.bookingId && isShowPaymentLink) {
|
|
769
|
+
arr.push(actionMap.paymentLink);
|
|
770
|
+
}
|
|
771
|
+
if (transaction_habit_selection.button_rows == 1) {
|
|
772
|
+
if (state.appointment_status !== "cancelled") {
|
|
773
|
+
if (!state.disabledEdit) {
|
|
774
|
+
arr.push(actionMap.sale);
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
// if (transaction_habit_selection.button_rows == 1) {
|
|
780
|
+
// if (isTerminal?.()) {
|
|
781
|
+
// arr.push(actionMap.print);
|
|
782
|
+
// }
|
|
783
|
+
// }
|
|
784
|
+
|
|
785
|
+
if (transaction_habit_selection.button_rows == 1) {
|
|
786
|
+
arr.push(actionMap.orderDetail);
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
// 退款
|
|
790
|
+
if (total.paidAmount > 0) {
|
|
791
|
+
arr.push(actionMap.refund);
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
// 重新预约
|
|
795
|
+
if (state.appointment_status !== "cancelled") {
|
|
796
|
+
arr.push(actionMap.rebook);
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
// 取消订单
|
|
800
|
+
// arr.push(actionMap.cancelOrder);
|
|
801
|
+
return arr;
|
|
802
|
+
}, [state, total, isShowPaymentLink, source]);
|
|
612
803
|
var _buttons = useMemo(function () {
|
|
613
804
|
// 如果预约是取消状态,则不展示任何按钮
|
|
614
805
|
if (state.appointment_status === "cancelled") {
|
|
615
|
-
return [];
|
|
806
|
+
return [buttonMap.rebook];
|
|
616
807
|
}
|
|
617
808
|
|
|
618
809
|
// addons 默认为新增按钮, 如果有新增数据 则添加save按钮
|
|
@@ -650,9 +841,9 @@ var Footer = function Footer(props) {
|
|
|
650
841
|
// info
|
|
651
842
|
if (source === "info") {
|
|
652
843
|
var _arr3 = [];
|
|
653
|
-
if (state.bookingId && isShowPaymentLink) {
|
|
654
|
-
|
|
655
|
-
}
|
|
844
|
+
// if (state.bookingId && isShowPaymentLink) {
|
|
845
|
+
// arr.push(buttonMap.paymentLink);
|
|
846
|
+
// }
|
|
656
847
|
// 有未支付金额 展示checkout
|
|
657
848
|
if (isCheckout) {
|
|
658
849
|
_arr3.push(buttonMap.checkout);
|
|
@@ -669,7 +860,7 @@ var Footer = function Footer(props) {
|
|
|
669
860
|
return _arr3;
|
|
670
861
|
}
|
|
671
862
|
return [];
|
|
672
|
-
}, [buttons, total, isEdit, checkoutLoading, isDisabled,
|
|
863
|
+
}, [buttons, total, isEdit, checkoutLoading, isDisabled, source, buttonMap, loading, isCheckout, state]);
|
|
673
864
|
|
|
674
865
|
/**
|
|
675
866
|
* 是否只有定金支付
|
|
@@ -788,6 +979,37 @@ var Footer = function Footer(props) {
|
|
|
788
979
|
}
|
|
789
980
|
return false;
|
|
790
981
|
}, [state.bookingId, state.bookingDetail, (_state$addons4 = state.addons) === null || _state$addons4 === void 0 ? void 0 : _state$addons4.load, state.renderType]);
|
|
982
|
+
var menuChange = function menuChange(e) {
|
|
983
|
+
console.log("e.key", e.key);
|
|
984
|
+
switch (e.key) {
|
|
985
|
+
case "sendMail":
|
|
986
|
+
handleMenuClick(e);
|
|
987
|
+
break;
|
|
988
|
+
case "copy":
|
|
989
|
+
handleMenuClick(e);
|
|
990
|
+
break;
|
|
991
|
+
case "rebook":
|
|
992
|
+
handleRebook();
|
|
993
|
+
break;
|
|
994
|
+
case "sale":
|
|
995
|
+
handleSale();
|
|
996
|
+
break;
|
|
997
|
+
case "print":
|
|
998
|
+
handlePrint();
|
|
999
|
+
break;
|
|
1000
|
+
case "orderDetail":
|
|
1001
|
+
handleOrderDetail();
|
|
1002
|
+
break;
|
|
1003
|
+
case "refund":
|
|
1004
|
+
handleRefund();
|
|
1005
|
+
break;
|
|
1006
|
+
case "cancelOrder":
|
|
1007
|
+
handleCancel();
|
|
1008
|
+
break;
|
|
1009
|
+
default:
|
|
1010
|
+
break;
|
|
1011
|
+
}
|
|
1012
|
+
};
|
|
791
1013
|
return /*#__PURE__*/React.createElement(Skeleton, {
|
|
792
1014
|
title: false,
|
|
793
1015
|
round: true,
|
|
@@ -885,9 +1107,28 @@ var Footer = function Footer(props) {
|
|
|
885
1107
|
}, formatAmount(total.totalRefundAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || "$"))) : null) : null), /*#__PURE__*/React.createElement("div", {
|
|
886
1108
|
className: "pisell-lowcode__booking-footer-buttons"
|
|
887
1109
|
}, /*#__PURE__*/React.createElement(FooterMenus, {
|
|
1110
|
+
items: moreButton,
|
|
888
1111
|
state: state,
|
|
889
1112
|
dispatch: dispatch,
|
|
890
|
-
source: source
|
|
891
|
-
|
|
1113
|
+
source: source,
|
|
1114
|
+
menuChange: menuChange
|
|
1115
|
+
}), _buttons), source === "info" && state.bookingId && !state.disabledEdit && (transaction_habit_selection === null || transaction_habit_selection === void 0 ? void 0 : transaction_habit_selection.button_rows) == 2 ? /*#__PURE__*/React.createElement("div", {
|
|
1116
|
+
className: "pisell-lowcode__booking-footer-buttons",
|
|
1117
|
+
style: {
|
|
1118
|
+
marginTop: 12
|
|
1119
|
+
}
|
|
1120
|
+
}, state.appointment_status !== "cancelled" ? /*#__PURE__*/React.createElement(Button, {
|
|
1121
|
+
onClick: function onClick() {
|
|
1122
|
+
return handleSale();
|
|
1123
|
+
},
|
|
1124
|
+
size: "large",
|
|
1125
|
+
className: "pisell-lowcode__booking-footer-buttons-item"
|
|
1126
|
+
}, actionMap.sale.label) : null, /*#__PURE__*/React.createElement(Button, {
|
|
1127
|
+
onClick: function onClick() {
|
|
1128
|
+
return handleOrderDetail();
|
|
1129
|
+
},
|
|
1130
|
+
size: "large",
|
|
1131
|
+
className: "pisell-lowcode__booking-footer-buttons-item"
|
|
1132
|
+
}, actionMap.orderDetail.label)) : null, contextHolder);
|
|
892
1133
|
};
|
|
893
1134
|
export default Footer;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FormState } from "../model";
|
|
3
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
2
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
4
3
|
state: FormState;
|
|
5
4
|
} & {
|
|
6
5
|
dispatch: (params: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Booking: (props: any) =>
|
|
1
|
+
declare const Booking: (props: any) => JSX.Element;
|
|
2
2
|
export default Booking;
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
font-size: 14px;
|
|
26
26
|
font-style: normal;
|
|
27
27
|
font-weight: 400;
|
|
28
|
-
line-height: 20px;
|
|
28
|
+
line-height: 20px;
|
|
29
|
+
/* 142.857% */
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
.booking-header-line-2 {
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
align-items: center;
|
|
35
36
|
justify-content: space-between;
|
|
36
37
|
}
|
|
38
|
+
|
|
37
39
|
.booking-header-left {
|
|
38
40
|
color: var(--Base-White, #FFF);
|
|
39
41
|
font-size: 18px;
|
|
@@ -51,6 +53,10 @@
|
|
|
51
53
|
font-style: normal;
|
|
52
54
|
font-weight: 400;
|
|
53
55
|
cursor: pointer;
|
|
56
|
+
border: 1px solid #fff;
|
|
57
|
+
padding: 4px 12px;
|
|
58
|
+
border-radius: 24px;
|
|
59
|
+
|
|
54
60
|
|
|
55
61
|
.booking-header-right-status-icon {
|
|
56
62
|
font-size: 20px;
|
|
@@ -30,7 +30,7 @@ var defaultModules = {
|
|
|
30
30
|
};
|
|
31
31
|
locales.init(localeTexts, localStorage.getItem("umi_locale") || "en");
|
|
32
32
|
var Info = Provider(function (props) {
|
|
33
|
-
var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state4, _modal$state4$notes, _context$
|
|
33
|
+
var _modal$state2, _modal$state2$booking, _modal$state2$booking2, _modal$state2$booking3, _modal$state4, _modal$state4$notes, _context$appHelper4, _context$appHelper4$u, _modal$state5, _React$createElement;
|
|
34
34
|
// return <Payments {...props} />;
|
|
35
35
|
var style = props.style,
|
|
36
36
|
globalState = props.globalState,
|
|
@@ -61,7 +61,7 @@ var Info = Provider(function (props) {
|
|
|
61
61
|
}
|
|
62
62
|
}, []);
|
|
63
63
|
useEffect(function () {
|
|
64
|
-
var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2;
|
|
64
|
+
var _context$appHelper, _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper2, _context$appHelper2$u, _context$appHelper2$u2, _context$appHelper3, _context$appHelper3$u, _context$appHelper3$u2, _context$appHelper3$u3, _context$appHelper3$u4, _context$appHelper3$u5;
|
|
65
65
|
var isFranchisee = context === null || context === void 0 ? void 0 : (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : (_context$appHelper$ut = _context$appHelper.utils) === null || _context$appHelper$ut === void 0 ? void 0 : (_context$appHelper$ut2 = _context$appHelper$ut.businessUtils) === null || _context$appHelper$ut2 === void 0 ? void 0 : (_context$appHelper$ut3 = _context$appHelper$ut2.getAppByModal) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.call(_context$appHelper$ut2, "franchisee");
|
|
66
66
|
modal.dispatch({
|
|
67
67
|
type: "setState",
|
|
@@ -69,7 +69,8 @@ var Info = Provider(function (props) {
|
|
|
69
69
|
setGlobalState: props.setGlobalState
|
|
70
70
|
}, globalState), {}, {
|
|
71
71
|
isTerminal: context === null || context === void 0 ? void 0 : (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : (_context$appHelper2$u = _context$appHelper2.utils) === null || _context$appHelper2$u === void 0 ? void 0 : (_context$appHelper2$u2 = _context$appHelper2$u.isTerminal) === null || _context$appHelper2$u2 === void 0 ? void 0 : _context$appHelper2$u2.call(_context$appHelper2$u),
|
|
72
|
-
isFranchisee: isFranchisee
|
|
72
|
+
isFranchisee: isFranchisee,
|
|
73
|
+
timezone: context === null || context === void 0 ? void 0 : (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 ? void 0 : (_context$appHelper3$u = _context$appHelper3.utils) === null || _context$appHelper3$u === void 0 ? void 0 : (_context$appHelper3$u2 = _context$appHelper3$u.store) === null || _context$appHelper3$u2 === void 0 ? void 0 : (_context$appHelper3$u3 = _context$appHelper3$u2.getState()) === null || _context$appHelper3$u3 === void 0 ? void 0 : (_context$appHelper3$u4 = _context$appHelper3$u3.global) === null || _context$appHelper3$u4 === void 0 ? void 0 : (_context$appHelper3$u5 = _context$appHelper3$u4.globalConfig) === null || _context$appHelper3$u5 === void 0 ? void 0 : _context$appHelper3$u5.timezone
|
|
73
74
|
})
|
|
74
75
|
});
|
|
75
76
|
}, [globalState]);
|
|
@@ -115,7 +116,7 @@ var Info = Provider(function (props) {
|
|
|
115
116
|
source: "info"
|
|
116
117
|
})
|
|
117
118
|
}, _defineProperty(_React$createElement, "style", {
|
|
118
|
-
height: context !== null && context !== void 0 && (_context$
|
|
119
|
+
height: context !== null && context !== void 0 && (_context$appHelper4 = context.appHelper) !== null && _context$appHelper4 !== void 0 && (_context$appHelper4$u = _context$appHelper4.utils) !== null && _context$appHelper4$u !== void 0 && _context$appHelper4$u.isMobile ? "100%" : "100vh"
|
|
119
120
|
}), _defineProperty(_React$createElement, "bodyClassName", "booking-info-warp"), _React$createElement), /*#__PURE__*/React.createElement("div", {
|
|
120
121
|
className: "booking-info"
|
|
121
122
|
}, modules.client ? /*#__PURE__*/React.createElement(Client, null) : null, modules.holder && !((_modal$state5 = modal.state) !== null && _modal$state5 !== void 0 && _modal$state5.disabledEdit) ? /*#__PURE__*/React.createElement(React.Fragment, null, params.type === "form" ? /*#__PURE__*/React.createElement(Pet, null) : null) : null, modules.date ? /*#__PURE__*/React.createElement(DateCom, null) : null, modules.service ? /*#__PURE__*/React.createElement(React.Fragment, null, modal.state.date.value ? /*#__PURE__*/React.createElement(Service, null) : null) : null, notes, slot ? slot : null)) : null);
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FormState } from "../model";
|
|
3
2
|
export declare const walkInData: {
|
|
4
3
|
id: number;
|
|
5
4
|
nickname: string;
|
|
6
5
|
};
|
|
7
|
-
export declare const Provider: (ComponentUi: any) => (props: any) =>
|
|
6
|
+
export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
|
|
8
7
|
state: FormState;
|
|
9
8
|
} & {
|
|
10
9
|
dispatch: (params: {
|