@pisell/pisellos 2.2.311 → 2.2.312-vm.0
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/apis/picoding.d.ts.map +1 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/effects/index.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/dist/inventory/index.d.ts +92 -0
- package/dist/inventory/index.d.ts.map +1 -0
- package/dist/inventory/index.js +509 -0
- package/dist/model/index.d.ts.map +1 -0
- package/dist/model/strategy/adapter/dataVariant/adapter.d.ts.map +1 -0
- package/dist/model/strategy/adapter/dataVariant/evaluator.d.ts.map +1 -0
- package/dist/model/strategy/adapter/dataVariant/examples.d.ts.map +1 -0
- package/dist/model/strategy/adapter/dataVariant/index.d.ts.map +1 -0
- package/dist/model/strategy/adapter/dataVariant/type.d.ts.map +1 -0
- package/dist/model/strategy/adapter/index.d.ts.map +1 -0
- package/dist/model/strategy/adapter/itemRule/adapter.d.ts.map +1 -0
- package/dist/model/strategy/adapter/itemRule/evaluator.d.ts.map +1 -0
- package/dist/model/strategy/adapter/itemRule/examples.d.ts.map +1 -0
- package/dist/model/strategy/adapter/itemRule/index.d.ts.map +1 -0
- package/dist/model/strategy/adapter/itemRule/type.d.ts.map +1 -0
- package/dist/model/strategy/adapter/promotion/adapter.d.ts.map +1 -0
- package/dist/model/strategy/adapter/promotion/evaluator.d.ts.map +1 -0
- package/dist/model/strategy/adapter/promotion/examples.d.ts.map +1 -0
- package/dist/model/strategy/adapter/promotion/index.d.ts.map +1 -0
- package/dist/model/strategy/adapter/promotion/type.d.ts.map +1 -0
- package/dist/model/strategy/adapter/type.d.ts.map +1 -0
- package/dist/model/strategy/adapter/walletPass/evaluator.d.ts.map +1 -0
- package/dist/model/strategy/adapter/walletPass/example.d.ts.map +1 -0
- package/dist/model/strategy/adapter/walletPass/index.d.ts.map +1 -0
- package/dist/model/strategy/adapter/walletPass/locales.d.ts.map +1 -0
- package/dist/model/strategy/adapter/walletPass/type.d.ts.map +1 -0
- package/dist/model/strategy/adapter/walletPass/utils.d.ts.map +1 -0
- package/dist/model/strategy/engine.d.ts.map +1 -0
- package/dist/model/strategy/index.d.ts.map +1 -0
- package/dist/model/strategy/strategy-example.d.ts.map +1 -0
- package/dist/model/strategy/type.d.ts.map +1 -0
- package/dist/modules/Account/index.d.ts.map +1 -0
- package/dist/modules/Account/types.d.ts.map +1 -0
- package/dist/modules/AccountList/index.d.ts.map +1 -0
- package/dist/modules/AccountList/types.d.ts.map +1 -0
- package/dist/modules/AccountList/utils.d.ts.map +1 -0
- package/dist/modules/BaseModule.d.ts.map +1 -0
- package/dist/modules/BookingContext/index.d.ts.map +1 -0
- package/dist/modules/BookingContext/types.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/cacheItemToBookingInput.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/flexible.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/formatResourceList.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/index.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/noResource.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/orderLineDisplay.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/productExtend.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/resourceErrors.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/resourceSelection.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/resources.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/serviceTimes.d.ts.map +1 -0
- package/dist/modules/BookingContext/utils/timeSlices.d.ts.map +1 -0
- package/dist/modules/Cart/index.d.ts.map +1 -0
- package/dist/modules/Cart/types.d.ts.map +1 -0
- package/dist/modules/Cart/utils/cartAccount.d.ts.map +1 -0
- package/dist/modules/Cart/utils/cartDate.d.ts.map +1 -0
- package/dist/modules/Cart/utils/cartDiscount.d.ts.map +1 -0
- package/dist/modules/Cart/utils/cartNote.d.ts.map +1 -0
- package/dist/modules/Cart/utils/cartProduct.d.ts.map +1 -0
- package/dist/modules/Cart/utils/cartRelationForms.d.ts.map +1 -0
- package/dist/modules/Cart/utils/cartResource.d.ts.map +1 -0
- package/dist/modules/Cart/utils/changePrice.d.ts.map +1 -0
- package/dist/modules/Cart/utils/index.d.ts.map +1 -0
- package/dist/modules/Customer/constants.d.ts.map +1 -0
- package/dist/modules/Customer/index.d.ts.map +1 -0
- package/dist/modules/Customer/types.d.ts.map +1 -0
- package/dist/modules/Date/index.d.ts.map +1 -0
- package/dist/modules/Date/types.d.ts.map +1 -0
- package/dist/modules/Date/utils.d.ts.map +1 -0
- package/dist/modules/Discount/availability.d.ts.map +1 -0
- package/dist/modules/Discount/entitlementPass.d.ts.map +1 -0
- package/dist/modules/Discount/index.d.ts.map +1 -0
- package/dist/modules/Discount/index.js +1 -0
- package/dist/modules/Discount/types.d.ts.map +1 -0
- package/dist/modules/Guests/index.d.ts.map +1 -0
- package/dist/modules/Guests/types.d.ts.map +1 -0
- package/dist/modules/Holder/index.d.ts.map +1 -0
- package/dist/modules/Holder/types.d.ts.map +1 -0
- package/dist/modules/Holder/utils.d.ts.map +1 -0
- package/dist/modules/OpenData/index.d.ts.map +1 -0
- package/dist/modules/OpenData/types.d.ts.map +1 -0
- package/dist/modules/OpenData/utils.d.ts.map +1 -0
- package/dist/modules/Order/index.d.ts +25 -3
- package/dist/modules/Order/index.d.ts.map +1 -0
- package/dist/modules/Order/index.js +1647 -1211
- package/dist/modules/Order/payment-utils.d.ts.map +1 -0
- package/dist/modules/Order/salesNotes.d.ts.map +1 -0
- package/dist/modules/Order/types.d.ts +7 -0
- package/dist/modules/Order/types.d.ts.map +1 -0
- package/dist/modules/Order/utils/bundleDiscountHydration.d.ts.map +1 -0
- package/dist/modules/Order/utils/discountProductLineIdentity.d.ts.map +1 -0
- package/dist/modules/Order/utils/discountProductLineIdentity.js +2 -2
- package/dist/modules/Order/utils/manualProductDiscount.d.ts.map +1 -0
- package/dist/modules/Order/utils/orderCollectionIdentity.d.ts.map +1 -0
- package/dist/modules/Order/utils/productVoucherGroups.d.ts +15 -0
- package/dist/modules/Order/utils/productVoucherGroups.d.ts.map +1 -0
- package/dist/modules/Order/utils/productVoucherGroups.js +115 -0
- package/dist/modules/Order/utils/virtualSettlement.d.ts.map +1 -0
- package/dist/modules/Order/utils/weighedProduct.d.ts.map +1 -0
- package/dist/modules/Order/utils.d.ts.map +1 -0
- package/dist/modules/Payment/cash.d.ts.map +1 -0
- package/dist/modules/Payment/cashRecommendationAlgorithm.d.ts.map +1 -0
- package/dist/modules/Payment/eftpos.d.ts.map +1 -0
- package/dist/modules/Payment/index.d.ts.map +1 -0
- package/dist/modules/Payment/mx51.d.ts.map +1 -0
- package/dist/modules/Payment/types.d.ts.map +1 -0
- package/dist/modules/Payment/utils.d.ts.map +1 -0
- package/dist/modules/Payment/walletpass.d.ts.map +1 -0
- package/dist/modules/Product/index.d.ts.map +1 -0
- package/dist/modules/Product/types.d.ts.map +1 -0
- package/dist/modules/Product/utils.d.ts.map +1 -0
- package/dist/modules/ProductList/clientDataVariants.d.ts.map +1 -0
- package/dist/modules/ProductList/index.d.ts.map +1 -0
- package/dist/modules/ProductList/index.js +33 -12
- package/dist/modules/ProductList/types.d.ts.map +1 -0
- package/dist/modules/Quotation/index.d.ts.map +1 -0
- package/dist/modules/Quotation/types.d.ts.map +1 -0
- package/dist/modules/Resource/index.d.ts.map +1 -0
- package/dist/modules/Resource/types.d.ts.map +1 -0
- package/dist/modules/Resource/utils.d.ts.map +1 -0
- package/dist/modules/ResourcePlanner/index.d.ts.map +1 -0
- package/dist/modules/ResourcePlanner/localClock.d.ts.map +1 -0
- package/dist/modules/ResourcePlanner/planner.d.ts.map +1 -0
- package/dist/modules/ResourcePlanner/types.d.ts.map +1 -0
- package/dist/modules/Rules/index.d.ts +2 -0
- package/dist/modules/Rules/index.d.ts.map +1 -0
- package/dist/modules/Rules/index.js +29 -21
- package/dist/modules/Rules/types.d.ts.map +1 -0
- package/dist/modules/SalesSummary/index.d.ts.map +1 -0
- package/dist/modules/SalesSummary/types.d.ts.map +1 -0
- package/dist/modules/SalesSummary/utils.d.ts.map +1 -0
- package/dist/modules/ScanOrderLogger/index.d.ts.map +1 -0
- package/dist/modules/ScanOrderLogger/providers/feishu.d.ts.map +1 -0
- package/dist/modules/ScanOrderLogger/providers/grafana.d.ts.map +1 -0
- package/dist/modules/ScanOrderLogger/types.d.ts.map +1 -0
- package/dist/modules/Schedule/getDateIsInSchedule.d.ts.map +1 -0
- package/dist/modules/Schedule/index.d.ts.map +1 -0
- package/dist/modules/Schedule/type.d.ts.map +1 -0
- package/dist/modules/Schedule/types.d.ts.map +1 -0
- package/dist/modules/Schedule/utils.d.ts.map +1 -0
- package/dist/modules/Step/index.d.ts.map +1 -0
- package/dist/modules/Step/tyeps.d.ts.map +1 -0
- package/dist/modules/Summary/index.d.ts.map +1 -0
- package/dist/modules/Summary/types.d.ts.map +1 -0
- package/dist/modules/Summary/utils.d.ts.map +1 -0
- package/dist/modules/SurchargeList/index.d.ts.map +1 -0
- package/dist/modules/SurchargeList/types.d.ts.map +1 -0
- package/dist/modules/index.d.ts.map +1 -0
- package/dist/plugins/app.d.ts.map +1 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/request.d.ts.map +1 -0
- package/dist/plugins/shopStore.d.ts.map +1 -0
- package/dist/plugins/user.d.ts.map +1 -0
- package/dist/plugins/window.d.ts.map +1 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/modules/floor-plan/index.d.ts.map +1 -0
- package/dist/server/modules/floor-plan/types.d.ts.map +1 -0
- package/dist/server/modules/index.d.ts.map +1 -0
- package/dist/server/modules/menu/index.d.ts.map +1 -0
- package/dist/server/modules/menu/types.d.ts.map +1 -0
- package/dist/server/modules/order/index.d.ts.map +1 -0
- package/dist/server/modules/order/types.d.ts.map +1 -0
- package/dist/server/modules/order/utils/filterBookings.d.ts.map +1 -0
- package/dist/server/modules/order/utils/filterOrders.d.ts.map +1 -0
- package/dist/server/modules/payment/index.d.ts.map +1 -0
- package/dist/server/modules/payment/types.d.ts.map +1 -0
- package/dist/server/modules/products/index.d.ts.map +1 -0
- package/dist/server/modules/products/types.d.ts.map +1 -0
- package/dist/server/modules/quotation/index.d.ts.map +1 -0
- package/dist/server/modules/quotation/types.d.ts.map +1 -0
- package/dist/server/modules/resource/index.d.ts.map +1 -0
- package/dist/server/modules/resource/types.d.ts.map +1 -0
- package/dist/server/modules/schedule/index.d.ts.map +1 -0
- package/dist/server/modules/schedule/types.d.ts.map +1 -0
- package/dist/server/modules/schedule/utils.d.ts.map +1 -0
- package/dist/server/types.d.ts.map +1 -0
- package/dist/server/utils/index.d.ts.map +1 -0
- package/dist/server/utils/product.d.ts.map +1 -0
- package/dist/server/utils/schedule.d.ts.map +1 -0
- package/dist/server/utils/small-ticket.d.ts.map +1 -0
- package/dist/server/utils/time.d.ts.map +1 -0
- package/dist/solution/BaseSales/index.d.ts +16 -1
- package/dist/solution/BaseSales/index.d.ts.map +1 -0
- package/dist/solution/BaseSales/index.js +1363 -1176
- package/dist/solution/BaseSales/types.d.ts.map +1 -0
- package/dist/solution/BaseSales/utils/cartPromotion.d.ts.map +1 -0
- package/dist/solution/BaseSales/utils/parseSalesResponse.d.ts.map +1 -0
- package/dist/solution/BaseSales/utils/quotationPrice.d.ts.map +1 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts.map +1 -0
- package/dist/solution/BaseSales/utils.d.ts.map +1 -0
- package/dist/solution/BookingByStep/index.d.ts.map +1 -0
- package/dist/solution/BookingByStep/types.d.ts.map +1 -0
- package/dist/solution/BookingByStep/utils/capacity.d.ts.map +1 -0
- package/dist/solution/BookingByStep/utils/products.d.ts.map +1 -0
- package/dist/solution/BookingByStep/utils/resources.d.ts.map +1 -0
- package/dist/solution/BookingByStep/utils/stock.d.ts.map +1 -0
- package/dist/solution/BookingByStep/utils/timeslots.d.ts.map +1 -0
- package/dist/solution/BookingTicket/index.d.ts.map +1 -0
- package/dist/solution/BookingTicket/index.js +198 -108
- package/dist/solution/BookingTicket/types.d.ts +14 -2
- package/dist/solution/BookingTicket/types.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +1 -1
- package/dist/solution/BookingTicket/utils/addProductDecision.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/addProductDecision.js +4 -3
- package/dist/solution/BookingTicket/utils/addTimeAvailability.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/bookingStatus.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/cartView.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/exampleData.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/orderCustomer.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +94 -58
- package/dist/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.d.ts +10 -0
- package/dist/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.js +117 -0
- package/dist/solution/BookingTicket/utils/scan/cloudSearch.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/scan/cloudSearch.js +1 -0
- package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/scan/handleScan.js +2 -1
- package/dist/solution/BookingTicket/utils/scan/index.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/scan/scanCache.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/scan/scanProductValues.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/sessionCatalogStale.d.ts.map +1 -0
- package/dist/solution/BookingTicket/utils/weighingProductSku.d.ts.map +1 -0
- package/dist/solution/BuyTickets/index.d.ts.map +1 -0
- package/dist/solution/BuyTickets/types.d.ts.map +1 -0
- package/dist/solution/Checkout/index.d.ts.map +1 -0
- package/dist/solution/Checkout/types.d.ts.map +1 -0
- package/dist/solution/Checkout/utils/index.d.ts.map +1 -0
- package/dist/solution/PlaceOrder/index.d.ts.map +1 -0
- package/dist/solution/RegisterAndLogin/config.d.ts.map +1 -0
- package/dist/solution/RegisterAndLogin/index.d.ts.map +1 -0
- package/dist/solution/RegisterAndLogin/types.d.ts.map +1 -0
- package/dist/solution/RegisterAndLogin/utils.d.ts.map +1 -0
- package/dist/solution/Sales/index.d.ts.map +1 -0
- package/dist/solution/Sales/types.d.ts.map +1 -0
- package/dist/solution/ScanOrder/index.d.ts.map +1 -0
- package/dist/solution/ScanOrder/types.d.ts.map +1 -0
- package/dist/solution/ScanOrder/utils.d.ts.map +1 -0
- package/dist/solution/ShopDiscount/index.d.ts.map +1 -0
- package/dist/solution/ShopDiscount/types.d.ts.map +1 -0
- package/dist/solution/ShopDiscount/utils.d.ts.map +1 -0
- package/dist/solution/UnifiedBookingSales/index.d.ts +1 -1
- package/dist/solution/UnifiedBookingSales/index.d.ts.map +1 -0
- package/dist/solution/UnifiedBookingSales/index.js +63 -43
- package/dist/solution/UnifiedBookingSales/remoteOccupancyCache.d.ts.map +1 -0
- package/dist/solution/UnifiedBookingSales/types.d.ts.map +1 -0
- package/dist/solution/VenueBooking/index.d.ts.map +1 -0
- package/dist/solution/VenueBooking/types.d.ts.map +1 -0
- package/dist/solution/VenueBooking/utils/dateSummary.d.ts.map +1 -0
- package/dist/solution/VenueBooking/utils/resource.d.ts.map +1 -0
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts.map +1 -0
- package/dist/solution/VenueBooking/utils/timeSlot.d.ts.map +1 -0
- package/dist/solution/VenueBooking/utils.d.ts.map +1 -0
- package/dist/solution/index.d.ts.map +1 -0
- package/dist/store/createStore.d.ts.map +1 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/os-private-payload.d.ts.map +1 -0
- package/dist/utils/payment-number.d.ts.map +1 -0
- package/dist/utils/platform.d.ts +2 -0
- package/dist/utils/platform.d.ts.map +1 -0
- package/dist/utils/platform.js +6 -0
- package/dist/utils/task.d.ts.map +1 -0
- package/dist/utils/watch.d.ts.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +12 -0
- package/lib/inventory/index.d.ts +92 -0
- package/lib/inventory/index.js +287 -0
- package/lib/model/strategy/adapter/promotion/index.js +46 -1
- package/lib/modules/Discount/index.js +1 -0
- package/lib/modules/Order/index.d.ts +25 -3
- package/lib/modules/Order/index.js +145 -11
- package/lib/modules/Order/types.d.ts +7 -0
- package/lib/modules/Order/utils/discountProductLineIdentity.js +1 -1
- package/lib/modules/Order/utils/productVoucherGroups.d.ts +15 -0
- package/lib/modules/Order/utils/productVoucherGroups.js +64 -0
- package/lib/modules/ProductList/index.js +15 -0
- package/lib/modules/Rules/index.d.ts +2 -0
- package/lib/modules/Rules/index.js +6 -0
- package/lib/solution/BaseSales/index.d.ts +16 -1
- package/lib/solution/BaseSales/index.js +89 -9
- package/lib/solution/BookingTicket/index.js +36 -2
- package/lib/solution/BookingTicket/types.d.ts +14 -2
- package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +1 -1
- package/lib/solution/BookingTicket/utils/addProductDecision.js +4 -3
- package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +14 -2
- package/lib/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.d.ts +10 -0
- package/lib/solution/BookingTicket/utils/scan/applyProductVoucherCollectionScan.js +71 -0
- package/lib/solution/BookingTicket/utils/scan/cloudSearch.js +1 -0
- package/lib/solution/BookingTicket/utils/scan/handleScan.js +2 -1
- package/lib/solution/UnifiedBookingSales/index.d.ts +1 -1
- package/lib/solution/UnifiedBookingSales/index.js +14 -3
- package/lib/utils/platform.d.ts +2 -0
- package/lib/utils/platform.js +7 -0
- package/package.json +4 -2
|
@@ -42,6 +42,7 @@ import { handleGlobalScan, handleCustomerScan, handleUniversalScan } from "./uti
|
|
|
42
42
|
import scanCache from "./utils/scan/scanCache";
|
|
43
43
|
import { formatGlobalScanResult } from "./utils/scan/formatGlobalScan";
|
|
44
44
|
import { applyGlobalScan } from "./utils/scan/applyGlobalScan";
|
|
45
|
+
import { applyProductVoucherCollectionScan } from "./utils/scan/applyProductVoucherCollectionScan";
|
|
45
46
|
import { buildCartView, isWalkInCustomer } from "./utils/cartView";
|
|
46
47
|
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";
|
|
47
48
|
import { buildCacheItemFromOrderLine as buildCacheItemFromOrderLineUtil } from "../../modules/BookingContext/utils/buildCacheItemFromOrderLine";
|
|
@@ -2662,48 +2663,72 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2662
2663
|
}, {
|
|
2663
2664
|
key: "handleGlobalScanCode",
|
|
2664
2665
|
value: (function () {
|
|
2665
|
-
var _handleGlobalScanCode = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
2666
|
+
var _handleGlobalScanCode = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33(code, bridge) {
|
|
2666
2667
|
var _this7 = this;
|
|
2667
|
-
var trimmed, _bridge$onNotify, _bridge$refresh, localSearch, scanCallback, raw, formatted, _bridge$onNotify2, _result7, _bridge$onNotify3;
|
|
2668
|
-
return _regeneratorRuntime().wrap(function
|
|
2669
|
-
while (1) switch (
|
|
2668
|
+
var trimmed, _bridge$onNotify, _bridge$refresh, _promotion$isAccepted, promotion, localSearch, scanCallback, raw, formatted, _bridge$onNotify2, host, _result7, _bridge$onNotify3, _bridge$isCurrent;
|
|
2669
|
+
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
|
|
2670
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
2670
2671
|
case 0:
|
|
2671
2672
|
trimmed = typeof code === 'string' ? code.trim() : '';
|
|
2672
2673
|
if (trimmed) {
|
|
2673
|
-
|
|
2674
|
+
_context33.next = 4;
|
|
2674
2675
|
break;
|
|
2675
2676
|
}
|
|
2676
2677
|
bridge === null || bridge === void 0 || (_bridge$onNotify = bridge.onNotify) === null || _bridge$onNotify === void 0 || _bridge$onNotify.call(bridge, 'fail', 'pisell2.text.scan-global-failed');
|
|
2677
|
-
return
|
|
2678
|
+
return _context33.abrupt("return", {
|
|
2678
2679
|
status: 'failed',
|
|
2679
2680
|
reason: 'empty_code'
|
|
2680
2681
|
});
|
|
2681
2682
|
case 4:
|
|
2682
|
-
|
|
2683
|
+
_context33.prev = 4;
|
|
2684
|
+
if (!((bridge === null || bridge === void 0 ? void 0 : bridge.scanScope) === 'product-voucher')) {
|
|
2685
|
+
_context33.next = 12;
|
|
2686
|
+
break;
|
|
2687
|
+
}
|
|
2688
|
+
if (bridge.applyPromotionCode) {
|
|
2689
|
+
_context33.next = 8;
|
|
2690
|
+
break;
|
|
2691
|
+
}
|
|
2692
|
+
return _context33.abrupt("return", {
|
|
2693
|
+
status: 'failed',
|
|
2694
|
+
reason: 'no_bridge'
|
|
2695
|
+
});
|
|
2696
|
+
case 8:
|
|
2697
|
+
_context33.next = 10;
|
|
2698
|
+
return bridge.applyPromotionCode(trimmed);
|
|
2699
|
+
case 10:
|
|
2700
|
+
promotion = _context33.sent;
|
|
2701
|
+
return _context33.abrupt("return", ((_promotion$isAccepted = promotion.isAccepted) !== null && _promotion$isAccepted !== void 0 ? _promotion$isAccepted : promotion.isAvailable) ? {
|
|
2702
|
+
status: 'success',
|
|
2703
|
+
kind: 'promotion'
|
|
2704
|
+
} : {
|
|
2705
|
+
status: 'failed',
|
|
2706
|
+
reason: 'not_found'
|
|
2707
|
+
});
|
|
2708
|
+
case 12:
|
|
2683
2709
|
localSearch = function localSearch(v) {
|
|
2684
2710
|
return _this7.store.products.findProductsByCodeOrBarcode(v);
|
|
2685
2711
|
};
|
|
2686
2712
|
scanCallback = handleGlobalScan(this.request, localSearch, this.getSubmitOrderSalesChannel());
|
|
2687
|
-
|
|
2713
|
+
_context33.next = 16;
|
|
2688
2714
|
return scanCallback({
|
|
2689
2715
|
type: 'nativeScanner',
|
|
2690
2716
|
value: trimmed
|
|
2691
2717
|
});
|
|
2692
|
-
case
|
|
2693
|
-
raw =
|
|
2718
|
+
case 16:
|
|
2719
|
+
raw = _context33.sent;
|
|
2694
2720
|
formatted = formatGlobalScanResult(raw, trimmed);
|
|
2695
2721
|
if (formatted) {
|
|
2696
|
-
|
|
2722
|
+
_context33.next = 21;
|
|
2697
2723
|
break;
|
|
2698
2724
|
}
|
|
2699
2725
|
bridge === null || bridge === void 0 || (_bridge$onNotify2 = bridge.onNotify) === null || _bridge$onNotify2 === void 0 || _bridge$onNotify2.call(bridge, 'fail', 'pisell2.text.scan-global-failed');
|
|
2700
|
-
return
|
|
2726
|
+
return _context33.abrupt("return", {
|
|
2701
2727
|
status: 'failed',
|
|
2702
2728
|
reason: 'not_found'
|
|
2703
2729
|
});
|
|
2704
|
-
case
|
|
2705
|
-
|
|
2706
|
-
return applyGlobalScan({
|
|
2730
|
+
case 21:
|
|
2731
|
+
host = {
|
|
2707
2732
|
setOrderCustomer: function setOrderCustomer(customer) {
|
|
2708
2733
|
return _this7.setOrderCustomer(customer);
|
|
2709
2734
|
},
|
|
@@ -2738,25 +2763,90 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2738
2763
|
scanWalletAsset: function scanWalletAsset(scanCode) {
|
|
2739
2764
|
return _this7.scanWalletAsset(scanCode);
|
|
2740
2765
|
}
|
|
2741
|
-
}
|
|
2742
|
-
|
|
2743
|
-
|
|
2766
|
+
};
|
|
2767
|
+
if (!((bridge === null || bridge === void 0 ? void 0 : bridge.scanScope) === 'product-voucher-collection')) {
|
|
2768
|
+
_context33.next = 28;
|
|
2769
|
+
break;
|
|
2770
|
+
}
|
|
2771
|
+
_context33.next = 25;
|
|
2772
|
+
return applyProductVoucherCollectionScan(_objectSpread(_objectSpread({}, host), {}, {
|
|
2773
|
+
waitForCustomerDiscounts: function waitForCustomerDiscounts() {
|
|
2774
|
+
return _this7.orderCustomerDiscountRefreshInFlight || Promise.resolve();
|
|
2775
|
+
},
|
|
2776
|
+
loadCustomerDiscounts: function () {
|
|
2777
|
+
var _loadCustomerDiscounts = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32() {
|
|
2778
|
+
var _this7$getOrderCustom;
|
|
2779
|
+
var customerId;
|
|
2780
|
+
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
|
|
2781
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
2782
|
+
case 0:
|
|
2783
|
+
customerId = Number(((_this7$getOrderCustom = _this7.getOrderCustomer()) === null || _this7$getOrderCustom === void 0 ? void 0 : _this7$getOrderCustom.customer_id) || 0);
|
|
2784
|
+
if (!(customerId <= 1)) {
|
|
2785
|
+
_context32.next = 3;
|
|
2786
|
+
break;
|
|
2787
|
+
}
|
|
2788
|
+
return _context32.abrupt("return", []);
|
|
2789
|
+
case 3:
|
|
2790
|
+
_context32.next = 5;
|
|
2791
|
+
return _this7.refreshDiscountConfigAfterOrderCustomerChange(customerId);
|
|
2792
|
+
case 5:
|
|
2793
|
+
return _context32.abrupt("return", _this7.getDiscountList());
|
|
2794
|
+
case 6:
|
|
2795
|
+
case "end":
|
|
2796
|
+
return _context32.stop();
|
|
2797
|
+
}
|
|
2798
|
+
}, _callee32);
|
|
2799
|
+
}));
|
|
2800
|
+
function loadCustomerDiscounts() {
|
|
2801
|
+
return _loadCustomerDiscounts.apply(this, arguments);
|
|
2802
|
+
}
|
|
2803
|
+
return loadCustomerDiscounts;
|
|
2804
|
+
}()
|
|
2805
|
+
}), formatted, bridge);
|
|
2806
|
+
case 25:
|
|
2807
|
+
_context33.t0 = _context33.sent;
|
|
2808
|
+
_context33.next = 31;
|
|
2809
|
+
break;
|
|
2810
|
+
case 28:
|
|
2811
|
+
_context33.next = 30;
|
|
2812
|
+
return applyGlobalScan(host, formatted, bridge);
|
|
2813
|
+
case 30:
|
|
2814
|
+
_context33.t0 = _context33.sent;
|
|
2815
|
+
case 31:
|
|
2816
|
+
_result7 = _context33.t0;
|
|
2744
2817
|
bridge === null || bridge === void 0 || (_bridge$refresh = bridge.refresh) === null || _bridge$refresh === void 0 || _bridge$refresh.call(bridge);
|
|
2745
|
-
return
|
|
2746
|
-
case
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2818
|
+
return _context33.abrupt("return", _result7);
|
|
2819
|
+
case 36:
|
|
2820
|
+
_context33.prev = 36;
|
|
2821
|
+
_context33.t1 = _context33["catch"](4);
|
|
2822
|
+
if (!((bridge === null || bridge === void 0 ? void 0 : bridge.scanScope) === 'product-voucher-collection')) {
|
|
2823
|
+
_context33.next = 42;
|
|
2824
|
+
break;
|
|
2825
|
+
}
|
|
2826
|
+
if (!(((_bridge$isCurrent = bridge.isCurrent) === null || _bridge$isCurrent === void 0 ? void 0 : _bridge$isCurrent.call(bridge)) === false)) {
|
|
2827
|
+
_context33.next = 41;
|
|
2828
|
+
break;
|
|
2829
|
+
}
|
|
2830
|
+
return _context33.abrupt("return", {
|
|
2831
|
+
status: 'cancelled'
|
|
2832
|
+
});
|
|
2833
|
+
case 41:
|
|
2834
|
+
return _context33.abrupt("return", {
|
|
2835
|
+
status: 'failed',
|
|
2836
|
+
reason: 'entry_resolution_failed'
|
|
2837
|
+
});
|
|
2838
|
+
case 42:
|
|
2839
|
+
console.error('[BookingTicket] handleGlobalScanCode failed', _context33.t1);
|
|
2750
2840
|
bridge === null || bridge === void 0 || (_bridge$onNotify3 = bridge.onNotify) === null || _bridge$onNotify3 === void 0 || _bridge$onNotify3.call(bridge, 'fail', 'pisell2.text.scan-global-failed');
|
|
2751
|
-
return
|
|
2841
|
+
return _context33.abrupt("return", {
|
|
2752
2842
|
status: 'failed',
|
|
2753
2843
|
reason: 'not_found'
|
|
2754
2844
|
});
|
|
2755
|
-
case
|
|
2845
|
+
case 45:
|
|
2756
2846
|
case "end":
|
|
2757
|
-
return
|
|
2847
|
+
return _context33.stop();
|
|
2758
2848
|
}
|
|
2759
|
-
},
|
|
2849
|
+
}, _callee33, this, [[4, 36]]);
|
|
2760
2850
|
}));
|
|
2761
2851
|
function handleGlobalScanCode(_x21, _x22) {
|
|
2762
2852
|
return _handleGlobalScanCode.apply(this, arguments);
|
|
@@ -2766,37 +2856,37 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2766
2856
|
}, {
|
|
2767
2857
|
key: "getGlobalScanCodeType",
|
|
2768
2858
|
value: (function () {
|
|
2769
|
-
var _getGlobalScanCodeType = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
2859
|
+
var _getGlobalScanCodeType = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34(code) {
|
|
2770
2860
|
var _this8 = this,
|
|
2771
2861
|
_formatGlobalScanResu,
|
|
2772
2862
|
_formatGlobalScanResu2;
|
|
2773
2863
|
var trimmed, scan, raw;
|
|
2774
|
-
return _regeneratorRuntime().wrap(function
|
|
2775
|
-
while (1) switch (
|
|
2864
|
+
return _regeneratorRuntime().wrap(function _callee34$(_context34) {
|
|
2865
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
2776
2866
|
case 0:
|
|
2777
2867
|
trimmed = typeof code === 'string' ? code.trim() : '';
|
|
2778
2868
|
if (trimmed) {
|
|
2779
|
-
|
|
2869
|
+
_context34.next = 3;
|
|
2780
2870
|
break;
|
|
2781
2871
|
}
|
|
2782
|
-
return
|
|
2872
|
+
return _context34.abrupt("return", null);
|
|
2783
2873
|
case 3:
|
|
2784
2874
|
scan = handleGlobalScan(this.request, function (value) {
|
|
2785
2875
|
return _this8.store.products.findProductsByCodeOrBarcode(value);
|
|
2786
2876
|
}, this.getSubmitOrderSalesChannel());
|
|
2787
|
-
|
|
2877
|
+
_context34.next = 6;
|
|
2788
2878
|
return scan({
|
|
2789
2879
|
type: 'nativeScanner',
|
|
2790
2880
|
value: trimmed
|
|
2791
2881
|
});
|
|
2792
2882
|
case 6:
|
|
2793
|
-
raw =
|
|
2794
|
-
return
|
|
2883
|
+
raw = _context34.sent;
|
|
2884
|
+
return _context34.abrupt("return", (_formatGlobalScanResu = (_formatGlobalScanResu2 = formatGlobalScanResult(raw, trimmed)) === null || _formatGlobalScanResu2 === void 0 ? void 0 : _formatGlobalScanResu2.searchType) !== null && _formatGlobalScanResu !== void 0 ? _formatGlobalScanResu : null);
|
|
2795
2885
|
case 8:
|
|
2796
2886
|
case "end":
|
|
2797
|
-
return
|
|
2887
|
+
return _context34.stop();
|
|
2798
2888
|
}
|
|
2799
|
-
},
|
|
2889
|
+
}, _callee34, this);
|
|
2800
2890
|
}));
|
|
2801
2891
|
function getGlobalScanCodeType(_x23) {
|
|
2802
2892
|
return _getGlobalScanCodeType.apply(this, arguments);
|
|
@@ -2880,11 +2970,11 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2880
2970
|
}, {
|
|
2881
2971
|
key: "addAddTimeProductToBooking",
|
|
2882
2972
|
value: (function () {
|
|
2883
|
-
var _addAddTimeProductToBooking = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
2884
|
-
return _regeneratorRuntime().wrap(function
|
|
2885
|
-
while (1) switch (
|
|
2973
|
+
var _addAddTimeProductToBooking = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee35(input) {
|
|
2974
|
+
return _regeneratorRuntime().wrap(function _callee35$(_context35) {
|
|
2975
|
+
while (1) switch (_context35.prev = _context35.next) {
|
|
2886
2976
|
case 0:
|
|
2887
|
-
return
|
|
2977
|
+
return _context35.abrupt("return", this.addAddTimeProductsToBooking({
|
|
2888
2978
|
booking: input.booking,
|
|
2889
2979
|
products: [input],
|
|
2890
2980
|
coveredMinutes: input.coveredMinutes,
|
|
@@ -2892,9 +2982,9 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2892
2982
|
}));
|
|
2893
2983
|
case 1:
|
|
2894
2984
|
case "end":
|
|
2895
|
-
return
|
|
2985
|
+
return _context35.stop();
|
|
2896
2986
|
}
|
|
2897
|
-
},
|
|
2987
|
+
}, _callee35, this);
|
|
2898
2988
|
}));
|
|
2899
2989
|
function addAddTimeProductToBooking(_x24) {
|
|
2900
2990
|
return _addAddTimeProductToBooking.apply(this, arguments);
|
|
@@ -2914,16 +3004,16 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2914
3004
|
}, {
|
|
2915
3005
|
key: "addAddTimeProductsToBooking",
|
|
2916
3006
|
value: (function () {
|
|
2917
|
-
var _addAddTimeProductsToBooking = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
3007
|
+
var _addAddTimeProductsToBooking = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36(input) {
|
|
2918
3008
|
var _this9 = this,
|
|
2919
3009
|
_input$bookingPatch;
|
|
2920
3010
|
var bookingUid, orderLines, coveredMinutes, bookingTimePatch, result, _iterator2, _step2, line;
|
|
2921
|
-
return _regeneratorRuntime().wrap(function
|
|
2922
|
-
while (1) switch (
|
|
3011
|
+
return _regeneratorRuntime().wrap(function _callee36$(_context36) {
|
|
3012
|
+
while (1) switch (_context36.prev = _context36.next) {
|
|
2923
3013
|
case 0:
|
|
2924
3014
|
bookingUid = resolveBookingUidForAddTime(input === null || input === void 0 ? void 0 : input.booking);
|
|
2925
3015
|
if (bookingUid) {
|
|
2926
|
-
|
|
3016
|
+
_context36.next = 3;
|
|
2927
3017
|
break;
|
|
2928
3018
|
}
|
|
2929
3019
|
throw new Error('[BookingTicket] addAddTimeProductToBooking: booking.metadata.unique_identification_number 缺失');
|
|
@@ -2934,7 +3024,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2934
3024
|
};
|
|
2935
3025
|
});
|
|
2936
3026
|
if (this.store.order) {
|
|
2937
|
-
|
|
3027
|
+
_context36.next = 6;
|
|
2938
3028
|
break;
|
|
2939
3029
|
}
|
|
2940
3030
|
throw new Error('order 模块未初始化');
|
|
@@ -2948,53 +3038,53 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2948
3038
|
});
|
|
2949
3039
|
}
|
|
2950
3040
|
if (!(typeof this.store.order.addProductsToOrder === 'function')) {
|
|
2951
|
-
|
|
3041
|
+
_context36.next = 11;
|
|
2952
3042
|
break;
|
|
2953
3043
|
}
|
|
2954
|
-
return
|
|
3044
|
+
return _context36.abrupt("return", this.store.order.addProductsToOrder(orderLines));
|
|
2955
3045
|
case 11:
|
|
2956
3046
|
result = [];
|
|
2957
3047
|
_iterator2 = _createForOfIteratorHelper(orderLines);
|
|
2958
|
-
|
|
3048
|
+
_context36.prev = 13;
|
|
2959
3049
|
_iterator2.s();
|
|
2960
3050
|
case 15:
|
|
2961
3051
|
if ((_step2 = _iterator2.n()).done) {
|
|
2962
|
-
|
|
3052
|
+
_context36.next = 29;
|
|
2963
3053
|
break;
|
|
2964
3054
|
}
|
|
2965
3055
|
line = _step2.value;
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
3056
|
+
_context36.t0 = result.splice;
|
|
3057
|
+
_context36.t1 = result;
|
|
3058
|
+
_context36.t2 = [0, result.length];
|
|
3059
|
+
_context36.t3 = _toConsumableArray;
|
|
3060
|
+
_context36.next = 23;
|
|
2971
3061
|
return this.addProductToOrder(line.product);
|
|
2972
3062
|
case 23:
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
3063
|
+
_context36.t4 = _context36.sent;
|
|
3064
|
+
_context36.t5 = (0, _context36.t3)(_context36.t4);
|
|
3065
|
+
_context36.t6 = _context36.t2.concat.call(_context36.t2, _context36.t5);
|
|
3066
|
+
_context36.t0.apply.call(_context36.t0, _context36.t1, _context36.t6);
|
|
2977
3067
|
case 27:
|
|
2978
|
-
|
|
3068
|
+
_context36.next = 15;
|
|
2979
3069
|
break;
|
|
2980
3070
|
case 29:
|
|
2981
|
-
|
|
3071
|
+
_context36.next = 34;
|
|
2982
3072
|
break;
|
|
2983
3073
|
case 31:
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
_iterator2.e(
|
|
3074
|
+
_context36.prev = 31;
|
|
3075
|
+
_context36.t7 = _context36["catch"](13);
|
|
3076
|
+
_iterator2.e(_context36.t7);
|
|
2987
3077
|
case 34:
|
|
2988
|
-
|
|
3078
|
+
_context36.prev = 34;
|
|
2989
3079
|
_iterator2.f();
|
|
2990
|
-
return
|
|
3080
|
+
return _context36.finish(34);
|
|
2991
3081
|
case 37:
|
|
2992
|
-
return
|
|
3082
|
+
return _context36.abrupt("return", result);
|
|
2993
3083
|
case 38:
|
|
2994
3084
|
case "end":
|
|
2995
|
-
return
|
|
3085
|
+
return _context36.stop();
|
|
2996
3086
|
}
|
|
2997
|
-
},
|
|
3087
|
+
}, _callee36, this, [[13, 31, 34, 37]]);
|
|
2998
3088
|
}));
|
|
2999
3089
|
function addAddTimeProductsToBooking(_x25) {
|
|
3000
3090
|
return _addAddTimeProductsToBooking.apply(this, arguments);
|
|
@@ -3004,40 +3094,40 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3004
3094
|
}, {
|
|
3005
3095
|
key: "setOtherParams",
|
|
3006
3096
|
value: function () {
|
|
3007
|
-
var _setOtherParams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
3097
|
+
var _setOtherParams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee37(params) {
|
|
3008
3098
|
var _ref19,
|
|
3009
3099
|
_ref19$cover,
|
|
3010
3100
|
cover,
|
|
3011
3101
|
invoiceContextChanged,
|
|
3012
|
-
|
|
3013
|
-
return _regeneratorRuntime().wrap(function
|
|
3014
|
-
while (1) switch (
|
|
3102
|
+
_args37 = arguments;
|
|
3103
|
+
return _regeneratorRuntime().wrap(function _callee37$(_context37) {
|
|
3104
|
+
while (1) switch (_context37.prev = _context37.next) {
|
|
3015
3105
|
case 0:
|
|
3016
|
-
_ref19 =
|
|
3017
|
-
|
|
3106
|
+
_ref19 = _args37.length > 1 && _args37[1] !== undefined ? _args37[1] : {}, _ref19$cover = _ref19.cover, cover = _ref19$cover === void 0 ? false : _ref19$cover;
|
|
3107
|
+
_context37.next = 3;
|
|
3018
3108
|
return _get(_getPrototypeOf(BookingTicketImpl.prototype), "setOtherParams", this).call(this, params, {
|
|
3019
3109
|
cover: cover
|
|
3020
3110
|
});
|
|
3021
3111
|
case 3:
|
|
3022
3112
|
invoiceContextChanged = (params === null || params === void 0 ? void 0 : params.businessCode) !== undefined || (params === null || params === void 0 ? void 0 : params.business_code) !== undefined || (params === null || params === void 0 ? void 0 : params.channel) !== undefined || (params === null || params === void 0 ? void 0 : params.platform) !== undefined || Object.prototype.hasOwnProperty.call(params, 'openData');
|
|
3023
3113
|
if (!invoiceContextChanged) {
|
|
3024
|
-
|
|
3114
|
+
_context37.next = 7;
|
|
3025
3115
|
break;
|
|
3026
3116
|
}
|
|
3027
|
-
|
|
3117
|
+
_context37.next = 7;
|
|
3028
3118
|
return this.prepareInvoiceTemplateAtSolutionReady(Object.prototype.hasOwnProperty.call(params, 'openData') ? this.getInjectedOpenDataConfig() : undefined);
|
|
3029
3119
|
case 7:
|
|
3030
3120
|
if (!((params === null || params === void 0 ? void 0 : params.businessCode) !== undefined || (params === null || params === void 0 ? void 0 : params.business_code) !== undefined)) {
|
|
3031
|
-
|
|
3121
|
+
_context37.next = 10;
|
|
3032
3122
|
break;
|
|
3033
3123
|
}
|
|
3034
|
-
|
|
3124
|
+
_context37.next = 10;
|
|
3035
3125
|
return this.configureIdGeneratorFromOpenData();
|
|
3036
3126
|
case 10:
|
|
3037
3127
|
case "end":
|
|
3038
|
-
return
|
|
3128
|
+
return _context37.stop();
|
|
3039
3129
|
}
|
|
3040
|
-
},
|
|
3130
|
+
}, _callee37, this);
|
|
3041
3131
|
}));
|
|
3042
3132
|
function setOtherParams(_x26) {
|
|
3043
3133
|
return _setOtherParams.apply(this, arguments);
|
|
@@ -3056,15 +3146,15 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3056
3146
|
}, {
|
|
3057
3147
|
key: "handlePrintWristband",
|
|
3058
3148
|
value: function () {
|
|
3059
|
-
var _handlePrintWristband = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
3149
|
+
var _handlePrintWristband = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee38(params) {
|
|
3060
3150
|
var _this$getOrderIdentit2;
|
|
3061
3151
|
var deviceTask, deviceId, idempotencyKey;
|
|
3062
|
-
return _regeneratorRuntime().wrap(function
|
|
3063
|
-
while (1) switch (
|
|
3152
|
+
return _regeneratorRuntime().wrap(function _callee38$(_context38) {
|
|
3153
|
+
while (1) switch (_context38.prev = _context38.next) {
|
|
3064
3154
|
case 0:
|
|
3065
3155
|
deviceTask = this.getDeviceTaskPlugin();
|
|
3066
3156
|
if (deviceTask !== null && deviceTask !== void 0 && deviceTask.dispatch) {
|
|
3067
|
-
|
|
3157
|
+
_context38.next = 4;
|
|
3068
3158
|
break;
|
|
3069
3159
|
}
|
|
3070
3160
|
this.logger.addLog({
|
|
@@ -3074,7 +3164,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3074
3164
|
voucher_ids: Array.isArray(params.voucher_ids) ? params.voucher_ids : [params.voucher_ids]
|
|
3075
3165
|
}
|
|
3076
3166
|
});
|
|
3077
|
-
return
|
|
3167
|
+
return _context38.abrupt("return");
|
|
3078
3168
|
case 4:
|
|
3079
3169
|
this.logger.addLog({
|
|
3080
3170
|
type: 'info',
|
|
@@ -3083,10 +3173,10 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3083
3173
|
voucher_ids: Array.isArray(params.voucher_ids) ? params.voucher_ids : [params.voucher_ids]
|
|
3084
3174
|
}
|
|
3085
3175
|
});
|
|
3086
|
-
|
|
3176
|
+
_context38.next = 7;
|
|
3087
3177
|
return this.getShortNumberOrDeviceId();
|
|
3088
3178
|
case 7:
|
|
3089
|
-
deviceId =
|
|
3179
|
+
deviceId = _context38.sent;
|
|
3090
3180
|
idempotencyKey = createUuidV4();
|
|
3091
3181
|
deviceTask.dispatch({
|
|
3092
3182
|
action: 'print_all',
|
|
@@ -3106,9 +3196,9 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3106
3196
|
});
|
|
3107
3197
|
case 10:
|
|
3108
3198
|
case "end":
|
|
3109
|
-
return
|
|
3199
|
+
return _context38.stop();
|
|
3110
3200
|
}
|
|
3111
|
-
},
|
|
3201
|
+
}, _callee38, this);
|
|
3112
3202
|
}));
|
|
3113
3203
|
function handlePrintWristband(_x27) {
|
|
3114
3204
|
return _handlePrintWristband.apply(this, arguments);
|
|
@@ -3118,11 +3208,11 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3118
3208
|
}, {
|
|
3119
3209
|
key: "handleRedeem",
|
|
3120
3210
|
value: function () {
|
|
3121
|
-
var _handleRedeem = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
3211
|
+
var _handleRedeem = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee39(params) {
|
|
3122
3212
|
var _this$store$order7, _this$store$order7$ge, _this$store$order8, _ref20, _tempOrder$order_id2;
|
|
3123
3213
|
var voucherIds, status, voucherIdSet, tempOrder, vouchers, hasUpdatedVoucher, nextVouchers, identity, externalSaleNumber, orderId, orderLookup;
|
|
3124
|
-
return _regeneratorRuntime().wrap(function
|
|
3125
|
-
while (1) switch (
|
|
3214
|
+
return _regeneratorRuntime().wrap(function _callee39$(_context39) {
|
|
3215
|
+
while (1) switch (_context39.prev = _context39.next) {
|
|
3126
3216
|
case 0:
|
|
3127
3217
|
voucherIds = Array.isArray(params.voucher_ids) ? params.voucher_ids : [];
|
|
3128
3218
|
status = params.is_checkin ? 'used' : 'unused';
|
|
@@ -3146,20 +3236,20 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3146
3236
|
});
|
|
3147
3237
|
});
|
|
3148
3238
|
if (!(tempOrder && hasUpdatedVoucher)) {
|
|
3149
|
-
|
|
3239
|
+
_context39.next = 11;
|
|
3150
3240
|
break;
|
|
3151
3241
|
}
|
|
3152
|
-
|
|
3242
|
+
_context39.next = 11;
|
|
3153
3243
|
return this.replaceTempOrder(_objectSpread(_objectSpread({}, tempOrder), {}, {
|
|
3154
3244
|
vouchers: nextVouchers
|
|
3155
3245
|
}));
|
|
3156
3246
|
case 11:
|
|
3157
3247
|
this.core.effects.emit("".concat(this.name, ":onVouchersChange"), {});
|
|
3158
3248
|
if (!(voucherIds.length === 0)) {
|
|
3159
|
-
|
|
3249
|
+
_context39.next = 14;
|
|
3160
3250
|
break;
|
|
3161
3251
|
}
|
|
3162
|
-
return
|
|
3252
|
+
return _context39.abrupt("return", {
|
|
3163
3253
|
code: 200,
|
|
3164
3254
|
status: true,
|
|
3165
3255
|
message: '',
|
|
@@ -3170,7 +3260,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3170
3260
|
externalSaleNumber = (tempOrder === null || tempOrder === void 0 ? void 0 : tempOrder.external_sale_number) || (identity === null || identity === void 0 ? void 0 : identity.externalSaleNumber) || undefined;
|
|
3171
3261
|
orderId = (_ref20 = (_tempOrder$order_id2 = tempOrder === null || tempOrder === void 0 ? void 0 : tempOrder.order_id) !== null && _tempOrder$order_id2 !== void 0 ? _tempOrder$order_id2 : identity === null || identity === void 0 ? void 0 : identity.orderId) !== null && _ref20 !== void 0 ? _ref20 : undefined;
|
|
3172
3262
|
orderLookup = externalSaleNumber || orderId || (identity === null || identity === void 0 ? void 0 : identity.orderNumber) || (identity === null || identity === void 0 ? void 0 : identity.shopOrderNumber) || (identity === null || identity === void 0 ? void 0 : identity.shopFullOrderNumber) || undefined;
|
|
3173
|
-
return
|
|
3263
|
+
return _context39.abrupt("return", this.request.post('/machinecode/batch', {
|
|
3174
3264
|
ids: voucherIds,
|
|
3175
3265
|
status: status,
|
|
3176
3266
|
order_lookup: orderLookup,
|
|
@@ -3181,9 +3271,9 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3181
3271
|
}));
|
|
3182
3272
|
case 19:
|
|
3183
3273
|
case "end":
|
|
3184
|
-
return
|
|
3274
|
+
return _context39.stop();
|
|
3185
3275
|
}
|
|
3186
|
-
},
|
|
3276
|
+
}, _callee39, this);
|
|
3187
3277
|
}));
|
|
3188
3278
|
function handleRedeem(_x28) {
|
|
3189
3279
|
return _handleRedeem.apply(this, arguments);
|
|
@@ -3197,12 +3287,12 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3197
3287
|
}, {
|
|
3198
3288
|
key: "destroy",
|
|
3199
3289
|
value: (function () {
|
|
3200
|
-
var _destroy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
3290
|
+
var _destroy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40() {
|
|
3201
3291
|
var _this$scan;
|
|
3202
|
-
return _regeneratorRuntime().wrap(function
|
|
3203
|
-
while (1) switch (
|
|
3292
|
+
return _regeneratorRuntime().wrap(function _callee40$(_context40) {
|
|
3293
|
+
while (1) switch (_context40.prev = _context40.next) {
|
|
3204
3294
|
case 0:
|
|
3205
|
-
|
|
3295
|
+
_context40.next = 2;
|
|
3206
3296
|
return _get(_getPrototypeOf(BookingTicketImpl.prototype), "destroy", this).call(this);
|
|
3207
3297
|
case 2:
|
|
3208
3298
|
try {
|
|
@@ -3213,9 +3303,9 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
3213
3303
|
scanCache.clear();
|
|
3214
3304
|
case 4:
|
|
3215
3305
|
case "end":
|
|
3216
|
-
return
|
|
3306
|
+
return _context40.stop();
|
|
3217
3307
|
}
|
|
3218
|
-
},
|
|
3308
|
+
}, _callee40, this);
|
|
3219
3309
|
}));
|
|
3220
3310
|
function destroy() {
|
|
3221
3311
|
return _destroy.apply(this, arguments);
|
|
@@ -208,6 +208,10 @@ export interface AddAddTimeProductsToBookingInput {
|
|
|
208
208
|
}
|
|
209
209
|
/** 扫码宿主桥接:SalesSdk 在 pubsub 订阅回调里注入,OS 需要 UI 时直接调用 */
|
|
210
210
|
export interface GlobalScanHostBridge {
|
|
211
|
+
/** product-voucher handles voucher codes only; product-voucher-collection also resolves wallet customer vouchers. */
|
|
212
|
+
scanScope?: 'all' | 'product-voucher' | 'product-voucher-collection';
|
|
213
|
+
/** A one-shot entry may outlive its page while requests are in flight. */
|
|
214
|
+
isCurrent?: () => boolean;
|
|
211
215
|
openProductDetail?: (payload: Record<string, any>) => Promise<any | null>;
|
|
212
216
|
openBookingEdit?: (payload: Record<string, any>) => Promise<any | null>;
|
|
213
217
|
confirmDetail?: (input: {
|
|
@@ -232,11 +236,13 @@ export interface GlobalScanHostBridge {
|
|
|
232
236
|
*/
|
|
233
237
|
applyPromotionCode?: (code: string, customerId?: number, options?: {
|
|
234
238
|
suppressFailureNotification?: boolean;
|
|
239
|
+
productVouchersOnly?: boolean;
|
|
235
240
|
}) => Promise<{
|
|
236
241
|
isAvailable?: boolean;
|
|
237
242
|
isAccepted?: boolean;
|
|
238
243
|
type?: string;
|
|
239
244
|
unavailableReason?: string;
|
|
245
|
+
scannedDiscountList?: Record<string, any>[];
|
|
240
246
|
}>;
|
|
241
247
|
/** 当前订单已有其他客户时,由宿主复用客户组件完成确认及切换。 */
|
|
242
248
|
requestCustomerSwitch?: (customer: ICustomer) => Promise<boolean | null>;
|
|
@@ -244,7 +250,7 @@ export interface GlobalScanHostBridge {
|
|
|
244
250
|
refresh?: () => void;
|
|
245
251
|
}
|
|
246
252
|
/** handleGlobalScanCode 结构化返回 */
|
|
247
|
-
export type GlobalScanHandleResult = {
|
|
253
|
+
export type GlobalScanHandleResult = ({
|
|
248
254
|
status: 'success';
|
|
249
255
|
kind: 'customer' | 'products' | 'promotion';
|
|
250
256
|
meta?: {
|
|
@@ -257,5 +263,11 @@ export type GlobalScanHandleResult = {
|
|
|
257
263
|
status: 'cancelled';
|
|
258
264
|
} | {
|
|
259
265
|
status: 'failed';
|
|
260
|
-
reason: 'empty_code' | 'not_found' | 'invalid_data' | 'no_bridge';
|
|
266
|
+
reason: 'empty_code' | 'not_found' | 'invalid_data' | 'no_bridge' | 'entry_resolution_failed';
|
|
267
|
+
}) & {
|
|
268
|
+
/** product-voucher-collection returns voucher candidates; the caller decides how to use them. */
|
|
269
|
+
redemption?: {
|
|
270
|
+
source: 'wallet' | 'scan';
|
|
271
|
+
vouchers: Record<string, any>[];
|
|
272
|
+
};
|
|
261
273
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/solution/BookingTicket/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,WAAW,EACX,cAAc,EACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,oBAAoB,EAAE,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AAG,IAAI,CAAC,CAAC;IACzE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5E,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,iCAAiC;AACjC,MAAM,MAAM,sBAAsB,GAAG,CACjC;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,UAAU,GAAG,UAAU,GAAG,WAAW,CAAC;IAAC,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAC7F;IACE,MAAM,EAAE,SAAS,CAAC;IAClB,IAAI,EAAE,WAAW,GAAG,gBAAgB,GAAG,qBAAqB,CAAC;CAC9D,GACD;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,GACvB;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,YAAY,GAAG,WAAW,GAAG,cAAc,GAAG,WAAW,GAAG,yBAAyB,CAAA;CAAE,CACtH,GAAG;IACF,iGAAiG;IACjG,UAAU,CAAC,EAAE;QAAE,MAAM,EAAE,QAAQ,GAAG,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAA;KAAE,CAAC;CAC7E,CAAC"}
|
|
@@ -5,7 +5,7 @@ import type { OrderProduct, OrderProductIdentity, AddProductBookingInput } from
|
|
|
5
5
|
* cart.addProduct 两阶段决策(与 ticketBooking `handleSelectProduct` 对齐):
|
|
6
6
|
*
|
|
7
7
|
* 1. `requiresDetail`:规格 / SKU / 套餐 / Session / 称重弹窗(门禁:`isOpenDetailModal` / `cartDetailValue` / `open_sold_weight`)
|
|
8
|
-
* 2. `requiresBookingEdit`:资源 /
|
|
8
|
+
* 2. `requiresBookingEdit`:资源 / 时间编辑抽屉(自助终端强制进入;其他渠道由 `getIsAutoClose` 决定)
|
|
9
9
|
* 3. `add`:两关均通过,直接 transform + 加车
|
|
10
10
|
*/
|
|
11
11
|
export type AddProductDecision = {
|