@pisell/pisellos 2.3.50 → 2.3.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +12 -10
- package/dist/modules/Discount/index.d.ts +0 -1
- package/dist/modules/Discount/index.js +11 -40
- package/dist/modules/Discount/types.d.ts +0 -1
- package/dist/modules/OpenData/index.js +2 -2
- package/dist/modules/Order/index.d.ts +6 -8
- package/dist/modules/Order/index.js +165 -140
- package/dist/modules/Order/types.d.ts +21 -12
- package/dist/modules/Order/types.js +11 -0
- package/dist/modules/Order/utils.d.ts +0 -10
- package/dist/modules/Order/utils.js +3 -35
- package/dist/modules/Payment/types.d.ts +8 -0
- package/dist/modules/Payment/walletpass.d.ts +7 -1
- package/dist/modules/Payment/walletpass.js +155 -45
- package/dist/modules/Product/types.d.ts +0 -1
- package/dist/modules/ProductList/index.js +14 -33
- package/dist/modules/Quotation/index.d.ts +1 -1
- package/dist/modules/Quotation/index.js +2 -2
- package/dist/modules/Rules/index.js +32 -56
- package/dist/modules/SalesSummary/index.js +13 -12
- package/dist/modules/SalesSummary/utils.js +7 -1
- package/dist/modules/ScanOrderLogger/index.d.ts +0 -2
- package/dist/modules/ScanOrderLogger/index.js +2 -15
- package/dist/modules/ScanOrderLogger/providers/feishu.js +27 -45
- package/dist/modules/ScanOrderLogger/types.d.ts +0 -1
- package/dist/modules/Schedule/index.d.ts +1 -3
- package/dist/modules/Schedule/index.js +16 -21
- package/dist/modules/Summary/utils.js +13 -38
- package/dist/modules/index.d.ts +0 -2
- package/dist/modules/index.js +1 -3
- package/dist/plugins/window.d.ts +0 -1
- package/dist/server/index.d.ts +0 -14
- package/dist/server/index.js +793 -907
- package/dist/server/modules/index.d.ts +1 -1
- package/dist/server/modules/order/index.d.ts +16 -0
- package/dist/server/modules/order/index.js +964 -776
- package/dist/server/modules/order/types.d.ts +14 -0
- package/dist/server/modules/order/types.js +6 -0
- package/dist/solution/BaseSales/index.d.ts +18 -13
- package/dist/solution/BaseSales/index.js +202 -178
- package/dist/solution/BaseSales/utils/cartPromotion.js +5 -3
- package/dist/solution/BookingByStep/index.d.ts +2 -17
- package/dist/solution/BookingByStep/index.js +215 -294
- package/dist/solution/BookingByStep/types.d.ts +1 -2
- package/dist/solution/BookingByStep/types.js +1 -3
- package/dist/solution/BookingByStep/utils/capacity.js +1 -17
- package/dist/solution/BookingByStep/utils/timeslots.d.ts +1 -3
- package/dist/solution/BookingByStep/utils/timeslots.js +12 -19
- package/dist/solution/BookingTicket/index.d.ts +1 -13
- package/dist/solution/BookingTicket/index.js +2 -2
- package/dist/solution/BookingTicket/types.d.ts +3 -0
- package/dist/solution/BookingTicket/utils/cartView.js +44 -32
- package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +1 -3
- package/dist/solution/BookingTicket/utils/scan/handleScan.js +2 -10
- package/dist/solution/Sales/index.d.ts +1 -0
- package/dist/solution/Sales/index.js +16 -2
- package/dist/solution/ScanOrder/index.d.ts +14 -26
- package/dist/solution/ScanOrder/index.js +739 -1142
- package/dist/solution/ScanOrder/types.d.ts +1 -21
- package/dist/solution/ScanOrder/utils.d.ts +0 -8
- package/dist/solution/ScanOrder/utils.js +25 -66
- package/dist/solution/ShopDiscount/index.d.ts +0 -1
- package/dist/solution/ShopDiscount/index.js +87 -125
- package/dist/solution/VenueBooking/index.d.ts +11 -39
- package/dist/solution/VenueBooking/index.js +841 -1167
- package/dist/solution/VenueBooking/types.d.ts +0 -3
- package/dist/solution/VenueBooking/utils/resource.js +0 -1
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts +4 -4
- package/dist/solution/VenueBooking/utils/slotMerge.js +5 -10
- package/dist/solution/index.d.ts +0 -1
- package/dist/solution/index.js +1 -2
- package/dist/types/index.d.ts +0 -1
- package/lib/model/strategy/adapter/promotion/index.js +0 -51
- package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +3 -1
- package/lib/modules/Discount/index.d.ts +0 -1
- package/lib/modules/Discount/index.js +0 -9
- package/lib/modules/Discount/types.d.ts +0 -1
- package/lib/modules/OpenData/index.js +1 -1
- package/lib/modules/Order/index.d.ts +6 -8
- package/lib/modules/Order/index.js +89 -38
- package/lib/modules/Order/types.d.ts +21 -12
- package/lib/modules/Order/utils.d.ts +0 -10
- package/lib/modules/Order/utils.js +5 -36
- package/lib/modules/Payment/types.d.ts +8 -0
- package/lib/modules/Payment/walletpass.d.ts +7 -1
- package/lib/modules/Payment/walletpass.js +107 -9
- package/lib/modules/Product/types.d.ts +0 -1
- package/lib/modules/ProductList/index.js +31 -40
- package/lib/modules/Quotation/index.d.ts +1 -1
- package/lib/modules/Quotation/index.js +2 -2
- package/lib/modules/Rules/index.js +32 -44
- package/lib/modules/SalesSummary/index.js +7 -6
- package/lib/modules/SalesSummary/utils.js +5 -1
- package/lib/modules/ScanOrderLogger/index.d.ts +0 -2
- package/lib/modules/ScanOrderLogger/index.js +1 -13
- package/lib/modules/ScanOrderLogger/providers/feishu.js +6 -15
- package/lib/modules/ScanOrderLogger/types.d.ts +0 -1
- package/lib/modules/Schedule/index.d.ts +1 -3
- package/lib/modules/Schedule/index.js +8 -10
- package/lib/modules/Summary/utils.js +1 -21
- package/lib/modules/index.d.ts +0 -2
- package/lib/modules/index.js +1 -5
- package/lib/plugins/window.d.ts +0 -1
- package/lib/server/index.d.ts +0 -14
- package/lib/server/index.js +15 -72
- package/lib/server/modules/index.d.ts +1 -1
- package/lib/server/modules/order/index.d.ts +16 -0
- package/lib/server/modules/order/index.js +140 -4
- package/lib/server/modules/order/types.d.ts +14 -0
- package/lib/server/modules/order/types.js +1 -0
- package/lib/solution/BaseSales/index.d.ts +18 -13
- package/lib/solution/BaseSales/index.js +58 -35
- package/lib/solution/BaseSales/utils/cartPromotion.js +5 -2
- package/lib/solution/BookingByStep/index.d.ts +2 -17
- package/lib/solution/BookingByStep/index.js +18 -60
- package/lib/solution/BookingByStep/types.d.ts +1 -2
- package/lib/solution/BookingByStep/types.js +0 -5
- package/lib/solution/BookingByStep/utils/capacity.js +1 -20
- package/lib/solution/BookingByStep/utils/timeslots.d.ts +1 -3
- package/lib/solution/BookingByStep/utils/timeslots.js +11 -19
- package/lib/solution/BookingTicket/index.d.ts +1 -13
- package/lib/solution/BookingTicket/index.js +2 -10
- package/lib/solution/BookingTicket/types.d.ts +3 -0
- package/lib/solution/BookingTicket/utils/cartView.js +43 -30
- package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +1 -3
- package/lib/solution/BookingTicket/utils/scan/handleScan.js +2 -2
- package/lib/solution/Sales/index.d.ts +1 -0
- package/lib/solution/Sales/index.js +15 -3
- package/lib/solution/ScanOrder/index.d.ts +14 -26
- package/lib/solution/ScanOrder/index.js +182 -449
- package/lib/solution/ScanOrder/types.d.ts +1 -21
- package/lib/solution/ScanOrder/utils.d.ts +0 -8
- package/lib/solution/ScanOrder/utils.js +0 -31
- package/lib/solution/ShopDiscount/index.d.ts +0 -1
- package/lib/solution/ShopDiscount/index.js +0 -14
- package/lib/solution/VenueBooking/index.d.ts +11 -39
- package/lib/solution/VenueBooking/index.js +110 -322
- package/lib/solution/VenueBooking/types.d.ts +0 -3
- package/lib/solution/VenueBooking/utils/resource.js +0 -1
- package/lib/solution/VenueBooking/utils/slotMerge.d.ts +4 -4
- package/lib/solution/VenueBooking/utils/slotMerge.js +4 -6
- package/lib/solution/index.d.ts +0 -1
- package/lib/solution/index.js +1 -3
- package/lib/types/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/modules/Holder/index.d.ts +0 -48
- package/dist/modules/Holder/index.js +0 -640
- package/dist/modules/Holder/types.d.ts +0 -123
- package/dist/modules/Holder/types.js +0 -1
- package/dist/modules/Holder/utils.d.ts +0 -13
- package/dist/modules/Holder/utils.js +0 -34
- package/dist/modules/ResourcePlanner/index.d.ts +0 -24
- package/dist/modules/ResourcePlanner/index.js +0 -181
- package/dist/modules/ResourcePlanner/planner.d.ts +0 -14
- package/dist/modules/ResourcePlanner/planner.js +0 -1069
- package/dist/modules/ResourcePlanner/types.d.ts +0 -227
- package/dist/modules/ResourcePlanner/types.js +0 -1
- package/dist/solution/UnifiedBookingSales/index.d.ts +0 -183
- package/dist/solution/UnifiedBookingSales/index.js +0 -1891
- package/dist/solution/UnifiedBookingSales/types.d.ts +0 -143
- package/dist/solution/UnifiedBookingSales/types.js +0 -11
- package/lib/modules/Holder/index.d.ts +0 -48
- package/lib/modules/Holder/index.js +0 -402
- package/lib/modules/Holder/types.d.ts +0 -123
- package/lib/modules/Holder/types.js +0 -17
- package/lib/modules/Holder/utils.d.ts +0 -13
- package/lib/modules/Holder/utils.js +0 -71
- package/lib/modules/ResourcePlanner/index.d.ts +0 -24
- package/lib/modules/ResourcePlanner/index.js +0 -148
- package/lib/modules/ResourcePlanner/planner.d.ts +0 -14
- package/lib/modules/ResourcePlanner/planner.js +0 -933
- package/lib/modules/ResourcePlanner/types.d.ts +0 -227
- package/lib/modules/ResourcePlanner/types.js +0 -17
- package/lib/solution/UnifiedBookingSales/index.d.ts +0 -183
- package/lib/solution/UnifiedBookingSales/index.js +0 -1084
- package/lib/solution/UnifiedBookingSales/types.d.ts +0 -143
- package/lib/solution/UnifiedBookingSales/types.js +0 -33
|
@@ -123,24 +123,21 @@ export var ScheduleModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
123
123
|
key: "loadAllSchedule",
|
|
124
124
|
value: (function () {
|
|
125
125
|
var _loadAllSchedule = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
126
|
-
var
|
|
127
|
-
var
|
|
128
|
-
scheduleList,
|
|
129
|
-
_args2 = arguments;
|
|
126
|
+
var _scheduleList$data;
|
|
127
|
+
var scheduleList;
|
|
130
128
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
131
129
|
while (1) switch (_context2.prev = _context2.next) {
|
|
132
130
|
case 0:
|
|
133
|
-
|
|
134
|
-
_context2.next = 3;
|
|
131
|
+
_context2.next = 2;
|
|
135
132
|
return this.request.get("/schedule", {
|
|
136
133
|
num: 999
|
|
137
134
|
}, {
|
|
138
|
-
useCache:
|
|
135
|
+
useCache: true
|
|
139
136
|
});
|
|
140
|
-
case
|
|
137
|
+
case 2:
|
|
141
138
|
scheduleList = _context2.sent;
|
|
142
139
|
this.setScheduleList(((_scheduleList$data = scheduleList.data) === null || _scheduleList$data === void 0 ? void 0 : _scheduleList$data.list) || []);
|
|
143
|
-
case
|
|
140
|
+
case 4:
|
|
144
141
|
case "end":
|
|
145
142
|
return _context2.stop();
|
|
146
143
|
}
|
|
@@ -179,7 +176,8 @@ export var ScheduleModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
179
176
|
key: "loadScheduleAvailableDate",
|
|
180
177
|
value: function () {
|
|
181
178
|
var _loadScheduleAvailableDate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref) {
|
|
182
|
-
var
|
|
179
|
+
var _res$data$date_list, _res$data$other_produ, _res$data$other_produ2;
|
|
180
|
+
var startDate, endDate, custom_page_id, channel, dates, res;
|
|
183
181
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
184
182
|
while (1) switch (_context3.prev = _context3.next) {
|
|
185
183
|
case 0:
|
|
@@ -207,25 +205,22 @@ export var ScheduleModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
207
205
|
});
|
|
208
206
|
case 8:
|
|
209
207
|
res = _context3.sent;
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
otherProductIds = Array.isArray(responseData.other_product_ids) ? responseData.other_product_ids : [];
|
|
213
|
-
this.setAvailabilityScheduleDateList(dateList);
|
|
214
|
-
this.setOtherProductsIds(otherProductIds);
|
|
208
|
+
this.setAvailabilityScheduleDateList(res.data.date_list);
|
|
209
|
+
this.setOtherProductsIds(res.data.other_product_ids || []);
|
|
215
210
|
// 如果没有schedule或者结束日期在今天之前,则所有日期均不可用
|
|
216
|
-
if (!(!
|
|
217
|
-
_context3.next =
|
|
211
|
+
if (!(!((_res$data$date_list = res.data.date_list) !== null && _res$data$date_list !== void 0 && _res$data$date_list.length) && !((_res$data$other_produ = res.data.other_product_ids) !== null && _res$data$other_produ !== void 0 && _res$data$other_produ.length) || dayjs(endDate).isBefore(dayjs(), 'day'))) {
|
|
212
|
+
_context3.next = 13;
|
|
218
213
|
break;
|
|
219
214
|
}
|
|
220
215
|
return _context3.abrupt("return", dates);
|
|
221
|
-
case
|
|
222
|
-
if (
|
|
216
|
+
case 13:
|
|
217
|
+
if ((_res$data$other_produ2 = res.data.other_product_ids) !== null && _res$data$other_produ2 !== void 0 && _res$data$other_produ2.length) {
|
|
223
218
|
// 如果后端有返回 other_product_ids ,意味着有 duration 商品,则今天以及今天以后的日期均可用
|
|
224
219
|
dates.forEach(function (n) {
|
|
225
220
|
n.status = 'available';
|
|
226
221
|
});
|
|
227
222
|
} else {
|
|
228
|
-
|
|
223
|
+
res.data.date_list.forEach(function (n) {
|
|
229
224
|
var index = dates.findIndex(function (m) {
|
|
230
225
|
return m.date === n.date;
|
|
231
226
|
});
|
|
@@ -236,7 +231,7 @@ export var ScheduleModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
236
231
|
}
|
|
237
232
|
dates = disableDatesBeforeOneDay(dates);
|
|
238
233
|
return _context3.abrupt("return", dates);
|
|
239
|
-
case
|
|
234
|
+
case 16:
|
|
240
235
|
case "end":
|
|
241
236
|
return _context3.stop();
|
|
242
237
|
}
|
|
@@ -706,50 +706,25 @@ var getBundleItemIsDiscountPrice = function getBundleItemIsDiscountPrice(item) {
|
|
|
706
706
|
var getBundleItemIsMarkupOrDiscountPrice = function getBundleItemIsMarkupOrDiscountPrice(item) {
|
|
707
707
|
return getBundleItemIsMarkupPrice(item) || getBundleItemIsDiscountPrice(item);
|
|
708
708
|
};
|
|
709
|
-
var getDiscountAmount = function getDiscountAmount(discounts) {
|
|
710
|
-
return (discounts || []).reduce(function (total, discount) {
|
|
711
|
-
return total.add(new Decimal(discount.amount || 0));
|
|
712
|
-
}, new Decimal(0)).toNumber();
|
|
713
|
-
};
|
|
714
709
|
|
|
715
710
|
/**
|
|
716
711
|
* 获取主商品加价减价后的总价 (主商品价格 + 子商品加价减价)
|
|
717
712
|
*/
|
|
718
713
|
var getMainProductTotal = function getMainProductTotal(item) {
|
|
719
|
-
var _ref8, _ref9, _item$main_product_se, _item$metadata, _item$metadata2
|
|
714
|
+
var _ref8, _ref9, _item$main_product_se, _item$metadata, _item$metadata2;
|
|
720
715
|
// 新语义 v2 下 `main_product_selling_price` / `metadata.main_product_selling_price`
|
|
721
716
|
// 已经是"含 option、含主商品折扣"的主价,直接作为主商品基准,无需再减折扣或加 option。
|
|
722
717
|
// 仅需叠加 markup / markdown 类 bundle(原价 bundle 的税费单独处理)。
|
|
723
718
|
var total = new Decimal((_ref8 = (_ref9 = (_item$main_product_se = item === null || item === void 0 ? void 0 : item.main_product_selling_price) !== null && _item$main_product_se !== void 0 ? _item$main_product_se : item === null || item === void 0 || (_item$metadata = item.metadata) === null || _item$metadata === void 0 ? void 0 : _item$metadata.main_product_selling_price) !== null && _ref9 !== void 0 ? _ref9 : item === null || item === void 0 || (_item$metadata2 = item.metadata) === null || _item$metadata2 === void 0 ? void 0 : _item$metadata2.main_product_original_price) !== null && _ref8 !== void 0 ? _ref8 : 0);
|
|
724
|
-
|
|
725
|
-
// 做个兜底 如果新语义价格字段都没有,则切换回老逻辑
|
|
726
|
-
var hasMainProductPrice = (item === null || item === void 0 ? void 0 : item.main_product_selling_price) != null || (item === null || item === void 0 || (_item$metadata3 = item.metadata) === null || _item$metadata3 === void 0 ? void 0 : _item$metadata3.main_product_selling_price) != null || (item === null || item === void 0 || (_item$metadata4 = item.metadata) === null || _item$metadata4 === void 0 ? void 0 : _item$metadata4.main_product_original_price) != null;
|
|
727
|
-
if (!hasMainProductPrice) {
|
|
728
|
-
var _ref10, _ref11, _item$main_product_se2, _item$metadata5, _item$_origin3, _item$_originData;
|
|
729
|
-
total = new Decimal((_ref10 = (_ref11 = (_item$main_product_se2 = item === null || item === void 0 ? void 0 : item.main_product_selling_price) !== null && _item$main_product_se2 !== void 0 ? _item$main_product_se2 : item === null || item === void 0 || (_item$metadata5 = item.metadata) === null || _item$metadata5 === void 0 ? void 0 : _item$metadata5.main_product_selling_price) !== null && _ref11 !== void 0 ? _ref11 : item.price) !== null && _ref10 !== void 0 ? _ref10 : 0);
|
|
730
|
-
var discount = (item === null || item === void 0 || (_item$_origin3 = item._origin) === null || _item$_origin3 === void 0 || (_item$_origin3 = _item$_origin3.product) === null || _item$_origin3 === void 0 ? void 0 : _item$_origin3.discount_list) || (item === null || item === void 0 || (_item$_originData = item._originData) === null || _item$_originData === void 0 || (_item$_originData = _item$_originData.product) === null || _item$_originData === void 0 || (_item$_originData = _item$_originData.discount_list) === null || _item$_originData === void 0 ? void 0 : _item$_originData.filter(function (item) {
|
|
731
|
-
var _item$metadata6;
|
|
732
|
-
return !(item !== null && item !== void 0 && (_item$metadata6 = item.metadata) !== null && _item$metadata6 !== void 0 && _item$metadata6.custom_product_bundle_map_id);
|
|
733
|
-
})) || [];
|
|
734
|
-
var mainProductDiscountAmount = getDiscountAmount(discount);
|
|
735
|
-
total = total.minus(mainProductDiscountAmount);
|
|
736
|
-
|
|
737
|
-
// 单规格
|
|
738
|
-
if (item !== null && item !== void 0 && item.option && Array.isArray(item === null || item === void 0 ? void 0 : item.option)) {
|
|
739
|
-
total = total.add(item === null || item === void 0 ? void 0 : item.option.reduce(function (t, option) {
|
|
740
|
-
return t.add(new Decimal(option.price || 0).mul(option.num || 1));
|
|
741
|
-
}, new Decimal(0)));
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
719
|
var _iterator4 = _createForOfIteratorHelper((item === null || item === void 0 ? void 0 : item.bundle) || []),
|
|
745
720
|
_step4;
|
|
746
721
|
try {
|
|
747
722
|
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
748
723
|
var bundleItem = _step4.value;
|
|
749
724
|
if (getBundleItemIsMarkupOrDiscountPrice(bundleItem)) {
|
|
750
|
-
var
|
|
725
|
+
var _ref10, _bundleItem$bundle_se2;
|
|
751
726
|
// IMPORTANT: 套餐子商品如果应用了 discount,bundle_selling_price 和 price 其实都已经是折后价格了,不需要单独再减一次
|
|
752
|
-
var bundleItemTotal = new Decimal((
|
|
727
|
+
var bundleItemTotal = new Decimal((_ref10 = (_bundleItem$bundle_se2 = bundleItem.bundle_selling_price) !== null && _bundleItem$bundle_se2 !== void 0 ? _bundleItem$bundle_se2 : bundleItem.price) !== null && _ref10 !== void 0 ? _ref10 : 0);
|
|
753
728
|
total = total.add(bundleItemTotal);
|
|
754
729
|
}
|
|
755
730
|
}
|
|
@@ -869,12 +844,12 @@ var isProductMatchSurchargeCondition = function isProductMatchSurchargeCondition
|
|
|
869
844
|
* @param options.scheduleById schedule 映射表:`{ [scheduleId]: schedule }`(用于根据配置的 `available_schedule_ids` 做日程匹配)
|
|
870
845
|
* @returns 附加费列表(仅返回金额 > 0 的项)
|
|
871
846
|
*/
|
|
872
|
-
export var getSurcharge = function getSurcharge(
|
|
847
|
+
export var getSurcharge = function getSurcharge(_ref11, options) {
|
|
873
848
|
var _service$filter;
|
|
874
|
-
var service =
|
|
875
|
-
addons =
|
|
876
|
-
bookingDetail =
|
|
877
|
-
bookingId =
|
|
849
|
+
var service = _ref11.service,
|
|
850
|
+
addons = _ref11.addons,
|
|
851
|
+
bookingDetail = _ref11.bookingDetail,
|
|
852
|
+
bookingId = _ref11.bookingId;
|
|
878
853
|
var isEdit = options.isEdit,
|
|
879
854
|
isInScheduleByDate = options.isInScheduleByDate,
|
|
880
855
|
surcharge_list = options.surcharge_list,
|
|
@@ -996,11 +971,11 @@ export var getSurcharge = function getSurcharge(_ref13, options) {
|
|
|
996
971
|
scheduleById: scheduleById || {},
|
|
997
972
|
isInScheduleByDate: isInScheduleByDate
|
|
998
973
|
})) {
|
|
999
|
-
var
|
|
974
|
+
var _ref12, _bundleItem$bundle_se3;
|
|
1000
975
|
var _mainQuantity = item.num || 1;
|
|
1001
976
|
matchedItems.push({
|
|
1002
977
|
isMain: false,
|
|
1003
|
-
total: Number((
|
|
978
|
+
total: Number((_ref12 = (_bundleItem$bundle_se3 = bundleItem.bundle_selling_price) !== null && _bundleItem$bundle_se3 !== void 0 ? _bundleItem$bundle_se3 : bundleItem.price) !== null && _ref12 !== void 0 ? _ref12 : 0),
|
|
1004
979
|
quantity: bundleItem.num || bundleItem.quantity || 1,
|
|
1005
980
|
item: bundleItem,
|
|
1006
981
|
mainQuantity: _mainQuantity // 子商品的mainQuantity是所属主商品的quantity
|
|
@@ -1216,9 +1191,9 @@ export var getSurcharge = function getSurcharge(_ref13, options) {
|
|
|
1216
1191
|
}
|
|
1217
1192
|
return surchargeWithAmount;
|
|
1218
1193
|
};
|
|
1219
|
-
function resetItemsSurchargeSideEffects(
|
|
1220
|
-
var service =
|
|
1221
|
-
addons =
|
|
1194
|
+
function resetItemsSurchargeSideEffects(_ref13) {
|
|
1195
|
+
var service = _ref13.service,
|
|
1196
|
+
addons = _ref13.addons;
|
|
1222
1197
|
var resetItem = function resetItem(item) {
|
|
1223
1198
|
if (!item) return;
|
|
1224
1199
|
item.surcharge_fee = 0;
|
package/dist/modules/index.d.ts
CHANGED
package/dist/modules/index.js
CHANGED
|
@@ -17,6 +17,4 @@ export * from "./Schedule";
|
|
|
17
17
|
export * from "./Quotation";
|
|
18
18
|
export * from "./ScanOrderLogger";
|
|
19
19
|
export * from "./OpenData";
|
|
20
|
-
export * from "./BookingContext";
|
|
21
|
-
export * from "./Holder";
|
|
22
|
-
export * from "./ResourcePlanner";
|
|
20
|
+
export * from "./BookingContext";
|
package/dist/plugins/window.d.ts
CHANGED
package/dist/server/index.d.ts
CHANGED
|
@@ -49,10 +49,6 @@ declare class Server {
|
|
|
49
49
|
private productQuerySubscribers;
|
|
50
50
|
/** subscriberId → 智能定价变价时间点定时器句柄(与 subscriber 分离存储,便于 clear) */
|
|
51
51
|
private productQueryScheduleTimers;
|
|
52
|
-
/** 餐牌筛选为空时才触发的菜单/日程缓存自愈,避免每次商品查询都请求远端。 */
|
|
53
|
-
private menuScheduleRefreshInFlight;
|
|
54
|
-
private lastMenuScheduleRefreshAt;
|
|
55
|
-
private readonly MENU_SCHEDULE_REFRESH_COOLDOWN_MS;
|
|
56
52
|
private orderQuerySubscribers;
|
|
57
53
|
private bookingQuerySubscribers;
|
|
58
54
|
private bookingRemoteQuerySubscribers;
|
|
@@ -266,16 +262,6 @@ declare class Server {
|
|
|
266
262
|
* 存储订阅者信息,便于数据变更时推送最新结果
|
|
267
263
|
*/
|
|
268
264
|
private handleProductQuery;
|
|
269
|
-
/**
|
|
270
|
-
* ProductList callers such as standalone retail pages do not always have a selected schedule.
|
|
271
|
-
* In that case query against the current local time so menu availability can still be evaluated.
|
|
272
|
-
*/
|
|
273
|
-
private resolveProductQueryScheduleContext;
|
|
274
|
-
/**
|
|
275
|
-
* OpenData 的关联餐牌可能已更新,而 server_menu/server_schedule 仍命中本地持久化缓存。
|
|
276
|
-
* 仅在当前筛选没有任何生效餐牌时刷新一次,并由调用方重新计算筛选结果。
|
|
277
|
-
*/
|
|
278
|
-
private refreshMenuScheduleCacheAfterEmptyResult;
|
|
279
265
|
/**
|
|
280
266
|
* 按商品 id 查询单条(GET /shop/product/query/:productId)
|
|
281
267
|
* schedule_date 必填:query 或 data;schedule_datetime 可选。不走订阅。
|