@pisell/private-materials 6.1.17 → 6.1.19

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 (76) 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/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +21 -13
  7. package/build/lowcode/render/default/view.js +1 -1
  8. package/build/lowcode/view.js +8 -8
  9. package/es/components/Sales/Summary/utils.d.ts +1 -1
  10. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +1 -1
  11. package/es/components/booking/components/actionButtons/index.js +17 -7
  12. package/es/components/booking/components/footer/index.js +7 -3
  13. package/es/components/booking/deposit/ClientItem/index.js +1 -1
  14. package/es/components/booking/deposit/DepositItem/index.js +1 -1
  15. package/es/components/booking/hooks/useQuotation.js +1 -1
  16. package/es/components/booking/info/hooks/useInfoHolder.js +2 -2
  17. package/es/components/booking/info/service/Lists.js +1 -1
  18. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  19. package/es/components/booking/info/service/editService/constants.d.ts +1 -0
  20. package/es/components/booking/info/service/editService/constants.js +3 -0
  21. package/es/components/booking/info/service/editService/index.js +15 -10
  22. package/es/components/booking/info/service2/utils.d.ts +1 -1
  23. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  24. package/es/components/booking/info2/service/editService/index.js +6 -5
  25. package/es/components/booking/info2/service/index.js +0 -1
  26. package/es/components/booking/locales.js +2 -2
  27. package/es/components/eftposPay/amount.d.ts +1 -1
  28. package/es/components/eftposPay/device.d.ts +1 -1
  29. package/es/components/eftposPay/hooks.d.ts +2 -2
  30. package/es/components/eftposPay/store/index.d.ts +6 -6
  31. package/es/components/schedules/utils.d.ts +1 -1
  32. package/es/components/shoppingCart/components/Cart/Product.js +4 -6
  33. package/es/components/ticketBooking/components/addServiceVariant/addService.js +86 -26
  34. package/es/components/ticketBooking/components/ticketBooking/index.js +5 -0
  35. package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +5 -2
  36. package/es/components/ticketBooking/hooks/pisellos/useScanManager.d.ts +6 -0
  37. package/es/components/ticketBooking/hooks/pisellos/useScanManager.js +20 -0
  38. package/es/components/ticketBooking/utils/index.d.ts +2 -0
  39. package/es/components/ticketBooking/utils/index.js +18 -1
  40. package/es/pro/pisellNumberSelector/index.js +43 -24
  41. package/es/pro/pisellPhoneKeyboard/index.js +1 -1
  42. package/es/utils/index.d.ts +1 -1
  43. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  44. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +1 -1
  45. package/lib/components/booking/components/actionButtons/index.js +15 -6
  46. package/lib/components/booking/components/footer/index.js +3 -0
  47. package/lib/components/booking/deposit/ClientItem/index.js +1 -1
  48. package/lib/components/booking/deposit/DepositItem/index.js +1 -1
  49. package/lib/components/booking/hooks/useQuotation.js +1 -1
  50. package/lib/components/booking/info/hooks/useInfoHolder.js +2 -2
  51. package/lib/components/booking/info/service/Lists.js +1 -1
  52. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  53. package/lib/components/booking/info/service/editService/constants.d.ts +1 -0
  54. package/lib/components/booking/info/service/editService/constants.js +31 -0
  55. package/lib/components/booking/info/service/editService/index.js +7 -1
  56. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  57. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  58. package/lib/components/booking/info2/service/editService/index.js +6 -5
  59. package/lib/components/booking/locales.js +2 -2
  60. package/lib/components/eftposPay/amount.d.ts +1 -1
  61. package/lib/components/eftposPay/device.d.ts +1 -1
  62. package/lib/components/eftposPay/hooks.d.ts +2 -2
  63. package/lib/components/eftposPay/store/index.d.ts +6 -6
  64. package/lib/components/schedules/utils.d.ts +1 -1
  65. package/lib/components/shoppingCart/components/Cart/Product.js +3 -8
  66. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +58 -18
  67. package/lib/components/ticketBooking/components/ticketBooking/index.js +4 -0
  68. package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +5 -2
  69. package/lib/components/ticketBooking/hooks/pisellos/useScanManager.d.ts +6 -0
  70. package/lib/components/ticketBooking/hooks/pisellos/useScanManager.js +44 -0
  71. package/lib/components/ticketBooking/utils/index.d.ts +2 -0
  72. package/lib/components/ticketBooking/utils/index.js +22 -0
  73. package/lib/pro/pisellNumberSelector/index.js +30 -20
  74. package/lib/pro/pisellPhoneKeyboard/index.js +1 -1
  75. package/lib/utils/index.d.ts +1 -1
  76. package/package.json +12 -12
