@pisell/private-materials 6.6.50 → 6.6.51
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/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/appointmentBooking/components/Voucher/index.js +7 -22
- package/es/components/booking/addons/index.js +2 -3
- package/es/components/booking/components/footer/amount.js +1 -1
- package/es/components/booking/components/footer/index.js +0 -7
- package/es/components/booking/components/footer/utils.d.ts +1 -1
- package/es/components/booking/components/footer/utils.js +5 -7
- package/es/components/booking/components/voucher/index.js +0 -6
- package/es/components/booking/components/voucher/index.less +1 -4
- package/es/components/booking/components/voucherModal/index.less +0 -1
- package/es/components/booking/info2/service/editService/index.js +2 -8
- package/es/components/checkout/components/WalletPassModule/index.js +0 -1
- package/es/components/checkout/components/WalletPassModule/utils.d.ts +0 -1
- package/es/components/checkout/components/WalletPassModule/utils.js +3 -17
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/hooks/useWalletPass.js +192 -316
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +145 -166
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
- package/es/components/pay/toC/WalletPassBlock/index.js +1 -3
- package/es/components/pay/toC/index.js +27 -66
- package/es/components/pay/toC/model.d.ts +0 -1
- package/es/components/pay/toC/serve.d.ts +0 -18
- package/es/components/pay/toC/serve.js +1 -29
- package/es/components/pay/toC/utils.d.ts +2 -2
- package/es/components/pay/toC/utils.js +0 -4
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +4 -7
- package/lib/components/appointmentBooking/components/Voucher/index.js +2 -10
- package/lib/components/booking/addons/index.js +2 -3
- package/lib/components/booking/components/footer/amount.js +1 -1
- package/lib/components/booking/components/footer/index.js +0 -9
- package/lib/components/booking/components/footer/utils.d.ts +1 -1
- package/lib/components/booking/components/footer/utils.js +3 -5
- package/lib/components/booking/components/voucher/index.js +0 -6
- package/lib/components/booking/components/voucher/index.less +1 -4
- package/lib/components/booking/components/voucherModal/index.less +0 -1
- package/lib/components/booking/info2/service/editService/index.js +18 -24
- package/lib/components/checkout/components/WalletPassModule/index.js +0 -1
- package/lib/components/checkout/components/WalletPassModule/utils.d.ts +0 -1
- package/lib/components/checkout/components/WalletPassModule/utils.js +2 -18
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/hooks/useWalletPass.js +108 -157
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +103 -90
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
- package/lib/components/pay/toC/WalletPassBlock/index.js +1 -3
- package/lib/components/pay/toC/index.js +11 -52
- package/lib/components/pay/toC/model.d.ts +0 -1
- package/lib/components/pay/toC/serve.d.ts +0 -18
- package/lib/components/pay/toC/serve.js +0 -6
- package/lib/components/pay/toC/utils.d.ts +2 -2
- package/lib/components/pay/toC/utils.js +0 -4
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +7 -11
- package/package.json +1 -1
|
@@ -61,13 +61,12 @@ var import_EditTabs = __toESM(require("../../../info/service/editService/EditTab
|
|
|
61
61
|
var import_BookingList = __toESM(require("../../../info/service/editService/BookingList"));
|
|
62
62
|
var import_dayjs = __toESM(require("dayjs"));
|
|
63
63
|
var import_utils9 = require("../../../info/service2/Group/utils");
|
|
64
|
-
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
65
64
|
var import_useShopDiscountModule = require("../../../../ticketBooking/hooks/pisellos/useShopDiscountModule");
|
|
66
65
|
var import_DiscountChangeModal = __toESM(require("./DiscountChangeModal"));
|
|
67
66
|
var import_decimal = __toESM(require("decimal.js"));
|
|
68
67
|
var submitLock = false;
|
|
69
68
|
var Info = (_, ref) => {
|
|
70
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K
|
|
69
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K;
|
|
71
70
|
const [form] = import_antd.Form.useForm();
|
|
72
71
|
const useTotal = import_antd.Form.useWatch("total", form);
|
|
73
72
|
const useResource = import_antd.Form.useWatch("resource", form);
|
|
@@ -86,10 +85,6 @@ var Info = (_, ref) => {
|
|
|
86
85
|
const [noteModalOpen, setNoteModalOpen] = (0, import_react.useState)(false);
|
|
87
86
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
88
87
|
const [currentTab, setCurrentTab] = (0, import_react.useState)("batch_edit");
|
|
89
|
-
const context = (0, import_useEngineContext.default)();
|
|
90
|
-
const {
|
|
91
|
-
getData
|
|
92
|
-
} = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
93
88
|
const valuesRef = (0, import_react.useRef)({});
|
|
94
89
|
const noInOriginalDiscountIdsRef = (0, import_react.useRef)([]);
|
|
95
90
|
const isEditedRef = (0, import_react.useRef)(false);
|
|
@@ -107,7 +102,7 @@ var Info = (_, ref) => {
|
|
|
107
102
|
return true;
|
|
108
103
|
}
|
|
109
104
|
return ((_b2 = state == null ? void 0 : state.service) == null ? void 0 : _b2.cacheItem) && (0, import_utils4.isNormalProductByDurationSchedule)((_c2 = state == null ? void 0 : state.service) == null ? void 0 : _c2.cacheItem);
|
|
110
|
-
}, [(
|
|
105
|
+
}, [(_a = state == null ? void 0 : state.service) == null ? void 0 : _a.cacheItem]);
|
|
111
106
|
const getCurrentCacheItem = (0, import_ahooks.useMemoizedFn)((_cacheItem) => {
|
|
112
107
|
let values = form.getFieldsValue();
|
|
113
108
|
let _item = _cacheItem || state.service.cacheItem;
|
|
@@ -137,7 +132,7 @@ var Info = (_, ref) => {
|
|
|
137
132
|
state.service.cacheItem,
|
|
138
133
|
useStartTime,
|
|
139
134
|
useResource,
|
|
140
|
-
(
|
|
135
|
+
(_d = (_c = (_b = state.bookingConfig) == null ? void 0 : _b.config) == null ? void 0 : _c.basic) == null ? void 0 : _d.service_time
|
|
141
136
|
]);
|
|
142
137
|
const flexibleOption = (0, import_react.useMemo)(() => {
|
|
143
138
|
const op = (0, import_utils7.getFlexibleOption)({
|
|
@@ -159,7 +154,7 @@ var Info = (_, ref) => {
|
|
|
159
154
|
durationProps,
|
|
160
155
|
useStartTime,
|
|
161
156
|
currentResource,
|
|
162
|
-
(
|
|
157
|
+
(_g = (_f = (_e = state.bookingConfig) == null ? void 0 : _e.config) == null ? void 0 : _f.basic) == null ? void 0 : _g.service_time,
|
|
163
158
|
useDuration
|
|
164
159
|
]);
|
|
165
160
|
(0, import_react.useEffect)(() => {
|
|
@@ -256,7 +251,6 @@ var Info = (_, ref) => {
|
|
|
256
251
|
}, 1500);
|
|
257
252
|
let _list = [...state.service.value];
|
|
258
253
|
let _item = {
|
|
259
|
-
is_price_include_tax: getData("is_price_include_tax"),
|
|
260
254
|
...cacheItem ?? state.service.cacheItem,
|
|
261
255
|
autoClose: false
|
|
262
256
|
};
|
|
@@ -436,7 +430,7 @@ var Info = (_, ref) => {
|
|
|
436
430
|
let oPrice = Number(((_a2 = state.service.cacheItem) == null ? void 0 : _a2._extend.origin_total) || 0);
|
|
437
431
|
let cPrice = Number(useTotal || 0);
|
|
438
432
|
return cPrice !== oPrice;
|
|
439
|
-
}, [useTotal, (
|
|
433
|
+
}, [useTotal, (_i = (_h = state.service.cacheItem) == null ? void 0 : _h._extend) == null ? void 0 : _i.origin_total]);
|
|
440
434
|
const getResources = () => {
|
|
441
435
|
var _a2, _b2;
|
|
442
436
|
let res = (0, import_utils7.formatResources)({
|
|
@@ -500,11 +494,11 @@ var Info = (_, ref) => {
|
|
|
500
494
|
}, [state.service.editModal, state.isBookingCreatePage]);
|
|
501
495
|
(0, import_react.useEffect)(() => {
|
|
502
496
|
getDiscount();
|
|
503
|
-
}, [useTotal, (
|
|
497
|
+
}, [useTotal, (_k = (_j = state.service.cacheItem) == null ? void 0 : _j._extend) == null ? void 0 : _k.origin_total]);
|
|
504
498
|
const bundles = (0, import_react.useMemo)(() => {
|
|
505
499
|
var _a2, _b2, _c2, _d2;
|
|
506
500
|
return ((_d2 = (_c2 = (_b2 = (_a2 = state.service) == null ? void 0 : _a2.cacheItem) == null ? void 0 : _b2._extend) == null ? void 0 : _c2.other) == null ? void 0 : _d2.bundle) || [];
|
|
507
|
-
}, [(
|
|
501
|
+
}, [(_o = (_n = (_m = (_l = state.service) == null ? void 0 : _l.cacheItem) == null ? void 0 : _m._extend) == null ? void 0 : _n.other) == null ? void 0 : _o.bundle]);
|
|
508
502
|
const handleEdit = (0, import_ahooks.useMemoizedFn)((e) => {
|
|
509
503
|
var _a2, _b2, _c2, _d2, _e2;
|
|
510
504
|
const item = state.service.cacheItem;
|
|
@@ -635,7 +629,7 @@ var Info = (_, ref) => {
|
|
|
635
629
|
}
|
|
636
630
|
return false;
|
|
637
631
|
}, [state.renderType, isNormalProduct]);
|
|
638
|
-
const SelectTime = (
|
|
632
|
+
const SelectTime = (_p = window.BaseMaterials) == null ? void 0 : _p.SelectTime;
|
|
639
633
|
const isNoSpecAndPackage = (0, import_utilsByBooking.getIsNoSpecAndPackage)(state.service.cacheItem);
|
|
640
634
|
const items = (0, import_react.useMemo)(() => {
|
|
641
635
|
var _a2, _b2;
|
|
@@ -672,7 +666,7 @@ var Info = (_, ref) => {
|
|
|
672
666
|
}
|
|
673
667
|
))));
|
|
674
668
|
}, [
|
|
675
|
-
(
|
|
669
|
+
(_s = (_r = (_q = state.service) == null ? void 0 : _q.cacheItem) == null ? void 0 : _r._extend) == null ? void 0 : _s.product_name,
|
|
676
670
|
bundles,
|
|
677
671
|
state.amountSymbol,
|
|
678
672
|
state.isBookingCreatePage
|
|
@@ -717,7 +711,7 @@ var Info = (_, ref) => {
|
|
|
717
711
|
));
|
|
718
712
|
}, [
|
|
719
713
|
useTotal,
|
|
720
|
-
(
|
|
714
|
+
(_u = (_t = state.service.cacheItem) == null ? void 0 : _t._extend) == null ? void 0 : _u.origin_total,
|
|
721
715
|
state.amountSymbol,
|
|
722
716
|
state.channelDisabledEdit
|
|
723
717
|
]);
|
|
@@ -765,7 +759,7 @@ var Info = (_, ref) => {
|
|
|
765
759
|
}
|
|
766
760
|
) : null
|
|
767
761
|
));
|
|
768
|
-
}, [SelectTime, (
|
|
762
|
+
}, [SelectTime, (_y = (_x = (_w = (_v = state.bookingConfig) == null ? void 0 : _v.config) == null ? void 0 : _w.basic) == null ? void 0 : _x.service_time) == null ? void 0 : _y.value, isEditGroup]);
|
|
769
763
|
const endTime = (0, import_react.useMemo)(() => {
|
|
770
764
|
if (!isEditGroup) {
|
|
771
765
|
return null;
|
|
@@ -804,8 +798,8 @@ var Info = (_, ref) => {
|
|
|
804
798
|
));
|
|
805
799
|
}, [
|
|
806
800
|
state.renderType,
|
|
807
|
-
(
|
|
808
|
-
(
|
|
801
|
+
(_A = (_z = state.service.cacheItem) == null ? void 0 : _z._data) == null ? void 0 : _A.resources,
|
|
802
|
+
(_C = (_B = state.service.cacheItem) == null ? void 0 : _B._data) == null ? void 0 : _C.resourceMaps
|
|
809
803
|
]);
|
|
810
804
|
const holder = (0, import_react.useMemo)(() => {
|
|
811
805
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
@@ -843,7 +837,7 @@ var Info = (_, ref) => {
|
|
|
843
837
|
}, [
|
|
844
838
|
state.locale,
|
|
845
839
|
state.isTerminal,
|
|
846
|
-
(
|
|
840
|
+
(_F = (_E = (_D = state.service) == null ? void 0 : _D.cacheItem) == null ? void 0 : _E._data) == null ? void 0 : _F.capacitys
|
|
847
841
|
]);
|
|
848
842
|
const hiddenQuantity = (0, import_react.useMemo)(() => {
|
|
849
843
|
return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "quantity" }, /* @__PURE__ */ import_react.default.createElement(import_antd.InputNumber, null));
|
|
@@ -923,10 +917,10 @@ var Info = (_, ref) => {
|
|
|
923
917
|
import_utils.locales.getText("pisell2.text.apply")
|
|
924
918
|
)
|
|
925
919
|
);
|
|
926
|
-
}, [(
|
|
920
|
+
}, [(_G = state.service.resourcesOrigin) == null ? void 0 : _G.length, isNormalProduct]);
|
|
927
921
|
console.log("render edit");
|
|
928
922
|
console.log(
|
|
929
|
-
state.service.editModal && !((
|
|
923
|
+
state.service.editModal && !((_H = state.service.cacheItem) == null ? void 0 : _H.autoClose),
|
|
930
924
|
performance.now() - window.pp1,
|
|
931
925
|
"打开商品1"
|
|
932
926
|
);
|
|
@@ -1061,7 +1055,7 @@ var Info = (_, ref) => {
|
|
|
1061
1055
|
zIndex: state.service.changeService ? 999 : 1e3,
|
|
1062
1056
|
forceRender: true,
|
|
1063
1057
|
mask: state.drawerMask,
|
|
1064
|
-
open: !isNoSpecAndPackage && state.service.editModal && !((
|
|
1058
|
+
open: !isNoSpecAndPackage && state.service.editModal && !((_I = state.service.cacheItem) == null ? void 0 : _I.autoClose),
|
|
1065
1059
|
title: import_utils.locales.getText("pisell2.text.edit-service"),
|
|
1066
1060
|
onClose: () => {
|
|
1067
1061
|
var _a2;
|
|
@@ -1087,7 +1081,7 @@ var Info = (_, ref) => {
|
|
|
1087
1081
|
display: currentTab === "batch_edit" ? "block" : "none"
|
|
1088
1082
|
}
|
|
1089
1083
|
},
|
|
1090
|
-
/* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, productName, price, reason, val && isShowTimeAndResource && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, startTime, endTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity, !(0, import_utils4.isNormalProductByDurationSchedule)(state.service.cacheItem) && !(0, import_utils6.isWalkIn)((
|
|
1084
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Row, { style: { width: "100%" }, gutter: [16, 0] }, productName, price, reason, val && isShowTimeAndResource && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, startTime, endTime, duration, resource, capacity, hiddenQuantity), isNormalProduct && quantity, !(0, import_utils4.isNormalProductByDurationSchedule)(state.service.cacheItem) && !(0, import_utils6.isWalkIn)((_K = (_J = state.client) == null ? void 0 : _J.value) == null ? void 0 : _K.id) && holder),
|
|
1091
1085
|
/* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "note" }, noteModalOpen && /* @__PURE__ */ import_react.default.createElement(
|
|
1092
1086
|
import_noteModal.default,
|
|
1093
1087
|
{
|
|
@@ -68,7 +68,6 @@ var WalletPassModule = (0, import_react.forwardRef)(
|
|
|
68
68
|
} = (0, import_useWalletPass.useWalletPass)({
|
|
69
69
|
onSelectChange,
|
|
70
70
|
customAmount,
|
|
71
|
-
totalAmount: Number(orderInfo == null ? void 0 : orderInfo.totalAmount) || 0,
|
|
72
71
|
clientId
|
|
73
72
|
});
|
|
74
73
|
const [expiredModalVisible, setExpiredModalVisible] = (0, import_react.useState)(false);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
declare type WalletPassDataType = Record<string, any>;
|
|
2
2
|
export declare const getAvailableMaxAmount: (data: WalletPassDataType) => any;
|
|
3
3
|
export declare const voucherTime: (data: WalletPassDataType, key?: string) => any;
|
|
4
|
-
export declare const getVoucherAvailableStatus: (item: any) => boolean;
|
|
5
4
|
export declare const formatMachineCodeServer2CardList: (data: WalletPassDataType[], selectId?: number[], otherProps?: Record<string, any>) => any;
|
|
6
5
|
export declare const formatDiscountWalletData: (data: any, selectId?: number[]) => any;
|
|
7
6
|
export interface WalletPassUsageUnit {
|
|
@@ -33,7 +33,6 @@ __export(utils_exports, {
|
|
|
33
33
|
formatMachineCodeServer2CardList: () => formatMachineCodeServer2CardList,
|
|
34
34
|
getAvailableMaxAmount: () => getAvailableMaxAmount,
|
|
35
35
|
getPointCardAmount: () => getPointCardAmount,
|
|
36
|
-
getVoucherAvailableStatus: () => getVoucherAvailableStatus,
|
|
37
36
|
isSameContent: () => isSameContent,
|
|
38
37
|
voucherTime: () => voucherTime
|
|
39
38
|
});
|
|
@@ -44,9 +43,6 @@ var import_materials = require("@pisell/materials");
|
|
|
44
43
|
var import_decimal = __toESM(require("decimal.js"));
|
|
45
44
|
var Amount = import_materials.PisellText.Amount;
|
|
46
45
|
var getAvailableMaxAmount = (data) => {
|
|
47
|
-
if ((0, import_utils.isNumber)(data._available_max_amount)) {
|
|
48
|
-
return data._available_max_amount;
|
|
49
|
-
}
|
|
50
46
|
return data.tag !== "point_card" ? data.available_max_amount : data == null ? void 0 : data.recommended_usage_amount;
|
|
51
47
|
};
|
|
52
48
|
var voucherTime = (data, key = "expire_date") => {
|
|
@@ -59,20 +55,9 @@ var voucherTime = (data, key = "expire_date") => {
|
|
|
59
55
|
}
|
|
60
56
|
return import_utils.locales.getText("pisell2.text.walletPassPermanent");
|
|
61
57
|
};
|
|
62
|
-
var getVoucherAvailableStatus = (item) => {
|
|
63
|
-
return item.unified_available_status === 1 && ((0, import_utils.isNumber)(item._unified_available_status) ? !!item._unified_available_status : true);
|
|
64
|
-
};
|
|
65
58
|
var formatMachineCodeServer2CardList = (data, selectId = [], otherProps = {}) => {
|
|
66
59
|
return (data || []).map((item) => {
|
|
67
60
|
var _a, _b;
|
|
68
|
-
let disabled = false;
|
|
69
|
-
if (item.unified_available_status === 0) {
|
|
70
|
-
disabled = true;
|
|
71
|
-
} else {
|
|
72
|
-
if ((0, import_utils.isNumber)(item._unified_available_status)) {
|
|
73
|
-
disabled = !item._unified_available_status;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
61
|
return {
|
|
77
62
|
id: item.id,
|
|
78
63
|
name: item.product_name,
|
|
@@ -89,8 +74,8 @@ var formatMachineCodeServer2CardList = (data, selectId = [], otherProps = {}) =>
|
|
|
89
74
|
showQrCode: false,
|
|
90
75
|
showStatus: true,
|
|
91
76
|
code: item.code,
|
|
92
|
-
disabled,
|
|
93
|
-
disabledReason: (
|
|
77
|
+
disabled: !item.unified_available_status,
|
|
78
|
+
disabledReason: (_a = item.unified_messages) == null ? void 0 : _a.title,
|
|
94
79
|
cover: (_b = item.product) == null ? void 0 : _b.cover,
|
|
95
80
|
qrCode: item.code,
|
|
96
81
|
validDate: voucherTime(item),
|
|
@@ -168,7 +153,6 @@ var isSameContent = (arr1, arr2) => {
|
|
|
168
153
|
formatMachineCodeServer2CardList,
|
|
169
154
|
getAvailableMaxAmount,
|
|
170
155
|
getPointCardAmount,
|
|
171
|
-
getVoucherAvailableStatus,
|
|
172
156
|
isSameContent,
|
|
173
157
|
voucherTime
|
|
174
158
|
});
|
|
@@ -9,7 +9,6 @@ export declare const useWalletPass: (props: {
|
|
|
9
9
|
}[]) => void) | undefined;
|
|
10
10
|
customAmount?: string | undefined;
|
|
11
11
|
clientId?: number | undefined;
|
|
12
|
-
totalAmount?: number | undefined;
|
|
13
12
|
}) => {
|
|
14
13
|
walletRecommendList: any[];
|
|
15
14
|
userIdentificationCodes: any[];
|
|
@@ -30,6 +29,7 @@ export declare const useWalletPass: (props: {
|
|
|
30
29
|
selectedDiscountList: any;
|
|
31
30
|
handleSelectDiscount: (this: unknown, value: number[], option: any) => void;
|
|
32
31
|
customerName: any;
|
|
32
|
+
fetchWalletRecommendList: (this: unknown, params: any) => Promise<any>;
|
|
33
33
|
fetchUserIdentificationCodes: (this: unknown, params: any) => Promise<any>;
|
|
34
34
|
getCachedWalletRecommendList: (this: unknown) => any;
|
|
35
35
|
getCachedUserIdentificationCodes: (this: unknown) => any;
|