@pisell/pisellos 2.3.48 → 2.3.50
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/Discount/index.d.ts +1 -0
- package/dist/modules/Discount/index.js +40 -11
- package/dist/modules/Discount/types.d.ts +1 -0
- package/dist/modules/Holder/index.d.ts +48 -0
- package/dist/modules/Holder/index.js +640 -0
- package/dist/modules/Holder/types.d.ts +123 -0
- package/dist/modules/Holder/types.js +1 -0
- package/dist/modules/Holder/utils.d.ts +13 -0
- package/dist/modules/Holder/utils.js +34 -0
- package/dist/modules/OpenData/index.js +2 -2
- package/dist/modules/Order/index.d.ts +3 -1
- package/dist/modules/Order/index.js +54 -25
- package/dist/modules/Order/types.d.ts +9 -0
- package/dist/modules/Order/utils.d.ts +10 -0
- package/dist/modules/Order/utils.js +35 -3
- package/dist/modules/Product/types.d.ts +1 -0
- package/dist/modules/ProductList/index.js +33 -14
- package/dist/modules/Quotation/index.d.ts +1 -1
- package/dist/modules/Quotation/index.js +2 -2
- package/dist/modules/ResourcePlanner/index.d.ts +24 -0
- package/dist/modules/ResourcePlanner/index.js +181 -0
- package/dist/modules/ResourcePlanner/planner.d.ts +14 -0
- package/dist/modules/ResourcePlanner/planner.js +1069 -0
- package/dist/modules/ResourcePlanner/types.d.ts +227 -0
- package/dist/modules/ResourcePlanner/types.js +1 -0
- package/dist/modules/Rules/index.js +47 -13
- package/dist/modules/SalesSummary/index.js +12 -13
- package/dist/modules/ScanOrderLogger/index.d.ts +2 -0
- package/dist/modules/ScanOrderLogger/index.js +15 -2
- package/dist/modules/ScanOrderLogger/providers/feishu.js +45 -27
- package/dist/modules/ScanOrderLogger/types.d.ts +1 -0
- package/dist/modules/Schedule/index.d.ts +3 -1
- package/dist/modules/Schedule/index.js +21 -16
- package/dist/modules/Summary/utils.js +38 -13
- package/dist/modules/index.d.ts +2 -0
- package/dist/modules/index.js +3 -1
- package/dist/plugins/window.d.ts +1 -0
- package/dist/server/index.d.ts +14 -0
- package/dist/server/index.js +907 -793
- package/dist/server/modules/index.d.ts +1 -1
- package/dist/server/modules/order/index.d.ts +0 -16
- package/dist/server/modules/order/index.js +776 -964
- package/dist/server/modules/order/types.d.ts +0 -14
- package/dist/server/modules/order/types.js +0 -6
- package/dist/solution/BaseSales/index.d.ts +7 -0
- package/dist/solution/BaseSales/index.js +64 -42
- package/dist/solution/BookingByStep/index.d.ts +16 -1
- package/dist/solution/BookingByStep/index.js +294 -215
- package/dist/solution/BookingByStep/types.d.ts +2 -1
- package/dist/solution/BookingByStep/types.js +3 -1
- package/dist/solution/BookingByStep/utils/capacity.js +17 -1
- package/dist/solution/BookingByStep/utils/timeslots.d.ts +3 -1
- package/dist/solution/BookingByStep/utils/timeslots.js +19 -12
- package/dist/solution/BookingTicket/index.js +2 -2
- package/dist/solution/BookingTicket/utils/scan/handleScan.d.ts +3 -1
- package/dist/solution/BookingTicket/utils/scan/handleScan.js +10 -2
- package/dist/solution/ScanOrder/index.d.ts +26 -14
- package/dist/solution/ScanOrder/index.js +1142 -739
- package/dist/solution/ScanOrder/types.d.ts +21 -1
- package/dist/solution/ScanOrder/utils.d.ts +8 -0
- package/dist/solution/ScanOrder/utils.js +66 -25
- package/dist/solution/ShopDiscount/index.d.ts +1 -0
- package/dist/solution/ShopDiscount/index.js +125 -87
- package/dist/solution/UnifiedBookingSales/index.d.ts +183 -0
- package/dist/solution/UnifiedBookingSales/index.js +1891 -0
- package/dist/solution/UnifiedBookingSales/types.d.ts +143 -0
- package/dist/solution/UnifiedBookingSales/types.js +11 -0
- package/dist/solution/VenueBooking/index.d.ts +39 -11
- package/dist/solution/VenueBooking/index.js +1167 -841
- package/dist/solution/VenueBooking/types.d.ts +3 -0
- package/dist/solution/VenueBooking/utils/resource.js +1 -0
- package/dist/solution/VenueBooking/utils/slotMerge.d.ts +4 -4
- package/dist/solution/VenueBooking/utils/slotMerge.js +10 -5
- package/dist/solution/index.d.ts +1 -0
- package/dist/solution/index.js +2 -1
- package/dist/types/index.d.ts +1 -0
- package/lib/modules/Discount/index.d.ts +1 -0
- package/lib/modules/Discount/index.js +9 -0
- package/lib/modules/Discount/types.d.ts +1 -0
- package/lib/modules/Holder/index.d.ts +48 -0
- package/lib/modules/Holder/index.js +402 -0
- package/lib/modules/Holder/types.d.ts +123 -0
- package/lib/modules/Holder/types.js +17 -0
- package/lib/modules/Holder/utils.d.ts +13 -0
- package/lib/modules/Holder/utils.js +71 -0
- package/lib/modules/OpenData/index.js +1 -1
- package/lib/modules/Order/index.d.ts +3 -1
- package/lib/modules/Order/index.js +26 -10
- package/lib/modules/Order/types.d.ts +9 -0
- package/lib/modules/Order/utils.d.ts +10 -0
- package/lib/modules/Order/utils.js +36 -5
- package/lib/modules/Product/types.d.ts +1 -0
- package/lib/modules/ProductList/index.js +40 -31
- package/lib/modules/Quotation/index.d.ts +1 -1
- package/lib/modules/Quotation/index.js +2 -2
- package/lib/modules/ResourcePlanner/index.d.ts +24 -0
- package/lib/modules/ResourcePlanner/index.js +148 -0
- package/lib/modules/ResourcePlanner/planner.d.ts +14 -0
- package/lib/modules/ResourcePlanner/planner.js +933 -0
- package/lib/modules/ResourcePlanner/types.d.ts +227 -0
- package/lib/modules/ResourcePlanner/types.js +17 -0
- package/lib/modules/Rules/index.js +33 -16
- package/lib/modules/SalesSummary/index.js +6 -7
- package/lib/modules/ScanOrderLogger/index.d.ts +2 -0
- package/lib/modules/ScanOrderLogger/index.js +13 -1
- package/lib/modules/ScanOrderLogger/providers/feishu.js +15 -6
- package/lib/modules/ScanOrderLogger/types.d.ts +1 -0
- package/lib/modules/Schedule/index.d.ts +3 -1
- package/lib/modules/Schedule/index.js +10 -8
- package/lib/modules/Summary/utils.js +21 -1
- package/lib/modules/index.d.ts +2 -0
- package/lib/modules/index.js +5 -1
- package/lib/plugins/window.d.ts +1 -0
- package/lib/server/index.d.ts +14 -0
- package/lib/server/index.js +72 -15
- package/lib/server/modules/index.d.ts +1 -1
- package/lib/server/modules/order/index.d.ts +0 -16
- package/lib/server/modules/order/index.js +4 -140
- package/lib/server/modules/order/types.d.ts +0 -14
- package/lib/server/modules/order/types.js +0 -1
- package/lib/solution/BaseSales/index.d.ts +7 -0
- package/lib/solution/BaseSales/index.js +24 -8
- package/lib/solution/BookingByStep/index.d.ts +16 -1
- package/lib/solution/BookingByStep/index.js +60 -18
- package/lib/solution/BookingByStep/types.d.ts +2 -1
- package/lib/solution/BookingByStep/types.js +5 -0
- package/lib/solution/BookingByStep/utils/capacity.js +20 -1
- package/lib/solution/BookingByStep/utils/timeslots.d.ts +3 -1
- package/lib/solution/BookingByStep/utils/timeslots.js +19 -11
- package/lib/solution/BookingTicket/index.js +10 -2
- package/lib/solution/BookingTicket/utils/scan/handleScan.d.ts +3 -1
- package/lib/solution/BookingTicket/utils/scan/handleScan.js +2 -2
- package/lib/solution/ScanOrder/index.d.ts +26 -14
- package/lib/solution/ScanOrder/index.js +449 -182
- package/lib/solution/ScanOrder/types.d.ts +21 -1
- package/lib/solution/ScanOrder/utils.d.ts +8 -0
- package/lib/solution/ScanOrder/utils.js +31 -0
- package/lib/solution/ShopDiscount/index.d.ts +1 -0
- package/lib/solution/ShopDiscount/index.js +14 -0
- package/lib/solution/UnifiedBookingSales/index.d.ts +183 -0
- package/lib/solution/UnifiedBookingSales/index.js +1084 -0
- package/lib/solution/UnifiedBookingSales/types.d.ts +143 -0
- package/lib/solution/UnifiedBookingSales/types.js +33 -0
- package/lib/solution/VenueBooking/index.d.ts +39 -11
- package/lib/solution/VenueBooking/index.js +322 -110
- package/lib/solution/VenueBooking/types.d.ts +3 -0
- package/lib/solution/VenueBooking/utils/resource.js +1 -0
- package/lib/solution/VenueBooking/utils/slotMerge.d.ts +4 -4
- package/lib/solution/VenueBooking/utils/slotMerge.js +6 -4
- package/lib/solution/index.d.ts +1 -0
- package/lib/solution/index.js +3 -1
- package/lib/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -123,21 +123,24 @@ 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 _scheduleList$data;
|
|
127
|
-
var
|
|
126
|
+
var _options$useCache, _scheduleList$data;
|
|
127
|
+
var options,
|
|
128
|
+
scheduleList,
|
|
129
|
+
_args2 = arguments;
|
|
128
130
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
129
131
|
while (1) switch (_context2.prev = _context2.next) {
|
|
130
132
|
case 0:
|
|
131
|
-
|
|
133
|
+
options = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
|
134
|
+
_context2.next = 3;
|
|
132
135
|
return this.request.get("/schedule", {
|
|
133
136
|
num: 999
|
|
134
137
|
}, {
|
|
135
|
-
useCache: true
|
|
138
|
+
useCache: (_options$useCache = options.useCache) !== null && _options$useCache !== void 0 ? _options$useCache : true
|
|
136
139
|
});
|
|
137
|
-
case
|
|
140
|
+
case 3:
|
|
138
141
|
scheduleList = _context2.sent;
|
|
139
142
|
this.setScheduleList(((_scheduleList$data = scheduleList.data) === null || _scheduleList$data === void 0 ? void 0 : _scheduleList$data.list) || []);
|
|
140
|
-
case
|
|
143
|
+
case 5:
|
|
141
144
|
case "end":
|
|
142
145
|
return _context2.stop();
|
|
143
146
|
}
|
|
@@ -176,8 +179,7 @@ export var ScheduleModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
176
179
|
key: "loadScheduleAvailableDate",
|
|
177
180
|
value: function () {
|
|
178
181
|
var _loadScheduleAvailableDate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(_ref) {
|
|
179
|
-
var
|
|
180
|
-
var startDate, endDate, custom_page_id, channel, dates, res;
|
|
182
|
+
var startDate, endDate, custom_page_id, channel, dates, res, responseData, dateList, otherProductIds;
|
|
181
183
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
182
184
|
while (1) switch (_context3.prev = _context3.next) {
|
|
183
185
|
case 0:
|
|
@@ -205,22 +207,25 @@ export var ScheduleModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
205
207
|
});
|
|
206
208
|
case 8:
|
|
207
209
|
res = _context3.sent;
|
|
208
|
-
|
|
209
|
-
|
|
210
|
+
responseData = res.data || {};
|
|
211
|
+
dateList = Array.isArray(responseData.date_list) ? responseData.date_list : [];
|
|
212
|
+
otherProductIds = Array.isArray(responseData.other_product_ids) ? responseData.other_product_ids : [];
|
|
213
|
+
this.setAvailabilityScheduleDateList(dateList);
|
|
214
|
+
this.setOtherProductsIds(otherProductIds);
|
|
210
215
|
// 如果没有schedule或者结束日期在今天之前,则所有日期均不可用
|
|
211
|
-
if (!(!
|
|
212
|
-
_context3.next =
|
|
216
|
+
if (!(!dateList.length && !otherProductIds.length || dayjs(endDate).isBefore(dayjs(), 'day'))) {
|
|
217
|
+
_context3.next = 16;
|
|
213
218
|
break;
|
|
214
219
|
}
|
|
215
220
|
return _context3.abrupt("return", dates);
|
|
216
|
-
case
|
|
217
|
-
if (
|
|
221
|
+
case 16:
|
|
222
|
+
if (otherProductIds.length) {
|
|
218
223
|
// 如果后端有返回 other_product_ids ,意味着有 duration 商品,则今天以及今天以后的日期均可用
|
|
219
224
|
dates.forEach(function (n) {
|
|
220
225
|
n.status = 'available';
|
|
221
226
|
});
|
|
222
227
|
} else {
|
|
223
|
-
|
|
228
|
+
dateList.forEach(function (n) {
|
|
224
229
|
var index = dates.findIndex(function (m) {
|
|
225
230
|
return m.date === n.date;
|
|
226
231
|
});
|
|
@@ -231,7 +236,7 @@ export var ScheduleModule = /*#__PURE__*/function (_BaseModule) {
|
|
|
231
236
|
}
|
|
232
237
|
dates = disableDatesBeforeOneDay(dates);
|
|
233
238
|
return _context3.abrupt("return", dates);
|
|
234
|
-
case
|
|
239
|
+
case 19:
|
|
235
240
|
case "end":
|
|
236
241
|
return _context3.stop();
|
|
237
242
|
}
|
|
@@ -706,25 +706,50 @@ 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
|
+
};
|
|
709
714
|
|
|
710
715
|
/**
|
|
711
716
|
* 获取主商品加价减价后的总价 (主商品价格 + 子商品加价减价)
|
|
712
717
|
*/
|
|
713
718
|
var getMainProductTotal = function getMainProductTotal(item) {
|
|
714
|
-
var _ref8, _ref9, _item$main_product_se, _item$metadata, _item$metadata2;
|
|
719
|
+
var _ref8, _ref9, _item$main_product_se, _item$metadata, _item$metadata2, _item$metadata3, _item$metadata4;
|
|
715
720
|
// 新语义 v2 下 `main_product_selling_price` / `metadata.main_product_selling_price`
|
|
716
721
|
// 已经是"含 option、含主商品折扣"的主价,直接作为主商品基准,无需再减折扣或加 option。
|
|
717
722
|
// 仅需叠加 markup / markdown 类 bundle(原价 bundle 的税费单独处理)。
|
|
718
723
|
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
|
+
}
|
|
719
744
|
var _iterator4 = _createForOfIteratorHelper((item === null || item === void 0 ? void 0 : item.bundle) || []),
|
|
720
745
|
_step4;
|
|
721
746
|
try {
|
|
722
747
|
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
723
748
|
var bundleItem = _step4.value;
|
|
724
749
|
if (getBundleItemIsMarkupOrDiscountPrice(bundleItem)) {
|
|
725
|
-
var
|
|
750
|
+
var _ref12, _bundleItem$bundle_se2;
|
|
726
751
|
// IMPORTANT: 套餐子商品如果应用了 discount,bundle_selling_price 和 price 其实都已经是折后价格了,不需要单独再减一次
|
|
727
|
-
var bundleItemTotal = new Decimal((
|
|
752
|
+
var bundleItemTotal = new Decimal((_ref12 = (_bundleItem$bundle_se2 = bundleItem.bundle_selling_price) !== null && _bundleItem$bundle_se2 !== void 0 ? _bundleItem$bundle_se2 : bundleItem.price) !== null && _ref12 !== void 0 ? _ref12 : 0);
|
|
728
753
|
total = total.add(bundleItemTotal);
|
|
729
754
|
}
|
|
730
755
|
}
|
|
@@ -844,12 +869,12 @@ var isProductMatchSurchargeCondition = function isProductMatchSurchargeCondition
|
|
|
844
869
|
* @param options.scheduleById schedule 映射表:`{ [scheduleId]: schedule }`(用于根据配置的 `available_schedule_ids` 做日程匹配)
|
|
845
870
|
* @returns 附加费列表(仅返回金额 > 0 的项)
|
|
846
871
|
*/
|
|
847
|
-
export var getSurcharge = function getSurcharge(
|
|
872
|
+
export var getSurcharge = function getSurcharge(_ref13, options) {
|
|
848
873
|
var _service$filter;
|
|
849
|
-
var service =
|
|
850
|
-
addons =
|
|
851
|
-
bookingDetail =
|
|
852
|
-
bookingId =
|
|
874
|
+
var service = _ref13.service,
|
|
875
|
+
addons = _ref13.addons,
|
|
876
|
+
bookingDetail = _ref13.bookingDetail,
|
|
877
|
+
bookingId = _ref13.bookingId;
|
|
853
878
|
var isEdit = options.isEdit,
|
|
854
879
|
isInScheduleByDate = options.isInScheduleByDate,
|
|
855
880
|
surcharge_list = options.surcharge_list,
|
|
@@ -971,11 +996,11 @@ export var getSurcharge = function getSurcharge(_ref11, options) {
|
|
|
971
996
|
scheduleById: scheduleById || {},
|
|
972
997
|
isInScheduleByDate: isInScheduleByDate
|
|
973
998
|
})) {
|
|
974
|
-
var
|
|
999
|
+
var _ref14, _bundleItem$bundle_se3;
|
|
975
1000
|
var _mainQuantity = item.num || 1;
|
|
976
1001
|
matchedItems.push({
|
|
977
1002
|
isMain: false,
|
|
978
|
-
total: Number((
|
|
1003
|
+
total: Number((_ref14 = (_bundleItem$bundle_se3 = bundleItem.bundle_selling_price) !== null && _bundleItem$bundle_se3 !== void 0 ? _bundleItem$bundle_se3 : bundleItem.price) !== null && _ref14 !== void 0 ? _ref14 : 0),
|
|
979
1004
|
quantity: bundleItem.num || bundleItem.quantity || 1,
|
|
980
1005
|
item: bundleItem,
|
|
981
1006
|
mainQuantity: _mainQuantity // 子商品的mainQuantity是所属主商品的quantity
|
|
@@ -1191,9 +1216,9 @@ export var getSurcharge = function getSurcharge(_ref11, options) {
|
|
|
1191
1216
|
}
|
|
1192
1217
|
return surchargeWithAmount;
|
|
1193
1218
|
};
|
|
1194
|
-
function resetItemsSurchargeSideEffects(
|
|
1195
|
-
var service =
|
|
1196
|
-
addons =
|
|
1219
|
+
function resetItemsSurchargeSideEffects(_ref15) {
|
|
1220
|
+
var service = _ref15.service,
|
|
1221
|
+
addons = _ref15.addons;
|
|
1197
1222
|
var resetItem = function resetItem(item) {
|
|
1198
1223
|
if (!item) return;
|
|
1199
1224
|
item.surcharge_fee = 0;
|
package/dist/modules/index.d.ts
CHANGED
package/dist/modules/index.js
CHANGED
|
@@ -17,4 +17,6 @@ export * from "./Schedule";
|
|
|
17
17
|
export * from "./Quotation";
|
|
18
18
|
export * from "./ScanOrderLogger";
|
|
19
19
|
export * from "./OpenData";
|
|
20
|
-
export * from "./BookingContext";
|
|
20
|
+
export * from "./BookingContext";
|
|
21
|
+
export * from "./Holder";
|
|
22
|
+
export * from "./ResourcePlanner";
|
package/dist/plugins/window.d.ts
CHANGED
package/dist/server/index.d.ts
CHANGED
|
@@ -49,6 +49,10 @@ 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;
|
|
52
56
|
private orderQuerySubscribers;
|
|
53
57
|
private bookingQuerySubscribers;
|
|
54
58
|
private bookingRemoteQuerySubscribers;
|
|
@@ -262,6 +266,16 @@ declare class Server {
|
|
|
262
266
|
* 存储订阅者信息,便于数据变更时推送最新结果
|
|
263
267
|
*/
|
|
264
268
|
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;
|
|
265
279
|
/**
|
|
266
280
|
* 按商品 id 查询单条(GET /shop/product/query/:productId)
|
|
267
281
|
* schedule_date 必填:query 或 data;schedule_datetime 可选。不走订阅。
|