@pisell/pisellos 0.0.218 → 0.0.220

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 (190) hide show
  1. package/README.md +180 -180
  2. package/dist/core/index.js +4 -4
  3. package/dist/index.js +3 -3
  4. package/dist/modules/Account/types.js +6 -6
  5. package/dist/modules/AccountList/index.js +14 -14
  6. package/dist/modules/AccountList/types.js +14 -14
  7. package/dist/modules/AccountList/utils.js +5 -5
  8. package/dist/modules/Cart/index.js +35 -35
  9. package/dist/modules/Cart/types.js +14 -14
  10. package/dist/modules/Cart/utils/cartAccount.js +8 -8
  11. package/dist/modules/Cart/utils/cartDate.js +12 -12
  12. package/dist/modules/Cart/utils/cartDiscount.js +8 -8
  13. package/dist/modules/Cart/utils/cartNote.js +8 -8
  14. package/dist/modules/Cart/utils/cartProduct.js +39 -39
  15. package/dist/modules/Cart/utils/cartRelationForms.js +8 -8
  16. package/dist/modules/Cart/utils/cartResource.js +8 -8
  17. package/dist/modules/Cart/utils/index.js +4 -4
  18. package/dist/modules/Customer/constants.d.ts +1 -1
  19. package/dist/modules/Customer/constants.js +1 -1
  20. package/dist/modules/Customer/index.js +67 -67
  21. package/dist/modules/Customer/types.js +18 -18
  22. package/dist/modules/Date/types.js +6 -6
  23. package/dist/modules/Date/utils.js +25 -25
  24. package/dist/modules/Guests/types.js +8 -8
  25. package/dist/modules/Order/types.js +4 -4
  26. package/dist/modules/Order/utils.js +8 -8
  27. package/dist/modules/Payment/cash.js +2 -2
  28. package/dist/modules/Payment/eftpos.js +2 -2
  29. package/dist/modules/Payment/index.js +135 -135
  30. package/dist/modules/Payment/types.js +50 -50
  31. package/dist/modules/Payment/wallet.js +2 -2
  32. package/dist/modules/Product/index.js +22 -22
  33. package/dist/modules/Product/utils.js +12 -12
  34. package/dist/modules/ProductList/index.js +4 -4
  35. package/dist/modules/Resource/types.js +8 -8
  36. package/dist/modules/Resource/utils.js +14 -14
  37. package/dist/modules/Schedule/index.js +4 -4
  38. package/dist/modules/Schedule/utils.js +73 -73
  39. package/dist/modules/Step/index.js +18 -18
  40. package/dist/modules/Summary/index.js +4 -4
  41. package/dist/modules/Summary/utils.js +15 -15
  42. package/dist/plugins/app-types/app/app.d.ts +83 -83
  43. package/dist/plugins/app-types/app/const.d.ts +4 -4
  44. package/dist/plugins/app-types/app/index.d.ts +14 -14
  45. package/dist/plugins/app-types/applicationManager/application.d.ts +50 -50
  46. package/dist/plugins/app-types/applicationManager/index.d.ts +13 -13
  47. package/dist/plugins/app-types/config.d.ts +3 -3
  48. package/dist/plugins/app-types/cookie/index.d.ts +13 -13
  49. package/dist/plugins/app-types/data/index.d.ts +8 -8
  50. package/dist/plugins/app-types/history/config.d.ts +24 -24
  51. package/dist/plugins/app-types/history/index.d.ts +20 -20
  52. package/dist/plugins/app-types/history/type.d.ts +2 -2
  53. package/dist/plugins/app-types/hooks/index.d.ts +12 -12
  54. package/dist/plugins/app-types/hooks/useDelayedValue/index.d.ts +2 -2
  55. package/dist/plugins/app-types/hooks/useDispatch/index.d.ts +2 -2
  56. package/dist/plugins/app-types/hooks/useLowCode/index.d.ts +13 -13
  57. package/dist/plugins/app-types/hooks/useStore/index.d.ts +6 -6
  58. package/dist/plugins/app-types/index.d.ts +6 -6
  59. package/dist/plugins/app-types/indexDB/index.d.ts +178 -178
  60. package/dist/plugins/app-types/locales/en.d.ts +3 -3
  61. package/dist/plugins/app-types/locales/index.d.ts +37 -37
  62. package/dist/plugins/app-types/locales/original.d.ts +3 -3
  63. package/dist/plugins/app-types/locales/type.d.ts +19 -19
  64. package/dist/plugins/app-types/locales/zh-CN.d.ts +3 -3
  65. package/dist/plugins/app-types/locales/zh-HK.d.ts +3 -3
  66. package/dist/plugins/app-types/logger/feishu.d.ts +11 -11
  67. package/dist/plugins/app-types/logger/index.d.ts +122 -122
  68. package/dist/plugins/app-types/menuManager/hooks.d.ts +17 -17
  69. package/dist/plugins/app-types/menuManager/index.d.ts +28 -28
  70. package/dist/plugins/app-types/models/global.d.ts +32 -32
  71. package/dist/plugins/app-types/models/index.d.ts +45 -45
  72. package/dist/plugins/app-types/models/type.d.ts +2 -2
  73. package/dist/plugins/app-types/package.json +14 -14
  74. package/dist/plugins/app-types/pubsub/example.d.ts +5 -5
  75. package/dist/plugins/app-types/pubsub/index.d.ts +63 -63
  76. package/dist/plugins/app-types/request/cache.d.ts +46 -46
  77. package/dist/plugins/app-types/request/cancelToken.d.ts +38 -38
  78. package/dist/plugins/app-types/request/config.d.ts +3 -3
  79. package/dist/plugins/app-types/request/constants.d.ts +2 -2
  80. package/dist/plugins/app-types/request/index.d.ts +24 -24
  81. package/dist/plugins/app-types/request/pisell2Request.d.ts +6 -6
  82. package/dist/plugins/app-types/request/type.d.ts +41 -41
  83. package/dist/plugins/app-types/request/utils.d.ts +46 -46
  84. package/dist/plugins/app-types/routes/config.d.ts +7 -7
  85. package/dist/plugins/app-types/routes/index.d.ts +28 -28
  86. package/dist/plugins/app-types/socket/components/SocketMonitorPage.d.ts +6 -6
  87. package/dist/plugins/app-types/socket/components/index.d.ts +2 -2
  88. package/dist/plugins/app-types/socket/constants.d.ts +33 -33
  89. package/dist/plugins/app-types/socket/events.d.ts +31 -31
  90. package/dist/plugins/app-types/socket/heartbeat.d.ts +66 -66
  91. package/dist/plugins/app-types/socket/index.d.ts +61 -61
  92. package/dist/plugins/app-types/socket/monitor.d.ts +169 -169
  93. package/dist/plugins/app-types/socket/reconnect.d.ts +61 -61
  94. package/dist/plugins/app-types/socket/socket.d.ts +129 -129
  95. package/dist/plugins/app-types/socket/types.d.ts +85 -85
  96. package/dist/plugins/app-types/storage/index.d.ts +17 -17
  97. package/dist/plugins/app-types/tasks/index.d.ts +77 -77
  98. package/dist/plugins/app-types/tasks/type.d.ts +62 -62
  99. package/dist/plugins/app-types/tasks/useTasks.d.ts +5 -5
  100. package/dist/plugins/app-types/type.d.ts +2 -2
  101. package/dist/plugins/app-types/variables/VariablesProvider.d.ts +7 -7
  102. package/dist/plugins/app-types/variables/config.d.ts +3 -3
  103. package/dist/plugins/app-types/variables/index.d.ts +6 -6
  104. package/dist/plugins/app-types/variables/type.d.ts +2 -2
  105. package/dist/plugins/app-types/website/index.d.ts +6 -6
  106. package/dist/plugins/request.js +33 -33
  107. package/dist/plugins/window.js +16 -16
  108. package/dist/solution/BookingByStep/index.js +126 -126
  109. package/dist/solution/BookingByStep/utils/capacity.js +30 -30
  110. package/dist/solution/BookingByStep/utils/products.js +4 -4
  111. package/dist/solution/BookingByStep/utils/resources.js +146 -146
  112. package/dist/solution/BookingByStep/utils/timeslots.js +20 -20
  113. package/dist/solution/BookingTicket/index.d.ts +1 -1
  114. package/dist/solution/BookingTicket/index.js +81 -81
  115. package/dist/solution/BookingTicket/types.js +8 -8
  116. package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +6 -6
  117. package/dist/solution/BookingTicket/utils/scan/handleScan.js +17 -17
  118. package/dist/solution/BookingTicket/utils/scan/index.js +19 -19
  119. package/dist/solution/BookingTicket/utils/scan/scanCache.js +52 -52
  120. package/dist/solution/BuyTickets/types.js +4 -4
  121. package/dist/utils/task.js +11 -11
  122. package/dist/utils/watch.js +59 -59
  123. package/lib/modules/Customer/constants.d.ts +1 -1
  124. package/lib/modules/Customer/constants.js +1 -1
  125. package/lib/plugins/app-types/app/app.d.ts +83 -83
  126. package/lib/plugins/app-types/app/const.d.ts +4 -4
  127. package/lib/plugins/app-types/app/index.d.ts +14 -14
  128. package/lib/plugins/app-types/applicationManager/application.d.ts +50 -50
  129. package/lib/plugins/app-types/applicationManager/index.d.ts +13 -13
  130. package/lib/plugins/app-types/config.d.ts +3 -3
  131. package/lib/plugins/app-types/cookie/index.d.ts +13 -13
  132. package/lib/plugins/app-types/data/index.d.ts +8 -8
  133. package/lib/plugins/app-types/history/config.d.ts +24 -24
  134. package/lib/plugins/app-types/history/index.d.ts +20 -20
  135. package/lib/plugins/app-types/history/type.d.ts +2 -2
  136. package/lib/plugins/app-types/hooks/index.d.ts +12 -12
  137. package/lib/plugins/app-types/hooks/useDelayedValue/index.d.ts +2 -2
  138. package/lib/plugins/app-types/hooks/useDispatch/index.d.ts +2 -2
  139. package/lib/plugins/app-types/hooks/useLowCode/index.d.ts +13 -13
  140. package/lib/plugins/app-types/hooks/useStore/index.d.ts +6 -6
  141. package/lib/plugins/app-types/index.d.ts +6 -6
  142. package/lib/plugins/app-types/indexDB/index.d.ts +178 -178
  143. package/lib/plugins/app-types/locales/en.d.ts +3 -3
  144. package/lib/plugins/app-types/locales/index.d.ts +37 -37
  145. package/lib/plugins/app-types/locales/original.d.ts +3 -3
  146. package/lib/plugins/app-types/locales/type.d.ts +19 -19
  147. package/lib/plugins/app-types/locales/zh-CN.d.ts +3 -3
  148. package/lib/plugins/app-types/locales/zh-HK.d.ts +3 -3
  149. package/lib/plugins/app-types/logger/feishu.d.ts +11 -11
  150. package/lib/plugins/app-types/logger/index.d.ts +122 -122
  151. package/lib/plugins/app-types/menuManager/hooks.d.ts +17 -17
  152. package/lib/plugins/app-types/menuManager/index.d.ts +28 -28
  153. package/lib/plugins/app-types/models/global.d.ts +32 -32
  154. package/lib/plugins/app-types/models/index.d.ts +45 -45
  155. package/lib/plugins/app-types/models/type.d.ts +2 -2
  156. package/lib/plugins/app-types/package.json +14 -14
  157. package/lib/plugins/app-types/pubsub/example.d.ts +5 -5
  158. package/lib/plugins/app-types/pubsub/index.d.ts +63 -63
  159. package/lib/plugins/app-types/request/cache.d.ts +46 -46
  160. package/lib/plugins/app-types/request/cancelToken.d.ts +38 -38
  161. package/lib/plugins/app-types/request/config.d.ts +3 -3
  162. package/lib/plugins/app-types/request/constants.d.ts +2 -2
  163. package/lib/plugins/app-types/request/index.d.ts +24 -24
  164. package/lib/plugins/app-types/request/pisell2Request.d.ts +6 -6
  165. package/lib/plugins/app-types/request/type.d.ts +41 -41
  166. package/lib/plugins/app-types/request/utils.d.ts +46 -46
  167. package/lib/plugins/app-types/routes/config.d.ts +7 -7
  168. package/lib/plugins/app-types/routes/index.d.ts +28 -28
  169. package/lib/plugins/app-types/socket/components/SocketMonitorPage.d.ts +6 -6
  170. package/lib/plugins/app-types/socket/components/index.d.ts +2 -2
  171. package/lib/plugins/app-types/socket/constants.d.ts +33 -33
  172. package/lib/plugins/app-types/socket/events.d.ts +31 -31
  173. package/lib/plugins/app-types/socket/heartbeat.d.ts +66 -66
  174. package/lib/plugins/app-types/socket/index.d.ts +61 -61
  175. package/lib/plugins/app-types/socket/monitor.d.ts +169 -169
  176. package/lib/plugins/app-types/socket/reconnect.d.ts +61 -61
  177. package/lib/plugins/app-types/socket/socket.d.ts +129 -129
  178. package/lib/plugins/app-types/socket/types.d.ts +85 -85
  179. package/lib/plugins/app-types/storage/index.d.ts +17 -17
  180. package/lib/plugins/app-types/tasks/index.d.ts +77 -77
  181. package/lib/plugins/app-types/tasks/type.d.ts +62 -62
  182. package/lib/plugins/app-types/tasks/useTasks.d.ts +5 -5
  183. package/lib/plugins/app-types/type.d.ts +2 -2
  184. package/lib/plugins/app-types/variables/VariablesProvider.d.ts +7 -7
  185. package/lib/plugins/app-types/variables/config.d.ts +3 -3
  186. package/lib/plugins/app-types/variables/index.d.ts +6 -6
  187. package/lib/plugins/app-types/variables/type.d.ts +2 -2
  188. package/lib/plugins/app-types/website/index.d.ts +6 -6
  189. package/lib/solution/BookingTicket/index.d.ts +1 -1
  190. package/package.json +1 -1
