@pisell/pisellos 2.2.199 → 2.2.201
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/Order/index.js +2 -2
- package/dist/solution/BaseSales/index.js +2 -2
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +23 -0
- package/dist/solution/BookingTicket/index.js +291 -196
- package/dist/solution/BookingTicket/utils/bookingStatus.d.ts +40 -0
- package/dist/solution/BookingTicket/utils/bookingStatus.js +70 -0
- package/lib/model/strategy/adapter/promotion/index.js +0 -49
- package/lib/modules/Order/index.js +2 -2
- package/lib/solution/BaseSales/index.js +2 -2
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +23 -0
- package/lib/solution/BookingTicket/index.js +60 -0
- package/lib/solution/BookingTicket/utils/bookingStatus.d.ts +40 -0
- package/lib/solution/BookingTicket/utils/bookingStatus.js +44 -2
- package/package.json +1 -1
|
@@ -1129,8 +1129,8 @@ export var OrderModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
1129
1129
|
var _ref17, _paymentRecord$origin;
|
|
1130
1130
|
var paymentRecord = payment;
|
|
1131
1131
|
var metadata = paymentRecord.metadata && _typeof(paymentRecord.metadata) === 'object' ? _objectSpread({}, paymentRecord.metadata) : {};
|
|
1132
|
-
if (!metadata.
|
|
1133
|
-
metadata.
|
|
1132
|
+
if (!metadata.unique_payment_number) {
|
|
1133
|
+
metadata.unique_payment_number = createUuidV4();
|
|
1134
1134
|
}
|
|
1135
1135
|
var normalized = _objectSpread(_objectSpread({}, paymentRecord), {}, {
|
|
1136
1136
|
metadata: metadata,
|
|
@@ -1976,8 +1976,8 @@ export var BaseSalesImpl = /*#__PURE__*/function (_BaseModule) {
|
|
|
1976
1976
|
if (shopWalletPassId !== undefined && shopWalletPassId !== null) {
|
|
1977
1977
|
metadata.shop_wallet_pass_id = shopWalletPassId;
|
|
1978
1978
|
}
|
|
1979
|
-
if (!metadata.
|
|
1980
|
-
metadata.
|
|
1979
|
+
if (!metadata.unique_payment_number) {
|
|
1980
|
+
metadata.unique_payment_number = createUuidV4();
|
|
1981
1981
|
}
|
|
1982
1982
|
var payments = this.store.order.addOrderPayment(_objectSpread(_objectSpread({}, paymentRecord), {}, {
|
|
1983
1983
|
metadata: metadata
|
|
@@ -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 | 2 | 1 | 6 | 3 | 4 | 5;
|
|
315
315
|
}[]>;
|
|
316
316
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
317
317
|
private getScheduleDataByIds;
|
|
@@ -12,6 +12,8 @@ import { AddProductDecideContext, AddProductRequiresDetailPayload } from './util
|
|
|
12
12
|
import { type BuildCacheItemFromOrderLineInput } from '../../modules/BookingContext/utils/buildCacheItemFromOrderLine';
|
|
13
13
|
import { type BuildNormalProductCacheItemFromOrderLineInput } from '../../modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine';
|
|
14
14
|
import type { AddProductBookingInput, OrderProduct, OrderProductIdentity, UpdateOrderProductParams } from '../../modules/Order/types';
|
|
15
|
+
import { type TransitionChildBookingParams } from './utils/bookingStatus';
|
|
16
|
+
export type { BookingTransitionAction, TransitionChildBookingParams, } from './utils/bookingStatus';
|
|
15
17
|
export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
16
18
|
protected defaultName: string;
|
|
17
19
|
protected defaultVersion: string;
|
|
@@ -68,6 +70,27 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
68
70
|
* @returns 接口返回的 data
|
|
69
71
|
*/
|
|
70
72
|
setBookingStatus(status: string): Promise<any>;
|
|
73
|
+
/**
|
|
74
|
+
* 子预约状态机转移(POST /schedule/booking-transition/{schedule_event_id})。
|
|
75
|
+
*
|
|
76
|
+
* 与 `setBookingStatus`(父预约 PUT appointment-status)不同,本方法按子预约
|
|
77
|
+
* `schedule_event_id` 调用状态转移接口,body 为 `{ action }`。
|
|
78
|
+
*
|
|
79
|
+
* 流程:能解析出目标状态时先乐观更新对应子预约的 `appointment_status`,
|
|
80
|
+
* 再调 POST;成功后强制刷新销售详情;失败则回滚该子预约本地状态并抛错。
|
|
81
|
+
* `reschedule` 暂未启用状态矩阵,跳过乐观更新仅调接口。
|
|
82
|
+
*
|
|
83
|
+
* @param params.schedule_event_id 子预约 schedule_event_id
|
|
84
|
+
* @param params.action 转移动作:confirm | reject | arrive | start | complete | cancel | no_show | reschedule
|
|
85
|
+
* @returns 接口返回的 data
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* await bookingTicket.transitionChildBooking({
|
|
89
|
+
* schedule_event_id: 301,
|
|
90
|
+
* action: 'confirm',
|
|
91
|
+
* });
|
|
92
|
+
*/
|
|
93
|
+
transitionChildBooking(params: TransitionChildBookingParams): Promise<any>;
|
|
71
94
|
/**
|
|
72
95
|
* 基于当前 tempOrder.order_id 强制从远端重新拉取销售详情。
|
|
73
96
|
*
|