tplus-components-touch 3.25.9 → 3.26.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/billSearch/index.js +14 -14
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/cloudPrint/index.js +4 -57
- package/dist/components/cloudPrint/index.js.map +1 -1
- package/dist/components/deliverySearch/index.js +8 -12
- package/dist/components/deliverySearch/index.js.map +1 -1
- package/dist/components/hotKey/localConfig.js +133 -14
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/inventorySearch/store.js +12 -31
- package/dist/components/inventorySearch/store.js.map +1 -1
- package/dist/components/inventorySearch/tab.js +2 -9
- package/dist/components/inventorySearch/tab.js.map +1 -1
- package/dist/components/loading/loadingContent.js +4 -13
- package/dist/components/loading/loadingContent.js.map +1 -1
- package/dist/components/loading/style.less +4 -13
- package/dist/components/message/index.js +5 -8
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/settlement/settlement.js +592 -466
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +57 -5
- package/dist/components/settlement/settlementStore.js +284 -170
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/socket/index.js +5 -6
- package/dist/components/socket/index.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +49 -3
- package/dist/components/ticon/iconfont/iconfont.css +11 -3
- package/dist/components/ticon/iconfont/iconfont.js +6 -6
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
- package/dist/components/ticon/iconfont/iconfont.json +14 -0
- package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
- package/dist/index.js +1 -6
- package/dist/index.js.map +1 -1
- package/dist/util/tools.js +7 -5
- package/dist/util/tools.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/input/scanInput.js +0 -98
- package/dist/components/input/scanInput.js.map +0 -1
- package/dist/components/input/scanInput.less +0 -28
|
@@ -253,7 +253,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
253
253
|
currentKey: null,
|
|
254
254
|
couponLight: true,
|
|
255
255
|
storageValue: '0.00',
|
|
256
|
-
czkValue: null
|
|
256
|
+
czkValue: null,
|
|
257
|
+
isInputMember: false };
|
|
257
258
|
_this2.compoundHotkeysList = (window.$.operationControl[5] ? window.$.operationControl[5].control || [] : []).map(function (key) {
|
|
258
259
|
return key.toLocaleUpperCase();
|
|
259
260
|
});
|
|
@@ -300,12 +301,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
300
301
|
_this2.inputkey = "inputJfdxAmount";
|
|
301
302
|
_this2["inputJfdxAmount"].input.value = currentMode && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable));
|
|
302
303
|
_this2.setCurrentModeValue(_this2.inputJfdxAmount.input.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
303
|
-
} else if (_this2.state.czkVisible && currentMode && currentMode.value >= 0 && currentMode.
|
|
304
|
+
} else if (_this2.state.czkVisible && currentMode && currentMode.value >= 0 && currentMode.balance !== undefined) {
|
|
304
305
|
_this2.inputkey = "inputCzkAmount";
|
|
305
|
-
_this2["inputCzkAmount"] && _this2["inputCzkAmount"].input && (_this2["inputCzkAmount"].input.value = (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.
|
|
306
|
-
var maxamount = Math.min(currentMode.maxamount, currentMode.
|
|
306
|
+
_this2["inputCzkAmount"] && _this2["inputCzkAmount"].input && (_this2["inputCzkAmount"].input.value = (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)));
|
|
307
|
+
var maxamount = Math.min(currentMode.maxamount, currentMode.balance);
|
|
307
308
|
_this2.inputCzkAmount && _this2.inputCzkAmount.input && _this2.setCurrentModeValue(_this2.inputCzkAmount.input.value, maxamount);
|
|
308
|
-
if (_this2.store.bquick && currentMode.
|
|
309
|
+
if (_this2.store.bquick && currentMode.storageCardNo && parseFloat(_this2.store.paymode.amount) > parseFloat(maxamount)) {
|
|
309
310
|
_message2.default.error("本单最大可用储值卡结算金额为:" + (0, _utils.getFixedNumber)(maxamount) + ",请使用复合结算!", {
|
|
310
311
|
duration: 4
|
|
311
312
|
});
|
|
@@ -553,155 +554,75 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
553
554
|
});
|
|
554
555
|
};
|
|
555
556
|
|
|
556
|
-
_this2.showCzkModal = function (
|
|
557
|
-
var
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
var _ref = _mutantsUtil.platform || {},
|
|
561
|
-
isNewRetailBCPos = _ref.isNewRetailBCPos;
|
|
562
|
-
|
|
563
|
-
_this2.store.setCurrentMode(id, PayStyle.hyczk, append);
|
|
564
|
-
_this2._val = _this2.store.paymode.currentMode.value;
|
|
565
|
-
var currentMode = _this2.store.paymode.currentMode;
|
|
566
|
-
|
|
567
|
-
var maxamount = Math.min(currentMode.maxamount, currentMode.member.balance);
|
|
568
|
-
if (_this2.store.bquick && currentMode.member.id && parseFloat(_this2.store.paymode.amount) > parseFloat(maxamount)) {
|
|
569
|
-
_message2.default.error("本单最大可用储值卡结算金额为:" + (0, _utils.getFixedNumber)(maxamount) + ",请使用复合结算!", {
|
|
570
|
-
duration: 4
|
|
571
|
-
});
|
|
572
|
-
} else {
|
|
573
|
-
// if (isNewRetailBCPos) {
|
|
574
|
-
// let { isReturn } = this.props;
|
|
575
|
-
// let sMember = this.store.member;
|
|
576
|
-
// if (!sMember.StorageCardEnable) {
|
|
577
|
-
// Message.warn("该储值卡已停用");
|
|
578
|
-
// return;
|
|
579
|
-
// }
|
|
580
|
-
// if (sMember && sMember.ID) {
|
|
581
|
-
// // noPlaySetPwd 点击结算方式设置密码,点加号不设置
|
|
582
|
-
// if (!sMember.WalletEnabled && params !== 'noPlaySetPwd' && !isReturn) {
|
|
583
|
-
// this.setState({
|
|
584
|
-
// newPass: '',
|
|
585
|
-
// newPassConfirm: '',
|
|
586
|
-
// showSetPwdModal: true
|
|
587
|
-
// })
|
|
588
|
-
// } else {
|
|
589
|
-
// this.setState({
|
|
590
|
-
// showSetPwdModal: false,
|
|
591
|
-
// czkVisible: true
|
|
592
|
-
// })
|
|
593
|
-
// }
|
|
594
|
-
// }
|
|
595
|
-
// // else {
|
|
596
|
-
// // Message.warn('请先录入会员');
|
|
597
|
-
// // }
|
|
598
|
-
// // this.setState({
|
|
599
|
-
// // czkVisible: true,
|
|
600
|
-
// // });
|
|
601
|
-
// } else {
|
|
602
|
-
// this.setState({
|
|
603
|
-
// czkVisible: true,
|
|
604
|
-
// });
|
|
605
|
-
// }
|
|
606
|
-
_this2.setState({
|
|
607
|
-
czkVisible: true
|
|
608
|
-
});
|
|
609
|
-
var brefund = _this2.store.brefund;
|
|
610
|
-
|
|
611
|
-
var value11 = currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.member.balance));
|
|
612
|
-
_this2.setState({
|
|
613
|
-
storageValue: value11
|
|
614
|
-
});
|
|
615
|
-
if (currentMode.member.id) {
|
|
616
|
-
_this2.setState({
|
|
617
|
-
czkValue: currentMode.member.StorageCardNo
|
|
618
|
-
});
|
|
619
|
-
} else {
|
|
620
|
-
_this2.setState({
|
|
621
|
-
czkValue: null
|
|
622
|
-
});
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
setTimeout(function () {
|
|
626
|
-
if (!currentMode.member || !currentMode.member.id) {
|
|
627
|
-
_this2.czkInput && _this2.czkInput.input.focus();
|
|
628
|
-
} else {
|
|
629
|
-
if (_this2.inputCzkAmount && _this2.inputCzkAmount.input) {
|
|
630
|
-
_this2.inputCzkAmount.input.focus();
|
|
631
|
-
_this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
}, 500);
|
|
635
|
-
_this2.connectRfCard();
|
|
636
|
-
};
|
|
637
|
-
|
|
638
|
-
_this2.handleCzkOk = function () {
|
|
639
|
-
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(e) {
|
|
640
|
-
var _enumController$getEn3, PayStyle;
|
|
557
|
+
_this2.showCzkModal = function () {
|
|
558
|
+
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(id, append, params) {
|
|
559
|
+
var _enumController$getEn2, PayStyle, currentMode, maxamount, brefund, value11, isInputMember;
|
|
641
560
|
|
|
642
561
|
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
643
562
|
while (1) {
|
|
644
563
|
switch (_context.prev = _context.next) {
|
|
645
564
|
case 0:
|
|
646
|
-
|
|
647
|
-
// if(this.store.bquick && this.store.paymode.amount>maxamount){
|
|
648
|
-
// Message.error("本单最大可用储值卡结算金额为:"+getFixedNumber(maxamount)+",请使用复合结算!");
|
|
649
|
-
// this.setState({
|
|
650
|
-
// czkVisible: false,
|
|
651
|
-
// });
|
|
652
|
-
// return;
|
|
653
|
-
// }
|
|
654
|
-
_enumController$getEn3 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn3.PayStyle;
|
|
655
|
-
|
|
656
|
-
if (_this2.store.paymode.currentMode.member.id) {
|
|
657
|
-
_context.next = 4;
|
|
658
|
-
break;
|
|
659
|
-
}
|
|
565
|
+
_enumController$getEn2 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn2.PayStyle;
|
|
660
566
|
|
|
661
|
-
|
|
662
|
-
|
|
567
|
+
_this2.store.setCurrentMode(id, PayStyle.hyczk, append);
|
|
568
|
+
_this2._val = _this2.store.paymode.currentMode.value;
|
|
569
|
+
currentMode = _this2.store.paymode.currentMode;
|
|
570
|
+
maxamount = Math.min(currentMode.maxamount, currentMode.balance);
|
|
663
571
|
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
_context.next = 7;
|
|
572
|
+
if (!(_this2.store.bquick && currentMode.storageCardNo && parseFloat(_this2.store.paymode.amount) > parseFloat(maxamount))) {
|
|
573
|
+
_context.next = 9;
|
|
667
574
|
break;
|
|
668
575
|
}
|
|
669
576
|
|
|
670
|
-
_message2.default.error("
|
|
671
|
-
|
|
577
|
+
_message2.default.error("本单最大可用储值卡结算金额为:" + (0, _utils.getFixedNumber)(maxamount) + ",请使用复合结算!", {
|
|
578
|
+
duration: 4
|
|
579
|
+
});
|
|
580
|
+
_context.next = 18;
|
|
581
|
+
break;
|
|
672
582
|
|
|
673
|
-
case
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
})
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
}
|
|
583
|
+
case 9:
|
|
584
|
+
_this2.setState({
|
|
585
|
+
czkVisible: true
|
|
586
|
+
});
|
|
587
|
+
brefund = _this2.store.brefund;
|
|
588
|
+
value11 = currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance));
|
|
680
589
|
|
|
681
|
-
|
|
682
|
-
|
|
590
|
+
_this2.setState({
|
|
591
|
+
storageValue: value11
|
|
592
|
+
});
|
|
593
|
+
if (currentMode.storageCardNo) {
|
|
594
|
+
_this2.setState({
|
|
595
|
+
czkValue: currentMode.storageCardNo
|
|
596
|
+
});
|
|
597
|
+
} else {
|
|
598
|
+
_this2.setState({
|
|
599
|
+
czkValue: null
|
|
600
|
+
});
|
|
601
|
+
}
|
|
602
|
+
isInputMember = _this2.state.isInputMember;
|
|
683
603
|
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
_context.next = 13;
|
|
604
|
+
if (!isInputMember) {
|
|
605
|
+
_context.next = 18;
|
|
687
606
|
break;
|
|
688
607
|
}
|
|
689
608
|
|
|
690
|
-
|
|
691
|
-
return
|
|
692
|
-
|
|
693
|
-
case 13:
|
|
609
|
+
_context.next = 18;
|
|
610
|
+
return _this2.store.updateCurrentMode(_this2.store.paymode.currentMode.memberId);
|
|
694
611
|
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
612
|
+
case 18:
|
|
613
|
+
setTimeout(function () {
|
|
614
|
+
if (!currentMode.storageCardNo) {
|
|
615
|
+
_this2.czkInput && _this2.czkInput.input.focus();
|
|
616
|
+
} else {
|
|
617
|
+
if (_this2.inputCzkAmount && _this2.inputCzkAmount.input) {
|
|
618
|
+
_this2.inputCzkAmount.input.focus();
|
|
619
|
+
_this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
}, 500);
|
|
623
|
+
_this2.connectRfCard();
|
|
703
624
|
|
|
704
|
-
case
|
|
625
|
+
case 20:
|
|
705
626
|
case 'end':
|
|
706
627
|
return _context.stop();
|
|
707
628
|
}
|
|
@@ -709,8 +630,109 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
709
630
|
}, _callee, _this3);
|
|
710
631
|
}));
|
|
711
632
|
|
|
712
|
-
return function (_x) {
|
|
713
|
-
return
|
|
633
|
+
return function (_x, _x2, _x3) {
|
|
634
|
+
return _ref.apply(this, arguments);
|
|
635
|
+
};
|
|
636
|
+
}();
|
|
637
|
+
|
|
638
|
+
_this2.handleCzkData = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
|
639
|
+
var _enumController$getEn3, PayStyle;
|
|
640
|
+
|
|
641
|
+
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
642
|
+
while (1) {
|
|
643
|
+
switch (_context2.prev = _context2.next) {
|
|
644
|
+
case 0:
|
|
645
|
+
_this2.setState({
|
|
646
|
+
isInputMember: false
|
|
647
|
+
});
|
|
648
|
+
_enumController$getEn3 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn3.PayStyle;
|
|
649
|
+
|
|
650
|
+
if (_this2.store.paymode.currentMode.storageCardNo) {
|
|
651
|
+
_context2.next = 5;
|
|
652
|
+
break;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
_context2.next = 5;
|
|
656
|
+
return _this2.store.loadCzk(_this2.czkInput.input.value);
|
|
657
|
+
|
|
658
|
+
case 5:
|
|
659
|
+
if (_this2.store.paymode.currentMode.storageCardNo) {
|
|
660
|
+
_context2.next = 8;
|
|
661
|
+
break;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
_message2.default.error("请录入储值卡!");
|
|
665
|
+
return _context2.abrupt('return');
|
|
666
|
+
|
|
667
|
+
case 8:
|
|
668
|
+
if (!(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
|
|
669
|
+
return mode.paymethodId != _this2.store.paymode.currentMode.paymethodId && mode.paymentType == PayStyle.hyczk && mode.storageCardNo == _this2.store.paymode.currentMode.storageCardNo;
|
|
670
|
+
})) {
|
|
671
|
+
_context2.next = 11;
|
|
672
|
+
break;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
_message2.default.error("该储值卡已使用。");
|
|
676
|
+
return _context2.abrupt('return');
|
|
677
|
+
|
|
678
|
+
case 11:
|
|
679
|
+
if (!(_this2.store.bquick && _this2.store.paymode.amount != _this2.store.paymode.currentMode.value)) {
|
|
680
|
+
_context2.next = 14;
|
|
681
|
+
break;
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
_message2.default.error("实收金额应等于应收金额。");
|
|
685
|
+
return _context2.abrupt('return');
|
|
686
|
+
|
|
687
|
+
case 14:
|
|
688
|
+
|
|
689
|
+
_this2.setState({
|
|
690
|
+
czkVisible: false,
|
|
691
|
+
storageValue: '0.00',
|
|
692
|
+
czkValue: null
|
|
693
|
+
});
|
|
694
|
+
_this2.closeRfCard();
|
|
695
|
+
_this2.store.paymode.calcMemberBalance();
|
|
696
|
+
_this2.handleCzk();
|
|
697
|
+
|
|
698
|
+
case 18:
|
|
699
|
+
case 'end':
|
|
700
|
+
return _context2.stop();
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}, _callee2, _this3);
|
|
704
|
+
}));
|
|
705
|
+
|
|
706
|
+
_this2.handleCzkOk = function () {
|
|
707
|
+
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(e) {
|
|
708
|
+
var _this2$store$paymode$, walletEnabled, cardTypeEnum;
|
|
709
|
+
|
|
710
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
711
|
+
while (1) {
|
|
712
|
+
switch (_context3.prev = _context3.next) {
|
|
713
|
+
case 0:
|
|
714
|
+
// 判断是否有密码
|
|
715
|
+
_this2$store$paymode$ = _this2.store.paymode.currentMode, walletEnabled = _this2$store$paymode$.walletEnabled, cardTypeEnum = _this2$store$paymode$.cardTypeEnum;
|
|
716
|
+
|
|
717
|
+
if (cardTypeEnum === 'BALANCE_CARD' && !walletEnabled) {
|
|
718
|
+
_this2.setState({
|
|
719
|
+
showSetPwdModal: true,
|
|
720
|
+
btnDissabled: true
|
|
721
|
+
});
|
|
722
|
+
} else {
|
|
723
|
+
_this2.handleCzkData();
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
case 2:
|
|
727
|
+
case 'end':
|
|
728
|
+
return _context3.stop();
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
}, _callee3, _this3);
|
|
732
|
+
}));
|
|
733
|
+
|
|
734
|
+
return function (_x4) {
|
|
735
|
+
return _ref3.apply(this, arguments);
|
|
714
736
|
};
|
|
715
737
|
}();
|
|
716
738
|
|
|
@@ -722,7 +744,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
722
744
|
_this2.setState({
|
|
723
745
|
czkVisible: false,
|
|
724
746
|
storageValue: '0.00',
|
|
725
|
-
|
|
747
|
+
czkValue: null
|
|
726
748
|
});
|
|
727
749
|
_this2.closeRfCard();
|
|
728
750
|
_keyboard2.default.close();
|
|
@@ -735,23 +757,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
735
757
|
});
|
|
736
758
|
};
|
|
737
759
|
|
|
738
|
-
_this2.handleSetModal = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
739
|
-
var _this2$state, newPass, newPassConfirm, updataMemberInfo, result,
|
|
760
|
+
_this2.handleSetModal = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
|
761
|
+
var _this2$state, newPass, newPassConfirm, isInputMember, updataMemberInfo, result, cardTypeEnum, resp;
|
|
740
762
|
|
|
741
|
-
return _regenerator2.default.wrap(function
|
|
763
|
+
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
742
764
|
while (1) {
|
|
743
|
-
switch (
|
|
765
|
+
switch (_context4.prev = _context4.next) {
|
|
744
766
|
case 0:
|
|
745
|
-
_this2$state = _this2.state, newPass = _this2$state.newPass, newPassConfirm = _this2$state.newPassConfirm;
|
|
767
|
+
_this2$state = _this2.state, newPass = _this2$state.newPass, newPassConfirm = _this2$state.newPassConfirm, isInputMember = _this2$state.isInputMember;
|
|
746
768
|
updataMemberInfo = _this2.props.updataMemberInfo;
|
|
747
|
-
|
|
769
|
+
_context4.next = 4;
|
|
748
770
|
return _this2.store.queryPwd(newPass, newPassConfirm);
|
|
749
771
|
|
|
750
772
|
case 4:
|
|
751
|
-
result =
|
|
773
|
+
result = _context4.sent;
|
|
774
|
+
cardTypeEnum = _this2.store.paymode.currentMode.cardTypeEnum;
|
|
752
775
|
|
|
753
776
|
if (!result) {
|
|
754
|
-
|
|
777
|
+
_context4.next = 21;
|
|
755
778
|
break;
|
|
756
779
|
}
|
|
757
780
|
|
|
@@ -762,42 +785,55 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
762
785
|
newPassConfirm: ''
|
|
763
786
|
});
|
|
764
787
|
_message2.default.warn('设置成功');
|
|
765
|
-
|
|
766
|
-
|
|
788
|
+
_this2.handleCzkData();
|
|
767
789
|
setTimeout(function () {
|
|
768
|
-
if (
|
|
769
|
-
_this2.
|
|
770
|
-
|
|
771
|
-
if (_this2.inputCzkAmount && _this2.inputCzkAmount.input) {
|
|
772
|
-
_this2.inputCzkAmount.input.focus();
|
|
773
|
-
_this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
|
|
774
|
-
}
|
|
790
|
+
if (_this2.inputCzkAmount && _this2.inputCzkAmount.input) {
|
|
791
|
+
_this2.inputCzkAmount.input.focus();
|
|
792
|
+
_this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
|
|
775
793
|
}
|
|
776
794
|
}, 350);
|
|
777
795
|
_this2.connectRfCard();
|
|
778
|
-
|
|
796
|
+
|
|
797
|
+
if (!isInputMember) {
|
|
798
|
+
_context4.next = 19;
|
|
799
|
+
break;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
_context4.next = 15;
|
|
779
803
|
return _this2.store.updateMemberInfo(_this2.store);
|
|
780
804
|
|
|
781
|
-
case
|
|
782
|
-
resp =
|
|
805
|
+
case 15:
|
|
806
|
+
resp = _context4.sent;
|
|
783
807
|
|
|
784
808
|
updataMemberInfo(resp);
|
|
809
|
+
_context4.next = 20;
|
|
810
|
+
break;
|
|
785
811
|
|
|
786
|
-
case
|
|
812
|
+
case 19:
|
|
813
|
+
if (cardTypeEnum === 'BALANCE_CARD') {
|
|
814
|
+
_this2.store.updateCardInfo();
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
case 20:
|
|
818
|
+
_this2.setState({
|
|
819
|
+
isInputMember: false
|
|
820
|
+
});
|
|
821
|
+
|
|
822
|
+
case 21:
|
|
787
823
|
case 'end':
|
|
788
|
-
return
|
|
824
|
+
return _context4.stop();
|
|
789
825
|
}
|
|
790
826
|
}
|
|
791
|
-
},
|
|
827
|
+
}, _callee4, _this3);
|
|
792
828
|
}));
|
|
793
829
|
|
|
794
830
|
_this2.setPwdValue = function (field, value) {
|
|
795
831
|
_this2.setState((0, _defineProperty3.default)({}, field, value), function () {
|
|
796
|
-
var
|
|
797
|
-
|
|
798
|
-
newPass =
|
|
799
|
-
|
|
800
|
-
newPassConfirm =
|
|
832
|
+
var _ref5 = _this2.state || {},
|
|
833
|
+
_ref5$newPass = _ref5.newPass,
|
|
834
|
+
newPass = _ref5$newPass === undefined ? '' : _ref5$newPass,
|
|
835
|
+
_ref5$newPassConfirm = _ref5.newPassConfirm,
|
|
836
|
+
newPassConfirm = _ref5$newPassConfirm === undefined ? '' : _ref5$newPassConfirm;
|
|
801
837
|
|
|
802
838
|
if (newPassConfirm.length === 6 && newPass.length === 6 && newPass === newPassConfirm) {
|
|
803
839
|
_this2.setState({
|
|
@@ -808,15 +844,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
808
844
|
};
|
|
809
845
|
|
|
810
846
|
_this2.handleBlur = function (field) {
|
|
811
|
-
var
|
|
812
|
-
|
|
813
|
-
newPass =
|
|
814
|
-
|
|
815
|
-
newPassConfirm =
|
|
847
|
+
var _ref6 = _this2.state || {},
|
|
848
|
+
_ref6$newPass = _ref6.newPass,
|
|
849
|
+
newPass = _ref6$newPass === undefined ? '' : _ref6$newPass,
|
|
850
|
+
_ref6$newPassConfirm = _ref6.newPassConfirm,
|
|
851
|
+
newPassConfirm = _ref6$newPassConfirm === undefined ? '' : _ref6$newPassConfirm;
|
|
816
852
|
|
|
817
853
|
setTimeout(function () {
|
|
818
|
-
var
|
|
819
|
-
showSetPwdModal =
|
|
854
|
+
var _ref7 = _this2.state || {},
|
|
855
|
+
showSetPwdModal = _ref7.showSetPwdModal;
|
|
820
856
|
|
|
821
857
|
if (!showSetPwdModal) return;
|
|
822
858
|
if (field === 'newPass' && newPass.length < 6) {
|
|
@@ -873,8 +909,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
873
909
|
|
|
874
910
|
// TODO: 测试优惠券支付
|
|
875
911
|
|
|
876
|
-
var
|
|
877
|
-
isNewRetailBCPos =
|
|
912
|
+
var _ref8 = _mutantsUtil.platform || {},
|
|
913
|
+
isNewRetailBCPos = _ref8.isNewRetailBCPos;
|
|
878
914
|
|
|
879
915
|
if (isNewRetailBCPos && !_this2.store.paymode.currentMode.boriginReturn) {
|
|
880
916
|
_this2.store.getCouponList();
|
|
@@ -958,8 +994,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
958
994
|
};
|
|
959
995
|
|
|
960
996
|
_this2.checkOfflineEnable = function (paymode, key) {
|
|
961
|
-
var
|
|
962
|
-
paymodes =
|
|
997
|
+
var _ref9 = paymode || {},
|
|
998
|
+
paymodes = _ref9.paymodes;
|
|
963
999
|
|
|
964
1000
|
var isOffline = _mutantsMicrofx.stores.offlineSys.isOffline;
|
|
965
1001
|
|
|
@@ -991,6 +1027,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
991
1027
|
switch (key) {
|
|
992
1028
|
case PayStyle.hyczk:
|
|
993
1029
|
_this2.showCzkModal(-1);
|
|
1030
|
+
_this2.store.dto.Idmember && _this2.setState({
|
|
1031
|
+
isInputMember: true
|
|
1032
|
+
});
|
|
994
1033
|
break;
|
|
995
1034
|
case PayStyle.jfdx:
|
|
996
1035
|
_this2.showJfdxModal(-1);
|
|
@@ -1099,7 +1138,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1099
1138
|
boriginReturn = _this2$store3.boriginReturn;
|
|
1100
1139
|
var noAlreadyWarn = _this2.state.noAlreadyWarn;
|
|
1101
1140
|
|
|
1102
|
-
|
|
1103
1141
|
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(key)) return false;
|
|
1104
1142
|
|
|
1105
1143
|
if (_this2.checkModeDisabled(key, brefund, boriginReturn)) {
|
|
@@ -1169,12 +1207,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1169
1207
|
}
|
|
1170
1208
|
};
|
|
1171
1209
|
|
|
1172
|
-
_this2.setCurrentFocusAndAddPay = function (key) {
|
|
1210
|
+
_this2.setCurrentFocusAndAddPay = function (key, payId) {
|
|
1173
1211
|
_this2.store.changeFocusAndAddPay(key);
|
|
1174
1212
|
if (_this2.store.bquick) {
|
|
1175
1213
|
_this2.handleSettle("quickPay");
|
|
1176
1214
|
} else {
|
|
1177
|
-
_this2.setFocusAndSelection(key);
|
|
1215
|
+
_this2.setFocusAndSelection(key, payId);
|
|
1178
1216
|
}
|
|
1179
1217
|
};
|
|
1180
1218
|
|
|
@@ -1307,8 +1345,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1307
1345
|
return;
|
|
1308
1346
|
}
|
|
1309
1347
|
|
|
1310
|
-
var
|
|
1311
|
-
isNewRetailBCPos =
|
|
1348
|
+
var _ref10 = _mutantsUtil.platform || {},
|
|
1349
|
+
isNewRetailBCPos = _ref10.isNewRetailBCPos;
|
|
1312
1350
|
|
|
1313
1351
|
if (isNewRetailBCPos) {
|
|
1314
1352
|
_this2.store.paymode.calcDjqCheckValue(q, _this2.store.dto);
|
|
@@ -1343,27 +1381,31 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1343
1381
|
if (_this2.czkdebounced) {
|
|
1344
1382
|
return;
|
|
1345
1383
|
}
|
|
1346
|
-
_this2.czkdebounced = (0, _debounce3.default)((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1347
|
-
|
|
1384
|
+
_this2.czkdebounced = (0, _debounce3.default)((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1385
|
+
var _this2$store$paymode$2, cardTypeEnum, walletEnabled;
|
|
1386
|
+
|
|
1387
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1348
1388
|
while (1) {
|
|
1349
|
-
switch (
|
|
1389
|
+
switch (_context5.prev = _context5.next) {
|
|
1350
1390
|
case 0:
|
|
1351
|
-
|
|
1391
|
+
_context5.next = 2;
|
|
1352
1392
|
return _this2.store.loadCzk(v);
|
|
1353
1393
|
|
|
1354
1394
|
case 2:
|
|
1355
|
-
|
|
1395
|
+
_this2$store$paymode$2 = _this2.store.paymode.currentMode, cardTypeEnum = _this2$store$paymode$2.cardTypeEnum, walletEnabled = _this2$store$paymode$2.walletEnabled;
|
|
1396
|
+
|
|
1397
|
+
if (_this2.store.paymode.currentMode.storageCardNo) {
|
|
1356
1398
|
_this2.setState({
|
|
1357
|
-
czkValue: _this2.store.paymode.currentMode.
|
|
1399
|
+
czkValue: _this2.store.paymode.currentMode.storageCardNo
|
|
1358
1400
|
});
|
|
1359
1401
|
}
|
|
1360
1402
|
|
|
1361
|
-
case
|
|
1403
|
+
case 4:
|
|
1362
1404
|
case 'end':
|
|
1363
|
-
return
|
|
1405
|
+
return _context5.stop();
|
|
1364
1406
|
}
|
|
1365
1407
|
}
|
|
1366
|
-
},
|
|
1408
|
+
}, _callee5, _this3);
|
|
1367
1409
|
})), 1000, {
|
|
1368
1410
|
'leading': true,
|
|
1369
1411
|
'trailing': false
|
|
@@ -1531,13 +1573,21 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1531
1573
|
return null;
|
|
1532
1574
|
};
|
|
1533
1575
|
|
|
1534
|
-
_this2.setFocusAndSelection = function (key) {
|
|
1576
|
+
_this2.setFocusAndSelection = function (key, payId) {
|
|
1535
1577
|
var that = _this2;
|
|
1536
1578
|
var paymode = _this2.store.paymode;
|
|
1537
1579
|
|
|
1580
|
+
var _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(),
|
|
1581
|
+
PayStyle = _enumController$getEn19.PayStyle;
|
|
1582
|
+
|
|
1538
1583
|
var themode = (0, _find3.default)(paymode.thePaymodes, function (mode) {
|
|
1539
1584
|
return mode.paymentType === key;
|
|
1540
1585
|
});
|
|
1586
|
+
if (key === PayStyle.hyczk) {
|
|
1587
|
+
themode = (0, _find3.default)(paymode.thePaymodes, function (mode) {
|
|
1588
|
+
return mode.paymethodId === payId;
|
|
1589
|
+
});
|
|
1590
|
+
}
|
|
1541
1591
|
var index = themode && themode.paymethodId || -1;
|
|
1542
1592
|
if (index !== -1) {
|
|
1543
1593
|
setTimeout(function () {
|
|
@@ -1552,11 +1602,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1552
1602
|
}
|
|
1553
1603
|
};
|
|
1554
1604
|
|
|
1555
|
-
_this2.settleUnReturn = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1605
|
+
_this2.settleUnReturn = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7() {
|
|
1556
1606
|
var that;
|
|
1557
|
-
return _regenerator2.default.wrap(function
|
|
1607
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1558
1608
|
while (1) {
|
|
1559
|
-
switch (
|
|
1609
|
+
switch (_context7.prev = _context7.next) {
|
|
1560
1610
|
case 0:
|
|
1561
1611
|
that = _this2;
|
|
1562
1612
|
|
|
@@ -1579,18 +1629,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1579
1629
|
onOk: function onOk() {
|
|
1580
1630
|
var _this4 = this;
|
|
1581
1631
|
|
|
1582
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1632
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
|
|
1583
1633
|
var result;
|
|
1584
|
-
return _regenerator2.default.wrap(function
|
|
1634
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1585
1635
|
while (1) {
|
|
1586
|
-
switch (
|
|
1636
|
+
switch (_context6.prev = _context6.next) {
|
|
1587
1637
|
case 0:
|
|
1588
1638
|
window.__queryingModal = (0, _utils.openQueryingModal)();
|
|
1589
|
-
|
|
1639
|
+
_context6.next = 3;
|
|
1590
1640
|
return that.store.querySettleResult();
|
|
1591
1641
|
|
|
1592
1642
|
case 3:
|
|
1593
|
-
result =
|
|
1643
|
+
result = _context6.sent;
|
|
1594
1644
|
|
|
1595
1645
|
setTimeout(function () {
|
|
1596
1646
|
if (window.__queryingModal) {
|
|
@@ -1598,34 +1648,34 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1598
1648
|
window.__queryingModal = null;
|
|
1599
1649
|
}
|
|
1600
1650
|
}, 0);
|
|
1601
|
-
|
|
1602
|
-
|
|
1651
|
+
_context6.t0 = result.Flag;
|
|
1652
|
+
_context6.next = _context6.t0 === "0" ? 8 : _context6.t0 === "1" ? 11 : _context6.t0 === "2" ? 13 : 15;
|
|
1603
1653
|
break;
|
|
1604
1654
|
|
|
1605
1655
|
case 8:
|
|
1606
1656
|
//成功
|
|
1607
1657
|
that.store.setDtoID(result.ID);
|
|
1608
1658
|
that.settleSuccess();
|
|
1609
|
-
return
|
|
1659
|
+
return _context6.abrupt('break', 15);
|
|
1610
1660
|
|
|
1611
1661
|
case 11:
|
|
1612
1662
|
//处理中
|
|
1613
1663
|
that.settleUnReturn();
|
|
1614
1664
|
// Message.info("结算正在处理中,请稍后再次查询。");
|
|
1615
|
-
return
|
|
1665
|
+
return _context6.abrupt('break', 15);
|
|
1616
1666
|
|
|
1617
1667
|
case 13:
|
|
1618
1668
|
//失败
|
|
1619
1669
|
_message2.default.info('\u7ED3\u7B97\u5931\u8D25\uFF0C\u539F\u56E0:' + result.Message + '\u3002');
|
|
1620
1670
|
// that.settleCanceled();
|
|
1621
|
-
return
|
|
1671
|
+
return _context6.abrupt('break', 15);
|
|
1622
1672
|
|
|
1623
1673
|
case 15:
|
|
1624
1674
|
case 'end':
|
|
1625
|
-
return
|
|
1675
|
+
return _context6.stop();
|
|
1626
1676
|
}
|
|
1627
1677
|
}
|
|
1628
|
-
},
|
|
1678
|
+
}, _callee6, _this4);
|
|
1629
1679
|
}))();
|
|
1630
1680
|
},
|
|
1631
1681
|
onCancel: function onCancel() {
|
|
@@ -1635,10 +1685,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1635
1685
|
|
|
1636
1686
|
case 2:
|
|
1637
1687
|
case 'end':
|
|
1638
|
-
return
|
|
1688
|
+
return _context7.stop();
|
|
1639
1689
|
}
|
|
1640
1690
|
}
|
|
1641
|
-
},
|
|
1691
|
+
}, _callee7, _this3);
|
|
1642
1692
|
}));
|
|
1643
1693
|
|
|
1644
1694
|
_this2.settleCanceled = function () {
|
|
@@ -1647,15 +1697,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1647
1697
|
_this2.cancelState();
|
|
1648
1698
|
};
|
|
1649
1699
|
|
|
1650
|
-
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1651
|
-
var _enumController$
|
|
1700
|
+
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
|
1701
|
+
var _enumController$getEn20, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, getSettleGift, type, resp1;
|
|
1652
1702
|
|
|
1653
|
-
return _regenerator2.default.wrap(function
|
|
1703
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1654
1704
|
while (1) {
|
|
1655
|
-
switch (
|
|
1705
|
+
switch (_context8.prev = _context8.next) {
|
|
1656
1706
|
case 0:
|
|
1657
1707
|
//提示成功
|
|
1658
|
-
_enumController$
|
|
1708
|
+
_enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn20.PayStyle;
|
|
1659
1709
|
_this2$store$paymode = _this2.store.paymode, amount = _this2$store$paymode.amount, received = _this2$store$paymode.received, thePaymodes = _this2$store$paymode.thePaymodes;
|
|
1660
1710
|
IdbusiType = _this2.store.dto.IdbusiType;
|
|
1661
1711
|
charge = _this2.store.paymode.charge;
|
|
@@ -1713,22 +1763,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1713
1763
|
resp1 = false;
|
|
1714
1764
|
|
|
1715
1765
|
if (!(type !== 1)) {
|
|
1716
|
-
|
|
1766
|
+
_context8.next = 20;
|
|
1717
1767
|
break;
|
|
1718
1768
|
}
|
|
1719
1769
|
|
|
1720
|
-
|
|
1721
|
-
|
|
1770
|
+
_context8.prev = 11;
|
|
1771
|
+
_context8.next = 14;
|
|
1722
1772
|
return getSettleGift();
|
|
1723
1773
|
|
|
1724
1774
|
case 14:
|
|
1725
|
-
resp1 =
|
|
1726
|
-
|
|
1775
|
+
resp1 = _context8.sent;
|
|
1776
|
+
_context8.next = 20;
|
|
1727
1777
|
break;
|
|
1728
1778
|
|
|
1729
1779
|
case 17:
|
|
1730
|
-
|
|
1731
|
-
|
|
1780
|
+
_context8.prev = 17;
|
|
1781
|
+
_context8.t0 = _context8['catch'](11);
|
|
1732
1782
|
|
|
1733
1783
|
console.log("获取支付礼包getSettleGift失败");
|
|
1734
1784
|
|
|
@@ -1766,23 +1816,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1766
1816
|
|
|
1767
1817
|
case 21:
|
|
1768
1818
|
case 'end':
|
|
1769
|
-
return
|
|
1819
|
+
return _context8.stop();
|
|
1770
1820
|
}
|
|
1771
1821
|
}
|
|
1772
|
-
},
|
|
1822
|
+
}, _callee8, _this3, [[11, 17]]);
|
|
1773
1823
|
}));
|
|
1774
1824
|
|
|
1775
1825
|
_this2.handleGuestShow = function (dtype, value) {
|
|
1776
1826
|
if (_this2.hasElectron === false) return;
|
|
1777
1827
|
var dt = _mutantsMicrofx.localStore.get('portsetting_hardSet') || [];
|
|
1778
1828
|
|
|
1779
|
-
var
|
|
1780
|
-
guestshow_enable =
|
|
1781
|
-
guestshow_clear =
|
|
1782
|
-
guestshow_welcome =
|
|
1783
|
-
guestshow_collect =
|
|
1784
|
-
guestshow_refund =
|
|
1785
|
-
guestshow_change =
|
|
1829
|
+
var _ref14 = dt || {},
|
|
1830
|
+
guestshow_enable = _ref14.guestshow_enable,
|
|
1831
|
+
guestshow_clear = _ref14.guestshow_clear,
|
|
1832
|
+
guestshow_welcome = _ref14.guestshow_welcome,
|
|
1833
|
+
guestshow_collect = _ref14.guestshow_collect,
|
|
1834
|
+
guestshow_refund = _ref14.guestshow_refund,
|
|
1835
|
+
guestshow_change = _ref14.guestshow_change;
|
|
1786
1836
|
|
|
1787
1837
|
var hasSuccess = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('portsetting_hardSet_isSuccess');
|
|
1788
1838
|
if (!guestshow_enable || !!guestshow_enable && hasSuccess == '0') return;
|
|
@@ -1817,108 +1867,108 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1817
1867
|
};
|
|
1818
1868
|
|
|
1819
1869
|
_this2.handleSettle = function () {
|
|
1820
|
-
var
|
|
1870
|
+
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(args) {
|
|
1821
1871
|
var handleUserInputs = function () {
|
|
1822
|
-
var
|
|
1872
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(promises) {
|
|
1823
1873
|
var results, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, p, _result;
|
|
1824
1874
|
|
|
1825
|
-
return _regenerator2.default.wrap(function
|
|
1875
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
1826
1876
|
while (1) {
|
|
1827
|
-
switch (
|
|
1877
|
+
switch (_context10.prev = _context10.next) {
|
|
1828
1878
|
case 0:
|
|
1829
1879
|
results = [];
|
|
1830
|
-
|
|
1880
|
+
_context10.prev = 1;
|
|
1831
1881
|
_iteratorNormalCompletion = true;
|
|
1832
1882
|
_didIteratorError = false;
|
|
1833
1883
|
_iteratorError = undefined;
|
|
1834
|
-
|
|
1884
|
+
_context10.prev = 5;
|
|
1835
1885
|
_iterator = (0, _getIterator3.default)(promises);
|
|
1836
1886
|
|
|
1837
1887
|
case 7:
|
|
1838
1888
|
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
|
|
1839
|
-
|
|
1889
|
+
_context10.next = 16;
|
|
1840
1890
|
break;
|
|
1841
1891
|
}
|
|
1842
1892
|
|
|
1843
1893
|
p = _step.value;
|
|
1844
|
-
|
|
1894
|
+
_context10.next = 11;
|
|
1845
1895
|
return p;
|
|
1846
1896
|
|
|
1847
1897
|
case 11:
|
|
1848
|
-
_result =
|
|
1898
|
+
_result = _context10.sent;
|
|
1849
1899
|
|
|
1850
1900
|
results.push(_result);
|
|
1851
1901
|
|
|
1852
1902
|
case 13:
|
|
1853
1903
|
_iteratorNormalCompletion = true;
|
|
1854
|
-
|
|
1904
|
+
_context10.next = 7;
|
|
1855
1905
|
break;
|
|
1856
1906
|
|
|
1857
1907
|
case 16:
|
|
1858
|
-
|
|
1908
|
+
_context10.next = 22;
|
|
1859
1909
|
break;
|
|
1860
1910
|
|
|
1861
1911
|
case 18:
|
|
1862
|
-
|
|
1863
|
-
|
|
1912
|
+
_context10.prev = 18;
|
|
1913
|
+
_context10.t0 = _context10['catch'](5);
|
|
1864
1914
|
_didIteratorError = true;
|
|
1865
|
-
_iteratorError =
|
|
1915
|
+
_iteratorError = _context10.t0;
|
|
1866
1916
|
|
|
1867
1917
|
case 22:
|
|
1868
|
-
|
|
1869
|
-
|
|
1918
|
+
_context10.prev = 22;
|
|
1919
|
+
_context10.prev = 23;
|
|
1870
1920
|
|
|
1871
1921
|
if (!_iteratorNormalCompletion && _iterator.return) {
|
|
1872
1922
|
_iterator.return();
|
|
1873
1923
|
}
|
|
1874
1924
|
|
|
1875
1925
|
case 25:
|
|
1876
|
-
|
|
1926
|
+
_context10.prev = 25;
|
|
1877
1927
|
|
|
1878
1928
|
if (!_didIteratorError) {
|
|
1879
|
-
|
|
1929
|
+
_context10.next = 28;
|
|
1880
1930
|
break;
|
|
1881
1931
|
}
|
|
1882
1932
|
|
|
1883
1933
|
throw _iteratorError;
|
|
1884
1934
|
|
|
1885
1935
|
case 28:
|
|
1886
|
-
return
|
|
1936
|
+
return _context10.finish(25);
|
|
1887
1937
|
|
|
1888
1938
|
case 29:
|
|
1889
|
-
return
|
|
1939
|
+
return _context10.finish(22);
|
|
1890
1940
|
|
|
1891
1941
|
case 30:
|
|
1892
1942
|
window.__loadingModal = (0, _utils.openLoadingModal)();
|
|
1893
|
-
|
|
1943
|
+
_context10.next = 33;
|
|
1894
1944
|
return commit(results);
|
|
1895
1945
|
|
|
1896
1946
|
case 33:
|
|
1897
|
-
|
|
1947
|
+
_context10.next = 37;
|
|
1898
1948
|
break;
|
|
1899
1949
|
|
|
1900
1950
|
case 35:
|
|
1901
|
-
|
|
1902
|
-
|
|
1951
|
+
_context10.prev = 35;
|
|
1952
|
+
_context10.t1 = _context10['catch'](1);
|
|
1903
1953
|
|
|
1904
1954
|
case 37:
|
|
1905
1955
|
case 'end':
|
|
1906
|
-
return
|
|
1956
|
+
return _context10.stop();
|
|
1907
1957
|
}
|
|
1908
1958
|
}
|
|
1909
|
-
},
|
|
1959
|
+
}, _callee10, this, [[1, 35], [5, 18, 22, 30], [23,, 25, 29]]);
|
|
1910
1960
|
}));
|
|
1911
1961
|
|
|
1912
|
-
return function handleUserInputs(
|
|
1913
|
-
return
|
|
1962
|
+
return function handleUserInputs(_x7) {
|
|
1963
|
+
return _ref17.apply(this, arguments);
|
|
1914
1964
|
};
|
|
1915
1965
|
}();
|
|
1916
1966
|
|
|
1917
|
-
var _enumController$
|
|
1967
|
+
var _enumController$getEn21, PayStyle, _this2$store6, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
|
|
1918
1968
|
|
|
1919
|
-
return _regenerator2.default.wrap(function
|
|
1969
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
1920
1970
|
while (1) {
|
|
1921
|
-
switch (
|
|
1971
|
+
switch (_context11.prev = _context11.next) {
|
|
1922
1972
|
case 0:
|
|
1923
1973
|
_this2.setState({
|
|
1924
1974
|
settleDisabled: true
|
|
@@ -1934,7 +1984,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1934
1984
|
// }
|
|
1935
1985
|
//
|
|
1936
1986
|
// testAsync(p);
|
|
1937
|
-
_enumController$
|
|
1987
|
+
_enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn21.PayStyle;
|
|
1938
1988
|
_this2$store6 = _this2.store, paymode = _this2$store6.paymode, brefund = _this2$store6.brefund, boriginReturn = _this2$store6.boriginReturn, newStyle = _this2$store6.newStyle;
|
|
1939
1989
|
isQuickPay = args === 'quickPay';
|
|
1940
1990
|
that = _this2;
|
|
@@ -1950,7 +2000,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1950
2000
|
});
|
|
1951
2001
|
|
|
1952
2002
|
if (!(that.checkCharge() && Math.abs(paymode.receivable) > that.props.initData("posChangeUpperAmount"))) {
|
|
1953
|
-
|
|
2003
|
+
_context11.next = 13;
|
|
1954
2004
|
break;
|
|
1955
2005
|
}
|
|
1956
2006
|
|
|
@@ -1958,11 +2008,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1958
2008
|
_this2.setState({
|
|
1959
2009
|
settleDisabled: false
|
|
1960
2010
|
});
|
|
1961
|
-
return
|
|
2011
|
+
return _context11.abrupt('return');
|
|
1962
2012
|
|
|
1963
2013
|
case 13:
|
|
1964
2014
|
if (!(args !== "zero" && !newStyle)) {
|
|
1965
|
-
|
|
2015
|
+
_context11.next = 19;
|
|
1966
2016
|
break;
|
|
1967
2017
|
}
|
|
1968
2018
|
|
|
@@ -1971,7 +2021,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1971
2021
|
});
|
|
1972
2022
|
|
|
1973
2023
|
if (!zeromode) {
|
|
1974
|
-
|
|
2024
|
+
_context11.next = 19;
|
|
1975
2025
|
break;
|
|
1976
2026
|
}
|
|
1977
2027
|
|
|
@@ -1979,7 +2029,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1979
2029
|
settleDisabled: false
|
|
1980
2030
|
});
|
|
1981
2031
|
_message2.default.error(zeromode.name + ' 的结算金额为零,不可以结算。');
|
|
1982
|
-
return
|
|
2032
|
+
return _context11.abrupt('return');
|
|
1983
2033
|
|
|
1984
2034
|
case 19:
|
|
1985
2035
|
promises = [];
|
|
@@ -1988,14 +2038,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1988
2038
|
}) : paymode.thePaymodes, 'orderBy');
|
|
1989
2039
|
|
|
1990
2040
|
if (!isQuickPay) {
|
|
1991
|
-
|
|
2041
|
+
_context11.next = 27;
|
|
1992
2042
|
break;
|
|
1993
2043
|
}
|
|
1994
2044
|
|
|
1995
2045
|
quickmode = thePaymodes[0];
|
|
1996
2046
|
|
|
1997
2047
|
if (!_this2.checkModeDisabled(quickmode.paymentType, brefund, boriginReturn)) {
|
|
1998
|
-
|
|
2048
|
+
_context11.next = 27;
|
|
1999
2049
|
break;
|
|
2000
2050
|
}
|
|
2001
2051
|
|
|
@@ -2003,7 +2053,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2003
2053
|
settleDisabled: false
|
|
2004
2054
|
});
|
|
2005
2055
|
_message2.default.error('退款不能使用' + quickmode.name + '结算,请使用其他结算方式!');
|
|
2006
|
-
return
|
|
2056
|
+
return _context11.abrupt('return');
|
|
2007
2057
|
|
|
2008
2058
|
case 27:
|
|
2009
2059
|
(0, _forEach3.default)(thePaymodes, function (mode) {
|
|
@@ -2013,27 +2063,27 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2013
2063
|
});
|
|
2014
2064
|
|
|
2015
2065
|
commit = function () {
|
|
2016
|
-
var
|
|
2066
|
+
var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(values) {
|
|
2017
2067
|
var result;
|
|
2018
|
-
return _regenerator2.default.wrap(function
|
|
2068
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
2019
2069
|
while (1) {
|
|
2020
|
-
switch (
|
|
2070
|
+
switch (_context9.prev = _context9.next) {
|
|
2021
2071
|
case 0:
|
|
2022
|
-
|
|
2072
|
+
_context9.next = 2;
|
|
2023
2073
|
return _this2.store.commit(_this2.props.bTest);
|
|
2024
2074
|
|
|
2025
2075
|
case 2:
|
|
2026
|
-
result =
|
|
2076
|
+
result = _context9.sent;
|
|
2027
2077
|
|
|
2028
2078
|
if (!(result === true)) {
|
|
2029
|
-
|
|
2079
|
+
_context9.next = 8;
|
|
2030
2080
|
break;
|
|
2031
2081
|
}
|
|
2032
2082
|
|
|
2033
2083
|
//成功
|
|
2034
2084
|
that.settleSuccess();
|
|
2035
2085
|
_promise2.default.resolve();
|
|
2036
|
-
|
|
2086
|
+
_context9.next = 23;
|
|
2037
2087
|
break;
|
|
2038
2088
|
|
|
2039
2089
|
case 8:
|
|
@@ -2050,24 +2100,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2050
2100
|
}, 0);
|
|
2051
2101
|
|
|
2052
2102
|
if (!(result && (result.Code || result.code))) {
|
|
2053
|
-
|
|
2103
|
+
_context9.next = 20;
|
|
2054
2104
|
break;
|
|
2055
2105
|
}
|
|
2056
2106
|
|
|
2057
|
-
|
|
2058
|
-
|
|
2107
|
+
_context9.t0 = result.Code || result.code;
|
|
2108
|
+
_context9.next = _context9.t0 === 'RE_Settle_UnReturn' ? 14 : _context9.t0 === 'ECONNABORTED' ? 18 : 20;
|
|
2059
2109
|
break;
|
|
2060
2110
|
|
|
2061
2111
|
case 14:
|
|
2062
2112
|
console.log('settlement--RE_Settle_UnReturn--调用清除数据==Focus==');
|
|
2063
2113
|
_this2.props.clearVoucherData && _this2.props.clearVoucherData();
|
|
2064
2114
|
_this2.cancelState();
|
|
2065
|
-
return
|
|
2115
|
+
return _context9.abrupt('break', 20);
|
|
2066
2116
|
|
|
2067
2117
|
case 18:
|
|
2068
2118
|
//error.code === 'ECONNABORTED' && error.message.indexOf('timeout')
|
|
2069
2119
|
result.message.indexOf('timeout') > -1 && that.settleUnReturn();
|
|
2070
|
-
return
|
|
2120
|
+
return _context9.abrupt('break', 20);
|
|
2071
2121
|
|
|
2072
2122
|
case 20:
|
|
2073
2123
|
if (isQuickPay) {
|
|
@@ -2075,19 +2125,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2075
2125
|
that.cancelState();
|
|
2076
2126
|
}
|
|
2077
2127
|
|
|
2078
|
-
|
|
2128
|
+
_context9.next = 23;
|
|
2079
2129
|
return _promise2.default.reject();
|
|
2080
2130
|
|
|
2081
2131
|
case 23:
|
|
2082
2132
|
case 'end':
|
|
2083
|
-
return
|
|
2133
|
+
return _context9.stop();
|
|
2084
2134
|
}
|
|
2085
2135
|
}
|
|
2086
|
-
},
|
|
2136
|
+
}, _callee9, _this3);
|
|
2087
2137
|
}));
|
|
2088
2138
|
|
|
2089
|
-
return function commit(
|
|
2090
|
-
return
|
|
2139
|
+
return function commit(_x6) {
|
|
2140
|
+
return _ref16.apply(this, arguments);
|
|
2091
2141
|
};
|
|
2092
2142
|
}();
|
|
2093
2143
|
|
|
@@ -2095,102 +2145,102 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2095
2145
|
|
|
2096
2146
|
case 30:
|
|
2097
2147
|
case 'end':
|
|
2098
|
-
return
|
|
2148
|
+
return _context11.stop();
|
|
2099
2149
|
}
|
|
2100
2150
|
}
|
|
2101
|
-
},
|
|
2151
|
+
}, _callee11, _this3);
|
|
2102
2152
|
}));
|
|
2103
2153
|
|
|
2104
|
-
return function (
|
|
2105
|
-
return
|
|
2154
|
+
return function (_x5) {
|
|
2155
|
+
return _ref15.apply(this, arguments);
|
|
2106
2156
|
};
|
|
2107
2157
|
}();
|
|
2108
2158
|
|
|
2109
|
-
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
2159
|
+
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
|
|
2110
2160
|
var handleUserInputs = function () {
|
|
2111
|
-
var
|
|
2161
|
+
var _ref21 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(promises) {
|
|
2112
2162
|
var results, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, p, _result2;
|
|
2113
2163
|
|
|
2114
|
-
return _regenerator2.default.wrap(function
|
|
2164
|
+
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
|
2115
2165
|
while (1) {
|
|
2116
|
-
switch (
|
|
2166
|
+
switch (_context13.prev = _context13.next) {
|
|
2117
2167
|
case 0:
|
|
2118
2168
|
results = [];
|
|
2119
|
-
|
|
2169
|
+
_context13.prev = 1;
|
|
2120
2170
|
_iteratorNormalCompletion2 = true;
|
|
2121
2171
|
_didIteratorError2 = false;
|
|
2122
2172
|
_iteratorError2 = undefined;
|
|
2123
|
-
|
|
2173
|
+
_context13.prev = 5;
|
|
2124
2174
|
_iterator2 = (0, _getIterator3.default)(promises);
|
|
2125
2175
|
|
|
2126
2176
|
case 7:
|
|
2127
2177
|
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {
|
|
2128
|
-
|
|
2178
|
+
_context13.next = 16;
|
|
2129
2179
|
break;
|
|
2130
2180
|
}
|
|
2131
2181
|
|
|
2132
2182
|
p = _step2.value;
|
|
2133
|
-
|
|
2183
|
+
_context13.next = 11;
|
|
2134
2184
|
return p;
|
|
2135
2185
|
|
|
2136
2186
|
case 11:
|
|
2137
|
-
_result2 =
|
|
2187
|
+
_result2 = _context13.sent;
|
|
2138
2188
|
|
|
2139
2189
|
results.push(_result2);
|
|
2140
2190
|
|
|
2141
2191
|
case 13:
|
|
2142
2192
|
_iteratorNormalCompletion2 = true;
|
|
2143
|
-
|
|
2193
|
+
_context13.next = 7;
|
|
2144
2194
|
break;
|
|
2145
2195
|
|
|
2146
2196
|
case 16:
|
|
2147
|
-
|
|
2197
|
+
_context13.next = 22;
|
|
2148
2198
|
break;
|
|
2149
2199
|
|
|
2150
2200
|
case 18:
|
|
2151
|
-
|
|
2152
|
-
|
|
2201
|
+
_context13.prev = 18;
|
|
2202
|
+
_context13.t0 = _context13['catch'](5);
|
|
2153
2203
|
_didIteratorError2 = true;
|
|
2154
|
-
_iteratorError2 =
|
|
2204
|
+
_iteratorError2 = _context13.t0;
|
|
2155
2205
|
|
|
2156
2206
|
case 22:
|
|
2157
|
-
|
|
2158
|
-
|
|
2207
|
+
_context13.prev = 22;
|
|
2208
|
+
_context13.prev = 23;
|
|
2159
2209
|
|
|
2160
2210
|
if (!_iteratorNormalCompletion2 && _iterator2.return) {
|
|
2161
2211
|
_iterator2.return();
|
|
2162
2212
|
}
|
|
2163
2213
|
|
|
2164
2214
|
case 25:
|
|
2165
|
-
|
|
2215
|
+
_context13.prev = 25;
|
|
2166
2216
|
|
|
2167
2217
|
if (!_didIteratorError2) {
|
|
2168
|
-
|
|
2218
|
+
_context13.next = 28;
|
|
2169
2219
|
break;
|
|
2170
2220
|
}
|
|
2171
2221
|
|
|
2172
2222
|
throw _iteratorError2;
|
|
2173
2223
|
|
|
2174
2224
|
case 28:
|
|
2175
|
-
return
|
|
2225
|
+
return _context13.finish(25);
|
|
2176
2226
|
|
|
2177
2227
|
case 29:
|
|
2178
|
-
return
|
|
2228
|
+
return _context13.finish(22);
|
|
2179
2229
|
|
|
2180
2230
|
case 30:
|
|
2181
|
-
|
|
2231
|
+
_context13.next = 32;
|
|
2182
2232
|
return commit(results);
|
|
2183
2233
|
|
|
2184
2234
|
case 32:
|
|
2185
|
-
|
|
2235
|
+
_context13.next = 37;
|
|
2186
2236
|
break;
|
|
2187
2237
|
|
|
2188
2238
|
case 34:
|
|
2189
|
-
|
|
2190
|
-
|
|
2239
|
+
_context13.prev = 34;
|
|
2240
|
+
_context13.t1 = _context13['catch'](1);
|
|
2191
2241
|
|
|
2192
|
-
if (
|
|
2193
|
-
_message2.default.error(
|
|
2242
|
+
if (_context13.t1 != "cancelpwd") {
|
|
2243
|
+
_message2.default.error(_context13.t1);
|
|
2194
2244
|
setTimeout(function () {
|
|
2195
2245
|
that.handleCzk();
|
|
2196
2246
|
}, 500);
|
|
@@ -2198,36 +2248,34 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2198
2248
|
|
|
2199
2249
|
case 37:
|
|
2200
2250
|
case 'end':
|
|
2201
|
-
return
|
|
2251
|
+
return _context13.stop();
|
|
2202
2252
|
}
|
|
2203
2253
|
}
|
|
2204
|
-
},
|
|
2254
|
+
}, _callee13, this, [[1, 34], [5, 18, 22, 30], [23,, 25, 29]]);
|
|
2205
2255
|
}));
|
|
2206
2256
|
|
|
2207
|
-
return function handleUserInputs(
|
|
2208
|
-
return
|
|
2257
|
+
return function handleUserInputs(_x9) {
|
|
2258
|
+
return _ref21.apply(this, arguments);
|
|
2209
2259
|
};
|
|
2210
2260
|
}();
|
|
2211
2261
|
|
|
2212
|
-
var that, curmode, promises,
|
|
2262
|
+
var that, curmode, promises, _ref19, isNewRetailBCPos, _enumController$getEn22, PayStyle, commit;
|
|
2213
2263
|
|
|
2214
|
-
return _regenerator2.default.wrap(function
|
|
2264
|
+
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
|
2215
2265
|
while (1) {
|
|
2216
|
-
switch (
|
|
2266
|
+
switch (_context14.prev = _context14.next) {
|
|
2217
2267
|
case 0:
|
|
2218
2268
|
that = _this2;
|
|
2219
2269
|
curmode = _this2.store.paymode.currentMode;
|
|
2220
2270
|
promises = [];
|
|
2221
|
-
|
|
2271
|
+
_ref19 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref19.isNewRetailBCPos;
|
|
2222
2272
|
|
|
2223
2273
|
if (isNewRetailBCPos) {
|
|
2224
2274
|
if (curmode.value > 0) {
|
|
2225
|
-
_enumController$
|
|
2275
|
+
_enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn22.PayStyle;
|
|
2226
2276
|
|
|
2227
2277
|
if (curmode.paymentType === PayStyle.hyczk) {
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
if (isNeedPasswordForStoragePay) {
|
|
2278
|
+
if (curmode.cardTypeEnum === 'BALANCE_CARD' || curmode.isNeedPassword) {
|
|
2231
2279
|
promises.push(that.inputPwd(curmode));
|
|
2232
2280
|
}
|
|
2233
2281
|
}
|
|
@@ -2239,57 +2287,57 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2239
2287
|
}
|
|
2240
2288
|
|
|
2241
2289
|
commit = function () {
|
|
2242
|
-
var
|
|
2290
|
+
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(values) {
|
|
2243
2291
|
var result;
|
|
2244
|
-
return _regenerator2.default.wrap(function
|
|
2292
|
+
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
|
2245
2293
|
while (1) {
|
|
2246
|
-
switch (
|
|
2294
|
+
switch (_context12.prev = _context12.next) {
|
|
2247
2295
|
case 0:
|
|
2248
2296
|
if (!(values.length > 0)) {
|
|
2249
|
-
|
|
2297
|
+
_context12.next = 6;
|
|
2250
2298
|
break;
|
|
2251
2299
|
}
|
|
2252
2300
|
|
|
2253
|
-
|
|
2301
|
+
_context12.next = 3;
|
|
2254
2302
|
return that.store.validePwd(values[0]);
|
|
2255
2303
|
|
|
2256
2304
|
case 3:
|
|
2257
|
-
|
|
2258
|
-
|
|
2305
|
+
_context12.t0 = _context12.sent;
|
|
2306
|
+
_context12.next = 7;
|
|
2259
2307
|
break;
|
|
2260
2308
|
|
|
2261
2309
|
case 6:
|
|
2262
|
-
|
|
2310
|
+
_context12.t0 = "";
|
|
2263
2311
|
|
|
2264
2312
|
case 7:
|
|
2265
|
-
result =
|
|
2313
|
+
result = _context12.t0;
|
|
2266
2314
|
|
|
2267
2315
|
if (!(result == "")) {
|
|
2268
|
-
|
|
2316
|
+
_context12.next = 13;
|
|
2269
2317
|
break;
|
|
2270
2318
|
}
|
|
2271
2319
|
|
|
2272
2320
|
//成功
|
|
2273
2321
|
//返回
|
|
2274
|
-
that.setCurrentFocusAndAddPay(curmode.paymentType);
|
|
2322
|
+
that.setCurrentFocusAndAddPay(curmode.paymentType, curmode.paymethodId);
|
|
2275
2323
|
_promise2.default.resolve();
|
|
2276
|
-
|
|
2324
|
+
_context12.next = 15;
|
|
2277
2325
|
break;
|
|
2278
2326
|
|
|
2279
2327
|
case 13:
|
|
2280
|
-
|
|
2328
|
+
_context12.next = 15;
|
|
2281
2329
|
return _promise2.default.reject(result);
|
|
2282
2330
|
|
|
2283
2331
|
case 15:
|
|
2284
2332
|
case 'end':
|
|
2285
|
-
return
|
|
2333
|
+
return _context12.stop();
|
|
2286
2334
|
}
|
|
2287
2335
|
}
|
|
2288
|
-
},
|
|
2336
|
+
}, _callee12, _this3);
|
|
2289
2337
|
}));
|
|
2290
2338
|
|
|
2291
|
-
return function commit(
|
|
2292
|
-
return
|
|
2339
|
+
return function commit(_x8) {
|
|
2340
|
+
return _ref20.apply(this, arguments);
|
|
2293
2341
|
};
|
|
2294
2342
|
}();
|
|
2295
2343
|
|
|
@@ -2297,10 +2345,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2297
2345
|
|
|
2298
2346
|
case 7:
|
|
2299
2347
|
case 'end':
|
|
2300
|
-
return
|
|
2348
|
+
return _context14.stop();
|
|
2301
2349
|
}
|
|
2302
2350
|
}
|
|
2303
|
-
},
|
|
2351
|
+
}, _callee14, _this3);
|
|
2304
2352
|
}));
|
|
2305
2353
|
|
|
2306
2354
|
_this2.fKeyboardOnOk = function (paymethodeId) {
|
|
@@ -2340,15 +2388,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2340
2388
|
};
|
|
2341
2389
|
|
|
2342
2390
|
_this2.inputPwd = function () {
|
|
2343
|
-
var
|
|
2391
|
+
var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(paymode) {
|
|
2344
2392
|
var that, confirmPwd;
|
|
2345
|
-
return _regenerator2.default.wrap(function
|
|
2393
|
+
return _regenerator2.default.wrap(function _callee15$(_context15) {
|
|
2346
2394
|
while (1) {
|
|
2347
|
-
switch (
|
|
2395
|
+
switch (_context15.prev = _context15.next) {
|
|
2348
2396
|
case 0:
|
|
2349
2397
|
that = _this2;
|
|
2350
2398
|
confirmPwd = _this2.state.confirmPwd;
|
|
2351
|
-
return
|
|
2399
|
+
return _context15.abrupt('return', new _promise2.default(function (resolve, reject) {
|
|
2352
2400
|
var modal = (0, _asyncModal2.default)({
|
|
2353
2401
|
onPressEnter: function onPressEnter() {
|
|
2354
2402
|
_keyboard2.default.close();
|
|
@@ -2356,8 +2404,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2356
2404
|
// if (v !== '') {
|
|
2357
2405
|
modal.destroy();
|
|
2358
2406
|
|
|
2359
|
-
var
|
|
2360
|
-
confirmPwd =
|
|
2407
|
+
var _ref23 = that.state || {},
|
|
2408
|
+
confirmPwd = _ref23.confirmPwd;
|
|
2361
2409
|
|
|
2362
2410
|
setTimeout(function () {
|
|
2363
2411
|
paymode.authCode = v;
|
|
@@ -2447,8 +2495,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2447
2495
|
type: 'primary', size: 'large', onClick: function onClick() {
|
|
2448
2496
|
var v = (0, _trim3.default)(that['inputAmount']['input']['value']);
|
|
2449
2497
|
|
|
2450
|
-
var
|
|
2451
|
-
confirmPwd =
|
|
2498
|
+
var _ref24 = that.state || {},
|
|
2499
|
+
confirmPwd = _ref24.confirmPwd;
|
|
2452
2500
|
// if (v !== '') {
|
|
2453
2501
|
|
|
2454
2502
|
|
|
@@ -2482,14 +2530,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2482
2530
|
|
|
2483
2531
|
case 3:
|
|
2484
2532
|
case 'end':
|
|
2485
|
-
return
|
|
2533
|
+
return _context15.stop();
|
|
2486
2534
|
}
|
|
2487
2535
|
}
|
|
2488
|
-
},
|
|
2536
|
+
}, _callee15, _this3);
|
|
2489
2537
|
}));
|
|
2490
2538
|
|
|
2491
|
-
return function (
|
|
2492
|
-
return
|
|
2539
|
+
return function (_x10) {
|
|
2540
|
+
return _ref22.apply(this, arguments);
|
|
2493
2541
|
};
|
|
2494
2542
|
}();
|
|
2495
2543
|
|
|
@@ -2498,8 +2546,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2498
2546
|
bquick: bquick
|
|
2499
2547
|
});
|
|
2500
2548
|
|
|
2501
|
-
var _enumController$
|
|
2502
|
-
PayStyle = _enumController$
|
|
2549
|
+
var _enumController$getEn23 = _mutantsUtil.enumController.getEnumOj(),
|
|
2550
|
+
PayStyle = _enumController$getEn23.PayStyle;
|
|
2503
2551
|
|
|
2504
2552
|
var _this2$store7 = _this2.store,
|
|
2505
2553
|
paymode = _this2$store7.paymode,
|
|
@@ -2542,8 +2590,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2542
2590
|
|
|
2543
2591
|
_this2.onCzkChange = function (v) {
|
|
2544
2592
|
// console.log("czk change:"+new Date().toLocaleTimeString())
|
|
2545
|
-
var
|
|
2546
|
-
isNewRetailBCPos =
|
|
2593
|
+
var _ref25 = _mutantsUtil.platform || {},
|
|
2594
|
+
isNewRetailBCPos = _ref25.isNewRetailBCPos;
|
|
2547
2595
|
|
|
2548
2596
|
if (!isNewRetailBCPos) {
|
|
2549
2597
|
_this2.store.paymode.currentMode.member.setCardNo(v);
|
|
@@ -2604,8 +2652,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2604
2652
|
};
|
|
2605
2653
|
|
|
2606
2654
|
_this2.checkCharge = function () {
|
|
2607
|
-
var _enumController$
|
|
2608
|
-
PayStyle = _enumController$
|
|
2655
|
+
var _enumController$getEn24 = _mutantsUtil.enumController.getEnumOj(),
|
|
2656
|
+
PayStyle = _enumController$getEn24.PayStyle;
|
|
2609
2657
|
|
|
2610
2658
|
var paymode = _this2.store.paymode;
|
|
2611
2659
|
|
|
@@ -2652,8 +2700,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2652
2700
|
};
|
|
2653
2701
|
|
|
2654
2702
|
_this2.getXianjinPayment = function (payType, value) {
|
|
2655
|
-
var _enumController$
|
|
2656
|
-
PayStyle = _enumController$
|
|
2703
|
+
var _enumController$getEn25 = _mutantsUtil.enumController.getEnumOj(),
|
|
2704
|
+
PayStyle = _enumController$getEn25.PayStyle;
|
|
2657
2705
|
|
|
2658
2706
|
var isManualIntoAmount = _this2.state.isManualIntoAmount;
|
|
2659
2707
|
|
|
@@ -2661,8 +2709,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2661
2709
|
};
|
|
2662
2710
|
|
|
2663
2711
|
_this2.getXianjinBalance = function (payType, value) {
|
|
2664
|
-
var _enumController$
|
|
2665
|
-
PayStyle = _enumController$
|
|
2712
|
+
var _enumController$getEn26 = _mutantsUtil.enumController.getEnumOj(),
|
|
2713
|
+
PayStyle = _enumController$getEn26.PayStyle;
|
|
2666
2714
|
//找零金额-存在权限控制
|
|
2667
2715
|
|
|
2668
2716
|
|
|
@@ -2682,9 +2730,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2682
2730
|
var isManualIntoAmount = void 0;
|
|
2683
2731
|
// 付款弹窗
|
|
2684
2732
|
return new _promise2.default(function (resolve, reject) {
|
|
2685
|
-
var _enumController$
|
|
2686
|
-
PayStyle = _enumController$
|
|
2687
|
-
PayIcon2 = _enumController$
|
|
2733
|
+
var _enumController$getEn27 = _mutantsUtil.enumController.getEnumOj(),
|
|
2734
|
+
PayStyle = _enumController$getEn27.PayStyle,
|
|
2735
|
+
PayIcon2 = _enumController$getEn27.PayIcon2;
|
|
2688
2736
|
|
|
2689
2737
|
var modal = (0, _asyncModal2.default)({
|
|
2690
2738
|
onPressEnter: function onPressEnter() {
|
|
@@ -2953,8 +3001,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2953
3001
|
paymode = _this2$store8.paymode,
|
|
2954
3002
|
newStyle = _this2$store8.newStyle;
|
|
2955
3003
|
|
|
2956
|
-
var _enumController$
|
|
2957
|
-
PayStyle = _enumController$
|
|
3004
|
+
var _enumController$getEn28 = _mutantsUtil.enumController.getEnumOj(),
|
|
3005
|
+
PayStyle = _enumController$getEn28.PayStyle;
|
|
2958
3006
|
|
|
2959
3007
|
var payTypeList = [PayStyle.SQBPAY, PayStyle.CSYH, PayStyle.smzf];
|
|
2960
3008
|
var payTypeFilterList = payTypeList.filter(function (filterType) {
|
|
@@ -2975,15 +3023,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2975
3023
|
};
|
|
2976
3024
|
|
|
2977
3025
|
_this2.checkModeDisabled = function (type, brefund, boriginReturn) {
|
|
2978
|
-
var _enumController$
|
|
2979
|
-
PayStyle = _enumController$
|
|
3026
|
+
var _enumController$getEn29 = _mutantsUtil.enumController.getEnumOj(),
|
|
3027
|
+
PayStyle = _enumController$getEn29.PayStyle;
|
|
2980
3028
|
|
|
2981
3029
|
return (brefund && (type == PayStyle.wx || type == PayStyle.zfb || type == PayStyle.smzf || type == PayStyle.jfdx || type == PayStyle.djq || type == PayStyle.SQBPAY || type == PayStyle.CSYH) || boriginReturn && type == PayStyle.hyczk) && !(boriginReturn && (type == PayStyle.wx || type == PayStyle.zfb)) || _this2.checkCurrentModeHaveMutex(type);
|
|
2982
3030
|
};
|
|
2983
3031
|
|
|
2984
3032
|
_this2.checkSettleDisabled = function (paymode, thePaymodes) {
|
|
2985
|
-
var _enumController$
|
|
2986
|
-
PayStyle = _enumController$
|
|
3033
|
+
var _enumController$getEn30 = _mutantsUtil.enumController.getEnumOj(),
|
|
3034
|
+
PayStyle = _enumController$getEn30.PayStyle;
|
|
2987
3035
|
|
|
2988
3036
|
console.log("settlement.checkSettleDisabled开始执行,参数:", { paymode: paymode, thePaymodes: thePaymodes });
|
|
2989
3037
|
if (paymode.amount == 0 && paymode.received == 0) {
|
|
@@ -3029,8 +3077,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3029
3077
|
};
|
|
3030
3078
|
|
|
3031
3079
|
_this2.editCzkModal = function () {
|
|
3032
|
-
var _enumController$
|
|
3033
|
-
PayStyle = _enumController$
|
|
3080
|
+
var _enumController$getEn31 = _mutantsUtil.enumController.getEnumOj(),
|
|
3081
|
+
PayStyle = _enumController$getEn31.PayStyle;
|
|
3034
3082
|
|
|
3035
3083
|
(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
|
|
3036
3084
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
@@ -3124,23 +3172,29 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3124
3172
|
|
|
3125
3173
|
_this2.hasElectron = hasElectron;
|
|
3126
3174
|
|
|
3127
|
-
var
|
|
3128
|
-
|
|
3129
|
-
|
|
3175
|
+
var _ref26 = _mutantsMicrofx.localStore.get('user') || {},
|
|
3176
|
+
_ref26$loginInfo = _ref26.loginInfo;
|
|
3177
|
+
|
|
3178
|
+
_ref26$loginInfo = _ref26$loginInfo === undefined ? {} : _ref26$loginInfo;
|
|
3179
|
+
var MemberMeStorageCardInputByKeyBoard = _ref26$loginInfo.MemberMeStorageCardInputByKeyBoard,
|
|
3180
|
+
ICCardServer = _ref26$loginInfo.ICCardServer,
|
|
3181
|
+
ICCardPassword = _ref26$loginInfo.ICCardPassword;
|
|
3130
3182
|
|
|
3183
|
+
_this2.isStorageCardInputType = MemberMeStorageCardInputByKeyBoard; // 仅储值卡是否禁用键盘输入,'0'为不禁用 '1'为禁用
|
|
3131
3184
|
_this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
|
|
3132
3185
|
_this2.iCCardPassword = ICCardPassword; //IC卡密码
|
|
3133
3186
|
//移动端环境下,没有读取IC卡的方式。
|
|
3134
3187
|
|
|
3135
|
-
var
|
|
3136
|
-
isHorizontalPad =
|
|
3137
|
-
isHorizontalSunMi =
|
|
3188
|
+
var _ref27 = _mutantsUtil.platform || {},
|
|
3189
|
+
isHorizontalPad = _ref27.isHorizontalPad,
|
|
3190
|
+
isHorizontalSunMi = _ref27.isHorizontalSunMi;
|
|
3138
3191
|
|
|
3139
3192
|
_this2.isHorizontalPad = !!isHorizontalPad;
|
|
3140
3193
|
_this2.isHorizontalSunMi = !!isHorizontalSunMi;
|
|
3141
3194
|
_this2.isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;
|
|
3142
3195
|
_this2.handleReadICard = _this2.handleReadICard.bind(_this2);
|
|
3143
3196
|
_this2.setTimer = null;
|
|
3197
|
+
_this2.keypressStime = null;
|
|
3144
3198
|
return _this2;
|
|
3145
3199
|
}
|
|
3146
3200
|
|
|
@@ -3281,9 +3335,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3281
3335
|
value: function renderToolbtn(mode, index) {
|
|
3282
3336
|
var _this7 = this;
|
|
3283
3337
|
|
|
3284
|
-
var _enumController$
|
|
3285
|
-
PayIcon = _enumController$
|
|
3286
|
-
PayStyle = _enumController$
|
|
3338
|
+
var _enumController$getEn32 = _mutantsUtil.enumController.getEnumOj(),
|
|
3339
|
+
PayIcon = _enumController$getEn32.PayIcon,
|
|
3340
|
+
PayStyle = _enumController$getEn32.PayStyle;
|
|
3287
3341
|
|
|
3288
3342
|
var isReturn = this.props.isReturn;
|
|
3289
3343
|
var _store = this.store,
|
|
@@ -3355,11 +3409,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3355
3409
|
value: function render() {
|
|
3356
3410
|
var _this8 = this;
|
|
3357
3411
|
|
|
3358
|
-
var _enumController$
|
|
3359
|
-
PayIcon = _enumController$
|
|
3360
|
-
PayIcon2 = _enumController$
|
|
3361
|
-
PayStyle = _enumController$
|
|
3362
|
-
Differentiate = _enumController$
|
|
3412
|
+
var _enumController$getEn33 = _mutantsUtil.enumController.getEnumOj(),
|
|
3413
|
+
PayIcon = _enumController$getEn33.PayIcon,
|
|
3414
|
+
PayIcon2 = _enumController$getEn33.PayIcon2,
|
|
3415
|
+
PayStyle = _enumController$getEn33.PayStyle,
|
|
3416
|
+
Differentiate = _enumController$getEn33.Differentiate;
|
|
3363
3417
|
|
|
3364
3418
|
var _state2 = this.state,
|
|
3365
3419
|
btnDissabled = _state2.btnDissabled,
|
|
@@ -3367,10 +3421,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3367
3421
|
discountTotalAmount = _state2.discountTotalAmount,
|
|
3368
3422
|
discountRetailTotalAount = _state2.discountRetailTotalAount,
|
|
3369
3423
|
discountPrototypeTotalAmount = _state2.discountPrototypeTotalAmount,
|
|
3370
|
-
storageValue = _state2.storageValue
|
|
3424
|
+
storageValue = _state2.storageValue,
|
|
3425
|
+
czkValue = _state2.czkValue;
|
|
3371
3426
|
|
|
3372
|
-
var
|
|
3373
|
-
isNewRetailBCPos =
|
|
3427
|
+
var _ref28 = _mutantsUtil.platform || {},
|
|
3428
|
+
isNewRetailBCPos = _ref28.isNewRetailBCPos;
|
|
3374
3429
|
|
|
3375
3430
|
var _store2 = this.store,
|
|
3376
3431
|
paymode = _store2.paymode,
|
|
@@ -3433,11 +3488,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3433
3488
|
quantity4 = 0;
|
|
3434
3489
|
var sumQuantity = 0; //数量总和的值,包括称重的。
|
|
3435
3490
|
|
|
3436
|
-
var
|
|
3437
|
-
|
|
3438
|
-
buyQuantity =
|
|
3439
|
-
|
|
3440
|
-
returnQuantity =
|
|
3491
|
+
var _ref29 = quantityDetail || {},
|
|
3492
|
+
_ref29$buyQuantity = _ref29.buyQuantity,
|
|
3493
|
+
buyQuantity = _ref29$buyQuantity === undefined ? 0 : _ref29$buyQuantity,
|
|
3494
|
+
_ref29$returnQuantity = _ref29.returnQuantity,
|
|
3495
|
+
returnQuantity = _ref29$returnQuantity === undefined ? 0 : _ref29$returnQuantity;
|
|
3441
3496
|
|
|
3442
3497
|
var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
|
|
3443
3498
|
quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
|
|
@@ -3455,7 +3510,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3455
3510
|
sumQuantity = this.changeDecimalBuZero(sumQuantity, quantityPrecision);
|
|
3456
3511
|
}
|
|
3457
3512
|
|
|
3458
|
-
var
|
|
3513
|
+
var themodeHyczk = thePaymodes.filter(function (mode) {
|
|
3514
|
+
return mode.paymentType === PayStyle.hyczk && mode.value !== '0.00';
|
|
3515
|
+
});
|
|
3459
3516
|
return _react2.default.createElement(
|
|
3460
3517
|
'div',
|
|
3461
3518
|
{ className: 'billingSettlement', ref: function ref(r) {
|
|
@@ -3661,13 +3718,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3661
3718
|
_react2.default.createElement(
|
|
3662
3719
|
'div',
|
|
3663
3720
|
{ className: (0, _classnames4.default)({ "main": true, "focusbottom": currentIndex == index }) },
|
|
3664
|
-
_react2.default.createElement(
|
|
3665
|
-
'div',
|
|
3666
|
-
{ className: 'lefticon primary-color', onClick: function onClick() {
|
|
3667
|
-
_this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType);
|
|
3668
|
-
} },
|
|
3669
|
-
_react2.default.createElement(_ticon2.default, { type: 'jianqu', className: 'minus' })
|
|
3670
|
-
),
|
|
3671
3721
|
_react2.default.createElement(
|
|
3672
3722
|
'div',
|
|
3673
3723
|
{ className: (0, _classnames4.default)({ "name": true }) },
|
|
@@ -3697,13 +3747,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3697
3747
|
}
|
|
3698
3748
|
})
|
|
3699
3749
|
),
|
|
3700
|
-
|
|
3701
|
-
'
|
|
3702
|
-
{ className: '
|
|
3703
|
-
|
|
3704
|
-
_this8.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
|
3750
|
+
_react2.default.createElement(
|
|
3751
|
+
'span',
|
|
3752
|
+
{ className: 'minus', onClick: function onClick() {
|
|
3753
|
+
_this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType);
|
|
3705
3754
|
} },
|
|
3706
|
-
_react2.default.createElement(_ticon2.default, { type: '
|
|
3755
|
+
_react2.default.createElement(_ticon2.default, { type: 'shanchu', className: 'minusIcon primary-color' })
|
|
3707
3756
|
)
|
|
3708
3757
|
),
|
|
3709
3758
|
mode.paymentType == PayStyle.djq ? _react2.default.createElement(
|
|
@@ -3730,7 +3779,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3730
3779
|
_react2.default.createElement(
|
|
3731
3780
|
'span',
|
|
3732
3781
|
{ className: 'fl' },
|
|
3733
|
-
|
|
3782
|
+
mode && mode.storageCardNo
|
|
3734
3783
|
),
|
|
3735
3784
|
_react2.default.createElement('br', null),
|
|
3736
3785
|
_react2.default.createElement(
|
|
@@ -3742,6 +3791,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3742
3791
|
'span',
|
|
3743
3792
|
{ className: 'fl' },
|
|
3744
3793
|
(0, _utils.getFixedNumber)(mode.balance)
|
|
3794
|
+
),
|
|
3795
|
+
_react2.default.createElement('br', null),
|
|
3796
|
+
themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === mode.paymethodId && !isReturn && _react2.default.createElement(
|
|
3797
|
+
_button2.default,
|
|
3798
|
+
{ onClick: function onClick() {
|
|
3799
|
+
_this8.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
|
3800
|
+
}, className: 'addCard btn-border-primary' },
|
|
3801
|
+
_react2.default.createElement(_ticon2.default, { type: 'jiahao', className: 'plus b-theme-color' }),
|
|
3802
|
+
_react2.default.createElement(
|
|
3803
|
+
'span',
|
|
3804
|
+
null,
|
|
3805
|
+
'\u6DFB\u52A0\u5361'
|
|
3806
|
+
)
|
|
3745
3807
|
)
|
|
3746
3808
|
)
|
|
3747
3809
|
);
|
|
@@ -4039,7 +4101,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4039
4101
|
// }
|
|
4040
4102
|
// }
|
|
4041
4103
|
// mode.paymentType == PayStyle.hyczk && czkinput && czkinput.value !== '0.00' ? this.editCzkModal() :
|
|
4042
|
-
|
|
4104
|
+
if (mode.paymentType == PayStyle.hyczk) {
|
|
4105
|
+
if (themodeHyczk && themodeHyczk.length === 0) {
|
|
4106
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4107
|
+
}
|
|
4108
|
+
} else {
|
|
4109
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4110
|
+
}
|
|
4043
4111
|
},
|
|
4044
4112
|
value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
|
|
4045
4113
|
return tm.paymentType == PayStyle.hyczk;
|
|
@@ -4092,7 +4160,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4092
4160
|
_react2.default.createElement(
|
|
4093
4161
|
'span',
|
|
4094
4162
|
null,
|
|
4095
|
-
|
|
4163
|
+
m && m.storageCardNo
|
|
4096
4164
|
),
|
|
4097
4165
|
_react2.default.createElement(
|
|
4098
4166
|
'span',
|
|
@@ -4103,6 +4171,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4103
4171
|
'span',
|
|
4104
4172
|
{ className: 'balance fr' },
|
|
4105
4173
|
'\u652F\u4ED8\u91D1\u989D\uFF1A'
|
|
4174
|
+
),
|
|
4175
|
+
_react2.default.createElement('br', null),
|
|
4176
|
+
themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === m.paymethodId && _react2.default.createElement(
|
|
4177
|
+
_button2.default,
|
|
4178
|
+
{ onClick: function onClick() {
|
|
4179
|
+
return _this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4180
|
+
}, className: 'addCard btn-border-primary' },
|
|
4181
|
+
_react2.default.createElement(_ticon2.default, { type: 'jiahao', className: 'plus b-theme-color' }),
|
|
4182
|
+
_react2.default.createElement(
|
|
4183
|
+
'span',
|
|
4184
|
+
null,
|
|
4185
|
+
'\u6DFB\u52A0\u5361'
|
|
4186
|
+
)
|
|
4106
4187
|
)
|
|
4107
4188
|
);
|
|
4108
4189
|
})
|
|
@@ -4262,14 +4343,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4262
4343
|
{ key: index + '', className: 'modeItem' },
|
|
4263
4344
|
_react2.default.createElement(
|
|
4264
4345
|
'div',
|
|
4265
|
-
{ className: 'main ' + (currentIndex == index && 'settlement-pay-item-border') },
|
|
4266
|
-
_react2.default.createElement(
|
|
4267
|
-
'div',
|
|
4268
|
-
{ className: 'lefticon', onClick: function onClick() {
|
|
4269
|
-
_this8.onDelPay(index);
|
|
4270
|
-
} },
|
|
4271
|
-
_react2.default.createElement(_ticon2.default, { type: 'jianqu', className: 'minus' })
|
|
4272
|
-
),
|
|
4346
|
+
{ className: 'main b-theme-color ' + (currentIndex == index && 'settlement-pay-item-border') },
|
|
4273
4347
|
_react2.default.createElement(
|
|
4274
4348
|
'div',
|
|
4275
4349
|
{ className: (0, _classnames4.default)({ "name": true }) },
|
|
@@ -4294,13 +4368,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4294
4368
|
}
|
|
4295
4369
|
})
|
|
4296
4370
|
),
|
|
4297
|
-
|
|
4371
|
+
_react2.default.createElement(
|
|
4298
4372
|
'div',
|
|
4299
|
-
{ className: '
|
|
4300
|
-
|
|
4301
|
-
_this8.appendCzkmode('', 'noPlaySetPwd');
|
|
4373
|
+
{ className: 'minus', onClick: function onClick() {
|
|
4374
|
+
_this8.onDelPay(index);
|
|
4302
4375
|
} },
|
|
4303
|
-
_react2.default.createElement(_ticon2.default, { type: '
|
|
4376
|
+
_react2.default.createElement(_ticon2.default, { type: 'shanchu', className: 'minusIcon primary-color' })
|
|
4304
4377
|
)
|
|
4305
4378
|
),
|
|
4306
4379
|
mode.paymentType == PayStyle.djq ? _react2.default.createElement(
|
|
@@ -4327,7 +4400,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4327
4400
|
_react2.default.createElement(
|
|
4328
4401
|
'span',
|
|
4329
4402
|
{ className: 'fl' },
|
|
4330
|
-
|
|
4403
|
+
mode && mode.storageCardNo
|
|
4331
4404
|
),
|
|
4332
4405
|
_react2.default.createElement('br', null),
|
|
4333
4406
|
_react2.default.createElement(
|
|
@@ -4516,7 +4589,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4516
4589
|
_react2.default.createElement(
|
|
4517
4590
|
'div',
|
|
4518
4591
|
{ className: (0, _classnames4.default)({ "main": true, "focusbottom": currentIndex == index }) },
|
|
4519
|
-
_react2.default.createElement('div', { className: 'lefticon' }),
|
|
4520
4592
|
_react2.default.createElement(
|
|
4521
4593
|
'div',
|
|
4522
4594
|
{ className: (0, _classnames4.default)({ "name": true }) },
|
|
@@ -4651,7 +4723,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4651
4723
|
visible: this.state.czkVisible,
|
|
4652
4724
|
maskClosable: false,
|
|
4653
4725
|
destroyOnClose: true,
|
|
4654
|
-
title: "
|
|
4726
|
+
title: "储值结算",
|
|
4655
4727
|
onCancel: this.handleCzkCancel,
|
|
4656
4728
|
keyboard: false,
|
|
4657
4729
|
centered: !this.isHorizontalPad ? true : false,
|
|
@@ -4682,7 +4754,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4682
4754
|
_react2.default.createElement(
|
|
4683
4755
|
'div',
|
|
4684
4756
|
{ className: 'value valuetext' },
|
|
4685
|
-
currentMode && currentMode.member.type || '普通'
|
|
4757
|
+
currentMode && currentMode.member && currentMode.member.type || '普通'
|
|
4686
4758
|
),
|
|
4687
4759
|
_react2.default.createElement(
|
|
4688
4760
|
'div',
|
|
@@ -4703,7 +4775,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4703
4775
|
_react2.default.createElement(
|
|
4704
4776
|
'div',
|
|
4705
4777
|
{ className: 'value' },
|
|
4706
|
-
currentMode && (0, _utils.getFixedNumber)(currentMode.
|
|
4778
|
+
currentMode && (0, _utils.getFixedNumber)(currentMode.balance)
|
|
4707
4779
|
),
|
|
4708
4780
|
_react2.default.createElement(
|
|
4709
4781
|
'div',
|
|
@@ -4724,7 +4796,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4724
4796
|
_react2.default.createElement(
|
|
4725
4797
|
'div',
|
|
4726
4798
|
{ className: 'value' },
|
|
4727
|
-
currentMode && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.
|
|
4799
|
+
currentMode && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.balance)))
|
|
4728
4800
|
),
|
|
4729
4801
|
_react2.default.createElement(
|
|
4730
4802
|
'div',
|
|
@@ -4739,29 +4811,83 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4739
4811
|
_react2.default.createElement(
|
|
4740
4812
|
'span',
|
|
4741
4813
|
null,
|
|
4742
|
-
'\
|
|
4814
|
+
'\u50A8\u503C\u5361\u53F7\uFF1A'
|
|
4743
4815
|
),
|
|
4744
4816
|
_react2.default.createElement(
|
|
4745
4817
|
'span',
|
|
4746
4818
|
null,
|
|
4747
4819
|
_react2.default.createElement(_input2.default, {
|
|
4748
4820
|
type: 'text',
|
|
4749
|
-
placeholder: '\u8BF7\u626B\u63CF\u6216\u8F93\u5165\
|
|
4750
|
-
|
|
4751
|
-
, className: 'input ' + (this.hasElectron === true && this.iCCardServer === 1 || this.isHorizontalPad === true ? 'temp' : ''),
|
|
4821
|
+
placeholder: '\u8BF7\u626B\u63CF\u6216\u8F93\u5165\u50A8\u503C\u5361',
|
|
4822
|
+
className: 'input ' + (this.hasElectron === true && this.iCCardServer === 1 || this.isHorizontalPad === true ? 'temp' : ''),
|
|
4752
4823
|
onChange: function onChange(e) {
|
|
4753
4824
|
return _this8.onCzkChange(e.target.value);
|
|
4754
4825
|
},
|
|
4755
|
-
defaultValue:
|
|
4756
|
-
value:
|
|
4826
|
+
defaultValue: currentMode && currentMode.storageCardNo,
|
|
4827
|
+
value: czkValue,
|
|
4757
4828
|
ref: function ref(input) {
|
|
4758
4829
|
return _this8.czkInput = input;
|
|
4759
4830
|
},
|
|
4760
|
-
onKeyDown: function
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4831
|
+
onKeyDown: function () {
|
|
4832
|
+
var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(e) {
|
|
4833
|
+
var time, _paymode;
|
|
4834
|
+
|
|
4835
|
+
return _regenerator2.default.wrap(function _callee16$(_context16) {
|
|
4836
|
+
while (1) {
|
|
4837
|
+
switch (_context16.prev = _context16.next) {
|
|
4838
|
+
case 0:
|
|
4839
|
+
if (!(e.keyCode == 13)) {
|
|
4840
|
+
_context16.next = 14;
|
|
4841
|
+
break;
|
|
4842
|
+
}
|
|
4843
|
+
|
|
4844
|
+
time = Date.parse(new Date());
|
|
4845
|
+
|
|
4846
|
+
if (!(_this8.isStorageCardInputType && time - _this8.keypressStime > 350)) {
|
|
4847
|
+
_context16.next = 7;
|
|
4848
|
+
break;
|
|
4849
|
+
}
|
|
4850
|
+
|
|
4851
|
+
_message2.default.warn('储值卡不可键盘录入,请刷卡!');
|
|
4852
|
+
_this8.keypressStime = null;
|
|
4853
|
+
_this8.setState({
|
|
4854
|
+
czkValue: null
|
|
4855
|
+
});
|
|
4856
|
+
return _context16.abrupt('return');
|
|
4857
|
+
|
|
4858
|
+
case 7:
|
|
4859
|
+
_this8.keypressStime = null;
|
|
4860
|
+
_context16.next = 10;
|
|
4861
|
+
return _this8.loadCzk(e.target.value);
|
|
4862
|
+
|
|
4863
|
+
case 10:
|
|
4864
|
+
_paymode = _this8.store.paymode;
|
|
4865
|
+
|
|
4866
|
+
if (!_paymode.currentMode.storageCardNo) {
|
|
4867
|
+
_this8.setState({
|
|
4868
|
+
czkvalue: null
|
|
4869
|
+
});
|
|
4870
|
+
}
|
|
4871
|
+
_context16.next = 15;
|
|
4872
|
+
break;
|
|
4873
|
+
|
|
4874
|
+
case 14:
|
|
4875
|
+
if (!_this8.keypressStime && e.keyCode !== 8) {
|
|
4876
|
+
_this8.keypressStime = Date.parse(new Date());
|
|
4877
|
+
}
|
|
4878
|
+
|
|
4879
|
+
case 15:
|
|
4880
|
+
case 'end':
|
|
4881
|
+
return _context16.stop();
|
|
4882
|
+
}
|
|
4883
|
+
}
|
|
4884
|
+
}, _callee16, _this8);
|
|
4885
|
+
}));
|
|
4886
|
+
|
|
4887
|
+
return function (_x12) {
|
|
4888
|
+
return _ref30.apply(this, arguments);
|
|
4889
|
+
};
|
|
4890
|
+
}(),
|
|
4765
4891
|
onFocus: function onFocus(e) {
|
|
4766
4892
|
_this8.inputTarget = _this8.czkInput.input;
|
|
4767
4893
|
!_this8.state.prototypeVisible && _keyboard2.default.open(function (v) {
|
|
@@ -4813,22 +4939,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4813
4939
|
className: _index.hotKey.hotKeyNotFilter('input'),
|
|
4814
4940
|
value: storageValue,
|
|
4815
4941
|
onChange: function onChange(event) {
|
|
4816
|
-
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.
|
|
4942
|
+
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.balance));
|
|
4817
4943
|
},
|
|
4818
|
-
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.
|
|
4819
|
-
ref: function ref(
|
|
4820
|
-
return _this8["inputCzkAmount"] =
|
|
4944
|
+
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)),
|
|
4945
|
+
ref: function ref(_ref31) {
|
|
4946
|
+
return _this8["inputCzkAmount"] = _ref31;
|
|
4821
4947
|
},
|
|
4822
4948
|
onFocus: function onFocus(e) {
|
|
4823
4949
|
_this8.inputkey = "inputCzkAmount";
|
|
4824
4950
|
_keyboard2.default.open(function (v) {
|
|
4825
4951
|
var value = _keyboard2.default.getNewValue(_this8[_this8.inputkey].input, _this8[_this8.inputkey].input.value, v);
|
|
4826
|
-
_this8.setCurrentModeValue(value, Math.min(currentMode.maxamount, currentMode.
|
|
4952
|
+
_this8.setCurrentModeValue(value, Math.min(currentMode.maxamount, currentMode.balance));
|
|
4827
4953
|
}, _this8.keyboardOnOk, _this8.keyboardOnClose)();
|
|
4828
4954
|
},
|
|
4829
4955
|
onBlur: function onBlur(e) {
|
|
4830
4956
|
_keyboard2.default.close();
|
|
4831
|
-
_this8.setCurrentModeValue((0, _utils.getFixedNumber)(_this8.inputCzkAmount.input.value), Math.min(currentMode.maxamount, currentMode.
|
|
4957
|
+
_this8.setCurrentModeValue((0, _utils.getFixedNumber)(_this8.inputCzkAmount.input.value), Math.min(currentMode.maxamount, currentMode.balance));
|
|
4832
4958
|
}
|
|
4833
4959
|
})
|
|
4834
4960
|
)
|
|
@@ -4889,7 +5015,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4889
5015
|
),
|
|
4890
5016
|
_react2.default.createElement(
|
|
4891
5017
|
_button2.default,
|
|
4892
|
-
{ type: 'primary', disabled:
|
|
5018
|
+
{ type: 'primary', disabled: btnDissabled, onClick: this.handleSetModal },
|
|
4893
5019
|
'\u786E\u5B9A'
|
|
4894
5020
|
)
|
|
4895
5021
|
)),
|
|
@@ -5316,7 +5442,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5316
5442
|
_react2.default.createElement(
|
|
5317
5443
|
'div',
|
|
5318
5444
|
{ className: 'value valuetext' },
|
|
5319
|
-
currentMode && currentMode.member.type || '普通'
|
|
5445
|
+
currentMode && currentMode.member && currentMode.member.type || '普通'
|
|
5320
5446
|
),
|
|
5321
5447
|
_react2.default.createElement(
|
|
5322
5448
|
'div',
|
|
@@ -5337,7 +5463,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5337
5463
|
_react2.default.createElement(
|
|
5338
5464
|
'div',
|
|
5339
5465
|
{ className: 'value' },
|
|
5340
|
-
currentMode && currentMode.member.bonusPoints
|
|
5466
|
+
currentMode && currentMode.member && currentMode.member.bonusPoints
|
|
5341
5467
|
),
|
|
5342
5468
|
_react2.default.createElement(
|
|
5343
5469
|
'div',
|
|
@@ -5358,7 +5484,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5358
5484
|
_react2.default.createElement(
|
|
5359
5485
|
'div',
|
|
5360
5486
|
{ className: 'value' },
|
|
5361
|
-
currentMode && (0, _utils.getFixedNumber)(currentMode.member.exchangable)
|
|
5487
|
+
currentMode && currentMode.member && (0, _utils.getFixedNumber)(currentMode.member.exchangable)
|
|
5362
5488
|
),
|
|
5363
5489
|
_react2.default.createElement(
|
|
5364
5490
|
'div',
|
|
@@ -5379,7 +5505,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5379
5505
|
_react2.default.createElement(
|
|
5380
5506
|
'div',
|
|
5381
5507
|
{ className: 'value' },
|
|
5382
|
-
currentMode && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.member.exchangable)))
|
|
5508
|
+
currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.member.exchangable)))
|
|
5383
5509
|
),
|
|
5384
5510
|
_react2.default.createElement(
|
|
5385
5511
|
'div',
|
|
@@ -5399,7 +5525,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5399
5525
|
_react2.default.createElement(
|
|
5400
5526
|
'span',
|
|
5401
5527
|
{ className: 'notext' },
|
|
5402
|
-
currentMode && currentMode.member.cardNo
|
|
5528
|
+
currentMode && currentMode.member && currentMode.member.cardNo
|
|
5403
5529
|
)
|
|
5404
5530
|
),
|
|
5405
5531
|
_react2.default.createElement(
|
|
@@ -5433,9 +5559,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5433
5559
|
onChange: function onChange(e) {
|
|
5434
5560
|
_this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
5435
5561
|
},
|
|
5436
|
-
defaultValue: currentMode && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
|
5437
|
-
ref: function ref(
|
|
5438
|
-
return _this8["inputJfdxAmount"] =
|
|
5562
|
+
defaultValue: currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
|
5563
|
+
ref: function ref(_ref32) {
|
|
5564
|
+
return _this8["inputJfdxAmount"] = _ref32;
|
|
5439
5565
|
},
|
|
5440
5566
|
onFocus: function onFocus(e) {
|
|
5441
5567
|
_this8.inputkey = "inputJfdxAmount";
|