@pisell/pisellos 0.0.220 → 0.0.222
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +180 -180
- package/dist/core/index.js +4 -4
- package/dist/index.js +3 -3
- package/dist/modules/Account/types.js +6 -6
- package/dist/modules/AccountList/index.js +14 -14
- package/dist/modules/AccountList/types.js +14 -14
- package/dist/modules/AccountList/utils.js +5 -5
- package/dist/modules/Cart/index.js +35 -35
- package/dist/modules/Cart/types.js +14 -14
- package/dist/modules/Cart/utils/cartAccount.js +8 -8
- package/dist/modules/Cart/utils/cartDate.js +12 -12
- package/dist/modules/Cart/utils/cartDiscount.js +8 -8
- package/dist/modules/Cart/utils/cartNote.js +8 -8
- package/dist/modules/Cart/utils/cartProduct.js +39 -39
- package/dist/modules/Cart/utils/cartRelationForms.js +8 -8
- package/dist/modules/Cart/utils/cartResource.js +8 -8
- package/dist/modules/Cart/utils/index.js +4 -4
- package/dist/modules/Customer/index.js +67 -67
- package/dist/modules/Customer/types.js +18 -18
- package/dist/modules/Date/types.js +6 -6
- package/dist/modules/Date/utils.js +25 -25
- package/dist/modules/Guests/types.js +8 -8
- package/dist/modules/Order/types.js +4 -4
- package/dist/modules/Order/utils.js +8 -8
- package/dist/modules/Payment/cash.js +2 -2
- package/dist/modules/Payment/eftpos.js +2 -2
- package/dist/modules/Payment/index.js +135 -135
- package/dist/modules/Payment/types.js +50 -50
- package/dist/modules/Payment/wallet.js +2 -2
- package/dist/modules/Product/index.js +22 -22
- package/dist/modules/Product/utils.js +12 -12
- package/dist/modules/ProductList/index.js +4 -4
- package/dist/modules/Resource/types.js +8 -8
- package/dist/modules/Resource/utils.js +14 -14
- package/dist/modules/Schedule/index.js +4 -4
- package/dist/modules/Schedule/utils.js +73 -73
- package/dist/modules/Step/index.js +18 -18
- package/dist/modules/Summary/index.js +4 -4
- package/dist/modules/Summary/utils.js +15 -15
- package/dist/plugins/app-types/app/app.d.ts +83 -83
- package/dist/plugins/app-types/app/const.d.ts +4 -4
- package/dist/plugins/app-types/app/index.d.ts +14 -14
- package/dist/plugins/app-types/applicationManager/application.d.ts +50 -50
- package/dist/plugins/app-types/applicationManager/index.d.ts +13 -13
- package/dist/plugins/app-types/config.d.ts +3 -3
- package/dist/plugins/app-types/cookie/index.d.ts +13 -13
- package/dist/plugins/app-types/data/index.d.ts +8 -8
- package/dist/plugins/app-types/history/config.d.ts +24 -24
- package/dist/plugins/app-types/history/index.d.ts +20 -20
- package/dist/plugins/app-types/history/type.d.ts +2 -2
- package/dist/plugins/app-types/hooks/index.d.ts +12 -12
- package/dist/plugins/app-types/hooks/useDelayedValue/index.d.ts +2 -2
- package/dist/plugins/app-types/hooks/useDispatch/index.d.ts +2 -2
- package/dist/plugins/app-types/hooks/useLowCode/index.d.ts +13 -13
- package/dist/plugins/app-types/hooks/useStore/index.d.ts +6 -6
- package/dist/plugins/app-types/index.d.ts +6 -6
- package/dist/plugins/app-types/indexDB/index.d.ts +178 -178
- package/dist/plugins/app-types/locales/en.d.ts +3 -3
- package/dist/plugins/app-types/locales/index.d.ts +37 -37
- package/dist/plugins/app-types/locales/original.d.ts +3 -3
- package/dist/plugins/app-types/locales/type.d.ts +19 -19
- package/dist/plugins/app-types/locales/zh-CN.d.ts +3 -3
- package/dist/plugins/app-types/locales/zh-HK.d.ts +3 -3
- package/dist/plugins/app-types/logger/feishu.d.ts +11 -11
- package/dist/plugins/app-types/logger/index.d.ts +122 -122
- package/dist/plugins/app-types/menuManager/hooks.d.ts +17 -17
- package/dist/plugins/app-types/menuManager/index.d.ts +28 -28
- package/dist/plugins/app-types/models/global.d.ts +32 -32
- package/dist/plugins/app-types/models/index.d.ts +45 -45
- package/dist/plugins/app-types/models/type.d.ts +2 -2
- package/dist/plugins/app-types/package.json +14 -14
- package/dist/plugins/app-types/pubsub/example.d.ts +5 -5
- package/dist/plugins/app-types/pubsub/index.d.ts +63 -63
- package/dist/plugins/app-types/request/cache.d.ts +46 -46
- package/dist/plugins/app-types/request/cancelToken.d.ts +38 -38
- package/dist/plugins/app-types/request/config.d.ts +3 -3
- package/dist/plugins/app-types/request/constants.d.ts +2 -2
- package/dist/plugins/app-types/request/index.d.ts +24 -24
- package/dist/plugins/app-types/request/pisell2Request.d.ts +6 -6
- package/dist/plugins/app-types/request/type.d.ts +41 -41
- package/dist/plugins/app-types/request/utils.d.ts +46 -46
- package/dist/plugins/app-types/routes/config.d.ts +7 -7
- package/dist/plugins/app-types/routes/index.d.ts +28 -28
- package/dist/plugins/app-types/socket/components/SocketMonitorPage.d.ts +6 -6
- package/dist/plugins/app-types/socket/components/index.d.ts +2 -2
- package/dist/plugins/app-types/socket/constants.d.ts +33 -33
- package/dist/plugins/app-types/socket/events.d.ts +31 -31
- package/dist/plugins/app-types/socket/heartbeat.d.ts +66 -66
- package/dist/plugins/app-types/socket/index.d.ts +61 -61
- package/dist/plugins/app-types/socket/monitor.d.ts +169 -169
- package/dist/plugins/app-types/socket/reconnect.d.ts +61 -61
- package/dist/plugins/app-types/socket/socket.d.ts +129 -129
- package/dist/plugins/app-types/socket/types.d.ts +85 -85
- package/dist/plugins/app-types/storage/index.d.ts +17 -17
- package/dist/plugins/app-types/tasks/index.d.ts +77 -77
- package/dist/plugins/app-types/tasks/type.d.ts +62 -62
- package/dist/plugins/app-types/tasks/useTasks.d.ts +5 -5
- package/dist/plugins/app-types/type.d.ts +2 -2
- package/dist/plugins/app-types/variables/VariablesProvider.d.ts +7 -7
- package/dist/plugins/app-types/variables/config.d.ts +3 -3
- package/dist/plugins/app-types/variables/index.d.ts +6 -6
- package/dist/plugins/app-types/variables/type.d.ts +2 -2
- package/dist/plugins/app-types/website/index.d.ts +6 -6
- package/dist/plugins/request.js +33 -33
- package/dist/plugins/window.js +16 -16
- package/dist/solution/BookingByStep/index.js +126 -126
- package/dist/solution/BookingByStep/utils/capacity.js +30 -30
- package/dist/solution/BookingByStep/utils/products.js +4 -4
- package/dist/solution/BookingByStep/utils/resources.js +146 -146
- package/dist/solution/BookingByStep/utils/timeslots.js +20 -20
- package/dist/solution/BookingTicket/index.d.ts +13 -1
- package/dist/solution/BookingTicket/index.js +109 -86
- package/dist/solution/BookingTicket/types.js +8 -8
- package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +6 -6
- package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +1 -4
- package/dist/solution/BookingTicket/utils/scan/handleScan.js +20 -28
- package/dist/solution/BookingTicket/utils/scan/index.d.ts +13 -0
- package/dist/solution/BookingTicket/utils/scan/index.js +64 -21
- package/dist/solution/BookingTicket/utils/scan/scanCache.js +52 -52
- package/dist/solution/BuyTickets/types.js +4 -4
- package/dist/utils/task.d.ts +5 -1
- package/dist/utils/task.js +22 -38
- package/dist/utils/watch.d.ts +1 -1
- package/dist/utils/watch.js +60 -60
- package/lib/plugins/app-types/app/app.d.ts +83 -83
- package/lib/plugins/app-types/app/const.d.ts +4 -4
- package/lib/plugins/app-types/app/index.d.ts +14 -14
- package/lib/plugins/app-types/applicationManager/application.d.ts +50 -50
- package/lib/plugins/app-types/applicationManager/index.d.ts +13 -13
- package/lib/plugins/app-types/config.d.ts +3 -3
- package/lib/plugins/app-types/cookie/index.d.ts +13 -13
- package/lib/plugins/app-types/data/index.d.ts +8 -8
- package/lib/plugins/app-types/history/config.d.ts +24 -24
- package/lib/plugins/app-types/history/index.d.ts +20 -20
- package/lib/plugins/app-types/history/type.d.ts +2 -2
- package/lib/plugins/app-types/hooks/index.d.ts +12 -12
- package/lib/plugins/app-types/hooks/useDelayedValue/index.d.ts +2 -2
- package/lib/plugins/app-types/hooks/useDispatch/index.d.ts +2 -2
- package/lib/plugins/app-types/hooks/useLowCode/index.d.ts +13 -13
- package/lib/plugins/app-types/hooks/useStore/index.d.ts +6 -6
- package/lib/plugins/app-types/index.d.ts +6 -6
- package/lib/plugins/app-types/indexDB/index.d.ts +178 -178
- package/lib/plugins/app-types/locales/en.d.ts +3 -3
- package/lib/plugins/app-types/locales/index.d.ts +37 -37
- package/lib/plugins/app-types/locales/original.d.ts +3 -3
- package/lib/plugins/app-types/locales/type.d.ts +19 -19
- package/lib/plugins/app-types/locales/zh-CN.d.ts +3 -3
- package/lib/plugins/app-types/locales/zh-HK.d.ts +3 -3
- package/lib/plugins/app-types/logger/feishu.d.ts +11 -11
- package/lib/plugins/app-types/logger/index.d.ts +122 -122
- package/lib/plugins/app-types/menuManager/hooks.d.ts +17 -17
- package/lib/plugins/app-types/menuManager/index.d.ts +28 -28
- package/lib/plugins/app-types/models/global.d.ts +32 -32
- package/lib/plugins/app-types/models/index.d.ts +45 -45
- package/lib/plugins/app-types/models/type.d.ts +2 -2
- package/lib/plugins/app-types/package.json +14 -14
- package/lib/plugins/app-types/pubsub/example.d.ts +5 -5
- package/lib/plugins/app-types/pubsub/index.d.ts +63 -63
- package/lib/plugins/app-types/request/cache.d.ts +46 -46
- package/lib/plugins/app-types/request/cancelToken.d.ts +38 -38
- package/lib/plugins/app-types/request/config.d.ts +3 -3
- package/lib/plugins/app-types/request/constants.d.ts +2 -2
- package/lib/plugins/app-types/request/index.d.ts +24 -24
- package/lib/plugins/app-types/request/pisell2Request.d.ts +6 -6
- package/lib/plugins/app-types/request/type.d.ts +41 -41
- package/lib/plugins/app-types/request/utils.d.ts +46 -46
- package/lib/plugins/app-types/routes/config.d.ts +7 -7
- package/lib/plugins/app-types/routes/index.d.ts +28 -28
- package/lib/plugins/app-types/socket/components/SocketMonitorPage.d.ts +6 -6
- package/lib/plugins/app-types/socket/components/index.d.ts +2 -2
- package/lib/plugins/app-types/socket/constants.d.ts +33 -33
- package/lib/plugins/app-types/socket/events.d.ts +31 -31
- package/lib/plugins/app-types/socket/heartbeat.d.ts +66 -66
- package/lib/plugins/app-types/socket/index.d.ts +61 -61
- package/lib/plugins/app-types/socket/monitor.d.ts +169 -169
- package/lib/plugins/app-types/socket/reconnect.d.ts +61 -61
- package/lib/plugins/app-types/socket/socket.d.ts +129 -129
- package/lib/plugins/app-types/socket/types.d.ts +85 -85
- package/lib/plugins/app-types/storage/index.d.ts +17 -17
- package/lib/plugins/app-types/tasks/index.d.ts +77 -77
- package/lib/plugins/app-types/tasks/type.d.ts +62 -62
- package/lib/plugins/app-types/tasks/useTasks.d.ts +5 -5
- package/lib/plugins/app-types/type.d.ts +2 -2
- package/lib/plugins/app-types/variables/VariablesProvider.d.ts +7 -7
- package/lib/plugins/app-types/variables/config.d.ts +3 -3
- package/lib/plugins/app-types/variables/index.d.ts +6 -6
- package/lib/plugins/app-types/variables/type.d.ts +2 -2
- package/lib/plugins/app-types/website/index.d.ts +6 -6
- package/lib/solution/BookingTicket/index.d.ts +13 -1
- package/lib/solution/BookingTicket/index.js +19 -2
- package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +1 -4
- package/lib/solution/BookingTicket/utils/scan/handleScan.js +2 -14
- package/lib/solution/BookingTicket/utils/scan/index.d.ts +13 -0
- package/lib/solution/BookingTicket/utils/scan/index.js +32 -0
- package/lib/utils/task.d.ts +5 -1
- package/lib/utils/task.js +8 -1
- package/lib/utils/watch.d.ts +1 -1
- package/lib/utils/watch.js +1 -1
- package/package.json +1 -1
|
@@ -184,8 +184,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
184
184
|
return this.store.step.getStepList();
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
/**
|
|
188
|
-
* 添加step
|
|
187
|
+
/**
|
|
188
|
+
* 添加step
|
|
189
189
|
*/
|
|
190
190
|
}, {
|
|
191
191
|
key: "addStep",
|
|
@@ -193,8 +193,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
193
193
|
this.store.step.addStep(step, key);
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
/**
|
|
197
|
-
* 删除step
|
|
196
|
+
/**
|
|
197
|
+
* 删除step
|
|
198
198
|
*/
|
|
199
199
|
}, {
|
|
200
200
|
key: "removeStep",
|
|
@@ -202,8 +202,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
202
202
|
this.store.step.removeStep(key);
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
/**
|
|
206
|
-
* 更新step
|
|
205
|
+
/**
|
|
206
|
+
* 更新step
|
|
207
207
|
*/
|
|
208
208
|
}, {
|
|
209
209
|
key: "updateStep",
|
|
@@ -211,22 +211,22 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
211
211
|
this.store.step.updateStep(key, step);
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
/**
|
|
215
|
-
*
|
|
216
|
-
* 加载商品,然后导到商品列表里去
|
|
217
|
-
* @param {({
|
|
218
|
-
* category_ids?: number[];
|
|
219
|
-
* product_ids?: number[];
|
|
220
|
-
* collection?: number | string[];
|
|
221
|
-
* schedule_date?: string;
|
|
222
|
-
* })} {
|
|
223
|
-
* category_ids = [],
|
|
224
|
-
* product_ids = [],
|
|
225
|
-
* collection = [],
|
|
226
|
-
* schedule_date,
|
|
227
|
-
* }
|
|
228
|
-
* @return {*}
|
|
229
|
-
* @memberof BookingByStepImpl
|
|
214
|
+
/**
|
|
215
|
+
*
|
|
216
|
+
* 加载商品,然后导到商品列表里去
|
|
217
|
+
* @param {({
|
|
218
|
+
* category_ids?: number[];
|
|
219
|
+
* product_ids?: number[];
|
|
220
|
+
* collection?: number | string[];
|
|
221
|
+
* schedule_date?: string;
|
|
222
|
+
* })} {
|
|
223
|
+
* category_ids = [],
|
|
224
|
+
* product_ids = [],
|
|
225
|
+
* collection = [],
|
|
226
|
+
* schedule_date,
|
|
227
|
+
* }
|
|
228
|
+
* @return {*}
|
|
229
|
+
* @memberof BookingByStepImpl
|
|
230
230
|
*/
|
|
231
231
|
}, {
|
|
232
232
|
key: "loadProducts",
|
|
@@ -255,20 +255,20 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
255
255
|
}
|
|
256
256
|
return loadProducts;
|
|
257
257
|
}()
|
|
258
|
-
/**
|
|
259
|
-
* 通过 schedule 来读取商品,适用于 session 类商品
|
|
260
|
-
*
|
|
261
|
-
* @param {{
|
|
262
|
-
* date: string;
|
|
263
|
-
* product_ids?: number[];
|
|
264
|
-
* category_ids?: number[];
|
|
265
|
-
* }} {
|
|
266
|
-
* date,
|
|
267
|
-
* product_ids = [],
|
|
268
|
-
* category_ids = [],
|
|
269
|
-
* }
|
|
270
|
-
* @return {*}
|
|
271
|
-
* @memberof BookingByStepImpl
|
|
258
|
+
/**
|
|
259
|
+
* 通过 schedule 来读取商品,适用于 session 类商品
|
|
260
|
+
*
|
|
261
|
+
* @param {{
|
|
262
|
+
* date: string;
|
|
263
|
+
* product_ids?: number[];
|
|
264
|
+
* category_ids?: number[];
|
|
265
|
+
* }} {
|
|
266
|
+
* date,
|
|
267
|
+
* product_ids = [],
|
|
268
|
+
* category_ids = [],
|
|
269
|
+
* }
|
|
270
|
+
* @return {*}
|
|
271
|
+
* @memberof BookingByStepImpl
|
|
272
272
|
*/
|
|
273
273
|
)
|
|
274
274
|
}, {
|
|
@@ -335,11 +335,11 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
335
335
|
}
|
|
336
336
|
return loadProductByScheduleDate;
|
|
337
337
|
}()
|
|
338
|
-
/**
|
|
339
|
-
* 更新完商品数据、切换日期、或者在较后的流程里登录了,检测当前购物车里是否有商品,如果有,则需要更新购物车里的商品价格
|
|
340
|
-
*
|
|
341
|
-
* @param {string} date
|
|
342
|
-
* @memberof BookingByStepImpl
|
|
338
|
+
/**
|
|
339
|
+
* 更新完商品数据、切换日期、或者在较后的流程里登录了,检测当前购物车里是否有商品,如果有,则需要更新购物车里的商品价格
|
|
340
|
+
*
|
|
341
|
+
* @param {string} date
|
|
342
|
+
* @memberof BookingByStepImpl
|
|
343
343
|
*/
|
|
344
344
|
)
|
|
345
345
|
}, {
|
|
@@ -394,18 +394,18 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
394
394
|
}
|
|
395
395
|
return updateQuotationPriceAndCart;
|
|
396
396
|
}()
|
|
397
|
-
/**
|
|
398
|
-
* ui 层提供日期的起始范围,返回一个起始范围内日期的可用情况
|
|
399
|
-
* 适用于先选日期的流程,确定日期是否可用
|
|
400
|
-
* 已知问题:如果挂接的商品的资源不可用,后端是不会计算的
|
|
401
|
-
*
|
|
402
|
-
* @param {LoadScheduleAvailableDateParams} {
|
|
403
|
-
* startDate,
|
|
404
|
-
* endDate,
|
|
405
|
-
* custom_page_id,
|
|
406
|
-
* channel,
|
|
407
|
-
* }
|
|
408
|
-
* @memberof BookingByStepImpl
|
|
397
|
+
/**
|
|
398
|
+
* ui 层提供日期的起始范围,返回一个起始范围内日期的可用情况
|
|
399
|
+
* 适用于先选日期的流程,确定日期是否可用
|
|
400
|
+
* 已知问题:如果挂接的商品的资源不可用,后端是不会计算的
|
|
401
|
+
*
|
|
402
|
+
* @param {LoadScheduleAvailableDateParams} {
|
|
403
|
+
* startDate,
|
|
404
|
+
* endDate,
|
|
405
|
+
* custom_page_id,
|
|
406
|
+
* channel,
|
|
407
|
+
* }
|
|
408
|
+
* @memberof BookingByStepImpl
|
|
409
409
|
*/
|
|
410
410
|
)
|
|
411
411
|
}, {
|
|
@@ -591,9 +591,9 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
591
591
|
this.clearCartByAccount(id);
|
|
592
592
|
}
|
|
593
593
|
|
|
594
|
-
/**
|
|
595
|
-
* 获取holder类型账户列表
|
|
596
|
-
* @param params
|
|
594
|
+
/**
|
|
595
|
+
* 获取holder类型账户列表
|
|
596
|
+
* @param params
|
|
597
597
|
*/
|
|
598
598
|
}, {
|
|
599
599
|
key: "fetchHolderAccountsAsync",
|
|
@@ -774,8 +774,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
774
774
|
}
|
|
775
775
|
return getAvailableDate;
|
|
776
776
|
}()
|
|
777
|
-
/**
|
|
778
|
-
* 获取购物车汇总信息
|
|
777
|
+
/**
|
|
778
|
+
* 获取购物车汇总信息
|
|
779
779
|
*/
|
|
780
780
|
}, {
|
|
781
781
|
key: "getSummary",
|
|
@@ -802,8 +802,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
802
802
|
}
|
|
803
803
|
return getSummary;
|
|
804
804
|
}()
|
|
805
|
-
/**
|
|
806
|
-
* 获取协议
|
|
805
|
+
/**
|
|
806
|
+
* 获取协议
|
|
807
807
|
*/
|
|
808
808
|
)
|
|
809
809
|
}, {
|
|
@@ -941,10 +941,10 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
941
941
|
}
|
|
942
942
|
return getFreeProduct;
|
|
943
943
|
}()
|
|
944
|
-
/**
|
|
945
|
-
* 检查购物车提交订单前是否符合条件
|
|
946
|
-
* @param type 类型 "holder" | "account"
|
|
947
|
-
* @returns boolean
|
|
944
|
+
/**
|
|
945
|
+
* 检查购物车提交订单前是否符合条件
|
|
946
|
+
* @param type 类型 "holder" | "account"
|
|
947
|
+
* @returns boolean
|
|
948
948
|
*/
|
|
949
949
|
}, {
|
|
950
950
|
key: "checkBeforeSubmitOrder",
|
|
@@ -1091,12 +1091,12 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1091
1091
|
}
|
|
1092
1092
|
return getOtherParams;
|
|
1093
1093
|
}()
|
|
1094
|
-
/**
|
|
1095
|
-
* 往购物车加商品数据(duration 类、普通商品)
|
|
1096
|
-
* 老接口,先不删,怕 UI 有问题,直接桥接到新接口addProductToCart上
|
|
1097
|
-
*
|
|
1098
|
-
* @param {ProductData} productData
|
|
1099
|
-
* @memberof BookingByStepImpl
|
|
1094
|
+
/**
|
|
1095
|
+
* 往购物车加商品数据(duration 类、普通商品)
|
|
1096
|
+
* 老接口,先不删,怕 UI 有问题,直接桥接到新接口addProductToCart上
|
|
1097
|
+
*
|
|
1098
|
+
* @param {ProductData} productData
|
|
1099
|
+
* @memberof BookingByStepImpl
|
|
1100
1100
|
*/
|
|
1101
1101
|
}, {
|
|
1102
1102
|
key: "storeProduct",
|
|
@@ -1123,20 +1123,20 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1123
1123
|
}
|
|
1124
1124
|
return storeProduct;
|
|
1125
1125
|
}()
|
|
1126
|
-
/**
|
|
1127
|
-
* 往购物车加商品数据
|
|
1128
|
-
*
|
|
1129
|
-
* @param {({
|
|
1130
|
-
* product: ProductData;
|
|
1131
|
-
* date?: { startTime: string; endTime: string } | null;
|
|
1132
|
-
* account?: Account | null;
|
|
1133
|
-
* })} {
|
|
1134
|
-
* product,
|
|
1135
|
-
* date,
|
|
1136
|
-
* account,
|
|
1137
|
-
* }
|
|
1138
|
-
* @return {*}
|
|
1139
|
-
* @memberof BookingByStepImpl
|
|
1126
|
+
/**
|
|
1127
|
+
* 往购物车加商品数据
|
|
1128
|
+
*
|
|
1129
|
+
* @param {({
|
|
1130
|
+
* product: ProductData;
|
|
1131
|
+
* date?: { startTime: string; endTime: string } | null;
|
|
1132
|
+
* account?: Account | null;
|
|
1133
|
+
* })} {
|
|
1134
|
+
* product,
|
|
1135
|
+
* date,
|
|
1136
|
+
* account,
|
|
1137
|
+
* }
|
|
1138
|
+
* @return {*}
|
|
1139
|
+
* @memberof BookingByStepImpl
|
|
1140
1140
|
*/
|
|
1141
1141
|
)
|
|
1142
1142
|
}, {
|
|
@@ -1188,11 +1188,11 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1188
1188
|
this.store.cart.addItem(addItemParams);
|
|
1189
1189
|
}
|
|
1190
1190
|
|
|
1191
|
-
/**
|
|
1192
|
-
* 添加完购物车以后做的一些检测,比如日期是否在同一天
|
|
1193
|
-
*
|
|
1194
|
-
* @param {({ date?: { startTime: string; endTime: string } | null })} { date }
|
|
1195
|
-
* @memberof BookingByStepImpl
|
|
1191
|
+
/**
|
|
1192
|
+
* 添加完购物车以后做的一些检测,比如日期是否在同一天
|
|
1193
|
+
*
|
|
1194
|
+
* @param {({ date?: { startTime: string; endTime: string } | null })} { date }
|
|
1195
|
+
* @memberof BookingByStepImpl
|
|
1196
1196
|
*/
|
|
1197
1197
|
}, {
|
|
1198
1198
|
key: "addProductCheck",
|
|
@@ -1249,13 +1249,13 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1249
1249
|
this.updateCartCheck(params, targetCartItem);
|
|
1250
1250
|
}
|
|
1251
1251
|
|
|
1252
|
-
/**
|
|
1253
|
-
* 更新购物车以后的一些操作,比如检测资源是否重复,检测资源容量是否足够
|
|
1254
|
-
*
|
|
1255
|
-
* @param {IUpdateItemParams} params
|
|
1256
|
-
* @param {CartItem} targetCartItem
|
|
1257
|
-
* @return {*}
|
|
1258
|
-
* @memberof BookingByStepImpl
|
|
1252
|
+
/**
|
|
1253
|
+
* 更新购物车以后的一些操作,比如检测资源是否重复,检测资源容量是否足够
|
|
1254
|
+
*
|
|
1255
|
+
* @param {IUpdateItemParams} params
|
|
1256
|
+
* @param {CartItem} targetCartItem
|
|
1257
|
+
* @return {*}
|
|
1258
|
+
* @memberof BookingByStepImpl
|
|
1259
1259
|
*/
|
|
1260
1260
|
}, {
|
|
1261
1261
|
key: "updateCartCheck",
|
|
@@ -1362,8 +1362,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1362
1362
|
this.store.cart.clearCartByAccount(account_id);
|
|
1363
1363
|
}
|
|
1364
1364
|
|
|
1365
|
-
/**
|
|
1366
|
-
* 批量更新购物车
|
|
1365
|
+
/**
|
|
1366
|
+
* 批量更新购物车
|
|
1367
1367
|
*/
|
|
1368
1368
|
}, {
|
|
1369
1369
|
key: "batchUpdateCart",
|
|
@@ -1377,8 +1377,8 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1377
1377
|
this.store.cart.batchSetItems(cartItems);
|
|
1378
1378
|
}
|
|
1379
1379
|
|
|
1380
|
-
/**
|
|
1381
|
-
* 从购物车中按类别删除信息
|
|
1380
|
+
/**
|
|
1381
|
+
* 从购物车中按类别删除信息
|
|
1382
1382
|
*/
|
|
1383
1383
|
}, {
|
|
1384
1384
|
key: "deleteCartItemInfo",
|
|
@@ -1391,10 +1391,10 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1391
1391
|
return this.store.cart.checkCartItemByType(cartItem, type);
|
|
1392
1392
|
}
|
|
1393
1393
|
|
|
1394
|
-
/**
|
|
1395
|
-
* 检查购物车商品是否符合条件
|
|
1396
|
-
* @param type 类型
|
|
1397
|
-
* @returns 不符合条件的购物车商品ID列表
|
|
1394
|
+
/**
|
|
1395
|
+
* 检查购物车商品是否符合条件
|
|
1396
|
+
* @param type 类型
|
|
1397
|
+
* @returns 不符合条件的购物车商品ID列表
|
|
1398
1398
|
*/
|
|
1399
1399
|
}, {
|
|
1400
1400
|
key: "checkCartItems",
|
|
@@ -1561,11 +1561,11 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1561
1561
|
return arr;
|
|
1562
1562
|
}
|
|
1563
1563
|
|
|
1564
|
-
/**
|
|
1565
|
-
* 在日期那边点击下一步的时候,检查这一天购物车里的商品是不是都有资源可以用
|
|
1566
|
-
*
|
|
1567
|
-
* @return {*}
|
|
1568
|
-
* @memberof BookingByStepImpl
|
|
1564
|
+
/**
|
|
1565
|
+
* 在日期那边点击下一步的时候,检查这一天购物车里的商品是不是都有资源可以用
|
|
1566
|
+
*
|
|
1567
|
+
* @return {*}
|
|
1568
|
+
* @memberof BookingByStepImpl
|
|
1569
1569
|
*/
|
|
1570
1570
|
}, {
|
|
1571
1571
|
key: "checkResourceListForDate",
|
|
@@ -1581,12 +1581,12 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1581
1581
|
return hasResource;
|
|
1582
1582
|
}
|
|
1583
1583
|
|
|
1584
|
-
/**
|
|
1585
|
-
* 给单个购物车里的商品获取资源列表,给 UI 用的
|
|
1586
|
-
*
|
|
1587
|
-
* @param {(string | number)} id
|
|
1588
|
-
* @return {*}
|
|
1589
|
-
* @memberof BookingByStepImpl
|
|
1584
|
+
/**
|
|
1585
|
+
* 给单个购物车里的商品获取资源列表,给 UI 用的
|
|
1586
|
+
*
|
|
1587
|
+
* @param {(string | number)} id
|
|
1588
|
+
* @return {*}
|
|
1589
|
+
* @memberof BookingByStepImpl
|
|
1590
1590
|
*/
|
|
1591
1591
|
}, {
|
|
1592
1592
|
key: "getResourcesListByCartItem",
|
|
@@ -2522,13 +2522,13 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2522
2522
|
}
|
|
2523
2523
|
return getProductTypeById;
|
|
2524
2524
|
}()
|
|
2525
|
-
/**
|
|
2526
|
-
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
2527
|
-
*
|
|
2528
|
-
* @param {string} cartItemId
|
|
2529
|
-
* @param {string} resourceCode
|
|
2530
|
-
* @return {*}
|
|
2531
|
-
* @memberof BookingByStepImpl
|
|
2525
|
+
/**
|
|
2526
|
+
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
2527
|
+
*
|
|
2528
|
+
* @param {string} cartItemId
|
|
2529
|
+
* @param {string} resourceCode
|
|
2530
|
+
* @return {*}
|
|
2531
|
+
* @memberof BookingByStepImpl
|
|
2532
2532
|
*/
|
|
2533
2533
|
}, {
|
|
2534
2534
|
key: "getResourcesByCartItemAndCode",
|
|
@@ -2629,10 +2629,10 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
2629
2629
|
return targetResource.renderList;
|
|
2630
2630
|
}
|
|
2631
2631
|
|
|
2632
|
-
/**
|
|
2633
|
-
* 根据日期范围批量获取时间槽
|
|
2634
|
-
* @param params 参数对象
|
|
2635
|
-
* @returns Promise<Record<string, TimeSliceItem[]>> 返回日期到时间槽的映射
|
|
2632
|
+
/**
|
|
2633
|
+
* 根据日期范围批量获取时间槽
|
|
2634
|
+
* @param params 参数对象
|
|
2635
|
+
* @returns Promise<Record<string, TimeSliceItem[]>> 返回日期到时间槽的映射
|
|
2636
2636
|
*/
|
|
2637
2637
|
}, {
|
|
2638
2638
|
key: "getTimeslotsScheduleByDateRange",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
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
|
-
/**
|
|
5
|
-
* @title: 基于选择的商品格式化容量
|
|
6
|
-
* @description:
|
|
7
|
-
* @param {any} param1
|
|
8
|
-
* @return {*}
|
|
9
|
-
* @Author: zhiwei.Wang
|
|
4
|
+
/**
|
|
5
|
+
* @title: 基于选择的商品格式化容量
|
|
6
|
+
* @description:
|
|
7
|
+
* @param {any} param1
|
|
8
|
+
* @return {*}
|
|
9
|
+
* @Author: zhiwei.Wang
|
|
10
10
|
*/
|
|
11
11
|
export var formatDefaultCapacitys = function formatDefaultCapacitys(_ref) {
|
|
12
12
|
var capacity = _ref.capacity,
|
|
@@ -42,12 +42,12 @@ export var formatDefaultCapacitys = function formatDefaultCapacitys(_ref) {
|
|
|
42
42
|
}];
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
/**
|
|
46
|
-
* @title: 获取总容量
|
|
47
|
-
* @description:
|
|
48
|
-
* @param {object} capacity 为 formatDefaultCapacitys()的结果
|
|
49
|
-
* @return {*}
|
|
50
|
-
* @Author: zhiwei.Wang
|
|
45
|
+
/**
|
|
46
|
+
* @title: 获取总容量
|
|
47
|
+
* @description:
|
|
48
|
+
* @param {object} capacity 为 formatDefaultCapacitys()的结果
|
|
49
|
+
* @return {*}
|
|
50
|
+
* @Author: zhiwei.Wang
|
|
51
51
|
*/
|
|
52
52
|
export var getSumCapacity = function getSumCapacity(_ref2) {
|
|
53
53
|
var capacity = _ref2.capacity;
|
|
@@ -67,12 +67,12 @@ export var getSumCapacity = function getSumCapacity(_ref2) {
|
|
|
67
67
|
return sum;
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
-
/**
|
|
71
|
-
* 给定购物车数据,返回对应的 capacity 信息和套餐 capacity
|
|
72
|
-
*
|
|
73
|
-
* @export
|
|
74
|
-
* @param {CartItem} targetCartItem
|
|
75
|
-
* @return {*}
|
|
70
|
+
/**
|
|
71
|
+
* 给定购物车数据,返回对应的 capacity 信息和套餐 capacity
|
|
72
|
+
*
|
|
73
|
+
* @export
|
|
74
|
+
* @param {CartItem} targetCartItem
|
|
75
|
+
* @return {*}
|
|
76
76
|
*/
|
|
77
77
|
export function getCapacityInfoByCartItem(targetCartItem) {
|
|
78
78
|
var _targetCartItem$_prod;
|
|
@@ -89,12 +89,12 @@ export function getCapacityInfoByCartItem(targetCartItem) {
|
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
/**
|
|
93
|
-
* @title: 传入资源,如果有子资源,会根据组合资源的 capacity 计算修改子资源的 capacity
|
|
94
|
-
* @description:
|
|
95
|
-
* @param {object} resource
|
|
96
|
-
* @return {*}
|
|
97
|
-
* @Author: jinglin.tan
|
|
92
|
+
/**
|
|
93
|
+
* @title: 传入资源,如果有子资源,会根据组合资源的 capacity 计算修改子资源的 capacity
|
|
94
|
+
* @description:
|
|
95
|
+
* @param {object} resource
|
|
96
|
+
* @return {*}
|
|
97
|
+
* @Author: jinglin.tan
|
|
98
98
|
*/
|
|
99
99
|
export var checkSubResourcesCapacity = function checkSubResourcesCapacity(resource) {
|
|
100
100
|
if (resource.children && resource.children.length) {
|
|
@@ -116,12 +116,12 @@ export var checkSubResourcesCapacity = function checkSubResourcesCapacity(resour
|
|
|
116
116
|
}
|
|
117
117
|
};
|
|
118
118
|
|
|
119
|
-
/**
|
|
120
|
-
* 检查资源是否有足够的容量供额外使用
|
|
121
|
-
* @param currentCapacity - 当前已使用的容量
|
|
122
|
-
* @param requiredCapacity - 需要的额外容量
|
|
123
|
-
* @param maxCapacity - 最大允许容量
|
|
124
|
-
* @returns 如果资源可以容纳额外的容量则返回 true
|
|
119
|
+
/**
|
|
120
|
+
* 检查资源是否有足够的容量供额外使用
|
|
121
|
+
* @param currentCapacity - 当前已使用的容量
|
|
122
|
+
* @param requiredCapacity - 需要的额外容量
|
|
123
|
+
* @param maxCapacity - 最大允许容量
|
|
124
|
+
* @returns 如果资源可以容纳额外的容量则返回 true
|
|
125
125
|
*/
|
|
126
126
|
export var checkResourceCanUseByCapacity = function checkResourceCanUseByCapacity(currentCapacity, requiredCapacity, maxCapacity) {
|
|
127
127
|
// Handle edge cases early
|
|
@@ -4,10 +4,10 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
5
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
6
|
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; }
|
|
7
|
-
/**
|
|
8
|
-
* 获取商品的可用资源
|
|
9
|
-
* @param product 商品数据
|
|
10
|
-
* @returns 可用资源
|
|
7
|
+
/**
|
|
8
|
+
* 获取商品的可用资源
|
|
9
|
+
* @param product 商品数据
|
|
10
|
+
* @returns 可用资源
|
|
11
11
|
*/
|
|
12
12
|
export var getAvailableProductResources = function getAvailableProductResources(products) {
|
|
13
13
|
var rules = []; // 每个商品对应的预约规则
|