@pisell/private-materials 6.6.11 → 6.6.12
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/meta.js +1 -1
- 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 +22 -7
- package/es/components/booking/addons/index.js +3 -2
- package/es/components/booking/components/footer/amount.js +2 -2
- package/es/components/booking/components/footer/index.js +7 -0
- package/es/components/booking/components/footer/utils.d.ts +1 -1
- package/es/components/booking/components/footer/utils.js +5 -3
- package/es/components/booking/components/voucher/index.js +6 -0
- package/es/components/booking/components/voucher/index.less +4 -1
- package/es/components/booking/components/voucherModal/index.less +1 -0
- package/es/components/booking/info2/service/editService/index.js +33 -2
- package/es/components/checkout/components/WalletPassModule/index.js +1 -0
- package/es/components/checkout/components/WalletPassModule/utils.js +14 -3
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/hooks/useWalletPass.js +310 -189
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +166 -145
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
- package/es/components/pay/toC/WalletPassBlock/index.js +3 -1
- package/es/components/pay/toC/index.js +66 -27
- package/es/components/pay/toC/model.d.ts +1 -0
- package/es/components/pay/toC/serve.d.ts +18 -0
- package/es/components/pay/toC/serve.js +29 -1
- package/es/components/pay/toC/utils.d.ts +2 -2
- package/es/components/pay/toC/utils.js +4 -0
- package/es/components/systemSettings/registry/components/SectionList.js +5 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +7 -4
- package/es/plus/walletPassGallery/serve.js +2 -0
- package/es/pro/Login2.0/AuthModal.js +12 -4
- package/es/pro/Login2.0/index.less +7 -7
- package/lib/components/appointmentBooking/components/Voucher/index.js +10 -2
- package/lib/components/booking/addons/index.js +3 -2
- package/lib/components/booking/components/footer/amount.js +1 -1
- package/lib/components/booking/components/footer/index.js +9 -0
- package/lib/components/booking/components/footer/utils.d.ts +1 -1
- package/lib/components/booking/components/footer/utils.js +5 -3
- package/lib/components/booking/components/voucher/index.js +6 -0
- package/lib/components/booking/components/voucher/index.less +4 -1
- package/lib/components/booking/components/voucherModal/index.less +1 -0
- package/lib/components/booking/info2/service/editService/index.js +48 -24
- package/lib/components/checkout/components/WalletPassModule/index.js +1 -0
- package/lib/components/checkout/components/WalletPassModule/utils.js +13 -2
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/hooks/useWalletPass.js +151 -104
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +90 -103
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
- package/lib/components/pay/toC/WalletPassBlock/index.js +3 -1
- package/lib/components/pay/toC/index.js +52 -11
- package/lib/components/pay/toC/model.d.ts +1 -0
- package/lib/components/pay/toC/serve.d.ts +18 -0
- package/lib/components/pay/toC/serve.js +6 -0
- package/lib/components/pay/toC/utils.d.ts +2 -2
- package/lib/components/pay/toC/utils.js +4 -0
- package/lib/components/systemSettings/registry/components/SectionList.js +4 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +11 -7
- package/lib/plus/walletPassGallery/serve.js +2 -0
- package/lib/pro/Login2.0/AuthModal.js +15 -7
- package/lib/pro/Login2.0/index.less +7 -7
- package/package.json +2 -2
- package/es/components/checkout/PaymentModal.d.ts +0 -31
- package/lib/components/checkout/PaymentModal.d.ts +0 -31
|
@@ -135,11 +135,17 @@ var VoucherCard = (props) => {
|
|
|
135
135
|
}
|
|
136
136
|
onScanCode(e.detail.code);
|
|
137
137
|
});
|
|
138
|
+
const onOriginExpectAmountWithoutDiscountChange = (0, import_ahooks.useMemoizedFn)((e) => {
|
|
139
|
+
var _a2;
|
|
140
|
+
(_a2 = shopDiscount == null ? void 0 : shopDiscount.setOriginTotalAmount) == null ? void 0 : _a2.call(shopDiscount, e.detail.originExpectAmountWithoutDiscount);
|
|
141
|
+
});
|
|
138
142
|
(0, import_react.useEffect)(() => {
|
|
139
143
|
const wrappedOnScanWallPassCode = executeIfActive(onScanWallPassCode);
|
|
140
144
|
window.addEventListener("onScanWallPassCode", wrappedOnScanWallPassCode);
|
|
145
|
+
window.addEventListener("onOriginExpectAmountWithoutDiscountChange", onOriginExpectAmountWithoutDiscountChange);
|
|
141
146
|
return () => {
|
|
142
147
|
window.removeEventListener("onScanWallPassCode", wrappedOnScanWallPassCode);
|
|
148
|
+
window.removeEventListener("onOriginExpectAmountWithoutDiscountChange", onOriginExpectAmountWithoutDiscountChange);
|
|
143
149
|
};
|
|
144
150
|
}, []);
|
|
145
151
|
const addonsMemo = (0, import_react.useMemo)(() => {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
.pisell-lowcode__booking-footer-voucher-container {
|
|
2
2
|
margin-bottom: 8px;
|
|
3
|
+
width: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
3
6
|
.voucher-title {
|
|
4
7
|
display: flex;
|
|
5
8
|
align-items: center;
|
|
@@ -47,9 +50,9 @@
|
|
|
47
50
|
width: 100%;
|
|
48
51
|
transition: 0.2s;
|
|
49
52
|
max-height: 0;
|
|
50
|
-
overflow: hidden;
|
|
51
53
|
display: flex;
|
|
52
54
|
flex-direction: column;
|
|
55
|
+
overflow: auto;
|
|
53
56
|
|
|
54
57
|
&.show {
|
|
55
58
|
max-height: unset;
|
|
@@ -61,9 +61,11 @@ 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_decimal = __toESM(require("decimal.js"));
|
|
65
|
+
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
64
66
|
var submitLock = false;
|
|
65
67
|
var Info = (_, ref) => {
|
|
66
|
-
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;
|
|
68
|
+
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, _L;
|
|
67
69
|
const [form] = import_antd.Form.useForm();
|
|
68
70
|
const useTotal = import_antd.Form.useWatch("total", form);
|
|
69
71
|
const useResource = import_antd.Form.useWatch("resource", form);
|
|
@@ -80,6 +82,10 @@ var Info = (_, ref) => {
|
|
|
80
82
|
const [noteModalOpen, setNoteModalOpen] = (0, import_react.useState)(false);
|
|
81
83
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
82
84
|
const [currentTab, setCurrentTab] = (0, import_react.useState)("batch_edit");
|
|
85
|
+
const context = (0, import_useEngineContext.default)();
|
|
86
|
+
const {
|
|
87
|
+
getData
|
|
88
|
+
} = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
83
89
|
(0, import_react.useEffect)(() => {
|
|
84
90
|
window.openBookingEditModal = () => {
|
|
85
91
|
setOpen(true);
|
|
@@ -94,7 +100,7 @@ var Info = (_, ref) => {
|
|
|
94
100
|
return true;
|
|
95
101
|
}
|
|
96
102
|
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);
|
|
97
|
-
}, [(
|
|
103
|
+
}, [(_b = state == null ? void 0 : state.service) == null ? void 0 : _b.cacheItem]);
|
|
98
104
|
const getCurrentCacheItem = (0, import_ahooks.useMemoizedFn)((_cacheItem) => {
|
|
99
105
|
let values = form.getFieldsValue();
|
|
100
106
|
let _item = _cacheItem || state.service.cacheItem;
|
|
@@ -124,7 +130,7 @@ var Info = (_, ref) => {
|
|
|
124
130
|
state.service.cacheItem,
|
|
125
131
|
useStartTime,
|
|
126
132
|
useResource,
|
|
127
|
-
(
|
|
133
|
+
(_e = (_d = (_c = state.bookingConfig) == null ? void 0 : _c.config) == null ? void 0 : _d.basic) == null ? void 0 : _e.service_time
|
|
128
134
|
]);
|
|
129
135
|
const flexibleOption = (0, import_react.useMemo)(() => {
|
|
130
136
|
const op = (0, import_utils7.getFlexibleOption)({
|
|
@@ -146,7 +152,7 @@ var Info = (_, ref) => {
|
|
|
146
152
|
durationProps,
|
|
147
153
|
useStartTime,
|
|
148
154
|
currentResource,
|
|
149
|
-
(
|
|
155
|
+
(_h = (_g = (_f = state.bookingConfig) == null ? void 0 : _f.config) == null ? void 0 : _g.basic) == null ? void 0 : _h.service_time,
|
|
150
156
|
useDuration
|
|
151
157
|
]);
|
|
152
158
|
(0, import_react.useEffect)(() => {
|
|
@@ -199,7 +205,7 @@ var Info = (_, ref) => {
|
|
|
199
205
|
form.setFieldsValue({ discount });
|
|
200
206
|
};
|
|
201
207
|
const onFinish = (values) => {
|
|
202
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2;
|
|
208
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2;
|
|
203
209
|
let isSuccess = (_a2 = resourcesRef.current) == null ? void 0 : _a2.check();
|
|
204
210
|
if (isShowTimeAndResource && !isSuccess) {
|
|
205
211
|
return;
|
|
@@ -213,6 +219,7 @@ var Info = (_, ref) => {
|
|
|
213
219
|
}, 1500);
|
|
214
220
|
let _list = [...state.service.value];
|
|
215
221
|
let _item = {
|
|
222
|
+
is_price_include_tax: getData("is_price_include_tax"),
|
|
216
223
|
...state.service.cacheItem,
|
|
217
224
|
autoClose: false
|
|
218
225
|
};
|
|
@@ -233,6 +240,23 @@ var Info = (_, ref) => {
|
|
|
233
240
|
_extend.startDate = startDate;
|
|
234
241
|
_extend.endDate = endDate;
|
|
235
242
|
}
|
|
243
|
+
if (isChangeTotal.current) {
|
|
244
|
+
const discountRatio = new import_decimal.default(values.total).div(_item._extend.origin_total);
|
|
245
|
+
const bundles2 = ((_c2 = _extend == null ? void 0 : _extend.other) == null ? void 0 : _c2.bundle) || [];
|
|
246
|
+
let childProductsTotal = new import_decimal.default(0);
|
|
247
|
+
if (bundles2.length > 0) {
|
|
248
|
+
bundles2.forEach((bundle) => {
|
|
249
|
+
const discountedPrice = new import_decimal.default(bundle.original_price).mul(discountRatio).toDecimalPlaces(2, import_decimal.default.ROUND_HALF_UP);
|
|
250
|
+
bundle.bundle_selling_price = discountedPrice.toNumber();
|
|
251
|
+
childProductsTotal = childProductsTotal.add(
|
|
252
|
+
discountedPrice.mul(bundle.quantity)
|
|
253
|
+
);
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
const mainProductTotal = new import_decimal.default(values.total).sub(childProductsTotal);
|
|
257
|
+
const mainProductQuantity = ((_d2 = _extend.other) == null ? void 0 : _d2.quantity) || _extend.quantity || 1;
|
|
258
|
+
_extend.main_product_selling_price = mainProductTotal.div(mainProductQuantity).toNumber();
|
|
259
|
+
}
|
|
236
260
|
if (_extend.bundle_edit !== void 0) {
|
|
237
261
|
_extend.bundle_edit = 1;
|
|
238
262
|
}
|
|
@@ -240,7 +264,7 @@ var Info = (_, ref) => {
|
|
|
240
264
|
_item._time = (/* @__PURE__ */ new Date()).getTime();
|
|
241
265
|
_item._serviceKey = (0, import_utils3.genServiceKey)(_item);
|
|
242
266
|
_item._holderKey = (0, import_utils3.genHolderKey)(_item);
|
|
243
|
-
if (((
|
|
267
|
+
if (((_f2 = (_e2 = _item._extend) == null ? void 0 : _e2.holder_id) == null ? void 0 : _f2.length) > 1 || ((_g2 = _item._extend) == null ? void 0 : _g2.quantity) > 1 && ((_i2 = (_h2 = _item._extend) == null ? void 0 : _h2.holder_id) == null ? void 0 : _i2.length) >= 1) {
|
|
244
268
|
let holder_ids = _item._extend.holder_id;
|
|
245
269
|
_item._extend.holder_id = holder_ids[0];
|
|
246
270
|
holder_ids = holder_ids.slice(1);
|
|
@@ -259,10 +283,10 @@ var Info = (_, ref) => {
|
|
|
259
283
|
}
|
|
260
284
|
}
|
|
261
285
|
let _id = _item == null ? void 0 : _item._id;
|
|
262
|
-
let groupId = (
|
|
286
|
+
let groupId = (_j2 = _item == null ? void 0 : _item._extend) == null ? void 0 : _j2.groupId;
|
|
263
287
|
_item = (0, import_utils8.setProductPrice)(_item, {
|
|
264
288
|
newTotal: values.total,
|
|
265
|
-
origin_total: (
|
|
289
|
+
origin_total: (_k2 = _item._extend) == null ? void 0 : _k2.origin_total
|
|
266
290
|
});
|
|
267
291
|
if (groupId) {
|
|
268
292
|
_list = _list.filter((d) => {
|
|
@@ -284,7 +308,7 @@ var Info = (_, ref) => {
|
|
|
284
308
|
(0, import_utils6.deleteCacheParams)();
|
|
285
309
|
console.log("_onFinish", _list);
|
|
286
310
|
form.resetFields();
|
|
287
|
-
if (!!((
|
|
311
|
+
if (!!((_l2 = state.service.cacheItem) == null ? void 0 : _l2.new)) {
|
|
288
312
|
window.dispatchEvent(
|
|
289
313
|
new CustomEvent("onAddNewService", {
|
|
290
314
|
detail: {
|
|
@@ -293,7 +317,7 @@ var Info = (_, ref) => {
|
|
|
293
317
|
})
|
|
294
318
|
);
|
|
295
319
|
}
|
|
296
|
-
(
|
|
320
|
+
(_m2 = window.closeBookingEditModal) == null ? void 0 : _m2.call(window);
|
|
297
321
|
_list.sort((a, b) => {
|
|
298
322
|
var _a3, _b3;
|
|
299
323
|
const aHasHolderId = ((_a3 = a._extend) == null ? void 0 : _a3.holder_id) && (Array.isArray(a._extend.holder_id) ? a._extend.holder_id.length > 0 : true);
|
|
@@ -370,7 +394,7 @@ var Info = (_, ref) => {
|
|
|
370
394
|
let oPrice = Number(((_a2 = state.service.cacheItem) == null ? void 0 : _a2._extend.origin_total) || 0);
|
|
371
395
|
let cPrice = Number(useTotal || 0);
|
|
372
396
|
return cPrice !== oPrice;
|
|
373
|
-
}, [useTotal, (
|
|
397
|
+
}, [useTotal, (_j = (_i = state.service.cacheItem) == null ? void 0 : _i._extend) == null ? void 0 : _j.origin_total]);
|
|
374
398
|
const getResources = () => {
|
|
375
399
|
var _a2, _b2;
|
|
376
400
|
let res = (0, import_utils7.formatResources)({
|
|
@@ -434,11 +458,11 @@ var Info = (_, ref) => {
|
|
|
434
458
|
}, [state.service.editModal, state.isBookingCreatePage]);
|
|
435
459
|
(0, import_react.useEffect)(() => {
|
|
436
460
|
getDiscount();
|
|
437
|
-
}, [useTotal, (
|
|
461
|
+
}, [useTotal, (_l = (_k = state.service.cacheItem) == null ? void 0 : _k._extend) == null ? void 0 : _l.origin_total]);
|
|
438
462
|
const bundles = (0, import_react.useMemo)(() => {
|
|
439
463
|
var _a2, _b2, _c2, _d2;
|
|
440
464
|
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) || [];
|
|
441
|
-
}, [(
|
|
465
|
+
}, [(_p = (_o = (_n = (_m = state.service) == null ? void 0 : _m.cacheItem) == null ? void 0 : _n._extend) == null ? void 0 : _o.other) == null ? void 0 : _p.bundle]);
|
|
442
466
|
const handleEdit = (0, import_ahooks.useMemoizedFn)((e) => {
|
|
443
467
|
var _a2, _b2, _c2, _d2, _e2;
|
|
444
468
|
const item = state.service.cacheItem;
|
|
@@ -557,7 +581,7 @@ var Info = (_, ref) => {
|
|
|
557
581
|
}
|
|
558
582
|
return false;
|
|
559
583
|
}, [state.renderType, isNormalProduct]);
|
|
560
|
-
const SelectTime = (
|
|
584
|
+
const SelectTime = (_q = window.BaseMaterials) == null ? void 0 : _q.SelectTime;
|
|
561
585
|
const isNoSpecAndPackage = (0, import_utilsByBooking.getIsNoSpecAndPackage)(state.service.cacheItem);
|
|
562
586
|
const items = (0, import_react.useMemo)(() => {
|
|
563
587
|
var _a2, _b2;
|
|
@@ -594,7 +618,7 @@ var Info = (_, ref) => {
|
|
|
594
618
|
}
|
|
595
619
|
))));
|
|
596
620
|
}, [
|
|
597
|
-
(
|
|
621
|
+
(_t = (_s = (_r = state.service) == null ? void 0 : _r.cacheItem) == null ? void 0 : _s._extend) == null ? void 0 : _t.product_name,
|
|
598
622
|
bundles,
|
|
599
623
|
state.amountSymbol,
|
|
600
624
|
state.isBookingCreatePage
|
|
@@ -639,7 +663,7 @@ var Info = (_, ref) => {
|
|
|
639
663
|
));
|
|
640
664
|
}, [
|
|
641
665
|
useTotal,
|
|
642
|
-
(
|
|
666
|
+
(_v = (_u = state.service.cacheItem) == null ? void 0 : _u._extend) == null ? void 0 : _v.origin_total,
|
|
643
667
|
state.amountSymbol,
|
|
644
668
|
state.channelDisabledEdit
|
|
645
669
|
]);
|
|
@@ -687,7 +711,7 @@ var Info = (_, ref) => {
|
|
|
687
711
|
}
|
|
688
712
|
) : null
|
|
689
713
|
));
|
|
690
|
-
}, [SelectTime, (
|
|
714
|
+
}, [SelectTime, (_z = (_y = (_x = (_w = state.bookingConfig) == null ? void 0 : _w.config) == null ? void 0 : _x.basic) == null ? void 0 : _y.service_time) == null ? void 0 : _z.value, isEditGroup]);
|
|
691
715
|
const endTime = (0, import_react.useMemo)(() => {
|
|
692
716
|
if (!isEditGroup) {
|
|
693
717
|
return null;
|
|
@@ -726,8 +750,8 @@ var Info = (_, ref) => {
|
|
|
726
750
|
));
|
|
727
751
|
}, [
|
|
728
752
|
state.renderType,
|
|
729
|
-
(
|
|
730
|
-
(
|
|
753
|
+
(_B = (_A = state.service.cacheItem) == null ? void 0 : _A._data) == null ? void 0 : _B.resources,
|
|
754
|
+
(_D = (_C = state.service.cacheItem) == null ? void 0 : _C._data) == null ? void 0 : _D.resourceMaps
|
|
731
755
|
]);
|
|
732
756
|
const holder = (0, import_react.useMemo)(() => {
|
|
733
757
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
|
|
@@ -766,7 +790,7 @@ var Info = (_, ref) => {
|
|
|
766
790
|
}, [
|
|
767
791
|
state.locale,
|
|
768
792
|
state.isTerminal,
|
|
769
|
-
(
|
|
793
|
+
(_G = (_F = (_E = state.service) == null ? void 0 : _E.cacheItem) == null ? void 0 : _F._data) == null ? void 0 : _G.capacitys
|
|
770
794
|
]);
|
|
771
795
|
const hiddenQuantity = (0, import_react.useMemo)(() => {
|
|
772
796
|
return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "quantity" }, /* @__PURE__ */ import_react.default.createElement(import_antd.InputNumber, null));
|
|
@@ -846,10 +870,10 @@ var Info = (_, ref) => {
|
|
|
846
870
|
import_utils.locales.getText("pisell2.text.apply")
|
|
847
871
|
)
|
|
848
872
|
);
|
|
849
|
-
}, [(
|
|
873
|
+
}, [(_H = state.service.resourcesOrigin) == null ? void 0 : _H.length, isNormalProduct]);
|
|
850
874
|
console.log("render edit");
|
|
851
875
|
console.log(
|
|
852
|
-
state.service.editModal && !((
|
|
876
|
+
state.service.editModal && !((_I = state.service.cacheItem) == null ? void 0 : _I.autoClose),
|
|
853
877
|
performance.now() - window.pp1,
|
|
854
878
|
"打开商品1"
|
|
855
879
|
);
|
|
@@ -955,7 +979,7 @@ var Info = (_, ref) => {
|
|
|
955
979
|
zIndex: state.service.changeService ? 999 : 1e3,
|
|
956
980
|
forceRender: true,
|
|
957
981
|
mask: state.drawerMask,
|
|
958
|
-
open: !isNoSpecAndPackage && state.service.editModal && !((
|
|
982
|
+
open: !isNoSpecAndPackage && state.service.editModal && !((_J = state.service.cacheItem) == null ? void 0 : _J.autoClose),
|
|
959
983
|
title: import_utils.locales.getText("pisell2.text.edit-service"),
|
|
960
984
|
onClose: () => {
|
|
961
985
|
var _a2;
|
|
@@ -981,7 +1005,7 @@ var Info = (_, ref) => {
|
|
|
981
1005
|
display: currentTab === "batch_edit" ? "block" : "none"
|
|
982
1006
|
}
|
|
983
1007
|
},
|
|
984
|
-
/* @__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)((
|
|
1008
|
+
/* @__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)((_L = (_K = state.client) == null ? void 0 : _K.value) == null ? void 0 : _L.id) && holder),
|
|
985
1009
|
/* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "note" }, noteModalOpen && /* @__PURE__ */ import_react.default.createElement(
|
|
986
1010
|
import_noteModal.default,
|
|
987
1011
|
{
|
|
@@ -68,6 +68,7 @@ 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,
|
|
71
72
|
clientId
|
|
72
73
|
});
|
|
73
74
|
const [expiredModalVisible, setExpiredModalVisible] = (0, import_react.useState)(false);
|
|
@@ -43,6 +43,9 @@ var import_materials = require("@pisell/materials");
|
|
|
43
43
|
var import_decimal = __toESM(require("decimal.js"));
|
|
44
44
|
var Amount = import_materials.PisellText.Amount;
|
|
45
45
|
var getAvailableMaxAmount = (data) => {
|
|
46
|
+
if ((0, import_utils.isNumber)(data._available_max_amount)) {
|
|
47
|
+
return data._available_max_amount;
|
|
48
|
+
}
|
|
46
49
|
return data.tag !== "point_card" ? data.available_max_amount : data == null ? void 0 : data.recommended_usage_amount;
|
|
47
50
|
};
|
|
48
51
|
var voucherTime = (data, key = "expire_date") => {
|
|
@@ -58,6 +61,14 @@ var voucherTime = (data, key = "expire_date") => {
|
|
|
58
61
|
var formatMachineCodeServer2CardList = (data, selectId = [], otherProps = {}) => {
|
|
59
62
|
return (data || []).map((item) => {
|
|
60
63
|
var _a, _b;
|
|
64
|
+
let disabled = false;
|
|
65
|
+
if (item.unified_available_status === 0) {
|
|
66
|
+
disabled = true;
|
|
67
|
+
} else {
|
|
68
|
+
if ((0, import_utils.isNumber)(item._unified_available_status)) {
|
|
69
|
+
disabled = !item._unified_available_status;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
61
72
|
return {
|
|
62
73
|
id: item.id,
|
|
63
74
|
name: item.product_name,
|
|
@@ -74,8 +85,8 @@ var formatMachineCodeServer2CardList = (data, selectId = [], otherProps = {}) =>
|
|
|
74
85
|
showQrCode: false,
|
|
75
86
|
showStatus: true,
|
|
76
87
|
code: item.code,
|
|
77
|
-
disabled
|
|
78
|
-
disabledReason: (_a = item.unified_messages) == null ? void 0 : _a.title,
|
|
88
|
+
disabled,
|
|
89
|
+
disabledReason: (0, import_utils.isNumber)(item._unified_available_status) && item._unified_available_status !== 1 ? item.reason : (_a = item.unified_messages) == null ? void 0 : _a.title,
|
|
79
90
|
cover: (_b = item.product) == null ? void 0 : _b.cover,
|
|
80
91
|
qrCode: item.code,
|
|
81
92
|
validDate: voucherTime(item),
|
|
@@ -9,6 +9,7 @@ export declare const useWalletPass: (props: {
|
|
|
9
9
|
}[]) => void) | undefined;
|
|
10
10
|
customAmount?: string | undefined;
|
|
11
11
|
clientId?: number | undefined;
|
|
12
|
+
totalAmount?: number | undefined;
|
|
12
13
|
}) => {
|
|
13
14
|
walletRecommendList: any[];
|
|
14
15
|
userIdentificationCodes: any[];
|
|
@@ -29,7 +30,6 @@ export declare const useWalletPass: (props: {
|
|
|
29
30
|
selectedDiscountList: any;
|
|
30
31
|
handleSelectDiscount: (this: unknown, value: number[], option: any) => void;
|
|
31
32
|
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;
|