@pisell/pisellos 0.10.7 → 0.10.9
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/core/index.js +0 -1
- package/dist/model/strategy/adapter/dataVariant/evaluator.d.ts +18 -2
- package/dist/model/strategy/adapter/dataVariant/evaluator.js +287 -101
- package/dist/model/strategy/adapter/dataVariant/type.d.ts +25 -0
- package/dist/model/strategy/adapter/walletPass/evaluator.js +0 -2
- package/dist/model/strategy/adapter/walletPass/type.d.ts +5 -0
- package/dist/model/strategy/adapter/walletPass/utils.js +57 -26
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +18 -12
- package/dist/modules/BookingContext/utils/productExtend.js +5 -9
- package/dist/modules/BookingContext/utils/timeSlices.js +24 -3
- package/dist/modules/Customer/index.d.ts +4 -0
- package/dist/modules/Customer/index.js +91 -59
- package/dist/modules/Customer/types.d.ts +2 -0
- package/dist/modules/Discount/index.d.ts +2 -0
- package/dist/modules/Discount/index.js +38 -5
- package/dist/modules/Discount/types.d.ts +11 -0
- package/dist/modules/Order/index.d.ts +32 -6
- package/dist/modules/Order/index.js +1165 -819
- package/dist/modules/Order/types.d.ts +32 -4
- package/dist/modules/Order/types.js +11 -0
- package/dist/modules/Order/utils/discountProductLineIdentity.d.ts +45 -0
- package/dist/modules/Order/utils/discountProductLineIdentity.js +227 -0
- package/dist/modules/Order/utils/virtualSettlement.d.ts +56 -0
- package/dist/modules/Order/utils/virtualSettlement.js +271 -0
- package/dist/modules/Order/utils.js +89 -48
- package/dist/modules/Payment/types.d.ts +2 -0
- package/dist/modules/Payment/utils.js +4 -1
- package/dist/modules/Payment/walletpass.d.ts +11 -0
- package/dist/modules/Payment/walletpass.js +235 -60
- package/dist/modules/Product/types.d.ts +23 -0
- package/dist/modules/ProductList/index.d.ts +15 -2
- package/dist/modules/ProductList/index.js +92 -13
- package/dist/modules/Rules/index.js +125 -52
- package/dist/modules/SalesSummary/index.d.ts +1 -0
- package/dist/modules/SalesSummary/index.js +4 -3
- package/dist/modules/SalesSummary/types.d.ts +1 -0
- package/dist/modules/SalesSummary/utils.d.ts +1 -0
- package/dist/modules/SalesSummary/utils.js +28 -2
- package/dist/server/index.d.ts +15 -0
- package/dist/server/index.js +894 -781
- package/dist/server/modules/order/index.d.ts +2 -0
- package/dist/server/modules/order/index.js +261 -96
- package/dist/server/modules/order/types.d.ts +1 -1
- package/dist/server/utils/small-ticket.js +2 -1
- package/dist/solution/BaseSales/index.d.ts +41 -7
- package/dist/solution/BaseSales/index.js +1405 -974
- package/dist/solution/BaseSales/utils/cartPromotion.js +26 -3
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +1 -0
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +79 -13
- package/dist/solution/BaseSales/utils.js +31 -20
- package/dist/solution/BookingByStep/index.d.ts +3 -3
- package/dist/solution/BookingTicket/index.d.ts +5 -1
- package/dist/solution/BookingTicket/index.js +221 -162
- package/dist/solution/BookingTicket/types.d.ts +3 -0
- package/dist/solution/BookingTicket/utils/addProductDecision.js +2 -1
- package/dist/solution/BookingTicket/utils/cartView.js +44 -32
- package/dist/solution/Sales/index.d.ts +1 -0
- package/dist/solution/Sales/index.js +16 -2
- package/dist/solution/ScanOrder/index.js +25 -64
- package/dist/solution/ScanOrder/utils.js +31 -20
- package/dist/solution/UnifiedBookingSales/index.d.ts +5 -4
- package/dist/solution/UnifiedBookingSales/index.js +51 -39
- package/lib/core/index.js +0 -1
- package/lib/model/strategy/adapter/dataVariant/evaluator.d.ts +18 -2
- package/lib/model/strategy/adapter/dataVariant/evaluator.js +170 -7
- package/lib/model/strategy/adapter/dataVariant/type.d.ts +25 -0
- package/lib/model/strategy/adapter/walletPass/evaluator.js +0 -2
- package/lib/model/strategy/adapter/walletPass/type.d.ts +5 -0
- package/lib/model/strategy/adapter/walletPass/utils.js +62 -11
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +6 -1
- package/lib/modules/BookingContext/utils/productExtend.js +4 -3
- package/lib/modules/BookingContext/utils/timeSlices.js +18 -3
- package/lib/modules/Customer/index.d.ts +4 -0
- package/lib/modules/Customer/index.js +11 -0
- package/lib/modules/Customer/types.d.ts +2 -0
- package/lib/modules/Discount/index.d.ts +2 -0
- package/lib/modules/Discount/index.js +37 -3
- package/lib/modules/Discount/types.d.ts +11 -0
- package/lib/modules/Order/index.d.ts +32 -6
- package/lib/modules/Order/index.js +518 -148
- package/lib/modules/Order/types.d.ts +32 -4
- package/lib/modules/Order/utils/discountProductLineIdentity.d.ts +45 -0
- package/lib/modules/Order/utils/discountProductLineIdentity.js +170 -0
- package/lib/modules/Order/utils/virtualSettlement.d.ts +56 -0
- package/lib/modules/Order/utils/virtualSettlement.js +300 -0
- package/lib/modules/Order/utils.js +65 -21
- package/lib/modules/Payment/types.d.ts +2 -0
- package/lib/modules/Payment/utils.js +5 -1
- package/lib/modules/Payment/walletpass.d.ts +11 -0
- package/lib/modules/Payment/walletpass.js +198 -17
- package/lib/modules/Product/types.d.ts +23 -0
- package/lib/modules/ProductList/index.d.ts +15 -2
- package/lib/modules/ProductList/index.js +85 -3
- package/lib/modules/Rules/index.js +100 -20
- package/lib/modules/SalesSummary/index.d.ts +1 -0
- package/lib/modules/SalesSummary/index.js +10 -2
- package/lib/modules/SalesSummary/types.d.ts +1 -0
- package/lib/modules/SalesSummary/utils.d.ts +1 -0
- package/lib/modules/SalesSummary/utils.js +30 -2
- package/lib/server/index.d.ts +15 -0
- package/lib/server/index.js +105 -14
- package/lib/server/modules/order/index.d.ts +2 -0
- package/lib/server/modules/order/index.js +75 -5
- package/lib/server/modules/order/types.d.ts +1 -1
- package/lib/server/utils/small-ticket.js +1 -1
- package/lib/solution/BaseSales/index.d.ts +41 -7
- package/lib/solution/BaseSales/index.js +325 -39
- package/lib/solution/BaseSales/utils/cartPromotion.js +26 -2
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +1 -0
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +62 -12
- package/lib/solution/BaseSales/utils.js +29 -18
- package/lib/solution/BookingByStep/index.d.ts +3 -3
- package/lib/solution/BookingTicket/index.d.ts +5 -1
- package/lib/solution/BookingTicket/index.js +31 -6
- package/lib/solution/BookingTicket/types.d.ts +3 -0
- package/lib/solution/BookingTicket/utils/addProductDecision.js +2 -1
- package/lib/solution/BookingTicket/utils/cartView.js +43 -30
- package/lib/solution/Sales/index.d.ts +1 -0
- package/lib/solution/Sales/index.js +15 -3
- package/lib/solution/ScanOrder/index.js +17 -54
- package/lib/solution/ScanOrder/utils.js +29 -18
- package/lib/solution/UnifiedBookingSales/index.d.ts +5 -4
- package/lib/solution/UnifiedBookingSales/index.js +35 -26
- package/package.json +1 -1
|
@@ -691,11 +691,11 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
691
691
|
return null;
|
|
692
692
|
}
|
|
693
693
|
}, {
|
|
694
|
-
key: "
|
|
694
|
+
key: "resolveCustomerById",
|
|
695
695
|
value: function () {
|
|
696
|
-
var
|
|
696
|
+
var _resolveCustomerById = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(customerId) {
|
|
697
697
|
var _result$list;
|
|
698
|
-
var localCustomers, localCustomer, normalizedLocalCustomer, result, remoteCustomer;
|
|
698
|
+
var localCustomers, localCustomer, normalizedLocalCustomer, result, remoteCustomer, detailCustomer;
|
|
699
699
|
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
700
700
|
while (1) switch (_context9.prev = _context9.next) {
|
|
701
701
|
case 0:
|
|
@@ -717,18 +717,42 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
717
717
|
case 7:
|
|
718
718
|
result = _context9.sent;
|
|
719
719
|
remoteCustomer = this.findCustomerById((result === null || result === void 0 ? void 0 : result.list) || [], customerId) || (result === null || result === void 0 || (_result$list = result.list) === null || _result$list === void 0 ? void 0 : _result$list[0]) || null;
|
|
720
|
-
|
|
721
|
-
|
|
720
|
+
if (!remoteCustomer) {
|
|
721
|
+
_context9.next = 11;
|
|
722
|
+
break;
|
|
723
|
+
}
|
|
724
|
+
return _context9.abrupt("return", this.normalizeCustomer(remoteCustomer));
|
|
725
|
+
case 11:
|
|
726
|
+
_context9.prev = 11;
|
|
727
|
+
_context9.next = 14;
|
|
728
|
+
return this.store.customer.queryCustomerDetail(customerId);
|
|
729
|
+
case 14:
|
|
730
|
+
detailCustomer = _context9.sent;
|
|
731
|
+
return _context9.abrupt("return", detailCustomer ? this.normalizeCustomer(detailCustomer) : null);
|
|
732
|
+
case 18:
|
|
733
|
+
_context9.prev = 18;
|
|
734
|
+
_context9.t0 = _context9["catch"](11);
|
|
735
|
+
console.warn('[BookingTicket] resolveCustomerById detail request failed', {
|
|
736
|
+
customerId: customerId,
|
|
737
|
+
error: _context9.t0
|
|
738
|
+
});
|
|
739
|
+
return _context9.abrupt("return", null);
|
|
740
|
+
case 22:
|
|
722
741
|
case "end":
|
|
723
742
|
return _context9.stop();
|
|
724
743
|
}
|
|
725
|
-
}, _callee9, this);
|
|
744
|
+
}, _callee9, this, [[11, 18]]);
|
|
726
745
|
}));
|
|
727
|
-
function
|
|
728
|
-
return
|
|
746
|
+
function resolveCustomerById(_x6) {
|
|
747
|
+
return _resolveCustomerById.apply(this, arguments);
|
|
729
748
|
}
|
|
730
|
-
return
|
|
731
|
-
}()
|
|
749
|
+
return resolveCustomerById;
|
|
750
|
+
}() /** 兼容既有优惠码扫码逻辑。 */
|
|
751
|
+
}, {
|
|
752
|
+
key: "resolveCustomerByDiscountCustomerId",
|
|
753
|
+
value: function resolveCustomerByDiscountCustomerId(customerId) {
|
|
754
|
+
return this.resolveCustomerById(customerId);
|
|
755
|
+
}
|
|
732
756
|
}, {
|
|
733
757
|
key: "findCustomerById",
|
|
734
758
|
value: function findCustomerById() {
|
|
@@ -1739,6 +1763,44 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
1739
1763
|
value: function waitForOrderCustomerPromotionRefresh() {
|
|
1740
1764
|
return this.orderCustomerPromotionRefreshInFlight || Promise.resolve();
|
|
1741
1765
|
}
|
|
1766
|
+
}, {
|
|
1767
|
+
key: "prepareProductPriceQueryContext",
|
|
1768
|
+
value: function () {
|
|
1769
|
+
var _prepareProductPriceQueryContext = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23(customerId) {
|
|
1770
|
+
var normalizedCustomerId, refreshTask, shouldWait;
|
|
1771
|
+
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
|
|
1772
|
+
while (1) switch (_context23.prev = _context23.next) {
|
|
1773
|
+
case 0:
|
|
1774
|
+
_context23.next = 2;
|
|
1775
|
+
return Promise.resolve();
|
|
1776
|
+
case 2:
|
|
1777
|
+
normalizedCustomerId = Number(customerId || 0);
|
|
1778
|
+
refreshTask = this.orderCustomerDiscountRefreshInFlight;
|
|
1779
|
+
shouldWait = normalizedCustomerId > 1 && this.orderCustomerDiscountRefreshCustomerId === normalizedCustomerId && Boolean(refreshTask);
|
|
1780
|
+
if (!(shouldWait && refreshTask)) {
|
|
1781
|
+
_context23.next = 8;
|
|
1782
|
+
break;
|
|
1783
|
+
}
|
|
1784
|
+
_context23.next = 8;
|
|
1785
|
+
return refreshTask;
|
|
1786
|
+
case 8:
|
|
1787
|
+
case "end":
|
|
1788
|
+
return _context23.stop();
|
|
1789
|
+
}
|
|
1790
|
+
}, _callee23, this);
|
|
1791
|
+
}));
|
|
1792
|
+
function prepareProductPriceQueryContext(_x16) {
|
|
1793
|
+
return _prepareProductPriceQueryContext.apply(this, arguments);
|
|
1794
|
+
}
|
|
1795
|
+
return prepareProductPriceQueryContext;
|
|
1796
|
+
}()
|
|
1797
|
+
}, {
|
|
1798
|
+
key: "preferAuthoritativeProductQueryPrice",
|
|
1799
|
+
value: function preferAuthoritativeProductQueryPrice() {
|
|
1800
|
+
// BookingTicket 的 /product/query 已按预约时间、客户及 Wallet 上下文执行
|
|
1801
|
+
// 智能定价;再次应用 legacy quotation 会把最终价覆盖成另一套时段价格。
|
|
1802
|
+
return true;
|
|
1803
|
+
}
|
|
1742
1804
|
|
|
1743
1805
|
/**
|
|
1744
1806
|
* 获取客户分页信息
|
|
@@ -1780,29 +1842,29 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
1780
1842
|
}, {
|
|
1781
1843
|
key: "changeCustomerPage",
|
|
1782
1844
|
value: (function () {
|
|
1783
|
-
var _changeCustomerPage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1845
|
+
var _changeCustomerPage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(page, pageSize) {
|
|
1784
1846
|
var _result4;
|
|
1785
|
-
return _regeneratorRuntime().wrap(function
|
|
1786
|
-
while (1) switch (
|
|
1847
|
+
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
|
|
1848
|
+
while (1) switch (_context24.prev = _context24.next) {
|
|
1787
1849
|
case 0:
|
|
1788
|
-
|
|
1789
|
-
|
|
1850
|
+
_context24.prev = 0;
|
|
1851
|
+
_context24.next = 3;
|
|
1790
1852
|
return this.store.customer.changeCustomerPage(page, pageSize);
|
|
1791
1853
|
case 3:
|
|
1792
|
-
_result4 =
|
|
1793
|
-
return
|
|
1854
|
+
_result4 = _context24.sent;
|
|
1855
|
+
return _context24.abrupt("return", _result4);
|
|
1794
1856
|
case 7:
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
console.error('Failed to change customer page:',
|
|
1798
|
-
throw
|
|
1857
|
+
_context24.prev = 7;
|
|
1858
|
+
_context24.t0 = _context24["catch"](0);
|
|
1859
|
+
console.error('Failed to change customer page:', _context24.t0);
|
|
1860
|
+
throw _context24.t0;
|
|
1799
1861
|
case 11:
|
|
1800
1862
|
case "end":
|
|
1801
|
-
return
|
|
1863
|
+
return _context24.stop();
|
|
1802
1864
|
}
|
|
1803
|
-
},
|
|
1865
|
+
}, _callee24, this, [[0, 7]]);
|
|
1804
1866
|
}));
|
|
1805
|
-
function changeCustomerPage(
|
|
1867
|
+
function changeCustomerPage(_x17, _x18) {
|
|
1806
1868
|
return _changeCustomerPage.apply(this, arguments);
|
|
1807
1869
|
}
|
|
1808
1870
|
return changeCustomerPage;
|
|
@@ -1815,28 +1877,28 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
1815
1877
|
}, {
|
|
1816
1878
|
key: "loadMoreCustomers",
|
|
1817
1879
|
value: (function () {
|
|
1818
|
-
var _loadMoreCustomers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1880
|
+
var _loadMoreCustomers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25() {
|
|
1819
1881
|
var _result5;
|
|
1820
|
-
return _regeneratorRuntime().wrap(function
|
|
1821
|
-
while (1) switch (
|
|
1882
|
+
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
|
|
1883
|
+
while (1) switch (_context25.prev = _context25.next) {
|
|
1822
1884
|
case 0:
|
|
1823
|
-
|
|
1824
|
-
|
|
1885
|
+
_context25.prev = 0;
|
|
1886
|
+
_context25.next = 3;
|
|
1825
1887
|
return this.store.customer.loadMoreCustomers();
|
|
1826
1888
|
case 3:
|
|
1827
|
-
_result5 =
|
|
1889
|
+
_result5 = _context25.sent;
|
|
1828
1890
|
this.core.effects.emit("".concat(this.name, ":onCustomerListUpdate"), _result5);
|
|
1829
|
-
return
|
|
1891
|
+
return _context25.abrupt("return", _result5);
|
|
1830
1892
|
case 8:
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
console.error('Failed to load more customers:',
|
|
1834
|
-
throw
|
|
1893
|
+
_context25.prev = 8;
|
|
1894
|
+
_context25.t0 = _context25["catch"](0);
|
|
1895
|
+
console.error('Failed to load more customers:', _context25.t0);
|
|
1896
|
+
throw _context25.t0;
|
|
1835
1897
|
case 12:
|
|
1836
1898
|
case "end":
|
|
1837
|
-
return
|
|
1899
|
+
return _context25.stop();
|
|
1838
1900
|
}
|
|
1839
|
-
},
|
|
1901
|
+
}, _callee25, this, [[0, 8]]);
|
|
1840
1902
|
}));
|
|
1841
1903
|
function loadMoreCustomers() {
|
|
1842
1904
|
return _loadMoreCustomers.apply(this, arguments);
|
|
@@ -1852,31 +1914,31 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
1852
1914
|
}, {
|
|
1853
1915
|
key: "resetAndLoadCustomers",
|
|
1854
1916
|
value: (function () {
|
|
1855
|
-
var _resetAndLoadCustomers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1917
|
+
var _resetAndLoadCustomers = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26() {
|
|
1856
1918
|
var params,
|
|
1857
1919
|
_result6,
|
|
1858
|
-
|
|
1859
|
-
return _regeneratorRuntime().wrap(function
|
|
1860
|
-
while (1) switch (
|
|
1920
|
+
_args26 = arguments;
|
|
1921
|
+
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
|
|
1922
|
+
while (1) switch (_context26.prev = _context26.next) {
|
|
1861
1923
|
case 0:
|
|
1862
|
-
params =
|
|
1863
|
-
|
|
1864
|
-
|
|
1924
|
+
params = _args26.length > 0 && _args26[0] !== undefined ? _args26[0] : {};
|
|
1925
|
+
_context26.prev = 1;
|
|
1926
|
+
_context26.next = 4;
|
|
1865
1927
|
return this.store.customer.resetAndLoadCustomers(params);
|
|
1866
1928
|
case 4:
|
|
1867
|
-
_result6 =
|
|
1929
|
+
_result6 = _context26.sent;
|
|
1868
1930
|
this.core.effects.emit("".concat(this.name, ":onCustomerListReset"), _result6);
|
|
1869
|
-
return
|
|
1931
|
+
return _context26.abrupt("return", _result6);
|
|
1870
1932
|
case 9:
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
console.error('Failed to reset and load customers:',
|
|
1874
|
-
throw
|
|
1933
|
+
_context26.prev = 9;
|
|
1934
|
+
_context26.t0 = _context26["catch"](1);
|
|
1935
|
+
console.error('Failed to reset and load customers:', _context26.t0);
|
|
1936
|
+
throw _context26.t0;
|
|
1875
1937
|
case 13:
|
|
1876
1938
|
case "end":
|
|
1877
|
-
return
|
|
1939
|
+
return _context26.stop();
|
|
1878
1940
|
}
|
|
1879
|
-
},
|
|
1941
|
+
}, _callee26, this, [[1, 9]]);
|
|
1880
1942
|
}));
|
|
1881
1943
|
function resetAndLoadCustomers() {
|
|
1882
1944
|
return _resetAndLoadCustomers.apply(this, arguments);
|
|
@@ -2037,16 +2099,16 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2037
2099
|
}, {
|
|
2038
2100
|
key: "getOtherParams",
|
|
2039
2101
|
value: (function () {
|
|
2040
|
-
var _getOtherParams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
2041
|
-
return _regeneratorRuntime().wrap(function
|
|
2042
|
-
while (1) switch (
|
|
2102
|
+
var _getOtherParams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27() {
|
|
2103
|
+
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
|
|
2104
|
+
while (1) switch (_context27.prev = _context27.next) {
|
|
2043
2105
|
case 0:
|
|
2044
|
-
return
|
|
2106
|
+
return _context27.abrupt("return", this.otherParams);
|
|
2045
2107
|
case 1:
|
|
2046
2108
|
case "end":
|
|
2047
|
-
return
|
|
2109
|
+
return _context27.stop();
|
|
2048
2110
|
}
|
|
2049
|
-
},
|
|
2111
|
+
}, _callee27, this);
|
|
2050
2112
|
}));
|
|
2051
2113
|
function getOtherParams() {
|
|
2052
2114
|
return _getOtherParams.apply(this, arguments);
|
|
@@ -2365,18 +2427,18 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2365
2427
|
}, {
|
|
2366
2428
|
key: "updateProductInOrder",
|
|
2367
2429
|
value: (function () {
|
|
2368
|
-
var _updateProductInOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
2369
|
-
return _regeneratorRuntime().wrap(function
|
|
2370
|
-
while (1) switch (
|
|
2430
|
+
var _updateProductInOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28(params) {
|
|
2431
|
+
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
|
|
2432
|
+
while (1) switch (_context28.prev = _context28.next) {
|
|
2371
2433
|
case 0:
|
|
2372
|
-
return
|
|
2434
|
+
return _context28.abrupt("return", this.updateOrderProduct(params));
|
|
2373
2435
|
case 1:
|
|
2374
2436
|
case "end":
|
|
2375
|
-
return
|
|
2437
|
+
return _context28.stop();
|
|
2376
2438
|
}
|
|
2377
|
-
},
|
|
2439
|
+
}, _callee28, this);
|
|
2378
2440
|
}));
|
|
2379
|
-
function updateProductInOrder(
|
|
2441
|
+
function updateProductInOrder(_x19) {
|
|
2380
2442
|
return _updateProductInOrder.apply(this, arguments);
|
|
2381
2443
|
}
|
|
2382
2444
|
return updateProductInOrder;
|
|
@@ -2398,47 +2460,47 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2398
2460
|
}, {
|
|
2399
2461
|
key: "handleGlobalScanCode",
|
|
2400
2462
|
value: (function () {
|
|
2401
|
-
var _handleGlobalScanCode = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
2463
|
+
var _handleGlobalScanCode = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29(code, bridge) {
|
|
2402
2464
|
var _this7 = this;
|
|
2403
2465
|
var trimmed, _bridge$onNotify, _bridge$refresh, localSearch, scanCallback, raw, formatted, _bridge$onNotify2, _result7, _bridge$onNotify3;
|
|
2404
|
-
return _regeneratorRuntime().wrap(function
|
|
2405
|
-
while (1) switch (
|
|
2466
|
+
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
|
|
2467
|
+
while (1) switch (_context29.prev = _context29.next) {
|
|
2406
2468
|
case 0:
|
|
2407
2469
|
trimmed = typeof code === 'string' ? code.trim() : '';
|
|
2408
2470
|
if (trimmed) {
|
|
2409
|
-
|
|
2471
|
+
_context29.next = 4;
|
|
2410
2472
|
break;
|
|
2411
2473
|
}
|
|
2412
2474
|
bridge === null || bridge === void 0 || (_bridge$onNotify = bridge.onNotify) === null || _bridge$onNotify === void 0 || _bridge$onNotify.call(bridge, 'fail', 'pisell2.text.scan-global-failed');
|
|
2413
|
-
return
|
|
2475
|
+
return _context29.abrupt("return", {
|
|
2414
2476
|
status: 'failed',
|
|
2415
2477
|
reason: 'empty_code'
|
|
2416
2478
|
});
|
|
2417
2479
|
case 4:
|
|
2418
|
-
|
|
2480
|
+
_context29.prev = 4;
|
|
2419
2481
|
localSearch = function localSearch(v) {
|
|
2420
2482
|
return _this7.store.products.findProductsByCodeOrBarcode(v);
|
|
2421
2483
|
};
|
|
2422
2484
|
scanCallback = handleGlobalScan(this.request, localSearch, this.getSubmitOrderSalesChannel());
|
|
2423
|
-
|
|
2485
|
+
_context29.next = 9;
|
|
2424
2486
|
return scanCallback({
|
|
2425
2487
|
type: 'nativeScanner',
|
|
2426
2488
|
value: trimmed
|
|
2427
2489
|
});
|
|
2428
2490
|
case 9:
|
|
2429
|
-
raw =
|
|
2491
|
+
raw = _context29.sent;
|
|
2430
2492
|
formatted = formatGlobalScanResult(raw, trimmed);
|
|
2431
2493
|
if (formatted) {
|
|
2432
|
-
|
|
2494
|
+
_context29.next = 14;
|
|
2433
2495
|
break;
|
|
2434
2496
|
}
|
|
2435
2497
|
bridge === null || bridge === void 0 || (_bridge$onNotify2 = bridge.onNotify) === null || _bridge$onNotify2 === void 0 || _bridge$onNotify2.call(bridge, 'fail', 'pisell2.text.scan-global-failed');
|
|
2436
|
-
return
|
|
2498
|
+
return _context29.abrupt("return", {
|
|
2437
2499
|
status: 'failed',
|
|
2438
2500
|
reason: 'not_found'
|
|
2439
2501
|
});
|
|
2440
2502
|
case 14:
|
|
2441
|
-
|
|
2503
|
+
_context29.next = 16;
|
|
2442
2504
|
return applyGlobalScan({
|
|
2443
2505
|
setOrderCustomer: function setOrderCustomer(customer) {
|
|
2444
2506
|
return _this7.setOrderCustomer(customer);
|
|
@@ -2473,25 +2535,25 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2473
2535
|
}
|
|
2474
2536
|
}, formatted, bridge);
|
|
2475
2537
|
case 16:
|
|
2476
|
-
_result7 =
|
|
2538
|
+
_result7 = _context29.sent;
|
|
2477
2539
|
bridge === null || bridge === void 0 || (_bridge$refresh = bridge.refresh) === null || _bridge$refresh === void 0 || _bridge$refresh.call(bridge);
|
|
2478
|
-
return
|
|
2540
|
+
return _context29.abrupt("return", _result7);
|
|
2479
2541
|
case 21:
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
console.error('[BookingTicket] handleGlobalScanCode failed',
|
|
2542
|
+
_context29.prev = 21;
|
|
2543
|
+
_context29.t0 = _context29["catch"](4);
|
|
2544
|
+
console.error('[BookingTicket] handleGlobalScanCode failed', _context29.t0);
|
|
2483
2545
|
bridge === null || bridge === void 0 || (_bridge$onNotify3 = bridge.onNotify) === null || _bridge$onNotify3 === void 0 || _bridge$onNotify3.call(bridge, 'fail', 'pisell2.text.scan-global-failed');
|
|
2484
|
-
return
|
|
2546
|
+
return _context29.abrupt("return", {
|
|
2485
2547
|
status: 'failed',
|
|
2486
2548
|
reason: 'not_found'
|
|
2487
2549
|
});
|
|
2488
2550
|
case 26:
|
|
2489
2551
|
case "end":
|
|
2490
|
-
return
|
|
2552
|
+
return _context29.stop();
|
|
2491
2553
|
}
|
|
2492
|
-
},
|
|
2554
|
+
}, _callee29, this, [[4, 21]]);
|
|
2493
2555
|
}));
|
|
2494
|
-
function handleGlobalScanCode(
|
|
2556
|
+
function handleGlobalScanCode(_x20, _x21) {
|
|
2495
2557
|
return _handleGlobalScanCode.apply(this, arguments);
|
|
2496
2558
|
}
|
|
2497
2559
|
return handleGlobalScanCode;
|
|
@@ -2573,11 +2635,11 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2573
2635
|
}, {
|
|
2574
2636
|
key: "addAddTimeProductToBooking",
|
|
2575
2637
|
value: (function () {
|
|
2576
|
-
var _addAddTimeProductToBooking = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
2577
|
-
return _regeneratorRuntime().wrap(function
|
|
2578
|
-
while (1) switch (
|
|
2638
|
+
var _addAddTimeProductToBooking = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30(input) {
|
|
2639
|
+
return _regeneratorRuntime().wrap(function _callee30$(_context30) {
|
|
2640
|
+
while (1) switch (_context30.prev = _context30.next) {
|
|
2579
2641
|
case 0:
|
|
2580
|
-
return
|
|
2642
|
+
return _context30.abrupt("return", this.addAddTimeProductsToBooking({
|
|
2581
2643
|
booking: input.booking,
|
|
2582
2644
|
products: [input],
|
|
2583
2645
|
coveredMinutes: input.coveredMinutes,
|
|
@@ -2585,11 +2647,11 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2585
2647
|
}));
|
|
2586
2648
|
case 1:
|
|
2587
2649
|
case "end":
|
|
2588
|
-
return
|
|
2650
|
+
return _context30.stop();
|
|
2589
2651
|
}
|
|
2590
|
-
},
|
|
2652
|
+
}, _callee30, this);
|
|
2591
2653
|
}));
|
|
2592
|
-
function addAddTimeProductToBooking(
|
|
2654
|
+
function addAddTimeProductToBooking(_x22) {
|
|
2593
2655
|
return _addAddTimeProductToBooking.apply(this, arguments);
|
|
2594
2656
|
}
|
|
2595
2657
|
return addAddTimeProductToBooking;
|
|
@@ -2607,16 +2669,16 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2607
2669
|
}, {
|
|
2608
2670
|
key: "addAddTimeProductsToBooking",
|
|
2609
2671
|
value: (function () {
|
|
2610
|
-
var _addAddTimeProductsToBooking = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
2672
|
+
var _addAddTimeProductsToBooking = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31(input) {
|
|
2611
2673
|
var _this8 = this,
|
|
2612
2674
|
_input$bookingPatch;
|
|
2613
2675
|
var bookingUid, orderLines, coveredMinutes, bookingTimePatch, result, _iterator2, _step2, line;
|
|
2614
|
-
return _regeneratorRuntime().wrap(function
|
|
2615
|
-
while (1) switch (
|
|
2676
|
+
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
|
|
2677
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
2616
2678
|
case 0:
|
|
2617
2679
|
bookingUid = resolveBookingUidForAddTime(input === null || input === void 0 ? void 0 : input.booking);
|
|
2618
2680
|
if (bookingUid) {
|
|
2619
|
-
|
|
2681
|
+
_context31.next = 3;
|
|
2620
2682
|
break;
|
|
2621
2683
|
}
|
|
2622
2684
|
throw new Error('[BookingTicket] addAddTimeProductToBooking: booking.metadata.unique_identification_number 缺失');
|
|
@@ -2627,7 +2689,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2627
2689
|
};
|
|
2628
2690
|
});
|
|
2629
2691
|
if (this.store.order) {
|
|
2630
|
-
|
|
2692
|
+
_context31.next = 6;
|
|
2631
2693
|
break;
|
|
2632
2694
|
}
|
|
2633
2695
|
throw new Error('order 模块未初始化');
|
|
@@ -2641,58 +2703,55 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2641
2703
|
});
|
|
2642
2704
|
}
|
|
2643
2705
|
if (!(typeof this.store.order.addProductsToOrder === 'function')) {
|
|
2644
|
-
|
|
2706
|
+
_context31.next = 11;
|
|
2645
2707
|
break;
|
|
2646
2708
|
}
|
|
2647
|
-
return
|
|
2648
|
-
skipEditDiscountConfigRefresh: true,
|
|
2649
|
-
skipDiscountRecalculation: true
|
|
2650
|
-
}));
|
|
2709
|
+
return _context31.abrupt("return", this.store.order.addProductsToOrder(orderLines));
|
|
2651
2710
|
case 11:
|
|
2652
2711
|
result = [];
|
|
2653
2712
|
_iterator2 = _createForOfIteratorHelper(orderLines);
|
|
2654
|
-
|
|
2713
|
+
_context31.prev = 13;
|
|
2655
2714
|
_iterator2.s();
|
|
2656
2715
|
case 15:
|
|
2657
2716
|
if ((_step2 = _iterator2.n()).done) {
|
|
2658
|
-
|
|
2717
|
+
_context31.next = 29;
|
|
2659
2718
|
break;
|
|
2660
2719
|
}
|
|
2661
2720
|
line = _step2.value;
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2721
|
+
_context31.t0 = result.splice;
|
|
2722
|
+
_context31.t1 = result;
|
|
2723
|
+
_context31.t2 = [0, result.length];
|
|
2724
|
+
_context31.t3 = _toConsumableArray;
|
|
2725
|
+
_context31.next = 23;
|
|
2667
2726
|
return this.addProductToOrder(line.product);
|
|
2668
2727
|
case 23:
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2728
|
+
_context31.t4 = _context31.sent;
|
|
2729
|
+
_context31.t5 = (0, _context31.t3)(_context31.t4);
|
|
2730
|
+
_context31.t6 = _context31.t2.concat.call(_context31.t2, _context31.t5);
|
|
2731
|
+
_context31.t0.apply.call(_context31.t0, _context31.t1, _context31.t6);
|
|
2673
2732
|
case 27:
|
|
2674
|
-
|
|
2733
|
+
_context31.next = 15;
|
|
2675
2734
|
break;
|
|
2676
2735
|
case 29:
|
|
2677
|
-
|
|
2736
|
+
_context31.next = 34;
|
|
2678
2737
|
break;
|
|
2679
2738
|
case 31:
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
_iterator2.e(
|
|
2739
|
+
_context31.prev = 31;
|
|
2740
|
+
_context31.t7 = _context31["catch"](13);
|
|
2741
|
+
_iterator2.e(_context31.t7);
|
|
2683
2742
|
case 34:
|
|
2684
|
-
|
|
2743
|
+
_context31.prev = 34;
|
|
2685
2744
|
_iterator2.f();
|
|
2686
|
-
return
|
|
2745
|
+
return _context31.finish(34);
|
|
2687
2746
|
case 37:
|
|
2688
|
-
return
|
|
2747
|
+
return _context31.abrupt("return", result);
|
|
2689
2748
|
case 38:
|
|
2690
2749
|
case "end":
|
|
2691
|
-
return
|
|
2750
|
+
return _context31.stop();
|
|
2692
2751
|
}
|
|
2693
|
-
},
|
|
2752
|
+
}, _callee31, this, [[13, 31, 34, 37]]);
|
|
2694
2753
|
}));
|
|
2695
|
-
function addAddTimeProductsToBooking(
|
|
2754
|
+
function addAddTimeProductsToBooking(_x23) {
|
|
2696
2755
|
return _addAddTimeProductsToBooking.apply(this, arguments);
|
|
2697
2756
|
}
|
|
2698
2757
|
return addAddTimeProductsToBooking;
|
|
@@ -2700,33 +2759,33 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2700
2759
|
}, {
|
|
2701
2760
|
key: "setOtherParams",
|
|
2702
2761
|
value: function () {
|
|
2703
|
-
var _setOtherParams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
2762
|
+
var _setOtherParams = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32(params) {
|
|
2704
2763
|
var _ref19,
|
|
2705
2764
|
_ref19$cover,
|
|
2706
2765
|
cover,
|
|
2707
|
-
|
|
2708
|
-
return _regeneratorRuntime().wrap(function
|
|
2709
|
-
while (1) switch (
|
|
2766
|
+
_args32 = arguments;
|
|
2767
|
+
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
|
|
2768
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
2710
2769
|
case 0:
|
|
2711
|
-
_ref19 =
|
|
2712
|
-
|
|
2770
|
+
_ref19 = _args32.length > 1 && _args32[1] !== undefined ? _args32[1] : {}, _ref19$cover = _ref19.cover, cover = _ref19$cover === void 0 ? false : _ref19$cover;
|
|
2771
|
+
_context32.next = 3;
|
|
2713
2772
|
return _get(_getPrototypeOf(BookingTicketImpl.prototype), "setOtherParams", this).call(this, params, {
|
|
2714
2773
|
cover: cover
|
|
2715
2774
|
});
|
|
2716
2775
|
case 3:
|
|
2717
2776
|
if (!((params === null || params === void 0 ? void 0 : params.businessCode) !== undefined || (params === null || params === void 0 ? void 0 : params.business_code) !== undefined)) {
|
|
2718
|
-
|
|
2777
|
+
_context32.next = 6;
|
|
2719
2778
|
break;
|
|
2720
2779
|
}
|
|
2721
|
-
|
|
2780
|
+
_context32.next = 6;
|
|
2722
2781
|
return this.configureIdGeneratorFromOpenData();
|
|
2723
2782
|
case 6:
|
|
2724
2783
|
case "end":
|
|
2725
|
-
return
|
|
2784
|
+
return _context32.stop();
|
|
2726
2785
|
}
|
|
2727
|
-
},
|
|
2786
|
+
}, _callee32, this);
|
|
2728
2787
|
}));
|
|
2729
|
-
function setOtherParams(
|
|
2788
|
+
function setOtherParams(_x24) {
|
|
2730
2789
|
return _setOtherParams.apply(this, arguments);
|
|
2731
2790
|
}
|
|
2732
2791
|
return setOtherParams;
|
|
@@ -2743,15 +2802,15 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2743
2802
|
}, {
|
|
2744
2803
|
key: "handlePrintWristband",
|
|
2745
2804
|
value: function () {
|
|
2746
|
-
var _handlePrintWristband = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
2805
|
+
var _handlePrintWristband = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33(params) {
|
|
2747
2806
|
var _this$getOrderIdentit;
|
|
2748
2807
|
var deviceTask, deviceId, idempotencyKey;
|
|
2749
|
-
return _regeneratorRuntime().wrap(function
|
|
2750
|
-
while (1) switch (
|
|
2808
|
+
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
|
|
2809
|
+
while (1) switch (_context33.prev = _context33.next) {
|
|
2751
2810
|
case 0:
|
|
2752
2811
|
deviceTask = this.getDeviceTaskPlugin();
|
|
2753
2812
|
if (deviceTask !== null && deviceTask !== void 0 && deviceTask.dispatch) {
|
|
2754
|
-
|
|
2813
|
+
_context33.next = 4;
|
|
2755
2814
|
break;
|
|
2756
2815
|
}
|
|
2757
2816
|
this.logger.addLog({
|
|
@@ -2761,7 +2820,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2761
2820
|
voucher_ids: Array.isArray(params.voucher_ids) ? params.voucher_ids : [params.voucher_ids]
|
|
2762
2821
|
}
|
|
2763
2822
|
});
|
|
2764
|
-
return
|
|
2823
|
+
return _context33.abrupt("return");
|
|
2765
2824
|
case 4:
|
|
2766
2825
|
this.logger.addLog({
|
|
2767
2826
|
type: 'info',
|
|
@@ -2770,10 +2829,10 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2770
2829
|
voucher_ids: Array.isArray(params.voucher_ids) ? params.voucher_ids : [params.voucher_ids]
|
|
2771
2830
|
}
|
|
2772
2831
|
});
|
|
2773
|
-
|
|
2832
|
+
_context33.next = 7;
|
|
2774
2833
|
return this.getShortNumberOrDeviceId();
|
|
2775
2834
|
case 7:
|
|
2776
|
-
deviceId =
|
|
2835
|
+
deviceId = _context33.sent;
|
|
2777
2836
|
idempotencyKey = createUuidV4();
|
|
2778
2837
|
deviceTask.dispatch({
|
|
2779
2838
|
action: 'print_all',
|
|
@@ -2793,11 +2852,11 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2793
2852
|
});
|
|
2794
2853
|
case 10:
|
|
2795
2854
|
case "end":
|
|
2796
|
-
return
|
|
2855
|
+
return _context33.stop();
|
|
2797
2856
|
}
|
|
2798
|
-
},
|
|
2857
|
+
}, _callee33, this);
|
|
2799
2858
|
}));
|
|
2800
|
-
function handlePrintWristband(
|
|
2859
|
+
function handlePrintWristband(_x25) {
|
|
2801
2860
|
return _handlePrintWristband.apply(this, arguments);
|
|
2802
2861
|
}
|
|
2803
2862
|
return handlePrintWristband;
|
|
@@ -2805,11 +2864,11 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2805
2864
|
}, {
|
|
2806
2865
|
key: "handleRedeem",
|
|
2807
2866
|
value: function () {
|
|
2808
|
-
var _handleRedeem = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
2867
|
+
var _handleRedeem = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34(params) {
|
|
2809
2868
|
var _this$store$order5, _this$store$order5$ge, _this$store$order6, _ref20, _tempOrder$order_id2;
|
|
2810
2869
|
var voucherIds, status, voucherIdSet, tempOrder, vouchers, hasUpdatedVoucher, nextVouchers, identity, externalSaleNumber, orderId, orderLookup;
|
|
2811
|
-
return _regeneratorRuntime().wrap(function
|
|
2812
|
-
while (1) switch (
|
|
2870
|
+
return _regeneratorRuntime().wrap(function _callee34$(_context34) {
|
|
2871
|
+
while (1) switch (_context34.prev = _context34.next) {
|
|
2813
2872
|
case 0:
|
|
2814
2873
|
voucherIds = Array.isArray(params.voucher_ids) ? params.voucher_ids : [];
|
|
2815
2874
|
status = params.is_checkin ? 'used' : 'unused';
|
|
@@ -2833,20 +2892,20 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2833
2892
|
});
|
|
2834
2893
|
});
|
|
2835
2894
|
if (!(tempOrder && hasUpdatedVoucher)) {
|
|
2836
|
-
|
|
2895
|
+
_context34.next = 11;
|
|
2837
2896
|
break;
|
|
2838
2897
|
}
|
|
2839
|
-
|
|
2898
|
+
_context34.next = 11;
|
|
2840
2899
|
return this.replaceTempOrder(_objectSpread(_objectSpread({}, tempOrder), {}, {
|
|
2841
2900
|
vouchers: nextVouchers
|
|
2842
2901
|
}));
|
|
2843
2902
|
case 11:
|
|
2844
2903
|
this.core.effects.emit("".concat(this.name, ":onVouchersChange"), {});
|
|
2845
2904
|
if (!(voucherIds.length === 0)) {
|
|
2846
|
-
|
|
2905
|
+
_context34.next = 14;
|
|
2847
2906
|
break;
|
|
2848
2907
|
}
|
|
2849
|
-
return
|
|
2908
|
+
return _context34.abrupt("return", {
|
|
2850
2909
|
code: 200,
|
|
2851
2910
|
status: true,
|
|
2852
2911
|
message: '',
|
|
@@ -2857,7 +2916,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2857
2916
|
externalSaleNumber = (tempOrder === null || tempOrder === void 0 ? void 0 : tempOrder.external_sale_number) || (identity === null || identity === void 0 ? void 0 : identity.externalSaleNumber) || undefined;
|
|
2858
2917
|
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;
|
|
2859
2918
|
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;
|
|
2860
|
-
return
|
|
2919
|
+
return _context34.abrupt("return", this.request.post('/machinecode/batch', {
|
|
2861
2920
|
ids: voucherIds,
|
|
2862
2921
|
status: status,
|
|
2863
2922
|
order_lookup: orderLookup,
|
|
@@ -2868,11 +2927,11 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2868
2927
|
}));
|
|
2869
2928
|
case 19:
|
|
2870
2929
|
case "end":
|
|
2871
|
-
return
|
|
2930
|
+
return _context34.stop();
|
|
2872
2931
|
}
|
|
2873
|
-
},
|
|
2932
|
+
}, _callee34, this);
|
|
2874
2933
|
}));
|
|
2875
|
-
function handleRedeem(
|
|
2934
|
+
function handleRedeem(_x26) {
|
|
2876
2935
|
return _handleRedeem.apply(this, arguments);
|
|
2877
2936
|
}
|
|
2878
2937
|
return handleRedeem;
|
|
@@ -2884,12 +2943,12 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2884
2943
|
}, {
|
|
2885
2944
|
key: "destroy",
|
|
2886
2945
|
value: (function () {
|
|
2887
|
-
var _destroy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
2946
|
+
var _destroy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee35() {
|
|
2888
2947
|
var _this$scan;
|
|
2889
|
-
return _regeneratorRuntime().wrap(function
|
|
2890
|
-
while (1) switch (
|
|
2948
|
+
return _regeneratorRuntime().wrap(function _callee35$(_context35) {
|
|
2949
|
+
while (1) switch (_context35.prev = _context35.next) {
|
|
2891
2950
|
case 0:
|
|
2892
|
-
|
|
2951
|
+
_context35.next = 2;
|
|
2893
2952
|
return _get(_getPrototypeOf(BookingTicketImpl.prototype), "destroy", this).call(this);
|
|
2894
2953
|
case 2:
|
|
2895
2954
|
try {
|
|
@@ -2900,9 +2959,9 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
|
|
|
2900
2959
|
scanCache.clear();
|
|
2901
2960
|
case 4:
|
|
2902
2961
|
case "end":
|
|
2903
|
-
return
|
|
2962
|
+
return _context35.stop();
|
|
2904
2963
|
}
|
|
2905
|
-
},
|
|
2964
|
+
}, _callee35, this);
|
|
2906
2965
|
}));
|
|
2907
2966
|
function destroy() {
|
|
2908
2967
|
return _destroy.apply(this, arguments);
|