@pisell/pisellos 2.3.70 → 2.3.72
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/server/index.js +2 -1
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +13 -1
- package/dist/solution/BookingTicket/index.js +8 -2
- package/lib/server/index.js +2 -1
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +13 -1
- package/lib/solution/BookingTicket/index.js +5 -1
- package/package.json +1 -1
package/dist/server/index.js
CHANGED
|
@@ -5628,7 +5628,8 @@ var Server = /*#__PURE__*/function () {
|
|
|
5628
5628
|
order_id: printIdentity,
|
|
5629
5629
|
small_ticket_data: (_params$syncedOrder = params.syncedOrder) === null || _params$syncedOrder === void 0 || (_params$syncedOrder = _params$syncedOrder.payment_info) === null || _params$syncedOrder === void 0 ? void 0 : _params$syncedOrder.small_ticket_data,
|
|
5630
5630
|
skip_wristband: true,
|
|
5631
|
-
skip_voucher: true
|
|
5631
|
+
skip_voucher: true,
|
|
5632
|
+
skip_discount: true
|
|
5632
5633
|
} : {
|
|
5633
5634
|
order_id: printIdentity,
|
|
5634
5635
|
machine_code_print_info: (_params$syncedOrder2 = params.syncedOrder) === null || _params$syncedOrder2 === void 0 || (_params$syncedOrder2 = _params$syncedOrder2.payment_info) === null || _params$syncedOrder2 === void 0 ? void 0 : _params$syncedOrder2.machine_code_print_info,
|
|
@@ -326,7 +326,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
326
326
|
date: string;
|
|
327
327
|
status: string;
|
|
328
328
|
week: string;
|
|
329
|
-
weekNum: 0 | 1 |
|
|
329
|
+
weekNum: 0 | 1 | 2 | 6 | 4 | 3 | 5;
|
|
330
330
|
}[]>;
|
|
331
331
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
332
332
|
private getScheduleDataByIds;
|
|
@@ -453,7 +453,19 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
453
453
|
* 加车两阶段主决策(规格弹窗 / 资源编辑 / 直接加车)。
|
|
454
454
|
* 与 ticketBooking `handleSelectProduct` + `handleBooking4Service` 等价。
|
|
455
455
|
*/
|
|
456
|
-
decideAddProduct(item: any, options?: Partial<AddProductDecideContext>):
|
|
456
|
+
decideAddProduct(item: any, options?: Partial<AddProductDecideContext>): {
|
|
457
|
+
action: "reloadCatalog";
|
|
458
|
+
} | {
|
|
459
|
+
action: "add";
|
|
460
|
+
cacheItem: any;
|
|
461
|
+
} | {
|
|
462
|
+
action: "requiresDetail";
|
|
463
|
+
payload: AddProductRequiresDetailPayload;
|
|
464
|
+
} | {
|
|
465
|
+
action: "requiresBookingEdit";
|
|
466
|
+
cacheItem: any;
|
|
467
|
+
payload: import("./utils/addProductDecision").AddProductRequiresBookingEditPayload;
|
|
468
|
+
};
|
|
457
469
|
/** 规格弹窗 callback 后的第二段决策。 */
|
|
458
470
|
decideAfterDetail(cacheItem: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
|
|
459
471
|
/**
|
|
@@ -41,7 +41,7 @@ import { handleGlobalScan, handleCustomerScan, handleUniversalScan } from "./uti
|
|
|
41
41
|
import scanCache from "./utils/scan/scanCache";
|
|
42
42
|
import { formatGlobalScanResult } from "./utils/scan/formatGlobalScan";
|
|
43
43
|
import { applyGlobalScan } from "./utils/scan/applyGlobalScan";
|
|
44
|
-
import { buildCartView } from "./utils/cartView";
|
|
44
|
+
import { buildCartView, isWalkInCustomer } from "./utils/cartView";
|
|
45
45
|
import { buildCacheItemFromCartDetail, buildCacheItemFromDetail, buildRequiresDetailPayload as _buildRequiresDetailPayload, decideAddProduct as decideAddProductUtil, decideAfterDetail as decideAfterDetailUtil, decideAutoClose as decideAutoCloseUtil, getIsEject as getIsEjectUtil, getIsOnlySession as getIsOnlySessionUtil, transformDetailToProductAndBooking as transformDetailToProductAndBookingUtil } from "./utils/addProductDecision";
|
|
46
46
|
import { buildCacheItemFromOrderLine as buildCacheItemFromOrderLineUtil } from "../../modules/BookingContext/utils/buildCacheItemFromOrderLine";
|
|
47
47
|
import { buildSessionCatalogStaleInfo, isSessionCatalogDateStale } from "./utils/sessionCatalogStale";
|
|
@@ -683,7 +683,13 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
683
683
|
try {
|
|
684
684
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
685
685
|
var item = _step.value;
|
|
686
|
-
var
|
|
686
|
+
var rawCustomerId = item.customer_id;
|
|
687
|
+
if (!rawCustomerId || isWalkInCustomer({
|
|
688
|
+
id: rawCustomerId
|
|
689
|
+
})) {
|
|
690
|
+
continue;
|
|
691
|
+
}
|
|
692
|
+
var topLevelId = Number(rawCustomerId);
|
|
687
693
|
if (Number.isFinite(topLevelId) && topLevelId > 0) {
|
|
688
694
|
return topLevelId;
|
|
689
695
|
}
|
package/lib/server/index.js
CHANGED
|
@@ -3652,7 +3652,8 @@ var Server = class {
|
|
|
3652
3652
|
order_id: printIdentity,
|
|
3653
3653
|
small_ticket_data: (_b = (_a = params.syncedOrder) == null ? void 0 : _a.payment_info) == null ? void 0 : _b.small_ticket_data,
|
|
3654
3654
|
skip_wristband: true,
|
|
3655
|
-
skip_voucher: true
|
|
3655
|
+
skip_voucher: true,
|
|
3656
|
+
skip_discount: true
|
|
3656
3657
|
} : {
|
|
3657
3658
|
order_id: printIdentity,
|
|
3658
3659
|
machine_code_print_info: (_d = (_c = params.syncedOrder) == null ? void 0 : _c.payment_info) == null ? void 0 : _d.machine_code_print_info,
|
|
@@ -326,7 +326,7 @@ export declare class BookingByStepImpl extends BaseModule implements Module {
|
|
|
326
326
|
date: string;
|
|
327
327
|
status: string;
|
|
328
328
|
week: string;
|
|
329
|
-
weekNum: 0 | 1 |
|
|
329
|
+
weekNum: 0 | 1 | 2 | 6 | 4 | 3 | 5;
|
|
330
330
|
}[]>;
|
|
331
331
|
submitTimeSlot(timeSlots: TimeSliceItem): void;
|
|
332
332
|
private getScheduleDataByIds;
|
|
@@ -453,7 +453,19 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
|
|
|
453
453
|
* 加车两阶段主决策(规格弹窗 / 资源编辑 / 直接加车)。
|
|
454
454
|
* 与 ticketBooking `handleSelectProduct` + `handleBooking4Service` 等价。
|
|
455
455
|
*/
|
|
456
|
-
decideAddProduct(item: any, options?: Partial<AddProductDecideContext>):
|
|
456
|
+
decideAddProduct(item: any, options?: Partial<AddProductDecideContext>): {
|
|
457
|
+
action: "reloadCatalog";
|
|
458
|
+
} | {
|
|
459
|
+
action: "add";
|
|
460
|
+
cacheItem: any;
|
|
461
|
+
} | {
|
|
462
|
+
action: "requiresDetail";
|
|
463
|
+
payload: AddProductRequiresDetailPayload;
|
|
464
|
+
} | {
|
|
465
|
+
action: "requiresBookingEdit";
|
|
466
|
+
cacheItem: any;
|
|
467
|
+
payload: import("./utils/addProductDecision").AddProductRequiresBookingEditPayload;
|
|
468
|
+
};
|
|
457
469
|
/** 规格弹窗 callback 后的第二段决策。 */
|
|
458
470
|
decideAfterDetail(cacheItem: any, options?: Partial<AddProductDecideContext>): import("./utils/addProductDecision").AddProductDecision;
|
|
459
471
|
/**
|
|
@@ -392,7 +392,11 @@ var BookingTicketImpl = class extends import_BaseSales.BaseSalesImpl {
|
|
|
392
392
|
}
|
|
393
393
|
getDiscountCustomerId(discounts) {
|
|
394
394
|
for (const item of discounts) {
|
|
395
|
-
const
|
|
395
|
+
const rawCustomerId = item.customer_id;
|
|
396
|
+
if (!rawCustomerId || (0, import_cartView.isWalkInCustomer)({ id: rawCustomerId })) {
|
|
397
|
+
continue;
|
|
398
|
+
}
|
|
399
|
+
const topLevelId = Number(rawCustomerId);
|
|
396
400
|
if (Number.isFinite(topLevelId) && topLevelId > 0) {
|
|
397
401
|
return topLevelId;
|
|
398
402
|
}
|