@pisell/private-materials 6.8.24 → 6.8.26

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.
@@ -1787,8 +1787,7 @@ var Footer = function Footer(props) {
1787
1787
  // 清空所有内容并重置购物车
1788
1788
  var handleClearAllAndReset = function handleClearAllAndReset() {
1789
1789
  var _shopDiscount$clear, _window9;
1790
- clearAllScanListenersTaskQueue();
1791
-
1790
+ debugger;
1792
1791
  // 清空附加服务
1793
1792
  dispatch({
1794
1793
  type: 'setAddons',
@@ -1846,6 +1845,7 @@ var Footer = function Footer(props) {
1846
1845
  value: []
1847
1846
  }
1848
1847
  });
1848
+ clearAllScanListenersTaskQueue();
1849
1849
  };
1850
1850
 
1851
1851
  // 购物车进入编辑状态
@@ -1993,7 +1993,12 @@ var Footer = function Footer(props) {
1993
1993
  setIsPaymentModalOpen(false);
1994
1994
  setPaymentModalData(null);
1995
1995
  setPaymentCallback(null);
1996
- // 清除编辑模式
1996
+ // if (reset) {
1997
+ // handleClearAllAndReset();
1998
+ // }
1999
+ if (reset) {
2000
+ handleClearAllAndReset();
2001
+ } // 清除编辑模式
1997
2002
  setEditOrderId(0);
1998
2003
  dispatch({
1999
2004
  type: 'setPaymentPaid',
@@ -2001,12 +2006,6 @@ var Footer = function Footer(props) {
2001
2006
  value: {}
2002
2007
  }
2003
2008
  });
2004
- // if (reset) {
2005
- // handleClearAllAndReset();
2006
- // }
2007
- if (reset) {
2008
- handleClearAllAndReset();
2009
- }
2010
2009
  // setPaymentModalData(null);
2011
2010
  // setPaymentCallback(null);
2012
2011
  // if (reset) {
@@ -2220,8 +2220,7 @@ var PaymentModal = function PaymentModal(_ref18) {
2220
2220
  }
2221
2221
 
2222
2222
  // 根据支付状态展示不同的 toast
2223
- _context22.next = 32;
2224
- return displayPaymentResultToast({
2223
+ displayPaymentResultToast({
2225
2224
  paymentStatus: paymentStatus,
2226
2225
  orderTotalAmount: _orderInfo3.isDeposit ? _orderInfo3.depositAmount : orderTotalAmount,
2227
2226
  gapAmount: paymentStatus === 'partially_paid' ? gapAmount : currentChangeGivenAmount,
@@ -2229,7 +2228,8 @@ var PaymentModal = function PaymentModal(_ref18) {
2229
2228
  autoCloseConfig: autoCloseConfig,
2230
2229
  actionButtons: generateActionButtons(paymentStatus, enabledAutoPrint)
2231
2230
  }, paymentResultToastConfig);
2232
- case 32:
2231
+ console.log('paymentStatus>>>>', paymentStatus);
2232
+
2233
2233
  // 当支付状态为 paid 时,关闭 paymentModal
2234
2234
  if (paymentStatus === 'paid') {
2235
2235
  handleModalClose();
@@ -1288,7 +1288,7 @@ var Footer = (props) => {
1288
1288
  const { clearAllScanListenersTaskQueue } = (0, import_useScanManager.default)();
1289
1289
  const handleClearAllAndReset = () => {
1290
1290
  var _a2, _b2, _c2;
1291
- clearAllScanListenersTaskQueue();
1291
+ debugger;
1292
1292
  dispatch({
1293
1293
  type: "setAddons",
1294
1294
  payload: {
@@ -1328,6 +1328,7 @@ var Footer = (props) => {
1328
1328
  value: []
1329
1329
  }
1330
1330
  });
1331
+ clearAllScanListenersTaskQueue();
1331
1332
  };
1332
1333
  const setEditCartMode = (order_id2, payData, closeModal = false) => {
1333
1334
  setEditOrderId(order_id2);
@@ -1462,6 +1463,9 @@ var Footer = (props) => {
1462
1463
  setIsPaymentModalOpen(false);
1463
1464
  setPaymentModalData(null);
1464
1465
  setPaymentCallback(null);
1466
+ if (reset) {
1467
+ handleClearAllAndReset();
1468
+ }
1465
1469
  setEditOrderId(0);
1466
1470
  dispatch({
1467
1471
  type: "setPaymentPaid",
@@ -1469,9 +1473,6 @@ var Footer = (props) => {
1469
1473
  value: {}
1470
1474
  }
1471
1475
  });
1472
- if (reset) {
1473
- handleClearAllAndReset();
1474
- }
1475
1476
  }
1476
1477
  }
1477
1478
  ), /* @__PURE__ */ import_react.default.createElement(import_confirmHolderModal.ConfirmHolderModal, null));
@@ -1566,7 +1566,7 @@ var PaymentModal = ({
1566
1566
  autoCloseConfig.autoCloseDelay = 0;
1567
1567
  autoCloseConfig.maskClosable = false;
1568
1568
  }
1569
- await (0, import_PaymentResultToastUtils.displayPaymentResultToast)(
1569
+ (0, import_PaymentResultToastUtils.displayPaymentResultToast)(
1570
1570
  {
1571
1571
  paymentStatus,
1572
1572
  orderTotalAmount: orderInfo3.isDeposit ? orderInfo3.depositAmount : orderTotalAmount,
@@ -1577,6 +1577,7 @@ var PaymentModal = ({
1577
1577
  },
1578
1578
  paymentResultToastConfig
1579
1579
  );
1580
+ console.log("paymentStatus>>>>", paymentStatus);
1580
1581
  if (paymentStatus === "paid") {
1581
1582
  handleModalClose();
1582
1583
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.8.24",
3
+ "version": "6.8.26",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -76,8 +76,8 @@
76
76
  "react-infinite-scroll-component": "^6.1.0",
77
77
  "react-resizable": "^3.0.5",
78
78
  "styled-components": "^6.0.0-rc.3",
79
- "@pisell/date-picker": "3.0.7",
80
79
  "@pisell/icon": "0.0.11",
80
+ "@pisell/date-picker": "3.0.7",
81
81
  "@pisell/materials": "6.8.6",
82
82
  "@pisell/utils": "3.0.2"
83
83
  },