@pisell/private-materials 6.4.81 → 6.4.83
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 +2 -2
- package/build/lowcode/preview.js +164 -150
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +11 -11
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/footer/index.js +15 -3
- package/es/components/booking/components/footer/utils.js +55 -37
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/forms/table/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/like/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- 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/checkout/PaymentModal.d.ts +13 -5
- package/es/components/checkout/PaymentModal.js +93 -149
- package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/es/components/checkout/components/SearchAndClientModule/index.js +39 -40
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/plugin.d.ts +2 -0
- package/es/components/checkout/plugin.js +303 -0
- package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -1
- package/es/components/eftpos/deviceList/index.d.ts +0 -1
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/group/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/icon/apiKey.d.ts +0 -1
- package/es/components/eftpos/icon/device.d.ts +0 -1
- package/es/components/eftpos/receipt/index.d.ts +0 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/es/components/eftposPay/component/step/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/step.d.ts +0 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/es/components/schedules/products/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -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/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/plus/clientName/index.d.ts +0 -1
- package/es/pro/pisellPaymentList/example.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/footer/index.js +15 -3
- package/lib/components/booking/components/footer/utils.js +18 -1
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/forms/table/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/like/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- 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/checkout/PaymentModal.d.ts +13 -5
- package/lib/components/checkout/PaymentModal.js +92 -139
- package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/lib/components/checkout/components/SearchAndClientModule/index.js +29 -3
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/plugin.d.ts +2 -0
- package/lib/components/checkout/plugin.js +263 -0
- package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -1
- package/lib/components/eftpos/deviceList/index.d.ts +0 -1
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/group/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
- package/lib/components/eftpos/icon/device.d.ts +0 -1
- package/lib/components/eftpos/receipt/index.d.ts +0 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/lib/components/eftposPay/component/step/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/step.d.ts +0 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/lib/components/schedules/products/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -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/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/plus/clientName/index.d.ts +0 -1
- package/lib/pro/pisellPaymentList/example.d.ts +0 -1
- package/lowcode/payment-modal/meta.ts +135 -0
- package/package.json +3 -3
- package/es/components/checkout/PaymentPlugin.d.ts +0 -2
- package/es/components/checkout/PaymentPlugin.js +0 -199
- package/lib/components/checkout/PaymentPlugin.d.ts +0 -2
- package/lib/components/checkout/PaymentPlugin.js +0 -181
|
@@ -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;
|
|
@@ -57,7 +57,7 @@ import { useShopDiscountModule } from "../../../ticketBooking/hooks/pisellos/use
|
|
|
57
57
|
* @Date: 2024-01-30 16:51
|
|
58
58
|
*/
|
|
59
59
|
var Footer = function Footer(props) {
|
|
60
|
-
var _context$appHelper, _state$paymentPaid2, _state$bookingConfig2, _state$bookingConfig4, _state$addons2, _state$bookingDetail, _state$bookingDetail2, _state$client2, _state$notes3, _state$bookingDetail13, _state$addons4, _state$notes4;
|
|
60
|
+
var _context$appHelper, _state$paymentPaid2, _state$bookingConfig2, _state$bookingConfig4, _state$addons2, _state$bookingDetail, _state$bookingDetail2, _state$client2, _state$notes3, _state$bookingDetail13, _state$addons4, _state$notes4, _state$bookingConfig7, _state$client3;
|
|
61
61
|
var state = props.state,
|
|
62
62
|
buttons = props.buttons,
|
|
63
63
|
dispatch = props.dispatch,
|
|
@@ -1941,8 +1941,20 @@ var Footer = function Footer(props) {
|
|
|
1941
1941
|
data: paymentModalData,
|
|
1942
1942
|
callback: paymentCallback || undefined,
|
|
1943
1943
|
setEditCartMode: setEditCartMode,
|
|
1944
|
-
state:
|
|
1945
|
-
|
|
1944
|
+
paymentResultDisplayMode: state === null || state === void 0 || (_state$bookingConfig7 = state.bookingConfig) === null || _state$bookingConfig7 === void 0 || (_state$bookingConfig7 = _state$bookingConfig7.config) === null || _state$bookingConfig7 === void 0 || (_state$bookingConfig7 = _state$bookingConfig7.payment_setting) === null || _state$bookingConfig7 === void 0 ? void 0 : _state$bookingConfig7.payment_result_display_mode,
|
|
1945
|
+
shopDiscount: state.shop_discount,
|
|
1946
|
+
client: (_state$client3 = state.client) === null || _state$client3 === void 0 ? void 0 : _state$client3.value,
|
|
1947
|
+
currentTotalPrice: total.productAmount,
|
|
1948
|
+
onChangeShopDiscount: function onChangeShopDiscount(discount) {
|
|
1949
|
+
dispatch({
|
|
1950
|
+
type: 'setState',
|
|
1951
|
+
payload: {
|
|
1952
|
+
shop_discount: discount
|
|
1953
|
+
}
|
|
1954
|
+
});
|
|
1955
|
+
},
|
|
1956
|
+
onChangeOrderNote: handleNoteConfirm,
|
|
1957
|
+
onDeleteOrderNote: handleNoteDelete,
|
|
1946
1958
|
onClose: function onClose(reset) {
|
|
1947
1959
|
// console.log('🔄 Footer: Closing PaymentModal');
|
|
1948
1960
|
setIsPaymentModalOpen(false);
|
|
@@ -152,6 +152,11 @@ export var getBundleDiscountList = function getBundleDiscountList(bundle) {
|
|
|
152
152
|
var discountList = [];
|
|
153
153
|
bundle.forEach(function (d) {
|
|
154
154
|
if (d.discount_list && isArr(d.discount_list)) {
|
|
155
|
+
d.discount_list.forEach(function (item) {
|
|
156
|
+
if (item !== null && item !== void 0 && item.id) {
|
|
157
|
+
item.order_discount_id = item.id;
|
|
158
|
+
}
|
|
159
|
+
});
|
|
155
160
|
discountList.push.apply(discountList, _toConsumableArray(d.discount_list.filter(function (item) {
|
|
156
161
|
return !item.id;
|
|
157
162
|
})));
|
|
@@ -341,7 +346,7 @@ var formatMetaData = function formatMetaData(item, isMultiDayPrices) {
|
|
|
341
346
|
return metadata;
|
|
342
347
|
};
|
|
343
348
|
var formatProductMetadata = function formatProductMetadata(item) {
|
|
344
|
-
var _item$_extend17, _item$_extend19, _item$_extend21, _item$_extend23;
|
|
349
|
+
var _item$_extend17, _item$_extend19, _item$_extend21, _item$_extend23, _item$_extend25;
|
|
345
350
|
var metadata = {};
|
|
346
351
|
|
|
347
352
|
// 主商品+非原价(加减价)子商品附加费
|
|
@@ -367,6 +372,10 @@ var formatProductMetadata = function formatProductMetadata(item) {
|
|
|
367
372
|
var _item$_extend24;
|
|
368
373
|
metadata.relation_surcharge_ids = (_item$_extend24 = item._extend) === null || _item$_extend24 === void 0 ? void 0 : _item$_extend24.relation_surcharge_ids;
|
|
369
374
|
}
|
|
375
|
+
if ((_item$_extend25 = item._extend) !== null && _item$_extend25 !== void 0 && _item$_extend25.unique_identification_number) {
|
|
376
|
+
var _item$_extend26;
|
|
377
|
+
metadata.unique_identification_number = (_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.unique_identification_number;
|
|
378
|
+
}
|
|
370
379
|
return metadata;
|
|
371
380
|
};
|
|
372
381
|
|
|
@@ -386,9 +395,9 @@ var formatProductMetadata = function formatProductMetadata(item) {
|
|
|
386
395
|
|
|
387
396
|
// 获取商品价格 包含组合规格
|
|
388
397
|
export var getSourceProductPrice = function getSourceProductPrice(item) {
|
|
389
|
-
var _item$
|
|
390
|
-
var other = (_item$
|
|
391
|
-
var price = Number((_item$
|
|
398
|
+
var _item$_extend27, _item$_extend28, _item$variant2;
|
|
399
|
+
var other = (_item$_extend27 = item._extend) === null || _item$_extend27 === void 0 ? void 0 : _item$_extend27.other;
|
|
400
|
+
var price = Number((_item$_extend28 = item._extend) === null || _item$_extend28 === void 0 ? void 0 : _item$_extend28.price);
|
|
392
401
|
|
|
393
402
|
// 组合规格: 根据当前选择的组合规格id 和商品的组合规格列表 获取当前商品的价格
|
|
394
403
|
if ((other === null || other === void 0 ? void 0 : other.product_variant_id) > 0 && (item === null || item === void 0 || (_item$variant2 = item.variant) === null || _item$variant2 === void 0 ? void 0 : _item$variant2.length) > 0) {
|
|
@@ -404,8 +413,8 @@ export var getSourceProductPrice = function getSourceProductPrice(item) {
|
|
|
404
413
|
|
|
405
414
|
// 获取主商品价格 要增加option
|
|
406
415
|
export var getMainProductSellingPrice = function getMainProductSellingPrice(item) {
|
|
407
|
-
var _item$
|
|
408
|
-
if (!isNumber((_item$
|
|
416
|
+
var _item$_extend29, _item$_extend$other, _item$_extend$other2, _item$_extend30;
|
|
417
|
+
if (!isNumber((_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.main_product_selling_price)) {
|
|
409
418
|
return undefined;
|
|
410
419
|
}
|
|
411
420
|
var optionPrice = new Decimal(0);
|
|
@@ -418,7 +427,7 @@ export var getMainProductSellingPrice = function getMainProductSellingPrice(item
|
|
|
418
427
|
return accumulator.add(currentPrice.mul(currentNum));
|
|
419
428
|
}, optionPrice);
|
|
420
429
|
}
|
|
421
|
-
return new Decimal((_item$
|
|
430
|
+
return new Decimal((_item$_extend30 = item._extend) === null || _item$_extend30 === void 0 ? void 0 : _item$_extend30.main_product_selling_price).add(optionPrice).toNumber();
|
|
422
431
|
};
|
|
423
432
|
|
|
424
433
|
/**
|
|
@@ -430,11 +439,18 @@ export var getMainProductSellingPrice = function getMainProductSellingPrice(item
|
|
|
430
439
|
* @Date: 2024-12-07 14:21
|
|
431
440
|
*/
|
|
432
441
|
var formatProducts = function formatProducts(item, quantity) {
|
|
433
|
-
var _item$
|
|
442
|
+
var _item$_extend31, _getMainProductSellin, _item$_extend32, _item$_extend33, _item$_extend34, _item$_extend35;
|
|
443
|
+
if (item !== null && item !== void 0 && item.discount_list) {
|
|
444
|
+
item === null || item === void 0 || item.discount_list.forEach(function (d) {
|
|
445
|
+
if (d !== null && d !== void 0 && d.id) {
|
|
446
|
+
d.order_discount_id = d.id;
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
}
|
|
434
450
|
var total = Number(item._extend.total);
|
|
435
451
|
var origin_total = Number(item._extend.origin_total);
|
|
436
452
|
var discount_amount = origin_total - total;
|
|
437
|
-
var bundleDiscountList = getBundleDiscountList(((_item$
|
|
453
|
+
var bundleDiscountList = getBundleDiscountList(((_item$_extend31 = item._extend) === null || _item$_extend31 === void 0 || (_item$_extend31 = _item$_extend31.other) === null || _item$_extend31 === void 0 ? void 0 : _item$_extend31.bundle) || []);
|
|
438
454
|
var discount_list = _toConsumableArray((item === null || item === void 0 ? void 0 : item.discount_list) || []);
|
|
439
455
|
discount_list.push.apply(discount_list, _toConsumableArray(bundleDiscountList));
|
|
440
456
|
|
|
@@ -463,15 +479,15 @@ var formatProducts = function formatProducts(item, quantity) {
|
|
|
463
479
|
"discount_amount": notManualDiscount.length > 0 ? 0 : discount_amount,
|
|
464
480
|
"product_discount_reason": item._extend.discount_reason || '',
|
|
465
481
|
"is_charge_tax": item.is_charge_tax,
|
|
466
|
-
"note": ((_item$
|
|
482
|
+
"note": ((_item$_extend32 = item._extend) === null || _item$_extend32 === void 0 ? void 0 : _item$_extend32.note) || '',
|
|
467
483
|
"discountway": item._extend.discountway || "num",
|
|
468
484
|
"discount_per": item._extend.discount_per,
|
|
469
485
|
"discount_type": item._extend.discount_type || discount_type,
|
|
470
486
|
"order_detail_id": item._extend.order_detail_id || 0,
|
|
471
|
-
"product_bundle": formatProductBundle((_item$
|
|
487
|
+
"product_bundle": formatProductBundle((_item$_extend33 = item._extend) === null || _item$_extend33 === void 0 || (_item$_extend33 = _item$_extend33.other) === null || _item$_extend33 === void 0 ? void 0 : _item$_extend33.bundle),
|
|
472
488
|
"bundle_edit": item._extend.bundle_edit || bundleDiscountList.length ? 1 : 0,
|
|
473
|
-
"product_option_item": formatProductOption((_item$
|
|
474
|
-
"product_variant_id": ((_item$
|
|
489
|
+
"product_option_item": formatProductOption((_item$_extend34 = item._extend) === null || _item$_extend34 === void 0 || (_item$_extend34 = _item$_extend34.other) === null || _item$_extend34 === void 0 ? void 0 : _item$_extend34.option),
|
|
490
|
+
"product_variant_id": ((_item$_extend35 = item._extend) === null || _item$_extend35 === void 0 || (_item$_extend35 = _item$_extend35.other) === null || _item$_extend35 === void 0 ? void 0 : _item$_extend35.product_variant_id) || 0,
|
|
475
491
|
"discount_list": notManualDiscount,
|
|
476
492
|
metadata: formatProductMetadata(item),
|
|
477
493
|
// checkout 需求新增字段
|
|
@@ -496,8 +512,8 @@ var formatDayRelationProducts = function formatDayRelationProducts(data, booking
|
|
|
496
512
|
|
|
497
513
|
// 过滤出卡片中的普通商品
|
|
498
514
|
var relation_products = list === null || list === void 0 ? void 0 : list.filter(function (item) {
|
|
499
|
-
var _item$
|
|
500
|
-
var holderId = (_item$
|
|
515
|
+
var _item$_extend36;
|
|
516
|
+
var holderId = (_item$_extend36 = item._extend) === null || _item$_extend36 === void 0 ? void 0 : _item$_extend36.holder_id;
|
|
501
517
|
var bookingHolderId = booking_item._extend.holder_id;
|
|
502
518
|
var isDayBookingProduct = appointmentTypes.includes(item.extension_type);
|
|
503
519
|
return holderId && holderId === bookingHolderId && !isDayBookingProduct;
|
|
@@ -523,15 +539,15 @@ var formatAppointmentProductLists = function formatAppointmentProductLists(data)
|
|
|
523
539
|
|
|
524
540
|
// 找出预约商品
|
|
525
541
|
list = list.filter(function (item) {
|
|
526
|
-
var _item$
|
|
527
|
-
return ((_item$
|
|
542
|
+
var _item$_extend37;
|
|
543
|
+
return ((_item$_extend37 = item._extend) === null || _item$_extend37 === void 0 ? void 0 : _item$_extend37.holder_id) && !isNormalProductByDurationSchedule(item);
|
|
528
544
|
});
|
|
529
545
|
|
|
530
546
|
// 对预约商品列表根据holder_id进行分组
|
|
531
547
|
var groupMap = new Map();
|
|
532
548
|
list.forEach(function (item) {
|
|
533
|
-
var _item$
|
|
534
|
-
var key = (_item$
|
|
549
|
+
var _item$_extend38;
|
|
550
|
+
var key = (_item$_extend38 = item._extend) === null || _item$_extend38 === void 0 ? void 0 : _item$_extend38.holder_id; // 分组键
|
|
535
551
|
if (!groupMap.has(key)) {
|
|
536
552
|
groupMap.set(key, []);
|
|
537
553
|
}
|
|
@@ -593,7 +609,7 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
593
609
|
var bookings = [];
|
|
594
610
|
var obj = {};
|
|
595
611
|
list.forEach(function (item) {
|
|
596
|
-
var _item$
|
|
612
|
+
var _item$_extend43, _item$_extend44;
|
|
597
613
|
// 自定义商品直接使用 _extend 中的数据,并将 id 转换为 0 提交给后端
|
|
598
614
|
if (item.isCustomItem) {
|
|
599
615
|
bookings.push(_objectSpread(_objectSpread({}, item._extend), {}, {
|
|
@@ -614,9 +630,9 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
614
630
|
|
|
615
631
|
// 跨日预约下的普通商品
|
|
616
632
|
if (isDay) {
|
|
617
|
-
var _item$
|
|
618
|
-
var startDate = ((_item$
|
|
619
|
-
var endDate = ((_item$
|
|
633
|
+
var _item$_extend39, _item$_extend40, _item$_extend41, _item$_extend42;
|
|
634
|
+
var startDate = ((_item$_extend39 = item._extend) === null || _item$_extend39 === void 0 ? void 0 : _item$_extend39.startDate) || ((_item$_extend40 = item._extend) === null || _item$_extend40 === void 0 ? void 0 : _item$_extend40.start_date);
|
|
635
|
+
var endDate = ((_item$_extend41 = item._extend) === null || _item$_extend41 === void 0 ? void 0 : _item$_extend41.endDate) || ((_item$_extend42 = item._extend) === null || _item$_extend42 === void 0 ? void 0 : _item$_extend42.end_date);
|
|
620
636
|
var _formatDayTime = formatDayTime({
|
|
621
637
|
startDate: startDate,
|
|
622
638
|
endDate: endDate
|
|
@@ -642,12 +658,14 @@ var formatBookings = function formatBookings(data, values) {
|
|
|
642
658
|
// 跨日预约处理: 跨日预约所有数据都在list中, 每一组预约通过groupId进行分组
|
|
643
659
|
// 通过obj 记录下每个GroupId第一次出现的时机, 第一次出现需要设置 metadata.multiDayPrices
|
|
644
660
|
// 后续出现不需要设置 metadata.multiDayPrices. 节省体积
|
|
645
|
-
var isSetGroupId = obj[item === null || item === void 0 || (_item$
|
|
646
|
-
if (!((_item$
|
|
661
|
+
var isSetGroupId = obj[item === null || item === void 0 || (_item$_extend43 = item._extend) === null || _item$_extend43 === void 0 ? void 0 : _item$_extend43.groupId];
|
|
662
|
+
if (!((_item$_extend44 = item._extend) !== null && _item$_extend44 !== void 0 && _item$_extend44.unique_identification_number)) {
|
|
647
663
|
var unique_identification_number = getUniqueId();
|
|
648
664
|
item._extend.unique_identification_number = unique_identification_number;
|
|
649
665
|
}
|
|
666
|
+
debugger;
|
|
650
667
|
var booking = _objectSpread(_objectSpread({
|
|
668
|
+
schedule_event_id: item === null || item === void 0 ? void 0 : item.booking_id,
|
|
651
669
|
product: formatProducts(item),
|
|
652
670
|
relation_products: formatRelationDetails(item._extend.relation_details),
|
|
653
671
|
id: item.booking_id || 0,
|
|
@@ -720,16 +738,16 @@ var formatRelationProducts = function formatRelationProducts(data, type) {
|
|
|
720
738
|
var list = ((_data$service = data.service) === null || _data$service === void 0 ? void 0 : _data$service.value) || [];
|
|
721
739
|
// open items 下的商品
|
|
722
740
|
list = list.filter(function (item) {
|
|
723
|
-
var _item$
|
|
741
|
+
var _item$_extend45;
|
|
724
742
|
return (
|
|
725
743
|
// 跨日预约把普通商品加在relationProducts 活动预约按之前逻辑
|
|
726
|
-
type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$
|
|
744
|
+
type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$_extend45 = item._extend) === null || _item$_extend45 === void 0 ? void 0 : _item$_extend45.holder_id) && appointmentTypes.includes(item.extension_type)
|
|
727
745
|
);
|
|
728
746
|
});
|
|
729
747
|
var relationProducts = [];
|
|
730
748
|
relationProducts = list.map(function (item) {
|
|
731
|
-
var _item$
|
|
732
|
-
if (!((_item$
|
|
749
|
+
var _item$_extend46;
|
|
750
|
+
if (!((_item$_extend46 = item._extend) !== null && _item$_extend46 !== void 0 && _item$_extend46.unique_identification_number)) {
|
|
733
751
|
var unique_identification_number = getUniqueId();
|
|
734
752
|
item._extend.unique_identification_number = unique_identification_number;
|
|
735
753
|
}
|
|
@@ -748,8 +766,8 @@ var formatNormalProducts = function formatNormalProducts(data) {
|
|
|
748
766
|
});
|
|
749
767
|
var relationProducts = [];
|
|
750
768
|
relationProducts = list.map(function (item) {
|
|
751
|
-
var _item$
|
|
752
|
-
if (!((_item$
|
|
769
|
+
var _item$_extend47;
|
|
770
|
+
if (!((_item$_extend47 = item._extend) !== null && _item$_extend47 !== void 0 && _item$_extend47.unique_identification_number)) {
|
|
753
771
|
var unique_identification_number = getUniqueId();
|
|
754
772
|
item._extend.unique_identification_number = unique_identification_number;
|
|
755
773
|
}
|
|
@@ -870,21 +888,21 @@ export var checkHolderIsError = function checkHolderIsError(state) {
|
|
|
870
888
|
var _state$client;
|
|
871
889
|
var errorRowKey = '';
|
|
872
890
|
var holderError = state.service.value.some(function (item) {
|
|
873
|
-
var _item$
|
|
891
|
+
var _item$_extend49;
|
|
874
892
|
// 普通商品不需要检测holder
|
|
875
893
|
if (isNormalProductByDurationSchedule(item)) {
|
|
876
894
|
return false;
|
|
877
895
|
}
|
|
878
896
|
if (item._extend.quantity === 1 && !item._extend.holder_id) {
|
|
879
|
-
var _item$_extend46;
|
|
880
|
-
errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend46 = item._extend) === null || _item$_extend46 === void 0 || (_item$_extend46 = _item$_extend46.other) === null || _item$_extend46 === void 0 ? void 0 : _item$_extend46.rowKey);
|
|
881
|
-
return true;
|
|
882
|
-
}
|
|
883
|
-
if (item._extend.quantity > 1 && ((_item$_extend47 = item._extend) === null || _item$_extend47 === void 0 || (_item$_extend47 = _item$_extend47.holder_id) === null || _item$_extend47 === void 0 ? void 0 : _item$_extend47.length) !== item._extend.quantity) {
|
|
884
897
|
var _item$_extend48;
|
|
885
898
|
errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend48 = item._extend) === null || _item$_extend48 === void 0 || (_item$_extend48 = _item$_extend48.other) === null || _item$_extend48 === void 0 ? void 0 : _item$_extend48.rowKey);
|
|
886
899
|
return true;
|
|
887
900
|
}
|
|
901
|
+
if (item._extend.quantity > 1 && ((_item$_extend49 = item._extend) === null || _item$_extend49 === void 0 || (_item$_extend49 = _item$_extend49.holder_id) === null || _item$_extend49 === void 0 ? void 0 : _item$_extend49.length) !== item._extend.quantity) {
|
|
902
|
+
var _item$_extend50;
|
|
903
|
+
errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend50 = item._extend) === null || _item$_extend50 === void 0 || (_item$_extend50 = _item$_extend50.other) === null || _item$_extend50 === void 0 ? void 0 : _item$_extend50.rowKey);
|
|
904
|
+
return true;
|
|
905
|
+
}
|
|
888
906
|
return false;
|
|
889
907
|
});
|
|
890
908
|
var clientId = (_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id;
|
|
@@ -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;
|
|
@@ -4,6 +4,6 @@ declare const useSendModal: (bookingId?: number) => {
|
|
|
4
4
|
setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
5
5
|
handleOpen: () => void;
|
|
6
6
|
handleValuesChange: (val: any) => void;
|
|
7
|
-
handleOk: (values: SendModalValues) => Promise<
|
|
7
|
+
handleOk: (values: SendModalValues) => Promise<any>;
|
|
8
8
|
};
|
|
9
9
|
export default useSendModal;
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FormState } from '../model';
|
|
3
1
|
export declare const walkInData: {
|
|
4
2
|
id: number;
|
|
5
3
|
nickname: string;
|
|
6
4
|
};
|
|
7
|
-
export declare const Provider:
|
|
8
|
-
state: FormState;
|
|
9
|
-
} & {
|
|
10
|
-
dispatch: (params: {
|
|
11
|
-
type: string;
|
|
12
|
-
payload: any;
|
|
13
|
-
}) => void;
|
|
14
|
-
}>;
|
|
5
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
amountSymbol: string;
|
|
4
3
|
apis: {
|
|
@@ -110,11 +109,4 @@ export declare const walkInData: {
|
|
|
110
109
|
id: number;
|
|
111
110
|
nickname: string;
|
|
112
111
|
};
|
|
113
|
-
export declare const Provider:
|
|
114
|
-
state: FormState;
|
|
115
|
-
} & {
|
|
116
|
-
dispatch: (params: {
|
|
117
|
-
type: string;
|
|
118
|
-
payload: any;
|
|
119
|
-
}) => void;
|
|
120
|
-
}>;
|
|
112
|
+
export declare const Provider: any, Context: any;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -15,16 +15,24 @@ interface PaymentModalProps {
|
|
|
15
15
|
data?: PaymentModalData;
|
|
16
16
|
callback?: (result: any) => void;
|
|
17
17
|
onClose?: (reset?: boolean) => void;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
paymentResultDisplayMode?: string;
|
|
19
|
+
shopDiscount?: number;
|
|
20
|
+
client?: any;
|
|
21
|
+
currentTotalPrice?: number;
|
|
22
|
+
config?: any;
|
|
23
|
+
onChangeShopDiscount?: (discount: string) => void;
|
|
24
|
+
onChangeOrderNote?: (note: string) => void;
|
|
25
|
+
onDeleteOrderNote?: () => void;
|
|
23
26
|
}
|
|
24
27
|
interface PaymentModalMainProps extends PaymentModalProps {
|
|
25
28
|
onClose?: (reset?: boolean) => void;
|
|
26
29
|
setEditCartMode?: (order_id: number, payData: any, closeModal: boolean) => void;
|
|
27
30
|
editOrderId?: number;
|
|
31
|
+
config?: {
|
|
32
|
+
showHeaderCenter?: boolean;
|
|
33
|
+
showHeaderRightButton?: boolean;
|
|
34
|
+
disabledSwitchClient?: boolean;
|
|
35
|
+
};
|
|
28
36
|
}
|
|
29
37
|
declare const PaymentModal: React.FC<PaymentModalMainProps>;
|
|
30
38
|
export type { PaymentModalData, PaymentModalProps };
|