@@ -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[]) => Decimal | "0.00";
33
+ export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
34
34
  /**
35
35
  * 计算所有价格明细
36
36
  * @param items - 购物车商品数组
@@ -102,7 +102,7 @@ var DepositModal = function DepositModal(props) {
102
102
  minHeight: '300px'
103
103
  },
104
104
  destroyOnClose: true,
105
- title: (item === null || item === void 0 ? void 0 : item.title) || (policy === null || policy === void 0 ? void 0 : policy.title) || '协议',
105
+ title: (item === null || item === void 0 ? void 0 : item.title) || (policy === null || policy === void 0 ? void 0 : policy.title) || undefined,
106
106
  onCancel: onCancel,
107
107
  mobileModalHeight: 'auto',
108
108
  className: 'policy-modal-wrap',
@@ -24,6 +24,7 @@ import "./index.less";
24
24
  import { useCustomer } from "../../../ticketBooking/hooks/pisellos/useCustomer";
25
25
  import { useMemoizedFn } from 'ahooks';
26
26
  import useEngineContext, { usePisellOS } from "../../../../hooks/useEngineContext";
27
+ import useScanManager from "../../../ticketBooking/hooks/pisellos/useScanManager";
27
28
  // Toast 内容包装器,统一设置行高
28
29
  var createToastContent = function createToastContent(text) {
29
30
  return /*#__PURE__*/React.createElement("div", {
@@ -31,7 +32,7 @@ var createToastContent = function createToastContent(text) {
31
32
  }, text);
32
33
  };
33
34
  var ActionButtons = function ActionButtons(_ref) {
34
- var _context$appHelper, _state$service2, _state$addons2, _context$appHelper3, _context$appHelper4, _context$appHelper4$g;
35
+ var _context$appHelper, _state$service2, _state$addons2, _state$service4, _state$service6, _context$appHelper3, _context$appHelper4, _context$appHelper4$g;
35
36
  var state = _ref.state,
36
37
  dispatch = _ref.dispatch,
37
38
  _ref$disabled = _ref.disabled,
@@ -71,6 +72,8 @@ var ActionButtons = function ActionButtons(_ref) {
71
72
  changeCustomerToGlobalState: changeCustomerToGlobalState
72
73
  }),
73
74
  selectCustomer = _useCustomer.selectCustomer;
75
+ var _useScanManager = useScanManager(),
76
+ clearAllScanListenersTaskQueue = _useScanManager.clearAllScanListenersTaskQueue;
74
77
 
75
78
  // 监听客户选择变化,清空手动折扣
