@pisell/pisellos 2.2.275 → 2.2.277
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/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/Order/index.js +90 -89
- 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 +208 -54
- package/dist/server/index.d.ts +5 -0
- package/dist/server/index.js +65 -39
- package/dist/solution/BaseSales/index.d.ts +5 -0
- package/dist/solution/BaseSales/index.js +319 -284
- package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +1 -1
- package/dist/solution/BookingByStep/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.d.ts +1 -1
- package/dist/solution/BookingTicket/index.js +1 -4
- package/lib/core/index.js +0 -1
- 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/Order/index.js +12 -10
- 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 +183 -16
- package/lib/server/index.d.ts +5 -0
- package/lib/server/index.js +42 -7
- package/lib/solution/BaseSales/index.d.ts +5 -0
- package/lib/solution/BaseSales/index.js +17 -1
- package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +1 -1
- package/lib/solution/BookingByStep/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.d.ts +1 -1
- package/lib/solution/BookingTicket/index.js +1 -4
- package/package.json +1 -1
package/dist/server/index.js
CHANGED
|
@@ -33,6 +33,7 @@ import { FloorPlanModule } from "./modules/floor-plan";
|
|
|
33
33
|
import { FloorPlanHooks } from "./modules/floor-plan/types";
|
|
34
34
|
import { PaymentServerModule } from "./modules/payment";
|
|
35
35
|
import { extractScheduleIdsFromMenus, extractTimePointsFromSchedules } from "./utils/schedule";
|
|
36
|
+
import { sortTimePoints } from "./utils/time";
|
|
36
37
|
import { ProductsHooks } from "./modules/products/types";
|
|
37
38
|
import { perfMark } from "./utils/product";
|
|
38
39
|
import { OrderModule } from "./modules/order";
|
|
@@ -329,7 +330,11 @@ var Server = /*#__PURE__*/function () {
|
|
|
329
330
|
case 8:
|
|
330
331
|
result = _context3.sent;
|
|
331
332
|
if (subscriberId && typeof callback === 'function') {
|
|
332
|
-
_this.syncProductQueryScheduleTimers(
|
|
333
|
+
_this.syncProductQueryScheduleTimers({
|
|
334
|
+
subscriberId: subscriberId,
|
|
335
|
+
menu_list_ids: menu_list_ids,
|
|
336
|
+
strategy_context: strategy_context
|
|
337
|
+
});
|
|
333
338
|
}
|
|
334
339
|
return _context3.abrupt("return", result);
|
|
335
340
|
case 11:
|
|
@@ -1672,7 +1677,7 @@ var Server = /*#__PURE__*/function () {
|
|
|
1672
1677
|
_defineProperty(this, "handleGetScheduleTimePoints", /*#__PURE__*/function () {
|
|
1673
1678
|
var _ref59 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(_ref58) {
|
|
1674
1679
|
var _menu_list_ids$length;
|
|
1675
|
-
var url, method, data, config, menu_list_ids, _menu_list_ids$length2, menuList, scheduleIds, scheduleList, timePoints, errorMessage;
|
|
1680
|
+
var url, method, data, config, menu_list_ids, _menu_list_ids$length2, _this$getMenuSchedule, menuList, scheduleIds, scheduleList, timePoints, errorMessage;
|
|
1676
1681
|
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
|
|
1677
1682
|
while (1) switch (_context24.prev = _context24.next) {
|
|
1678
1683
|
case 0:
|
|
@@ -1728,8 +1733,7 @@ var Server = /*#__PURE__*/function () {
|
|
|
1728
1733
|
});
|
|
1729
1734
|
case 16:
|
|
1730
1735
|
_context24.prev = 16;
|
|
1731
|
-
|
|
1732
|
-
menuList = _this.menu.getMenuByIds(menu_list_ids);
|
|
1736
|
+
_this$getMenuSchedule = _this.getMenuScheduleTimePoints(menu_list_ids), menuList = _this$getMenuSchedule.menuList, scheduleIds = _this$getMenuSchedule.scheduleIds, scheduleList = _this$getMenuSchedule.scheduleList, timePoints = _this$getMenuSchedule.timePoints;
|
|
1733
1737
|
console.log("[Server] \u627E\u5230 ".concat(menuList.length, " \u4E2A\u9910\u724C"));
|
|
1734
1738
|
_this.logInfo('handleGetScheduleTimePoints: 获取到餐牌列表', {
|
|
1735
1739
|
requestedCount: menu_list_ids.length,
|
|
@@ -1737,15 +1741,12 @@ var Server = /*#__PURE__*/function () {
|
|
|
1737
1741
|
menu_list_ids: menu_list_ids,
|
|
1738
1742
|
menuList: menuList
|
|
1739
1743
|
});
|
|
1740
|
-
|
|
1741
|
-
// 2. 提取所有的 schedule IDs
|
|
1742
|
-
scheduleIds = extractScheduleIdsFromMenus(menuList);
|
|
1743
1744
|
console.log("[Server] \u63D0\u53D6\u5230 ".concat(scheduleIds.length, " \u4E2A\u65E5\u7A0BID:"), scheduleIds);
|
|
1744
1745
|
_this.logInfo('handleGetScheduleTimePoints: 提取到日程 IDs', {
|
|
1745
1746
|
scheduleCount: scheduleIds.length
|
|
1746
1747
|
});
|
|
1747
1748
|
if (!(scheduleIds.length === 0)) {
|
|
1748
|
-
_context24.next =
|
|
1749
|
+
_context24.next = 25;
|
|
1749
1750
|
break;
|
|
1750
1751
|
}
|
|
1751
1752
|
_this.logInfo('handleGetScheduleTimePoints: 没有找到相关日程', {
|
|
@@ -1757,17 +1758,12 @@ var Server = /*#__PURE__*/function () {
|
|
|
1757
1758
|
data: [],
|
|
1758
1759
|
status: true
|
|
1759
1760
|
});
|
|
1760
|
-
case
|
|
1761
|
-
// 3. 获取日程详情
|
|
1762
|
-
scheduleList = _this.schedule.getScheduleByIds(scheduleIds);
|
|
1761
|
+
case 25:
|
|
1763
1762
|
console.log("[Server] \u627E\u5230 ".concat(scheduleList.length, " \u4E2A\u65E5\u7A0B"));
|
|
1764
1763
|
_this.logInfo('handleGetScheduleTimePoints: 获取到日程详情', {
|
|
1765
1764
|
requestedCount: scheduleIds.length,
|
|
1766
1765
|
foundCount: scheduleList.length
|
|
1767
1766
|
});
|
|
1768
|
-
|
|
1769
|
-
// 4. 提取时间点
|
|
1770
|
-
timePoints = extractTimePointsFromSchedules(scheduleList);
|
|
1771
1767
|
console.log("[Server] \u63D0\u53D6\u5230 ".concat(timePoints.length, " \u4E2A\u65F6\u95F4\u70B9:"), timePoints);
|
|
1772
1768
|
_this.logInfo('handleGetScheduleTimePoints 处理完成', {
|
|
1773
1769
|
menuListIdsCount: menu_list_ids.length,
|
|
@@ -1781,8 +1777,8 @@ var Server = /*#__PURE__*/function () {
|
|
|
1781
1777
|
data: timePoints,
|
|
1782
1778
|
status: true
|
|
1783
1779
|
});
|
|
1784
|
-
case
|
|
1785
|
-
_context24.prev =
|
|
1780
|
+
case 32:
|
|
1781
|
+
_context24.prev = 32;
|
|
1786
1782
|
_context24.t0 = _context24["catch"](16);
|
|
1787
1783
|
errorMessage = _context24.t0 instanceof Error ? _context24.t0.message : '未知错误';
|
|
1788
1784
|
console.error('[Server] 获取日程时间点失败:', _context24.t0);
|
|
@@ -1796,11 +1792,11 @@ var Server = /*#__PURE__*/function () {
|
|
|
1796
1792
|
data: [],
|
|
1797
1793
|
status: false
|
|
1798
1794
|
});
|
|
1799
|
-
case
|
|
1795
|
+
case 38:
|
|
1800
1796
|
case "end":
|
|
1801
1797
|
return _context24.stop();
|
|
1802
1798
|
}
|
|
1803
|
-
}, _callee24, null, [[16,
|
|
1799
|
+
}, _callee24, null, [[16, 32]]);
|
|
1804
1800
|
}));
|
|
1805
1801
|
return function (_x24) {
|
|
1806
1802
|
return _ref59.apply(this, arguments);
|
|
@@ -3622,18 +3618,48 @@ var Server = /*#__PURE__*/function () {
|
|
|
3622
3618
|
return recomputeAndNotifySubscriber;
|
|
3623
3619
|
}()
|
|
3624
3620
|
/**
|
|
3625
|
-
*
|
|
3621
|
+
* 根据餐牌 ID 获取其绑定日程中的全部时间点。
|
|
3622
|
+
* 商品查询定时器与 schedule-time-points 路由共用此逻辑。
|
|
3626
3623
|
*/
|
|
3627
3624
|
)
|
|
3625
|
+
}, {
|
|
3626
|
+
key: "getMenuScheduleTimePoints",
|
|
3627
|
+
value: function getMenuScheduleTimePoints(menuListIds) {
|
|
3628
|
+
var _this$menu$getMenuByI, _this$menu, _this$schedule$getSch, _this$schedule;
|
|
3629
|
+
var menuList = (_this$menu$getMenuByI = (_this$menu = this.menu) === null || _this$menu === void 0 ? void 0 : _this$menu.getMenuByIds(menuListIds)) !== null && _this$menu$getMenuByI !== void 0 ? _this$menu$getMenuByI : [];
|
|
3630
|
+
var scheduleIds = extractScheduleIdsFromMenus(menuList);
|
|
3631
|
+
var scheduleList = scheduleIds.length > 0 ? (_this$schedule$getSch = (_this$schedule = this.schedule) === null || _this$schedule === void 0 ? void 0 : _this$schedule.getScheduleByIds(scheduleIds)) !== null && _this$schedule$getSch !== void 0 ? _this$schedule$getSch : [] : [];
|
|
3632
|
+
var timePoints = extractTimePointsFromSchedules(scheduleList);
|
|
3633
|
+
return {
|
|
3634
|
+
menuList: menuList,
|
|
3635
|
+
scheduleIds: scheduleIds,
|
|
3636
|
+
scheduleList: scheduleList,
|
|
3637
|
+
timePoints: timePoints
|
|
3638
|
+
};
|
|
3639
|
+
}
|
|
3640
|
+
|
|
3641
|
+
/**
|
|
3642
|
+
* query 完成后为 subscriber 同步 schedule 定时器(先 clear 再 schedule)。
|
|
3643
|
+
*/
|
|
3628
3644
|
}, {
|
|
3629
3645
|
key: "syncProductQueryScheduleTimers",
|
|
3630
|
-
value: function syncProductQueryScheduleTimers(
|
|
3646
|
+
value: function syncProductQueryScheduleTimers(_ref61) {
|
|
3631
3647
|
var _this$products$getLas3, _this$products2, _this$products2$getLa;
|
|
3648
|
+
var subscriberId = _ref61.subscriberId,
|
|
3649
|
+
menu_list_ids = _ref61.menu_list_ids,
|
|
3650
|
+
strategy_context = _ref61.strategy_context;
|
|
3632
3651
|
this.clearSubscriberScheduleTimers(subscriberId);
|
|
3633
3652
|
if (!this.shouldScheduleProductQueryReload(strategy_context)) {
|
|
3634
3653
|
return;
|
|
3635
3654
|
}
|
|
3636
|
-
var
|
|
3655
|
+
var productTimePoints = (_this$products$getLas3 = (_this$products2 = this.products) === null || _this$products2 === void 0 || (_this$products2$getLa = _this$products2.getLastScheduleTimePoints) === null || _this$products2$getLa === void 0 ? void 0 : _this$products2$getLa.call(_this$products2)) !== null && _this$products$getLas3 !== void 0 ? _this$products$getLas3 : [];
|
|
3656
|
+
var menuListIds = Array.isArray(menu_list_ids) ? Array.from(new Set(menu_list_ids.map(function (id) {
|
|
3657
|
+
return Number(id);
|
|
3658
|
+
}).filter(function (id) {
|
|
3659
|
+
return Number.isFinite(id);
|
|
3660
|
+
}))) : [];
|
|
3661
|
+
var menuTimePoints = this.getMenuScheduleTimePoints(menuListIds).timePoints;
|
|
3662
|
+
var timePoints = sortTimePoints(Array.from(new Set([].concat(_toConsumableArray(productTimePoints), _toConsumableArray(menuTimePoints)))));
|
|
3637
3663
|
if (timePoints.length > 0) {
|
|
3638
3664
|
this.scheduleSubscriberTimePointReloads(subscriberId, timePoints);
|
|
3639
3665
|
}
|
|
@@ -3650,7 +3676,7 @@ var Server = /*#__PURE__*/function () {
|
|
|
3650
3676
|
*/
|
|
3651
3677
|
function () {
|
|
3652
3678
|
var _handleSalesSearchRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee43(kind, backendPath, data, config) {
|
|
3653
|
-
var queryPayload, result,
|
|
3679
|
+
var queryPayload, result, _ref62, callback, subscriberId, resetVisibleOrderIds, contextSignature, existing, shouldReset, visibleOrderIds, _iterator6, _step6, orderId;
|
|
3654
3680
|
return _regeneratorRuntime().wrap(function _callee43$(_context43) {
|
|
3655
3681
|
while (1) switch (_context43.prev = _context43.next) {
|
|
3656
3682
|
case 0:
|
|
@@ -3659,7 +3685,7 @@ var Server = /*#__PURE__*/function () {
|
|
|
3659
3685
|
return this.fetchSalesSearchFromAPI(backendPath, queryPayload);
|
|
3660
3686
|
case 3:
|
|
3661
3687
|
result = _context43.sent;
|
|
3662
|
-
|
|
3688
|
+
_ref62 = config || {}, callback = _ref62.callback, subscriberId = _ref62.subscriberId, resetVisibleOrderIds = _ref62.resetVisibleOrderIds;
|
|
3663
3689
|
if (subscriberId && typeof callback === 'function') {
|
|
3664
3690
|
contextSignature = this.buildSalesSearchSignature(kind, queryPayload);
|
|
3665
3691
|
existing = this.salesSearchSubscribers.get(subscriberId);
|
|
@@ -6123,10 +6149,10 @@ var Server = /*#__PURE__*/function () {
|
|
|
6123
6149
|
}, {
|
|
6124
6150
|
key: "shouldBuildSmallTicketData",
|
|
6125
6151
|
value: function shouldBuildSmallTicketData(order) {
|
|
6126
|
-
var
|
|
6152
|
+
var _ref64, _order$small_ticket_d;
|
|
6127
6153
|
if (!order || _typeof(order) !== 'object') return false;
|
|
6128
6154
|
// if (hasSmallTicketData(order.payment_info?.small_ticket_data)) return false;
|
|
6129
|
-
return Number((
|
|
6155
|
+
return Number((_ref64 = (_order$small_ticket_d = order.small_ticket_data_flag) !== null && _order$small_ticket_d !== void 0 ? _order$small_ticket_d : order.smallTicketDataFlag) !== null && _ref64 !== void 0 ? _ref64 : 0) === 1;
|
|
6130
6156
|
}
|
|
6131
6157
|
}, {
|
|
6132
6158
|
key: "shouldPrintSyncedOrder",
|
|
@@ -6144,7 +6170,7 @@ var Server = /*#__PURE__*/function () {
|
|
|
6144
6170
|
}, {
|
|
6145
6171
|
key: "isSalesOrderFullyPaid",
|
|
6146
6172
|
value: function isSalesOrderFullyPaid(order) {
|
|
6147
|
-
var _order$summary$amount, _order$summary,
|
|
6173
|
+
var _order$summary$amount, _order$summary, _ref65, _ref66, _order$summary$expect, _order$summary2, _order$summary3;
|
|
6148
6174
|
if (!order || _typeof(order) !== 'object') return false;
|
|
6149
6175
|
var paymentStatus = String(order.payment_status || '').toLowerCase();
|
|
6150
6176
|
if (paymentStatus === 'paid' || paymentStatus === 'finished') return true;
|
|
@@ -6156,7 +6182,7 @@ var Server = /*#__PURE__*/function () {
|
|
|
6156
6182
|
return this.toAmountNumber(amountGap) <= 0;
|
|
6157
6183
|
}
|
|
6158
6184
|
var paidAmount = this.sumPaidOrderPayments(order.payments);
|
|
6159
|
-
var targetAmount = this.toAmountNumber((
|
|
6185
|
+
var targetAmount = this.toAmountNumber((_ref65 = (_ref66 = (_order$summary$expect = (_order$summary2 = order.summary) === null || _order$summary2 === void 0 ? void 0 : _order$summary2.expect_amount) !== null && _order$summary$expect !== void 0 ? _order$summary$expect : (_order$summary3 = order.summary) === null || _order$summary3 === void 0 ? void 0 : _order$summary3.total_amount) !== null && _ref66 !== void 0 ? _ref66 : order.expect_amount) !== null && _ref65 !== void 0 ? _ref65 : order.total_amount);
|
|
6160
6186
|
if (targetAmount <= 0) return paidAmount > 0;
|
|
6161
6187
|
return paidAmount >= targetAmount;
|
|
6162
6188
|
}
|
|
@@ -6200,8 +6226,8 @@ var Server = /*#__PURE__*/function () {
|
|
|
6200
6226
|
}
|
|
6201
6227
|
if (Array.isArray(product === null || product === void 0 ? void 0 : product.product_bundle)) {
|
|
6202
6228
|
product.product_bundle.forEach(function (bundle) {
|
|
6203
|
-
var
|
|
6204
|
-
var bundleProductId = (
|
|
6229
|
+
var _ref67, _bundle$bundle_produc;
|
|
6230
|
+
var bundleProductId = (_ref67 = (_bundle$bundle_produc = bundle === null || bundle === void 0 ? void 0 : bundle.bundle_product_id) !== null && _bundle$bundle_produc !== void 0 ? _bundle$bundle_produc : bundle === null || bundle === void 0 ? void 0 : bundle._bundle_product_id) !== null && _ref67 !== void 0 ? _ref67 : bundle === null || bundle === void 0 ? void 0 : bundle.product_id;
|
|
6205
6231
|
if (bundleProductId !== undefined && bundleProductId !== null && bundleProductId !== '') {
|
|
6206
6232
|
productIdSet.add(bundleProductId);
|
|
6207
6233
|
}
|
|
@@ -6217,7 +6243,7 @@ var Server = /*#__PURE__*/function () {
|
|
|
6217
6243
|
case 6:
|
|
6218
6244
|
_context64.next = 8;
|
|
6219
6245
|
return Promise.all(productIds.map( /*#__PURE__*/function () {
|
|
6220
|
-
var
|
|
6246
|
+
var _ref68 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee63(id) {
|
|
6221
6247
|
var _this14$products, _this14$products$getP, product;
|
|
6222
6248
|
return _regeneratorRuntime().wrap(function _callee63$(_context63) {
|
|
6223
6249
|
while (1) switch (_context63.prev = _context63.next) {
|
|
@@ -6243,7 +6269,7 @@ var Server = /*#__PURE__*/function () {
|
|
|
6243
6269
|
}, _callee63, null, [[0, 7]]);
|
|
6244
6270
|
}));
|
|
6245
6271
|
return function (_x72) {
|
|
6246
|
-
return
|
|
6272
|
+
return _ref68.apply(this, arguments);
|
|
6247
6273
|
};
|
|
6248
6274
|
}()));
|
|
6249
6275
|
case 8:
|
|
@@ -6282,8 +6308,8 @@ var Server = /*#__PURE__*/function () {
|
|
|
6282
6308
|
addProductId((_product$product_id2 = product === null || product === void 0 ? void 0 : product.product_id) !== null && _product$product_id2 !== void 0 ? _product$product_id2 : product === null || product === void 0 ? void 0 : product.id);
|
|
6283
6309
|
if (Array.isArray(product === null || product === void 0 ? void 0 : product.product_bundle)) {
|
|
6284
6310
|
product.product_bundle.forEach(function (bundle) {
|
|
6285
|
-
var
|
|
6286
|
-
addProductId((
|
|
6311
|
+
var _ref69, _bundle$bundle_produc2;
|
|
6312
|
+
addProductId((_ref69 = (_bundle$bundle_produc2 = bundle === null || bundle === void 0 ? void 0 : bundle.bundle_product_id) !== null && _bundle$bundle_produc2 !== void 0 ? _bundle$bundle_produc2 : bundle === null || bundle === void 0 ? void 0 : bundle._bundle_product_id) !== null && _ref69 !== void 0 ? _ref69 : bundle === null || bundle === void 0 ? void 0 : bundle.product_id);
|
|
6287
6313
|
});
|
|
6288
6314
|
}
|
|
6289
6315
|
});
|
|
@@ -6359,9 +6385,9 @@ var Server = /*#__PURE__*/function () {
|
|
|
6359
6385
|
if (!Array.isArray(product === null || product === void 0 ? void 0 : product.product_bundle)) return product;
|
|
6360
6386
|
var hasChanged = false;
|
|
6361
6387
|
var productBundle = product.product_bundle.map(function (bundle) {
|
|
6362
|
-
var
|
|
6388
|
+
var _ref70, _bundle$bundle_produc3;
|
|
6363
6389
|
if (!bundle || _typeof(bundle) !== 'object') return bundle;
|
|
6364
|
-
var rawProductId = (
|
|
6390
|
+
var rawProductId = (_ref70 = (_bundle$bundle_produc3 = bundle === null || bundle === void 0 ? void 0 : bundle.bundle_product_id) !== null && _bundle$bundle_produc3 !== void 0 ? _bundle$bundle_produc3 : bundle === null || bundle === void 0 ? void 0 : bundle._bundle_product_id) !== null && _ref70 !== void 0 ? _ref70 : bundle === null || bundle === void 0 ? void 0 : bundle.product_id;
|
|
6365
6391
|
if (rawProductId === undefined || rawProductId === null || rawProductId === '') return bundle;
|
|
6366
6392
|
var productId = Number(rawProductId);
|
|
6367
6393
|
if (!Number.isFinite(productId)) return bundle;
|
|
@@ -6485,7 +6511,7 @@ var Server = /*#__PURE__*/function () {
|
|
|
6485
6511
|
}, {
|
|
6486
6512
|
key: "resolveProductTitleValue",
|
|
6487
6513
|
value: function resolveProductTitleValue(value, key, currentLocale) {
|
|
6488
|
-
var
|
|
6514
|
+
var _ref71, _ref72, _value$key;
|
|
6489
6515
|
if (value === undefined || value === null || value === '') return null;
|
|
6490
6516
|
if (_typeof(value) !== 'object') {
|
|
6491
6517
|
var title = String(value);
|
|
@@ -6495,7 +6521,7 @@ var Server = /*#__PURE__*/function () {
|
|
|
6495
6521
|
}
|
|
6496
6522
|
var normalizedKey = key.replace('-', '_');
|
|
6497
6523
|
var dashedKey = key.replace('_', '-');
|
|
6498
|
-
var rawValue = (
|
|
6524
|
+
var rawValue = (_ref71 = (_ref72 = (_value$key = value[key]) !== null && _value$key !== void 0 ? _value$key : value[normalizedKey]) !== null && _ref72 !== void 0 ? _ref72 : value[dashedKey]) !== null && _ref71 !== void 0 ? _ref71 : key === 'auto' ? value.default : undefined;
|
|
6499
6525
|
if (rawValue === undefined || rawValue === null || rawValue === '') return null;
|
|
6500
6526
|
if (_typeof(rawValue) === 'object') return this.resolveFirstProductTitleValue(rawValue);
|
|
6501
6527
|
return String(rawValue);
|
|
@@ -7844,14 +7870,14 @@ var Server = /*#__PURE__*/function () {
|
|
|
7844
7870
|
}, {
|
|
7845
7871
|
key: "buildProductFormatterContext",
|
|
7846
7872
|
value: function buildProductFormatterContext(context) {
|
|
7847
|
-
var _this$
|
|
7873
|
+
var _this$menu2, _this$menu2$getMenuLi, _scheduleModule$getSc, _this$core$context5;
|
|
7848
7874
|
var scheduleModule = this.getSchedule();
|
|
7849
7875
|
return {
|
|
7850
7876
|
scheduleModule: scheduleModule,
|
|
7851
7877
|
schedule_datetime: context.schedule_datetime,
|
|
7852
7878
|
customer_id: context.customer_id,
|
|
7853
7879
|
strategy_context: context.strategy_context,
|
|
7854
|
-
menuList: ((_this$
|
|
7880
|
+
menuList: ((_this$menu2 = this.menu) === null || _this$menu2 === void 0 || (_this$menu2$getMenuLi = _this$menu2.getMenuList) === null || _this$menu2$getMenuLi === void 0 ? void 0 : _this$menu2$getMenuLi.call(_this$menu2)) || [],
|
|
7855
7881
|
scheduleList: (scheduleModule === null || scheduleModule === void 0 || (_scheduleModule$getSc = scheduleModule.getScheduleList) === null || _scheduleModule$getSc === void 0 ? void 0 : _scheduleModule$getSc.call(scheduleModule)) || [],
|
|
7856
7882
|
dataVariantEvaluator: (_this$core$context5 = this.core.context) === null || _this$core$context5 === void 0 ? void 0 : _this$core$context5.dataVariantEvaluator
|
|
7857
7883
|
};
|
|
@@ -355,6 +355,11 @@ export declare class BaseSalesImpl extends BaseModule implements Module {
|
|
|
355
355
|
selected: boolean;
|
|
356
356
|
source?: WalletAssetSelectionSource;
|
|
357
357
|
}): Promise<WalletAssetsState>;
|
|
358
|
+
/** 更新已选钱包资产的手动使用金额,并同步 pending payment。 */
|
|
359
|
+
updateWalletAssetAmount(params: {
|
|
360
|
+
assetId: WalletAssetId;
|
|
361
|
+
amount: number;
|
|
362
|
+
}): Promise<WalletAssetsState>;
|
|
358
363
|
/** 扫码精确查券;仅可用资产会被自动选中。 */
|
|
359
364
|
scanWalletAsset(code: string): Promise<ScanWalletAssetResult>;
|
|
360
365
|
/** 清空全部未确认钱包选择,已支付钱包项由 Order 模块继续保留。 */
|