@pisell/pisellos 0.0.320 → 0.0.324
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/dist/effects/index.d.ts +2 -2
- package/dist/modules/Customer/types.d.ts +1 -1
- package/dist/modules/Discount/index.d.ts +2 -0
- package/dist/modules/Discount/index.js +67 -35
- package/dist/modules/Discount/types.d.ts +5 -0
- package/dist/modules/Payment/types.d.ts +7 -7
- package/dist/modules/ProductList/index.js +2 -1
- package/dist/modules/Rules/types.d.ts +1 -1
- package/dist/modules/Schedule/type.d.ts +7 -7
- package/dist/modules/Schedule/types.d.ts +9 -9
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingByStep/utils/resources.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +1 -1
- package/dist/solution/ShopDiscount/index.d.ts +4 -0
- package/dist/solution/ShopDiscount/index.js +190 -101
- package/dist/solution/ShopDiscount/types.d.ts +5 -2
- package/dist/solution/ShopDiscount/utils.d.ts +48 -0
- package/dist/solution/ShopDiscount/utils.js +281 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/task.d.ts +2 -2
- package/dist/utils/watch.d.ts +2 -2
- package/lib/core/index.js +27 -28
- package/lib/effects/index.d.ts +2 -2
- package/lib/effects/index.js +3 -7
- package/lib/modules/Account/index.js +9 -10
- package/lib/modules/AccountList/index.js +14 -11
- package/lib/modules/BaseModule.js +6 -3
- package/lib/modules/Cart/index.js +14 -9
- package/lib/modules/Cart/utils/cartProduct.js +3 -6
- package/lib/modules/Customer/constants.js +1 -1
- package/lib/modules/Customer/index.js +18 -15
- package/lib/modules/Customer/types.d.ts +1 -1
- package/lib/modules/Date/index.js +10 -6
- package/lib/modules/Date/types.js +1 -0
- package/lib/modules/Discount/index.d.ts +2 -0
- package/lib/modules/Discount/index.js +28 -9
- package/lib/modules/Discount/types.d.ts +5 -0
- package/lib/modules/Guests/index.js +10 -15
- package/lib/modules/Order/index.js +11 -9
- package/lib/modules/Payment/cash.js +1 -1
- package/lib/modules/Payment/cashRecommendationAlgorithm.js +1 -1
- package/lib/modules/Payment/eftpos.js +1 -1
- package/lib/modules/Payment/index.js +80 -69
- package/lib/modules/Payment/types.d.ts +7 -7
- package/lib/modules/Payment/utils.js +3 -6
- package/lib/modules/Payment/walletpass.js +31 -31
- package/lib/modules/Product/index.js +6 -5
- package/lib/modules/ProductList/index.js +7 -4
- package/lib/modules/Resource/index.js +8 -12
- package/lib/modules/Rules/index.js +12 -17
- package/lib/modules/Rules/types.d.ts +1 -1
- package/lib/modules/Schedule/index.js +8 -5
- package/lib/modules/Schedule/type.d.ts +7 -7
- package/lib/modules/Schedule/types.d.ts +9 -9
- package/lib/modules/Schedule/utils.js +2 -4
- package/lib/modules/Step/index.js +7 -4
- package/lib/modules/Summary/index.js +9 -4
- package/lib/plugins/request.js +34 -33
- package/lib/plugins/window.js +101 -113
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingByStep/index.js +70 -104
- package/lib/solution/BookingByStep/utils/capacity.js +10 -15
- package/lib/solution/BookingByStep/utils/resources.d.ts +1 -1
- package/lib/solution/BookingByStep/utils/resources.js +4 -8
- package/lib/solution/BookingByStep/utils/stock.js +3 -6
- package/lib/solution/BookingByStep/utils/timeslots.js +24 -27
- package/lib/solution/BookingTicket/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.js +19 -14
- package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +3 -3
- package/lib/solution/BookingTicket/utils/scan/handleScan.js +6 -6
- package/lib/solution/BookingTicket/utils/scan/index.js +3 -1
- package/lib/solution/BookingTicket/utils/scan/scanCache.js +10 -9
- package/lib/solution/BuyTickets/index.js +15 -15
- package/lib/solution/Checkout/index.js +206 -199
- package/lib/solution/Checkout/utils/index.js +18 -22
- package/lib/solution/ShopDiscount/index.d.ts +4 -0
- package/lib/solution/ShopDiscount/index.js +59 -16
- package/lib/solution/ShopDiscount/types.d.ts +5 -2
- package/lib/solution/ShopDiscount/utils.d.ts +48 -0
- package/lib/solution/ShopDiscount/utils.js +172 -0
- package/lib/types/index.d.ts +1 -1
- package/lib/utils/task.d.ts +2 -2
- package/lib/utils/task.js +3 -3
- package/lib/utils/watch.d.ts +2 -2
- package/lib/utils/watch.js +5 -7
- package/package.json +1 -1
package/dist/effects/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
type EffectCallback = (payload: any) => void | Promise<void | {
|
|
1
|
+
declare type EffectCallback = (payload: any) => void | Promise<void | {
|
|
2
2
|
status: boolean;
|
|
3
3
|
message?: string;
|
|
4
4
|
}>;
|
|
5
|
-
type UnsubscribeFunction = () => void;
|
|
5
|
+
declare type UnsubscribeFunction = () => void;
|
|
6
6
|
declare class EffectsManager {
|
|
7
7
|
private listeners;
|
|
8
8
|
on(event: string, callback: EffectCallback): UnsubscribeFunction;
|
|
@@ -33,7 +33,7 @@ export interface ShopCustomer extends ICustomer {
|
|
|
33
33
|
* walletDetails.wallet: 用户所有wallet
|
|
34
34
|
* latestWalletDetail.wallet: 用户最新wallet
|
|
35
35
|
*/
|
|
36
|
-
type CustomerWith = 'formRecord' | 'walletDetails.wallet' | 'latestWalletDetail.wallet';
|
|
36
|
+
declare type CustomerWith = 'formRecord' | 'walletDetails.wallet' | 'latestWalletDetail.wallet';
|
|
37
37
|
/**
|
|
38
38
|
* 获取客户列表参数
|
|
39
39
|
*/
|
|
@@ -14,6 +14,8 @@ export declare class DiscountModule extends BaseModule implements Module, Discou
|
|
|
14
14
|
initialize(core: PisellCore, options?: ModuleOptions): Promise<void>;
|
|
15
15
|
setDiscountList(discountList: Discount[]): Promise<void>;
|
|
16
16
|
getDiscountList(): Discount[];
|
|
17
|
+
setOriginalDiscountList(originalDiscountList: Discount[]): Promise<void>;
|
|
18
|
+
getOriginalDiscountList(): Discount[];
|
|
17
19
|
loadPrepareConfig(params: {
|
|
18
20
|
action?: 'create';
|
|
19
21
|
with_good_pass: 0 | 1;
|
|
@@ -46,7 +46,7 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
46
46
|
key: "initialize",
|
|
47
47
|
value: function () {
|
|
48
48
|
var _initialize = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(core, options) {
|
|
49
|
-
var _options$initialState, _options$otherParams, _options$otherParams2;
|
|
49
|
+
var _options$initialState, _options$initialState2, _options$otherParams, _options$otherParams2;
|
|
50
50
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
51
51
|
while (1) switch (_context.prev = _context.next) {
|
|
52
52
|
case 0:
|
|
@@ -57,6 +57,11 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
57
57
|
} else {
|
|
58
58
|
this.store.discountList = [];
|
|
59
59
|
}
|
|
60
|
+
if (Array.isArray(options === null || options === void 0 || (_options$initialState2 = options.initialState) === null || _options$initialState2 === void 0 ? void 0 : _options$initialState2.originalDiscountList)) {
|
|
61
|
+
this.store.originalDiscountList = options === null || options === void 0 ? void 0 : options.initialState.originalDiscountList;
|
|
62
|
+
} else {
|
|
63
|
+
this.store.originalDiscountList = [];
|
|
64
|
+
}
|
|
60
65
|
if (options !== null && options !== void 0 && (_options$otherParams = options.otherParams) !== null && _options$otherParams !== void 0 && _options$otherParams.cacheId) {
|
|
61
66
|
this.openCache = options.otherParams.openCache;
|
|
62
67
|
this.cacheId = options.otherParams.cacheId;
|
|
@@ -69,17 +74,17 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
69
74
|
this.request = core.getPlugin('request');
|
|
70
75
|
this.window = core.getPlugin('window');
|
|
71
76
|
if (this.request) {
|
|
72
|
-
_context.next =
|
|
77
|
+
_context.next = 10;
|
|
73
78
|
break;
|
|
74
79
|
}
|
|
75
80
|
throw new Error('discount模块需要 request 插件支持');
|
|
76
|
-
case
|
|
81
|
+
case 10:
|
|
77
82
|
if (this.window) {
|
|
78
|
-
_context.next =
|
|
83
|
+
_context.next = 12;
|
|
79
84
|
break;
|
|
80
85
|
}
|
|
81
86
|
throw new Error('discount模块需要 window 插件支持');
|
|
82
|
-
case
|
|
87
|
+
case 12:
|
|
83
88
|
case "end":
|
|
84
89
|
return _context.stop();
|
|
85
90
|
}
|
|
@@ -116,28 +121,54 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
116
121
|
value: function getDiscountList() {
|
|
117
122
|
return this.store.discountList;
|
|
118
123
|
}
|
|
124
|
+
|
|
125
|
+
// 设置原始优惠券列表
|
|
126
|
+
}, {
|
|
127
|
+
key: "setOriginalDiscountList",
|
|
128
|
+
value: function () {
|
|
129
|
+
var _setOriginalDiscountList = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(originalDiscountList) {
|
|
130
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
131
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
132
|
+
case 0:
|
|
133
|
+
this.store.originalDiscountList = originalDiscountList;
|
|
134
|
+
case 1:
|
|
135
|
+
case "end":
|
|
136
|
+
return _context3.stop();
|
|
137
|
+
}
|
|
138
|
+
}, _callee3, this);
|
|
139
|
+
}));
|
|
140
|
+
function setOriginalDiscountList(_x4) {
|
|
141
|
+
return _setOriginalDiscountList.apply(this, arguments);
|
|
142
|
+
}
|
|
143
|
+
return setOriginalDiscountList;
|
|
144
|
+
}() // 获取原始优惠券列表
|
|
145
|
+
}, {
|
|
146
|
+
key: "getOriginalDiscountList",
|
|
147
|
+
value: function getOriginalDiscountList() {
|
|
148
|
+
return this.store.originalDiscountList || [];
|
|
149
|
+
}
|
|
119
150
|
}, {
|
|
120
151
|
key: "loadPrepareConfig",
|
|
121
152
|
value: function () {
|
|
122
|
-
var _loadPrepareConfig = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
153
|
+
var _loadPrepareConfig = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
|
|
123
154
|
var _prepareConfig$data, _prepareConfig$data2;
|
|
124
155
|
var prepareConfig, goodPassList;
|
|
125
|
-
return _regeneratorRuntime().wrap(function
|
|
126
|
-
while (1) switch (
|
|
156
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
157
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
127
158
|
case 0:
|
|
128
|
-
|
|
159
|
+
_context4.next = 2;
|
|
129
160
|
return this.request.post("/order/prepare/config", params);
|
|
130
161
|
case 2:
|
|
131
|
-
prepareConfig =
|
|
162
|
+
prepareConfig = _context4.sent;
|
|
132
163
|
goodPassList = this.filterEnabledDiscountList([].concat(_toConsumableArray((prepareConfig === null || prepareConfig === void 0 || (_prepareConfig$data = prepareConfig.data) === null || _prepareConfig$data === void 0 ? void 0 : _prepareConfig$data.good_pass_list) || []), _toConsumableArray((prepareConfig === null || prepareConfig === void 0 || (_prepareConfig$data2 = prepareConfig.data) === null || _prepareConfig$data2 === void 0 ? void 0 : _prepareConfig$data2.discount_card_list) || []))) || []; // this.setDiscountList(goodPassList);
|
|
133
|
-
return
|
|
164
|
+
return _context4.abrupt("return", goodPassList);
|
|
134
165
|
case 5:
|
|
135
166
|
case "end":
|
|
136
|
-
return
|
|
167
|
+
return _context4.stop();
|
|
137
168
|
}
|
|
138
|
-
},
|
|
169
|
+
}, _callee4, this);
|
|
139
170
|
}));
|
|
140
|
-
function loadPrepareConfig(
|
|
171
|
+
function loadPrepareConfig(_x5) {
|
|
141
172
|
return _loadPrepareConfig.apply(this, arguments);
|
|
142
173
|
}
|
|
143
174
|
return loadPrepareConfig;
|
|
@@ -145,12 +176,12 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
145
176
|
}, {
|
|
146
177
|
key: "batchSearch",
|
|
147
178
|
value: function () {
|
|
148
|
-
var _batchSearch = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
179
|
+
var _batchSearch = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(code, customerId) {
|
|
149
180
|
var result, resultDiscountList;
|
|
150
|
-
return _regeneratorRuntime().wrap(function
|
|
151
|
-
while (1) switch (
|
|
181
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
182
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
152
183
|
case 0:
|
|
153
|
-
|
|
184
|
+
_context5.next = 2;
|
|
154
185
|
return this.request.get("/machinecode/batch-search", {
|
|
155
186
|
code: code,
|
|
156
187
|
translate_flag: 1,
|
|
@@ -162,16 +193,16 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
162
193
|
order_behavior_count_customer_id: customerId || 1
|
|
163
194
|
});
|
|
164
195
|
case 2:
|
|
165
|
-
result =
|
|
196
|
+
result = _context5.sent;
|
|
166
197
|
resultDiscountList = this.filterEnabledDiscountList((result === null || result === void 0 ? void 0 : result.data) || []) || [];
|
|
167
|
-
return
|
|
198
|
+
return _context5.abrupt("return", resultDiscountList);
|
|
168
199
|
case 5:
|
|
169
200
|
case "end":
|
|
170
|
-
return
|
|
201
|
+
return _context5.stop();
|
|
171
202
|
}
|
|
172
|
-
},
|
|
203
|
+
}, _callee5, this);
|
|
173
204
|
}));
|
|
174
|
-
function batchSearch(
|
|
205
|
+
function batchSearch(_x6, _x7) {
|
|
175
206
|
return _batchSearch.apply(this, arguments);
|
|
176
207
|
}
|
|
177
208
|
return batchSearch;
|
|
@@ -276,21 +307,21 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
276
307
|
}, {
|
|
277
308
|
key: "destroy",
|
|
278
309
|
value: function () {
|
|
279
|
-
var _destroy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
280
|
-
return _regeneratorRuntime().wrap(function
|
|
281
|
-
while (1) switch (
|
|
310
|
+
var _destroy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
311
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
312
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
282
313
|
case 0:
|
|
283
314
|
this.store.discountList = [];
|
|
284
315
|
this.core.effects.offByModuleDestroy(this.name);
|
|
285
|
-
|
|
316
|
+
_context6.next = 4;
|
|
286
317
|
return this.core.effects.emit(DiscountHooks.OnDestroy, {});
|
|
287
318
|
case 4:
|
|
288
319
|
console.log('[Discount] 已销毁');
|
|
289
320
|
case 5:
|
|
290
321
|
case "end":
|
|
291
|
-
return
|
|
322
|
+
return _context6.stop();
|
|
292
323
|
}
|
|
293
|
-
},
|
|
324
|
+
}, _callee6, this);
|
|
294
325
|
}));
|
|
295
326
|
function destroy() {
|
|
296
327
|
return _destroy.apply(this, arguments);
|
|
@@ -300,17 +331,18 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
300
331
|
}, {
|
|
301
332
|
key: "clear",
|
|
302
333
|
value: function () {
|
|
303
|
-
var _clear = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
304
|
-
return _regeneratorRuntime().wrap(function
|
|
305
|
-
while (1) switch (
|
|
334
|
+
var _clear = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
335
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
336
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
306
337
|
case 0:
|
|
307
338
|
this.store.discountList = [];
|
|
339
|
+
this.store.originalDiscountList = [];
|
|
308
340
|
console.log('[Discount] clear');
|
|
309
|
-
case
|
|
341
|
+
case 3:
|
|
310
342
|
case "end":
|
|
311
|
-
return
|
|
343
|
+
return _context7.stop();
|
|
312
344
|
}
|
|
313
|
-
},
|
|
345
|
+
}, _callee7, this);
|
|
314
346
|
}));
|
|
315
347
|
function clear() {
|
|
316
348
|
return _clear.apply(this, arguments);
|
|
@@ -72,6 +72,7 @@ export interface Discount {
|
|
|
72
72
|
format_title: Formattitle;
|
|
73
73
|
metadata?: {
|
|
74
74
|
discount_card_type?: 'fixed_amount' | 'percent';
|
|
75
|
+
validity_type?: "custom_schedule_validity" | "fixed_validity";
|
|
75
76
|
};
|
|
76
77
|
product: Product;
|
|
77
78
|
type: "product" | 'good_pass';
|
|
@@ -98,9 +99,13 @@ export interface Discount {
|
|
|
98
99
|
week_order_behavior_count?: number;
|
|
99
100
|
month_order_behavior_count?: number;
|
|
100
101
|
customer_order_behavior_count?: number;
|
|
102
|
+
custom_schedule_snapshot?: {
|
|
103
|
+
data: any[];
|
|
104
|
+
};
|
|
101
105
|
}
|
|
102
106
|
export interface DiscountState {
|
|
103
107
|
discountList: Discount[];
|
|
108
|
+
originalDiscountList?: Discount[];
|
|
104
109
|
}
|
|
105
110
|
export interface DiscountModuleAPI {
|
|
106
111
|
setDiscountList: (discountList: Discount[]) => Promise<void>;
|
|
@@ -581,12 +581,12 @@ export declare enum PaymentHooks {
|
|
|
581
581
|
OnOrderAmountChanged = "payment:onOrderAmountChanged",
|
|
582
582
|
OnPaymentSyncError = "payment:onPaymentSyncError",
|
|
583
583
|
OnPaymentSyncSuccess = "payment:onPaymentSyncSuccess",
|
|
584
|
-
OnWalletRecommendListUpdated =
|
|
585
|
-
OnWalletRecommendListCleared =
|
|
586
|
-
OnUserIdentificationCodesUpdated =
|
|
587
|
-
OnUserIdentificationCodesCleared =
|
|
588
|
-
OnWalletCacheCleared =
|
|
589
|
-
OnSearchIdentificationCodeCompleted =
|
|
584
|
+
OnWalletRecommendListUpdated = 0,
|
|
585
|
+
OnWalletRecommendListCleared = 0,
|
|
586
|
+
OnUserIdentificationCodesUpdated = 0,
|
|
587
|
+
OnUserIdentificationCodesCleared = 0,
|
|
588
|
+
OnWalletCacheCleared = 0,
|
|
589
|
+
OnSearchIdentificationCodeCompleted = 0
|
|
590
590
|
}
|
|
591
591
|
/**
|
|
592
592
|
* 钱包推荐扣款请求参数
|
|
@@ -739,7 +739,7 @@ export interface SearchIdentificationCodeResponse {
|
|
|
739
739
|
/**
|
|
740
740
|
* 搜索识别码结果类型
|
|
741
741
|
*/
|
|
742
|
-
export type SearchIdentificationCodeResult = {
|
|
742
|
+
export declare type SearchIdentificationCodeResult = {
|
|
743
743
|
type: 'walletCode';
|
|
744
744
|
data: SearchIdentificationCodeItem[];
|
|
745
745
|
} | {
|
|
@@ -132,7 +132,8 @@ export var ProductList = /*#__PURE__*/function (_BaseModule) {
|
|
|
132
132
|
schedule_date: schedule_date,
|
|
133
133
|
with_schedule: with_schedule,
|
|
134
134
|
schedule_datetime: schedule_datetime,
|
|
135
|
-
application_code: (_this$otherParams = this.otherParams) === null || _this$otherParams === void 0 ? void 0 : _this$otherParams.channel
|
|
135
|
+
application_code: (_this$otherParams = this.otherParams) === null || _this$otherParams === void 0 ? void 0 : _this$otherParams.channel,
|
|
136
|
+
is_eject: 1
|
|
136
137
|
}, {
|
|
137
138
|
useCache: true
|
|
138
139
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ScheduleItem = {
|
|
1
|
+
export declare type ScheduleItem = {
|
|
2
2
|
/** 颜色 */
|
|
3
3
|
color: string;
|
|
4
4
|
/** 创建时间 */
|
|
@@ -65,7 +65,7 @@ export type ScheduleItem = {
|
|
|
65
65
|
schedule_id: number;
|
|
66
66
|
}[];
|
|
67
67
|
};
|
|
68
|
-
export type ScheduleFormOtherValue = {
|
|
68
|
+
export declare type ScheduleFormOtherValue = {
|
|
69
69
|
/** 截止模式
|
|
70
70
|
* 1: 永不截止
|
|
71
71
|
* 2: 按日期截止
|
|
@@ -79,11 +79,11 @@ export type ScheduleFormOtherValue = {
|
|
|
79
79
|
includeStatus: boolean;
|
|
80
80
|
type: 'standard' | 'time-slots' | 'designation';
|
|
81
81
|
};
|
|
82
|
-
export type ExcIncDate = {
|
|
82
|
+
export declare type ExcIncDate = {
|
|
83
83
|
start: string;
|
|
84
84
|
end: string;
|
|
85
85
|
};
|
|
86
|
-
export type ScheduleFormData = {
|
|
86
|
+
export declare type ScheduleFormData = {
|
|
87
87
|
/** 颜色 */
|
|
88
88
|
color: string;
|
|
89
89
|
/** 日程名称 */
|
|
@@ -131,20 +131,20 @@ export type ScheduleFormData = {
|
|
|
131
131
|
start_time: any;
|
|
132
132
|
end_time: any;
|
|
133
133
|
};
|
|
134
|
-
export type CalendarDataItem = {
|
|
134
|
+
export declare type CalendarDataItem = {
|
|
135
135
|
date: string;
|
|
136
136
|
color: string[];
|
|
137
137
|
isExcluded: boolean;
|
|
138
138
|
schedule_ids?: number[];
|
|
139
139
|
[key: string]: any;
|
|
140
140
|
};
|
|
141
|
-
export type RequestData<Data> = {
|
|
141
|
+
export declare type RequestData<Data> = {
|
|
142
142
|
data: Data;
|
|
143
143
|
status: boolean;
|
|
144
144
|
message: string;
|
|
145
145
|
code: number;
|
|
146
146
|
};
|
|
147
|
-
export type ResponseListData<Data> = {
|
|
147
|
+
export declare type ResponseListData<Data> = {
|
|
148
148
|
status: boolean;
|
|
149
149
|
message: string;
|
|
150
150
|
code: number;
|
|
@@ -4,7 +4,7 @@ export interface ScheduleState {
|
|
|
4
4
|
availabilityDateList: ScheduleAvailabilityDateItem[];
|
|
5
5
|
otherProductsIds: number[];
|
|
6
6
|
}
|
|
7
|
-
export type ScheduleAvailabilityDateItem = {
|
|
7
|
+
export declare type ScheduleAvailabilityDateItem = {
|
|
8
8
|
date: string;
|
|
9
9
|
schedule_id: number[];
|
|
10
10
|
product_ids: number[];
|
|
@@ -24,7 +24,7 @@ export interface LoadScheduleAvailableDateParams {
|
|
|
24
24
|
}
|
|
25
25
|
export interface ScheduleModuleAPI {
|
|
26
26
|
}
|
|
27
|
-
export type ScheduleItem = {
|
|
27
|
+
export declare type ScheduleItem = {
|
|
28
28
|
/** 颜色 */
|
|
29
29
|
color: string;
|
|
30
30
|
/** 创建时间 */
|
|
@@ -91,7 +91,7 @@ export type ScheduleItem = {
|
|
|
91
91
|
schedule_id: number;
|
|
92
92
|
}[];
|
|
93
93
|
};
|
|
94
|
-
export type ScheduleFormOtherValue = {
|
|
94
|
+
export declare type ScheduleFormOtherValue = {
|
|
95
95
|
/** 截止模式
|
|
96
96
|
* 1: 永不截止
|
|
97
97
|
* 2: 按日期截止
|
|
@@ -105,11 +105,11 @@ export type ScheduleFormOtherValue = {
|
|
|
105
105
|
includeStatus: boolean;
|
|
106
106
|
type: 'standard' | 'time-slots' | 'designation';
|
|
107
107
|
};
|
|
108
|
-
export type ExcIncDate = {
|
|
108
|
+
export declare type ExcIncDate = {
|
|
109
109
|
start: string;
|
|
110
110
|
end: string;
|
|
111
111
|
};
|
|
112
|
-
export type ScheduleFormData = {
|
|
112
|
+
export declare type ScheduleFormData = {
|
|
113
113
|
/** 颜色 */
|
|
114
114
|
color: string;
|
|
115
115
|
/** 日程名称 */
|
|
@@ -157,20 +157,20 @@ export type ScheduleFormData = {
|
|
|
157
157
|
start_time: any;
|
|
158
158
|
end_time: any;
|
|
159
159
|
};
|
|
160
|
-
export type CalendarDataItem = {
|
|
160
|
+
export declare type CalendarDataItem = {
|
|
161
161
|
date: string;
|
|
162
162
|
color: string[];
|
|
163
163
|
isExcluded: boolean;
|
|
164
164
|
schedule_ids?: number[];
|
|
165
165
|
[key: string]: any;
|
|
166
166
|
};
|
|
167
|
-
export type RequestData<Data> = {
|
|
167
|
+
export declare type RequestData<Data> = {
|
|
168
168
|
data: Data;
|
|
169
169
|
status: boolean;
|
|
170
170
|
message: string;
|
|
171
171
|
code: number;
|
|
172
172
|
};
|
|
173
|
-
export type ResponseListData<Data> = {
|
|
173
|
+
export declare type ResponseListData<Data> = {
|
|
174
174
|
status: boolean;
|
|
175
175
|
message: string;
|
|
176
176
|
code: number;
|
|
@@ -181,7 +181,7 @@ export type ResponseListData<Data> = {
|
|
|
181
181
|
skip: number;
|
|
182
182
|
};
|
|
183
183
|
};
|
|
184
|
-
export type ScheduleAllMap = Record<string, {
|
|
184
|
+
export declare type ScheduleAllMap = Record<string, {
|
|
185
185
|
minTime: dayjs.Dayjs | null;
|
|
186
186
|
maxTime: dayjs.Dayjs | null;
|
|
187
187
|
minTimeStr: string | null;
|
|
@@ -326,7 +326,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
326
326
|
};
|
|
327
327
|
setOtherData(key: string, value: any): void;
|
|
328
328
|
getOtherData(key: string): any;
|
|
329
|
-
getProductTypeById(id: number): Promise<"
|
|
329
|
+
getProductTypeById(id: number): Promise<"duration" | "session" | "normal">;
|
|
330
330
|
/**
|
|
331
331
|
* 提供给 UI 的方法,减轻 UI 层的计算压力,UI 层只需要传递 cartItemId 和 resourceCode 即返回对应的 renderList
|
|
332
332
|
*
|
|
@@ -6,7 +6,7 @@ import { CartItem, ProductData } from '../../../modules';
|
|
|
6
6
|
* 3. 格式化资源相关 格式化资源列表 --> 格式化资源 --> 获取时间切片列表 --> 判断单个时间切片是否可用 formatResources
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
|
-
type DateType = Dayjs;
|
|
9
|
+
declare type DateType = Dayjs;
|
|
10
10
|
export interface TimeSliceItem {
|
|
11
11
|
start_time: string;
|
|
12
12
|
end_time: string;
|
|
@@ -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, "
|
|
114
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
|
|
115
115
|
/**
|
|
116
116
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
117
117
|
* @returns 客户状态
|
|
@@ -18,6 +18,10 @@ export declare class ShopDiscountImpl extends BaseModule implements Module {
|
|
|
18
18
|
private initializePlugins;
|
|
19
19
|
private registerDependentModules;
|
|
20
20
|
private registerEventListeners;
|
|
21
|
+
setBookingTime(bookingTime: string | null): Promise<void>;
|
|
22
|
+
getCurrentBookingTime(): string | null;
|
|
23
|
+
private filterDiscountListByBookingTime;
|
|
24
|
+
private updateFilteredDiscountList;
|
|
21
25
|
setCustomer(customer: Customer): Promise<void>;
|
|
22
26
|
calcDiscount(productList: Record<string, any>[], options?: SetDiscountSelectedParams): {
|
|
23
27
|
productList: Record<string, any>[];
|