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