@@ -13,20 +13,20 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
13
13
  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); }
14
14
  import dayjs from 'dayjs';
15
15
 
16
- /**
17
- * 1. 获取资源列表
18
- * 2. 根据当前选择的商品过滤出来对应的资源列表 getResourcesByProduct
19
- * 3. 格式化资源相关 格式化资源列表 --> 格式化资源 --> 获取时间切片列表 --> 判断单个时间切片是否可用 formatResources
20
- *
16
+ /**
17
+ * 1. 获取资源列表
18
+ * 2. 根据当前选择的商品过滤出来对应的资源列表 getResourcesByProduct
19
+ * 3. 格式化资源相关 格式化资源列表 --> 格式化资源 --> 获取时间切片列表 --> 判断单个时间切片是否可用 formatResources
20
+ *
21
21
  */
22
22
 
23
- /**
24
- * @title: 获取重叠剩余量
25
- * @description:
26
- * @param {any} eventList
27
- * @param {number} current
28
- * @return {*}
29
- * @Author: zhiwei.Wang
23
+ /**
24
+ * @title: 获取重叠剩余量
25
+ * @description:
26
+ * @param {any} eventList
27
+ * @param {number} current
28
+ * @return {*}
29
+ * @Author: zhiwei.Wang
30
30
  */
