@pisell/pisellos 2.3.28 → 2.3.30
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.d.ts +32 -8
- package/dist/modules/Order/index.js +883 -521
- package/dist/modules/Order/payment-utils.d.ts +23 -0
- package/dist/modules/Order/payment-utils.js +203 -0
- package/dist/modules/Order/types.d.ts +33 -1
- package/dist/modules/Order/utils/orderCollectionIdentity.d.ts +53 -0
- package/dist/modules/Order/utils/orderCollectionIdentity.js +405 -0
- package/dist/modules/Order/utils.d.ts +2 -1
- package/dist/modules/Order/utils.js +6 -12
- package/dist/modules/Payment/index.d.ts +2 -0
- package/dist/modules/Payment/index.js +78 -49
- package/dist/modules/Payment/types.d.ts +26 -24
- package/dist/modules/Payment/types.js +2 -0
- package/dist/modules/Product/index.d.ts +1 -1
- package/dist/server/index.d.ts +14 -0
- package/dist/server/index.js +1826 -1000
- package/dist/server/modules/order/index.d.ts +47 -4
- package/dist/server/modules/order/index.js +1415 -711
- package/dist/server/modules/order/types.d.ts +11 -3
- package/dist/server/modules/order/types.js +1 -1
- package/dist/solution/BaseSales/index.d.ts +40 -4
- package/dist/solution/BaseSales/index.js +1268 -749
- package/dist/solution/BaseSales/utils/parseSalesResponse.d.ts +9 -4
- package/dist/solution/BaseSales/utils/parseSalesResponse.js +6 -8
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +13 -1
- package/dist/solution/BookingTicket/index.js +2 -1
- package/dist/utils/payment-number.d.ts +9 -0
- package/dist/utils/payment-number.js +69 -0
- package/lib/modules/Order/index.d.ts +32 -8
- package/lib/modules/Order/index.js +270 -64
- package/lib/modules/Order/payment-utils.d.ts +23 -0
- package/lib/modules/Order/payment-utils.js +193 -0
- package/lib/modules/Order/types.d.ts +33 -1
- package/lib/modules/Order/utils/orderCollectionIdentity.d.ts +53 -0
- package/lib/modules/Order/utils/orderCollectionIdentity.js +415 -0
- package/lib/modules/Order/utils.d.ts +2 -1
- package/lib/modules/Order/utils.js +6 -14
- package/lib/modules/Payment/index.d.ts +2 -0
- package/lib/modules/Payment/index.js +33 -12
- package/lib/modules/Payment/types.d.ts +26 -24
- package/lib/modules/Product/index.d.ts +1 -1
- package/lib/server/index.d.ts +14 -0
- package/lib/server/index.js +604 -8
- package/lib/server/modules/order/index.d.ts +47 -4
- package/lib/server/modules/order/index.js +578 -116
- package/lib/server/modules/order/types.d.ts +11 -3
- package/lib/solution/BaseSales/index.d.ts +40 -4
- package/lib/solution/BaseSales/index.js +363 -37
- package/lib/solution/BaseSales/utils/parseSalesResponse.d.ts +9 -4
- package/lib/solution/BaseSales/utils/parseSalesResponse.js +4 -5
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +13 -1
- package/lib/solution/BookingTicket/index.js +2 -1
- package/lib/utils/payment-number.d.ts +9 -0
- package/lib/utils/payment-number.js +64 -0
- package/package.json +1 -1
|
@@ -441,7 +441,19 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
441
441
|
* 加车两阶段主决策(规格弹窗 / 资源编辑 / 直接加车)。
|
|
442
442
|
* 与 ticketBooking `handleSelectProduct` + `handleBooking4Service` 等价。
|
|
443
443
|
*/
|
|
444
|
-
decideAddProduct(item: any, options?: Partial<AddProductDecideContext>):
|
|
444
|
+
decideAddProduct(item: any, options?: Partial<AddProductDecideContext>): {
|
|
445
|
+
action: "reloadCatalog";
|
|
446
|
+
} | {
|
|
447
|
+
action: "add";
|
|
448
|
+
cacheItem: any;
|
|
449
|
+
} | {
|
|
450
|
+
action: "requiresDetail";
|
|
451
|
+
payload: AddProductRequiresDetailPayload;
|
|
452
|
+
} | {
|
|
453
|
+
action: "requiresBookingEdit";
|
|
454
|
+
cacheItem: any;
|
|
455
|
+
payload: import("./utils/addProductDecision").AddProductRequiresBookingEditPayload;
|
|
456
|
+
};
|
|
445
457
|
/** 规格弹窗 callback 后的第二段决策。 */
|
|
446
458
|
decideAfterDetail(cacheItem: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
|
|
447
459
|
/**
|
|
@@ -1153,7 +1153,8 @@ var BookingTicketImpl = class extends import_BaseSales.BaseSalesImpl {
|
|
|
1153
1153
|
}
|
|
1154
1154
|
/** 读取当前 booking config。 */
|
|
1155
1155
|
getBookingConfig() {
|
|
1156
|
-
|
|
1156
|
+
var _a;
|
|
1157
|
+
return (_a = this.store.bookingContext) == null ? void 0 : _a.getBookingConfig();
|
|
1157
1158
|
}
|
|
1158
1159
|
/** 写入资源全集(来源:`/form/schedule`),同步派生 resourcesOriginMap。 */
|
|
1159
1160
|
setResources(resources) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type PaymentNumberAppDataGetter = (key: string) => unknown;
|
|
2
|
+
/**
|
|
3
|
+
* Resolve the synchronous fallback without caching runtime device data.
|
|
4
|
+
*/
|
|
5
|
+
export declare function resolvePaymentNumberDevicePrefixFromDeviceId(getAppData: PaymentNumberAppDataGetter): string;
|
|
6
|
+
/**
|
|
7
|
+
* Resolve the latest device segment when a new payment number is generated.
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolvePaymentNumberDevicePrefix(getAppData: PaymentNumberAppDataGetter): Promise<string>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/utils/payment-number.ts
|
|
20
|
+
var payment_number_exports = {};
|
|
21
|
+
__export(payment_number_exports, {
|
|
22
|
+
resolvePaymentNumberDevicePrefix: () => resolvePaymentNumberDevicePrefix,
|
|
23
|
+
resolvePaymentNumberDevicePrefixFromDeviceId: () => resolvePaymentNumberDevicePrefixFromDeviceId
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(payment_number_exports);
|
|
26
|
+
function normalizeNonEmptyString(value) {
|
|
27
|
+
if (value === void 0 || value === null)
|
|
28
|
+
return null;
|
|
29
|
+
if (typeof value !== "string" && typeof value !== "number")
|
|
30
|
+
return null;
|
|
31
|
+
if (typeof value === "number" && !Number.isFinite(value))
|
|
32
|
+
return null;
|
|
33
|
+
const normalized = String(value).trim();
|
|
34
|
+
return normalized || null;
|
|
35
|
+
}
|
|
36
|
+
function resolvePaymentNumberDevicePrefixFromDeviceId(getAppData) {
|
|
37
|
+
try {
|
|
38
|
+
const deviceId = normalizeNonEmptyString(getAppData("device_id"));
|
|
39
|
+
if (deviceId && deviceId !== "0")
|
|
40
|
+
return deviceId.slice(-2);
|
|
41
|
+
} catch {
|
|
42
|
+
}
|
|
43
|
+
return "LOCAL";
|
|
44
|
+
}
|
|
45
|
+
async function resolvePaymentNumberDevicePrefix(getAppData) {
|
|
46
|
+
try {
|
|
47
|
+
const getAsyncIotDeviceInfo = getAppData("async_iot_device_info");
|
|
48
|
+
if (typeof getAsyncIotDeviceInfo === "function") {
|
|
49
|
+
const info = await getAsyncIotDeviceInfo();
|
|
50
|
+
const shortNumber = normalizeNonEmptyString(
|
|
51
|
+
info == null ? void 0 : info.short_number
|
|
52
|
+
);
|
|
53
|
+
if (shortNumber && shortNumber !== "0")
|
|
54
|
+
return shortNumber;
|
|
55
|
+
}
|
|
56
|
+
} catch {
|
|
57
|
+
}
|
|
58
|
+
return resolvePaymentNumberDevicePrefixFromDeviceId(getAppData);
|
|
59
|
+
}
|
|
60
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
61
|
+
0 && (module.exports = {
|
|
62
|
+
resolvePaymentNumberDevicePrefix,
|
|
63
|
+
resolvePaymentNumberDevicePrefixFromDeviceId
|
|
64
|
+
});
|