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