31
31
  var getUseableEventCount = function getUseableEventCount(eventList, current) {
32
32
  return (eventList || []).reduce(function (pre, event) {
@@ -34,13 +34,13 @@ var getUseableEventCount = function getUseableEventCount(eventList, current) {
34
34
  }, current || 0);
35
35
  };
36
36
 
37
- /**
38
- * @title: 判断两个时间段是否有重叠
39
- * @description:
40
- * @param {object} event
41
- * @param {object} current
42
- * @return {*}
43
- * @Author: zhiwei.Wang
37
+ /**
38
+ * @title: 判断两个时间段是否有重叠
39
+ * @description:
40
+ * @param {object} event
41
+ * @param {object} current
42
+ * @return {*}
43
+ * @Author: zhiwei.Wang
44
44
  */
45
45
  var isConflict = function isConflict(event, current) {
46
46
  var eventStart = dayjs(event.start_at);
@@ -59,26 +59,26 @@ var isConflict = function isConflict(event, current) {
59
59
  return _isBefore && _isAfter;
60
60
  };
61
61
 
62
- /**
63
- * @title: 判断传入日期是否在当前日期之后
64
- * @description:
65
- * @param {any} date
66
- * @param {any} today
67
- * @return {*}
68
- * @Author: zhiwei.Wang
62
+ /**
63
+ * @title: 判断传入日期是否在当前日期之后
64
+ * @description:
65
+ * @param {any} date
66
+ * @param {any} today
67
+ * @return {*}
68
+ * @Author: zhiwei.Wang
69
69
  */
70
70
  var checkAfterToDay = function checkAfterToDay(date) {
71
71
  var today = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : dayjs();
72
72
  return dayjs(date).isAfter(dayjs(today));
73
73
  };
74
74
 
75
- /**
76
- * @title: 格式化资源, 添加自定义参数
77
- * @description:
78
- * @param {any} resourceItem
79
- * @return {*}
80
- * @Author: zhiwei.Wang
81
- * @Date: 2024-01-09 13:40
75
+ /**
76
+ * @title: 格式化资源, 添加自定义参数
77
+ * @description:
78
+ * @param {any} resourceItem
79
+ * @return {*}
80
+ * @Author: zhiwei.Wang
81
+ * @Date: 2024-01-09 13:40
82
82
  */
83
83
  var formatResource = function formatResource(resourceItem, booking) {
84
84
  // 当前资源
@@ -97,12 +97,12 @@ var formatResource = function formatResource(resourceItem, booking) {
97
97
  return _resourceItem;
98
98
  };
99
99
 
100
- /**
101
- * @title: 判断资源容量是否可用
102
- * @description:
103
- * @param {object} param1
104
- * @return {*}
105
- * @Author: zhiwei.Wang
100
+ /**
101
+ * @title: 判断资源容量是否可用
102
+ * @description:
103
+ * @param {object} param1
104
+ * @return {*}
105
+ * @Author: zhiwei.Wang
106
106
  */
107
107
  var checkCapacity = function checkCapacity(_ref) {
108
108
  var event_list = _ref.event_list,
@@ -163,12 +163,12 @@ var checkCapacity = function checkCapacity(_ref) {
163
163
  }
164
164
  };
165
165
 
166
- /**
167
- * @title: 获取时间切片是否可用
168
- * @description: 根据时间切片、资源、当前预约量判断时间切片是否可用
169
- * @param {any} param1
170
- * @return {*}
171
- * @Author: zhiwei.Wang
166
+ /**
167
+ * @title: 获取时间切片是否可用
168
+ * @description: 根据时间切片、资源、当前预约量判断时间切片是否可用
169
+ * @param {any} param1
170
+ * @return {*}
171
+ * @Author: zhiwei.Wang
172
172
  */
173
173
  export var getIsUsableByTimeItem = function getIsUsableByTimeItem(_ref2) {
174
174
  var _resource$combined_re;
@@ -245,13 +245,13 @@ export var getIsUsableByTimeItem = function getIsUsableByTimeItem(_ref2) {
245
245
  return status;
246
246
  };
247
247
 
248
- /**
249
- * @title: 获取商品下绑定的资源列表
250
- * @description:
251
- * @param {any} resourcesMap
252
- * @param {any} product
253
- * @return {*}
254
- * @Author: zhiwei.Wang
248
+ /**
249
+ * @title: 获取商品下绑定的资源列表
250
+ * @description:
251
+ * @param {any} resourcesMap
252
+ * @param {any} product
253
+ * @return {*}
254
+ * @Author: zhiwei.Wang
255
255
  */
256
256
  export var getResourcesByProduct = function getResourcesByProduct(resourcesMap, resources, selectedResources) {
257
257
  var capacity = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
@@ -358,12 +358,12 @@ export var getResourcesByProduct = function getResourcesByProduct(resourcesMap,
358
358
  }, []);
359
359
  };
360
360
 
361
- /**
362
- * @title: 获取资源列表
363
- * @description:
364
- * @return {*}
365
- * @Author: zhiwei.Wang
366
- * @Date: 2024-01-09 13:38
361
+ /**
362
+ * @title: 获取资源列表
363
+ * @description:
364
+ * @return {*}
365
+ * @Author: zhiwei.Wang
366
+ * @Date: 2024-01-09 13:38
367
367
  */
368
368
  export var formatResources = function formatResources(_ref4) {
369
369
  var booking = _ref4.booking,
@@ -407,11 +407,11 @@ export var formatResources = function formatResources(_ref4) {
407
407
  };
408
408
  };
409
409
 
410
- /**
411
- * @title: 获取资源的时间切片列表
412
- * @description:
413
- * @return {*}
414
- * @Author: zhiwei.Wang
410
+ /**
411
+ * @title: 获取资源的时间切片列表
412
+ * @description:
413
+ * @return {*}
414
+ * @Author: zhiwei.Wang
415
415
  */
416
416
  export var getTimeSlicesByResource = function getTimeSlicesByResource(_ref5) {
417
417
  var resource = _ref5.resource,
@@ -500,13 +500,13 @@ export var getTimeSlicesByResource = function getTimeSlicesByResource(_ref5) {
500
500
  return timeSlices;
501
501
  };
502
502
 
503
- /**
504
- * @title: 获取时间切片列表的交集
505
- * @description: 注意: 需要将多个时间切片列表合并在一起,然后判断交集
506
- * @param {TimeSliceItem} times 多个时间切片
507
- * @param {number} count 交集次数, 符合此次数的会返回
508
- * @return {*}
509
- * @Author: zhiwei.Wang
503
+ /**
504
+ * @title: 获取时间切片列表的交集
505
+ * @description: 注意: 需要将多个时间切片列表合并在一起,然后判断交集
506
+ * @param {TimeSliceItem} times 多个时间切片
507
+ * @param {number} count 交集次数, 符合此次数的会返回
508
+ * @return {*}
509
+ * @Author: zhiwei.Wang
510
510
  */
511
511
  export var getTimesIntersection = function getTimesIntersection(times, count) {
512
512
  var obj = times.reduce(function (acc, item) {
@@ -530,14 +530,14 @@ export var getTimesIntersection = function getTimesIntersection(times, count) {
530
530
  });
531
531
  };
532
532
 
533
- /**
534
- * @title: 根据ids筛选资源列表
535
- * @description:
536
- * @param {any} resourcesMap
537
- * @param {any} ids
538
- * @return {*}
539
- * @Author: zhiwei.Wang
540
- * @Date: 2024-09-19 20:23
533
+ /**
534
+ * @title: 根据ids筛选资源列表
535
+ * @description:
536
+ * @param {any} resourcesMap
537
+ * @param {any} ids
538
+ * @return {*}
539
+ * @Author: zhiwei.Wang
540
+ * @Date: 2024-09-19 20:23
541
541
  */
542
542
  export var getResourcesByIds = function getResourcesByIds(resourcesMap, ids) {
543
543
  return (ids || []).map(function (id) {
@@ -545,13 +545,13 @@ export var getResourcesByIds = function getResourcesByIds(resourcesMap, ids) {
545
545
  });
546
546
  };
547
547
 
548
- /**
549
- * @title: 合并子资源的时间切片至组合资源
550
- * @description:
551
- * @param {ResourceItem[]} resources
552
- * @param {Record<string, ResourceItem>} resourcesMap
553
- * @return {*}
554
- * @Author: zhiwei.Wang
548
+ /**
549
+ * @title: 合并子资源的时间切片至组合资源
550
+ * @description:
551
+ * @param {ResourceItem[]} resources
552
+ * @param {Record<string, ResourceItem>} resourcesMap
553
+ * @return {*}
554
+ * @Author: zhiwei.Wang
555
555
  */
556
556
  export var mergeSubResourcesTimeSlices = function mergeSubResourcesTimeSlices(resources, resourcesMap) {
557
557
  return resources.forEach(function (item) {
@@ -576,13 +576,13 @@ export var mergeSubResourcesTimeSlices = function mergeSubResourcesTimeSlices(re
576
576
  });
577
577
  };
578
578
 
579
- /**
580
- * @title: 根据资源id列表获取时间切片
581
- * @description: 传入一个技师id列表, 找出技师列表中公共的时间切片
582
- * @param {ResourceItem} resources
583
- * @param {CartItem} cart
584
- * @return {*}
585
- * @Author: zhiwei.Wang
579
+ /**
580
+ * @title: 根据资源id列表获取时间切片
581
+ * @description: 传入一个技师id列表, 找出技师列表中公共的时间切片
582
+ * @param {ResourceItem} resources
583
+ * @param {CartItem} cart
584
+ * @return {*}
585
+ * @Author: zhiwei.Wang
586
586
  */
587
587
  export var getTimeSlicesByResources = function getTimeSlicesByResources(_ref6) {
588
588
  var resourceIds = _ref6.resourceIds,
@@ -630,13 +630,13 @@ export var getTimeSlicesByResources = function getTimeSlicesByResources(_ref6) {
630
630
  return intersection;
631
631
  };
632
632
 
633
- /**
634
- * @title: 获取其他人的已选资源
635
- * @description:
636
- * @param {CartItem[]} cartItems
637
- * @param {number | string} accountId
638
- * @return {*}
639
- * @Author: jinglin.tan
633
+ /**
634
+ * @title: 获取其他人的已选资源
635
+ * @description:
636
+ * @param {CartItem[]} cartItems
637
+ * @param {number | string} accountId
638
+ * @return {*}
639
+ * @Author: jinglin.tan
640
640
  */
641
641
  export var getOthersSelectedResources = function getOthersSelectedResources(cartItems, accountId, resourcesMap) {
642
642
  return cartItems.reduce(function (acc, d) {
@@ -677,13 +677,13 @@ export var getOthersSelectedResources = function getOthersSelectedResources(cart
677
677
  }, []);
678
678
  };
679
679
 
680
- /**
681
- * @title: 获取其他购物车内商品的已选资源
682
- * @description:
683
- * @param {CartItem[]} cartItems
684
- * @param {number | string} accountId
685
- * @return {*}
686
- * @Author: jinglin.tan
680
+ /**
681
+ * @title: 获取其他购物车内商品的已选资源
682
+ * @description:
683
+ * @param {CartItem[]} cartItems
684
+ * @param {number | string} accountId
685
+ * @return {*}
686
+ * @Author: jinglin.tan
687
687
  */
688
688
  export var getOthersCartSelectedResources = function getOthersCartSelectedResources(cartItems, cartItemId, resourcesMap) {
689
689
  return cartItems.reduce(function (acc, d) {
@@ -724,14 +724,14 @@ export var getOthersCartSelectedResources = function getOthersCartSelectedResour
724
724
  return acc;
725
725
  }, []);
726
726
  };
727
- /**
728
- * @title: 根据日期范围过滤日程
729
- *
730
- * @export
731
- * @param {any[]} schedule
732
- * @param {string} startDate
733
- * @param {string} endDate
734
- * @return {*}
727
+ /**
728
+ * @title: 根据日期范围过滤日程
729
+ *
730
+ * @export
731
+ * @param {any[]} schedule
732
+ * @param {string} startDate
733
+ * @param {string} endDate
734
+ * @return {*}
735
735
  */
736
736
  export function filterScheduleByDateRange(schedule, startDate, endDate) {
737
737
  if (!(schedule !== null && schedule !== void 0 && schedule.length)) return [];
@@ -743,12 +743,12 @@ export function filterScheduleByDateRange(schedule, startDate, endDate) {
743
743
  });
744
744
  }
745
745
 
746
- /**
747
- * 传入商品数据,返回基于商品配置的提前量的最早开始日期和最晚结束日期
748
- *
749
- * @export
750
- * @param {ProductData} product
751
- * @return {*}
746
+ /**
747
+ * 传入商品数据,返回基于商品配置的提前量的最早开始日期和最晚结束日期
748
+ *
749
+ * @export
750
+ * @param {ProductData} product
751
+ * @return {*}
752
752
  */
753
753
  export function checkSessionProductLeadTime(product) {
754
754
  var latestStartDate = ''; // 最晚开始日期
@@ -782,12 +782,12 @@ export function checkSessionProductLeadTime(product) {
782
782
  };
783
783
  }
784
784
 
785
- /**
786
- * 基于商品的 resources 配置,返回可选择的资源的 id 列表
787
- *
788
- * @export
789
- * @param {ProductData} product
790
- * @return {*}
785
+ /**
786
+ * 基于商品的 resources 配置,返回可选择的资源的 id 列表
787
+ *
788
+ * @export
789
+ * @param {ProductData} product
790
+ * @return {*}
791
791
  */
792
792
  export function getResourcesIdsByProduct(product) {
793
793
  var _product$product_reso, _product$product_reso2;
@@ -805,12 +805,12 @@ export function getResourcesIdsByProduct(product) {
805
805
  return tempResourceIds;
806
806
  }
807
807
 
808
- /**
809
- * 资源排序,把单个资源靠前,组合资源排在后面
810
- *
811
- * @export
812
- * @param {ResourceItem[]} resourcesList
813
- * @return {*}
808
+ /**
809
+ * 资源排序,把单个资源靠前,组合资源排在后面
810
+ *
811
+ * @export
812
+ * @param {ResourceItem[]} resourcesList
813
+ * @return {*}
814
814
  */
815
815
  export function sortCombinedResources(resourcesList) {
816
816
  var newResourcesList = _toConsumableArray(resourcesList);
@@ -823,13 +823,13 @@ export function sortCombinedResources(resourcesList) {
823
823
  return newResourcesList;
824
824
  }
825
825
 
826
- /**
827
- * 传入一个资源组,根据 formid筛出相同类型的资源
828
- *
829
- * @export
830
- * @param {ResourceItem[]} resources
831
- * @param {string} form_id
832
- * @return {*}
826
+ /**
827
+ * 传入一个资源组,根据 formid筛出相同类型的资源
828
+ *
829
+ * @export
830
+ * @param {ResourceItem[]} resources
831
+ * @param {string} form_id
832
+ * @return {*}
833
833
  */
834
834
  export function filterResourcesByFormItem(resources, form_id) {
835
835
  return resources.filter(function (n) {
@@ -837,13 +837,13 @@ export function filterResourcesByFormItem(resources, form_id) {
837
837
  });
838
838
  }
839
839
 
840
- /**
841
- * 传入两个资源,确认这两个资源是否有交集(包括组合资源)
842
- *
843
- * @export
844
- * @param {ResourceItem} resource1
845
- * @param {ResourceItem} resource2
846
- * @return {*}
840
+ /**
841
+ * 传入两个资源,确认这两个资源是否有交集(包括组合资源)
842
+ *
843
+ * @export
844
+ * @param {ResourceItem} resource1
845
+ * @param {ResourceItem} resource2
846
+ * @return {*}
847
847
  */
848
848
  export function checkTwoResourcesIntersection(resource1, resource2) {
849
849
  var _resource1$metadata$c, _resource2$metadata$c;
@@ -2,12 +2,12 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol
2
2
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
3
3
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
4
4
  import dayjs from "dayjs";
5
- /**
6
- * 计算资源在指定时间段内的总可用时间(以分钟为单位)
7
- * @param resource 需要计算可用时间的资源
8
- * @param timeSlots 要检查可用性的时间段
9
- * @param currentCapacity 当前预约所需的容量
10
- * @returns 总可用时间(分钟)
5
+ /**
6
+ * 计算资源在指定时间段内的总可用时间(以分钟为单位)
7
+ * @param resource 需要计算可用时间的资源
8
+ * @param timeSlots 要检查可用性的时间段
9
+ * @param currentCapacity 当前预约所需的容量
10
+ * @returns 总可用时间(分钟)
11
11
  */
12
12
  export function calculateResourceAvailableTime(_ref) {
13
13
  var resource = _ref.resource,
@@ -79,12 +79,12 @@ export function calculateResourceAvailableTime(_ref) {
79
79
  return totalAvailableMinutes;
80
80
  }
81
81
 
82
- /**
83
- * 查找最快可用的资源,如果有多个资源在相同时间点可用,则选择空闲时间最长的资源
84
- * @param resources 资源列表
85
- * @param currentCapacity 当前预约所需的容量
86
- * @param countMap 已预约数量映射
87
- * @returns 最快可用的资源
82
+ /**
83
+ * 查找最快可用的资源,如果有多个资源在相同时间点可用,则选择空闲时间最长的资源
84
+ * @param resources 资源列表
85
+ * @param currentCapacity 当前预约所需的容量
86
+ * @param countMap 已预约数量映射
87
+ * @returns 最快可用的资源
88
88
  */
89
89
  export function findFastestAvailableResource(_ref2) {
90
90
  var resources = _ref2.resources,
@@ -208,14 +208,14 @@ export function findFastestAvailableResource(_ref2) {
208
208
  return selectedResource;
209
209
  }
210
210
 
211
- /**
212
- * 给定一个时间列表,通过开始和结束时间过滤出符合条件的时间段
213
- *
214
- * @export
215
- * @param {TimeSliceItem[]} times
216
- * @param {Dayjs} startTime
217
- * @param {Dayjs} endTime
218
- * @return {*}
211
+ /**
212
+ * 给定一个时间列表,通过开始和结束时间过滤出符合条件的时间段
213
+ *
214
+ * @export
215
+ * @param {TimeSliceItem[]} times
216
+ * @param {Dayjs} startTime
217
+ * @param {Dayjs} endTime
218
+ * @return {*}
219
219
  */
220
220
  export function filterConditionTimeSlots(times, startTime, endTime) {
221
221
  return times.filter(function (n) {
@@ -111,7 +111,7 @@ export declare class BookingTicketImpl extends BaseModule implements Module {
111
111
  * 获取当前的客户搜索条件
112
112
  * @returns 当前搜索条件
113
113
  */
114
- getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
114
+ getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
115
115
  /**
116
116
  * 获取客户列表状态(包含滚动加载相关状态)
117
117
  * @returns 客户状态