@pisell/private-materials 6.3.110 → 6.3.112

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.
Files changed (61) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/components/booking/addons/model.d.ts +10 -1
  8. package/es/components/booking/components/footer/utils.js +4 -4
  9. package/es/components/booking/forms/model.d.ts +10 -1
  10. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  11. package/es/components/booking/info/model.d.ts +10 -1
  12. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  13. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  14. package/es/components/booking/info2/service/editService/index.js +36 -6
  15. package/es/components/booking/info2/service/editService/utils.d.ts +15 -0
  16. package/es/components/booking/info2/service/editService/utils.js +76 -0
  17. package/es/components/booking/model.d.ts +9 -1
  18. package/es/components/booking/notes/model.d.ts +10 -1
  19. package/es/components/booking/payments/model.d.ts +10 -1
  20. package/es/components/booking/utils.d.ts +2 -2
  21. package/es/components/eftposPay/amount.d.ts +1 -1
  22. package/es/components/eftposPay/device.d.ts +1 -1
  23. package/es/components/eftposPay/hooks.d.ts +2 -2
  24. package/es/components/eftposPay/store/index.d.ts +6 -6
  25. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  26. package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.js +2 -2
  27. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  28. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  29. package/es/components/pay/toC/model.d.ts +9 -1
  30. package/es/components/schedules/model.d.ts +9 -1
  31. package/es/plus/pisellSalesManagement/config/booking.d.ts +6 -6
  32. package/es/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
  33. package/es/pro/Selector/Selector.d.ts +1 -1
  34. package/lib/components/booking/addons/model.d.ts +10 -1
  35. package/lib/components/booking/components/footer/utils.js +2 -2
  36. package/lib/components/booking/forms/model.d.ts +10 -1
  37. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  38. package/lib/components/booking/info/model.d.ts +10 -1
  39. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  40. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  41. package/lib/components/booking/info2/service/editService/index.js +24 -1
  42. package/lib/components/booking/info2/service/editService/utils.d.ts +15 -0
  43. package/lib/components/booking/info2/service/editService/utils.js +38 -2
  44. package/lib/components/booking/model.d.ts +9 -1
  45. package/lib/components/booking/notes/model.d.ts +10 -1
  46. package/lib/components/booking/payments/model.d.ts +10 -1
  47. package/lib/components/booking/utils.d.ts +2 -2
  48. package/lib/components/eftposPay/amount.d.ts +1 -1
  49. package/lib/components/eftposPay/device.d.ts +1 -1
  50. package/lib/components/eftposPay/hooks.d.ts +2 -2
  51. package/lib/components/eftposPay/store/index.d.ts +6 -6
  52. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  53. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.js +2 -2
  54. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  55. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  56. package/lib/components/pay/toC/model.d.ts +9 -1
  57. package/lib/components/schedules/model.d.ts +9 -1
  58. package/lib/plus/pisellSalesManagement/config/booking.d.ts +6 -6
  59. package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
  60. package/lib/pro/Selector/Selector.d.ts +1 -1
  61. package/package.json +3 -3
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
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
+ }>;
@@ -270,9 +270,9 @@ var formatHolders = function formatHolders(state, item, values) {
270
270
  * @Date: 2024-12-23 12:05
271
271
  */
272
272
  export var formatProductPrice = function formatProductPrice(item) {
273
- var _item$_extend6, _item$_extend7, _item$variant;
273
+ var _item$_extend6, _item$price, _item$_extend7, _item$variant;
274
274
  var other = (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.other;
275
- var price = Number((_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.price);
275
+ var price = Number((_item$price = item === null || item === void 0 ? void 0 : item.price) !== null && _item$price !== void 0 ? _item$price : item === null || item === void 0 || (_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.price);
276
276
 
277
277
  // 组合规格: 根据当前选择的组合规格id 和商品的组合规格列表 获取当前商品的价格
278
278
  if ((other === null || other === void 0 ? void 0 : other.product_variant_id) > 0 && (item === null || item === void 0 || (_item$variant = item.variant) === null || _item$variant === void 0 ? void 0 : _item$variant.length) > 0) {
@@ -341,9 +341,9 @@ var formatMetaData = function formatMetaData(item, isMultiDayPrices) {
341
341
 
342
342
  // 获取商品价格 包含组合规格
343
343
  var getSourceProductPrice = function getSourceProductPrice(item) {
344
- var _item$_extend14, _item$_extend15, _item$variant2;
344
+ var _item$_extend14, _item$price2, _item$_extend15, _item$variant2;
345
345
  var other = (_item$_extend14 = item._extend) === null || _item$_extend14 === void 0 ? void 0 : _item$_extend14.other;
346
- var price = Number((_item$_extend15 = item._extend) === null || _item$_extend15 === void 0 ? void 0 : _item$_extend15.price);
346
+ var price = Number((_item$price2 = item === null || item === void 0 ? void 0 : item.price) !== null && _item$price2 !== void 0 ? _item$price2 : (_item$_extend15 = item._extend) === null || _item$_extend15 === void 0 ? void 0 : _item$_extend15.price);
347
347
 
348
348
  // 组合规格: 根据当前选择的组合规格id 和商品的组合规格列表 获取当前商品的价格
349
349
  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) {
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
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,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { EditServiceRef } from "../service/editService";
3
2
  declare const useInfoHolder: (state: any, dispatch: any) => {
4
3
  detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
@@ -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: any;
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
+ }>;
@@ -6,7 +6,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
6
6
  type: string;
7
7
  value: number;
8
8
  };
9
- locale: any;
9
+ locale: string;
10
10
  slice: any;
11
11
  selectProps: {
12
12
  size: string;
@@ -7,7 +7,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
7
7
  type: string;
8
8
  value: number;
9
9
  };
10
- locale: any;
10
+ locale: string;
11
11
  slice: any;
12
12
  selectProps: {
13
13
  size: string;
@@ -36,6 +36,8 @@ import { PisellAdjustPriceInputNumber } from '@pisell/materials';
36
36
  import { editSessionProduct } from "../../../info/utils";
37
37
  import { isNormalProductByDurationSchedule } from "../../../info/service2/utils";
38
38
  import { addService, genServiceKey, getIsShowNumber } from "../../../../ticketBooking/utils";
39
+ import { Decimal } from "decimal.js";
40
+ import { setProductPrice } from "./utils";
39
41
  var submitLock = false;
40
42
  var Info = function Info(_, ref) {
41
43
  var _state$service4, _state$bookingConfig2, _state$bookingConfig3, _state$service$cacheI4, _state$service$cacheI5, _state$service6, _window$BaseMaterials, _state$service8, _state$service$cacheI10, _state$bookingConfig5, _state$service$cacheI11, _state$service$cacheI12, _state$service9, _state$service$resour2, _state$service$cacheI13, _state$service$cacheI14;
@@ -218,7 +220,7 @@ var Info = function Info(_, ref) {
218
220
  * @Date: 2024-01-09 14:04
219
221
  */
220
222
  var onFinish = function onFinish(values) {
221
- var _resourcesRef$current, _item$_extend;
223
+ var _resourcesRef$current, _item$_extend, _item2, _item$_extend2;
222
224
  var isSuccess = (_resourcesRef$current = resourcesRef.current) === null || _resourcesRef$current === void 0 ? void 0 : _resourcesRef$current.check();
223
225
  if (isShowTimeAndResource && !isSuccess) {
224
226
  return;
@@ -249,13 +251,41 @@ var Info = function Info(_, ref) {
249
251
  endDate = _getServiceTimes.endDate;
250
252
  _extend.startDate = startDate;
251
253
  _extend.endDate = endDate;
254
+ if (isChangeTotal.current) {
255
+ var _extend$other, _extend$other2;
256
+ // 计算折扣比例
257
+ var discountRatio = new Decimal(values.total).div(_item._extend.origin_total);
258
+
259
+ // 处理子商品
260
+ var _bundles = (_extend === null || _extend === void 0 || (_extend$other = _extend.other) === null || _extend$other === void 0 ? void 0 : _extend$other.bundle) || [];
261
+ var childProductsTotal = new Decimal(0);
262
+ if (_bundles.length > 0) {
263
+ _bundles.forEach(function (bundle) {
264
+ // 计算子商品折扣后的单价(保留两位小数)
265
+ var discountedPrice = new Decimal(bundle.original_price).mul(discountRatio).toDecimalPlaces(2, Decimal.ROUND_HALF_UP);
266
+ bundle.bundle_selling_price = discountedPrice.toNumber();
267
+
268
+ // 累计子商品折扣后总价
269
+ childProductsTotal = childProductsTotal.add(discountedPrice.mul(bundle.quantity));
270
+ });
271
+ }
272
+
273
+ // 计算主商品折扣后的单价
274
+ var mainProductTotal = new Decimal(values.total).sub(childProductsTotal);
275
+ var mainProductQuantity = ((_extend$other2 = _extend.other) === null || _extend$other2 === void 0 ? void 0 : _extend$other2.quantity) || _extend.quantity || 1;
276
+ _extend.main_product_selling_price = mainProductTotal.div(mainProductQuantity).toNumber();
277
+ }
252
278
  if (_extend.bundle_edit !== undefined) {
253
279
  _extend.bundle_edit = 1;
254
280
  }
255
281
  _item._extend = _extend;
256
282
  _item._time = new Date().getTime();
257
283
  _item._serviceKey = genServiceKey(_item);
258
- var _id = _item === null || _item === void 0 ? void 0 : _item._id;
284
+ var _id = (_item2 = _item) === null || _item2 === void 0 ? void 0 : _item2._id;
285
+ _item = setProductPrice(_item, {
286
+ newTotal: values.total,
287
+ origin_total: (_item$_extend2 = _item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.origin_total
288
+ });
259
289
 
260
290
  // 判断是新增还是编辑
261
291
  if (!_list.some(function (d) {
@@ -453,11 +483,11 @@ var Info = function Info(_, ref) {
453
483
  var isSession = isSessionProduct(item);
454
484
  var sessionValue = {};
455
485
  if (isSession) {
456
- var _item$_extend2, _item$_extend3, _item$_extend4;
486
+ var _item$_extend3, _item$_extend4, _item$_extend5;
457
487
  sessionValue.startEndTime = {
458
- startDate: item === null || item === void 0 || (_item$_extend2 = item._extend) === null || _item$_extend2 === void 0 ? void 0 : _item$_extend2.start_date,
459
- endDate: item === null || item === void 0 || (_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.end_date,
460
- duration: item === null || item === void 0 || (_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.duration
488
+ startDate: item === null || item === void 0 || (_item$_extend3 = item._extend) === null || _item$_extend3 === void 0 ? void 0 : _item$_extend3.start_date,
489
+ endDate: item === null || item === void 0 || (_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.end_date,
490
+ duration: item === null || item === void 0 || (_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.duration
461
491
  };
462
492
  }
463
493
 
@@ -11,3 +11,18 @@ export declare const getAutoAllocationStorage: (id: string | number) => any;
11
11
  export declare const setAutoAllocationStorage: (data: {
12
12
  [key: string]: boolean;
13
13
  }) => void;
14
+ /**
15
+ * 手动折扣后给商品价格和子商品价格重新计算
16
+ *
17
+ * 计算逻辑:
18
+ * 1. 子商品(bundle + option)按折扣比例计算,直接截取两位小数(不四舍五入)
19
+ * 2. 主商品价格 = newTotal - 所有子商品价格总和(确保总价精确等于 newTotal)
20
+ *
21
+ * @param cacheItem - 缓存的商品项
22
+ * @param newTotal - 折扣后的新总价
23
+ * @param origin_total - 原始总价
24
+ */
25
+ export declare const setProductPrice: (cacheItem: any, { newTotal, origin_total }: {
26
+ newTotal: number;
27
+ origin_total: number;
28
+ }) => any;
@@ -15,6 +15,9 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
15
15
  */
16
16
 
17
17
  import { isBoolean } from "@pisell/utils";
18
+ import { getTimeObj } from "../addService/utils";
19
+ import { Decimal } from "decimal.js";
20
+ import { isArr } from "@pisell/utils";
18
21
  var isNewService = function isNewService(service) {
19
22
  return !service.new && service._extend.endDate;
20
23
  };
@@ -52,4 +55,77 @@ export var setAutoAllocationStorage = function setAutoAllocationStorage(data) {
52
55
  } else {
53
56
  localStorage.setItem('resource-auto-allocation', JSON.stringify(_objectSpread({}, data)));
54
57
  }
58
+ };
59
+
60
+ /**
61
+ * 手动折扣后给商品价格和子商品价格重新计算
62
+ *
63
+ * 计算逻辑:
64
+ * 1. 子商品(bundle + option)按折扣比例计算,直接截取两位小数(不四舍五入)
65
+ * 2. 主商品价格 = newTotal - 所有子商品价格总和(确保总价精确等于 newTotal)
66
+ *
67
+ * @param cacheItem - 缓存的商品项
68
+ * @param newTotal - 折扣后的新总价
69
+ * @param origin_total - 原始总价
70
+ */
71
+ export var setProductPrice = function setProductPrice(cacheItem, _ref2) {
72
+ var _cacheItem$discount_l, _cacheItem$_extend$ot, _cacheItem$_extend$ot2, _cacheItem$_extend$ot4, _cacheItem$_extend$ot5;
73
+ var newTotal = _ref2.newTotal,
74
+ origin_total = _ref2.origin_total;
75
+ if (cacheItem !== null && cacheItem !== void 0 && (_cacheItem$discount_l = cacheItem.discount_list) !== null && _cacheItem$discount_l !== void 0 && _cacheItem$discount_l.length && ((cacheItem === null || cacheItem === void 0 ? void 0 : cacheItem.discount_list) || []).some(function (item) {
76
+ return ['good_pass', 'discount_card', 'product_discount_card'].includes(item.type);
77
+ })) {
78
+ return cacheItem;
79
+ }
80
+ if (cacheItem.discount_amount) {
81
+ return cacheItem;
82
+ }
83
+
84
+ // 计算折扣比例
85
+ var discountRatio = new Decimal(newTotal).div(new Decimal(origin_total));
86
+
87
+ // 用于累加子商品总价c
88
+ var subTotal = new Decimal(0);
89
+
90
+ // 处理 bundle 子商品
91
+ if ((_cacheItem$_extend$ot = cacheItem._extend.other) !== null && _cacheItem$_extend$ot !== void 0 && _cacheItem$_extend$ot.bundle && isArr((_cacheItem$_extend$ot2 = cacheItem._extend.other) === null || _cacheItem$_extend$ot2 === void 0 ? void 0 : _cacheItem$_extend$ot2.bundle)) {
92
+ var _cacheItem$_extend$ot3;
93
+ (_cacheItem$_extend$ot3 = cacheItem._extend.other) === null || _cacheItem$_extend$ot3 === void 0 || (_cacheItem$_extend$ot3 = _cacheItem$_extend$ot3.bundle) === null || _cacheItem$_extend$ot3 === void 0 || _cacheItem$_extend$ot3.forEach(function (bundle) {
94
+ var _ref3, _bundle$num;
95
+ // 计算新价格,直接截取两位小数(不四舍五入)
96
+ var newPrice = new Decimal(bundle.original_price || bundle.price).mul(discountRatio).toDecimalPlaces(2, Decimal.ROUND_DOWN).toNumber();
97
+
98
+ // 获取数量,优先取 num,再取 quantity,默认为 1
99
+ var quantity = (_ref3 = (_bundle$num = bundle.num) !== null && _bundle$num !== void 0 ? _bundle$num : bundle.quantity) !== null && _ref3 !== void 0 ? _ref3 : 1;
100
+
101
+ // 累加到子商品总价
102
+ subTotal = subTotal.add(new Decimal(newPrice).mul(quantity));
103
+
104
+ // 设置新价格
105
+ bundle.price = newPrice;
106
+ });
107
+ }
108
+
109
+ // 处理 option 子商品
110
+ if ((_cacheItem$_extend$ot4 = cacheItem._extend.other) !== null && _cacheItem$_extend$ot4 !== void 0 && _cacheItem$_extend$ot4.option && isArr((_cacheItem$_extend$ot5 = cacheItem._extend.other) === null || _cacheItem$_extend$ot5 === void 0 ? void 0 : _cacheItem$_extend$ot5.option)) {
111
+ var _cacheItem$_extend$ot6;
112
+ (_cacheItem$_extend$ot6 = cacheItem._extend.other) === null || _cacheItem$_extend$ot6 === void 0 || (_cacheItem$_extend$ot6 = _cacheItem$_extend$ot6.option) === null || _cacheItem$_extend$ot6 === void 0 || _cacheItem$_extend$ot6.forEach(function (option) {
113
+ var _ref4, _option$num;
114
+ // 计算新价格,直接截取两位小数(不四舍五入)
115
+ var newPrice = new Decimal(option.price).mul(discountRatio).toDecimalPlaces(2, Decimal.ROUND_DOWN).toNumber();
116
+
117
+ // 获取数量,优先取 num,再取 quantity,默认为 1
118
+ var quantity = (_ref4 = (_option$num = option.num) !== null && _option$num !== void 0 ? _option$num : option.quantity) !== null && _ref4 !== void 0 ? _ref4 : 1;
119
+
120
+ // 累加到子商品总价
121
+ subTotal = subTotal.add(new Decimal(newPrice).mul(quantity));
122
+
123
+ // 设置新价格
124
+ option.price = newPrice;
125
+ });
126
+ }
127
+
128
+ // 主商品价格 = newTotal - 子商品总价(让主商品吸收精度误差,确保总价精确)
129
+ cacheItem._extend.price = new Decimal(newTotal).sub(subTotal).toNumber();
130
+ return cacheItem;
55
131
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  amountSymbol: string;
3
4
  apis: {
@@ -109,4 +110,11 @@ export declare const walkInData: {
109
110
  id: number;
110
111
  nickname: string;
111
112
  };
112
- export declare const Provider: any, Context: any;
113
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
114
+ state: FormState;
115
+ } & {
116
+ dispatch: (params: {
117
+ type: string;
118
+ payload: any;
119
+ }) => void;
120
+ }>;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
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
- export declare const Provider: any, Context: any;
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
+ }>;
@@ -166,10 +166,10 @@ export declare const getProductTotalPrice: (item: any) => number;
166
166
  export declare const getDuration: (duration: number | {
167
167
  type: string;
168
168
  value: number;
169
- }) => number | {
169
+ }) => number | "flexible" | {
170
170
  type: string;
171
171
  value: number;
172
- } | "flexible";
172
+ };
173
173
  export declare const isWalkIn: (customer_id?: number | string) => boolean;
174
174
  export declare const getIsEdit: (state: any) => boolean;
175
175
  export {};
@@ -9,7 +9,7 @@ import { PosProps } from './const';
9
9
  */
10
10
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
11
11
  className?: string | undefined;
12
- onChange?: ((status: "page" | "success" | "fail" | "print" | "mark_tx_processed", params?: string | {
12
+ onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
13
13
  [keys: string]: unknown;
14
14
  } | undefined, other?: any) => void) | undefined;
15
15
  onClose: () => void;
@@ -11,7 +11,7 @@ import './device.less';
11
11
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
12
12
  api: PayProps['api'];
13
13
  className?: string | undefined;
14
- onChange?: ((status: "page" | "success" | "fail" | "print" | "mark_tx_processed", params?: string | {
14
+ onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
15
15
  [keys: string]: unknown;
16
16
  } | undefined, other?: any) => void) | undefined;
17
17
  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<"loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
18
+ readonly statusRef: React.MutableRefObject<"warn" | "success" | "loading" | "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<"payo" | "tyro" | "windcave" | "stripe" | "linkly">;
22
+ readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -176,7 +176,7 @@ export declare const updateCustom: (payload: {
176
176
  export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
177
177
  type: EActionTypes;
178
178
  payload: {
179
- status: "loading" | "success" | "warn" | "fail" | "question";
179
+ status: "warn" | "success" | "loading" | "fail" | "question";
180
180
  };
181
181
  };
182
182
  /**
@@ -197,7 +197,7 @@ export declare const updateComponent: (component: string, render?: boolean) => {
197
197
  } | {
198
198
  readonly type: "step";
199
199
  readonly render: boolean;
200
- readonly component?: undefined;
200
+ component?: undefined;
201
201
  };
202
202
  };
203
203
  /**
@@ -297,10 +297,10 @@ export declare const backUpFree: (payload: Partial<State>) => {
297
297
  name?: string | undefined;
298
298
  symbol?: string | undefined;
299
299
  amount?: string | number | undefined;
300
- mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
300
+ mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
301
301
  order_id?: string | number | undefined;
302
- eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
303
- action?: "pay" | "amount" | "deviceList" | undefined;
302
+ eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
303
+ action?: "amount" | "pay" | "deviceList" | undefined;
304
304
  key?: number | undefined;
305
305
  step?: number | undefined;
306
306
  title?: string | undefined;
@@ -310,7 +310,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
310
310
  net?: boolean | undefined;
311
311
  component?: string | undefined;
312
312
  form?: string | undefined;
313
- status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
313
+ status?: "warn" | "success" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
314
314
  warn?: string | undefined;
315
315
  steps?: {
316
316
  /** 用于重置当前步骤 */
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare type CallToBookProps = {
3
2
  show: boolean;
4
3
  type: string;
@@ -112,7 +112,7 @@ var MWCreditCard = function MWCreditCard(props, ref) {
112
112
  case 0:
113
113
  _context2.prev = 0;
114
114
  setLoading(true);
115
- utils === null || utils === void 0 || (_utils$Toast = utils.Toast) === null || _utils$Toast === void 0 || (_utils$Toast$loading = _utils$Toast.loading) === null || _utils$Toast$loading === void 0 || _utils$Toast$loading.call(_utils$Toast, locales.getText('tocPay.text.checkingCard'), 0);
115
+ utils === null || utils === void 0 || (_utils$Toast = utils.Toast) === null || _utils$Toast === void 0 || (_utils$Toast$loading = _utils$Toast.loading) === null || _utils$Toast$loading === void 0 || _utils$Toast$loading.call(_utils$Toast, locales.getText('tocPay.text.checkingCard'), 0, undefined, true);
116
116
 
117
117
  // 获取交易组
118
118
  params = getPayGroupParamsFromStorage((_state$payGroup = state.payGroup) === null || _state$payGroup === void 0 ? void 0 : _state$payGroup.order_id, {
@@ -203,7 +203,7 @@ var MWCreditCard = function MWCreditCard(props, ref) {
203
203
  case 0:
204
204
  _context3.prev = 0;
205
205
  setLoading(true);
206
- utils === null || utils === void 0 || (_utils$Toast3 = utils.Toast) === null || _utils$Toast3 === void 0 || (_utils$Toast3$loading = _utils$Toast3.loading) === null || _utils$Toast3$loading === void 0 || _utils$Toast3$loading.call(_utils$Toast3, locales.getText('tocPay.text.checkingCard'), 0);
206
+ utils === null || utils === void 0 || (_utils$Toast3 = utils.Toast) === null || _utils$Toast3 === void 0 || (_utils$Toast3$loading = _utils$Toast3.loading) === null || _utils$Toast3$loading === void 0 || _utils$Toast3$loading.call(_utils$Toast3, locales.getText('tocPay.text.checkingCard'), 0, undefined, true);
207
207
 
208
208
  // 构建卡信息
209
209
  _cardInfo = {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const StripePayment: () => import("react").JSX.Element;
3
2
  export default StripePayment;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const PageLoading: () => import("react").JSX.Element;
3
2
  export default PageLoading;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  platform: 'pc' | 'h5' | '' | undefined;
3
4
  order: any;
@@ -29,4 +30,11 @@ export interface PayGroup {
29
30
  _order: any;
30
31
  front_order_uuid?: string;
31
32
  }
32
- export declare const Provider: any, Context: any;
33
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
34
+ state: FormState;
35
+ } & {
36
+ dispatch: (params: {
37
+ type: string;
38
+ payload: any;
39
+ }) => void;
40
+ }>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CalendarDataItem, ScheduleItem } from "./type";
2
3
  import dayjs from "dayjs";
3
4
  export interface FormState {
@@ -68,4 +69,11 @@ export interface FormState {
68
69
  };
69
70
  setGlobalState: Function | null;
70
71
  }
71
- export declare const Provider: any, Context: any;
72
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
73
+ state: FormState;
74
+ } & {
75
+ dispatch: (params: {
76
+ type: string;
77
+ payload: any;
78
+ }) => void;
79
+ }>;
@@ -20,7 +20,7 @@ export declare const getFilterButtonList: () => ({
20
20
  }[];
21
21
  minInputNumberProps?: undefined;
22
22
  maxInputNumberProps?: undefined;
23
- readonly component?: undefined;
23
+ component?: undefined;
24
24
  isSearchServer?: undefined;
25
25
  showSearch?: undefined;
26
26
  showTime?: undefined;
@@ -46,7 +46,7 @@ export declare const getFilterButtonList: () => ({
46
46
  mode?: undefined;
47
47
  maxTagCount?: undefined;
48
48
  options?: undefined;
49
- readonly component?: undefined;
49
+ component?: undefined;
50
50
  isSearchServer?: undefined;
51
51
  showSearch?: undefined;
52
52
  showTime?: undefined;
@@ -91,7 +91,7 @@ export declare const getFilterButtonList: () => ({
91
91
  options: () => Promise<any>;
92
92
  minInputNumberProps?: undefined;
93
93
  maxInputNumberProps?: undefined;
94
- readonly component?: undefined;
94
+ component?: undefined;
95
95
  isSearchServer?: undefined;
96
96
  showSearch?: undefined;
97
97
  showTime?: undefined;
@@ -111,7 +111,7 @@ export declare const getFilterButtonList: () => ({
111
111
  options?: undefined;
112
112
  minInputNumberProps?: undefined;
113
113
  maxInputNumberProps?: undefined;
114
- readonly component?: undefined;
114
+ component?: undefined;
115
115
  isSearchServer?: undefined;
116
116
  showSearch?: undefined;
117
117
  showTime?: undefined;
@@ -133,7 +133,7 @@ export declare const getFilterButtonList: () => ({
133
133
  maxTagCount?: undefined;
134
134
  minInputNumberProps?: undefined;
135
135
  maxInputNumberProps?: undefined;
136
- readonly component?: undefined;
136
+ component?: undefined;
137
137
  showTime?: undefined;
138
138
  };
139
139
  sort?: undefined;
@@ -152,7 +152,7 @@ export declare const getFilterButtonList: () => ({
152
152
  options?: undefined;
153
153
  minInputNumberProps?: undefined;
154
154
  maxInputNumberProps?: undefined;
155
- readonly component?: undefined;
155
+ component?: undefined;
156
156
  isSearchServer?: undefined;
157
157
  showSearch?: undefined;
158
158
  };
@@ -3,6 +3,6 @@ export interface ImageUploadProps {
3
3
  value?: string;
4
4
  onChange?: (val: string) => void;
5
5
  }
6
- export declare const getBaseTime: (size: number) => 1000 | 2000 | 4000 | 8000;
6
+ export declare const getBaseTime: (size: number) => 2000 | 1000 | 4000 | 8000;
7
7
  declare const ImageUpload: React.FC<ImageUploadProps>;
8
8
  export default ImageUpload;
@@ -3,7 +3,7 @@ import { ItemLayout, ItemProps, PresetConfig, SelectorProps, SelectorVariant } f
3
3
  import './selector.less';
4
4
  export declare const SelectorContext: React.Context<{
5
5
  disabled?: boolean | undefined;
6
- mode?: "single" | "multiple" | undefined;
6
+ mode?: "multiple" | "single" | undefined;
7
7
  itemLayout?: ItemLayout | undefined;
8
8
  valueType?: "object" | "primitive" | undefined;
9
9
  variant?: SelectorVariant | undefined;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
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
+ }>;
@@ -234,7 +234,7 @@ var formatHolders = (state, item, values) => {
234
234
  var formatProductPrice = (item) => {
235
235
  var _a, _b, _c, _d;
236
236
  const other = (_a = item._extend) == null ? void 0 : _a.other;
237
- let price = Number((_b = item._extend) == null ? void 0 : _b.price);
237
+ let price = Number((item == null ? void 0 : item.price) ?? ((_b = item == null ? void 0 : item._extend) == null ? void 0 : _b.price));
238
238
  if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_c = item == null ? void 0 : item.variant) == null ? void 0 : _c.length) > 0) {
239
239
  const variant = item.variant.find(
240
240
  (d) => d.id === (other == null ? void 0 : other.product_variant_id)
@@ -280,7 +280,7 @@ var formatMetaData = (item, isMultiDayPrices) => {
280
280
  var getSourceProductPrice = (item) => {
281
281
  var _a, _b, _c;
282
282
  const other = (_a = item._extend) == null ? void 0 : _a.other;
283
- let price = Number((_b = item._extend) == null ? void 0 : _b.price);
283
+ let price = Number((item == null ? void 0 : item.price) ?? ((_b = item._extend) == null ? void 0 : _b.price));
284
284
  if ((other == null ? void 0 : other.product_variant_id) > 0 && ((_c = item == null ? void 0 : item.variant) == null ? void 0 : _c.length) > 0) {
285
285
  const variant = item.variant.find(
286
286
  (d) => d.id === (other == null ? void 0 : other.product_variant_id)
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
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,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { EditServiceRef } from "../service/editService";
3
2
  declare const useInfoHolder: (state: any, dispatch: any) => {
4
3
  detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
@@ -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: any;
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
+ }>;
@@ -6,7 +6,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
6
6
  type: string;
7
7
  value: number;
8
8
  };
9
- locale: any;
9
+ locale: string;
10
10
  slice: any;
11
11
  selectProps: {
12
12
  size: string;