tplus-components-touch 3.27.39 → 3.27.40
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/components/settlement/settlement.js +29 -18
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlementStore.js +94 -67
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/settlement/utils.js +2 -2
- package/dist/components/settlement/utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -493,9 +493,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
493
493
|
|
|
494
494
|
var isAutoShowCouponWhenCash = (0, _tplusPoslogin.PosInitData)('IsAutoShowCouponWhenCash');
|
|
495
495
|
// 支持异步验证过程
|
|
496
|
-
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate(function (data) {
|
|
497
|
-
|
|
498
|
-
|
|
496
|
+
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate({ fn: function fn(data) {
|
|
497
|
+
return _this2.isNoProductTip(data);
|
|
498
|
+
} })).then(function (result) {
|
|
499
499
|
if (result) {
|
|
500
500
|
_this2.setState({
|
|
501
501
|
settleDisabled: false
|
|
@@ -1797,7 +1797,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1797
1797
|
};
|
|
1798
1798
|
|
|
1799
1799
|
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
|
1800
|
-
var _enumController$getEn20, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, getSettleGift, type, resp1;
|
|
1800
|
+
var _enumController$getEn20, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, _this2$store6, getSettleGift, isFull, type, resp1;
|
|
1801
1801
|
|
|
1802
1802
|
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1803
1803
|
while (1) {
|
|
@@ -1857,7 +1857,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1857
1857
|
}
|
|
1858
1858
|
};
|
|
1859
1859
|
|
|
1860
|
-
|
|
1860
|
+
_this2$store6 = _this2.store, getSettleGift = _this2$store6.getSettleGift, isFull = _this2$store6.isFull;
|
|
1861
1861
|
type = _this2.props.type;
|
|
1862
1862
|
resp1 = false;
|
|
1863
1863
|
|
|
@@ -1906,7 +1906,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1906
1906
|
} else if (MemberPoints && Number(amount) == Number(0)) {
|
|
1907
1907
|
message = "兑换成功";
|
|
1908
1908
|
}
|
|
1909
|
-
window.__successModal = (0, _utils.showSuccessModal)(amount, received, charge, _this.props.onModalClose, isXianjin, message, resp1 && resp1.data, _mutantsMicrofx.stores, IdbusiType, function () {
|
|
1909
|
+
window.__successModal = (0, _utils.showSuccessModal)(amount, received, charge, _this.props.onModalClose, isXianjin, message, resp1 && resp1.data, _mutantsMicrofx.stores, IdbusiType, isFull, function () {
|
|
1910
1910
|
_this.handleGuestShow(5);
|
|
1911
1911
|
});
|
|
1912
1912
|
_this2.setState({ isXianjin: false });
|
|
@@ -2063,7 +2063,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2063
2063
|
};
|
|
2064
2064
|
}();
|
|
2065
2065
|
|
|
2066
|
-
var _enumController$getEn21, PayStyle, _this2$
|
|
2066
|
+
var _enumController$getEn21, PayStyle, _this2$store7, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
|
|
2067
2067
|
|
|
2068
2068
|
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
2069
2069
|
while (1) {
|
|
@@ -2074,7 +2074,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2074
2074
|
});
|
|
2075
2075
|
console.log("settlement.handleSettle开始执行,参数:", +args);
|
|
2076
2076
|
_enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn21.PayStyle;
|
|
2077
|
-
_this2$
|
|
2077
|
+
_this2$store7 = _this2.store, paymode = _this2$store7.paymode, brefund = _this2$store7.brefund, boriginReturn = _this2$store7.boriginReturn, newStyle = _this2$store7.newStyle;
|
|
2078
2078
|
isQuickPay = args === 'quickPay';
|
|
2079
2079
|
that = _this2;
|
|
2080
2080
|
status = false;
|
|
@@ -2634,7 +2634,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2634
2634
|
|
|
2635
2635
|
_this2.btnDebounced = function () {
|
|
2636
2636
|
var _ref27 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(type, bquick) {
|
|
2637
|
-
var IdbusiType, CustomerPhone, DistributionMode, Address, title, _enumController$getEn23, PayStyle, _this2$
|
|
2637
|
+
var IdbusiType, CustomerPhone, DistributionMode, Address, title, _enumController$getEn23, PayStyle, _this2$store8, paymode, brefund, boriginReturn, newStyle, status;
|
|
2638
2638
|
|
|
2639
2639
|
return _regenerator2.default.wrap(function _callee16$(_context16) {
|
|
2640
2640
|
while (1) {
|
|
@@ -2671,7 +2671,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2671
2671
|
isInputMember: true
|
|
2672
2672
|
});
|
|
2673
2673
|
_enumController$getEn23 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn23.PayStyle;
|
|
2674
|
-
_this2$
|
|
2674
|
+
_this2$store8 = _this2.store, paymode = _this2$store8.paymode, brefund = _this2$store8.brefund, boriginReturn = _this2$store8.boriginReturn, newStyle = _this2$store8.newStyle;
|
|
2675
2675
|
|
|
2676
2676
|
if (!(bquick && !_mutantsMicrofx.stores.offlineSys.shouldSettlement(type))) {
|
|
2677
2677
|
_context16.next = 15;
|
|
@@ -3160,9 +3160,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3160
3160
|
};
|
|
3161
3161
|
|
|
3162
3162
|
_this2.checkCurrentModeHaveMutex = function (type) {
|
|
3163
|
-
var _this2$
|
|
3164
|
-
paymode = _this2$
|
|
3165
|
-
newStyle = _this2$
|
|
3163
|
+
var _this2$store9 = _this2.store,
|
|
3164
|
+
paymode = _this2$store9.paymode,
|
|
3165
|
+
newStyle = _this2$store9.newStyle;
|
|
3166
3166
|
|
|
3167
3167
|
var _enumController$getEn28 = _mutantsUtil.enumController.getEnumOj(),
|
|
3168
3168
|
PayStyle = _enumController$getEn28.PayStyle;
|
|
@@ -3700,19 +3700,26 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3700
3700
|
if (IdbusiType == 38 && this.isBook && this.percentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
|
|
3701
3701
|
totalTaxAmount = totalTaxAmount * this.percentageWhenBook / 100;
|
|
3702
3702
|
}
|
|
3703
|
-
if (IdbusiType == 39) {
|
|
3704
|
-
totalTaxAmount = _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount;
|
|
3705
|
-
}
|
|
3706
3703
|
|
|
3707
3704
|
// 单据模式
|
|
3708
3705
|
var thePaymodes = newStyle ? (0, _filter3.default)(paymode.thePaymodes, function (m) {
|
|
3706
|
+
if (IdbusiType == 39) {
|
|
3707
|
+
return !(_this8.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0) && m.paymentType != PayStyle.hyczk;
|
|
3708
|
+
}
|
|
3709
3709
|
return !(_this8.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0);
|
|
3710
3710
|
}) : paymode.thePaymodes;
|
|
3711
3711
|
var paymodes = paymode.paymodes,
|
|
3712
3712
|
settle = paymode.settle,
|
|
3713
3713
|
currentMode = paymode.currentMode;
|
|
3714
|
-
// 积分兑换 总积分
|
|
3715
3714
|
|
|
3715
|
+
|
|
3716
|
+
if (IdbusiType == 39) {
|
|
3717
|
+
totalTaxAmount = _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount;
|
|
3718
|
+
paymodes = (0, _filter3.default)(paymodes, function (mode) {
|
|
3719
|
+
return mode.paymentType != PayStyle.hyczk;
|
|
3720
|
+
}); //取货过滤掉储值
|
|
3721
|
+
}
|
|
3722
|
+
// 积分兑换 总积分
|
|
3716
3723
|
var ExchangeIntegral = this.context && this.context.viewModel && this.context.viewModel.data.ExchangeIntegral;
|
|
3717
3724
|
|
|
3718
3725
|
var _hasSMZF = (0, _find3.default)(paymodes, function (item) {
|
|
@@ -3728,7 +3735,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3728
3735
|
}
|
|
3729
3736
|
|
|
3730
3737
|
var quickPay = boriginReturn ? [] : (0, _filter3.default)(paymodes, function (paymode) {
|
|
3731
|
-
|
|
3738
|
+
if (IdbusiType == 39) {
|
|
3739
|
+
return paymode.isQuick && paymode.paymentType != PayStyle.hyczk; //取货过滤掉储值
|
|
3740
|
+
} else {
|
|
3741
|
+
return paymode.isQuick;
|
|
3742
|
+
}
|
|
3732
3743
|
});
|
|
3733
3744
|
var productsIsEmpty = type != 1 && this.context.viewModel.data.RetailDetails.length == 0 || type == 1 && parseFloat(amount || 0) <= 0 || memberDisabled || noIsMinAmount;
|
|
3734
3745
|
var moreToolbtns = [];
|