tplus-components-touch 3.56.1 → 3.56.4
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/inventorySearch/store.js +6 -2
- package/dist/components/inventorySearch/store.js.map +1 -1
- package/dist/components/settlement/settlement.js +144 -161
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/touchTable/index.js +21 -0
- package/dist/components/touchTable/index.js.map +1 -1
- package/package.json +2 -2
@@ -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
|
|
@@ -3472,61 +3472,44 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3472
3472
|
//对结算按钮超出的处理
|
3473
3473
|
|
3474
3474
|
}, {
|
3475
|
-
key: '
|
3476
|
-
|
3475
|
+
key: 'readRfCard',
|
3477
3476
|
|
3478
|
-
//IC卡连接
|
3479
|
-
value: function connectRfCard() {
|
3480
|
-
var _this5 = this;
|
3481
3477
|
|
3482
|
-
//客户端环境下,并开启了启用IC卡。
|
3483
|
-
if (this.hasElectron === true && this.iCCardServer === 1) {
|
3484
|
-
_mutantsMicrofx.nativeMs.setIpcRendererMethod('ConnectRfCard', null, function (ret) {
|
3485
|
-
var result = {};
|
3486
|
-
if (ret.status === 0) {
|
3487
|
-
result = { connectCardStatus: false, connectCardError: ret.value };
|
3488
|
-
} else {
|
3489
|
-
result = { connectCardStatus: true, connectCardError: '' };
|
3490
|
-
}
|
3491
|
-
_this5.setState(result);
|
3492
|
-
});
|
3493
|
-
}
|
3494
|
-
}
|
3495
3478
|
//IC卡读取
|
3479
|
+
value: function () {
|
3480
|
+
var _ref28 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee18() {
|
3481
|
+
var result;
|
3482
|
+
return _regenerator2.default.wrap(function _callee18$(_context18) {
|
3483
|
+
while (1) {
|
3484
|
+
switch (_context18.prev = _context18.next) {
|
3485
|
+
case 0:
|
3486
|
+
_context18.next = 2;
|
3487
|
+
return _tplusHardware.rfCard.readRfCard();
|
3496
3488
|
|
3497
|
-
|
3498
|
-
|
3499
|
-
value: function readRfCard() {
|
3500
|
-
var _this6 = this;
|
3489
|
+
case 2:
|
3490
|
+
result = _context18.sent;
|
3501
3491
|
|
3502
|
-
|
3503
|
-
|
3504
|
-
|
3505
|
-
|
3506
|
-
|
3492
|
+
if (result) {
|
3493
|
+
this.setState({
|
3494
|
+
czkValue: result
|
3495
|
+
});
|
3496
|
+
this.loadCzk(result);
|
3497
|
+
}
|
3507
3498
|
|
3508
|
-
|
3509
|
-
|
3510
|
-
|
3511
|
-
|
3512
|
-
}
|
3513
|
-
var params = { cardPsw: this.iCCardPassword, cardSec: 13, cardKm: 0 };
|
3514
|
-
_mutantsMicrofx.nativeMs.setIpcRendererMethod('ReadRfCard', (0, _extends3.default)({}, params), function (ret) {
|
3515
|
-
if (ret.status === 0) {
|
3516
|
-
_message2.default.error(ret.value);
|
3517
|
-
_this6.connectRfCard(); //读取失败后,重新连接一下。
|
3518
|
-
return;
|
3519
|
-
} else if (ret.status === 1) {
|
3520
|
-
// this.searchMember(ret.value);
|
3521
|
-
// this.czkInput.input["value"]=ret.value;
|
3522
|
-
_this6.setState({
|
3523
|
-
czkValue: ret.value
|
3524
|
-
});
|
3525
|
-
_this6.loadCzk(ret.value);
|
3499
|
+
case 4:
|
3500
|
+
case 'end':
|
3501
|
+
return _context18.stop();
|
3502
|
+
}
|
3526
3503
|
}
|
3527
|
-
});
|
3504
|
+
}, _callee18, this);
|
3505
|
+
}));
|
3506
|
+
|
3507
|
+
function readRfCard() {
|
3508
|
+
return _ref28.apply(this, arguments);
|
3528
3509
|
}
|
3529
|
-
|
3510
|
+
|
3511
|
+
return readRfCard;
|
3512
|
+
}()
|
3530
3513
|
|
3531
3514
|
//czk
|
3532
3515
|
|
@@ -3571,8 +3554,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3571
3554
|
}, {
|
3572
3555
|
key: 'isNoProductTip',
|
3573
3556
|
value: function isNoProductTip(nonProductMap) {
|
3574
|
-
var
|
3575
|
-
RetailDetails =
|
3557
|
+
var _ref29 = this.context.viewModel.data || {},
|
3558
|
+
RetailDetails = _ref29.RetailDetails;
|
3576
3559
|
|
3577
3560
|
var temphtml = [];
|
3578
3561
|
if ((0, _keys2.default)(nonProductMap).length > 0) {
|
@@ -3666,7 +3649,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3666
3649
|
}, {
|
3667
3650
|
key: 'renderToolbtn',
|
3668
3651
|
value: function renderToolbtn(mode, index, bookType) {
|
3669
|
-
var
|
3652
|
+
var _this5 = this;
|
3670
3653
|
|
3671
3654
|
var _enumController$getEn34 = _mutantsUtil.enumController.getEnumOj(),
|
3672
3655
|
PayIcon = _enumController$getEn34.PayIcon,
|
@@ -3703,7 +3686,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3703
3686
|
return _react2.default.createElement(
|
3704
3687
|
'div',
|
3705
3688
|
{ key: index + "", className: paymodeDisabled + ' ' + paymodeSelected + ' paymode hotkey_' + this.compoundHotkeysList[hotkeyIndex], onClick: function onClick() {
|
3706
|
-
|
3689
|
+
_this5.onTabsClick(mode.paymentType, bookType);
|
3707
3690
|
} },
|
3708
3691
|
_react2.default.createElement(
|
3709
3692
|
'div',
|
@@ -3740,7 +3723,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3740
3723
|
}, {
|
3741
3724
|
key: 'render',
|
3742
3725
|
value: function render() {
|
3743
|
-
var
|
3726
|
+
var _this6 = this;
|
3744
3727
|
|
3745
3728
|
var _enumController$getEn35 = _mutantsUtil.enumController.getEnumOj(),
|
3746
3729
|
PayIcon = _enumController$getEn35.PayIcon,
|
@@ -3748,17 +3731,17 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3748
3731
|
PayStyle = _enumController$getEn35.PayStyle,
|
3749
3732
|
Differentiate = _enumController$getEn35.Differentiate;
|
3750
3733
|
|
3751
|
-
var
|
3752
|
-
btnDissabled =
|
3753
|
-
dataSource =
|
3754
|
-
discountTotalAmount =
|
3755
|
-
discountRetailTotalAount =
|
3756
|
-
discountPrototypeTotalAmount =
|
3757
|
-
storageValue =
|
3758
|
-
czkValue =
|
3759
|
-
newPassConfirm =
|
3760
|
-
newPass =
|
3761
|
-
isNotAutoFocus =
|
3734
|
+
var _state = this.state,
|
3735
|
+
btnDissabled = _state.btnDissabled,
|
3736
|
+
dataSource = _state.dataSource,
|
3737
|
+
discountTotalAmount = _state.discountTotalAmount,
|
3738
|
+
discountRetailTotalAount = _state.discountRetailTotalAount,
|
3739
|
+
discountPrototypeTotalAmount = _state.discountPrototypeTotalAmount,
|
3740
|
+
storageValue = _state.storageValue,
|
3741
|
+
czkValue = _state.czkValue,
|
3742
|
+
newPassConfirm = _state.newPassConfirm,
|
3743
|
+
newPass = _state.newPass,
|
3744
|
+
isNotAutoFocus = _state.isNotAutoFocus;
|
3762
3745
|
var _store2 = this.store,
|
3763
3746
|
paymode = _store2.paymode,
|
3764
3747
|
brefund = _store2.brefund,
|
@@ -3788,9 +3771,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3788
3771
|
// 单据模式
|
3789
3772
|
var thePaymodes = newStyle ? (0, _filter3.default)(paymode.thePaymodes, function (m) {
|
3790
3773
|
if (IdbusiType == 39) {
|
3791
|
-
return !(
|
3774
|
+
return !(_this6.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0) && m.paymentType != PayStyle.hyczk;
|
3792
3775
|
}
|
3793
|
-
return !(
|
3776
|
+
return !(_this6.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0);
|
3794
3777
|
}) : paymode.thePaymodes;
|
3795
3778
|
var paymodes = paymode.paymodes,
|
3796
3779
|
settle = paymode.settle,
|
@@ -3843,11 +3826,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3843
3826
|
quantity4 = 0;
|
3844
3827
|
var sumQuantity = 0; //数量总和的值,包括称重的。
|
3845
3828
|
|
3846
|
-
var
|
3847
|
-
|
3848
|
-
buyQuantity =
|
3849
|
-
|
3850
|
-
returnQuantity =
|
3829
|
+
var _ref30 = quantityDetail || {},
|
3830
|
+
_ref30$buyQuantity = _ref30.buyQuantity,
|
3831
|
+
buyQuantity = _ref30$buyQuantity === undefined ? 0 : _ref30$buyQuantity,
|
3832
|
+
_ref30$returnQuantity = _ref30.returnQuantity,
|
3833
|
+
returnQuantity = _ref30$returnQuantity === undefined ? 0 : _ref30$returnQuantity;
|
3851
3834
|
|
3852
3835
|
var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
|
3853
3836
|
quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
|
@@ -3871,7 +3854,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3871
3854
|
return _react2.default.createElement(
|
3872
3855
|
'div',
|
3873
3856
|
{ className: 'billingSettlement', ref: function ref(r) {
|
3874
|
-
return
|
3857
|
+
return _this6.billingSettlementDocumnet = r;
|
3875
3858
|
} },
|
3876
3859
|
this.props.MemberPoints ? _react2.default.createElement(
|
3877
3860
|
'div',
|
@@ -4004,9 +3987,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4004
3987
|
className: (0, _classnames4.default)({ "quick": true, "quick2": type == 1 }),
|
4005
3988
|
key: 'paymentType_' + p.paymentType,
|
4006
3989
|
onClick: function onClick() {
|
4007
|
-
|
3990
|
+
_this6.btnDebounced(p.paymentType, true);
|
4008
3991
|
},
|
4009
|
-
disabled: productsIsEmpty || type != 1 &&
|
3992
|
+
disabled: productsIsEmpty || type != 1 && _this6.checkModeDisabled(p.paymentType, (_this6.context.viewModel.data.TotalTaxAmount || 0 - _this6.context.viewModel.data.OnlinePaymentAmount || 0) < 0, boriginReturn)
|
4010
3993
|
},
|
4011
3994
|
_react2.default.createElement(
|
4012
3995
|
'div',
|
@@ -4023,7 +4006,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4023
4006
|
_react2.default.createElement(
|
4024
4007
|
_button2.default,
|
4025
4008
|
{ key: 'settle', className: (0, _classnames4.default)({ "settle": true, "settle2": type == 1, "settleStorage": true, 'primary-btn': true }), onClick: function onClick() {
|
4026
|
-
|
4009
|
+
_this6.btnDebounced();
|
4027
4010
|
}, disabled: productsIsEmpty },
|
4028
4011
|
this.props.isMemberPoints ? '立即兑换' : this.props.isMemberPointsReturn ? '退货' : IdbusiType == 39 && _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount == 0 ? '取货' : settle.name
|
4029
4012
|
)
|
@@ -4052,7 +4035,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4052
4035
|
'div',
|
4053
4036
|
null,
|
4054
4037
|
(0, _map3.default)(paymodes, function (mode, index) {
|
4055
|
-
return
|
4038
|
+
return _this6.renderToolbtn(mode, index, 'bookPay');
|
4056
4039
|
})
|
4057
4040
|
),
|
4058
4041
|
paymodes.length > carouselStart && this.paymodesCarouselList(params, paymodes, carouselStart)
|
@@ -4089,28 +4072,28 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4089
4072
|
mode.paymentType == PayStyle.hyczk || mode.paymentType == PayStyle.jfdx || mode.paymentType == PayStyle.djq ? _react2.default.createElement('input', { id: 'inputS' + index,
|
4090
4073
|
className: _index.hotKey.hotKeyNotFilter(),
|
4091
4074
|
onClick: function onClick() {
|
4092
|
-
|
4075
|
+
_this6.editModal(index, mode.paymentType, type != 1 ? boriginReturn : null);
|
4093
4076
|
}, value: (0, _utils.getFixedNumber)(mode.value) }) : _react2.default.createElement('input', { id: 'inputS' + index,
|
4094
4077
|
className: _index.hotKey.hotKeyNotFilter(),
|
4095
4078
|
value: mode.exchangeRate != 1 ? mode.value2 : mode.value,
|
4096
4079
|
onClick: function onClick(e) {
|
4097
|
-
return
|
4080
|
+
return _this6.onHotKeyClick2(index, mode, paymode, e);
|
4098
4081
|
},
|
4099
4082
|
onBlur: function onBlur(e) {
|
4100
|
-
return
|
4083
|
+
return _this6.onBlur(index, e, 'bookPay');
|
4101
4084
|
},
|
4102
4085
|
onFocus: function onFocus(e) {
|
4103
|
-
return
|
4086
|
+
return _this6.onFocusHack(index, mode, paymode, e);
|
4104
4087
|
},
|
4105
4088
|
onChange: function onChange(e) {
|
4106
|
-
return
|
4089
|
+
return _this6.handleChange(index, e, 'bookPay');
|
4107
4090
|
}
|
4108
4091
|
})
|
4109
4092
|
),
|
4110
4093
|
_react2.default.createElement(
|
4111
4094
|
'span',
|
4112
4095
|
{ className: 'minus', onClick: function onClick() {
|
4113
|
-
|
4096
|
+
_this6.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType, 'bookPay');
|
4114
4097
|
} },
|
4115
4098
|
_react2.default.createElement(_ticon2.default, { type: 'shanchu', className: 'minusIcon primary-color' })
|
4116
4099
|
)
|
@@ -4156,7 +4139,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4156
4139
|
type != 1 && themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === mode.paymethodId && !isReturn && _react2.default.createElement(
|
4157
4140
|
_button2.default,
|
4158
4141
|
{ onClick: function onClick() {
|
4159
|
-
|
4142
|
+
_this6.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
4160
4143
|
}, className: 'addCard btn-border-primary' },
|
4161
4144
|
_react2.default.createElement(_ticon2.default, { type: 'jiahao', className: 'plus b-theme-color' }),
|
4162
4145
|
_react2.default.createElement(
|
@@ -4426,7 +4409,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4426
4409
|
'\u8BF7\u6DFB\u52A0\u7ED3\u7B97\u65B9\u5F0F'
|
4427
4410
|
),
|
4428
4411
|
(0, _map3.default)(thePaymodes, function (mode, mindex) {
|
4429
|
-
var isReturn =
|
4412
|
+
var isReturn = _this6.props.isReturn;
|
4430
4413
|
|
4431
4414
|
var hasSMZF = (0, _find3.default)(thePaymodes, function (m) {
|
4432
4415
|
return m.paymentType === PayStyle.smzf;
|
@@ -4486,7 +4469,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4486
4469
|
_react2.default.createElement(
|
4487
4470
|
'div',
|
4488
4471
|
{ className: 'hotkey' },
|
4489
|
-
|
4472
|
+
_this6.isHorizontalPad ? '' : _this6.compoundHotkeysList[hotkeyIndex] || ''
|
4490
4473
|
)
|
4491
4474
|
),
|
4492
4475
|
_react2.default.createElement(
|
@@ -4494,15 +4477,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4494
4477
|
{ className: (0, _classnames4.default)({ "content": true }) },
|
4495
4478
|
mode.paymentType == PayStyle.hyczk || mode.paymentType == PayStyle.jfdx || mode.paymentType == PayStyle.djq ? _react2.default.createElement('input', { id: 'inputS' + index,
|
4496
4479
|
|
4497
|
-
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" +
|
4498
|
-
disabled:
|
4480
|
+
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" + _this6.compoundHotkeysList[hotkeyIndex]),
|
4481
|
+
disabled: _this6.checkModeDisabled(mode.paymentType, brefund, boriginReturn),
|
4499
4482
|
onClick: function onClick() {
|
4500
4483
|
if (type != 1 && mode.paymentType == PayStyle.hyczk) {
|
4501
4484
|
if (themodeHyczk && themodeHyczk.length === 0) {
|
4502
|
-
|
4485
|
+
_this6.onHotKeyClick1(mode, index, boriginReturn);
|
4503
4486
|
}
|
4504
4487
|
} else {
|
4505
|
-
|
4488
|
+
_this6.onHotKeyClick1(mode, index, boriginReturn, 'bookPay');
|
4506
4489
|
}
|
4507
4490
|
},
|
4508
4491
|
value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
|
@@ -4510,20 +4493,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4510
4493
|
}), function (sum, m) {
|
4511
4494
|
return Math.Add(sum, m.value);
|
4512
4495
|
}, 0)) : (0, _utils.getFixedNumber)(mode.value) }) : _react2.default.createElement('input', { id: 'inputS' + index,
|
4513
|
-
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" +
|
4514
|
-
disabled:
|
4496
|
+
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" + _this6.compoundHotkeysList[hotkeyIndex]),
|
4497
|
+
disabled: _this6.checkModeDisabled(mode.paymentType, brefund, boriginReturn) || _this6.checkScanDisabled(mode.paymentType),
|
4515
4498
|
value: mode.exchangeRate != 1 ? mode.value2 : mode.value,
|
4516
4499
|
onClick: function onClick(e) {
|
4517
|
-
return
|
4500
|
+
return _this6.onHotKeyClick2(index, mode, paymode, e, 'bookPay');
|
4518
4501
|
},
|
4519
4502
|
onBlur: function onBlur(e) {
|
4520
|
-
return
|
4503
|
+
return _this6.onBlur(index, e, 'bookPay');
|
4521
4504
|
},
|
4522
4505
|
onFocus: function onFocus(e) {
|
4523
|
-
return
|
4506
|
+
return _this6.onFocusHack(index, mode, paymode, e);
|
4524
4507
|
},
|
4525
4508
|
onChange: function onChange(e) {
|
4526
|
-
return
|
4509
|
+
return _this6.handleChange(index, e, 'bookPay');
|
4527
4510
|
}
|
4528
4511
|
})
|
4529
4512
|
)
|
@@ -4576,7 +4559,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4576
4559
|
type != 1 && themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === m.paymethodId && _react2.default.createElement(
|
4577
4560
|
_button2.default,
|
4578
4561
|
{ onClick: function onClick() {
|
4579
|
-
return
|
4562
|
+
return _this6.onHotKeyClick1(mode, index, boriginReturn);
|
4580
4563
|
}, className: 'addCard btn-border-primary' },
|
4581
4564
|
_react2.default.createElement(_ticon2.default, { type: 'jiahao', className: 'plus b-theme-color' }),
|
4582
4565
|
_react2.default.createElement(
|
@@ -4724,79 +4707,79 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4724
4707
|
placeholder: '\u8BF7\u626B\u63CF\u6216\u8F93\u5165\u624B\u673A\u53F7/\u50A8\u503C\u5361\u53F7',
|
4725
4708
|
className: 'input ' + (this.hasElectron === true && this.iCCardServer === 1 || this.isHorizontalPad === true ? 'temp' : ''),
|
4726
4709
|
onChange: function onChange(e) {
|
4727
|
-
return
|
4710
|
+
return _this6.onCzkChange(e.target.value);
|
4728
4711
|
},
|
4729
4712
|
defaultValue: currentMode && currentMode.storageCardNo,
|
4730
4713
|
value: czkValue,
|
4731
4714
|
ref: function ref(input) {
|
4732
|
-
return
|
4715
|
+
return _this6.czkInput = input;
|
4733
4716
|
},
|
4734
4717
|
onKeyDown: function () {
|
4735
|
-
var
|
4718
|
+
var _ref31 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee19(e) {
|
4736
4719
|
var time, _paymode;
|
4737
4720
|
|
4738
|
-
return _regenerator2.default.wrap(function
|
4721
|
+
return _regenerator2.default.wrap(function _callee19$(_context19) {
|
4739
4722
|
while (1) {
|
4740
|
-
switch (
|
4723
|
+
switch (_context19.prev = _context19.next) {
|
4741
4724
|
case 0:
|
4742
4725
|
if (!(e.keyCode == 13)) {
|
4743
|
-
|
4726
|
+
_context19.next = 14;
|
4744
4727
|
break;
|
4745
4728
|
}
|
4746
4729
|
|
4747
4730
|
time = Date.parse(new Date());
|
4748
4731
|
|
4749
|
-
if (!(
|
4750
|
-
|
4732
|
+
if (!(_this6.isStorageCardInputType && time - _this6.keypressStime > 350)) {
|
4733
|
+
_context19.next = 7;
|
4751
4734
|
break;
|
4752
4735
|
}
|
4753
4736
|
|
4754
4737
|
_message2.default.warn('储值卡不可键盘录入,请刷卡!');
|
4755
|
-
|
4756
|
-
|
4738
|
+
_this6.keypressStime = null;
|
4739
|
+
_this6.setState({
|
4757
4740
|
czkValue: null
|
4758
4741
|
});
|
4759
|
-
return
|
4742
|
+
return _context19.abrupt('return');
|
4760
4743
|
|
4761
4744
|
case 7:
|
4762
|
-
|
4763
|
-
|
4764
|
-
return
|
4745
|
+
_this6.keypressStime = null;
|
4746
|
+
_context19.next = 10;
|
4747
|
+
return _this6.loadCzk(e.target.value);
|
4765
4748
|
|
4766
4749
|
case 10:
|
4767
|
-
_paymode =
|
4750
|
+
_paymode = _this6.store.paymode;
|
4768
4751
|
|
4769
4752
|
if (!_paymode.currentMode.storageCardNo) {
|
4770
|
-
|
4753
|
+
_this6.setState({
|
4771
4754
|
czkvalue: null
|
4772
4755
|
});
|
4773
4756
|
}
|
4774
|
-
|
4757
|
+
_context19.next = 15;
|
4775
4758
|
break;
|
4776
4759
|
|
4777
4760
|
case 14:
|
4778
|
-
if (!
|
4779
|
-
|
4761
|
+
if (!_this6.keypressStime && e.keyCode !== 8) {
|
4762
|
+
_this6.keypressStime = Date.parse(new Date());
|
4780
4763
|
}
|
4781
4764
|
|
4782
4765
|
case 15:
|
4783
4766
|
case 'end':
|
4784
|
-
return
|
4767
|
+
return _context19.stop();
|
4785
4768
|
}
|
4786
4769
|
}
|
4787
|
-
},
|
4770
|
+
}, _callee19, _this6);
|
4788
4771
|
}));
|
4789
4772
|
|
4790
4773
|
return function (_x13) {
|
4791
|
-
return
|
4774
|
+
return _ref31.apply(this, arguments);
|
4792
4775
|
};
|
4793
4776
|
}(),
|
4794
4777
|
onFocus: function onFocus(e) {
|
4795
|
-
|
4796
|
-
!
|
4797
|
-
var value = _keyboard2.default.getNewValue(
|
4798
|
-
|
4799
|
-
},
|
4778
|
+
_this6.inputTarget = _this6.czkInput.input;
|
4779
|
+
!_this6.state.prototypeVisible && _keyboard2.default.open(function (v) {
|
4780
|
+
var value = _keyboard2.default.getNewValue(_this6.inputTarget, _this6.inputTarget.value, v);
|
4781
|
+
_this6.onCzkChange(value);
|
4782
|
+
}, _this6.czkKeyboardOnOk, _this6.czkKeyboardOnClose)();
|
4800
4783
|
},
|
4801
4784
|
onBlur: function onBlur(e) {
|
4802
4785
|
_keyboard2.default.close();
|
@@ -4808,7 +4791,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4808
4791
|
|
4809
4792
|
/* 扫描组件 */
|
4810
4793
|
this.isHorizontalPad && _react2.default.createElement(_scan2.default, { ref: function ref(scan) {
|
4811
|
-
return
|
4794
|
+
return _this6.scanObj = scan;
|
4812
4795
|
}, onChange: this.onScanCzkResult })
|
4813
4796
|
),
|
4814
4797
|
_react2.default.createElement(
|
@@ -4842,22 +4825,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4842
4825
|
className: _index.hotKey.hotKeyNotFilter('input'),
|
4843
4826
|
value: storageValue,
|
4844
4827
|
onChange: function onChange(event) {
|
4845
|
-
|
4828
|
+
_this6.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.balance));
|
4846
4829
|
},
|
4847
4830
|
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)),
|
4848
|
-
ref: function ref(
|
4849
|
-
return
|
4831
|
+
ref: function ref(_ref32) {
|
4832
|
+
return _this6["inputCzkAmount"] = _ref32;
|
4850
4833
|
},
|
4851
4834
|
onFocus: function onFocus(e) {
|
4852
|
-
|
4835
|
+
_this6.inputkey = "inputCzkAmount";
|
4853
4836
|
_keyboard2.default.open(function (v) {
|
4854
|
-
var value = _keyboard2.default.getNewValue(
|
4855
|
-
|
4856
|
-
},
|
4837
|
+
var value = _keyboard2.default.getNewValue(_this6[_this6.inputkey].input, _this6[_this6.inputkey].input.value, v);
|
4838
|
+
_this6.setCurrentModeValue(value, Math.min(currentMode.maxamount, currentMode.balance));
|
4839
|
+
}, _this6.keyboardOnOk, _this6.keyboardOnClose)();
|
4857
4840
|
},
|
4858
4841
|
onBlur: function onBlur(e) {
|
4859
4842
|
_keyboard2.default.close();
|
4860
|
-
|
4843
|
+
_this6.setCurrentModeValue((0, _utils.getFixedNumber)(_this6.inputCzkAmount.input.value), Math.min(currentMode.maxamount, currentMode.balance));
|
4861
4844
|
}
|
4862
4845
|
})
|
4863
4846
|
)
|
@@ -4986,16 +4969,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4986
4969
|
maxLength: 6,
|
4987
4970
|
value: newPass,
|
4988
4971
|
ref: function ref(input) {
|
4989
|
-
return
|
4972
|
+
return _this6.inputNewAmount = input;
|
4990
4973
|
},
|
4991
4974
|
onChange: function onChange(value) {
|
4992
|
-
return
|
4975
|
+
return _this6.setPwdValue('newPass', value.target.value);
|
4993
4976
|
},
|
4994
4977
|
onBlur: function onBlur(value) {
|
4995
|
-
return
|
4978
|
+
return _this6.handleBlur('newPass');
|
4996
4979
|
},
|
4997
4980
|
onPressEnter: function onPressEnter() {
|
4998
|
-
return
|
4981
|
+
return _this6.onPressEnterCzk('newPass');
|
4999
4982
|
}
|
5000
4983
|
})
|
5001
4984
|
)
|
@@ -5018,16 +5001,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
5018
5001
|
maxLength: 6,
|
5019
5002
|
value: newPassConfirm,
|
5020
5003
|
ref: function ref(input) {
|
5021
|
-
return
|
5004
|
+
return _this6.inputConfirmAmount = input;
|
5022
5005
|
},
|
5023
5006
|
onChange: function onChange(value) {
|
5024
|
-
return
|
5007
|
+
return _this6.setPwdValue('newPassConfirm', value.target.value);
|
5025
5008
|
},
|
5026
5009
|
onBlur: function onBlur(value) {
|
5027
|
-
return
|
5010
|
+
return _this6.handleBlur('newPassConfirm');
|
5028
5011
|
},
|
5029
5012
|
onPressEnter: function onPressEnter() {
|
5030
|
-
return
|
5013
|
+
return _this6.onPressEnterCzk('newPassConfirm');
|
5031
5014
|
}
|
5032
5015
|
})
|
5033
5016
|
)
|
@@ -5088,22 +5071,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
5088
5071
|
// onChange={this.onDjqChange}
|
5089
5072
|
// value={currentMode && currentMode.member.cardNo}
|
5090
5073
|
, ref: function ref(input) {
|
5091
|
-
return
|
5074
|
+
return _this6.inputdjq = input;
|
5092
5075
|
},
|
5093
5076
|
onKeyDown: function onKeyDown(e) {
|
5094
5077
|
if (e.keyCode == 13) {
|
5095
|
-
|
5078
|
+
_this6.addDjq(e.target.value);
|
5096
5079
|
}
|
5097
5080
|
},
|
5098
5081
|
onFocus: function onFocus(e) {
|
5099
|
-
|
5082
|
+
_this6.inputTarget = _this6.inputdjq.input;
|
5100
5083
|
_keyboard2.default.open(function (v) {
|
5101
|
-
var value = _keyboard2.default.getNewValue(
|
5102
|
-
|
5103
|
-
},
|
5084
|
+
var value = _keyboard2.default.getNewValue(_this6.inputTarget, _this6.inputTarget.value, v);
|
5085
|
+
_this6.onDjqChange(value, true);
|
5086
|
+
}, _this6.djqKeyboardOnOk, _this6.djqKeyboardOnClose)();
|
5104
5087
|
},
|
5105
5088
|
onBlur: function onBlur(e) {
|
5106
|
-
_keyboard2.default.close();
|
5089
|
+
_keyboard2.default.close();_this6.inputdjq.input.value = '';
|
5107
5090
|
}
|
5108
5091
|
})
|
5109
5092
|
),
|
@@ -5137,7 +5120,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
5137
5120
|
{ className: 'col3' },
|
5138
5121
|
_react2.default.createElement(_ticon2.default, { type: 'saomiao1', className: 'icon', onClick: this.changeScanProduct }),
|
5139
5122
|
_react2.default.createElement(_scan2.default, { ref: function ref(scan) {
|
5140
|
-
return
|
5123
|
+
return _this6.scanObj = scan;
|
5141
5124
|
}, onChange: this.onScanDjqResult })
|
5142
5125
|
)
|
5143
5126
|
),
|
@@ -5148,10 +5131,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
5148
5131
|
'div',
|
5149
5132
|
{ className: 'djq2' },
|
5150
5133
|
currentMode && currentMode.djqs && currentMode.djqs.length > 0 ? (0, _map3.default)(currentMode.djqs || [], function (q, index) {
|
5151
|
-
if (!
|
5134
|
+
if (!_this6.state.couponLight && !q.count) {
|
5152
5135
|
return;
|
5153
5136
|
}
|
5154
|
-
if (
|
5137
|
+
if (_this6.state.couponLight && q.count && q.count === 1) {
|
5155
5138
|
return;
|
5156
5139
|
}
|
5157
5140
|
return _react2.default.createElement(
|
@@ -5205,7 +5188,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
5205
5188
|
_react2.default.createElement(
|
5206
5189
|
'div',
|
5207
5190
|
{ className: (0, _classnames4.default)('djqRight', { 'djqRightSelected': q.checked }), onClick: function onClick(e) {
|
5208
|
-
return q.IsEnable ?
|
5191
|
+
return q.IsEnable ? _this6.djqChecked(q, _this6.props.dto) : null;
|
5209
5192
|
} },
|
5210
5193
|
q.checked ? _react2.default.createElement(_ticon2.default, { className: 'checkIcon primary-color', type: 'xuanzhong1' }) : _react2.default.createElement('span', { className: '' + (q.IsEnable ? 'noxuanzhong' : 'noxuanzhong1') }),
|
5211
5194
|
q.checked ? _react2.default.createElement(
|
@@ -5513,22 +5496,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
5513
5496
|
type: 'text',
|
5514
5497
|
value: storageValue,
|
5515
5498
|
onChange: function onChange(e) {
|
5516
|
-
|
5499
|
+
_this6.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
5517
5500
|
},
|
5518
5501
|
defaultValue: currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
5519
|
-
ref: function ref(
|
5520
|
-
return
|
5502
|
+
ref: function ref(_ref33) {
|
5503
|
+
return _this6["inputJfdxAmount"] = _ref33;
|
5521
5504
|
},
|
5522
5505
|
onFocus: function onFocus(e) {
|
5523
|
-
|
5506
|
+
_this6.inputkey = "inputJfdxAmount";
|
5524
5507
|
_keyboard2.default.open(function (v) {
|
5525
|
-
var value = _keyboard2.default.getNewValue(
|
5526
|
-
|
5527
|
-
},
|
5508
|
+
var value = _keyboard2.default.getNewValue(_this6[_this6.inputkey].input, _this6[_this6.inputkey].input.value, v);
|
5509
|
+
_this6.setCurrentModeValue(value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
5510
|
+
}, _this6.keyboardOnOk, _this6.keyboardOnClose)();
|
5528
5511
|
},
|
5529
5512
|
onBlur: function onBlur(e) {
|
5530
5513
|
_keyboard2.default.close();
|
5531
|
-
|
5514
|
+
_this6.setCurrentModeValue((0, _utils.getFixedNumber)(_this6.inputJfdxAmount.input.value), Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
5532
5515
|
}
|
5533
5516
|
})
|
5534
5517
|
)
|