@pisell/private-materials 3.4.6 → 3.4.8
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.js +2 -2
- package/build/lowcode/view.js +2 -2
- package/es/businessModel/SalesModel/index.d.ts +1 -0
- package/es/components/Sales/Summary/utils.d.ts +1 -1
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/es/components/booking/editBookingModal/index.js +58 -29
- package/es/components/booking/editBookingModal/serve.d.ts +1 -0
- package/es/components/booking/editBookingModal/serve.js +19 -11
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/table/index.d.ts +1 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/like/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.js +1 -1
- package/es/components/booking/info2/service/editService/ResourcesV2/index.js +1 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftpos/deviceList/index.d.ts +1 -0
- package/es/components/eftpos/form/index.d.ts +1 -0
- package/es/components/eftpos/group/index.d.ts +1 -0
- package/es/components/eftpos/hooks.d.ts +1 -0
- package/es/components/eftpos/icon/apiKey.d.ts +1 -0
- package/es/components/eftpos/icon/device.d.ts +1 -0
- package/es/components/eftpos/receipt/index.d.ts +1 -0
- package/es/components/eftpos/surcharge/index.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/es/components/eftposPay/component/step/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/step.d.ts +1 -0
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +5 -5
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/model.d.ts +9 -1
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/Sales/Summary/utils.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/lib/components/booking/editBookingModal/index.js +56 -21
- package/lib/components/booking/editBookingModal/serve.d.ts +1 -0
- package/lib/components/booking/editBookingModal/serve.js +12 -6
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/table/index.d.ts +1 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/like/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.js +1 -1
- package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +1 -1
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftpos/deviceList/index.d.ts +1 -0
- package/lib/components/eftpos/form/index.d.ts +1 -0
- package/lib/components/eftpos/group/index.d.ts +1 -0
- package/lib/components/eftpos/hooks.d.ts +1 -0
- package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
- package/lib/components/eftpos/icon/device.d.ts +1 -0
- package/lib/components/eftpos/receipt/index.d.ts +1 -0
- package/lib/components/eftpos/surcharge/index.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/lib/components/eftposPay/component/step/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/step.d.ts +1 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +5 -5
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
|
|
|
30
30
|
* @return {*}
|
|
31
31
|
* @Author: xiangfeng.xue
|
|
32
32
|
*/
|
|
33
|
-
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) =>
|
|
33
|
+
export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
|
|
34
34
|
/**
|
|
35
35
|
* 计算所有价格明细
|
|
36
36
|
* @param items - 购物车商品数组
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
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
|
+
}>;
|
|
@@ -69,8 +69,8 @@ var EditBookingModal = function EditBookingModal(props, ref) {
|
|
|
69
69
|
});
|
|
70
70
|
var getInitData = /*#__PURE__*/function () {
|
|
71
71
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
72
|
-
var _data$toResource;
|
|
73
|
-
var mockProps, _data, _initResourceVal, toResourceFormId, _data$toResource2, _formatResources, list, maps, currentForm, relation_id, _currentForm$renderLi, _currentForm$renderLi2, _currentForm$renderLi3, _currentForm$renderLi4, _targetResource, _cloned, _idx;
|
|
72
|
+
var _data$fromResource, _data$toResource;
|
|
73
|
+
var mockProps, _data, _initResourceVal, fromResourceFormId, toResourceFormId, _form_id, _data$toResource2, _formatResources, list, maps, currentForm, relation_id, _currentForm$renderLi, _currentForm$renderLi2, _currentForm$renderLi3, _currentForm$renderLi4, _targetResource, _cloned, _idx, _sameResource;
|
|
74
74
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
75
75
|
while (1) switch (_context.prev = _context.next) {
|
|
76
76
|
case 0:
|
|
@@ -82,20 +82,25 @@ var EditBookingModal = function EditBookingModal(props, ref) {
|
|
|
82
82
|
setData(_data);
|
|
83
83
|
|
|
84
84
|
// 初始预期资源(日历放置点对应的资源)
|
|
85
|
-
_initResourceVal = _data.childrenBooking._extend.resource; //
|
|
86
|
-
|
|
85
|
+
_initResourceVal = _data.childrenBooking._extend.resource; // 源资源所在 from_id
|
|
86
|
+
fromResourceFormId = (_data$fromResource = _data.fromResource) === null || _data$fromResource === void 0 ? void 0 : _data$fromResource.form_id; // 目标资源所在 form_id
|
|
87
|
+
toResourceFormId = (_data$toResource = _data.toResource) === null || _data$toResource === void 0 ? void 0 : _data$toResource.form_id; // 若 1. 无资源移入具体资源
|
|
88
|
+
// 或 2. 具体资源移入无资源
|
|
89
|
+
// 则其中有一个 form_id 为 0,那么选择不为 0 的那个
|
|
90
|
+
_form_id = toResourceFormId || fromResourceFormId; // 若 1. 起止资源不同(必有一个不为 ‘no resource’)
|
|
91
|
+
// 且 2. 能通过目标资源id找到所在资源组
|
|
87
92
|
// 则查找放置点所对应资源信息
|
|
88
|
-
if (params.fromResourceId !== params.toResourceId &&
|
|
93
|
+
if (params.fromResourceId !== params.toResourceId && !!_form_id) {
|
|
89
94
|
_formatResources = formatResources({
|
|
90
95
|
cacheItem: _data.childrenBooking,
|
|
91
96
|
resourcesOrigin: _data.resourcesOrigin
|
|
92
97
|
}), list = _formatResources.list, maps = _formatResources.maps;
|
|
93
|
-
currentForm = maps[
|
|
98
|
+
currentForm = maps[_form_id];
|
|
94
99
|
relation_id = (_data$toResource2 = _data.toResource) === null || _data$toResource2 === void 0 ? void 0 : _data$toResource2.id;
|
|
95
|
-
if (currentForm && relation_id) {
|
|
100
|
+
if (currentForm && (relation_id || relation_id === 0)) {
|
|
96
101
|
_targetResource = {
|
|
97
102
|
relation_type: ((_currentForm$renderLi = currentForm.renderListMaps[relation_id]) === null || _currentForm$renderLi === void 0 || (_currentForm$renderLi = _currentForm$renderLi.usable) === null || _currentForm$renderLi === void 0 ? void 0 : _currentForm$renderLi.relation_type) || 'form',
|
|
98
|
-
form_id:
|
|
103
|
+
form_id: _form_id,
|
|
99
104
|
relation_id: relation_id,
|
|
100
105
|
like_status: 'common',
|
|
101
106
|
children: (_currentForm$renderLi2 = currentForm.renderListMaps) === null || _currentForm$renderLi2 === void 0 || (_currentForm$renderLi2 = _currentForm$renderLi2[relation_id]) === null || _currentForm$renderLi2 === void 0 ? void 0 : _currentForm$renderLi2.children,
|
|
@@ -104,20 +109,31 @@ var EditBookingModal = function EditBookingModal(props, ref) {
|
|
|
104
109
|
resource_name: (_currentForm$renderLi4 = currentForm.renderListMaps[relation_id]) === null || _currentForm$renderLi4 === void 0 ? void 0 : _currentForm$renderLi4.main_field
|
|
105
110
|
})
|
|
106
111
|
}; // 同一类型关联多个资源
|
|
107
|
-
if (Array.isArray(_initResourceVal[
|
|
108
|
-
_cloned = _toConsumableArray(_initResourceVal[
|
|
112
|
+
if (Array.isArray(_initResourceVal[_form_id])) {
|
|
113
|
+
_cloned = _toConsumableArray(_initResourceVal[_form_id]);
|
|
109
114
|
_idx = _cloned.findIndex(function (rs) {
|
|
110
|
-
|
|
115
|
+
var _rs$children;
|
|
116
|
+
return rs.relation_id == params.fromResourceId || ((_rs$children = rs.children) === null || _rs$children === void 0 ? void 0 : _rs$children.find(function (child) {
|
|
117
|
+
return child.relation_id == params.fromResourceId;
|
|
118
|
+
}));
|
|
111
119
|
});
|
|
112
120
|
if (_idx !== -1) {
|
|
113
|
-
|
|
121
|
+
// 去重: 同一资源类型下,设置了该类型的某个资源 A,以及无资源,当从无资源拖放至 A 上时需要去重
|
|
122
|
+
_sameResource = _cloned.find(function (_clonedItem) {
|
|
123
|
+
return _clonedItem.relation_id === (_targetResource === null || _targetResource === void 0 ? void 0 : _targetResource.relation_id);
|
|
124
|
+
});
|
|
125
|
+
if (_sameResource) {
|
|
126
|
+
_cloned.splice(_idx, 1);
|
|
127
|
+
} else {
|
|
128
|
+
_cloned[_idx] = _targetResource; // 替换现有对象
|
|
129
|
+
}
|
|
114
130
|
} else {
|
|
115
131
|
_cloned.push(_targetResource); // 添加新对象
|
|
116
132
|
}
|
|
117
|
-
_initResourceVal = _objectSpread(_objectSpread({}, _initResourceVal), {}, _defineProperty({},
|
|
133
|
+
_initResourceVal = _objectSpread(_objectSpread({}, _initResourceVal), {}, _defineProperty({}, _form_id, _cloned));
|
|
118
134
|
} else {
|
|
119
135
|
// 单选
|
|
120
|
-
_initResourceVal = _objectSpread(_objectSpread({}, _initResourceVal), {}, _defineProperty({},
|
|
136
|
+
_initResourceVal = _objectSpread(_objectSpread({}, _initResourceVal), {}, _defineProperty({}, _form_id, [_targetResource]));
|
|
121
137
|
}
|
|
122
138
|
}
|
|
123
139
|
}
|
|
@@ -128,7 +144,7 @@ var EditBookingModal = function EditBookingModal(props, ref) {
|
|
|
128
144
|
toDate: [dayjs(mockProps.toStartDate), dayjs(mockProps.toEndDate)]
|
|
129
145
|
});
|
|
130
146
|
}, 100);
|
|
131
|
-
case
|
|
147
|
+
case 11:
|
|
132
148
|
case "end":
|
|
133
149
|
return _context.stop();
|
|
134
150
|
}
|
|
@@ -218,12 +234,11 @@ var EditBookingModal = function EditBookingModal(props, ref) {
|
|
|
218
234
|
};
|
|
219
235
|
var onOk = /*#__PURE__*/function () {
|
|
220
236
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
221
|
-
var values, _data$childrenBooking, _extend, order_id, start_date, start_time, end_date, end_time;
|
|
237
|
+
var values, _data$childrenBooking, _extend, order_id, start_date, start_time, end_date, end_time, id, relation_id, like_status, relation_type, is_all, schedule_id, sub_type, select_date, number, metadata;
|
|
222
238
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
223
239
|
while (1) switch (_context2.prev = _context2.next) {
|
|
224
240
|
case 0:
|
|
225
|
-
values = form.getFieldsValue();
|
|
226
|
-
// return;
|
|
241
|
+
values = form.getFieldsValue();
|
|
227
242
|
setUpdating(true);
|
|
228
243
|
_context2.prev = 2;
|
|
229
244
|
_data$childrenBooking = data.childrenBooking, _extend = _data$childrenBooking._extend, order_id = _data$childrenBooking.order_id;
|
|
@@ -231,8 +246,20 @@ var EditBookingModal = function EditBookingModal(props, ref) {
|
|
|
231
246
|
start_time = values.toDate[0].format('HH:mm');
|
|
232
247
|
end_date = values.toDate[1].format('YYYY-MM-DD');
|
|
233
248
|
end_time = values.toDate[1].format('HH:mm');
|
|
234
|
-
|
|
235
|
-
|
|
249
|
+
console.log('extend data', _extend);
|
|
250
|
+
id = _extend.id, relation_id = _extend.relation_id, like_status = _extend.like_status, relation_type = _extend.relation_type, is_all = _extend.is_all, schedule_id = _extend.schedule_id, sub_type = _extend.sub_type, select_date = _extend.select_date, number = _extend.number, metadata = _extend.metadata;
|
|
251
|
+
_context2.next = 12;
|
|
252
|
+
return updateChildBooking(order_id, {
|
|
253
|
+
id: id,
|
|
254
|
+
relation_id: relation_id,
|
|
255
|
+
like_status: like_status,
|
|
256
|
+
relation_type: relation_type,
|
|
257
|
+
is_all: is_all,
|
|
258
|
+
schedule_id: schedule_id,
|
|
259
|
+
sub_type: sub_type,
|
|
260
|
+
select_date: select_date,
|
|
261
|
+
number: number,
|
|
262
|
+
metadata: metadata,
|
|
236
263
|
resources: Object.values(values.resource).reduce(function (pre, cur) {
|
|
237
264
|
var newList = checkResourcesFormat(cur, cacheItem);
|
|
238
265
|
pre = pre.concat(newList);
|
|
@@ -243,23 +270,24 @@ var EditBookingModal = function EditBookingModal(props, ref) {
|
|
|
243
270
|
end_date: end_date,
|
|
244
271
|
end_time: end_time,
|
|
245
272
|
duration: values.toDate[1].diff(values.toDate[0], 'minutes')
|
|
246
|
-
})
|
|
247
|
-
case
|
|
248
|
-
|
|
273
|
+
});
|
|
274
|
+
case 12:
|
|
275
|
+
// 清空,防止下次打开时看到残留数据
|
|
276
|
+
initState();
|
|
249
277
|
props === null || props === void 0 || props.onOk();
|
|
250
|
-
_context2.next =
|
|
278
|
+
_context2.next = 19;
|
|
251
279
|
break;
|
|
252
|
-
case
|
|
253
|
-
_context2.prev =
|
|
280
|
+
case 16:
|
|
281
|
+
_context2.prev = 16;
|
|
254
282
|
_context2.t0 = _context2["catch"](2);
|
|
255
283
|
console.error(_context2.t0);
|
|
256
|
-
case
|
|
284
|
+
case 19:
|
|
257
285
|
setUpdating(false);
|
|
258
|
-
case
|
|
286
|
+
case 20:
|
|
259
287
|
case "end":
|
|
260
288
|
return _context2.stop();
|
|
261
289
|
}
|
|
262
|
-
}, _callee2, null, [[2,
|
|
290
|
+
}, _callee2, null, [[2, 16]]);
|
|
263
291
|
}));
|
|
264
292
|
return function onOk() {
|
|
265
293
|
return _ref2.apply(this, arguments);
|
|
@@ -377,6 +405,7 @@ var EditBookingModal = function EditBookingModal(props, ref) {
|
|
|
377
405
|
onClick: onOk,
|
|
378
406
|
block: true,
|
|
379
407
|
size: "large",
|
|
408
|
+
disabled: !data,
|
|
380
409
|
loading: updating,
|
|
381
410
|
style: {
|
|
382
411
|
borderRadius: 20
|
|
@@ -197,7 +197,8 @@ export var updateResourceErrors = function updateResourceErrors(resourceMaps, ca
|
|
|
197
197
|
};
|
|
198
198
|
export var init = /*#__PURE__*/function () {
|
|
199
199
|
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
|
|
200
|
-
var
|
|
200
|
+
var _childrenBooking$_ext;
|
|
201
|
+
var toStartDate, toEndDate, event, fromResourceId, toResourceId, bookingOrigin, booking, resources, childrenBooking, fromResource, toResource, extraParams, _eventResources, resourcesOrigin;
|
|
201
202
|
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
202
203
|
while (1) switch (_context7.prev = _context7.next) {
|
|
203
204
|
case 0:
|
|
@@ -216,19 +217,24 @@ export var init = /*#__PURE__*/function () {
|
|
|
216
217
|
// 筛选出当前的子预约
|
|
217
218
|
childrenBooking = getChildrenBookingById(booking.service.value, event.id);
|
|
218
219
|
console.log('childrenBooking', childrenBooking);
|
|
219
|
-
|
|
220
|
-
//
|
|
220
|
+
fromResource = resources.listMap[fromResourceId];
|
|
221
|
+
toResource = resources.listMap[toResourceId]; // 默认的资源渲染列表的获取,只会从 product_resource 获取后台配置的资源
|
|
222
|
+
// 对于没有配置但是有需要被展示的,则需要额外传入
|
|
221
223
|
extraParams = {
|
|
222
224
|
extraResources: []
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
225
|
+
}; // 1. 当某个预约同时设置了A B C 三个资源, 但预约商品本身并未关联B C
|
|
226
|
+
_eventResources = (_childrenBooking$_ext = childrenBooking._extend) === null || _childrenBooking$_ext === void 0 ? void 0 : _childrenBooking$_ext.event_resources;
|
|
227
|
+
if (Array.isArray(_eventResources)) {
|
|
228
|
+
// 简化操作,所有资源全部加入到额外资源中,由接下来的方法内部进行去重
|
|
229
|
+
_eventResources.forEach(function (item) {
|
|
230
|
+
extraParams.extraResources.push({
|
|
231
|
+
id: item.relation_id,
|
|
232
|
+
form_id: item.form_id
|
|
233
|
+
});
|
|
230
234
|
});
|
|
231
235
|
}
|
|
236
|
+
|
|
237
|
+
// 2. 移入未绑定的资源中
|
|
232
238
|
if (toResource) {
|
|
233
239
|
extraParams.extraResources.push({
|
|
234
240
|
form_id: toResource.form_id,
|
|
@@ -252,10 +258,12 @@ export var init = /*#__PURE__*/function () {
|
|
|
252
258
|
},
|
|
253
259
|
// 总资源列表
|
|
254
260
|
resourcesOrigin: resourcesOrigin,
|
|
261
|
+
// 源资源
|
|
262
|
+
fromResource: fromResource,
|
|
255
263
|
// 目标资源
|
|
256
264
|
toResource: toResource
|
|
257
265
|
});
|
|
258
|
-
case
|
|
266
|
+
case 18:
|
|
259
267
|
case "end":
|
|
260
268
|
return _context7.stop();
|
|
261
269
|
}
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
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,5 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormState } from '../model';
|
|
1
3
|
export declare const walkInData: {
|
|
2
4
|
id: number;
|
|
3
5
|
nickname: string;
|
|
4
6
|
};
|
|
5
|
-
export declare const Provider: any, Context:
|
|
7
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
8
|
+
state: FormState;
|
|
9
|
+
} & {
|
|
10
|
+
dispatch: (params: {
|
|
11
|
+
type: string;
|
|
12
|
+
payload: any;
|
|
13
|
+
}) => void;
|
|
14
|
+
}>;
|
|
@@ -401,7 +401,7 @@ export var getResourceByIds = function getResourceByIds(resourcesOriginMap, cach
|
|
|
401
401
|
});
|
|
402
402
|
} else {
|
|
403
403
|
extraResourceIds = extraResources.filter(function (_extraItem) {
|
|
404
|
-
return _extraItem.form_id === form_id && !item.optional_resource.includes(_extraItem.id) && !item.default_resource.includes(_extraItem.id);
|
|
404
|
+
return _extraItem.form_id === form_id && !!_extraItem.id && !item.optional_resource.includes(_extraItem.id) && !item.default_resource.includes(_extraItem.id);
|
|
405
405
|
}).map(function (_extraItem) {
|
|
406
406
|
return _extraItem.id;
|
|
407
407
|
});
|
|
@@ -57,7 +57,7 @@ var Resources = function Resources(_ref, ref) {
|
|
|
57
57
|
var originData = useMemo(function () {
|
|
58
58
|
var _cacheItem$_data3;
|
|
59
59
|
return (cacheItem === null || cacheItem === void 0 || (_cacheItem$_data3 = cacheItem._data) === null || _cacheItem$_data3 === void 0 ? void 0 : _cacheItem$_data3.resources) || [];
|
|
60
|
-
}, [originCacheItem === null || originCacheItem === void 0 || (_originCacheItem$_dat = originCacheItem._data) === null || _originCacheItem$_dat === void 0 ? void 0 : _originCacheItem$_dat.
|
|
60
|
+
}, [originCacheItem === null || originCacheItem === void 0 || (_originCacheItem$_dat = originCacheItem._data) === null || _originCacheItem$_dat === void 0 ? void 0 : _originCacheItem$_dat.resources]);
|
|
61
61
|
|
|
62
62
|
// 同上, 只是map结构,方便计算
|
|
63
63
|
var resourceMaps = useMemo(function () {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export interface FormState {
|
|
2
3
|
amountSymbol: string;
|
|
3
4
|
apis: {
|
|
@@ -104,4 +105,11 @@ export declare const walkInData: {
|
|
|
104
105
|
id: number;
|
|
105
106
|
nickname: string;
|
|
106
107
|
};
|
|
107
|
-
export declare const Provider: any, Context:
|
|
108
|
+
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
109
|
+
state: FormState;
|
|
110
|
+
} & {
|
|
111
|
+
dispatch: (params: {
|
|
112
|
+
type: string;
|
|
113
|
+
payload: any;
|
|
114
|
+
}) => void;
|
|
115
|
+
}>;
|
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
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 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
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
|
+
}>;
|
|
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
|
165
165
|
export declare const getDuration: (duration: number | {
|
|
166
166
|
type: string;
|
|
167
167
|
value: number;
|
|
168
|
-
}) => number | {
|
|
168
|
+
}) => number | "flexible" | {
|
|
169
169
|
type: string;
|
|
170
170
|
value: number;
|
|
171
|
-
}
|
|
171
|
+
};
|
|
172
172
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
173
173
|
export declare const getIsEdit: (state: any) => boolean;
|
|
174
174
|
export {};
|
|
@@ -8,7 +8,7 @@ import { PosProps } from './const';
|
|
|
8
8
|
*/
|
|
9
9
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
10
10
|
className?: string | undefined;
|
|
11
|
-
onChange?: ((status: "success" | "page" | "
|
|
11
|
+
onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
12
12
|
[keys: string]: unknown;
|
|
13
13
|
} | undefined, other?: any) => void) | undefined;
|
|
14
14
|
onClose: () => void;
|
|
@@ -10,7 +10,7 @@ import './device.less';
|
|
|
10
10
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
|
|
11
11
|
api: PayProps['api'];
|
|
12
12
|
className?: string | undefined;
|
|
13
|
-
onChange?: ((status: "success" | "page" | "
|
|
13
|
+
onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
|
14
14
|
[keys: string]: unknown;
|
|
15
15
|
} | undefined, other?: any) => void) | undefined;
|
|
16
16
|
onClose: () => void;
|
|
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
|
|
|
15
15
|
readonly numRef: React.MutableRefObject<string | number | undefined>;
|
|
16
16
|
readonly orderIdRef: React.MutableRefObject<string | number>;
|
|
17
17
|
readonly modeRef: React.MutableRefObject<ModeEnum>;
|
|
18
|
-
readonly statusRef: React.MutableRefObject<"success" | "
|
|
18
|
+
readonly statusRef: React.MutableRefObject<"success" | "loading" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"tyro" | "windcave" | "stripe" | "payo">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
|
|
|
174
174
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
|
175
175
|
type: EActionTypes;
|
|
176
176
|
payload: {
|
|
177
|
-
status: "success" | "
|
|
177
|
+
status: "success" | "loading" | "warn" | "fail" | "question";
|
|
178
178
|
};
|
|
179
179
|
};
|
|
180
180
|
/**
|
|
@@ -295,20 +295,20 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
295
295
|
name?: string | undefined;
|
|
296
296
|
symbol?: string | undefined;
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
|
-
mode?: "
|
|
298
|
+
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
|
-
eftpos?: "
|
|
300
|
+
eftpos?: "tyro" | "windcave" | "stripe" | "payo" | undefined;
|
|
301
301
|
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
304
304
|
title?: string | undefined;
|
|
305
305
|
subTitle?: string | undefined;
|
|
306
|
-
type?: "
|
|
306
|
+
type?: "unset" | "step" | undefined;
|
|
307
307
|
render?: boolean | undefined;
|
|
308
308
|
net?: boolean | undefined;
|
|
309
309
|
component?: string | undefined;
|
|
310
310
|
form?: string | undefined;
|
|
311
|
-
status?: "success" | "
|
|
311
|
+
status?: "success" | "loading" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
|
312
312
|
warn?: string | undefined;
|
|
313
313
|
steps?: {
|
|
314
314
|
/** 用于重置当前步骤 */
|