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