tplus-components-touch 3.31.1 → 3.31.2
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/hotKey/localConfig.js +133 -14
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/settlement/moreCzkTable/index.js +156 -0
- package/dist/components/settlement/moreCzkTable/index.js.map +1 -0
- package/dist/components/settlement/moreCzkTable/style.less +7 -0
- package/dist/components/settlement/settlement.js +731 -475
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +75 -5
- package/dist/components/settlement/settlementStore.js +499 -277
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +5248 -5202
- package/dist/components/ticon/iconfont/iconfont.css +895 -887
- 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 +1549 -1535
- 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/components/touchScroll/index.js +6 -2
- package/dist/components/touchScroll/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -208,6 +208,10 @@ var _index2 = require('./prototypeTable/index');
|
|
|
208
208
|
|
|
209
209
|
var _index3 = _interopRequireDefault(_index2);
|
|
210
210
|
|
|
211
|
+
var _moreCzkTable = require('./moreCzkTable');
|
|
212
|
+
|
|
213
|
+
var _moreCzkTable2 = _interopRequireDefault(_moreCzkTable);
|
|
214
|
+
|
|
211
215
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
212
216
|
|
|
213
217
|
var hasElectron = _mutantsMicrofx.env.platform === _mutantsMicrofx.env.constant.platform.electron;
|
|
@@ -228,6 +232,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
228
232
|
czkVisible: false,
|
|
229
233
|
djqVisible: false,
|
|
230
234
|
jfdxVisible: false,
|
|
235
|
+
moreCzkVisible: false,
|
|
231
236
|
showSetPwdModal: false,
|
|
232
237
|
prototypeVisible: false, // 优惠明细弹出框
|
|
233
238
|
currentIndex: 0,
|
|
@@ -246,6 +251,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
246
251
|
protytypeCount: null,
|
|
247
252
|
isPrototypeClick: false,
|
|
248
253
|
dataSource: [],
|
|
254
|
+
memberdata1: [],
|
|
249
255
|
discountTotalAmount: null,
|
|
250
256
|
discountRetailTotalAount: null,
|
|
251
257
|
discountPrototypeTotalAmount: null,
|
|
@@ -253,7 +259,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
253
259
|
currentKey: null,
|
|
254
260
|
couponLight: true,
|
|
255
261
|
storageValue: '0.00',
|
|
256
|
-
czkValue: null
|
|
262
|
+
czkValue: null,
|
|
263
|
+
isInputMember: false,
|
|
264
|
+
selectedRowIndex: 0 };
|
|
257
265
|
_this2.compoundHotkeysList = (window.$.operationControl[5] ? window.$.operationControl[5].control || [] : []).map(function (key) {
|
|
258
266
|
return key.toLocaleUpperCase();
|
|
259
267
|
});
|
|
@@ -300,12 +308,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
300
308
|
_this2.inputkey = "inputJfdxAmount";
|
|
301
309
|
_this2["inputJfdxAmount"].input.value = currentMode && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable));
|
|
302
310
|
_this2.setCurrentModeValue(_this2.inputJfdxAmount.input.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
303
|
-
} else if (_this2.state.czkVisible && currentMode && currentMode.value >= 0 && currentMode.
|
|
311
|
+
} else if (_this2.state.czkVisible && currentMode && currentMode.value >= 0 && currentMode.balance !== undefined) {
|
|
304
312
|
_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.
|
|
313
|
+
_this2["inputCzkAmount"] && _this2["inputCzkAmount"].input && (_this2["inputCzkAmount"].input.value = (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)));
|
|
314
|
+
var maxamount = Math.min(currentMode.maxamount, currentMode.balance);
|
|
307
315
|
_this2.inputCzkAmount && _this2.inputCzkAmount.input && _this2.setCurrentModeValue(_this2.inputCzkAmount.input.value, maxamount);
|
|
308
|
-
if (_this2.store.bquick && currentMode.
|
|
316
|
+
if (_this2.store.bquick && currentMode.storageCardNo && parseFloat(_this2.store.paymode.amount) > parseFloat(maxamount)) {
|
|
309
317
|
_message2.default.error("本单最大可用储值卡结算金额为:" + (0, _utils.getFixedNumber)(maxamount) + ",请使用复合结算!", {
|
|
310
318
|
duration: 4
|
|
311
319
|
});
|
|
@@ -554,68 +562,30 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
554
562
|
});
|
|
555
563
|
};
|
|
556
564
|
|
|
557
|
-
_this2.
|
|
558
|
-
var _enumController$getEn2 = _mutantsUtil.enumController.getEnumOj(),
|
|
559
|
-
PayStyle = _enumController$getEn2.PayStyle;
|
|
560
|
-
|
|
561
|
-
var _ref = _mutantsUtil.platform || {},
|
|
562
|
-
isNewRetailBCPos = _ref.isNewRetailBCPos;
|
|
563
|
-
|
|
564
|
-
_this2.store.setCurrentMode(id, PayStyle.hyczk, append);
|
|
565
|
+
_this2.handleCzkMoreData = function (params) {
|
|
565
566
|
_this2._val = _this2.store.paymode.currentMode.value;
|
|
566
567
|
var currentMode = _this2.store.paymode.currentMode;
|
|
567
568
|
|
|
568
|
-
var maxamount = Math.min(currentMode.maxamount, currentMode.
|
|
569
|
-
if (_this2.store.bquick && currentMode.
|
|
569
|
+
var maxamount = Math.min(currentMode.maxamount, currentMode.balance);
|
|
570
|
+
if (_this2.store.bquick && currentMode.storageCardNo && parseFloat(_this2.store.paymode.amount) > parseFloat(maxamount)) {
|
|
570
571
|
_message2.default.error("本单最大可用储值卡结算金额为:" + (0, _utils.getFixedNumber)(maxamount) + ",请使用复合结算!", {
|
|
571
572
|
duration: 4
|
|
572
573
|
});
|
|
573
574
|
} else {
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
// return;
|
|
580
|
-
// }
|
|
581
|
-
// if (sMember && sMember.ID) {
|
|
582
|
-
// // noPlaySetPwd 点击结算方式设置密码,点加号不设置
|
|
583
|
-
// if (!sMember.WalletEnabled && params !== 'noPlaySetPwd' && !isReturn) {
|
|
584
|
-
// this.setState({
|
|
585
|
-
// newPass: '',
|
|
586
|
-
// newPassConfirm: '',
|
|
587
|
-
// showSetPwdModal: true
|
|
588
|
-
// })
|
|
589
|
-
// } else {
|
|
590
|
-
// this.setState({
|
|
591
|
-
// showSetPwdModal: false,
|
|
592
|
-
// czkVisible: true
|
|
593
|
-
// })
|
|
594
|
-
// }
|
|
595
|
-
// }
|
|
596
|
-
// // else {
|
|
597
|
-
// // Message.warn('请先录入会员');
|
|
598
|
-
// // }
|
|
599
|
-
// // this.setState({
|
|
600
|
-
// // czkVisible: true,
|
|
601
|
-
// // });
|
|
602
|
-
// } else {
|
|
603
|
-
// this.setState({
|
|
604
|
-
// czkVisible: true,
|
|
605
|
-
// });
|
|
606
|
-
// }
|
|
607
|
-
_this2.setState({
|
|
608
|
-
czkVisible: true
|
|
609
|
-
});
|
|
575
|
+
if (params) {
|
|
576
|
+
_this2.setState({
|
|
577
|
+
czkVisible: true
|
|
578
|
+
});
|
|
579
|
+
}
|
|
610
580
|
var brefund = _this2.store.brefund;
|
|
611
581
|
|
|
612
|
-
var value11 = currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.
|
|
582
|
+
var value11 = currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance));
|
|
613
583
|
_this2.setState({
|
|
614
584
|
storageValue: value11
|
|
615
585
|
});
|
|
616
|
-
if (currentMode.
|
|
586
|
+
if (currentMode.storageCardNo) {
|
|
617
587
|
_this2.setState({
|
|
618
|
-
czkValue: currentMode.
|
|
588
|
+
czkValue: currentMode.storageCardNo
|
|
619
589
|
});
|
|
620
590
|
} else {
|
|
621
591
|
_this2.setState({
|
|
@@ -623,95 +593,210 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
623
593
|
});
|
|
624
594
|
}
|
|
625
595
|
}
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
_this2.inputCzkAmount.input
|
|
632
|
-
|
|
596
|
+
if (params) {
|
|
597
|
+
setTimeout(function () {
|
|
598
|
+
if (!currentMode.storageCardNo) {
|
|
599
|
+
_this2.czkInput && _this2.czkInput.input.focus();
|
|
600
|
+
} else {
|
|
601
|
+
if (_this2.inputCzkAmount && _this2.inputCzkAmount.input) {
|
|
602
|
+
_this2.inputCzkAmount.input.focus();
|
|
603
|
+
_this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
|
|
604
|
+
}
|
|
633
605
|
}
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
_this2.connectRfCard();
|
|
606
|
+
}, 500);
|
|
607
|
+
}
|
|
637
608
|
};
|
|
638
609
|
|
|
639
|
-
_this2.
|
|
640
|
-
var
|
|
641
|
-
var _enumController$
|
|
610
|
+
_this2.showCzkModal = function () {
|
|
611
|
+
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(id, append) {
|
|
612
|
+
var _enumController$getEn2, PayStyle, _ref2, isInputMember, memberdata1;
|
|
642
613
|
|
|
643
614
|
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
644
615
|
while (1) {
|
|
645
616
|
switch (_context.prev = _context.next) {
|
|
646
617
|
case 0:
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
// return;
|
|
654
|
-
// }
|
|
655
|
-
_enumController$getEn3 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn3.PayStyle;
|
|
618
|
+
_this2.connectRfCard();
|
|
619
|
+
_enumController$getEn2 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn2.PayStyle;
|
|
620
|
+
|
|
621
|
+
_this2.store.setCurrentMode(id, PayStyle.hyczk, append);
|
|
622
|
+
_ref2 = _this2.state || {}, isInputMember = _ref2.isInputMember;
|
|
623
|
+
_context.t0 = isInputMember && _this2.store.paymode.currentMode.memberId;
|
|
656
624
|
|
|
657
|
-
if (
|
|
658
|
-
_context.next =
|
|
625
|
+
if (!_context.t0) {
|
|
626
|
+
_context.next = 9;
|
|
659
627
|
break;
|
|
660
628
|
}
|
|
661
629
|
|
|
662
|
-
_context.next =
|
|
663
|
-
return _this2.store.
|
|
630
|
+
_context.next = 8;
|
|
631
|
+
return _this2.store.updateCurrentMode(_this2.store.paymode.currentMode.memberId);
|
|
664
632
|
|
|
665
|
-
case
|
|
666
|
-
|
|
667
|
-
_context.next = 7;
|
|
668
|
-
break;
|
|
669
|
-
}
|
|
633
|
+
case 8:
|
|
634
|
+
_context.t0 = _context.sent;
|
|
670
635
|
|
|
671
|
-
|
|
672
|
-
|
|
636
|
+
case 9:
|
|
637
|
+
memberdata1 = _context.t0;
|
|
673
638
|
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
639
|
+
_this2.setState({
|
|
640
|
+
czkVisible: true
|
|
641
|
+
});
|
|
642
|
+
if (memberdata1 && memberdata1.length === 1) {
|
|
643
|
+
_this2.handleCzkMoreData(true);
|
|
644
|
+
_this2.store.handleCzkData(memberdata1[0]);
|
|
645
|
+
} else if (memberdata1 && memberdata1.length >= 1) {
|
|
646
|
+
_this2.setState({
|
|
647
|
+
moreCzkVisible: true,
|
|
648
|
+
memberdata1: memberdata1
|
|
649
|
+
});
|
|
650
|
+
} else {
|
|
651
|
+
_this2.setState({});
|
|
652
|
+
setTimeout(function () {
|
|
653
|
+
_this2.czkInput && _this2.czkInput.input.focus();
|
|
654
|
+
}, 300);
|
|
680
655
|
}
|
|
681
656
|
|
|
682
|
-
|
|
683
|
-
|
|
657
|
+
case 12:
|
|
658
|
+
case 'end':
|
|
659
|
+
return _context.stop();
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}, _callee, _this3);
|
|
663
|
+
}));
|
|
684
664
|
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
}
|
|
665
|
+
return function (_x, _x2) {
|
|
666
|
+
return _ref.apply(this, arguments);
|
|
667
|
+
};
|
|
668
|
+
}();
|
|
690
669
|
|
|
691
|
-
|
|
692
|
-
|
|
670
|
+
_this2.handleMoreCzkCancel = function () {
|
|
671
|
+
_this2.setState({
|
|
672
|
+
moreCzkVisible: false,
|
|
673
|
+
selectedRowIndex: 0
|
|
674
|
+
});
|
|
675
|
+
setTimeout(function () {
|
|
676
|
+
_this2.czkInput && _this2.czkInput.input.focus();
|
|
677
|
+
}, 300);
|
|
678
|
+
};
|
|
693
679
|
|
|
694
|
-
|
|
680
|
+
_this2.setMoreCzkIndex = function (index) {
|
|
681
|
+
_this2.setState({
|
|
682
|
+
selectedRowIndex: index
|
|
683
|
+
});
|
|
684
|
+
};
|
|
695
685
|
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
686
|
+
_this2.handleMoreCzkOk = function () {
|
|
687
|
+
var _this2$state = _this2.state,
|
|
688
|
+
memberdata1 = _this2$state.memberdata1,
|
|
689
|
+
selectedRowIndex = _this2$state.selectedRowIndex;
|
|
690
|
+
|
|
691
|
+
_this2.store.paymode.updateCardInfo(memberdata1[selectedRowIndex]);
|
|
692
|
+
_this2.handleCzkMoreData();
|
|
693
|
+
_this2.store.handleCzkData(memberdata1[selectedRowIndex]);
|
|
694
|
+
_this2.setState({
|
|
695
|
+
moreCzkVisible: false,
|
|
696
|
+
selectedRowIndex: 0
|
|
697
|
+
});
|
|
698
|
+
};
|
|
699
|
+
|
|
700
|
+
_this2.handleCzkData = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
|
701
|
+
var _enumController$getEn3, PayStyle;
|
|
702
|
+
|
|
703
|
+
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
704
|
+
while (1) {
|
|
705
|
+
switch (_context2.prev = _context2.next) {
|
|
706
|
+
case 0:
|
|
707
|
+
_this2.setState({
|
|
708
|
+
isInputMember: false
|
|
709
|
+
});
|
|
710
|
+
_enumController$getEn3 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn3.PayStyle;
|
|
711
|
+
|
|
712
|
+
if (_this2.store.paymode.currentMode.storageCardNo) {
|
|
713
|
+
_context2.next = 5;
|
|
714
|
+
break;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
_context2.next = 5;
|
|
718
|
+
return _this2.store.loadCzk(_this2.czkInput.input.value);
|
|
719
|
+
|
|
720
|
+
case 5:
|
|
721
|
+
if (_this2.store.paymode.currentMode.storageCardNo) {
|
|
722
|
+
_context2.next = 8;
|
|
723
|
+
break;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
_message2.default.error("请录入储值卡!");
|
|
727
|
+
return _context2.abrupt('return');
|
|
728
|
+
|
|
729
|
+
case 8:
|
|
730
|
+
if (!(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
|
|
731
|
+
return mode.paymethodId != _this2.store.paymode.currentMode.paymethodId && mode.paymentType == PayStyle.hyczk && mode.storageCardNo == _this2.store.paymode.currentMode.storageCardNo;
|
|
732
|
+
})) {
|
|
733
|
+
_context2.next = 11;
|
|
734
|
+
break;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
_message2.default.error("该储值卡已使用。");
|
|
738
|
+
return _context2.abrupt('return');
|
|
739
|
+
|
|
740
|
+
case 11:
|
|
741
|
+
if (!(_this2.store.bquick && _this2.store.paymode.amount != _this2.store.paymode.currentMode.value)) {
|
|
742
|
+
_context2.next = 14;
|
|
743
|
+
break;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
_message2.default.error("实收金额应等于应收金额。");
|
|
747
|
+
return _context2.abrupt('return');
|
|
748
|
+
|
|
749
|
+
case 14:
|
|
750
|
+
|
|
751
|
+
_this2.setState({
|
|
752
|
+
czkVisible: false,
|
|
753
|
+
storageValue: '0.00',
|
|
754
|
+
czkValue: null
|
|
755
|
+
});
|
|
756
|
+
_this2.closeRfCard();
|
|
757
|
+
_this2.store.paymode.calcMemberBalance();
|
|
758
|
+
_this2.handleCzk();
|
|
759
|
+
|
|
760
|
+
case 18:
|
|
761
|
+
case 'end':
|
|
762
|
+
return _context2.stop();
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
}, _callee2, _this3);
|
|
766
|
+
}));
|
|
767
|
+
|
|
768
|
+
_this2.handleCzkOk = function () {
|
|
769
|
+
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(e) {
|
|
770
|
+
var _this2$store$paymode$, walletEnabled, cardTypeEnum, freePaymentPasswordStore;
|
|
771
|
+
|
|
772
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
773
|
+
while (1) {
|
|
774
|
+
switch (_context3.prev = _context3.next) {
|
|
775
|
+
case 0:
|
|
776
|
+
// 判断是否有密码
|
|
777
|
+
_this2$store$paymode$ = _this2.store.paymode.currentMode, walletEnabled = _this2$store$paymode$.walletEnabled, cardTypeEnum = _this2$store$paymode$.cardTypeEnum, freePaymentPasswordStore = _this2$store$paymode$.freePaymentPasswordStore;
|
|
778
|
+
|
|
779
|
+
if (cardTypeEnum === 'BALANCE_CARD' && freePaymentPasswordStore) {
|
|
780
|
+
_this2.handleCzkData();
|
|
781
|
+
} else if (cardTypeEnum === 'BALANCE_CARD' && !walletEnabled) {
|
|
782
|
+
_this2.setState({
|
|
783
|
+
showSetPwdModal: true,
|
|
784
|
+
btnDissabled: true
|
|
785
|
+
});
|
|
786
|
+
} else {
|
|
787
|
+
_this2.handleCzkData();
|
|
788
|
+
}
|
|
704
789
|
|
|
705
|
-
case
|
|
790
|
+
case 2:
|
|
706
791
|
case 'end':
|
|
707
|
-
return
|
|
792
|
+
return _context3.stop();
|
|
708
793
|
}
|
|
709
794
|
}
|
|
710
|
-
},
|
|
795
|
+
}, _callee3, _this3);
|
|
711
796
|
}));
|
|
712
797
|
|
|
713
|
-
return function (
|
|
714
|
-
return
|
|
798
|
+
return function (_x3) {
|
|
799
|
+
return _ref4.apply(this, arguments);
|
|
715
800
|
};
|
|
716
801
|
}();
|
|
717
802
|
|
|
@@ -723,7 +808,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
723
808
|
_this2.setState({
|
|
724
809
|
czkVisible: false,
|
|
725
810
|
storageValue: '0.00',
|
|
726
|
-
|
|
811
|
+
czkValue: null
|
|
727
812
|
});
|
|
728
813
|
_this2.closeRfCard();
|
|
729
814
|
_keyboard2.default.close();
|
|
@@ -736,23 +821,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
736
821
|
});
|
|
737
822
|
};
|
|
738
823
|
|
|
739
|
-
_this2.handleSetModal = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
740
|
-
var _this2$
|
|
824
|
+
_this2.handleSetModal = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
|
825
|
+
var _this2$state2, newPass, newPassConfirm, isInputMember, updataMemberInfo, result, cardTypeEnum, resp;
|
|
741
826
|
|
|
742
|
-
return _regenerator2.default.wrap(function
|
|
827
|
+
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
743
828
|
while (1) {
|
|
744
|
-
switch (
|
|
829
|
+
switch (_context4.prev = _context4.next) {
|
|
745
830
|
case 0:
|
|
746
|
-
_this2$
|
|
831
|
+
_this2$state2 = _this2.state, newPass = _this2$state2.newPass, newPassConfirm = _this2$state2.newPassConfirm, isInputMember = _this2$state2.isInputMember;
|
|
747
832
|
updataMemberInfo = _this2.props.updataMemberInfo;
|
|
748
|
-
|
|
833
|
+
_context4.next = 4;
|
|
749
834
|
return _this2.store.queryPwd(newPass, newPassConfirm);
|
|
750
835
|
|
|
751
836
|
case 4:
|
|
752
|
-
result =
|
|
837
|
+
result = _context4.sent;
|
|
838
|
+
cardTypeEnum = _this2.store.paymode.currentMode.cardTypeEnum;
|
|
753
839
|
|
|
754
840
|
if (!result) {
|
|
755
|
-
|
|
841
|
+
_context4.next = 20;
|
|
756
842
|
break;
|
|
757
843
|
}
|
|
758
844
|
|
|
@@ -763,42 +849,72 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
763
849
|
newPassConfirm: ''
|
|
764
850
|
});
|
|
765
851
|
_message2.default.warn('设置成功');
|
|
766
|
-
|
|
767
|
-
|
|
852
|
+
_this2.handleCzkData();
|
|
768
853
|
setTimeout(function () {
|
|
769
|
-
if (
|
|
770
|
-
_this2.
|
|
771
|
-
|
|
772
|
-
if (_this2.inputCzkAmount && _this2.inputCzkAmount.input) {
|
|
773
|
-
_this2.inputCzkAmount.input.focus();
|
|
774
|
-
_this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
|
|
775
|
-
}
|
|
854
|
+
if (_this2.inputCzkAmount && _this2.inputCzkAmount.input) {
|
|
855
|
+
_this2.inputCzkAmount.input.focus();
|
|
856
|
+
_this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
|
|
776
857
|
}
|
|
777
858
|
}, 350);
|
|
778
|
-
|
|
779
|
-
|
|
859
|
+
|
|
860
|
+
if (!(isInputMember && _this2.store.member.ID)) {
|
|
861
|
+
_context4.next = 18;
|
|
862
|
+
break;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
_context4.next = 14;
|
|
780
866
|
return _this2.store.updateMemberInfo(_this2.store);
|
|
781
867
|
|
|
782
|
-
case
|
|
783
|
-
resp =
|
|
868
|
+
case 14:
|
|
869
|
+
resp = _context4.sent;
|
|
784
870
|
|
|
785
871
|
updataMemberInfo(resp);
|
|
872
|
+
_context4.next = 19;
|
|
873
|
+
break;
|
|
786
874
|
|
|
787
|
-
case
|
|
875
|
+
case 18:
|
|
876
|
+
if (cardTypeEnum === 'BALANCE_CARD') {
|
|
877
|
+
_this2.store.updateCardInfo();
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
case 19:
|
|
881
|
+
_this2.setState({
|
|
882
|
+
isInputMember: false
|
|
883
|
+
});
|
|
884
|
+
|
|
885
|
+
case 20:
|
|
788
886
|
case 'end':
|
|
789
|
-
return
|
|
887
|
+
return _context4.stop();
|
|
790
888
|
}
|
|
791
889
|
}
|
|
792
|
-
},
|
|
890
|
+
}, _callee4, _this3);
|
|
793
891
|
}));
|
|
794
892
|
|
|
893
|
+
_this2.onPressEnterCzk = function (field) {
|
|
894
|
+
var _ref6 = _this2.state || {},
|
|
895
|
+
_ref6$newPass = _ref6.newPass,
|
|
896
|
+
newPass = _ref6$newPass === undefined ? '' : _ref6$newPass,
|
|
897
|
+
_ref6$newPassConfirm = _ref6.newPassConfirm,
|
|
898
|
+
newPassConfirm = _ref6$newPassConfirm === undefined ? '' : _ref6$newPassConfirm;
|
|
899
|
+
|
|
900
|
+
if (field === 'newPass' && newPass.length === 6) {
|
|
901
|
+
_this2.inputConfirmAmount.input.focus();
|
|
902
|
+
}
|
|
903
|
+
if (field === 'newPassConfirm' && newPassConfirm.length === 6 && newPass.length === 6 && newPass === newPassConfirm) {
|
|
904
|
+
_this2.handleSetModal();
|
|
905
|
+
}
|
|
906
|
+
};
|
|
907
|
+
|
|
795
908
|
_this2.setPwdValue = function (field, value) {
|
|
909
|
+
if (!/^[0-9]*$/.test(value)) {
|
|
910
|
+
return;
|
|
911
|
+
}
|
|
796
912
|
_this2.setState((0, _defineProperty3.default)({}, field, value), function () {
|
|
797
|
-
var
|
|
798
|
-
|
|
799
|
-
newPass =
|
|
800
|
-
|
|
801
|
-
newPassConfirm =
|
|
913
|
+
var _ref7 = _this2.state || {},
|
|
914
|
+
_ref7$newPass = _ref7.newPass,
|
|
915
|
+
newPass = _ref7$newPass === undefined ? '' : _ref7$newPass,
|
|
916
|
+
_ref7$newPassConfirm = _ref7.newPassConfirm,
|
|
917
|
+
newPassConfirm = _ref7$newPassConfirm === undefined ? '' : _ref7$newPassConfirm;
|
|
802
918
|
|
|
803
919
|
if (newPassConfirm.length === 6 && newPass.length === 6 && newPass === newPassConfirm) {
|
|
804
920
|
_this2.setState({
|
|
@@ -809,15 +925,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
809
925
|
};
|
|
810
926
|
|
|
811
927
|
_this2.handleBlur = function (field) {
|
|
812
|
-
var
|
|
813
|
-
|
|
814
|
-
newPass =
|
|
815
|
-
|
|
816
|
-
newPassConfirm =
|
|
928
|
+
var _ref8 = _this2.state || {},
|
|
929
|
+
_ref8$newPass = _ref8.newPass,
|
|
930
|
+
newPass = _ref8$newPass === undefined ? '' : _ref8$newPass,
|
|
931
|
+
_ref8$newPassConfirm = _ref8.newPassConfirm,
|
|
932
|
+
newPassConfirm = _ref8$newPassConfirm === undefined ? '' : _ref8$newPassConfirm;
|
|
817
933
|
|
|
818
934
|
setTimeout(function () {
|
|
819
|
-
var
|
|
820
|
-
showSetPwdModal =
|
|
935
|
+
var _ref9 = _this2.state || {},
|
|
936
|
+
showSetPwdModal = _ref9.showSetPwdModal;
|
|
821
937
|
|
|
822
938
|
if (!showSetPwdModal) return;
|
|
823
939
|
if (field === 'newPass' && newPass.length < 6) {
|
|
@@ -874,8 +990,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
874
990
|
|
|
875
991
|
// TODO: 测试优惠券支付
|
|
876
992
|
|
|
877
|
-
var
|
|
878
|
-
isNewRetailBCPos =
|
|
993
|
+
var _ref10 = _mutantsUtil.platform || {},
|
|
994
|
+
isNewRetailBCPos = _ref10.isNewRetailBCPos;
|
|
879
995
|
|
|
880
996
|
if (isNewRetailBCPos && !_this2.store.paymode.currentMode.boriginReturn) {
|
|
881
997
|
_this2.store.getCouponList();
|
|
@@ -959,8 +1075,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
959
1075
|
};
|
|
960
1076
|
|
|
961
1077
|
_this2.checkOfflineEnable = function (paymode, key) {
|
|
962
|
-
var
|
|
963
|
-
paymodes =
|
|
1078
|
+
var _ref11 = paymode || {},
|
|
1079
|
+
paymodes = _ref11.paymodes;
|
|
964
1080
|
|
|
965
1081
|
var isOffline = _mutantsMicrofx.stores.offlineSys.isOffline;
|
|
966
1082
|
|
|
@@ -991,7 +1107,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
991
1107
|
paymode.currentMode = null;
|
|
992
1108
|
switch (key) {
|
|
993
1109
|
case PayStyle.hyczk:
|
|
994
|
-
_this2.
|
|
1110
|
+
_this2.setState({
|
|
1111
|
+
isInputMember: true
|
|
1112
|
+
}, function () {
|
|
1113
|
+
_this2.showCzkModal(-1);
|
|
1114
|
+
});
|
|
995
1115
|
break;
|
|
996
1116
|
case PayStyle.jfdx:
|
|
997
1117
|
_this2.showJfdxModal(-1);
|
|
@@ -1100,7 +1220,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1100
1220
|
boriginReturn = _this2$store3.boriginReturn;
|
|
1101
1221
|
var noAlreadyWarn = _this2.state.noAlreadyWarn;
|
|
1102
1222
|
|
|
1103
|
-
|
|
1104
1223
|
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(key)) return false;
|
|
1105
1224
|
|
|
1106
1225
|
if (_this2.checkModeDisabled(key, brefund, boriginReturn)) {
|
|
@@ -1170,12 +1289,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1170
1289
|
}
|
|
1171
1290
|
};
|
|
1172
1291
|
|
|
1173
|
-
_this2.setCurrentFocusAndAddPay = function (key) {
|
|
1292
|
+
_this2.setCurrentFocusAndAddPay = function (key, payId) {
|
|
1174
1293
|
_this2.store.changeFocusAndAddPay(key);
|
|
1175
1294
|
if (_this2.store.bquick) {
|
|
1176
1295
|
_this2.handleSettle("quickPay");
|
|
1177
1296
|
} else {
|
|
1178
|
-
_this2.setFocusAndSelection(key);
|
|
1297
|
+
_this2.setFocusAndSelection(key, payId);
|
|
1179
1298
|
}
|
|
1180
1299
|
};
|
|
1181
1300
|
|
|
@@ -1237,19 +1356,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1237
1356
|
}
|
|
1238
1357
|
}
|
|
1239
1358
|
// let bjfdx=this.store.paymode.currentMode.paymentType==PayStyle.jfdx;
|
|
1240
|
-
|
|
1241
|
-
var amountMaxLength = parseInt(_this2.props.initData["AmountMaxLength"] || 10);
|
|
1242
|
-
if (isNaN(val) && val !== '-') {
|
|
1243
|
-
value = _this2._val;
|
|
1244
|
-
} else if (!_this2.store.brefund && !isNaN(val) && parseFloat(val) <= 0) {
|
|
1245
|
-
value = _this2._val;
|
|
1246
|
-
} else if (value.length > amountMaxLength) {
|
|
1247
|
-
value = _this2._val;
|
|
1248
|
-
} else {
|
|
1249
|
-
_this2._val = val;
|
|
1250
|
-
}
|
|
1251
|
-
_this2[_this2.inputkey].input.value = value;
|
|
1252
|
-
_this2.store.paymode.setCurrentModeValue(value, max);
|
|
1359
|
+
_this2.store.paymode.setCurrentModeValue(val, max);
|
|
1253
1360
|
};
|
|
1254
1361
|
|
|
1255
1362
|
_this2.onBlur = function (index, e) {
|
|
@@ -1308,8 +1415,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1308
1415
|
return;
|
|
1309
1416
|
}
|
|
1310
1417
|
|
|
1311
|
-
var
|
|
1312
|
-
isNewRetailBCPos =
|
|
1418
|
+
var _ref12 = _mutantsUtil.platform || {},
|
|
1419
|
+
isNewRetailBCPos = _ref12.isNewRetailBCPos;
|
|
1313
1420
|
|
|
1314
1421
|
if (isNewRetailBCPos) {
|
|
1315
1422
|
_this2.store.paymode.calcDjqCheckValue(q, _this2.store.dto);
|
|
@@ -1344,27 +1451,38 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1344
1451
|
if (_this2.czkdebounced) {
|
|
1345
1452
|
return;
|
|
1346
1453
|
}
|
|
1347
|
-
_this2.czkdebounced = (0, _debounce3.default)((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1348
|
-
|
|
1454
|
+
_this2.czkdebounced = (0, _debounce3.default)((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1455
|
+
var memberdata1;
|
|
1456
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1349
1457
|
while (1) {
|
|
1350
|
-
switch (
|
|
1458
|
+
switch (_context5.prev = _context5.next) {
|
|
1351
1459
|
case 0:
|
|
1352
|
-
|
|
1460
|
+
_context5.next = 2;
|
|
1353
1461
|
return _this2.store.loadCzk(v);
|
|
1354
1462
|
|
|
1355
1463
|
case 2:
|
|
1356
|
-
|
|
1464
|
+
memberdata1 = _context5.sent;
|
|
1465
|
+
|
|
1466
|
+
if (memberdata1 && memberdata1.length === 1) {
|
|
1467
|
+
if (_this2.store.paymode.currentMode.storageCardNo) {
|
|
1468
|
+
_this2.setState({
|
|
1469
|
+
czkValue: _this2.store.paymode.currentMode.storageCardNo
|
|
1470
|
+
});
|
|
1471
|
+
}
|
|
1472
|
+
} else if (memberdata1 && memberdata1.length >= 1) {
|
|
1357
1473
|
_this2.setState({
|
|
1358
|
-
|
|
1474
|
+
czkVisible: true,
|
|
1475
|
+
moreCzkVisible: true,
|
|
1476
|
+
memberdata1: memberdata1
|
|
1359
1477
|
});
|
|
1360
1478
|
}
|
|
1361
1479
|
|
|
1362
|
-
case
|
|
1480
|
+
case 4:
|
|
1363
1481
|
case 'end':
|
|
1364
|
-
return
|
|
1482
|
+
return _context5.stop();
|
|
1365
1483
|
}
|
|
1366
1484
|
}
|
|
1367
|
-
},
|
|
1485
|
+
}, _callee5, _this3);
|
|
1368
1486
|
})), 1000, {
|
|
1369
1487
|
'leading': true,
|
|
1370
1488
|
'trailing': false
|
|
@@ -1532,13 +1650,21 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1532
1650
|
return null;
|
|
1533
1651
|
};
|
|
1534
1652
|
|
|
1535
|
-
_this2.setFocusAndSelection = function (key) {
|
|
1653
|
+
_this2.setFocusAndSelection = function (key, payId) {
|
|
1536
1654
|
var that = _this2;
|
|
1537
1655
|
var paymode = _this2.store.paymode;
|
|
1538
1656
|
|
|
1657
|
+
var _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(),
|
|
1658
|
+
PayStyle = _enumController$getEn19.PayStyle;
|
|
1659
|
+
|
|
1539
1660
|
var themode = (0, _find3.default)(paymode.thePaymodes, function (mode) {
|
|
1540
1661
|
return mode.paymentType === key;
|
|
1541
1662
|
});
|
|
1663
|
+
if (key === PayStyle.hyczk) {
|
|
1664
|
+
themode = (0, _find3.default)(paymode.thePaymodes, function (mode) {
|
|
1665
|
+
return mode.paymethodId === payId;
|
|
1666
|
+
});
|
|
1667
|
+
}
|
|
1542
1668
|
var index = themode && themode.paymethodId || -1;
|
|
1543
1669
|
if (index !== -1) {
|
|
1544
1670
|
setTimeout(function () {
|
|
@@ -1553,11 +1679,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1553
1679
|
}
|
|
1554
1680
|
};
|
|
1555
1681
|
|
|
1556
|
-
_this2.settleUnReturn = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1682
|
+
_this2.settleUnReturn = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7() {
|
|
1557
1683
|
var that;
|
|
1558
|
-
return _regenerator2.default.wrap(function
|
|
1684
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1559
1685
|
while (1) {
|
|
1560
|
-
switch (
|
|
1686
|
+
switch (_context7.prev = _context7.next) {
|
|
1561
1687
|
case 0:
|
|
1562
1688
|
that = _this2;
|
|
1563
1689
|
|
|
@@ -1580,18 +1706,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1580
1706
|
onOk: function onOk() {
|
|
1581
1707
|
var _this4 = this;
|
|
1582
1708
|
|
|
1583
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1709
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
|
|
1584
1710
|
var result;
|
|
1585
|
-
return _regenerator2.default.wrap(function
|
|
1711
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1586
1712
|
while (1) {
|
|
1587
|
-
switch (
|
|
1713
|
+
switch (_context6.prev = _context6.next) {
|
|
1588
1714
|
case 0:
|
|
1589
1715
|
window.__queryingModal = (0, _utils.openQueryingModal)();
|
|
1590
|
-
|
|
1716
|
+
_context6.next = 3;
|
|
1591
1717
|
return that.store.querySettleResult();
|
|
1592
1718
|
|
|
1593
1719
|
case 3:
|
|
1594
|
-
result =
|
|
1720
|
+
result = _context6.sent;
|
|
1595
1721
|
|
|
1596
1722
|
setTimeout(function () {
|
|
1597
1723
|
if (window.__queryingModal) {
|
|
@@ -1599,34 +1725,34 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1599
1725
|
window.__queryingModal = null;
|
|
1600
1726
|
}
|
|
1601
1727
|
}, 0);
|
|
1602
|
-
|
|
1603
|
-
|
|
1728
|
+
_context6.t0 = result.Flag;
|
|
1729
|
+
_context6.next = _context6.t0 === "0" ? 8 : _context6.t0 === "1" ? 11 : _context6.t0 === "2" ? 13 : 15;
|
|
1604
1730
|
break;
|
|
1605
1731
|
|
|
1606
1732
|
case 8:
|
|
1607
1733
|
//成功
|
|
1608
1734
|
that.store.setDtoID(result.ID);
|
|
1609
1735
|
that.settleSuccess();
|
|
1610
|
-
return
|
|
1736
|
+
return _context6.abrupt('break', 15);
|
|
1611
1737
|
|
|
1612
1738
|
case 11:
|
|
1613
1739
|
//处理中
|
|
1614
1740
|
that.settleUnReturn();
|
|
1615
1741
|
// Message.info("结算正在处理中,请稍后再次查询。");
|
|
1616
|
-
return
|
|
1742
|
+
return _context6.abrupt('break', 15);
|
|
1617
1743
|
|
|
1618
1744
|
case 13:
|
|
1619
1745
|
//失败
|
|
1620
1746
|
_message2.default.info('\u7ED3\u7B97\u5931\u8D25\uFF0C\u539F\u56E0:' + result.Message + '\u3002');
|
|
1621
1747
|
// that.settleCanceled();
|
|
1622
|
-
return
|
|
1748
|
+
return _context6.abrupt('break', 15);
|
|
1623
1749
|
|
|
1624
1750
|
case 15:
|
|
1625
1751
|
case 'end':
|
|
1626
|
-
return
|
|
1752
|
+
return _context6.stop();
|
|
1627
1753
|
}
|
|
1628
1754
|
}
|
|
1629
|
-
},
|
|
1755
|
+
}, _callee6, _this4);
|
|
1630
1756
|
}))();
|
|
1631
1757
|
},
|
|
1632
1758
|
onCancel: function onCancel() {
|
|
@@ -1636,10 +1762,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1636
1762
|
|
|
1637
1763
|
case 2:
|
|
1638
1764
|
case 'end':
|
|
1639
|
-
return
|
|
1765
|
+
return _context7.stop();
|
|
1640
1766
|
}
|
|
1641
1767
|
}
|
|
1642
|
-
},
|
|
1768
|
+
}, _callee7, _this3);
|
|
1643
1769
|
}));
|
|
1644
1770
|
|
|
1645
1771
|
_this2.settleCanceled = function () {
|
|
@@ -1648,15 +1774,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1648
1774
|
_this2.cancelState();
|
|
1649
1775
|
};
|
|
1650
1776
|
|
|
1651
|
-
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1652
|
-
var _enumController$
|
|
1777
|
+
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
|
1778
|
+
var _enumController$getEn20, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, getSettleGift, type, resp1;
|
|
1653
1779
|
|
|
1654
|
-
return _regenerator2.default.wrap(function
|
|
1780
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1655
1781
|
while (1) {
|
|
1656
|
-
switch (
|
|
1782
|
+
switch (_context8.prev = _context8.next) {
|
|
1657
1783
|
case 0:
|
|
1658
1784
|
//提示成功
|
|
1659
|
-
_enumController$
|
|
1785
|
+
_enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn20.PayStyle;
|
|
1660
1786
|
_this2$store$paymode = _this2.store.paymode, amount = _this2$store$paymode.amount, received = _this2$store$paymode.received, thePaymodes = _this2$store$paymode.thePaymodes;
|
|
1661
1787
|
IdbusiType = _this2.store.dto.IdbusiType;
|
|
1662
1788
|
charge = _this2.store.paymode.charge;
|
|
@@ -1714,22 +1840,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1714
1840
|
resp1 = false;
|
|
1715
1841
|
|
|
1716
1842
|
if (!(type !== 1)) {
|
|
1717
|
-
|
|
1843
|
+
_context8.next = 20;
|
|
1718
1844
|
break;
|
|
1719
1845
|
}
|
|
1720
1846
|
|
|
1721
|
-
|
|
1722
|
-
|
|
1847
|
+
_context8.prev = 11;
|
|
1848
|
+
_context8.next = 14;
|
|
1723
1849
|
return getSettleGift();
|
|
1724
1850
|
|
|
1725
1851
|
case 14:
|
|
1726
|
-
resp1 =
|
|
1727
|
-
|
|
1852
|
+
resp1 = _context8.sent;
|
|
1853
|
+
_context8.next = 20;
|
|
1728
1854
|
break;
|
|
1729
1855
|
|
|
1730
1856
|
case 17:
|
|
1731
|
-
|
|
1732
|
-
|
|
1857
|
+
_context8.prev = 17;
|
|
1858
|
+
_context8.t0 = _context8['catch'](11);
|
|
1733
1859
|
|
|
1734
1860
|
console.log("获取支付礼包getSettleGift失败");
|
|
1735
1861
|
|
|
@@ -1767,23 +1893,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1767
1893
|
|
|
1768
1894
|
case 21:
|
|
1769
1895
|
case 'end':
|
|
1770
|
-
return
|
|
1896
|
+
return _context8.stop();
|
|
1771
1897
|
}
|
|
1772
1898
|
}
|
|
1773
|
-
},
|
|
1899
|
+
}, _callee8, _this3, [[11, 17]]);
|
|
1774
1900
|
}));
|
|
1775
1901
|
|
|
1776
1902
|
_this2.handleGuestShow = function (dtype, value) {
|
|
1777
1903
|
if (_this2.hasElectron === false) return;
|
|
1778
1904
|
var dt = _mutantsMicrofx.localStore.get('portsetting_hardSet') || [];
|
|
1779
1905
|
|
|
1780
|
-
var
|
|
1781
|
-
guestshow_enable =
|
|
1782
|
-
guestshow_clear =
|
|
1783
|
-
guestshow_welcome =
|
|
1784
|
-
guestshow_collect =
|
|
1785
|
-
guestshow_refund =
|
|
1786
|
-
guestshow_change =
|
|
1906
|
+
var _ref16 = dt || {},
|
|
1907
|
+
guestshow_enable = _ref16.guestshow_enable,
|
|
1908
|
+
guestshow_clear = _ref16.guestshow_clear,
|
|
1909
|
+
guestshow_welcome = _ref16.guestshow_welcome,
|
|
1910
|
+
guestshow_collect = _ref16.guestshow_collect,
|
|
1911
|
+
guestshow_refund = _ref16.guestshow_refund,
|
|
1912
|
+
guestshow_change = _ref16.guestshow_change;
|
|
1787
1913
|
|
|
1788
1914
|
var hasSuccess = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('portsetting_hardSet_isSuccess');
|
|
1789
1915
|
if (!guestshow_enable || !!guestshow_enable && hasSuccess == '0') return;
|
|
@@ -1818,108 +1944,108 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1818
1944
|
};
|
|
1819
1945
|
|
|
1820
1946
|
_this2.handleSettle = function () {
|
|
1821
|
-
var
|
|
1947
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(args) {
|
|
1822
1948
|
var handleUserInputs = function () {
|
|
1823
|
-
var
|
|
1949
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(promises) {
|
|
1824
1950
|
var results, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, p, _result;
|
|
1825
1951
|
|
|
1826
|
-
return _regenerator2.default.wrap(function
|
|
1952
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
1827
1953
|
while (1) {
|
|
1828
|
-
switch (
|
|
1954
|
+
switch (_context10.prev = _context10.next) {
|
|
1829
1955
|
case 0:
|
|
1830
1956
|
results = [];
|
|
1831
|
-
|
|
1957
|
+
_context10.prev = 1;
|
|
1832
1958
|
_iteratorNormalCompletion = true;
|
|
1833
1959
|
_didIteratorError = false;
|
|
1834
1960
|
_iteratorError = undefined;
|
|
1835
|
-
|
|
1961
|
+
_context10.prev = 5;
|
|
1836
1962
|
_iterator = (0, _getIterator3.default)(promises);
|
|
1837
1963
|
|
|
1838
1964
|
case 7:
|
|
1839
1965
|
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
|
|
1840
|
-
|
|
1966
|
+
_context10.next = 16;
|
|
1841
1967
|
break;
|
|
1842
1968
|
}
|
|
1843
1969
|
|
|
1844
1970
|
p = _step.value;
|
|
1845
|
-
|
|
1971
|
+
_context10.next = 11;
|
|
1846
1972
|
return p;
|
|
1847
1973
|
|
|
1848
1974
|
case 11:
|
|
1849
|
-
_result =
|
|
1975
|
+
_result = _context10.sent;
|
|
1850
1976
|
|
|
1851
1977
|
results.push(_result);
|
|
1852
1978
|
|
|
1853
1979
|
case 13:
|
|
1854
1980
|
_iteratorNormalCompletion = true;
|
|
1855
|
-
|
|
1981
|
+
_context10.next = 7;
|
|
1856
1982
|
break;
|
|
1857
1983
|
|
|
1858
1984
|
case 16:
|
|
1859
|
-
|
|
1985
|
+
_context10.next = 22;
|
|
1860
1986
|
break;
|
|
1861
1987
|
|
|
1862
1988
|
case 18:
|
|
1863
|
-
|
|
1864
|
-
|
|
1989
|
+
_context10.prev = 18;
|
|
1990
|
+
_context10.t0 = _context10['catch'](5);
|
|
1865
1991
|
_didIteratorError = true;
|
|
1866
|
-
_iteratorError =
|
|
1992
|
+
_iteratorError = _context10.t0;
|
|
1867
1993
|
|
|
1868
1994
|
case 22:
|
|
1869
|
-
|
|
1870
|
-
|
|
1995
|
+
_context10.prev = 22;
|
|
1996
|
+
_context10.prev = 23;
|
|
1871
1997
|
|
|
1872
1998
|
if (!_iteratorNormalCompletion && _iterator.return) {
|
|
1873
1999
|
_iterator.return();
|
|
1874
2000
|
}
|
|
1875
2001
|
|
|
1876
2002
|
case 25:
|
|
1877
|
-
|
|
2003
|
+
_context10.prev = 25;
|
|
1878
2004
|
|
|
1879
2005
|
if (!_didIteratorError) {
|
|
1880
|
-
|
|
2006
|
+
_context10.next = 28;
|
|
1881
2007
|
break;
|
|
1882
2008
|
}
|
|
1883
2009
|
|
|
1884
2010
|
throw _iteratorError;
|
|
1885
2011
|
|
|
1886
2012
|
case 28:
|
|
1887
|
-
return
|
|
2013
|
+
return _context10.finish(25);
|
|
1888
2014
|
|
|
1889
2015
|
case 29:
|
|
1890
|
-
return
|
|
2016
|
+
return _context10.finish(22);
|
|
1891
2017
|
|
|
1892
2018
|
case 30:
|
|
1893
2019
|
window.__loadingModal = (0, _utils.openLoadingModal)();
|
|
1894
|
-
|
|
2020
|
+
_context10.next = 33;
|
|
1895
2021
|
return commit(results);
|
|
1896
2022
|
|
|
1897
2023
|
case 33:
|
|
1898
|
-
|
|
2024
|
+
_context10.next = 37;
|
|
1899
2025
|
break;
|
|
1900
2026
|
|
|
1901
2027
|
case 35:
|
|
1902
|
-
|
|
1903
|
-
|
|
2028
|
+
_context10.prev = 35;
|
|
2029
|
+
_context10.t1 = _context10['catch'](1);
|
|
1904
2030
|
|
|
1905
2031
|
case 37:
|
|
1906
2032
|
case 'end':
|
|
1907
|
-
return
|
|
2033
|
+
return _context10.stop();
|
|
1908
2034
|
}
|
|
1909
2035
|
}
|
|
1910
|
-
},
|
|
2036
|
+
}, _callee10, this, [[1, 35], [5, 18, 22, 30], [23,, 25, 29]]);
|
|
1911
2037
|
}));
|
|
1912
2038
|
|
|
1913
|
-
return function handleUserInputs(
|
|
1914
|
-
return
|
|
2039
|
+
return function handleUserInputs(_x6) {
|
|
2040
|
+
return _ref19.apply(this, arguments);
|
|
1915
2041
|
};
|
|
1916
2042
|
}();
|
|
1917
2043
|
|
|
1918
|
-
var _enumController$
|
|
2044
|
+
var _enumController$getEn21, PayStyle, _this2$store6, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
|
|
1919
2045
|
|
|
1920
|
-
return _regenerator2.default.wrap(function
|
|
2046
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
1921
2047
|
while (1) {
|
|
1922
|
-
switch (
|
|
2048
|
+
switch (_context11.prev = _context11.next) {
|
|
1923
2049
|
case 0:
|
|
1924
2050
|
_this2.setState({
|
|
1925
2051
|
settleDisabled: true
|
|
@@ -1935,7 +2061,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1935
2061
|
// }
|
|
1936
2062
|
//
|
|
1937
2063
|
// testAsync(p);
|
|
1938
|
-
_enumController$
|
|
2064
|
+
_enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn21.PayStyle;
|
|
1939
2065
|
_this2$store6 = _this2.store, paymode = _this2$store6.paymode, brefund = _this2$store6.brefund, boriginReturn = _this2$store6.boriginReturn, newStyle = _this2$store6.newStyle;
|
|
1940
2066
|
isQuickPay = args === 'quickPay';
|
|
1941
2067
|
that = _this2;
|
|
@@ -1951,7 +2077,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1951
2077
|
});
|
|
1952
2078
|
|
|
1953
2079
|
if (!(that.checkCharge() && Math.abs(paymode.receivable) > that.props.initData("posChangeUpperAmount"))) {
|
|
1954
|
-
|
|
2080
|
+
_context11.next = 13;
|
|
1955
2081
|
break;
|
|
1956
2082
|
}
|
|
1957
2083
|
|
|
@@ -1959,11 +2085,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1959
2085
|
_this2.setState({
|
|
1960
2086
|
settleDisabled: false
|
|
1961
2087
|
});
|
|
1962
|
-
return
|
|
2088
|
+
return _context11.abrupt('return');
|
|
1963
2089
|
|
|
1964
2090
|
case 13:
|
|
1965
2091
|
if (!(args !== "zero" && !newStyle)) {
|
|
1966
|
-
|
|
2092
|
+
_context11.next = 19;
|
|
1967
2093
|
break;
|
|
1968
2094
|
}
|
|
1969
2095
|
|
|
@@ -1972,7 +2098,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1972
2098
|
});
|
|
1973
2099
|
|
|
1974
2100
|
if (!zeromode) {
|
|
1975
|
-
|
|
2101
|
+
_context11.next = 19;
|
|
1976
2102
|
break;
|
|
1977
2103
|
}
|
|
1978
2104
|
|
|
@@ -1980,7 +2106,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1980
2106
|
settleDisabled: false
|
|
1981
2107
|
});
|
|
1982
2108
|
_message2.default.error(zeromode.name + ' 的结算金额为零,不可以结算。');
|
|
1983
|
-
return
|
|
2109
|
+
return _context11.abrupt('return');
|
|
1984
2110
|
|
|
1985
2111
|
case 19:
|
|
1986
2112
|
promises = [];
|
|
@@ -1989,14 +2115,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1989
2115
|
}) : paymode.thePaymodes, 'orderBy');
|
|
1990
2116
|
|
|
1991
2117
|
if (!isQuickPay) {
|
|
1992
|
-
|
|
2118
|
+
_context11.next = 27;
|
|
1993
2119
|
break;
|
|
1994
2120
|
}
|
|
1995
2121
|
|
|
1996
2122
|
quickmode = thePaymodes[0];
|
|
1997
2123
|
|
|
1998
2124
|
if (!_this2.checkModeDisabled(quickmode.paymentType, brefund, boriginReturn)) {
|
|
1999
|
-
|
|
2125
|
+
_context11.next = 27;
|
|
2000
2126
|
break;
|
|
2001
2127
|
}
|
|
2002
2128
|
|
|
@@ -2004,7 +2130,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2004
2130
|
settleDisabled: false
|
|
2005
2131
|
});
|
|
2006
2132
|
_message2.default.error('退款不能使用' + quickmode.name + '结算,请使用其他结算方式!');
|
|
2007
|
-
return
|
|
2133
|
+
return _context11.abrupt('return');
|
|
2008
2134
|
|
|
2009
2135
|
case 27:
|
|
2010
2136
|
(0, _forEach3.default)(thePaymodes, function (mode) {
|
|
@@ -2014,27 +2140,27 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2014
2140
|
});
|
|
2015
2141
|
|
|
2016
2142
|
commit = function () {
|
|
2017
|
-
var
|
|
2143
|
+
var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(values) {
|
|
2018
2144
|
var result;
|
|
2019
|
-
return _regenerator2.default.wrap(function
|
|
2145
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
2020
2146
|
while (1) {
|
|
2021
|
-
switch (
|
|
2147
|
+
switch (_context9.prev = _context9.next) {
|
|
2022
2148
|
case 0:
|
|
2023
|
-
|
|
2149
|
+
_context9.next = 2;
|
|
2024
2150
|
return _this2.store.commit(_this2.props.bTest);
|
|
2025
2151
|
|
|
2026
2152
|
case 2:
|
|
2027
|
-
result =
|
|
2153
|
+
result = _context9.sent;
|
|
2028
2154
|
|
|
2029
2155
|
if (!(result === true)) {
|
|
2030
|
-
|
|
2156
|
+
_context9.next = 8;
|
|
2031
2157
|
break;
|
|
2032
2158
|
}
|
|
2033
2159
|
|
|
2034
2160
|
//成功
|
|
2035
2161
|
that.settleSuccess();
|
|
2036
2162
|
_promise2.default.resolve();
|
|
2037
|
-
|
|
2163
|
+
_context9.next = 23;
|
|
2038
2164
|
break;
|
|
2039
2165
|
|
|
2040
2166
|
case 8:
|
|
@@ -2051,24 +2177,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2051
2177
|
}, 0);
|
|
2052
2178
|
|
|
2053
2179
|
if (!(result && (result.Code || result.code))) {
|
|
2054
|
-
|
|
2180
|
+
_context9.next = 20;
|
|
2055
2181
|
break;
|
|
2056
2182
|
}
|
|
2057
2183
|
|
|
2058
|
-
|
|
2059
|
-
|
|
2184
|
+
_context9.t0 = result.Code || result.code;
|
|
2185
|
+
_context9.next = _context9.t0 === 'RE_Settle_UnReturn' ? 14 : _context9.t0 === 'ECONNABORTED' ? 18 : 20;
|
|
2060
2186
|
break;
|
|
2061
2187
|
|
|
2062
2188
|
case 14:
|
|
2063
2189
|
console.log('settlement--RE_Settle_UnReturn--调用清除数据==Focus==');
|
|
2064
2190
|
_this2.props.clearVoucherData && _this2.props.clearVoucherData();
|
|
2065
2191
|
_this2.cancelState();
|
|
2066
|
-
return
|
|
2192
|
+
return _context9.abrupt('break', 20);
|
|
2067
2193
|
|
|
2068
2194
|
case 18:
|
|
2069
2195
|
//error.code === 'ECONNABORTED' && error.message.indexOf('timeout')
|
|
2070
2196
|
result.message.indexOf('timeout') > -1 && that.settleUnReturn();
|
|
2071
|
-
return
|
|
2197
|
+
return _context9.abrupt('break', 20);
|
|
2072
2198
|
|
|
2073
2199
|
case 20:
|
|
2074
2200
|
if (isQuickPay) {
|
|
@@ -2076,19 +2202,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2076
2202
|
that.cancelState();
|
|
2077
2203
|
}
|
|
2078
2204
|
|
|
2079
|
-
|
|
2205
|
+
_context9.next = 23;
|
|
2080
2206
|
return _promise2.default.reject();
|
|
2081
2207
|
|
|
2082
2208
|
case 23:
|
|
2083
2209
|
case 'end':
|
|
2084
|
-
return
|
|
2210
|
+
return _context9.stop();
|
|
2085
2211
|
}
|
|
2086
2212
|
}
|
|
2087
|
-
},
|
|
2213
|
+
}, _callee9, _this3);
|
|
2088
2214
|
}));
|
|
2089
2215
|
|
|
2090
|
-
return function commit(
|
|
2091
|
-
return
|
|
2216
|
+
return function commit(_x5) {
|
|
2217
|
+
return _ref18.apply(this, arguments);
|
|
2092
2218
|
};
|
|
2093
2219
|
}();
|
|
2094
2220
|
|
|
@@ -2096,102 +2222,102 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2096
2222
|
|
|
2097
2223
|
case 30:
|
|
2098
2224
|
case 'end':
|
|
2099
|
-
return
|
|
2225
|
+
return _context11.stop();
|
|
2100
2226
|
}
|
|
2101
2227
|
}
|
|
2102
|
-
},
|
|
2228
|
+
}, _callee11, _this3);
|
|
2103
2229
|
}));
|
|
2104
2230
|
|
|
2105
|
-
return function (
|
|
2106
|
-
return
|
|
2231
|
+
return function (_x4) {
|
|
2232
|
+
return _ref17.apply(this, arguments);
|
|
2107
2233
|
};
|
|
2108
2234
|
}();
|
|
2109
2235
|
|
|
2110
|
-
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
2236
|
+
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
|
|
2111
2237
|
var handleUserInputs = function () {
|
|
2112
|
-
var
|
|
2238
|
+
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(promises) {
|
|
2113
2239
|
var results, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, p, _result2;
|
|
2114
2240
|
|
|
2115
|
-
return _regenerator2.default.wrap(function
|
|
2241
|
+
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
|
2116
2242
|
while (1) {
|
|
2117
|
-
switch (
|
|
2243
|
+
switch (_context13.prev = _context13.next) {
|
|
2118
2244
|
case 0:
|
|
2119
2245
|
results = [];
|
|
2120
|
-
|
|
2246
|
+
_context13.prev = 1;
|
|
2121
2247
|
_iteratorNormalCompletion2 = true;
|
|
2122
2248
|
_didIteratorError2 = false;
|
|
2123
2249
|
_iteratorError2 = undefined;
|
|
2124
|
-
|
|
2250
|
+
_context13.prev = 5;
|
|
2125
2251
|
_iterator2 = (0, _getIterator3.default)(promises);
|
|
2126
2252
|
|
|
2127
2253
|
case 7:
|
|
2128
2254
|
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {
|
|
2129
|
-
|
|
2255
|
+
_context13.next = 16;
|
|
2130
2256
|
break;
|
|
2131
2257
|
}
|
|
2132
2258
|
|
|
2133
2259
|
p = _step2.value;
|
|
2134
|
-
|
|
2260
|
+
_context13.next = 11;
|
|
2135
2261
|
return p;
|
|
2136
2262
|
|
|
2137
2263
|
case 11:
|
|
2138
|
-
_result2 =
|
|
2264
|
+
_result2 = _context13.sent;
|
|
2139
2265
|
|
|
2140
2266
|
results.push(_result2);
|
|
2141
2267
|
|
|
2142
2268
|
case 13:
|
|
2143
2269
|
_iteratorNormalCompletion2 = true;
|
|
2144
|
-
|
|
2270
|
+
_context13.next = 7;
|
|
2145
2271
|
break;
|
|
2146
2272
|
|
|
2147
2273
|
case 16:
|
|
2148
|
-
|
|
2274
|
+
_context13.next = 22;
|
|
2149
2275
|
break;
|
|
2150
2276
|
|
|
2151
2277
|
case 18:
|
|
2152
|
-
|
|
2153
|
-
|
|
2278
|
+
_context13.prev = 18;
|
|
2279
|
+
_context13.t0 = _context13['catch'](5);
|
|
2154
2280
|
_didIteratorError2 = true;
|
|
2155
|
-
_iteratorError2 =
|
|
2281
|
+
_iteratorError2 = _context13.t0;
|
|
2156
2282
|
|
|
2157
2283
|
case 22:
|
|
2158
|
-
|
|
2159
|
-
|
|
2284
|
+
_context13.prev = 22;
|
|
2285
|
+
_context13.prev = 23;
|
|
2160
2286
|
|
|
2161
2287
|
if (!_iteratorNormalCompletion2 && _iterator2.return) {
|
|
2162
2288
|
_iterator2.return();
|
|
2163
2289
|
}
|
|
2164
2290
|
|
|
2165
2291
|
case 25:
|
|
2166
|
-
|
|
2292
|
+
_context13.prev = 25;
|
|
2167
2293
|
|
|
2168
2294
|
if (!_didIteratorError2) {
|
|
2169
|
-
|
|
2295
|
+
_context13.next = 28;
|
|
2170
2296
|
break;
|
|
2171
2297
|
}
|
|
2172
2298
|
|
|
2173
2299
|
throw _iteratorError2;
|
|
2174
2300
|
|
|
2175
2301
|
case 28:
|
|
2176
|
-
return
|
|
2302
|
+
return _context13.finish(25);
|
|
2177
2303
|
|
|
2178
2304
|
case 29:
|
|
2179
|
-
return
|
|
2305
|
+
return _context13.finish(22);
|
|
2180
2306
|
|
|
2181
2307
|
case 30:
|
|
2182
|
-
|
|
2308
|
+
_context13.next = 32;
|
|
2183
2309
|
return commit(results);
|
|
2184
2310
|
|
|
2185
2311
|
case 32:
|
|
2186
|
-
|
|
2312
|
+
_context13.next = 37;
|
|
2187
2313
|
break;
|
|
2188
2314
|
|
|
2189
2315
|
case 34:
|
|
2190
|
-
|
|
2191
|
-
|
|
2316
|
+
_context13.prev = 34;
|
|
2317
|
+
_context13.t1 = _context13['catch'](1);
|
|
2192
2318
|
|
|
2193
|
-
if (
|
|
2194
|
-
_message2.default.error(
|
|
2319
|
+
if (_context13.t1 != "cancelpwd") {
|
|
2320
|
+
_message2.default.error(_context13.t1);
|
|
2195
2321
|
setTimeout(function () {
|
|
2196
2322
|
that.handleCzk();
|
|
2197
2323
|
}, 500);
|
|
@@ -2199,37 +2325,41 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2199
2325
|
|
|
2200
2326
|
case 37:
|
|
2201
2327
|
case 'end':
|
|
2202
|
-
return
|
|
2328
|
+
return _context13.stop();
|
|
2203
2329
|
}
|
|
2204
2330
|
}
|
|
2205
|
-
},
|
|
2331
|
+
}, _callee13, this, [[1, 34], [5, 18, 22, 30], [23,, 25, 29]]);
|
|
2206
2332
|
}));
|
|
2207
2333
|
|
|
2208
|
-
return function handleUserInputs(
|
|
2209
|
-
return
|
|
2334
|
+
return function handleUserInputs(_x8) {
|
|
2335
|
+
return _ref23.apply(this, arguments);
|
|
2210
2336
|
};
|
|
2211
2337
|
}();
|
|
2212
2338
|
|
|
2213
|
-
var that, curmode, promises,
|
|
2339
|
+
var that, curmode, promises, _ref21, isNewRetailBCPos, _enumController$getEn22, PayStyle, commit;
|
|
2214
2340
|
|
|
2215
|
-
return _regenerator2.default.wrap(function
|
|
2341
|
+
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
|
2216
2342
|
while (1) {
|
|
2217
|
-
switch (
|
|
2343
|
+
switch (_context14.prev = _context14.next) {
|
|
2218
2344
|
case 0:
|
|
2219
2345
|
that = _this2;
|
|
2220
2346
|
curmode = _this2.store.paymode.currentMode;
|
|
2221
2347
|
promises = [];
|
|
2222
|
-
|
|
2348
|
+
_ref21 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref21.isNewRetailBCPos;
|
|
2223
2349
|
|
|
2224
2350
|
if (isNewRetailBCPos) {
|
|
2225
2351
|
if (curmode.value > 0) {
|
|
2226
|
-
_enumController$
|
|
2352
|
+
_enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn22.PayStyle;
|
|
2227
2353
|
|
|
2228
2354
|
if (curmode.paymentType === PayStyle.hyczk) {
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2355
|
+
if (curmode.cardTypeEnum === 'BALANCE_CARD') {
|
|
2356
|
+
!curmode.freePaymentPasswordStore && promises.push(that.inputPwd(curmode));
|
|
2357
|
+
} else {
|
|
2358
|
+
if (_this2.store.dto.Idmember === curmode.memberId) {
|
|
2359
|
+
!curmode.freePaymentPasswordStore && promises.push(that.inputPwd(curmode));
|
|
2360
|
+
} else {
|
|
2361
|
+
curmode.isNeedPassword && promises.push(that.inputPwd(curmode));
|
|
2362
|
+
}
|
|
2233
2363
|
}
|
|
2234
2364
|
}
|
|
2235
2365
|
}
|
|
@@ -2240,57 +2370,57 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2240
2370
|
}
|
|
2241
2371
|
|
|
2242
2372
|
commit = function () {
|
|
2243
|
-
var
|
|
2373
|
+
var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(values) {
|
|
2244
2374
|
var result;
|
|
2245
|
-
return _regenerator2.default.wrap(function
|
|
2375
|
+
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
|
2246
2376
|
while (1) {
|
|
2247
|
-
switch (
|
|
2377
|
+
switch (_context12.prev = _context12.next) {
|
|
2248
2378
|
case 0:
|
|
2249
2379
|
if (!(values.length > 0)) {
|
|
2250
|
-
|
|
2380
|
+
_context12.next = 6;
|
|
2251
2381
|
break;
|
|
2252
2382
|
}
|
|
2253
2383
|
|
|
2254
|
-
|
|
2384
|
+
_context12.next = 3;
|
|
2255
2385
|
return that.store.validePwd(values[0]);
|
|
2256
2386
|
|
|
2257
2387
|
case 3:
|
|
2258
|
-
|
|
2259
|
-
|
|
2388
|
+
_context12.t0 = _context12.sent;
|
|
2389
|
+
_context12.next = 7;
|
|
2260
2390
|
break;
|
|
2261
2391
|
|
|
2262
2392
|
case 6:
|
|
2263
|
-
|
|
2393
|
+
_context12.t0 = "";
|
|
2264
2394
|
|
|
2265
2395
|
case 7:
|
|
2266
|
-
result =
|
|
2396
|
+
result = _context12.t0;
|
|
2267
2397
|
|
|
2268
2398
|
if (!(result == "")) {
|
|
2269
|
-
|
|
2399
|
+
_context12.next = 13;
|
|
2270
2400
|
break;
|
|
2271
2401
|
}
|
|
2272
2402
|
|
|
2273
2403
|
//成功
|
|
2274
2404
|
//返回
|
|
2275
|
-
that.setCurrentFocusAndAddPay(curmode.paymentType);
|
|
2405
|
+
that.setCurrentFocusAndAddPay(curmode.paymentType, curmode.paymethodId);
|
|
2276
2406
|
_promise2.default.resolve();
|
|
2277
|
-
|
|
2407
|
+
_context12.next = 15;
|
|
2278
2408
|
break;
|
|
2279
2409
|
|
|
2280
2410
|
case 13:
|
|
2281
|
-
|
|
2411
|
+
_context12.next = 15;
|
|
2282
2412
|
return _promise2.default.reject(result);
|
|
2283
2413
|
|
|
2284
2414
|
case 15:
|
|
2285
2415
|
case 'end':
|
|
2286
|
-
return
|
|
2416
|
+
return _context12.stop();
|
|
2287
2417
|
}
|
|
2288
2418
|
}
|
|
2289
|
-
},
|
|
2419
|
+
}, _callee12, _this3);
|
|
2290
2420
|
}));
|
|
2291
2421
|
|
|
2292
|
-
return function commit(
|
|
2293
|
-
return
|
|
2422
|
+
return function commit(_x7) {
|
|
2423
|
+
return _ref22.apply(this, arguments);
|
|
2294
2424
|
};
|
|
2295
2425
|
}();
|
|
2296
2426
|
|
|
@@ -2298,10 +2428,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2298
2428
|
|
|
2299
2429
|
case 7:
|
|
2300
2430
|
case 'end':
|
|
2301
|
-
return
|
|
2431
|
+
return _context14.stop();
|
|
2302
2432
|
}
|
|
2303
2433
|
}
|
|
2304
|
-
},
|
|
2434
|
+
}, _callee14, _this3);
|
|
2305
2435
|
}));
|
|
2306
2436
|
|
|
2307
2437
|
_this2.fKeyboardOnOk = function (paymethodeId) {
|
|
@@ -2341,15 +2471,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2341
2471
|
};
|
|
2342
2472
|
|
|
2343
2473
|
_this2.inputPwd = function () {
|
|
2344
|
-
var
|
|
2474
|
+
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(paymode) {
|
|
2345
2475
|
var that, confirmPwd;
|
|
2346
|
-
return _regenerator2.default.wrap(function
|
|
2476
|
+
return _regenerator2.default.wrap(function _callee15$(_context15) {
|
|
2347
2477
|
while (1) {
|
|
2348
|
-
switch (
|
|
2478
|
+
switch (_context15.prev = _context15.next) {
|
|
2349
2479
|
case 0:
|
|
2350
2480
|
that = _this2;
|
|
2351
2481
|
confirmPwd = _this2.state.confirmPwd;
|
|
2352
|
-
return
|
|
2482
|
+
return _context15.abrupt('return', new _promise2.default(function (resolve, reject) {
|
|
2353
2483
|
var modal = (0, _asyncModal2.default)({
|
|
2354
2484
|
onPressEnter: function onPressEnter() {
|
|
2355
2485
|
_keyboard2.default.close();
|
|
@@ -2357,8 +2487,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2357
2487
|
// if (v !== '') {
|
|
2358
2488
|
modal.destroy();
|
|
2359
2489
|
|
|
2360
|
-
var
|
|
2361
|
-
confirmPwd =
|
|
2490
|
+
var _ref25 = that.state || {},
|
|
2491
|
+
confirmPwd = _ref25.confirmPwd;
|
|
2362
2492
|
|
|
2363
2493
|
setTimeout(function () {
|
|
2364
2494
|
paymode.authCode = v;
|
|
@@ -2448,8 +2578,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2448
2578
|
type: 'primary', size: 'large', onClick: function onClick() {
|
|
2449
2579
|
var v = (0, _trim3.default)(that['inputAmount']['input']['value']);
|
|
2450
2580
|
|
|
2451
|
-
var
|
|
2452
|
-
confirmPwd =
|
|
2581
|
+
var _ref26 = that.state || {},
|
|
2582
|
+
confirmPwd = _ref26.confirmPwd;
|
|
2453
2583
|
// if (v !== '') {
|
|
2454
2584
|
|
|
2455
2585
|
|
|
@@ -2483,24 +2613,25 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2483
2613
|
|
|
2484
2614
|
case 3:
|
|
2485
2615
|
case 'end':
|
|
2486
|
-
return
|
|
2616
|
+
return _context15.stop();
|
|
2487
2617
|
}
|
|
2488
2618
|
}
|
|
2489
|
-
},
|
|
2619
|
+
}, _callee15, _this3);
|
|
2490
2620
|
}));
|
|
2491
2621
|
|
|
2492
|
-
return function (
|
|
2493
|
-
return
|
|
2622
|
+
return function (_x9) {
|
|
2623
|
+
return _ref24.apply(this, arguments);
|
|
2494
2624
|
};
|
|
2495
2625
|
}();
|
|
2496
2626
|
|
|
2497
2627
|
_this2.btnDebounced = function (type, bquick) {
|
|
2498
2628
|
_this2.setState({
|
|
2499
|
-
bquick: bquick
|
|
2629
|
+
bquick: bquick,
|
|
2630
|
+
isInputMember: true
|
|
2500
2631
|
});
|
|
2501
2632
|
|
|
2502
|
-
var _enumController$
|
|
2503
|
-
PayStyle = _enumController$
|
|
2633
|
+
var _enumController$getEn23 = _mutantsUtil.enumController.getEnumOj(),
|
|
2634
|
+
PayStyle = _enumController$getEn23.PayStyle;
|
|
2504
2635
|
|
|
2505
2636
|
var _this2$store7 = _this2.store,
|
|
2506
2637
|
paymode = _this2$store7.paymode,
|
|
@@ -2543,13 +2674,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2543
2674
|
|
|
2544
2675
|
_this2.onCzkChange = function (v) {
|
|
2545
2676
|
// console.log("czk change:"+new Date().toLocaleTimeString())
|
|
2546
|
-
var
|
|
2547
|
-
isNewRetailBCPos =
|
|
2677
|
+
var _ref27 = _mutantsUtil.platform || {},
|
|
2678
|
+
isNewRetailBCPos = _ref27.isNewRetailBCPos;
|
|
2548
2679
|
|
|
2549
2680
|
if (!isNewRetailBCPos) {
|
|
2550
2681
|
_this2.store.paymode.currentMode.member.setCardNo(v);
|
|
2551
2682
|
}
|
|
2552
|
-
if (!/^[
|
|
2683
|
+
if (!/^[A-Za-z0-9]*$/.test(v)) {
|
|
2553
2684
|
return;
|
|
2554
2685
|
}
|
|
2555
2686
|
_this2.setState({
|
|
@@ -2605,8 +2736,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2605
2736
|
};
|
|
2606
2737
|
|
|
2607
2738
|
_this2.checkCharge = function () {
|
|
2608
|
-
var _enumController$
|
|
2609
|
-
PayStyle = _enumController$
|
|
2739
|
+
var _enumController$getEn24 = _mutantsUtil.enumController.getEnumOj(),
|
|
2740
|
+
PayStyle = _enumController$getEn24.PayStyle;
|
|
2610
2741
|
|
|
2611
2742
|
var paymode = _this2.store.paymode;
|
|
2612
2743
|
|
|
@@ -2653,8 +2784,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2653
2784
|
};
|
|
2654
2785
|
|
|
2655
2786
|
_this2.getXianjinPayment = function (payType, value) {
|
|
2656
|
-
var _enumController$
|
|
2657
|
-
PayStyle = _enumController$
|
|
2787
|
+
var _enumController$getEn25 = _mutantsUtil.enumController.getEnumOj(),
|
|
2788
|
+
PayStyle = _enumController$getEn25.PayStyle;
|
|
2658
2789
|
|
|
2659
2790
|
var isManualIntoAmount = _this2.state.isManualIntoAmount;
|
|
2660
2791
|
|
|
@@ -2662,8 +2793,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2662
2793
|
};
|
|
2663
2794
|
|
|
2664
2795
|
_this2.getXianjinBalance = function (payType, value) {
|
|
2665
|
-
var _enumController$
|
|
2666
|
-
PayStyle = _enumController$
|
|
2796
|
+
var _enumController$getEn26 = _mutantsUtil.enumController.getEnumOj(),
|
|
2797
|
+
PayStyle = _enumController$getEn26.PayStyle;
|
|
2667
2798
|
//找零金额-存在权限控制
|
|
2668
2799
|
|
|
2669
2800
|
|
|
@@ -2683,9 +2814,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2683
2814
|
var isManualIntoAmount = void 0;
|
|
2684
2815
|
// 付款弹窗
|
|
2685
2816
|
return new _promise2.default(function (resolve, reject) {
|
|
2686
|
-
var _enumController$
|
|
2687
|
-
PayStyle = _enumController$
|
|
2688
|
-
PayIcon2 = _enumController$
|
|
2817
|
+
var _enumController$getEn27 = _mutantsUtil.enumController.getEnumOj(),
|
|
2818
|
+
PayStyle = _enumController$getEn27.PayStyle,
|
|
2819
|
+
PayIcon2 = _enumController$getEn27.PayIcon2;
|
|
2689
2820
|
|
|
2690
2821
|
var modal = (0, _asyncModal2.default)({
|
|
2691
2822
|
onPressEnter: function onPressEnter() {
|
|
@@ -2954,8 +3085,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2954
3085
|
paymode = _this2$store8.paymode,
|
|
2955
3086
|
newStyle = _this2$store8.newStyle;
|
|
2956
3087
|
|
|
2957
|
-
var _enumController$
|
|
2958
|
-
PayStyle = _enumController$
|
|
3088
|
+
var _enumController$getEn28 = _mutantsUtil.enumController.getEnumOj(),
|
|
3089
|
+
PayStyle = _enumController$getEn28.PayStyle;
|
|
2959
3090
|
|
|
2960
3091
|
var payTypeList = [PayStyle.SQBPAY, PayStyle.CSYH, PayStyle.smzf];
|
|
2961
3092
|
var payTypeFilterList = payTypeList.filter(function (filterType) {
|
|
@@ -2976,15 +3107,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2976
3107
|
};
|
|
2977
3108
|
|
|
2978
3109
|
_this2.checkModeDisabled = function (type, brefund, boriginReturn) {
|
|
2979
|
-
var _enumController$
|
|
2980
|
-
PayStyle = _enumController$
|
|
3110
|
+
var _enumController$getEn29 = _mutantsUtil.enumController.getEnumOj(),
|
|
3111
|
+
PayStyle = _enumController$getEn29.PayStyle;
|
|
2981
3112
|
|
|
2982
3113
|
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);
|
|
2983
3114
|
};
|
|
2984
3115
|
|
|
2985
3116
|
_this2.checkSettleDisabled = function (paymode, thePaymodes) {
|
|
2986
|
-
var _enumController$
|
|
2987
|
-
PayStyle = _enumController$
|
|
3117
|
+
var _enumController$getEn30 = _mutantsUtil.enumController.getEnumOj(),
|
|
3118
|
+
PayStyle = _enumController$getEn30.PayStyle;
|
|
2988
3119
|
|
|
2989
3120
|
console.log("settlement.checkSettleDisabled开始执行,参数:", { paymode: paymode, thePaymodes: thePaymodes });
|
|
2990
3121
|
if (paymode.amount == 0 && paymode.received == 0) {
|
|
@@ -3030,8 +3161,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3030
3161
|
};
|
|
3031
3162
|
|
|
3032
3163
|
_this2.editCzkModal = function () {
|
|
3033
|
-
var _enumController$
|
|
3034
|
-
PayStyle = _enumController$
|
|
3164
|
+
var _enumController$getEn31 = _mutantsUtil.enumController.getEnumOj(),
|
|
3165
|
+
PayStyle = _enumController$getEn31.PayStyle;
|
|
3035
3166
|
|
|
3036
3167
|
(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
|
|
3037
3168
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
@@ -3097,9 +3228,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3097
3228
|
isPrototypeClick: false
|
|
3098
3229
|
});
|
|
3099
3230
|
var that = _this2;
|
|
3100
|
-
var _this2$
|
|
3101
|
-
bquick = _this2$
|
|
3102
|
-
isPrototypeClick = _this2$
|
|
3231
|
+
var _this2$state3 = _this2.state,
|
|
3232
|
+
bquick = _this2$state3.bquick,
|
|
3233
|
+
isPrototypeClick = _this2$state3.isPrototypeClick;
|
|
3103
3234
|
|
|
3104
3235
|
if (!isPrototypeClick) {
|
|
3105
3236
|
if (bquick) {
|
|
@@ -3125,23 +3256,26 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3125
3256
|
|
|
3126
3257
|
_this2.hasElectron = hasElectron;
|
|
3127
3258
|
|
|
3128
|
-
var
|
|
3129
|
-
|
|
3130
|
-
|
|
3259
|
+
var _ref28 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {},
|
|
3260
|
+
MemberMeStorageCardInputByKeyBoard = _ref28.MemberMeStorageCardInputByKeyBoard,
|
|
3261
|
+
ICCardServer = _ref28.ICCardServer,
|
|
3262
|
+
ICCardPassword = _ref28.ICCardPassword;
|
|
3131
3263
|
|
|
3264
|
+
_this2.isStorageCardInputType = MemberMeStorageCardInputByKeyBoard; // 仅储值卡是否禁用键盘输入,'0'为不禁用 '1'为禁用
|
|
3132
3265
|
_this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
|
|
3133
3266
|
_this2.iCCardPassword = ICCardPassword; //IC卡密码
|
|
3134
3267
|
//移动端环境下,没有读取IC卡的方式。
|
|
3135
3268
|
|
|
3136
|
-
var
|
|
3137
|
-
isHorizontalPad =
|
|
3138
|
-
isHorizontalSunMi =
|
|
3269
|
+
var _ref29 = _mutantsUtil.platform || {},
|
|
3270
|
+
isHorizontalPad = _ref29.isHorizontalPad,
|
|
3271
|
+
isHorizontalSunMi = _ref29.isHorizontalSunMi;
|
|
3139
3272
|
|
|
3140
3273
|
_this2.isHorizontalPad = !!isHorizontalPad;
|
|
3141
3274
|
_this2.isHorizontalSunMi = !!isHorizontalSunMi;
|
|
3142
3275
|
_this2.isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;
|
|
3143
3276
|
_this2.handleReadICard = _this2.handleReadICard.bind(_this2);
|
|
3144
3277
|
_this2.setTimer = null;
|
|
3278
|
+
_this2.keypressStime = null;
|
|
3145
3279
|
return _this2;
|
|
3146
3280
|
}
|
|
3147
3281
|
|
|
@@ -3220,8 +3354,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3220
3354
|
_this6.connectRfCard(); //读取失败后,重新连接一下。
|
|
3221
3355
|
return;
|
|
3222
3356
|
} else if (ret.status === 1) {
|
|
3223
|
-
//this.searchMember(ret.value);
|
|
3224
|
-
|
|
3357
|
+
// this.searchMember(ret.value);
|
|
3358
|
+
// this.czkInput.input["value"]=ret.value;
|
|
3359
|
+
_this6.setState({
|
|
3360
|
+
czkValue: ret.value
|
|
3361
|
+
});
|
|
3225
3362
|
_this6.loadCzk(ret.value);
|
|
3226
3363
|
}
|
|
3227
3364
|
});
|
|
@@ -3282,9 +3419,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3282
3419
|
value: function renderToolbtn(mode, index) {
|
|
3283
3420
|
var _this7 = this;
|
|
3284
3421
|
|
|
3285
|
-
var _enumController$
|
|
3286
|
-
PayIcon = _enumController$
|
|
3287
|
-
PayStyle = _enumController$
|
|
3422
|
+
var _enumController$getEn32 = _mutantsUtil.enumController.getEnumOj(),
|
|
3423
|
+
PayIcon = _enumController$getEn32.PayIcon,
|
|
3424
|
+
PayStyle = _enumController$getEn32.PayStyle;
|
|
3288
3425
|
|
|
3289
3426
|
var isReturn = this.props.isReturn;
|
|
3290
3427
|
var _store = this.store,
|
|
@@ -3356,11 +3493,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3356
3493
|
value: function render() {
|
|
3357
3494
|
var _this8 = this;
|
|
3358
3495
|
|
|
3359
|
-
var _enumController$
|
|
3360
|
-
PayIcon = _enumController$
|
|
3361
|
-
PayIcon2 = _enumController$
|
|
3362
|
-
PayStyle = _enumController$
|
|
3363
|
-
Differentiate = _enumController$
|
|
3496
|
+
var _enumController$getEn33 = _mutantsUtil.enumController.getEnumOj(),
|
|
3497
|
+
PayIcon = _enumController$getEn33.PayIcon,
|
|
3498
|
+
PayIcon2 = _enumController$getEn33.PayIcon2,
|
|
3499
|
+
PayStyle = _enumController$getEn33.PayStyle,
|
|
3500
|
+
Differentiate = _enumController$getEn33.Differentiate;
|
|
3364
3501
|
|
|
3365
3502
|
var _state2 = this.state,
|
|
3366
3503
|
btnDissabled = _state2.btnDissabled,
|
|
@@ -3368,10 +3505,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3368
3505
|
discountTotalAmount = _state2.discountTotalAmount,
|
|
3369
3506
|
discountRetailTotalAount = _state2.discountRetailTotalAount,
|
|
3370
3507
|
discountPrototypeTotalAmount = _state2.discountPrototypeTotalAmount,
|
|
3371
|
-
storageValue = _state2.storageValue
|
|
3508
|
+
storageValue = _state2.storageValue,
|
|
3509
|
+
czkValue = _state2.czkValue,
|
|
3510
|
+
newPassConfirm = _state2.newPassConfirm,
|
|
3511
|
+
newPass = _state2.newPass;
|
|
3372
3512
|
|
|
3373
|
-
var
|
|
3374
|
-
isNewRetailBCPos =
|
|
3513
|
+
var _ref30 = _mutantsUtil.platform || {},
|
|
3514
|
+
isNewRetailBCPos = _ref30.isNewRetailBCPos;
|
|
3375
3515
|
|
|
3376
3516
|
var _store2 = this.store,
|
|
3377
3517
|
paymode = _store2.paymode,
|
|
@@ -3434,11 +3574,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3434
3574
|
quantity4 = 0;
|
|
3435
3575
|
var sumQuantity = 0; //数量总和的值,包括称重的。
|
|
3436
3576
|
|
|
3437
|
-
var
|
|
3438
|
-
|
|
3439
|
-
buyQuantity =
|
|
3440
|
-
|
|
3441
|
-
returnQuantity =
|
|
3577
|
+
var _ref31 = quantityDetail || {},
|
|
3578
|
+
_ref31$buyQuantity = _ref31.buyQuantity,
|
|
3579
|
+
buyQuantity = _ref31$buyQuantity === undefined ? 0 : _ref31$buyQuantity,
|
|
3580
|
+
_ref31$returnQuantity = _ref31.returnQuantity,
|
|
3581
|
+
returnQuantity = _ref31$returnQuantity === undefined ? 0 : _ref31$returnQuantity;
|
|
3442
3582
|
|
|
3443
3583
|
var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
|
|
3444
3584
|
quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
|
|
@@ -3456,7 +3596,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3456
3596
|
sumQuantity = this.changeDecimalBuZero(sumQuantity, quantityPrecision);
|
|
3457
3597
|
}
|
|
3458
3598
|
|
|
3459
|
-
var
|
|
3599
|
+
var themodeHyczk = thePaymodes.filter(function (mode) {
|
|
3600
|
+
return mode.paymentType === PayStyle.hyczk && mode.value !== '0.00';
|
|
3601
|
+
});
|
|
3460
3602
|
return _react2.default.createElement(
|
|
3461
3603
|
'div',
|
|
3462
3604
|
{ className: 'billingSettlement', ref: function ref(r) {
|
|
@@ -3662,13 +3804,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3662
3804
|
_react2.default.createElement(
|
|
3663
3805
|
'div',
|
|
3664
3806
|
{ className: (0, _classnames4.default)({ "main": true, "focusbottom": currentIndex == index }) },
|
|
3665
|
-
_react2.default.createElement(
|
|
3666
|
-
'div',
|
|
3667
|
-
{ className: 'lefticon primary-color', onClick: function onClick() {
|
|
3668
|
-
_this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType);
|
|
3669
|
-
} },
|
|
3670
|
-
_react2.default.createElement(_ticon2.default, { type: 'jianqu', className: 'minus' })
|
|
3671
|
-
),
|
|
3672
3807
|
_react2.default.createElement(
|
|
3673
3808
|
'div',
|
|
3674
3809
|
{ className: (0, _classnames4.default)({ "name": true }) },
|
|
@@ -3698,13 +3833,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3698
3833
|
}
|
|
3699
3834
|
})
|
|
3700
3835
|
),
|
|
3701
|
-
|
|
3702
|
-
'
|
|
3703
|
-
{ className: '
|
|
3704
|
-
|
|
3705
|
-
_this8.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
|
3836
|
+
_react2.default.createElement(
|
|
3837
|
+
'span',
|
|
3838
|
+
{ className: 'minus', onClick: function onClick() {
|
|
3839
|
+
_this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType);
|
|
3706
3840
|
} },
|
|
3707
|
-
_react2.default.createElement(_ticon2.default, { type: '
|
|
3841
|
+
_react2.default.createElement(_ticon2.default, { type: 'shanchu', className: 'minusIcon primary-color' })
|
|
3708
3842
|
)
|
|
3709
3843
|
),
|
|
3710
3844
|
mode.paymentType == PayStyle.djq ? _react2.default.createElement(
|
|
@@ -3731,7 +3865,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3731
3865
|
_react2.default.createElement(
|
|
3732
3866
|
'span',
|
|
3733
3867
|
{ className: 'fl' },
|
|
3734
|
-
|
|
3868
|
+
mode && mode.storageCardNo
|
|
3735
3869
|
),
|
|
3736
3870
|
_react2.default.createElement('br', null),
|
|
3737
3871
|
_react2.default.createElement(
|
|
@@ -3743,6 +3877,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3743
3877
|
'span',
|
|
3744
3878
|
{ className: 'fl' },
|
|
3745
3879
|
(0, _utils.getFixedNumber)(mode.balance)
|
|
3880
|
+
),
|
|
3881
|
+
_react2.default.createElement('br', null),
|
|
3882
|
+
themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === mode.paymethodId && !isReturn && _react2.default.createElement(
|
|
3883
|
+
_button2.default,
|
|
3884
|
+
{ onClick: function onClick() {
|
|
3885
|
+
_this8.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
|
3886
|
+
}, className: 'addCard btn-border-primary' },
|
|
3887
|
+
_react2.default.createElement(_ticon2.default, { type: 'jiahao', className: 'plus b-theme-color' }),
|
|
3888
|
+
_react2.default.createElement(
|
|
3889
|
+
'span',
|
|
3890
|
+
null,
|
|
3891
|
+
'\u6DFB\u52A0\u5361'
|
|
3892
|
+
)
|
|
3746
3893
|
)
|
|
3747
3894
|
)
|
|
3748
3895
|
);
|
|
@@ -4040,7 +4187,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4040
4187
|
// }
|
|
4041
4188
|
// }
|
|
4042
4189
|
// mode.paymentType == PayStyle.hyczk && czkinput && czkinput.value !== '0.00' ? this.editCzkModal() :
|
|
4043
|
-
|
|
4190
|
+
if (mode.paymentType == PayStyle.hyczk) {
|
|
4191
|
+
if (themodeHyczk && themodeHyczk.length === 0) {
|
|
4192
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4193
|
+
}
|
|
4194
|
+
} else {
|
|
4195
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4196
|
+
}
|
|
4044
4197
|
},
|
|
4045
4198
|
value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
|
|
4046
4199
|
return tm.paymentType == PayStyle.hyczk;
|
|
@@ -4093,7 +4246,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4093
4246
|
_react2.default.createElement(
|
|
4094
4247
|
'span',
|
|
4095
4248
|
null,
|
|
4096
|
-
|
|
4249
|
+
m && m.storageCardNo
|
|
4097
4250
|
),
|
|
4098
4251
|
_react2.default.createElement(
|
|
4099
4252
|
'span',
|
|
@@ -4104,6 +4257,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4104
4257
|
'span',
|
|
4105
4258
|
{ className: 'balance fr' },
|
|
4106
4259
|
'\u652F\u4ED8\u91D1\u989D\uFF1A'
|
|
4260
|
+
),
|
|
4261
|
+
_react2.default.createElement('br', null),
|
|
4262
|
+
themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === m.paymethodId && _react2.default.createElement(
|
|
4263
|
+
_button2.default,
|
|
4264
|
+
{ onClick: function onClick() {
|
|
4265
|
+
return _this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4266
|
+
}, className: 'addCard btn-border-primary' },
|
|
4267
|
+
_react2.default.createElement(_ticon2.default, { type: 'jiahao', className: 'plus b-theme-color' }),
|
|
4268
|
+
_react2.default.createElement(
|
|
4269
|
+
'span',
|
|
4270
|
+
null,
|
|
4271
|
+
'\u6DFB\u52A0\u5361'
|
|
4272
|
+
)
|
|
4107
4273
|
)
|
|
4108
4274
|
);
|
|
4109
4275
|
})
|
|
@@ -4263,14 +4429,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4263
4429
|
{ key: index + '', className: 'modeItem' },
|
|
4264
4430
|
_react2.default.createElement(
|
|
4265
4431
|
'div',
|
|
4266
|
-
{ className: 'main ' + (currentIndex == index && 'settlement-pay-item-border') },
|
|
4267
|
-
_react2.default.createElement(
|
|
4268
|
-
'div',
|
|
4269
|
-
{ className: 'lefticon', onClick: function onClick() {
|
|
4270
|
-
_this8.onDelPay(index);
|
|
4271
|
-
} },
|
|
4272
|
-
_react2.default.createElement(_ticon2.default, { type: 'jianqu', className: 'minus' })
|
|
4273
|
-
),
|
|
4432
|
+
{ className: 'main b-theme-color ' + (currentIndex == index && 'settlement-pay-item-border') },
|
|
4274
4433
|
_react2.default.createElement(
|
|
4275
4434
|
'div',
|
|
4276
4435
|
{ className: (0, _classnames4.default)({ "name": true }) },
|
|
@@ -4295,13 +4454,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4295
4454
|
}
|
|
4296
4455
|
})
|
|
4297
4456
|
),
|
|
4298
|
-
|
|
4457
|
+
_react2.default.createElement(
|
|
4299
4458
|
'div',
|
|
4300
|
-
{ className: '
|
|
4301
|
-
|
|
4302
|
-
_this8.appendCzkmode('', 'noPlaySetPwd');
|
|
4459
|
+
{ className: 'minus', onClick: function onClick() {
|
|
4460
|
+
_this8.onDelPay(index);
|
|
4303
4461
|
} },
|
|
4304
|
-
_react2.default.createElement(_ticon2.default, { type: '
|
|
4462
|
+
_react2.default.createElement(_ticon2.default, { type: 'shanchu', className: 'minusIcon primary-color' })
|
|
4305
4463
|
)
|
|
4306
4464
|
),
|
|
4307
4465
|
mode.paymentType == PayStyle.djq ? _react2.default.createElement(
|
|
@@ -4328,7 +4486,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4328
4486
|
_react2.default.createElement(
|
|
4329
4487
|
'span',
|
|
4330
4488
|
{ className: 'fl' },
|
|
4331
|
-
|
|
4489
|
+
mode && mode.storageCardNo
|
|
4332
4490
|
),
|
|
4333
4491
|
_react2.default.createElement('br', null),
|
|
4334
4492
|
_react2.default.createElement(
|
|
@@ -4517,7 +4675,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4517
4675
|
_react2.default.createElement(
|
|
4518
4676
|
'div',
|
|
4519
4677
|
{ className: (0, _classnames4.default)({ "main": true, "focusbottom": currentIndex == index }) },
|
|
4520
|
-
_react2.default.createElement('div', { className: 'lefticon' }),
|
|
4521
4678
|
_react2.default.createElement(
|
|
4522
4679
|
'div',
|
|
4523
4680
|
{ className: (0, _classnames4.default)({ "name": true }) },
|
|
@@ -4652,7 +4809,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4652
4809
|
visible: this.state.czkVisible,
|
|
4653
4810
|
maskClosable: false,
|
|
4654
4811
|
destroyOnClose: true,
|
|
4655
|
-
title: "
|
|
4812
|
+
title: "储值结算",
|
|
4656
4813
|
onCancel: this.handleCzkCancel,
|
|
4657
4814
|
keyboard: false,
|
|
4658
4815
|
centered: !this.isHorizontalPad ? true : false,
|
|
@@ -4683,7 +4840,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4683
4840
|
_react2.default.createElement(
|
|
4684
4841
|
'div',
|
|
4685
4842
|
{ className: 'value valuetext' },
|
|
4686
|
-
currentMode && currentMode.member.type || '普通'
|
|
4843
|
+
currentMode && currentMode.member && currentMode.member.type || '普通'
|
|
4687
4844
|
),
|
|
4688
4845
|
_react2.default.createElement(
|
|
4689
4846
|
'div',
|
|
@@ -4704,7 +4861,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4704
4861
|
_react2.default.createElement(
|
|
4705
4862
|
'div',
|
|
4706
4863
|
{ className: 'value' },
|
|
4707
|
-
currentMode && (0, _utils.getFixedNumber)(currentMode.
|
|
4864
|
+
currentMode && (0, _utils.getFixedNumber)(currentMode.balance)
|
|
4708
4865
|
),
|
|
4709
4866
|
_react2.default.createElement(
|
|
4710
4867
|
'div',
|
|
@@ -4725,7 +4882,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4725
4882
|
_react2.default.createElement(
|
|
4726
4883
|
'div',
|
|
4727
4884
|
{ className: 'value' },
|
|
4728
|
-
currentMode && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.
|
|
4885
|
+
currentMode && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.balance)))
|
|
4729
4886
|
),
|
|
4730
4887
|
_react2.default.createElement(
|
|
4731
4888
|
'div',
|
|
@@ -4740,29 +4897,83 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4740
4897
|
_react2.default.createElement(
|
|
4741
4898
|
'span',
|
|
4742
4899
|
null,
|
|
4743
|
-
'\
|
|
4900
|
+
'\u50A8\u503C\u5361\u53F7\uFF1A'
|
|
4744
4901
|
),
|
|
4745
4902
|
_react2.default.createElement(
|
|
4746
4903
|
'span',
|
|
4747
4904
|
null,
|
|
4748
4905
|
_react2.default.createElement(_input2.default, {
|
|
4749
4906
|
type: 'text',
|
|
4750
|
-
placeholder: '\u8BF7\u626B\u63CF\u6216\u8F93\u5165\
|
|
4751
|
-
|
|
4752
|
-
, className: 'input ' + (this.hasElectron === true && this.iCCardServer === 1 || this.isHorizontalPad === true ? 'temp' : ''),
|
|
4907
|
+
placeholder: '\u8BF7\u626B\u63CF\u6216\u8F93\u5165\u624B\u673A\u53F7/\u50A8\u503C\u5361\u53F7',
|
|
4908
|
+
className: 'input ' + (this.hasElectron === true && this.iCCardServer === 1 || this.isHorizontalPad === true ? 'temp' : ''),
|
|
4753
4909
|
onChange: function onChange(e) {
|
|
4754
4910
|
return _this8.onCzkChange(e.target.value);
|
|
4755
4911
|
},
|
|
4756
|
-
defaultValue:
|
|
4757
|
-
value:
|
|
4912
|
+
defaultValue: currentMode && currentMode.storageCardNo,
|
|
4913
|
+
value: czkValue,
|
|
4758
4914
|
ref: function ref(input) {
|
|
4759
4915
|
return _this8.czkInput = input;
|
|
4760
4916
|
},
|
|
4761
|
-
onKeyDown: function
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4917
|
+
onKeyDown: function () {
|
|
4918
|
+
var _ref32 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(e) {
|
|
4919
|
+
var time, _paymode;
|
|
4920
|
+
|
|
4921
|
+
return _regenerator2.default.wrap(function _callee16$(_context16) {
|
|
4922
|
+
while (1) {
|
|
4923
|
+
switch (_context16.prev = _context16.next) {
|
|
4924
|
+
case 0:
|
|
4925
|
+
if (!(e.keyCode == 13)) {
|
|
4926
|
+
_context16.next = 14;
|
|
4927
|
+
break;
|
|
4928
|
+
}
|
|
4929
|
+
|
|
4930
|
+
time = Date.parse(new Date());
|
|
4931
|
+
|
|
4932
|
+
if (!(_this8.isStorageCardInputType && time - _this8.keypressStime > 350)) {
|
|
4933
|
+
_context16.next = 7;
|
|
4934
|
+
break;
|
|
4935
|
+
}
|
|
4936
|
+
|
|
4937
|
+
_message2.default.warn('储值卡不可键盘录入,请刷卡!');
|
|
4938
|
+
_this8.keypressStime = null;
|
|
4939
|
+
_this8.setState({
|
|
4940
|
+
czkValue: null
|
|
4941
|
+
});
|
|
4942
|
+
return _context16.abrupt('return');
|
|
4943
|
+
|
|
4944
|
+
case 7:
|
|
4945
|
+
_this8.keypressStime = null;
|
|
4946
|
+
_context16.next = 10;
|
|
4947
|
+
return _this8.loadCzk(e.target.value);
|
|
4948
|
+
|
|
4949
|
+
case 10:
|
|
4950
|
+
_paymode = _this8.store.paymode;
|
|
4951
|
+
|
|
4952
|
+
if (!_paymode.currentMode.storageCardNo) {
|
|
4953
|
+
_this8.setState({
|
|
4954
|
+
czkvalue: null
|
|
4955
|
+
});
|
|
4956
|
+
}
|
|
4957
|
+
_context16.next = 15;
|
|
4958
|
+
break;
|
|
4959
|
+
|
|
4960
|
+
case 14:
|
|
4961
|
+
if (!_this8.keypressStime && e.keyCode !== 8) {
|
|
4962
|
+
_this8.keypressStime = Date.parse(new Date());
|
|
4963
|
+
}
|
|
4964
|
+
|
|
4965
|
+
case 15:
|
|
4966
|
+
case 'end':
|
|
4967
|
+
return _context16.stop();
|
|
4968
|
+
}
|
|
4969
|
+
}
|
|
4970
|
+
}, _callee16, _this8);
|
|
4971
|
+
}));
|
|
4972
|
+
|
|
4973
|
+
return function (_x11) {
|
|
4974
|
+
return _ref32.apply(this, arguments);
|
|
4975
|
+
};
|
|
4976
|
+
}(),
|
|
4766
4977
|
onFocus: function onFocus(e) {
|
|
4767
4978
|
_this8.inputTarget = _this8.czkInput.input;
|
|
4768
4979
|
!_this8.state.prototypeVisible && _keyboard2.default.open(function (v) {
|
|
@@ -4814,22 +5025,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4814
5025
|
className: _index.hotKey.hotKeyNotFilter('input'),
|
|
4815
5026
|
value: storageValue,
|
|
4816
5027
|
onChange: function onChange(event) {
|
|
4817
|
-
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.
|
|
5028
|
+
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.balance));
|
|
4818
5029
|
},
|
|
4819
|
-
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.
|
|
4820
|
-
ref: function ref(
|
|
4821
|
-
return _this8["inputCzkAmount"] =
|
|
5030
|
+
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)),
|
|
5031
|
+
ref: function ref(_ref33) {
|
|
5032
|
+
return _this8["inputCzkAmount"] = _ref33;
|
|
4822
5033
|
},
|
|
4823
5034
|
onFocus: function onFocus(e) {
|
|
4824
5035
|
_this8.inputkey = "inputCzkAmount";
|
|
4825
5036
|
_keyboard2.default.open(function (v) {
|
|
4826
5037
|
var value = _keyboard2.default.getNewValue(_this8[_this8.inputkey].input, _this8[_this8.inputkey].input.value, v);
|
|
4827
|
-
_this8.setCurrentModeValue(value, Math.min(currentMode.maxamount, currentMode.
|
|
5038
|
+
_this8.setCurrentModeValue(value, Math.min(currentMode.maxamount, currentMode.balance));
|
|
4828
5039
|
}, _this8.keyboardOnOk, _this8.keyboardOnClose)();
|
|
4829
5040
|
},
|
|
4830
5041
|
onBlur: function onBlur(e) {
|
|
4831
5042
|
_keyboard2.default.close();
|
|
4832
|
-
_this8.setCurrentModeValue((0, _utils.getFixedNumber)(_this8.inputCzkAmount.input.value), Math.min(currentMode.maxamount, currentMode.
|
|
5043
|
+
_this8.setCurrentModeValue((0, _utils.getFixedNumber)(_this8.inputCzkAmount.input.value), Math.min(currentMode.maxamount, currentMode.balance));
|
|
4833
5044
|
}
|
|
4834
5045
|
})
|
|
4835
5046
|
)
|
|
@@ -4867,6 +5078,47 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4867
5078
|
)
|
|
4868
5079
|
)
|
|
4869
5080
|
),
|
|
5081
|
+
_react2.default.createElement(
|
|
5082
|
+
_modal2.default,
|
|
5083
|
+
{
|
|
5084
|
+
wrapClassName: _index.hotKey.hotKeyBindClass('5', 'moreCzkModal') + ' ' + (this.isHorizontalPad ? 'extraHeight' : ''),
|
|
5085
|
+
width: '400px',
|
|
5086
|
+
visible: this.state.moreCzkVisible,
|
|
5087
|
+
maskClosable: false,
|
|
5088
|
+
destroyOnClose: true,
|
|
5089
|
+
title: "储值结算",
|
|
5090
|
+
onCancel: this.handleMoreCzkCancel,
|
|
5091
|
+
keyboard: false,
|
|
5092
|
+
centered: !this.isHorizontalPad ? true : false,
|
|
5093
|
+
footer: _react2.default.createElement(
|
|
5094
|
+
'div',
|
|
5095
|
+
{ className: 'action' },
|
|
5096
|
+
_react2.default.createElement(
|
|
5097
|
+
'span',
|
|
5098
|
+
{ className: 'showUseCard' },
|
|
5099
|
+
'\u4EC5\u5217\u793A\u53EF\u7528\u7684\u50A8\u503C\u5361'
|
|
5100
|
+
),
|
|
5101
|
+
_react2.default.createElement(
|
|
5102
|
+
_button2.default,
|
|
5103
|
+
{ onClick: this.handleMoreCzkCancel },
|
|
5104
|
+
'\u53D6\u6D88'
|
|
5105
|
+
),
|
|
5106
|
+
_react2.default.createElement(
|
|
5107
|
+
_button2.default,
|
|
5108
|
+
{ type: 'primary', onClick: this.handleMoreCzkOk },
|
|
5109
|
+
'\u786E\u5B9A'
|
|
5110
|
+
)
|
|
5111
|
+
)
|
|
5112
|
+
},
|
|
5113
|
+
_react2.default.createElement(
|
|
5114
|
+
'div',
|
|
5115
|
+
null,
|
|
5116
|
+
_react2.default.createElement(_moreCzkTable2.default, {
|
|
5117
|
+
setMoreCzkIndex: this.setMoreCzkIndex,
|
|
5118
|
+
selectedRowIndex: this.state.selectedRowIndex,
|
|
5119
|
+
dataSource: this.state.memberdata1 })
|
|
5120
|
+
)
|
|
5121
|
+
),
|
|
4870
5122
|
_react2.default.createElement(
|
|
4871
5123
|
_modal2.default,
|
|
4872
5124
|
(0, _defineProperty3.default)({
|
|
@@ -4890,7 +5142,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4890
5142
|
),
|
|
4891
5143
|
_react2.default.createElement(
|
|
4892
5144
|
_button2.default,
|
|
4893
|
-
{ type: 'primary', disabled:
|
|
5145
|
+
{ type: 'primary', disabled: btnDissabled, onClick: this.handleSetModal },
|
|
4894
5146
|
'\u786E\u5B9A'
|
|
4895
5147
|
)
|
|
4896
5148
|
)),
|
|
@@ -4908,21 +5160,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4908
5160
|
_react2.default.createElement(
|
|
4909
5161
|
'div',
|
|
4910
5162
|
{ className: 'two' },
|
|
4911
|
-
_react2.default.createElement(
|
|
5163
|
+
_react2.default.createElement(_input2.default.Password, {
|
|
4912
5164
|
className: 'content',
|
|
4913
|
-
newType: 'positive',
|
|
4914
|
-
bordered: true,
|
|
4915
5165
|
placeholder: '\u8BF7\u8F93\u51656\u4F4D\u6570\u5B57\u5BC6\u7801',
|
|
4916
5166
|
style: { width: 266, height: 32 },
|
|
4917
5167
|
maxLength: 6,
|
|
5168
|
+
value: newPass,
|
|
4918
5169
|
ref: function ref(input) {
|
|
4919
5170
|
return _this8.inputNewAmount = input;
|
|
4920
5171
|
},
|
|
4921
5172
|
onChange: function onChange(value) {
|
|
4922
|
-
return _this8.setPwdValue('newPass', value);
|
|
5173
|
+
return _this8.setPwdValue('newPass', value.target.value);
|
|
4923
5174
|
},
|
|
4924
5175
|
onBlur: function onBlur(value) {
|
|
4925
5176
|
return _this8.handleBlur('newPass');
|
|
5177
|
+
},
|
|
5178
|
+
onPressEnter: function onPressEnter() {
|
|
5179
|
+
return _this8.onPressEnterCzk('newPass');
|
|
4926
5180
|
}
|
|
4927
5181
|
})
|
|
4928
5182
|
)
|
|
@@ -4938,21 +5192,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4938
5192
|
_react2.default.createElement(
|
|
4939
5193
|
'div',
|
|
4940
5194
|
{ className: 'two' },
|
|
4941
|
-
_react2.default.createElement(
|
|
5195
|
+
_react2.default.createElement(_input2.default.Password, {
|
|
4942
5196
|
className: 'content',
|
|
4943
|
-
newType: 'positive',
|
|
4944
|
-
bordered: true,
|
|
4945
5197
|
placeholder: '\u8BF7\u786E\u8BA46\u4F4D\u6570\u5B57\u5BC6\u7801',
|
|
4946
5198
|
style: { width: 266, height: 32 },
|
|
4947
5199
|
maxLength: 6,
|
|
5200
|
+
value: newPassConfirm,
|
|
4948
5201
|
ref: function ref(input) {
|
|
4949
5202
|
return _this8.inputConfirmAmount = input;
|
|
4950
5203
|
},
|
|
4951
5204
|
onChange: function onChange(value) {
|
|
4952
|
-
return _this8.setPwdValue('newPassConfirm', value);
|
|
5205
|
+
return _this8.setPwdValue('newPassConfirm', value.target.value);
|
|
4953
5206
|
},
|
|
4954
5207
|
onBlur: function onBlur(value) {
|
|
4955
5208
|
return _this8.handleBlur('newPassConfirm');
|
|
5209
|
+
},
|
|
5210
|
+
onPressEnter: function onPressEnter() {
|
|
5211
|
+
return _this8.onPressEnterCzk('newPassConfirm');
|
|
4956
5212
|
}
|
|
4957
5213
|
})
|
|
4958
5214
|
)
|
|
@@ -5317,7 +5573,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5317
5573
|
_react2.default.createElement(
|
|
5318
5574
|
'div',
|
|
5319
5575
|
{ className: 'value valuetext' },
|
|
5320
|
-
currentMode && currentMode.member.type || '普通'
|
|
5576
|
+
currentMode && currentMode.member && currentMode.member.type || '普通'
|
|
5321
5577
|
),
|
|
5322
5578
|
_react2.default.createElement(
|
|
5323
5579
|
'div',
|
|
@@ -5338,7 +5594,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5338
5594
|
_react2.default.createElement(
|
|
5339
5595
|
'div',
|
|
5340
5596
|
{ className: 'value' },
|
|
5341
|
-
currentMode && currentMode.member.bonusPoints
|
|
5597
|
+
currentMode && currentMode.member && currentMode.member.bonusPoints
|
|
5342
5598
|
),
|
|
5343
5599
|
_react2.default.createElement(
|
|
5344
5600
|
'div',
|
|
@@ -5359,7 +5615,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5359
5615
|
_react2.default.createElement(
|
|
5360
5616
|
'div',
|
|
5361
5617
|
{ className: 'value' },
|
|
5362
|
-
currentMode && (0, _utils.getFixedNumber)(currentMode.member.exchangable)
|
|
5618
|
+
currentMode && currentMode.member && (0, _utils.getFixedNumber)(currentMode.member.exchangable)
|
|
5363
5619
|
),
|
|
5364
5620
|
_react2.default.createElement(
|
|
5365
5621
|
'div',
|
|
@@ -5380,7 +5636,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5380
5636
|
_react2.default.createElement(
|
|
5381
5637
|
'div',
|
|
5382
5638
|
{ className: 'value' },
|
|
5383
|
-
currentMode && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.member.exchangable)))
|
|
5639
|
+
currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.member.exchangable)))
|
|
5384
5640
|
),
|
|
5385
5641
|
_react2.default.createElement(
|
|
5386
5642
|
'div',
|
|
@@ -5400,7 +5656,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5400
5656
|
_react2.default.createElement(
|
|
5401
5657
|
'span',
|
|
5402
5658
|
{ className: 'notext' },
|
|
5403
|
-
currentMode && currentMode.member.cardNo
|
|
5659
|
+
currentMode && currentMode.member && currentMode.member.cardNo
|
|
5404
5660
|
)
|
|
5405
5661
|
),
|
|
5406
5662
|
_react2.default.createElement(
|
|
@@ -5434,9 +5690,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5434
5690
|
onChange: function onChange(e) {
|
|
5435
5691
|
_this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
5436
5692
|
},
|
|
5437
|
-
defaultValue: currentMode && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
|
5438
|
-
ref: function ref(
|
|
5439
|
-
return _this8["inputJfdxAmount"] =
|
|
5693
|
+
defaultValue: currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
|
5694
|
+
ref: function ref(_ref34) {
|
|
5695
|
+
return _this8["inputJfdxAmount"] = _ref34;
|
|
5440
5696
|
},
|
|
5441
5697
|
onFocus: function onFocus(e) {
|
|
5442
5698
|
_this8.inputkey = "inputJfdxAmount";
|