@pisell/pisellos 0.0.9 → 0.0.11
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/core/index.js +4 -1
- package/dist/effects/index.d.ts +1 -1
- package/dist/effects/index.js +3 -3
- package/dist/modules/Account/index.d.ts +5 -3
- package/dist/modules/Account/index.js +23 -36
- package/dist/modules/Account/types.d.ts +2 -1
- package/dist/modules/AccountList/index.d.ts +2 -0
- package/dist/modules/AccountList/index.js +34 -11
- package/dist/modules/Cart/index.d.ts +17 -11
- package/dist/modules/Cart/index.js +179 -121
- package/dist/modules/Cart/types.d.ts +98 -9
- package/dist/modules/Cart/types.js +8 -0
- package/dist/modules/Cart/utils.d.ts +114 -0
- package/dist/modules/Cart/utils.js +345 -0
- package/dist/modules/Date/index.d.ts +11 -12
- package/dist/modules/Date/index.js +104 -60
- package/dist/modules/Date/types.d.ts +51 -20
- package/dist/modules/Date/types.js +2 -5
- package/dist/modules/Date/utils.d.ts +35 -0
- package/dist/modules/Date/utils.js +211 -0
- package/dist/modules/Discount/index.d.ts +26 -0
- package/dist/modules/Discount/index.js +234 -0
- package/dist/modules/Discount/types.d.ts +66 -0
- package/dist/modules/Discount/types.js +5 -0
- package/dist/modules/Order/index.d.ts +16 -12
- package/dist/modules/Order/index.js +38 -166
- package/dist/modules/Order/types.d.ts +18 -41
- package/dist/modules/Order/types.js +0 -14
- package/dist/modules/Payment/index.d.ts +0 -2
- package/dist/modules/Payment/index.js +45 -76
- package/dist/modules/Payment/types.d.ts +0 -2
- package/dist/modules/Payment/types.js +2 -0
- package/dist/modules/Product/types.d.ts +50 -1
- package/dist/modules/ProductList/index.d.ts +1 -0
- package/dist/modules/ProductList/index.js +23 -2
- package/dist/modules/ProductList/types.d.ts +1 -0
- package/dist/modules/Resource/types.d.ts +6 -2
- package/dist/modules/Rules/index.d.ts +32 -0
- package/dist/modules/Rules/index.js +423 -0
- package/dist/modules/Rules/types.d.ts +46 -0
- package/dist/modules/Rules/types.js +5 -0
- package/dist/modules/Summary/index.d.ts +13 -0
- package/dist/modules/Summary/index.js +80 -0
- package/dist/modules/Summary/types.d.ts +13 -0
- package/dist/modules/Summary/types.js +1 -0
- package/dist/modules/Summary/utils.d.ts +19 -0
- package/dist/modules/Summary/utils.js +56 -0
- package/dist/plugins/index.d.ts +3 -2
- package/dist/plugins/index.js +2 -1
- package/dist/plugins/request.d.ts +4 -3
- package/dist/plugins/request.js +30 -30
- package/dist/plugins/shopStore.d.ts +4 -0
- package/dist/plugins/shopStore.js +1 -0
- package/dist/solution/BookingByStep/index.d.ts +73 -10
- package/dist/solution/BookingByStep/index.js +641 -74
- package/dist/solution/BookingByStep/types.d.ts +2 -0
- package/dist/solution/BookingByStep/types.js +11 -8
- package/dist/solution/BookingByStep/utils/products.d.ts +11 -0
- package/dist/solution/BookingByStep/utils/products.js +47 -0
- package/dist/solution/BookingByStep/utils/resources.d.ts +59 -10
- package/dist/solution/BookingByStep/utils/resources.js +144 -79
- package/dist/solution/ShopDiscount/index.d.ts +50 -0
- package/dist/solution/ShopDiscount/index.js +546 -0
- package/dist/solution/ShopDiscount/types.d.ts +24 -0
- package/dist/solution/ShopDiscount/types.js +10 -0
- package/dist/solution/ShopDiscount/utils.d.ts +1 -0
- package/dist/solution/ShopDiscount/utils.js +7 -0
- package/dist/solution/index.d.ts +1 -0
- package/dist/solution/index.js +2 -1
- package/lib/core/index.js +1 -1
- package/lib/effects/index.d.ts +1 -1
- package/lib/effects/index.js +1 -1
- package/lib/modules/Account/index.d.ts +5 -3
- package/lib/modules/Account/index.js +14 -3
- package/lib/modules/Account/types.d.ts +2 -1
- package/lib/modules/AccountList/index.d.ts +2 -0
- package/lib/modules/AccountList/index.js +17 -0
- package/lib/modules/Cart/index.d.ts +17 -11
- package/lib/modules/Cart/index.js +72 -21
- package/lib/modules/Cart/types.d.ts +98 -9
- package/lib/modules/Cart/utils.d.ts +114 -0
- package/lib/modules/Cart/utils.js +320 -0
- package/lib/modules/Date/index.d.ts +11 -12
- package/lib/modules/Date/index.js +50 -31
- package/lib/modules/Date/types.d.ts +51 -20
- package/lib/modules/Date/types.js +0 -4
- package/lib/modules/Date/utils.d.ts +35 -0
- package/lib/modules/Date/utils.js +167 -0
- package/lib/modules/Discount/index.d.ts +26 -0
- package/lib/modules/Discount/index.js +118 -0
- package/lib/modules/Discount/types.d.ts +66 -0
- package/lib/modules/Discount/types.js +33 -0
- package/lib/modules/Order/index.d.ts +16 -12
- package/lib/modules/Order/index.js +23 -51
- package/lib/modules/Order/types.d.ts +18 -41
- package/lib/modules/Payment/index.d.ts +0 -2
- package/lib/modules/Payment/index.js +6 -17
- package/lib/modules/Payment/types.d.ts +0 -2
- package/lib/modules/Product/types.d.ts +50 -1
- package/lib/modules/ProductList/index.d.ts +1 -0
- package/lib/modules/ProductList/index.js +6 -1
- package/lib/modules/ProductList/types.d.ts +1 -0
- package/lib/modules/Resource/types.d.ts +6 -2
- package/lib/modules/Rules/index.d.ts +32 -0
- package/lib/modules/Rules/index.js +283 -0
- package/lib/modules/Rules/types.d.ts +46 -0
- package/lib/modules/Rules/types.js +33 -0
- package/lib/modules/Summary/index.d.ts +13 -0
- package/lib/modules/Summary/index.js +49 -0
- package/lib/modules/Summary/types.d.ts +13 -0
- package/lib/modules/Summary/types.js +17 -0
- package/lib/modules/Summary/utils.d.ts +19 -0
- package/lib/modules/Summary/utils.js +79 -0
- package/lib/plugins/index.d.ts +3 -2
- package/lib/plugins/index.js +3 -1
- package/lib/plugins/request.d.ts +4 -3
- package/lib/plugins/request.js +4 -20
- package/lib/plugins/shopStore.d.ts +4 -0
- package/lib/plugins/shopStore.js +17 -0
- package/lib/solution/BookingByStep/index.d.ts +73 -10
- package/lib/solution/BookingByStep/index.js +452 -20
- package/lib/solution/BookingByStep/types.d.ts +2 -0
- package/lib/solution/BookingByStep/types.js +3 -0
- package/lib/solution/BookingByStep/utils/products.d.ts +11 -0
- package/lib/solution/BookingByStep/utils/products.js +60 -0
- package/lib/solution/BookingByStep/utils/resources.d.ts +59 -10
- package/lib/solution/BookingByStep/utils/resources.js +106 -49
- package/lib/solution/ShopDiscount/index.d.ts +50 -0
- package/lib/solution/ShopDiscount/index.js +321 -0
- package/lib/solution/ShopDiscount/types.d.ts +24 -0
- package/lib/solution/ShopDiscount/types.js +38 -0
- package/lib/solution/ShopDiscount/utils.d.ts +1 -0
- package/lib/solution/ShopDiscount/utils.js +32 -0
- package/lib/solution/index.d.ts +1 -0
- package/lib/solution/index.js +3 -1
- package/package.json +8 -7
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/modules/Summary/utils.ts
|
|
30
|
+
var utils_exports = {};
|
|
31
|
+
__export(utils_exports, {
|
|
32
|
+
calculatePriceDetails: () => calculatePriceDetails,
|
|
33
|
+
calculateSubtotal: () => calculateSubtotal,
|
|
34
|
+
calculateTaxFee: () => calculateTaxFee
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(utils_exports);
|
|
37
|
+
var import_decimal = __toESM(require("decimal.js"));
|
|
38
|
+
var calculatePriceDetails = (shopInfo, items) => {
|
|
39
|
+
const subtotal = new import_decimal.default(calculateSubtotal(items));
|
|
40
|
+
const totalTaxFee = new import_decimal.default(calculateTaxFee(shopInfo, items));
|
|
41
|
+
const total = (shopInfo == null ? void 0 : shopInfo.is_price_include_tax) ? subtotal : subtotal.plus(totalTaxFee);
|
|
42
|
+
return {
|
|
43
|
+
subtotal: subtotal.toFixed(2),
|
|
44
|
+
total: total.toFixed(2),
|
|
45
|
+
taxTitle: shopInfo == null ? void 0 : shopInfo.tax_title,
|
|
46
|
+
totalTaxFee: totalTaxFee.toFixed(2),
|
|
47
|
+
isPriceIncludeTax: shopInfo == null ? void 0 : shopInfo.is_price_include_tax
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
var calculateSubtotal = (items) => {
|
|
51
|
+
if (!(items == null ? void 0 : items.length)) {
|
|
52
|
+
return "0.00";
|
|
53
|
+
}
|
|
54
|
+
const subtotal = items.reduce((sum, item) => {
|
|
55
|
+
const price = new import_decimal.default(item.price || 0);
|
|
56
|
+
const quantity = new import_decimal.default(item.num || 1);
|
|
57
|
+
return sum.plus(price.times(quantity));
|
|
58
|
+
}, new import_decimal.default(0));
|
|
59
|
+
return subtotal.toFixed(2);
|
|
60
|
+
};
|
|
61
|
+
var calculateTaxFee = (shopInfo, items) => {
|
|
62
|
+
if (!(items == null ? void 0 : items.length)) {
|
|
63
|
+
return "0.00";
|
|
64
|
+
}
|
|
65
|
+
const { is_price_include_tax, tax_rate } = shopInfo || {};
|
|
66
|
+
const totalTaxFee = items.reduce((sum, item) => {
|
|
67
|
+
const price = new import_decimal.default(item.price || 0);
|
|
68
|
+
const taxRate = new import_decimal.default(tax_rate || 0).div(100);
|
|
69
|
+
const productTaxRate = price.times(taxRate).times((item == null ? void 0 : item.is_charge_tax) || 0).div(taxRate.times(is_price_include_tax || 0).plus(1));
|
|
70
|
+
return sum.plus(productTaxRate);
|
|
71
|
+
}, new import_decimal.default(0));
|
|
72
|
+
return totalTaxFee;
|
|
73
|
+
};
|
|
74
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
75
|
+
0 && (module.exports = {
|
|
76
|
+
calculatePriceDetails,
|
|
77
|
+
calculateSubtotal,
|
|
78
|
+
calculateTaxFee
|
|
79
|
+
});
|
package/lib/plugins/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./request";
|
|
2
|
+
export * from "./window";
|
|
3
|
+
export * from "./shopStore";
|
package/lib/plugins/index.js
CHANGED
|
@@ -18,8 +18,10 @@ var plugins_exports = {};
|
|
|
18
18
|
module.exports = __toCommonJS(plugins_exports);
|
|
19
19
|
__reExport(plugins_exports, require("./request"), module.exports);
|
|
20
20
|
__reExport(plugins_exports, require("./window"), module.exports);
|
|
21
|
+
__reExport(plugins_exports, require("./shopStore"), module.exports);
|
|
21
22
|
// Annotate the CommonJS export names for ESM import in node:
|
|
22
23
|
0 && (module.exports = {
|
|
23
24
|
...require("./request"),
|
|
24
|
-
...require("./window")
|
|
25
|
+
...require("./window"),
|
|
26
|
+
...require("./shopStore")
|
|
25
27
|
});
|
package/lib/plugins/request.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Plugin } from
|
|
1
|
+
import { Plugin } from "../types";
|
|
2
2
|
/**
|
|
3
3
|
* RequestPlugin 接口定义
|
|
4
4
|
*/
|
|
@@ -40,14 +40,15 @@ export interface RequestPlugin extends Plugin {
|
|
|
40
40
|
*/
|
|
41
41
|
export interface RequestOptions {
|
|
42
42
|
url?: string;
|
|
43
|
-
method?:
|
|
43
|
+
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
|
|
44
44
|
headers?: Record<string, string>;
|
|
45
45
|
data?: any;
|
|
46
46
|
body?: any;
|
|
47
47
|
params?: Record<string, string | number | boolean>;
|
|
48
48
|
timeout?: number;
|
|
49
|
-
responseType?:
|
|
49
|
+
responseType?: "json" | "text" | "arraybuffer" | "blob";
|
|
50
50
|
withCredentials?: boolean;
|
|
51
|
+
useCache?: boolean;
|
|
51
52
|
}
|
|
52
53
|
/**
|
|
53
54
|
* 响应接口
|
package/lib/plugins/request.js
CHANGED
|
@@ -148,10 +148,7 @@ var RequestPluginImpl = class {
|
|
|
148
148
|
try {
|
|
149
149
|
config = await Promise.resolve(interceptor(config));
|
|
150
150
|
} catch (error) {
|
|
151
|
-
const requestError = error instanceof RequestError ? error : new RequestError(
|
|
152
|
-
error instanceof Error ? error.message : "请求拦截器错误",
|
|
153
|
-
config
|
|
154
|
-
);
|
|
151
|
+
const requestError = error instanceof RequestError ? error : new RequestError(error instanceof Error ? error.message : "请求拦截器错误", config);
|
|
155
152
|
let processedError = requestError;
|
|
156
153
|
for (const errorInterceptor of this.interceptors.error) {
|
|
157
154
|
try {
|
|
@@ -169,12 +166,7 @@ var RequestPluginImpl = class {
|
|
|
169
166
|
try {
|
|
170
167
|
processedResponse = await Promise.resolve(interceptor(processedResponse));
|
|
171
168
|
} catch (error) {
|
|
172
|
-
const requestError = error instanceof RequestError ? error : new RequestError(
|
|
173
|
-
error instanceof Error ? error.message : "响应拦截器错误",
|
|
174
|
-
config,
|
|
175
|
-
null,
|
|
176
|
-
response
|
|
177
|
-
);
|
|
169
|
+
const requestError = error instanceof RequestError ? error : new RequestError(error instanceof Error ? error.message : "响应拦截器错误", config, null, response);
|
|
178
170
|
let processedError = requestError;
|
|
179
171
|
for (const errorInterceptor of this.interceptors.error) {
|
|
180
172
|
try {
|
|
@@ -187,10 +179,7 @@ var RequestPluginImpl = class {
|
|
|
187
179
|
}
|
|
188
180
|
return processedResponse.data;
|
|
189
181
|
} catch (error) {
|
|
190
|
-
const requestError = error instanceof RequestError ? error : new RequestError(
|
|
191
|
-
error instanceof Error ? error.message : "请求错误",
|
|
192
|
-
config
|
|
193
|
-
);
|
|
182
|
+
const requestError = error instanceof RequestError ? error : new RequestError(error instanceof Error ? error.message : "请求错误", config);
|
|
194
183
|
let processedError = requestError;
|
|
195
184
|
for (const errorInterceptor of this.interceptors.error) {
|
|
196
185
|
try {
|
|
@@ -275,12 +264,7 @@ var RequestPluginImpl = class {
|
|
|
275
264
|
config
|
|
276
265
|
};
|
|
277
266
|
if (!response.ok) {
|
|
278
|
-
throw new RequestError(
|
|
279
|
-
`请求失败,状态码: ${response.status}`,
|
|
280
|
-
config,
|
|
281
|
-
fetchOptions,
|
|
282
|
-
result
|
|
283
|
-
);
|
|
267
|
+
throw new RequestError(`请求失败,状态码: ${response.status}`, config, fetchOptions, result);
|
|
284
268
|
}
|
|
285
269
|
return result;
|
|
286
270
|
} finally {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
|
|
15
|
+
// src/plugins/shopStore.ts
|
|
16
|
+
var shopStore_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(shopStore_exports);
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import { Module, PisellCore } from "../../types";
|
|
2
2
|
import { BaseModule } from "../../modules/BaseModule";
|
|
3
3
|
import { BookingByStepState } from "./types";
|
|
4
|
+
import { IUpdateItemParams, ProductData } from "../../modules";
|
|
4
5
|
import { Account } from "../../modules/Account/types";
|
|
5
6
|
import { IStep } from "../../modules/Step/tyeps";
|
|
7
|
+
import { TimeSliceItem } from "./utils/resources";
|
|
8
|
+
import { ITime } from "../../modules/Date/types";
|
|
6
9
|
export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
7
10
|
protected defaultName: string;
|
|
8
11
|
protected defaultVersion: string;
|
|
9
12
|
isSolution: boolean;
|
|
10
13
|
private request;
|
|
11
14
|
private window;
|
|
15
|
+
private shopStore;
|
|
12
16
|
private store;
|
|
13
17
|
private otherParams;
|
|
14
18
|
initialize(core: PisellCore, options: any): Promise<void>;
|
|
@@ -18,21 +22,42 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
18
22
|
step: IStep;
|
|
19
23
|
};
|
|
20
24
|
next(): void;
|
|
25
|
+
back(): void;
|
|
26
|
+
gotoStep(index: number): void;
|
|
27
|
+
getStepList(): IStep[];
|
|
21
28
|
getStoreCart(key?: string): Promise<any>;
|
|
22
|
-
loadProducts({ category_ids, product_ids }: {
|
|
29
|
+
loadProducts({ category_ids, product_ids, collection, }: {
|
|
23
30
|
category_ids?: number[];
|
|
24
31
|
product_ids?: number[];
|
|
25
|
-
|
|
26
|
-
|
|
32
|
+
collection?: number | string[];
|
|
33
|
+
}): Promise<any>;
|
|
34
|
+
storeProduct(productData: ProductData): Promise<void>;
|
|
27
35
|
addAccount(accounts: Account[]): Promise<void>;
|
|
28
|
-
getAccounts(): Promise<
|
|
29
|
-
|
|
36
|
+
getAccounts(): Promise<(Account | null)[]>;
|
|
37
|
+
checkHasLoginAccount(): boolean;
|
|
38
|
+
setActiveAccount(id: string): void;
|
|
39
|
+
getActiveAccount(): Account | null;
|
|
40
|
+
removeAccount(id: string): void;
|
|
41
|
+
setDateRange(dateRange: ITime[]): Promise<void>;
|
|
30
42
|
getRangeDate(): Promise<string>;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
43
|
+
getCart(): Promise<import("../../modules").CartItem[]>;
|
|
44
|
+
getAvailableDate(params?: {
|
|
45
|
+
products?: ProductData[];
|
|
46
|
+
startDate?: string;
|
|
47
|
+
endDate?: string;
|
|
48
|
+
}): Promise<ITime[]>;
|
|
49
|
+
/**
|
|
50
|
+
* 获取购物车汇总信息
|
|
51
|
+
*/
|
|
52
|
+
getSummary(): Promise<{
|
|
53
|
+
subtotal: string | number;
|
|
54
|
+
total: string | number;
|
|
55
|
+
taxTitle?: string | undefined;
|
|
56
|
+
totalTaxFee?: string | number | undefined;
|
|
57
|
+
isPriceIncludeTax?: 0 | 1 | undefined;
|
|
58
|
+
}>;
|
|
59
|
+
getProducts(): Promise<ProductData[]>;
|
|
60
|
+
setLoginAccount(accountId: string, accountInfo: Account): Promise<void>;
|
|
36
61
|
generateCartData(): Promise<void>;
|
|
37
62
|
submitOrder(): Promise<void>;
|
|
38
63
|
pay(): Promise<void>;
|
|
@@ -41,4 +66,42 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
41
66
|
cover?: boolean;
|
|
42
67
|
}): Promise<void>;
|
|
43
68
|
getOtherParams(): Promise<Record<string, any>>;
|
|
69
|
+
updateCart(params: IUpdateItemParams): void;
|
|
70
|
+
deleteCart(product_id: string): void;
|
|
71
|
+
clearCart(): void;
|
|
72
|
+
clearCartByAccount(account_id: string): void;
|
|
73
|
+
destory(): void;
|
|
74
|
+
getResourcesList(): any[];
|
|
75
|
+
getResourceTimeSlot({ product, resources, currentResourceId, }: {
|
|
76
|
+
product: ProductData;
|
|
77
|
+
resources: any[];
|
|
78
|
+
currentResourceId: number;
|
|
79
|
+
}): TimeSliceItem[];
|
|
80
|
+
autoSelectResource({ resourceProductData, resources, timeSlots, }: {
|
|
81
|
+
resourceProductData: any;
|
|
82
|
+
resources: any[];
|
|
83
|
+
timeSlots?: TimeSliceItem;
|
|
84
|
+
}): {
|
|
85
|
+
selectedResource: any;
|
|
86
|
+
timeSlots?: undefined;
|
|
87
|
+
} | {
|
|
88
|
+
timeSlots: any[];
|
|
89
|
+
selectedResource: any;
|
|
90
|
+
} | undefined;
|
|
91
|
+
autoSelectAccountResources({ holder_id, resources_code, timeSlots, }: {
|
|
92
|
+
holder_id: string;
|
|
93
|
+
resources_code: string | number;
|
|
94
|
+
timeSlots?: TimeSliceItem;
|
|
95
|
+
}): {
|
|
96
|
+
selectedResource: any;
|
|
97
|
+
timeSlots?: undefined;
|
|
98
|
+
} | {
|
|
99
|
+
timeSlots: any[];
|
|
100
|
+
selectedResource: any;
|
|
101
|
+
} | undefined;
|
|
102
|
+
autoSelectAllProductResources(resources_code: string, timeSlots?: TimeSliceItem): {
|
|
103
|
+
errorList: any[];
|
|
104
|
+
};
|
|
105
|
+
getTimeSlotByAllResources(resources_code: string): any[];
|
|
106
|
+
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
44
107
|
}
|