@pisell/pisellos 0.0.438 → 0.0.440
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/modules/Discount/index.d.ts +1 -0
- package/dist/modules/Discount/index.js +2 -1
- package/dist/modules/Payment/types.d.ts +3 -1
- package/dist/modules/Payment/types.js +1 -0
- package/dist/modules/Summary/index.js +4 -5
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +1 -1
- package/dist/solution/Checkout/index.d.ts +3 -1
- package/dist/solution/Checkout/index.js +612 -244
- package/dist/solution/Checkout/types.d.ts +1 -1
- package/dist/solution/ShopDiscount/index.js +2 -1
- package/lib/modules/Discount/index.d.ts +1 -0
- package/lib/modules/Discount/index.js +2 -1
- package/lib/modules/Payment/types.d.ts +3 -1
- package/lib/modules/Payment/types.js +1 -0
- package/lib/modules/Summary/index.js +2 -3
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +1 -1
- package/lib/solution/Checkout/index.d.ts +3 -1
- package/lib/solution/Checkout/index.js +249 -10
- package/lib/solution/Checkout/types.d.ts +1 -1
- package/lib/solution/ShopDiscount/index.js +2 -1
- package/package.json +1 -1
|
@@ -22,6 +22,7 @@ export declare class DiscountModule extends BaseModule implements Module, Discou
|
|
|
22
22
|
with_discount_card: 0 | 1;
|
|
23
23
|
customer_id: number;
|
|
24
24
|
with_wallet_pass_holder: 0 | 1;
|
|
25
|
+
request_timezone: string;
|
|
25
26
|
}): Promise<Discount[]>;
|
|
26
27
|
batchSearch(code: string, customerId?: number): Promise<Discount[]>;
|
|
27
28
|
filterEnabledDiscountList(discountList: Discount[]): Discount[];
|
|
@@ -190,7 +190,8 @@ export var DiscountModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
190
190
|
relation_product: 1,
|
|
191
191
|
with: ['extensionData', 'customScheduleSnapshot', 'holder.detail'],
|
|
192
192
|
order_behavior_count: 1,
|
|
193
|
-
order_behavior_count_customer_id: customerId || 1
|
|
193
|
+
order_behavior_count_customer_id: customerId || 1,
|
|
194
|
+
request_timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
194
195
|
});
|
|
195
196
|
case 2:
|
|
196
197
|
result = _context5.sent;
|
|
@@ -20,6 +20,7 @@ export var PaymentStatus = /*#__PURE__*/function (PaymentStatus) {
|
|
|
20
20
|
PaymentStatus["Sync"] = "sync";
|
|
21
21
|
PaymentStatus["PartiallyPaid"] = "partially_paid";
|
|
22
22
|
PaymentStatus["Finished"] = "finish";
|
|
23
|
+
PaymentStatus["Voided"] = "voided";
|
|
23
24
|
return PaymentStatus;
|
|
24
25
|
}({});
|
|
25
26
|
|
|
@@ -111,16 +111,15 @@ export var SummaryModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
111
111
|
value: function () {
|
|
112
112
|
var _getSummary = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(cartItems) {
|
|
113
113
|
var _this$shopStore$get;
|
|
114
|
-
var shopInfo,
|
|
114
|
+
var shopInfo, summary;
|
|
115
115
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
116
116
|
while (1) switch (_context3.prev = _context3.next) {
|
|
117
117
|
case 0:
|
|
118
|
-
shopInfo = ((_this$shopStore$get = this.shopStore.get('core')) === null || _this$shopStore$get === void 0 || (_this$shopStore$get = _this$shopStore$get.core) === null || _this$shopStore$get === void 0 ? void 0 : _this$shopStore$get.shop) || {};
|
|
119
|
-
|
|
120
|
-
summary = calculatePriceDetails(shopInfo, cartItems, scheduleModule === null || scheduleModule === void 0 ? void 0 : scheduleModule.isInScheduleByDate, this.store.surchargeList);
|
|
118
|
+
shopInfo = ((_this$shopStore$get = this.shopStore.get('core')) === null || _this$shopStore$get === void 0 || (_this$shopStore$get = _this$shopStore$get.core) === null || _this$shopStore$get === void 0 ? void 0 : _this$shopStore$get.shop) || {}; // const scheduleModule = this.core.getModule<ScheduleModule>('appointmentBooking_schedule');
|
|
119
|
+
summary = calculatePriceDetails(shopInfo, cartItems, ScheduleModule === null || ScheduleModule === void 0 ? void 0 : ScheduleModule.isInScheduleByDate, this.store.surchargeList);
|
|
121
120
|
this.store.summary = summary;
|
|
122
121
|
return _context3.abrupt("return", this.store.summary);
|
|
123
|
-
case
|
|
122
|
+
case 4:
|
|
124
123
|
case "end":
|
|
125
124
|
return _context3.stop();
|
|
126
125
|
}
|
|
@@ -311,7 +311,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
311
311
|
date: string;
|
|
312
312
|
status: string;
|
|
313
313
|
week: string;
|
|
314
|
-
weekNum: 0 |
|
|
314
|
+
weekNum: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
315
315
|
}[]>;
|
|
316
316
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
317
317
|
private getScheduleDataByIds;
|
|
@@ -123,7 +123,7 @@ export declare class BookingTicketImpl extends BaseModule implements Module {
|
|
|
123
123
|
* 获取当前的客户搜索条件
|
|
124
124
|
* @returns 当前搜索条件
|
|
125
125
|
*/
|
|
126
|
-
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "
|
|
126
|
+
getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
|
|
127
127
|
/**
|
|
128
128
|
* 获取客户列表状态(包含滚动加载相关状态)
|
|
129
129
|
* @returns 客户状态
|
|
@@ -169,7 +169,7 @@ export declare class CheckoutImpl extends BaseModule implements Module, Checkout
|
|
|
169
169
|
* @param paymentItem 支付项数据
|
|
170
170
|
* @throws 当前没有活跃订单时抛出错误
|
|
171
171
|
*/
|
|
172
|
-
addPaymentItemAsync(paymentItem: PaymentItemInput): Promise<void>;
|
|
172
|
+
addPaymentItemAsync(paymentItem: PaymentItemInput, orderUuid?: string): Promise<void>;
|
|
173
173
|
/**
|
|
174
174
|
* 删除当前订单的支付项
|
|
175
175
|
*
|
|
@@ -373,6 +373,8 @@ export declare class CheckoutImpl extends BaseModule implements Module, Checkout
|
|
|
373
373
|
* 在 updateStateAmountToRemaining 中会使用优化版本。
|
|
374
374
|
*/
|
|
375
375
|
private checkOrderPaymentCompletion;
|
|
376
|
+
private repairEftposPaymentFromIndexDbAsync;
|
|
377
|
+
private syncOrderToBackendFromIndexDbAsync;
|
|
376
378
|
/**
|
|
377
379
|
* 同步订单到后端并返回真实订单ID
|
|
378
380
|
*
|