@pisell/pisellos 2.1.50 → 2.1.51

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.
@@ -652,6 +652,7 @@ export interface WalletInitBusinessData {
652
652
  order_wait_pay_amount?: number;
653
653
  /** 订单ID */
654
654
  payment_order_id?: string;
655
+ is_price_include_tax: number;
655
656
  }
656
657
  /**
657
658
  * 查询用户识别码列表请求参数
@@ -63,12 +63,14 @@ export var WalletPassPaymentImpl = /*#__PURE__*/function () {
63
63
  amountInfo = businessData.amountInfo,
64
64
  products = businessData.products,
65
65
  order_wait_pay_amount = businessData.order_wait_pay_amount,
66
- payment_order_id = businessData.payment_order_id;
66
+ payment_order_id = businessData.payment_order_id,
67
+ is_price_include_tax = businessData.is_price_include_tax;
67
68
 
68
69
  // 转换金额为数字类型
69
70
  var totalAmount = Number(amountInfo.totalAmount);
70
71
  var subTotal = Number(amountInfo.subTotal);
71
72
  var walletParams = {
73
+ is_price_include_tax: is_price_include_tax,
72
74
  sale_channel: 'pos',
73
75
  customer_id: customer_id || 0,
74
76
  // 提供默认值,确保类型为 number
@@ -417,6 +417,14 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
417
417
  main_product_original_price: item.price,
418
418
  // 主商品折扣后金额,不包含套餐子商品
419
419
  main_product_selling_price: item.main_product_selling_price,
420
+ metadata: {
421
+ // 主商品+非原价(加减价)子商品税费
422
+ "main_product_attached_bundle_tax_fee": item.metadata.main_product_attached_bundle_tax_fee,
423
+ // 主商品+非原价(加减价)子商品附加费
424
+ "main_product_attached_bundle_surcharge_fee": item.metadata.main_product_attached_bundle_surcharge_fee,
425
+ // 可选,附加费均摊舍入金额
426
+ "surcharge_rounding_remainder": item.metadata.surcharge_rounding_remainder
427
+ },
420
428
  product_bundle: item.product_bundle.map(function (bundle) {
421
429
  return {
422
430
  bundle_id: bundle.bundle_id,
@@ -428,7 +436,15 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
428
436
  bundle_sum_price: bundle.bundle_sum_price,
429
437
  // 套餐子商品折扣后金额
430
438
  bundle_selling_price: bundle.bundle_selling_price,
431
- num: bundle.num
439
+ num: bundle.num,
440
+ is_charge_tax: bundle.is_charge_tax,
441
+ tax_fee: bundle.tax_fee,
442
+ metadata: {
443
+ // 子商品单数量附加费
444
+ "surcharge_fee": bundle.metadata.surcharge_fee,
445
+ // 可选,附加费均摊舍入金额
446
+ "surcharge_rounding_remainder": bundle.metadata.surcharge_rounding_remainder
447
+ }
432
448
  };
433
449
  })
434
450
  };
@@ -473,7 +489,8 @@ export var CheckoutImpl = /*#__PURE__*/function (_BaseModule) {
473
489
  depositAmount: (_this$store$currentOr4 = this.store.currentOrder) === null || _this$store$currentOr4 === void 0 ? void 0 : _this$store$currentOr4.deposit_amount,
474
490
  isDeposit: (_this$store$currentOr5 = this.store.currentOrder) === null || _this$store$currentOr5 === void 0 ? void 0 : _this$store$currentOr5.is_deposit
475
491
  },
476
- products: this.getProductListByOrder()
492
+ products: this.getProductListByOrder(),
493
+ is_price_include_tax: this.otherParams.is_price_include_tax
477
494
  }, params); // 判断订单是否已经同步,如果是则追加payment_order_id参数
478
495
  if (this.store.isOrderSynced) {
479
496
  walletBusinessData.payment_order_id = (_this$store$currentOr6 = this.store.currentOrder) === null || _this$store$currentOr6 === void 0 ? void 0 : _this$store$currentOr6.order_id;
@@ -652,6 +652,7 @@ export interface WalletInitBusinessData {
652
652
  order_wait_pay_amount?: number;
653
653
  /** 订单ID */
654
654
  payment_order_id?: string;
655
+ is_price_include_tax: number;
655
656
  }
656
657
  /**
657
658
  * 查询用户识别码列表请求参数
@@ -51,10 +51,18 @@ var WalletPassPaymentImpl = class {
51
51
  */
52
52
  generateWalletParams(businessData) {
53
53
  var _a;
54
- const { customer_id, amountInfo, products, order_wait_pay_amount, payment_order_id } = businessData;
54
+ const {
55
+ customer_id,
56
+ amountInfo,
57
+ products,
58
+ order_wait_pay_amount,
59
+ payment_order_id,
60
+ is_price_include_tax
61
+ } = businessData;
55
62
  const totalAmount = Number(amountInfo.totalAmount);
56
63
  const subTotal = Number(amountInfo.subTotal);
57
64
  const walletParams = {
65
+ is_price_include_tax,
58
66
  sale_channel: "pos",
59
67
  customer_id: customer_id || 0,
60
68
  // 提供默认值,确保类型为 number
@@ -236,6 +236,14 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
236
236
  main_product_original_price: item.price,
237
237
  // 主商品折扣后金额,不包含套餐子商品
238
238
  main_product_selling_price: item.main_product_selling_price,
239
+ metadata: {
240
+ // 主商品+非原价(加减价)子商品税费
241
+ "main_product_attached_bundle_tax_fee": item.metadata.main_product_attached_bundle_tax_fee,
242
+ // 主商品+非原价(加减价)子商品附加费
243
+ "main_product_attached_bundle_surcharge_fee": item.metadata.main_product_attached_bundle_surcharge_fee,
244
+ // 可选,附加费均摊舍入金额
245
+ "surcharge_rounding_remainder": item.metadata.surcharge_rounding_remainder
246
+ },
239
247
  product_bundle: item.product_bundle.map((bundle) => {
240
248
  return {
241
249
  bundle_id: bundle.bundle_id,
@@ -247,7 +255,15 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
247
255
  bundle_sum_price: bundle.bundle_sum_price,
248
256
  // 套餐子商品折扣后金额
249
257
  bundle_selling_price: bundle.bundle_selling_price,
250
- num: bundle.num
258
+ num: bundle.num,
259
+ is_charge_tax: bundle.is_charge_tax,
260
+ tax_fee: bundle.tax_fee,
261
+ metadata: {
262
+ // 子商品单数量附加费
263
+ "surcharge_fee": bundle.metadata.surcharge_fee,
264
+ // 可选,附加费均摊舍入金额
265
+ "surcharge_rounding_remainder": bundle.metadata.surcharge_rounding_remainder
266
+ }
251
267
  };
252
268
  })
253
269
  })
@@ -287,6 +303,8 @@ var CheckoutImpl = class extends import_BaseModule.BaseModule {
287
303
  isDeposit: (_e = this.store.currentOrder) == null ? void 0 : _e.is_deposit
288
304
  },
289
305
  products: this.getProductListByOrder(),
306
+ is_price_include_tax: this.otherParams.is_price_include_tax,
307
+ // core 有
290
308
  ...params
291
309
  };
292
310
  if (this.store.isOrderSynced) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "2.1.50",
4
+ "version": "2.1.51",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",