tplus-components-touch 3.56.5 → 3.56.6
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.
|
@@ -220,8 +220,6 @@ var _moreCzkTable = require('./moreCzkTable');
|
|
|
220
220
|
|
|
221
221
|
var _moreCzkTable2 = _interopRequireDefault(_moreCzkTable);
|
|
222
222
|
|
|
223
|
-
var _tplusHardware = require('tplus-hardware');
|
|
224
|
-
|
|
225
223
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
226
224
|
|
|
227
225
|
var hasElectron = _mutantsMicrofx.env.platform === _mutantsMicrofx.env.constant.platform.electron;
|
|
@@ -246,6 +244,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
246
244
|
showSetPwdModal: false,
|
|
247
245
|
prototypeVisible: false, // 优惠明细弹出框
|
|
248
246
|
currentIndex: 0,
|
|
247
|
+
connectCardStatus: false, //连接IC卡状态
|
|
248
|
+
connectCardError: '', //连接IC卡错误后记录错误信息
|
|
249
249
|
amountChanged: false,
|
|
250
250
|
type: 0,
|
|
251
251
|
isManualIntoAmount: (0, _tplusPoslogin.PosInitData)("IsManualIntoAmount"),
|
|
@@ -655,7 +655,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
655
655
|
_enumController$getEn2 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn2.PayStyle;
|
|
656
656
|
|
|
657
657
|
_this2.store.setCurrentMode(id, PayStyle.hyczk, append);
|
|
658
|
-
|
|
658
|
+
_this2.connectRfCard();
|
|
659
659
|
memberId = _this2.store && _this2.store.member && _this2.store.member.ID;
|
|
660
660
|
_context.t0 = memberId;
|
|
661
661
|
|
|
@@ -1703,10 +1703,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1703
1703
|
that.setState({ currentIndex: index });
|
|
1704
1704
|
_this2.currentInput = input;
|
|
1705
1705
|
setTimeout(function () {
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
input.setSelectionRange(0, input.value.length);
|
|
1709
|
-
}
|
|
1706
|
+
input.focus();
|
|
1707
|
+
input.setSelectionRange(0, input.value.length);
|
|
1710
1708
|
}, 10);
|
|
1711
1709
|
}, 200);
|
|
1712
1710
|
}
|
|
@@ -2561,6 +2559,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2561
2559
|
maskClosable: false,
|
|
2562
2560
|
keyboard: false,
|
|
2563
2561
|
closable: true,
|
|
2562
|
+
backdropStyle: {
|
|
2563
|
+
'z-index': '1006'
|
|
2564
|
+
},
|
|
2564
2565
|
title: paymode.name,
|
|
2565
2566
|
width: 450,
|
|
2566
2567
|
className: that.isHorizontalSunMi || !that.isMobileEnvironment ? 'pwdModal' : 'pwdModal extraHeight',
|
|
@@ -3474,44 +3475,61 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3474
3475
|
//对结算按钮超出的处理
|
|
3475
3476
|
|
|
3476
3477
|
}, {
|
|
3477
|
-
key: '
|
|
3478
|
+
key: 'connectRfCard',
|
|
3478
3479
|
|
|
3479
3480
|
|
|
3481
|
+
//IC卡连接
|
|
3482
|
+
value: function connectRfCard() {
|
|
3483
|
+
var _this5 = this;
|
|
3484
|
+
|
|
3485
|
+
//客户端环境下,并开启了启用IC卡。
|
|
3486
|
+
if (this.hasElectron === true && this.iCCardServer === 1) {
|
|
3487
|
+
_mutantsMicrofx.nativeMs.setIpcRendererMethod('ConnectRfCard', null, function (ret) {
|
|
3488
|
+
var result = {};
|
|
3489
|
+
if (ret.status === 0) {
|
|
3490
|
+
result = { connectCardStatus: false, connectCardError: ret.value };
|
|
3491
|
+
} else {
|
|
3492
|
+
result = { connectCardStatus: true, connectCardError: '' };
|
|
3493
|
+
}
|
|
3494
|
+
_this5.setState(result);
|
|
3495
|
+
});
|
|
3496
|
+
}
|
|
3497
|
+
}
|
|
3480
3498
|
//IC卡读取
|
|
3481
|
-
value: function () {
|
|
3482
|
-
var _ref28 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee18() {
|
|
3483
|
-
var result;
|
|
3484
|
-
return _regenerator2.default.wrap(function _callee18$(_context18) {
|
|
3485
|
-
while (1) {
|
|
3486
|
-
switch (_context18.prev = _context18.next) {
|
|
3487
|
-
case 0:
|
|
3488
|
-
_context18.next = 2;
|
|
3489
|
-
return _tplusHardware.rfCard.readRfCard();
|
|
3490
3499
|
|
|
3491
|
-
|
|
3492
|
-
|
|
3500
|
+
}, {
|
|
3501
|
+
key: 'readRfCard',
|
|
3502
|
+
value: function readRfCard() {
|
|
3503
|
+
var _this6 = this;
|
|
3493
3504
|
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
}
|
|
3505
|
+
//客户端环境下,并开启了启用IC卡。
|
|
3506
|
+
if (this.hasElectron === true && this.iCCardServer === 1) {
|
|
3507
|
+
var _state = this.state,
|
|
3508
|
+
connectCardStatus = _state.connectCardStatus,
|
|
3509
|
+
connectCardError = _state.connectCardError;
|
|
3500
3510
|
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3511
|
+
if (connectCardStatus === false) {
|
|
3512
|
+
_message2.default.error(connectCardError ? connectCardError : '读取IC卡失败');
|
|
3513
|
+
this.connectRfCard(); //读取失败后,重新连接一下。
|
|
3514
|
+
return;
|
|
3515
|
+
}
|
|
3516
|
+
var params = { cardPsw: this.iCCardPassword, cardSec: 13, cardKm: 0 };
|
|
3517
|
+
_mutantsMicrofx.nativeMs.setIpcRendererMethod('ReadRfCard', (0, _extends3.default)({}, params), function (ret) {
|
|
3518
|
+
if (ret.status === 0) {
|
|
3519
|
+
_message2.default.error(ret.value);
|
|
3520
|
+
_this6.connectRfCard(); //读取失败后,重新连接一下。
|
|
3521
|
+
return;
|
|
3522
|
+
} else if (ret.status === 1) {
|
|
3523
|
+
// this.searchMember(ret.value);
|
|
3524
|
+
// this.czkInput.input["value"]=ret.value;
|
|
3525
|
+
_this6.setState({
|
|
3526
|
+
czkValue: ret.value
|
|
3527
|
+
});
|
|
3528
|
+
_this6.loadCzk(ret.value);
|
|
3505
3529
|
}
|
|
3506
|
-
}
|
|
3507
|
-
}));
|
|
3508
|
-
|
|
3509
|
-
function readRfCard() {
|
|
3510
|
-
return _ref28.apply(this, arguments);
|
|
3530
|
+
});
|
|
3511
3531
|
}
|
|
3512
|
-
|
|
3513
|
-
return readRfCard;
|
|
3514
|
-
}()
|
|
3532
|
+
}
|
|
3515
3533
|
|
|
3516
3534
|
//czk
|
|
3517
3535
|
|
|
@@ -3556,8 +3574,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3556
3574
|
}, {
|
|
3557
3575
|
key: 'isNoProductTip',
|
|
3558
3576
|
value: function isNoProductTip(nonProductMap) {
|
|
3559
|
-
var
|
|
3560
|
-
RetailDetails =
|
|
3577
|
+
var _ref28 = this.context.viewModel.data || {},
|
|
3578
|
+
RetailDetails = _ref28.RetailDetails;
|
|
3561
3579
|
|
|
3562
3580
|
var temphtml = [];
|
|
3563
3581
|
if ((0, _keys2.default)(nonProductMap).length > 0) {
|
|
@@ -3651,7 +3669,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3651
3669
|
}, {
|
|
3652
3670
|
key: 'renderToolbtn',
|
|
3653
3671
|
value: function renderToolbtn(mode, index, bookType) {
|
|
3654
|
-
var
|
|
3672
|
+
var _this7 = this;
|
|
3655
3673
|
|
|
3656
3674
|
var _enumController$getEn34 = _mutantsUtil.enumController.getEnumOj(),
|
|
3657
3675
|
PayIcon = _enumController$getEn34.PayIcon,
|
|
@@ -3688,7 +3706,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3688
3706
|
return _react2.default.createElement(
|
|
3689
3707
|
'div',
|
|
3690
3708
|
{ key: index + "", className: paymodeDisabled + ' ' + paymodeSelected + ' paymode hotkey_' + this.compoundHotkeysList[hotkeyIndex], onClick: function onClick() {
|
|
3691
|
-
|
|
3709
|
+
_this7.onTabsClick(mode.paymentType, bookType);
|
|
3692
3710
|
} },
|
|
3693
3711
|
_react2.default.createElement(
|
|
3694
3712
|
'div',
|
|
@@ -3725,7 +3743,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3725
3743
|
}, {
|
|
3726
3744
|
key: 'render',
|
|
3727
3745
|
value: function render() {
|
|
3728
|
-
var
|
|
3746
|
+
var _this8 = this;
|
|
3729
3747
|
|
|
3730
3748
|
var _enumController$getEn35 = _mutantsUtil.enumController.getEnumOj(),
|
|
3731
3749
|
PayIcon = _enumController$getEn35.PayIcon,
|
|
@@ -3733,17 +3751,17 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3733
3751
|
PayStyle = _enumController$getEn35.PayStyle,
|
|
3734
3752
|
Differentiate = _enumController$getEn35.Differentiate;
|
|
3735
3753
|
|
|
3736
|
-
var
|
|
3737
|
-
btnDissabled =
|
|
3738
|
-
dataSource =
|
|
3739
|
-
discountTotalAmount =
|
|
3740
|
-
discountRetailTotalAount =
|
|
3741
|
-
discountPrototypeTotalAmount =
|
|
3742
|
-
storageValue =
|
|
3743
|
-
czkValue =
|
|
3744
|
-
newPassConfirm =
|
|
3745
|
-
newPass =
|
|
3746
|
-
isNotAutoFocus =
|
|
3754
|
+
var _state2 = this.state,
|
|
3755
|
+
btnDissabled = _state2.btnDissabled,
|
|
3756
|
+
dataSource = _state2.dataSource,
|
|
3757
|
+
discountTotalAmount = _state2.discountTotalAmount,
|
|
3758
|
+
discountRetailTotalAount = _state2.discountRetailTotalAount,
|
|
3759
|
+
discountPrototypeTotalAmount = _state2.discountPrototypeTotalAmount,
|
|
3760
|
+
storageValue = _state2.storageValue,
|
|
3761
|
+
czkValue = _state2.czkValue,
|
|
3762
|
+
newPassConfirm = _state2.newPassConfirm,
|
|
3763
|
+
newPass = _state2.newPass,
|
|
3764
|
+
isNotAutoFocus = _state2.isNotAutoFocus;
|
|
3747
3765
|
var _store2 = this.store,
|
|
3748
3766
|
paymode = _store2.paymode,
|
|
3749
3767
|
brefund = _store2.brefund,
|
|
@@ -3773,9 +3791,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3773
3791
|
// 单据模式
|
|
3774
3792
|
var thePaymodes = newStyle ? (0, _filter3.default)(paymode.thePaymodes, function (m) {
|
|
3775
3793
|
if (IdbusiType == 39) {
|
|
3776
|
-
return !(
|
|
3794
|
+
return !(_this8.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0) && m.paymentType != PayStyle.hyczk;
|
|
3777
3795
|
}
|
|
3778
|
-
return !(
|
|
3796
|
+
return !(_this8.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0);
|
|
3779
3797
|
}) : paymode.thePaymodes;
|
|
3780
3798
|
var paymodes = paymode.paymodes,
|
|
3781
3799
|
settle = paymode.settle,
|
|
@@ -3828,11 +3846,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3828
3846
|
quantity4 = 0;
|
|
3829
3847
|
var sumQuantity = 0; //数量总和的值,包括称重的。
|
|
3830
3848
|
|
|
3831
|
-
var
|
|
3832
|
-
|
|
3833
|
-
buyQuantity =
|
|
3834
|
-
|
|
3835
|
-
returnQuantity =
|
|
3849
|
+
var _ref29 = quantityDetail || {},
|
|
3850
|
+
_ref29$buyQuantity = _ref29.buyQuantity,
|
|
3851
|
+
buyQuantity = _ref29$buyQuantity === undefined ? 0 : _ref29$buyQuantity,
|
|
3852
|
+
_ref29$returnQuantity = _ref29.returnQuantity,
|
|
3853
|
+
returnQuantity = _ref29$returnQuantity === undefined ? 0 : _ref29$returnQuantity;
|
|
3836
3854
|
|
|
3837
3855
|
var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
|
|
3838
3856
|
quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
|
|
@@ -3856,7 +3874,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3856
3874
|
return _react2.default.createElement(
|
|
3857
3875
|
'div',
|
|
3858
3876
|
{ className: 'billingSettlement', ref: function ref(r) {
|
|
3859
|
-
return
|
|
3877
|
+
return _this8.billingSettlementDocumnet = r;
|
|
3860
3878
|
} },
|
|
3861
3879
|
this.props.MemberPoints ? _react2.default.createElement(
|
|
3862
3880
|
'div',
|
|
@@ -3989,9 +4007,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3989
4007
|
className: (0, _classnames4.default)({ "quick": true, "quick2": type == 1 }),
|
|
3990
4008
|
key: 'paymentType_' + p.paymentType,
|
|
3991
4009
|
onClick: function onClick() {
|
|
3992
|
-
|
|
4010
|
+
_this8.btnDebounced(p.paymentType, true);
|
|
3993
4011
|
},
|
|
3994
|
-
disabled: productsIsEmpty || type != 1 &&
|
|
4012
|
+
disabled: productsIsEmpty || type != 1 && _this8.checkModeDisabled(p.paymentType, (_this8.context.viewModel.data.TotalTaxAmount || 0 - _this8.context.viewModel.data.OnlinePaymentAmount || 0) < 0, boriginReturn)
|
|
3995
4013
|
},
|
|
3996
4014
|
_react2.default.createElement(
|
|
3997
4015
|
'div',
|
|
@@ -4008,7 +4026,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4008
4026
|
_react2.default.createElement(
|
|
4009
4027
|
_button2.default,
|
|
4010
4028
|
{ key: 'settle', className: (0, _classnames4.default)({ "settle": true, "settle2": type == 1, "settleStorage": true, 'primary-btn': true }), onClick: function onClick() {
|
|
4011
|
-
|
|
4029
|
+
_this8.btnDebounced();
|
|
4012
4030
|
}, disabled: productsIsEmpty },
|
|
4013
4031
|
this.props.isMemberPoints ? '立即兑换' : this.props.isMemberPointsReturn ? '退货' : IdbusiType == 39 && _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount == 0 ? '取货' : settle.name
|
|
4014
4032
|
)
|
|
@@ -4037,7 +4055,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4037
4055
|
'div',
|
|
4038
4056
|
null,
|
|
4039
4057
|
(0, _map3.default)(paymodes, function (mode, index) {
|
|
4040
|
-
return
|
|
4058
|
+
return _this8.renderToolbtn(mode, index, 'bookPay');
|
|
4041
4059
|
})
|
|
4042
4060
|
),
|
|
4043
4061
|
paymodes.length > carouselStart && this.paymodesCarouselList(params, paymodes, carouselStart)
|
|
@@ -4074,28 +4092,28 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4074
4092
|
mode.paymentType == PayStyle.hyczk || mode.paymentType == PayStyle.jfdx || mode.paymentType == PayStyle.djq ? _react2.default.createElement('input', { id: 'inputS' + index,
|
|
4075
4093
|
className: _index.hotKey.hotKeyNotFilter(),
|
|
4076
4094
|
onClick: function onClick() {
|
|
4077
|
-
|
|
4095
|
+
_this8.editModal(index, mode.paymentType, type != 1 ? boriginReturn : null);
|
|
4078
4096
|
}, value: (0, _utils.getFixedNumber)(mode.value) }) : _react2.default.createElement('input', { id: 'inputS' + index,
|
|
4079
4097
|
className: _index.hotKey.hotKeyNotFilter(),
|
|
4080
4098
|
value: mode.exchangeRate != 1 ? mode.value2 : mode.value,
|
|
4081
4099
|
onClick: function onClick(e) {
|
|
4082
|
-
return
|
|
4100
|
+
return _this8.onHotKeyClick2(index, mode, paymode, e);
|
|
4083
4101
|
},
|
|
4084
4102
|
onBlur: function onBlur(e) {
|
|
4085
|
-
return
|
|
4103
|
+
return _this8.onBlur(index, e, 'bookPay');
|
|
4086
4104
|
},
|
|
4087
4105
|
onFocus: function onFocus(e) {
|
|
4088
|
-
return
|
|
4106
|
+
return _this8.onFocusHack(index, mode, paymode, e);
|
|
4089
4107
|
},
|
|
4090
4108
|
onChange: function onChange(e) {
|
|
4091
|
-
return
|
|
4109
|
+
return _this8.handleChange(index, e, 'bookPay');
|
|
4092
4110
|
}
|
|
4093
4111
|
})
|
|
4094
4112
|
),
|
|
4095
4113
|
_react2.default.createElement(
|
|
4096
4114
|
'span',
|
|
4097
4115
|
{ className: 'minus', onClick: function onClick() {
|
|
4098
|
-
|
|
4116
|
+
_this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType, 'bookPay');
|
|
4099
4117
|
} },
|
|
4100
4118
|
_react2.default.createElement(_ticon2.default, { type: 'shanchu', className: 'minusIcon primary-color' })
|
|
4101
4119
|
)
|
|
@@ -4141,7 +4159,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4141
4159
|
type != 1 && themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === mode.paymethodId && !isReturn && _react2.default.createElement(
|
|
4142
4160
|
_button2.default,
|
|
4143
4161
|
{ onClick: function onClick() {
|
|
4144
|
-
|
|
4162
|
+
_this8.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
|
4145
4163
|
}, className: 'addCard btn-border-primary' },
|
|
4146
4164
|
_react2.default.createElement(_ticon2.default, { type: 'jiahao', className: 'plus b-theme-color' }),
|
|
4147
4165
|
_react2.default.createElement(
|
|
@@ -4411,7 +4429,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4411
4429
|
'\u8BF7\u6DFB\u52A0\u7ED3\u7B97\u65B9\u5F0F'
|
|
4412
4430
|
),
|
|
4413
4431
|
(0, _map3.default)(thePaymodes, function (mode, mindex) {
|
|
4414
|
-
var isReturn =
|
|
4432
|
+
var isReturn = _this8.props.isReturn;
|
|
4415
4433
|
|
|
4416
4434
|
var hasSMZF = (0, _find3.default)(thePaymodes, function (m) {
|
|
4417
4435
|
return m.paymentType === PayStyle.smzf;
|
|
@@ -4471,7 +4489,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4471
4489
|
_react2.default.createElement(
|
|
4472
4490
|
'div',
|
|
4473
4491
|
{ className: 'hotkey' },
|
|
4474
|
-
|
|
4492
|
+
_this8.isHorizontalPad ? '' : _this8.compoundHotkeysList[hotkeyIndex] || ''
|
|
4475
4493
|
)
|
|
4476
4494
|
),
|
|
4477
4495
|
_react2.default.createElement(
|
|
@@ -4479,15 +4497,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4479
4497
|
{ className: (0, _classnames4.default)({ "content": true }) },
|
|
4480
4498
|
mode.paymentType == PayStyle.hyczk || mode.paymentType == PayStyle.jfdx || mode.paymentType == PayStyle.djq ? _react2.default.createElement('input', { id: 'inputS' + index,
|
|
4481
4499
|
|
|
4482
|
-
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" +
|
|
4483
|
-
disabled:
|
|
4500
|
+
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" + _this8.compoundHotkeysList[hotkeyIndex]),
|
|
4501
|
+
disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn),
|
|
4484
4502
|
onClick: function onClick() {
|
|
4485
4503
|
if (type != 1 && mode.paymentType == PayStyle.hyczk) {
|
|
4486
4504
|
if (themodeHyczk && themodeHyczk.length === 0) {
|
|
4487
|
-
|
|
4505
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4488
4506
|
}
|
|
4489
4507
|
} else {
|
|
4490
|
-
|
|
4508
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn, 'bookPay');
|
|
4491
4509
|
}
|
|
4492
4510
|
},
|
|
4493
4511
|
value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
|
|
@@ -4495,20 +4513,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4495
4513
|
}), function (sum, m) {
|
|
4496
4514
|
return Math.Add(sum, m.value);
|
|
4497
4515
|
}, 0)) : (0, _utils.getFixedNumber)(mode.value) }) : _react2.default.createElement('input', { id: 'inputS' + index,
|
|
4498
|
-
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" +
|
|
4499
|
-
disabled:
|
|
4516
|
+
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" + _this8.compoundHotkeysList[hotkeyIndex]),
|
|
4517
|
+
disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn) || _this8.checkScanDisabled(mode.paymentType),
|
|
4500
4518
|
value: mode.exchangeRate != 1 ? mode.value2 : mode.value,
|
|
4501
4519
|
onClick: function onClick(e) {
|
|
4502
|
-
return
|
|
4520
|
+
return _this8.onHotKeyClick2(index, mode, paymode, e, 'bookPay');
|
|
4503
4521
|
},
|
|
4504
4522
|
onBlur: function onBlur(e) {
|
|
4505
|
-
return
|
|
4523
|
+
return _this8.onBlur(index, e, 'bookPay');
|
|
4506
4524
|
},
|
|
4507
4525
|
onFocus: function onFocus(e) {
|
|
4508
|
-
return
|
|
4526
|
+
return _this8.onFocusHack(index, mode, paymode, e);
|
|
4509
4527
|
},
|
|
4510
4528
|
onChange: function onChange(e) {
|
|
4511
|
-
return
|
|
4529
|
+
return _this8.handleChange(index, e, 'bookPay');
|
|
4512
4530
|
}
|
|
4513
4531
|
})
|
|
4514
4532
|
)
|
|
@@ -4561,7 +4579,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4561
4579
|
type != 1 && themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === m.paymethodId && _react2.default.createElement(
|
|
4562
4580
|
_button2.default,
|
|
4563
4581
|
{ onClick: function onClick() {
|
|
4564
|
-
return
|
|
4582
|
+
return _this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4565
4583
|
}, className: 'addCard btn-border-primary' },
|
|
4566
4584
|
_react2.default.createElement(_ticon2.default, { type: 'jiahao', className: 'plus b-theme-color' }),
|
|
4567
4585
|
_react2.default.createElement(
|
|
@@ -4709,79 +4727,79 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4709
4727
|
placeholder: '\u8BF7\u626B\u63CF\u6216\u8F93\u5165\u624B\u673A\u53F7/\u50A8\u503C\u5361\u53F7',
|
|
4710
4728
|
className: 'input ' + (this.hasElectron === true && this.iCCardServer === 1 || this.isHorizontalPad === true ? 'temp' : ''),
|
|
4711
4729
|
onChange: function onChange(e) {
|
|
4712
|
-
return
|
|
4730
|
+
return _this8.onCzkChange(e.target.value);
|
|
4713
4731
|
},
|
|
4714
4732
|
defaultValue: currentMode && currentMode.storageCardNo,
|
|
4715
4733
|
value: czkValue,
|
|
4716
4734
|
ref: function ref(input) {
|
|
4717
|
-
return
|
|
4735
|
+
return _this8.czkInput = input;
|
|
4718
4736
|
},
|
|
4719
4737
|
onKeyDown: function () {
|
|
4720
|
-
var
|
|
4738
|
+
var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee18(e) {
|
|
4721
4739
|
var time, _paymode;
|
|
4722
4740
|
|
|
4723
|
-
return _regenerator2.default.wrap(function
|
|
4741
|
+
return _regenerator2.default.wrap(function _callee18$(_context18) {
|
|
4724
4742
|
while (1) {
|
|
4725
|
-
switch (
|
|
4743
|
+
switch (_context18.prev = _context18.next) {
|
|
4726
4744
|
case 0:
|
|
4727
4745
|
if (!(e.keyCode == 13)) {
|
|
4728
|
-
|
|
4746
|
+
_context18.next = 14;
|
|
4729
4747
|
break;
|
|
4730
4748
|
}
|
|
4731
4749
|
|
|
4732
4750
|
time = Date.parse(new Date());
|
|
4733
4751
|
|
|
4734
|
-
if (!(
|
|
4735
|
-
|
|
4752
|
+
if (!(_this8.isStorageCardInputType && time - _this8.keypressStime > 350)) {
|
|
4753
|
+
_context18.next = 7;
|
|
4736
4754
|
break;
|
|
4737
4755
|
}
|
|
4738
4756
|
|
|
4739
4757
|
_message2.default.warn('储值卡不可键盘录入,请刷卡!');
|
|
4740
|
-
|
|
4741
|
-
|
|
4758
|
+
_this8.keypressStime = null;
|
|
4759
|
+
_this8.setState({
|
|
4742
4760
|
czkValue: null
|
|
4743
4761
|
});
|
|
4744
|
-
return
|
|
4762
|
+
return _context18.abrupt('return');
|
|
4745
4763
|
|
|
4746
4764
|
case 7:
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
return
|
|
4765
|
+
_this8.keypressStime = null;
|
|
4766
|
+
_context18.next = 10;
|
|
4767
|
+
return _this8.loadCzk(e.target.value);
|
|
4750
4768
|
|
|
4751
4769
|
case 10:
|
|
4752
|
-
_paymode =
|
|
4770
|
+
_paymode = _this8.store.paymode;
|
|
4753
4771
|
|
|
4754
4772
|
if (!_paymode.currentMode.storageCardNo) {
|
|
4755
|
-
|
|
4773
|
+
_this8.setState({
|
|
4756
4774
|
czkvalue: null
|
|
4757
4775
|
});
|
|
4758
4776
|
}
|
|
4759
|
-
|
|
4777
|
+
_context18.next = 15;
|
|
4760
4778
|
break;
|
|
4761
4779
|
|
|
4762
4780
|
case 14:
|
|
4763
|
-
if (!
|
|
4764
|
-
|
|
4781
|
+
if (!_this8.keypressStime && e.keyCode !== 8) {
|
|
4782
|
+
_this8.keypressStime = Date.parse(new Date());
|
|
4765
4783
|
}
|
|
4766
4784
|
|
|
4767
4785
|
case 15:
|
|
4768
4786
|
case 'end':
|
|
4769
|
-
return
|
|
4787
|
+
return _context18.stop();
|
|
4770
4788
|
}
|
|
4771
4789
|
}
|
|
4772
|
-
},
|
|
4790
|
+
}, _callee18, _this8);
|
|
4773
4791
|
}));
|
|
4774
4792
|
|
|
4775
4793
|
return function (_x13) {
|
|
4776
|
-
return
|
|
4794
|
+
return _ref30.apply(this, arguments);
|
|
4777
4795
|
};
|
|
4778
4796
|
}(),
|
|
4779
4797
|
onFocus: function onFocus(e) {
|
|
4780
|
-
|
|
4781
|
-
!
|
|
4782
|
-
var value = _keyboard2.default.getNewValue(
|
|
4783
|
-
|
|
4784
|
-
},
|
|
4798
|
+
_this8.inputTarget = _this8.czkInput.input;
|
|
4799
|
+
!_this8.state.prototypeVisible && _keyboard2.default.open(function (v) {
|
|
4800
|
+
var value = _keyboard2.default.getNewValue(_this8.inputTarget, _this8.inputTarget.value, v);
|
|
4801
|
+
_this8.onCzkChange(value);
|
|
4802
|
+
}, _this8.czkKeyboardOnOk, _this8.czkKeyboardOnClose)();
|
|
4785
4803
|
},
|
|
4786
4804
|
onBlur: function onBlur(e) {
|
|
4787
4805
|
_keyboard2.default.close();
|
|
@@ -4793,7 +4811,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4793
4811
|
|
|
4794
4812
|
/* 扫描组件 */
|
|
4795
4813
|
this.isHorizontalPad && _react2.default.createElement(_scan2.default, { ref: function ref(scan) {
|
|
4796
|
-
return
|
|
4814
|
+
return _this8.scanObj = scan;
|
|
4797
4815
|
}, onChange: this.onScanCzkResult })
|
|
4798
4816
|
),
|
|
4799
4817
|
_react2.default.createElement(
|
|
@@ -4827,22 +4845,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4827
4845
|
className: _index.hotKey.hotKeyNotFilter('input'),
|
|
4828
4846
|
value: storageValue,
|
|
4829
4847
|
onChange: function onChange(event) {
|
|
4830
|
-
|
|
4848
|
+
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.balance));
|
|
4831
4849
|
},
|
|
4832
4850
|
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)),
|
|
4833
|
-
ref: function ref(
|
|
4834
|
-
return
|
|
4851
|
+
ref: function ref(_ref31) {
|
|
4852
|
+
return _this8["inputCzkAmount"] = _ref31;
|
|
4835
4853
|
},
|
|
4836
4854
|
onFocus: function onFocus(e) {
|
|
4837
|
-
|
|
4855
|
+
_this8.inputkey = "inputCzkAmount";
|
|
4838
4856
|
_keyboard2.default.open(function (v) {
|
|
4839
|
-
var value = _keyboard2.default.getNewValue(
|
|
4840
|
-
|
|
4841
|
-
},
|
|
4857
|
+
var value = _keyboard2.default.getNewValue(_this8[_this8.inputkey].input, _this8[_this8.inputkey].input.value, v);
|
|
4858
|
+
_this8.setCurrentModeValue(value, Math.min(currentMode.maxamount, currentMode.balance));
|
|
4859
|
+
}, _this8.keyboardOnOk, _this8.keyboardOnClose)();
|
|
4842
4860
|
},
|
|
4843
4861
|
onBlur: function onBlur(e) {
|
|
4844
4862
|
_keyboard2.default.close();
|
|
4845
|
-
|
|
4863
|
+
_this8.setCurrentModeValue((0, _utils.getFixedNumber)(_this8.inputCzkAmount.input.value), Math.min(currentMode.maxamount, currentMode.balance));
|
|
4846
4864
|
}
|
|
4847
4865
|
})
|
|
4848
4866
|
)
|
|
@@ -4971,16 +4989,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4971
4989
|
maxLength: 6,
|
|
4972
4990
|
value: newPass,
|
|
4973
4991
|
ref: function ref(input) {
|
|
4974
|
-
return
|
|
4992
|
+
return _this8.inputNewAmount = input;
|
|
4975
4993
|
},
|
|
4976
4994
|
onChange: function onChange(value) {
|
|
4977
|
-
return
|
|
4995
|
+
return _this8.setPwdValue('newPass', value.target.value);
|
|
4978
4996
|
},
|
|
4979
4997
|
onBlur: function onBlur(value) {
|
|
4980
|
-
return
|
|
4998
|
+
return _this8.handleBlur('newPass');
|
|
4981
4999
|
},
|
|
4982
5000
|
onPressEnter: function onPressEnter() {
|
|
4983
|
-
return
|
|
5001
|
+
return _this8.onPressEnterCzk('newPass');
|
|
4984
5002
|
}
|
|
4985
5003
|
})
|
|
4986
5004
|
)
|
|
@@ -5003,16 +5021,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5003
5021
|
maxLength: 6,
|
|
5004
5022
|
value: newPassConfirm,
|
|
5005
5023
|
ref: function ref(input) {
|
|
5006
|
-
return
|
|
5024
|
+
return _this8.inputConfirmAmount = input;
|
|
5007
5025
|
},
|
|
5008
5026
|
onChange: function onChange(value) {
|
|
5009
|
-
return
|
|
5027
|
+
return _this8.setPwdValue('newPassConfirm', value.target.value);
|
|
5010
5028
|
},
|
|
5011
5029
|
onBlur: function onBlur(value) {
|
|
5012
|
-
return
|
|
5030
|
+
return _this8.handleBlur('newPassConfirm');
|
|
5013
5031
|
},
|
|
5014
5032
|
onPressEnter: function onPressEnter() {
|
|
5015
|
-
return
|
|
5033
|
+
return _this8.onPressEnterCzk('newPassConfirm');
|
|
5016
5034
|
}
|
|
5017
5035
|
})
|
|
5018
5036
|
)
|
|
@@ -5073,22 +5091,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5073
5091
|
// onChange={this.onDjqChange}
|
|
5074
5092
|
// value={currentMode && currentMode.member.cardNo}
|
|
5075
5093
|
, ref: function ref(input) {
|
|
5076
|
-
return
|
|
5094
|
+
return _this8.inputdjq = input;
|
|
5077
5095
|
},
|
|
5078
5096
|
onKeyDown: function onKeyDown(e) {
|
|
5079
5097
|
if (e.keyCode == 13) {
|
|
5080
|
-
|
|
5098
|
+
_this8.addDjq(e.target.value);
|
|
5081
5099
|
}
|
|
5082
5100
|
},
|
|
5083
5101
|
onFocus: function onFocus(e) {
|
|
5084
|
-
|
|
5102
|
+
_this8.inputTarget = _this8.inputdjq.input;
|
|
5085
5103
|
_keyboard2.default.open(function (v) {
|
|
5086
|
-
var value = _keyboard2.default.getNewValue(
|
|
5087
|
-
|
|
5088
|
-
},
|
|
5104
|
+
var value = _keyboard2.default.getNewValue(_this8.inputTarget, _this8.inputTarget.value, v);
|
|
5105
|
+
_this8.onDjqChange(value, true);
|
|
5106
|
+
}, _this8.djqKeyboardOnOk, _this8.djqKeyboardOnClose)();
|
|
5089
5107
|
},
|
|
5090
5108
|
onBlur: function onBlur(e) {
|
|
5091
|
-
_keyboard2.default.close();
|
|
5109
|
+
_keyboard2.default.close();_this8.inputdjq.input.value = '';
|
|
5092
5110
|
}
|
|
5093
5111
|
})
|
|
5094
5112
|
),
|
|
@@ -5122,7 +5140,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5122
5140
|
{ className: 'col3' },
|
|
5123
5141
|
_react2.default.createElement(_ticon2.default, { type: 'saomiao1', className: 'icon', onClick: this.changeScanProduct }),
|
|
5124
5142
|
_react2.default.createElement(_scan2.default, { ref: function ref(scan) {
|
|
5125
|
-
return
|
|
5143
|
+
return _this8.scanObj = scan;
|
|
5126
5144
|
}, onChange: this.onScanDjqResult })
|
|
5127
5145
|
)
|
|
5128
5146
|
),
|
|
@@ -5133,10 +5151,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5133
5151
|
'div',
|
|
5134
5152
|
{ className: 'djq2' },
|
|
5135
5153
|
currentMode && currentMode.djqs && currentMode.djqs.length > 0 ? (0, _map3.default)(currentMode.djqs || [], function (q, index) {
|
|
5136
|
-
if (!
|
|
5154
|
+
if (!_this8.state.couponLight && !q.count) {
|
|
5137
5155
|
return;
|
|
5138
5156
|
}
|
|
5139
|
-
if (
|
|
5157
|
+
if (_this8.state.couponLight && q.count && q.count === 1) {
|
|
5140
5158
|
return;
|
|
5141
5159
|
}
|
|
5142
5160
|
return _react2.default.createElement(
|
|
@@ -5190,7 +5208,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5190
5208
|
_react2.default.createElement(
|
|
5191
5209
|
'div',
|
|
5192
5210
|
{ className: (0, _classnames4.default)('djqRight', { 'djqRightSelected': q.checked }), onClick: function onClick(e) {
|
|
5193
|
-
return q.IsEnable ?
|
|
5211
|
+
return q.IsEnable ? _this8.djqChecked(q, _this8.props.dto) : null;
|
|
5194
5212
|
} },
|
|
5195
5213
|
q.checked ? _react2.default.createElement(_ticon2.default, { className: 'checkIcon primary-color', type: 'xuanzhong1' }) : _react2.default.createElement('span', { className: '' + (q.IsEnable ? 'noxuanzhong' : 'noxuanzhong1') }),
|
|
5196
5214
|
q.checked ? _react2.default.createElement(
|
|
@@ -5498,22 +5516,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5498
5516
|
type: 'text',
|
|
5499
5517
|
value: storageValue,
|
|
5500
5518
|
onChange: function onChange(e) {
|
|
5501
|
-
|
|
5519
|
+
_this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
5502
5520
|
},
|
|
5503
5521
|
defaultValue: currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
|
5504
|
-
ref: function ref(
|
|
5505
|
-
return
|
|
5522
|
+
ref: function ref(_ref32) {
|
|
5523
|
+
return _this8["inputJfdxAmount"] = _ref32;
|
|
5506
5524
|
},
|
|
5507
5525
|
onFocus: function onFocus(e) {
|
|
5508
|
-
|
|
5526
|
+
_this8.inputkey = "inputJfdxAmount";
|
|
5509
5527
|
_keyboard2.default.open(function (v) {
|
|
5510
|
-
var value = _keyboard2.default.getNewValue(
|
|
5511
|
-
|
|
5512
|
-
},
|
|
5528
|
+
var value = _keyboard2.default.getNewValue(_this8[_this8.inputkey].input, _this8[_this8.inputkey].input.value, v);
|
|
5529
|
+
_this8.setCurrentModeValue(value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
5530
|
+
}, _this8.keyboardOnOk, _this8.keyboardOnClose)();
|
|
5513
5531
|
},
|
|
5514
5532
|
onBlur: function onBlur(e) {
|
|
5515
5533
|
_keyboard2.default.close();
|
|
5516
|
-
|
|
5534
|
+
_this8.setCurrentModeValue((0, _utils.getFixedNumber)(_this8.inputJfdxAmount.input.value), Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
5517
5535
|
}
|
|
5518
5536
|
})
|
|
5519
5537
|
)
|