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