76
79
  useEffect(function () {
@@ -135,6 +138,10 @@ var ActionButtons = function ActionButtons(_ref) {
135
138
  // 计算已使用的券数量
136
139
  var usedVouchersCount = useMemo(function () {
137
140
  try {
141
+ var _state$service3;
142
+ if (!((_state$service3 = state.service) !== null && _state$service3 !== void 0 && (_state$service3 = _state$service3.value) !== null && _state$service3 !== void 0 && _state$service3.length)) {
143
+ return 0;
144
+ }
138
145
  // 直接从全局折扣券列表中计算被选中的数量,避免重复计数
139
146
  return discountList.filter(function (discount) {
140
147
  return discount.isSelected;
@@ -143,13 +150,14 @@ var ActionButtons = function ActionButtons(_ref) {
143
150
  console.error('计算已使用券数量失败:', error);
144
151
  return 0;
145
152
  }
146
- }, [discountList]);
153
+ }, [discountList, (_state$service4 = state.service) === null || _state$service4 === void 0 ? void 0 : _state$service4.value]);
147
154
 
148
155
  // 判断是否有券可用但手动取消使用(显示红色感叹号)
149
156
  var shouldShowWarning = useMemo(function () {
150
157
  try {
151
- // 条件:discountList 长度大于 0,且没有 isSelected 的优惠券,且有 isManualSelect 的优惠券
152
- return discountList.length > 0 && !discountList.some(function (discount) {
158
+ var _state$service5;
159
+ // 条件:购物车不为空 && discountList 长度大于 0,且没有 isSelected 的优惠券,且有 isManualSelect 的优惠券
160
+ return ((_state$service5 = state.service) === null || _state$service5 === void 0 || (_state$service5 = _state$service5.value) === null || _state$service5 === void 0 ? void 0 : _state$service5.length) > 0 && discountList.length > 0 && !discountList.some(function (discount) {
153
161
  return discount.isSelected;
154
162
  }) && discountList.some(function (discount) {
155
163
  return discount.isManualSelect;
@@ -158,7 +166,7 @@ var ActionButtons = function ActionButtons(_ref) {
158
166
  console.error('判断警告状态失败:', error);
159
167
  return false;
160
168
  }
161
- }, [discountList]);
169
+ }, [discountList, (_state$service6 = state.service) === null || _state$service6 === void 0 ? void 0 : _state$service6.value]);
162
170
 
163
171
  // 监听折扣券列表变化
164
172
  useEffect(function () {
@@ -182,6 +190,7 @@ var ActionButtons = function ActionButtons(_ref) {
182
190
 
183
191
  // 仅清空商品
184
192
  var handleClearItemsOnly = function handleClearItemsOnly() {
193
+ clearAllScanListenersTaskQueue();
185
194
  if (!hasCartItems) {
186
195
  // 购物车为空时显示Toast提示
187
196
  Toast === null || Toast === void 0 || Toast.info(createToastContent(locales.getText('pisell2.clear-cart-modal.empty-cart-tip')));
@@ -216,6 +225,7 @@ var ActionButtons = function ActionButtons(_ref) {
216
225
 
217
226
  // 清空所有内容并重置购物车
218
227
  var handleClearAllAndReset = function handleClearAllAndReset() {
228
+ clearAllScanListenersTaskQueue();
219
229
  // 清空服务项目
220
230
  dispatch({
221
231
  type: 'setService',
@@ -334,7 +344,7 @@ var ActionButtons = function ActionButtons(_ref) {
334
344
 
335
345
  // 处理自定义商品保存
336
346
  var handleCustomiseItemSave = function handleCustomiseItemSave(data) {
337
- var _state$service3;
347
+ var _state$service7;
338
348
  console.log('保存自定义商品:', data);
339
349
 
340
350
  // 创建自定义商品项,按照标准商品结构
@@ -378,7 +388,7 @@ var ActionButtons = function ActionButtons(_ref) {
378
388
  };
379
389
 
380
390
  // 添加到购物车(使用 service 来存储自定义商品)
381
- var currentServices = (state === null || state === void 0 || (_state$service3 = state.service) === null || _state$service3 === void 0 ? void 0 : _state$service3.value) || [];
391
+ var currentServices = (state === null || state === void 0 || (_state$service7 = state.service) === null || _state$service7 === void 0 ? void 0 : _state$service7.value) || [];
382
392
 
383
393
  // 直接添加自定义商品,不检查重复
384
394
  var updatedServices = [customItem].concat(_toConsumableArray(currentServices));
@@ -38,6 +38,7 @@ import { SubTotal } from "../../../../index";
38
38
  import { useIsBooking4Shop } from "../../hooks/useIsBooking4Shop";
39
39
  import { sendWarningLog } from '@pisell/utils';
40
40
  import dayjs from 'dayjs';
41
+ import useScanManager from "../../../ticketBooking/hooks/pisellos/useScanManager";
41
42
  /**
42
43
  * @title: 底部
43
44
  * @description:
@@ -86,6 +87,8 @@ var Footer = function Footer(props) {
86
87
  store = _context$appHelper$ut.store,
87
88
  storage = _context$appHelper$ut.storage,
88
89
  businessUtils = _context$appHelper$ut.businessUtils;
90
+ var _useScanManager = useScanManager(),
91
+ disableAllScanListeners = _useScanManager.disableAllScanListeners;
89
92
  useEffect(function () {
90
93
  store === null || store === void 0 || store.dispatch({
91
94
  type: 'global/_getMetadataMap',
@@ -291,9 +294,10 @@ var Footer = function Footer(props) {
291
294
  return _context.abrupt("return");
292
295
  case 5:
293
296
  if (!(isTerminal !== null && isTerminal !== void 0 && isTerminal())) {
294
- _context.next = 7;
297
+ _context.next = 8;
295
298
  break;
296
299
  }
300
+ disableAllScanListeners();
297
301
  return _context.abrupt("return", interaction === null || interaction === void 0 || (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 || (_interaction$utils$po = _interaction$utils.postMessageToApp) === null || _interaction$utils$po === void 0 ? void 0 : _interaction$utils$po.call(_interaction$utils, {
298
302
  module: 'booking',
299
303
  key: 'booking_checkout',
@@ -304,7 +308,7 @@ var Footer = function Footer(props) {
304
308
  newOrder: isNewOrder
305
309
  }
306
310
  }));
307
- case 7:
311
+ case 8:
308
312
  state.action({
309
313
  type: 'pisell1.handlePayment',
310
314
  data: {
@@ -314,7 +318,7 @@ var Footer = function Footer(props) {
314
318
  state === null || state === void 0 || state.callback();
315
319
  }
316
320
  });
317
- case 8:
321
+ case 9:
318
322
  case "end":
319
323
  return _context.stop();
320
324
  }
@@ -2,7 +2,7 @@ import React, { useCallback } from "react";
2
2
  import { Avatar } from "antd";
3
3
  import { image, locales } from "@pisell/utils";
4
4
  import classnames from 'classnames';
5
- import User01 from "@pisell/icon/src/User01";
5
+ import User01 from "@pisell/icon/es/User01";
6
6
  import { isWalkIn as getIsWalkIn } from "../../utils";
7
7
  import "./index.less";
8
8
  var ClientItem = function ClientItem(props) {
@@ -3,7 +3,7 @@ import { Button, Dropdown } from 'antd';
3
3
  import { DownOutlined } from '@ant-design/icons';
4
4
  import { formatAmount, locales } from '@pisell/utils';
5
5
  import ClientItem from "../ClientItem";
6
- import Edit05 from '@pisell/icon/src/Edit05';
6
+ import Edit05 from '@pisell/icon/es/Edit05';
7
7
  import "./index.less";
8
8
  var statusTagColor = {
9
9
  unpaid: '#B2DDFF',
@@ -15,7 +15,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
15
15
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
16
16
  import React, { useEffect, useMemo, useRef, useState } from 'react';
17
17
  import { getProductTotalPrice } from "../utils";
18
- import useEngineContext from "../../../../es/hooks/useEngineContext";
18
+ import useEngineContext from "../../../hooks/useEngineContext";
19
19
  import { locales } from "@pisell/utils";
20
20
  import { PisellModal } from "@pisell/materials";
21
21
  import { getProductPrice } from "../info/service/serve";
@@ -34,7 +34,7 @@ var useInfoHolder = function useInfoHolder(state, dispatch) {
34
34
  var showAddTimeModal = useMemo(function () {
35
35
  return isOpenAddTime(state);
36
36
  }, [state, appointment_card.quick_time]);
37
- var handleEdit = function handleEdit(cacheItem, type) {
37
+ var handleEdit = useMemoizedFn(function (cacheItem, type) {
38
38
  var isNoSpecAndPackage = getIsNoSpecAndPackage(cacheItem);
39
39
  if (isNoSpecAndPackage) {
40
40
  var _editNormalServiceRef;
@@ -43,7 +43,7 @@ var useInfoHolder = function useInfoHolder(state, dispatch) {
43
43
  var _detailRef$current, _detailRef$current$in;
44
44
  (_detailRef$current = detailRef.current) === null || _detailRef$current === void 0 || (_detailRef$current$in = _detailRef$current.init) === null || _detailRef$current$in === void 0 || _detailRef$current$in.call(_detailRef$current, cacheItem, false, type === 'edit_product');
45
45
  }
46
- };
46
+ });
47
47
  var dispatchService = function dispatchService(type, payload) {
48
48
  dispatch({
49
49
  type: type,
@@ -105,7 +105,7 @@ var Lists = function Lists(_ref) {
105
105
  var p = formatProducts((state === null || state === void 0 || (_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.value) || [], state, false, true, isParallelResource);
106
106
  console.timeEnd('products');
107
107
  return p;
108
- }, [state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.value]);
108
+ }, [state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.value, state]);
109
109
  return useMemo(function () {
110
110
  console.log('render List');
111
111
  return /*#__PURE__*/React.createElement(CartContext.Provider, {
@@ -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;
@@ -0,0 +1 @@
1
+ export declare const getIsPartyRoomResourceShop: (id: number) => boolean;
@@ -0,0 +1,3 @@
1
+ export var getIsPartyRoomResourceShop = function getIsPartyRoomResourceShop(id) {
2
+ return [2155, 9].includes(id);
3
+ };
@@ -45,12 +45,15 @@ import Like from "../like";
45
45
  import { editSessionProduct, getMultiDayPrices } from "../../utils";
46
46
  import { useService } from "../serviceManager";
47
47
  import EditTabs from "./EditTabs";
48
+ import { getIsPartyRoomResourceShop } from "./constants";
49
+ import useEngineContext from "../../../../../hooks/useEngineContext";
48
50
  var submitLock = false;
49
51
  var Info = function Info(_, ref) {
50
52
  var _state$bookingConfig2, _state$service$cacheI4, _state$service$cacheI6, _state$service$cacheI7, _state$service4, _state$service6, _state$service8, _state$date, _state$date$format, _state$date2, _window$BaseMaterials, _state$service$cacheI13, _state$service10, _state$service$cacheI14, _state$bookingConfig4;
51
53
  var _Form$useForm = Form.useForm(),
52
54
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
53
55
  form = _Form$useForm2[0];
56
+ var context = useEngineContext();
54
57
  var useTotal = Form.useWatch('total', form);
55
58
  var useLikeStatus = Form.useWatch('like_status', form);
56
59
  var useResource = Form.useWatch('resource', form);
@@ -570,7 +573,7 @@ var Info = function Info(_, ref) {
570
573
  */
571
574
  var getResourcesData = /*#__PURE__*/function () {
572
575
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
573
- var params, format, startDate, endDate, _formatDayTime, startDateTime, endDateTime, data, _list;
576
+ var _context$appHelper$ut, _context$appHelper$ut2, params, format, startDate, endDate, _formatDayTime, startDateTime, endDateTime, isPartyRoomResourceShop, codes, data, _list;
574
577
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
575
578
  while (1) switch (_context3.prev = _context3.next) {
576
579
  case 0:
@@ -603,16 +606,18 @@ var Info = function Info(_, ref) {
603
606
  case 13:
604
607
  params.with_date_times = state.date.value.format('YYYY-MM-DD');
605
608
  case 14:
606
- _context3.next = 16;
609
+ isPartyRoomResourceShop = getIsPartyRoomResourceShop((_context$appHelper$ut = context.appHelper.utils.store) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut.getState) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.call(_context$appHelper$ut)) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.global) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.globalConfig) === null || _context$appHelper$ut2 === void 0 ? void 0 : _context$appHelper$ut2.id);
610
+ codes = isPartyRoomResourceShop ? ['resources', 'therapist', 'table', 'party_room'] : ['resources', 'therapist', 'table'];
611
+ _context3.next = 18;
607
612
  return state.apis.getResources(_objectSpread({
608
613
  skip: 1,
609
614
  num: 1000,
610
- codes: ['resources', 'therapist', 'table'],
615
+ codes: codes,
611
616
  _config: {
612
617
  abort: true
613
618
  }
614
619
  }, params));
615
- case 16:
620
+ case 18:
616
621
  data = _context3.sent;
617
622
  // 合并无资源
618
623
  _list = [getNoResource()].concat((data === null || data === void 0 ? void 0 : data.list) || []);
@@ -622,19 +627,19 @@ var Info = function Info(_, ref) {
622
627
  resourcesOrigin: _list
623
628
  }
624
629
  });
625
- _context3.next = 24;
630
+ _context3.next = 26;
626
631
  break;
627
- case 21:
628
- _context3.prev = 21;
632
+ case 23:
633
+ _context3.prev = 23;
629
634
  _context3.t0 = _context3["catch"](1);
630
635
  console.log(_context3.t0, 'err');
631
- case 24:
636
+ case 26:
632
637
  setResourceLoading(false);
633
- case 25:
638
+ case 27:
634
639
  case "end":
635
640
  return _context3.stop();
636
641
  }
637
- }, _callee3, null, [[1, 21]]);
642
+ }, _callee3, null, [[1, 23]]);
638
643
  }));
639
644
  return function getResourcesData() {
640
645
  return _ref5.apply(this, arguments);
@@ -248,4 +248,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
248
248
  * @Author: WangHan
249
249
  * @Date: 2024-12-24 11:32
250
250
  */
251
- export declare const updateServicePrice: (state: any) => Promise<any> | never[];
251
+ export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
@@ -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;
@@ -38,7 +38,7 @@ import { getErrorList, getIsNoSpecAndPackage } from "../../utilsByBooking";
38
38
  import { formatResources, getDurationProps, getFlexibleOption, getTimeObj, setDefaultCapacitys } from "../addService/utils";
39
39
  var submitLock = false;
40
40
  var Info = function Info(_, ref) {
41
- 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;
41
+ 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;
42
42
  var _Form$useForm = Form.useForm(),
43
43
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
44
44
  form = _Form$useForm2[0];
@@ -171,7 +171,7 @@ var Info = function Info(_, ref) {
171
171
  * @Author: zhiwei.Wang
172
172
  * @Date: 2024-01-09 13:59
173
173
  */
174
- var handleDeleteProduct = function handleDeleteProduct() {
174
+ var handleDeleteProduct = useMemoizedFn(function () {
175
175
  var _state$service$cacheI;
176
176
  if (state.channelDisabledEdit) {
177
177
  return;
@@ -191,7 +191,7 @@ var Info = function Info(_, ref) {
191
191
  cacheItem: null
192
192
  }
193
193
  });
194
- };
194
+ });
195
195
 
196
196
  /**
197
197
  * @title: 计算折扣
@@ -597,7 +597,6 @@ var Info = function Info(_, ref) {
597
597
  return false;
598
598
  }, [state.renderType, isNormalProduct]);
599
599
  var SelectTime = (_window$BaseMaterials = window.BaseMaterials) === null || _window$BaseMaterials === void 0 ? void 0 : _window$BaseMaterials.SelectTime;
600
- console.log(isShowTimeAndResource, 'isShowTimeAndResource');
601
600
  var productName = useMemo(function () {
602
601
  var _state$service7;
603
602
  return /*#__PURE__*/React.createElement(Col, {
@@ -771,6 +770,8 @@ var Info = function Info(_, ref) {
771
770
  }
772
771
  }, locales.getText('pisell2.text.apply')));
773
772
  }, [(_state$service$resour2 = state.service.resourcesOrigin) === null || _state$service$resour2 === void 0 ? void 0 : _state$service$resour2.length, isNormalProduct]);
773
+ console.log('render edit');
774
+ console.log(state.service.editModal && !((_state$service$cacheI13 = state.service.cacheItem) !== null && _state$service$cacheI13 !== void 0 && _state$service$cacheI13.autoClose), performance.now() - window.pp1, '打开商品1');
774
775
  var _useState3 = useState(false),
775
776
  _useState4 = _slicedToArray(_useState3, 2),
776
777
  val = _useState4[0],
@@ -792,7 +793,7 @@ var Info = function Info(_, ref) {
792
793
  zIndex: state.service.changeService ? 999 : 1000,
793
794
  forceRender: true,
794
795
  mask: state.drawerMask,
795
- open: !isNoSpecAndPackage && state.service.editModal && !((_state$service$cacheI13 = state.service.cacheItem) !== null && _state$service$cacheI13 !== void 0 && _state$service$cacheI13.autoClose),
796
+ open: !isNoSpecAndPackage && state.service.editModal && !((_state$service$cacheI14 = state.service.cacheItem) !== null && _state$service$cacheI14 !== void 0 && _state$service$cacheI14.autoClose),
796
797
  title: locales.getText('pisell2.text.edit-service'),
797
798
  onClose: function onClose() {
798
799
  closeBookingEditModal();
@@ -7,7 +7,6 @@ import AddTimeModal from "./addTimeModal";
7
7
  import useInfoHolder from "../../info/hooks/useInfoHolder";
8
8
  import Lists from "../../info/service/Lists";
9
9
  import useQuotation from "../../hooks/useQuotation";
10
- // import useClearCart from "../../hooks/useClearCart";
11
10
  import EditNormalService from "./editNormalService";
12
11
  var Service = function Service() {
13
12
  var _useContext = useContext(Context),
@@ -43,7 +43,7 @@ export default {
43
43
  'pisell2.text.holder': 'Holder',
44
44
  'pisell2.text.warnings': 'Warnings',
45
45
  'pisell2.text.order-notes': 'Order notes',
46
- 'pisell2.text.add-order-notes': 'Add Order note',
46
+ 'pisell2.text.add-order-notes': 'Add Order Note',
47
47
  'pisell2.text.add-internal-notes': 'Add Internal note',
48
48
  'pisell2.text.add-notes': 'Add Notes',
49
49
  'pisell2.text.notes': 'Notes',
@@ -281,7 +281,7 @@ export default {
281
281
  // Action Buttons
282
282
  'pisell2.action-buttons.clear': 'Clear',
283
283
  'pisell2.action-buttons.manuel-order': "Manual\nOrder\xA0$",
284
- 'pisell2.action-buttons.customise-item': 'Cust. \nItem',
284
+ 'pisell2.action-buttons.customise-item': 'Cust.\nItem',
285
285
  'pisell2.action-buttons.no-items-to-adjust': 'No items in cart to adjust price.',
286
286
  'pisell2.action-buttons.adjust-order-price': 'Adjust Order Price',
287
287
  'pisell2.action-buttons.price-adjusted-success': 'Order price adjusted successfully.',
@@ -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" | "fail" | "print" | "mark_tx_processed", params?: string | {
11
+ onChange?: ((status: "page" | "success" | "fail" | "print" | "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" | "fail" | "print" | "mark_tx_processed", params?: string | {
13
+ onChange?: ((status: "page" | "success" | "fail" | "print" | "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" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question">;
18
+ readonly statusRef: React.MutableRefObject<"loading" | "success" | "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<"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
  };
@@ -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" | "warn" | "loading" | "fail" | "question";
177
+ status: "loading" | "success" | "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?: "pay" | "fullPay" | "refund" | "query" | undefined;
298
+ mode?: "fullPay" | "pay" | "refund" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
301
- action?: "amount" | "deviceList" | "pay" | undefined;
300
+ eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
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?: "step" | "unset" | undefined;
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" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
311
+ status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
312
312
  warn?: string | undefined;
313
313
  steps?: {
314
314
  /** 用于重置当前步骤 */
@@ -17,6 +17,6 @@ declare let modal: Omit<ModalStaticFunctions, "warn">;
17
17
  export declare const setModal: (m: Omit<ModalStaticFunctions, "warn">) => void;
18
18
  export declare const saveConfirm: () => Promise<{
19
19
  destroy: () => void;
20
- update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
20
+ update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
21
21
  }>;
22
22
  export { modal };
@@ -5,7 +5,7 @@ import { ProductCard } from '@pisell/materials';
5
5
  import useClearCart from "../../hooks/useClearCart";
6
6
  import { useContext } from "../../hooks/useContext";
7
7
  import useAddService from "../../hooks/useAddService";
8
- import { useMemoizedFn, useTrackedEffect } from 'ahooks';
8
+ import { useMemoizedFn } from 'ahooks';
9
9
  import { isNormalProductByDurationSchedule } from "../../../booking/info/service2/utils";
10
10
  import PisellNumberSelector from "../../../../pro/pisellNumberSelector";
11
11
  var Product = function Product(props) {
@@ -57,16 +57,13 @@ var Product = function Product(props) {
57
57
  isShowEditProduct: isShowEditProduct
58
58
  };
59
59
  }, [isShowNote, isShowPackageNote, disabledEdit, isShowChangeResource, isShowDelete, isShowHolder, isShowAddHolderButton, isShowChangeHolder, isShowEditProduct]);
60
- useTrackedEffect(function (changes) {
61
- console.log('Index of changed dependencies: ', changes);
62
- }, [clearCart, lists, productParams, hideAddBtn, isAdd, platform]);
63
- var getProductCardStyleProps = function getProductCardStyleProps(type) {
60
+ var getProductCardStyleProps = useMemoizedFn(function (type) {
64
61
  var conf = productCardStyleConfig["".concat(type, "_product_card_style")];
65
62
  return {
66
63
  isShowImage: conf === null || conf === void 0 ? void 0 : conf.show_product_image,
67
64
  isShowDelete: conf === null || conf === void 0 ? void 0 : conf.show_remove_button
68
65
  };
69
- };
66
+ });
70
67
  return useMemo(function () {
71
68
  console.log('render cart');
72
69
  return /*#__PURE__*/React.createElement("div", {
@@ -101,6 +98,7 @@ var Product = function Product(props) {
101
98
  }),
102
99
  color: '#667085'
103
100
  }],
101
+ escapeDom: ".pisell-number-selector-popover",
104
102
  key: item._id,
105
103
  dataSource: item,
106
104
  onAction: function onAction(e) {