@pisell/private-materials 6.11.65 → 6.11.66
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/pro/skuDetailModal/index.js +2 -2
- package/lib/pro/skuDetailModal/index.js +3 -1
- package/package.json +1 -1
- package/es/components/booking/components/footer/amount.d.ts +0 -38
- package/es/components/booking/hooks/usePromotion.d.ts +0 -301
- package/es/components/booking/info/service/Lists.d.ts +0 -3
- package/es/components/booking/info2/service/editNormalService/index.d.ts +0 -3
- package/es/components/checkout/PaymentModal.d.ts +0 -40
- package/es/components/checkout/plugin.d.ts +0 -2
- package/es/components/list/hooks/useListState.d.ts +0 -46
- package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -4
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -4
- package/es/components/shoppingCart/hooks/usePromotionModal.d.ts +0 -21
- package/es/components/shoppingCart/type.d.ts +0 -59
- package/es/components/shoppingCart/utils.d.ts +0 -192
- package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -16
- package/lib/components/booking/components/footer/amount.d.ts +0 -38
- package/lib/components/booking/hooks/usePromotion.d.ts +0 -301
- package/lib/components/booking/info/service/Lists.d.ts +0 -3
- package/lib/components/booking/info2/service/editNormalService/index.d.ts +0 -3
- package/lib/components/checkout/PaymentModal.d.ts +0 -40
- package/lib/components/checkout/plugin.d.ts +0 -2
- package/lib/components/list/hooks/useListState.d.ts +0 -46
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -4
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -4
- package/lib/components/shoppingCart/hooks/usePromotionModal.d.ts +0 -21
- package/lib/components/shoppingCart/type.d.ts +0 -59
- package/lib/components/shoppingCart/utils.d.ts +0 -192
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +0 -16
|
@@ -262,7 +262,7 @@ var SkuDetailModal = function SkuDetailModal(_ref, ref) {
|
|
|
262
262
|
return {
|
|
263
263
|
open: function () {
|
|
264
264
|
var _open = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(data) {
|
|
265
|
-
var _skuDetailConfig$isSh, _skuDetailConfig$isSh2, _skuDetailConfig$exte, _skuDetailConfig$useC, _skuDetailConfig$cust, _skuDetailConfig$isCa, _data$_extend, _data$_extend2, _data$_extend3, _data$_extend4, _data$_extend5;
|
|
265
|
+
var _skuDetailConfig$isSh, _skuDetailConfig$isSh2, _skuDetailConfig$exte, _skuDetailConfig$useC, _skuDetailConfig$cust, _skuDetailConfig$isCa, _data$_extend, _data$_extend2, _data$_extend3, _data$_extend4, _data$_extend$priceOv, _data$_extend5;
|
|
266
266
|
var dataWithConfig, skuDetailConfig, config, _apiData, _data$productData, _apiData2, _apiData3, _apiData4, _apiData5, _apiData6, _apiData7, _ref5, _is_eject, _apiData8, _apiData9, _hydratedData$_extend2, open_deposit, productDetail, apiData, basePrice, _variantData, hydratedData, isEject, _hydratedData$_extend, _bookingState$booking7, stockResult, hydratedAny, _initialHasSkuOptions, _data, variantData, recordSkuValue, dataAny, initialHasSkuOptions;
|
|
267
267
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
268
268
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -416,7 +416,7 @@ var SkuDetailModal = function SkuDetailModal(_ref, ref) {
|
|
|
416
416
|
console.log(recordSkuValue, 'skuValue');
|
|
417
417
|
setSkuValue(recordSkuValue);
|
|
418
418
|
setSkuDefaultValue(recordSkuValue);
|
|
419
|
-
setPriceOverride((_data === null || _data === void 0 || (_data$_extend5 = _data._extend) === null || _data$_extend5 === void 0 ? void 0 : _data$_extend5.priceOverride)
|
|
419
|
+
setPriceOverride((_data$_extend$priceOv = _data === null || _data === void 0 || (_data$_extend5 = _data._extend) === null || _data$_extend5 === void 0 ? void 0 : _data$_extend5.priceOverride) !== null && _data$_extend$priceOv !== void 0 ? _data$_extend$priceOv : null);
|
|
420
420
|
// setPriceOverride(getInitialPriceOverrideFromProductData({ productData: _data }))
|
|
421
421
|
setShowPriceAdjustModal(false);
|
|
422
422
|
// 默认进入:有 SKU 选择则从 step1 开始;否则从 step0(详情)开始
|
|
@@ -310,7 +310,9 @@ var SkuDetailModal = ({ onConfirm, onRemove, onClose }, ref) => {
|
|
|
310
310
|
);
|
|
311
311
|
setSkuValue(recordSkuValue);
|
|
312
312
|
setSkuDefaultValue(recordSkuValue);
|
|
313
|
-
setPriceOverride(
|
|
313
|
+
setPriceOverride(
|
|
314
|
+
((_i2 = _data == null ? void 0 : _data._extend) == null ? void 0 : _i2.priceOverride) ?? null
|
|
315
|
+
);
|
|
314
316
|
setShowPriceAdjustModal(false);
|
|
315
317
|
const dataAny = _data;
|
|
316
318
|
const initialHasSkuOptions = Array.isArray(dataAny == null ? void 0 : dataAny.variant_group) && dataAny.variant_group.length > 0 || Array.isArray(dataAny == null ? void 0 : dataAny.option_group) && dataAny.option_group.length > 0 || Array.isArray(dataAny == null ? void 0 : dataAny.bundle_group) && dataAny.bundle_group.length > 0;
|
package/package.json
CHANGED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export declare const getRelationDetailsTotal: (relation_details: any) => number;
|
|
2
|
-
export declare const getProductDiscountProductDiscountDifference: (product: any) => any;
|
|
3
|
-
export declare const getIsPriceIncludeTax: (state: any) => any;
|
|
4
|
-
/**
|
|
5
|
-
* 总金额
|
|
6
|
-
* @param state
|
|
7
|
-
* @param options isEdit: 预约信息是否发生变动
|
|
8
|
-
* @returns
|
|
9
|
-
*/
|
|
10
|
-
export declare const getSumTotal: (state: any, options: {
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
isEdit: boolean;
|
|
13
|
-
ScheduleModule: any;
|
|
14
|
-
}) => {
|
|
15
|
-
productAmount: number;
|
|
16
|
-
duration: string;
|
|
17
|
-
tax: number;
|
|
18
|
-
taxInfo: {
|
|
19
|
-
title: any;
|
|
20
|
-
rate: any;
|
|
21
|
-
is_price_include_tax: any;
|
|
22
|
-
};
|
|
23
|
-
shopDiscount: number;
|
|
24
|
-
surcharge: any;
|
|
25
|
-
otherAmount: any;
|
|
26
|
-
sumTotalAmount: number;
|
|
27
|
-
paidAmount: any;
|
|
28
|
-
notPaidAmount: number;
|
|
29
|
-
paySurchargeFee: number;
|
|
30
|
-
expectAmount: number;
|
|
31
|
-
actualPaidAmount: any;
|
|
32
|
-
orderPaidAmount: any;
|
|
33
|
-
totalRefundAmount: number;
|
|
34
|
-
dueAmount: number;
|
|
35
|
-
roundingAmount: number;
|
|
36
|
-
originExpectAmount: number;
|
|
37
|
-
originExpectAmountWithoutDiscount: number;
|
|
38
|
-
};
|
|
@@ -1,301 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 赠品信息(evaluator 返回)
|
|
3
|
-
*/
|
|
4
|
-
interface GiftInfo {
|
|
5
|
-
strategyId: string;
|
|
6
|
-
strategyName: string | Record<string, string>;
|
|
7
|
-
giftCount: number;
|
|
8
|
-
giftOptions: Array<{
|
|
9
|
-
product_id: number;
|
|
10
|
-
product_variant_id: number;
|
|
11
|
-
}>;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* 扩展的赠品信息(包含触发赠品的主商品ID)
|
|
15
|
-
*/
|
|
16
|
-
interface ExtendedGiftInfo extends GiftInfo {
|
|
17
|
-
/** 触发此赠品的主商品 _id 列表 */
|
|
18
|
-
sourceProductIds: string[];
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* 赠品详情信息(放在 _extend._promotion.giftInfo)
|
|
22
|
-
*/
|
|
23
|
-
interface PromotionGiftDetail {
|
|
24
|
-
strategyName: string | Record<string, string>;
|
|
25
|
-
giftCount: number;
|
|
26
|
-
giftOptions: Array<{
|
|
27
|
-
product_id: number;
|
|
28
|
-
product_variant_id: number;
|
|
29
|
-
}>;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* 商品促销信息(整合后,放在 _extend._promotion)
|
|
33
|
-
*/
|
|
34
|
-
interface ProductPromotionInfo {
|
|
35
|
-
/** 策略ID */
|
|
36
|
-
strategyId: string;
|
|
37
|
-
/** 策略元数据 */
|
|
38
|
-
strategyMetadata?: any;
|
|
39
|
-
/** 是否参与促销 */
|
|
40
|
-
inPromotion: boolean;
|
|
41
|
-
/** 原始价格 */
|
|
42
|
-
originalPrice: number;
|
|
43
|
-
/** 最终价格 */
|
|
44
|
-
finalPrice: number;
|
|
45
|
-
/** 赠品信息(仅"买X送Y"促销的第一个商品有) */
|
|
46
|
-
giftInfo?: PromotionGiftDetail;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* 赠品商品上的标记信息(放在 _giftInfo)
|
|
50
|
-
*/
|
|
51
|
-
interface GiftProductInfo {
|
|
52
|
-
/** 关联策略ID */
|
|
53
|
-
strategyId: string;
|
|
54
|
-
/** 策略名称 */
|
|
55
|
-
strategyName: string | Record<string, string>;
|
|
56
|
-
/** 触发此赠品的主商品 _id 列表 */
|
|
57
|
-
sourceProductIds: string[];
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* 赠品减少操作项
|
|
61
|
-
*/
|
|
62
|
-
interface GiftReduceItem {
|
|
63
|
-
/** 赠品的 _id */
|
|
64
|
-
_id: string;
|
|
65
|
-
/** 当前数量 */
|
|
66
|
-
currentQuantity: number;
|
|
67
|
-
/** 目标数量(减少后的数量,不会是0,0的情况在toRemove处理) */
|
|
68
|
-
newQuantity: number;
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* 赠品操作类型
|
|
72
|
-
*/
|
|
73
|
-
interface GiftAction {
|
|
74
|
-
/** 需要添加的赠品 */
|
|
75
|
-
toAdd: Array<{
|
|
76
|
-
strategyId: string;
|
|
77
|
-
strategyName: string | Record<string, string>;
|
|
78
|
-
giftCount: number;
|
|
79
|
-
giftOptions: Array<{
|
|
80
|
-
product_id: number;
|
|
81
|
-
product_variant_id: number;
|
|
82
|
-
}>;
|
|
83
|
-
/** 触发此赠品的主商品 _id 列表 */
|
|
84
|
-
sourceProductIds: string[];
|
|
85
|
-
}>;
|
|
86
|
-
/** 需要减少数量的赠品(数量减少但不删除) */
|
|
87
|
-
toReduce: Array<{
|
|
88
|
-
strategyId: string;
|
|
89
|
-
/** 具体要操作的赠品列表 */
|
|
90
|
-
items: GiftReduceItem[];
|
|
91
|
-
}>;
|
|
92
|
-
/** 需要完全删除的赠品 _id 列表 */
|
|
93
|
-
toRemove: string[];
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* 促销计算结果
|
|
97
|
-
*/
|
|
98
|
-
/**
|
|
99
|
-
* 未满足促销条件的信息
|
|
100
|
-
*/
|
|
101
|
-
interface UnfulfilledPromotion {
|
|
102
|
-
/** 策略ID */
|
|
103
|
-
strategyId: string;
|
|
104
|
-
/** 活动名称 */
|
|
105
|
-
strategyName: string | Record<string, string>;
|
|
106
|
-
/** 促销类型(X_ITEMS_FOR_Y_PRICE / BUY_X_GET_Y_FREE) */
|
|
107
|
-
actionType: string;
|
|
108
|
-
/** 还需要买几件 */
|
|
109
|
-
needQuantity: number;
|
|
110
|
-
/** 当前已有几件 */
|
|
111
|
-
currentQuantity: number;
|
|
112
|
-
/** 促销需要的总件数 */
|
|
113
|
-
requiredQuantity: number;
|
|
114
|
-
/** 可以参与此促销的商品列表 */
|
|
115
|
-
eligibleProducts: Array<{
|
|
116
|
-
product_id: number;
|
|
117
|
-
product_variant_id: number;
|
|
118
|
-
}>;
|
|
119
|
-
/** 策略元数据 */
|
|
120
|
-
strategyMetadata?: any;
|
|
121
|
-
/** 展示配置 */
|
|
122
|
-
display?: {
|
|
123
|
-
text: string | Record<string, string>;
|
|
124
|
-
type: string;
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
interface PromotionResult {
|
|
128
|
-
/** 处理后的商品列表(不含赠品) */
|
|
129
|
-
products: any[];
|
|
130
|
-
/** 总优惠金额 */
|
|
131
|
-
totalDiscount: number;
|
|
132
|
-
/** 扩展的赠品信息(包含 sourceProductIds) */
|
|
133
|
-
gifts: ExtendedGiftInfo[];
|
|
134
|
-
/** 赠品操作(需要添加/减少/删除的赠品) */
|
|
135
|
-
giftActions: GiftAction;
|
|
136
|
-
/** 未满足促销条件的信息(用于展示"再买X件"提示) */
|
|
137
|
-
unfulfilledPromotions: UnfulfilledPromotion[];
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* 赠品选择回调参数
|
|
141
|
-
*/
|
|
142
|
-
interface GiftSelectionCallbackParams {
|
|
143
|
-
/** 策略ID */
|
|
144
|
-
strategyId: string;
|
|
145
|
-
/** 策略名称 */
|
|
146
|
-
strategyName: string | Record<string, string>;
|
|
147
|
-
/** 可选赠品列表 */
|
|
148
|
-
giftOptions: Array<{
|
|
149
|
-
product_id: number;
|
|
150
|
-
product_variant_id: number;
|
|
151
|
-
}>;
|
|
152
|
-
/** 可选数量 */
|
|
153
|
-
giftCount: number;
|
|
154
|
-
/** 触发此赠品的主商品 _id 列表 */
|
|
155
|
-
sourceProductIds: string[];
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* usePromotion 配置选项
|
|
159
|
-
*/
|
|
160
|
-
interface UsePromotionOptions {
|
|
161
|
-
/** 需要选择赠品时的回调 */
|
|
162
|
-
onGiftSelection?: (params: GiftSelectionCallbackParams) => void;
|
|
163
|
-
}
|
|
164
|
-
declare const usePromotion: (state?: any, dispatch?: any, options?: UsePromotionOptions) => {
|
|
165
|
-
run: () => void;
|
|
166
|
-
formatProductList: (list: any[]) => any[];
|
|
167
|
-
processPromotion: (list: any[]) => PromotionResult;
|
|
168
|
-
};
|
|
169
|
-
export default usePromotion;
|
|
170
|
-
/**
|
|
171
|
-
* 主商品的 _extend._promotion 结构示例
|
|
172
|
-
*
|
|
173
|
-
* @example
|
|
174
|
-
* ```typescript
|
|
175
|
-
* // 1. X件Y元促销 - 已满足条件
|
|
176
|
-
* {
|
|
177
|
-
* _extend: {
|
|
178
|
-
* _promotion: {
|
|
179
|
-
* strategyId: "strategy_1",
|
|
180
|
-
* strategyMetadata: { ... },
|
|
181
|
-
* inPromotion: true,
|
|
182
|
-
* originalPrice: 100,
|
|
183
|
-
* finalPrice: 80,
|
|
184
|
-
* }
|
|
185
|
-
* }
|
|
186
|
-
* }
|
|
187
|
-
*
|
|
188
|
-
* // 2. X件Y元促销 - 未满足条件(如买2件享优惠,当前只买了1件)
|
|
189
|
-
* // UI 可以展示"再买1件即可享受2件80元"等提示
|
|
190
|
-
* {
|
|
191
|
-
* _extend: {
|
|
192
|
-
* _promotion: {
|
|
193
|
-
* strategyId: "strategy_1",
|
|
194
|
-
* strategyMetadata: { ... },
|
|
195
|
-
* inPromotion: false, // 未满足条件
|
|
196
|
-
* originalPrice: 100,
|
|
197
|
-
* finalPrice: 100, // 价格不变
|
|
198
|
-
* }
|
|
199
|
-
* }
|
|
200
|
-
* }
|
|
201
|
-
*
|
|
202
|
-
* // 3. 买X送Y促销的第一个商品(有 giftInfo)
|
|
203
|
-
* {
|
|
204
|
-
* _extend: {
|
|
205
|
-
* _promotion: {
|
|
206
|
-
* strategyId: "strategy_2",
|
|
207
|
-
* strategyMetadata: { ... },
|
|
208
|
-
* inPromotion: true,
|
|
209
|
-
* originalPrice: 100,
|
|
210
|
-
* finalPrice: 100,
|
|
211
|
-
* giftInfo: {
|
|
212
|
-
* strategyName: "买3送1",
|
|
213
|
-
* giftCount: 1,
|
|
214
|
-
* giftOptions: [{ product_id: 123, product_variant_id: 0 }]
|
|
215
|
-
* }
|
|
216
|
-
* }
|
|
217
|
-
* }
|
|
218
|
-
* }
|
|
219
|
-
*
|
|
220
|
-
* // 4. 买X送Y促销的其他商品(无 giftInfo)
|
|
221
|
-
* {
|
|
222
|
-
* _extend: {
|
|
223
|
-
* _promotion: {
|
|
224
|
-
* strategyId: "strategy_2",
|
|
225
|
-
* strategyMetadata: { ... },
|
|
226
|
-
* inPromotion: true,
|
|
227
|
-
* originalPrice: 100,
|
|
228
|
-
* finalPrice: 100,
|
|
229
|
-
* }
|
|
230
|
-
* }
|
|
231
|
-
* }
|
|
232
|
-
*
|
|
233
|
-
* // 5. 无适用促销的商品
|
|
234
|
-
* // 没有 _promotion 字段
|
|
235
|
-
* {
|
|
236
|
-
* _extend: {
|
|
237
|
-
* // 无 _promotion 字段
|
|
238
|
-
* }
|
|
239
|
-
* }
|
|
240
|
-
* ```
|
|
241
|
-
*/
|
|
242
|
-
/**
|
|
243
|
-
* onGiftSelection 回调中如何构建赠品商品的示例
|
|
244
|
-
*
|
|
245
|
-
* @example
|
|
246
|
-
* ```tsx
|
|
247
|
-
* const { run, formatProductList, processPromotion } = usePromotion(state, dispatch, {
|
|
248
|
-
* onGiftSelection: async ({ strategyId, strategyName, giftOptions, giftCount, sourceProductIds }) => {
|
|
249
|
-
* // giftOptions 只包含 product_id 和 product_variant_id
|
|
250
|
-
* // 需要自行获取完整商品信息
|
|
251
|
-
*
|
|
252
|
-
* let selectedGiftOption = giftOptions[0]; // 默认选第一个
|
|
253
|
-
*
|
|
254
|
-
* // 如果有多个赠品选项,弹出选择弹窗
|
|
255
|
-
* if (giftOptions.length > 1) {
|
|
256
|
-
* selectedGiftOption = await showGiftSelectionModal(giftOptions);
|
|
257
|
-
* }
|
|
258
|
-
*
|
|
259
|
-
* // 获取完整商品信息(根据 product_id 和 product_variant_id)
|
|
260
|
-
* const productDetail = await fetchProductDetail(
|
|
261
|
-
* selectedGiftOption.product_id,
|
|
262
|
-
* selectedGiftOption.product_variant_id
|
|
263
|
-
* );
|
|
264
|
-
*
|
|
265
|
-
* // 构建赠品商品对象
|
|
266
|
-
* const giftProduct = {
|
|
267
|
-
* _id: generateStringId(), // 唯一标识
|
|
268
|
-
* _isGift: true, // 标记为赠品
|
|
269
|
-
* _giftInfo: { // 赠品关联信息(注意:赠品用 _giftInfo,主商品用 _extend._promotion)
|
|
270
|
-
* strategyId, // 策略ID
|
|
271
|
-
* strategyName, // 策略名称
|
|
272
|
-
* sourceProductIds, // 触发此赠品的主商品 _id 列表
|
|
273
|
-
* } as GiftProductInfo,
|
|
274
|
-
* _extend: {
|
|
275
|
-
* price: 0, // 赠品价格为0
|
|
276
|
-
* main_product_selling_price: 0,
|
|
277
|
-
* quantity: giftCount, // 赠品数量
|
|
278
|
-
* total: 0,
|
|
279
|
-
* origin_total: 0,
|
|
280
|
-
* product_name: productDetail.title,
|
|
281
|
-
* other: {
|
|
282
|
-
* product_id: selectedGiftOption.product_id,
|
|
283
|
-
* product_variant_id: selectedGiftOption.product_variant_id,
|
|
284
|
-
* },
|
|
285
|
-
* },
|
|
286
|
-
* // ... 其他商品基础信息从 productDetail 获取
|
|
287
|
-
* title: productDetail.title,
|
|
288
|
-
* price: productDetail.price, // 原价(用于展示划线价)
|
|
289
|
-
* // ...
|
|
290
|
-
* };
|
|
291
|
-
*
|
|
292
|
-
* // 添加到购物车
|
|
293
|
-
* dispatch({
|
|
294
|
-
* type: 'addService',
|
|
295
|
-
* payload: { value: giftProduct },
|
|
296
|
-
* });
|
|
297
|
-
* },
|
|
298
|
-
* });
|
|
299
|
-
* ```
|
|
300
|
-
*/
|
|
301
|
-
export type { GiftInfo, ExtendedGiftInfo, PromotionGiftDetail, ProductPromotionInfo, GiftProductInfo, GiftAction, GiftReduceItem, GiftSelectionCallbackParams, UsePromotionOptions, PromotionResult, UnfulfilledPromotion, };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
interface PaymentModalData {
|
|
4
|
-
order_info: any;
|
|
5
|
-
subtotal_info: {
|
|
6
|
-
subTotalList: any[];
|
|
7
|
-
orderTotalList: any[];
|
|
8
|
-
total: number;
|
|
9
|
-
showDetail: boolean;
|
|
10
|
-
};
|
|
11
|
-
total: any;
|
|
12
|
-
}
|
|
13
|
-
interface PaymentModalProps {
|
|
14
|
-
open?: boolean;
|
|
15
|
-
data?: PaymentModalData;
|
|
16
|
-
callback?: (result: any) => void;
|
|
17
|
-
onClose?: (reset?: boolean) => void;
|
|
18
|
-
paymentResultDisplayMode?: string;
|
|
19
|
-
shopDiscount?: number;
|
|
20
|
-
client?: any;
|
|
21
|
-
currentTotalPrice?: number;
|
|
22
|
-
config?: any;
|
|
23
|
-
onChangeShopDiscount?: (discount: string) => void;
|
|
24
|
-
onChangeOrderNote?: (note: string) => void;
|
|
25
|
-
onDeleteOrderNote?: () => void;
|
|
26
|
-
}
|
|
27
|
-
interface PaymentModalMainProps extends PaymentModalProps {
|
|
28
|
-
onClose?: (reset?: boolean) => void;
|
|
29
|
-
onSetLocalOrderId?: (order_id: number) => void;
|
|
30
|
-
setEditCartMode?: (order_id: number, payData: any, closeModal: boolean) => void;
|
|
31
|
-
editOrderId?: number;
|
|
32
|
-
config?: {
|
|
33
|
-
showHeaderCenter?: boolean;
|
|
34
|
-
showHeaderRightButton?: boolean;
|
|
35
|
-
disabledSwitchClient?: boolean;
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
declare const PaymentModal: React.FC<PaymentModalMainProps>;
|
|
39
|
-
export type { PaymentModalData, PaymentModalProps };
|
|
40
|
-
export default PaymentModal;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { TabItem, LoadDataParams } from '../types';
|
|
2
|
-
export interface ListState {
|
|
3
|
-
activeTab: string;
|
|
4
|
-
currentPage: number;
|
|
5
|
-
isStickyActive: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare type ListAction = {
|
|
8
|
-
type: 'SET_ACTIVE_TAB';
|
|
9
|
-
payload: string[] | string;
|
|
10
|
-
} | {
|
|
11
|
-
type: 'SET_CURRENT_PAGE';
|
|
12
|
-
payload: number;
|
|
13
|
-
} | {
|
|
14
|
-
type: 'SET_STICKY_ACTIVE';
|
|
15
|
-
payload: boolean;
|
|
16
|
-
} | {
|
|
17
|
-
type: 'RESET_PAGE';
|
|
18
|
-
};
|
|
19
|
-
export interface UseListStateProps {
|
|
20
|
-
/** 外部传入的当前页码 */
|
|
21
|
-
externalCurrentPage?: number;
|
|
22
|
-
/** tab数据 */
|
|
23
|
-
tabItems: TabItem[];
|
|
24
|
-
/** 默认页面大小 */
|
|
25
|
-
defaultPageSize: number;
|
|
26
|
-
/** 数据加载回调 */
|
|
27
|
-
onLoadData?: (params: LoadDataParams) => void;
|
|
28
|
-
/** tab样式 */
|
|
29
|
-
tabStyle: 'anchor' | 'switch' | 'none';
|
|
30
|
-
isTreeTab: boolean;
|
|
31
|
-
}
|
|
32
|
-
export interface UseListStateReturn {
|
|
33
|
-
state: ListState;
|
|
34
|
-
setActiveTab: (tab: string) => void;
|
|
35
|
-
setCurrentPage: (page: number) => void;
|
|
36
|
-
setStickyActive: (active: boolean) => void;
|
|
37
|
-
resetPage: () => void;
|
|
38
|
-
handleTabChange: (key: string[] | string) => void;
|
|
39
|
-
handlePageChange: (page: number, size?: number) => void;
|
|
40
|
-
handleShowSizeChange: (current: number, size: number) => void;
|
|
41
|
-
handleLoadMore: () => void;
|
|
42
|
-
handleViewLess: () => void;
|
|
43
|
-
handleScrollLoad: () => void;
|
|
44
|
-
actualCurrentPage: number;
|
|
45
|
-
}
|
|
46
|
-
export declare const useListState: ({ externalCurrentPage, tabItems, defaultPageSize, onLoadData, tabStyle, isTreeTab, }: UseListStateProps) => UseListStateReturn;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface UsePromotionModalOptions {
|
|
3
|
-
/** 确认回调 */
|
|
4
|
-
onConfirm?: (selectedProduct: any) => void;
|
|
5
|
-
/** 取消回调 */
|
|
6
|
-
onCancel?: () => void;
|
|
7
|
-
}
|
|
8
|
-
export declare const usePromotionModal: (options?: UsePromotionModalOptions) => {
|
|
9
|
-
/** 打开弹窗方法 */
|
|
10
|
-
openModal: (item: any) => void;
|
|
11
|
-
/** 关闭弹窗方法 */
|
|
12
|
-
closeModal: () => void;
|
|
13
|
-
/** Modal 组件 */
|
|
14
|
-
MarketingModal: JSX.Element;
|
|
15
|
-
/** 规格选择弹窗组件 */
|
|
16
|
-
SkuModal: JSX.Element;
|
|
17
|
-
/** 当前选中的商品 ID */
|
|
18
|
-
selected: any;
|
|
19
|
-
/** 弹窗是否打开 */
|
|
20
|
-
isOpen: boolean;
|
|
21
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { CollapseProps } from 'antd';
|
|
2
|
-
export interface productProps {
|
|
3
|
-
hideAddBtn?: boolean;
|
|
4
|
-
isShowNote?: boolean;
|
|
5
|
-
isShowPackageNote?: boolean;
|
|
6
|
-
products?: any[];
|
|
7
|
-
holders?: any[];
|
|
8
|
-
isEdit?: boolean;
|
|
9
|
-
disabledEdit?: boolean;
|
|
10
|
-
isShowChangeResource?: boolean;
|
|
11
|
-
isShowDelete?: boolean;
|
|
12
|
-
isShowChangeHolder?: boolean;
|
|
13
|
-
isShowHolder?: boolean;
|
|
14
|
-
isShowAddHolderButton?: boolean;
|
|
15
|
-
}
|
|
16
|
-
interface cartInfoProps {
|
|
17
|
-
promotions?: any[];
|
|
18
|
-
isShowPromotionAlert?: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface shoppingCartProps {
|
|
21
|
-
isOpenGroup?: boolean;
|
|
22
|
-
carts?: any[];
|
|
23
|
-
platform?: 'shop' | 'h5';
|
|
24
|
-
emptyText?: string;
|
|
25
|
-
activeKey?: string[] | number[];
|
|
26
|
-
defaultActiveKey?: string[] | number[];
|
|
27
|
-
className?: string;
|
|
28
|
-
onCard?: (e: any) => void;
|
|
29
|
-
onAction?: (e: any) => void;
|
|
30
|
-
onChange?: (items: any, type?: string, other?: any) => void;
|
|
31
|
-
onAddProduct?: (e?: any) => void;
|
|
32
|
-
onActiveKey?: (e: any) => void;
|
|
33
|
-
isShowImage?: boolean;
|
|
34
|
-
isShowHolder?: boolean;
|
|
35
|
-
isShowDelete?: boolean;
|
|
36
|
-
isShowAmountFooter?: boolean;
|
|
37
|
-
collapseParams?: CollapseProps;
|
|
38
|
-
productParams?: productProps;
|
|
39
|
-
isHideClearCart?: boolean;
|
|
40
|
-
isParallelResource?: boolean;
|
|
41
|
-
scenario?: 'booking2';
|
|
42
|
-
cartInfo?: cartInfoProps;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* @title: 商品卡片
|
|
46
|
-
* @description:
|
|
47
|
-
* @return {*}
|
|
48
|
-
* @Author: WangHan
|
|
49
|
-
* @Date: 2024-11-29 09:52
|
|
50
|
-
*/
|
|
51
|
-
export interface ProductProps {
|
|
52
|
-
id?: any;
|
|
53
|
-
lists: any[];
|
|
54
|
-
isAdd?: boolean;
|
|
55
|
-
openPromotionModal?: (products: any[]) => void;
|
|
56
|
-
promotionProducts?: any[];
|
|
57
|
-
isShowPromotionAlert?: boolean;
|
|
58
|
-
}
|
|
59
|
-
export {};
|