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