@pisell/pisellos 2.2.217 → 2.2.219

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.
@@ -4126,8 +4126,18 @@ var Server = /*#__PURE__*/function () {
4126
4126
  title: title
4127
4127
  });
4128
4128
  case 15:
4129
+ if (pendingResult.data.order_id) {
4130
+ _context44.next = 17;
4131
+ break;
4132
+ }
4133
+ return _context44.abrupt("return", _objectSpread(_objectSpread({}, pendingResult), {}, {
4134
+ data: _objectSpread(_objectSpread({}, pendingResult.data), {}, {
4135
+ order_id: pendingResult.data.external_sale_number
4136
+ })
4137
+ }));
4138
+ case 17:
4129
4139
  return _context44.abrupt("return", pendingResult);
4130
- case 16:
4140
+ case 18:
4131
4141
  case "end":
4132
4142
  return _context44.stop();
4133
4143
  }
@@ -4143,7 +4153,7 @@ var Server = /*#__PURE__*/function () {
4143
4153
  value: function () {
4144
4154
  var _handlePendingSyncCheckoutOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee45(params) {
4145
4155
  var _this10 = this;
4146
- var backendPath, data, title, reason, pendingOrder, _pendingOrder$payment, _pendingOrder$order_i, _pendingOrder$summary, _pendingOrder$summary2, _pendingOrder$summary3, changeGivenAmount, errorMessage;
4156
+ var backendPath, data, title, reason, pendingOrder, _pendingOrder$payment, _pendingOrder$summary, _pendingOrder$summary2, _pendingOrder$summary3, changeGivenAmount, errorMessage;
4147
4157
  return _regeneratorRuntime().wrap(function _callee45$(_context45) {
4148
4158
  while (1) switch (_context45.prev = _context45.next) {
4149
4159
  case 0:
@@ -4201,8 +4211,7 @@ var Server = /*#__PURE__*/function () {
4201
4211
  code: 200,
4202
4212
  status: true,
4203
4213
  message: '',
4204
- data: {
4205
- order_id: (_pendingOrder$order_i = pendingOrder === null || pendingOrder === void 0 ? void 0 : pendingOrder.order_id) !== null && _pendingOrder$order_i !== void 0 ? _pendingOrder$order_i : pendingOrder === null || pendingOrder === void 0 ? void 0 : pendingOrder.external_sale_number,
4214
+ data: _objectSpread(_objectSpread({}, pendingOrder), {}, {
4206
4215
  amount_gap: pendingOrder === null || pendingOrder === void 0 || (_pendingOrder$summary = pendingOrder.summary) === null || _pendingOrder$summary === void 0 ? void 0 : _pendingOrder$summary.amount_gap,
4207
4216
  expect_amount: pendingOrder === null || pendingOrder === void 0 || (_pendingOrder$summary2 = pendingOrder.summary) === null || _pendingOrder$summary2 === void 0 ? void 0 : _pendingOrder$summary2.expect_amount,
4208
4217
  total_amount: pendingOrder === null || pendingOrder === void 0 || (_pendingOrder$summary3 = pendingOrder.summary) === null || _pendingOrder$summary3 === void 0 ? void 0 : _pendingOrder$summary3.total_amount,
@@ -4210,7 +4219,7 @@ var Server = /*#__PURE__*/function () {
4210
4219
  payment_info: {
4211
4220
  current_change_given_amount: changeGivenAmount
4212
4221
  }
4213
- }
4222
+ })
4214
4223
  });
4215
4224
  case 18:
4216
4225
  _context45.prev = 18;
@@ -310,7 +310,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
310
310
  * 获取当前的客户搜索条件
311
311
  * @returns 当前搜索条件
312
312
  */
313
- getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
313
+ getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
314
314
  /**
315
315
  * 获取客户列表状态(包含滚动加载相关状态)
316
316
  * @returns 客户状态
@@ -802,7 +802,7 @@ export var BookingTicketImpl = /*#__PURE__*/function (_BaseSalesImpl) {
802
802
  _context11.next = 6;
803
803
  break;
804
804
  }
805
- throw new Error('refreshSalesDetail: tempOrder.order_id 缺失');
805
+ return _context11.abrupt("return", {});
806
806
  case 6:
807
807
  return _context11.abrupt("return", this.loadSalesDetail({
808
808
  orderId: Number(orderId),
@@ -2548,6 +2548,15 @@ var Server = class {
2548
2548
  title
2549
2549
  });
2550
2550
  }
2551
+ if (!pendingResult.data.order_id) {
2552
+ return {
2553
+ ...pendingResult,
2554
+ data: {
2555
+ ...pendingResult.data,
2556
+ order_id: pendingResult.data.external_sale_number
2557
+ }
2558
+ };
2559
+ }
2551
2560
  return pendingResult;
2552
2561
  }
2553
2562
  async handlePendingSyncCheckoutOrder(params) {
@@ -2596,7 +2605,7 @@ var Server = class {
2596
2605
  status: true,
2597
2606
  message: "",
2598
2607
  data: {
2599
- order_id: (pendingOrder == null ? void 0 : pendingOrder.order_id) ?? (pendingOrder == null ? void 0 : pendingOrder.external_sale_number),
2608
+ ...pendingOrder,
2600
2609
  amount_gap: (_b = pendingOrder == null ? void 0 : pendingOrder.summary) == null ? void 0 : _b.amount_gap,
2601
2610
  expect_amount: (_c = pendingOrder == null ? void 0 : pendingOrder.summary) == null ? void 0 : _c.expect_amount,
2602
2611
  total_amount: (_d = pendingOrder == null ? void 0 : pendingOrder.summary) == null ? void 0 : _d.total_amount,
@@ -310,7 +310,7 @@ export declare class BookingTicketImpl extends BaseSalesImpl implements Module {
310
310
  * 获取当前的客户搜索条件
311
311
  * @returns 当前搜索条件
312
312
  */
313
- getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "num" | "skip">;
313
+ getCurrentCustomerSearchParams(): Omit<import("../../modules").ShopGetCustomerListParams, "skip" | "num">;
314
314
  /**
315
315
  * 获取客户列表状态(包含滚动加载相关状态)
316
316
  * @returns 客户状态
@@ -473,7 +473,7 @@ var BookingTicketImpl = class extends import_BaseSales.BaseSalesImpl {
473
473
  }
474
474
  const orderId = tempOrder.order_id;
475
475
  if (orderId === void 0 || orderId === null) {
476
- throw new Error("refreshSalesDetail: tempOrder.order_id 缺失");
476
+ return {};
477
477
  }
478
478
  return this.loadSalesDetail({
479
479
  orderId: Number(orderId),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.2.217",
4
+ "version": "2.2.219",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",