tplus-components-touch 3.36.1 → 3.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/billSearch/index.js +157 -19
- 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 +211 -108
- package/dist/components/cloudPrint/printDispatch.js.map +1 -1
- package/dist/components/deliverySearch/index.js +1 -1
- package/dist/components/deliverySearch/index.js.map +1 -1
- package/dist/components/hotKey/localConfig.js +133 -14
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/inventorySearch/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/loading/loadingContent.js +1 -1
- package/dist/components/loading/loadingContent.js.map +1 -1
- package/dist/components/loading/style.less +7 -7
- 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 +739 -485
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +80 -11
- package/dist/components/settlement/settlementStore.js +566 -314
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +49 -3
- package/dist/components/ticon/iconfont/iconfont.css +11 -3
- package/dist/components/ticon/iconfont/iconfont.js +6 -6
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
- package/dist/components/ticon/iconfont/iconfont.json +14 -0
- package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
- package/dist/components/touchScroll/index.js +6 -2
- package/dist/components/touchScroll/index.js.map +1 -1
- package/dist/components/touchTable/index.js +5 -4
- 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 +2 -2
|
@@ -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();
|
|
@@ -450,7 +460,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
450
460
|
}
|
|
451
461
|
item.InventoryName = item.Inventory.Name;
|
|
452
462
|
item.Discount = (0, _utils.getRoundValue)(item.RetailPrice - item.TaxPrice, pricePrecision);
|
|
453
|
-
item.TotalDiscount =
|
|
463
|
+
//item.TotalDiscount = getFixedNumber(item.Discount * item.Quantity);
|
|
464
|
+
item.TotalDiscount = item.DetailDiscountAmount;
|
|
454
465
|
item.nAmount = (0, _utils.getFixedNumber)(item.TaxAmount);
|
|
455
466
|
item.UnitName = item.Unit.Name;
|
|
456
467
|
item.nQuantity = (0, _utils.getRoundValue)(item.Quantity, quantityPrecision);
|
|
@@ -553,68 +564,30 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
553
564
|
});
|
|
554
565
|
};
|
|
555
566
|
|
|
556
|
-
_this2.
|
|
557
|
-
var _enumController$getEn2 = _mutantsUtil.enumController.getEnumOj(),
|
|
558
|
-
PayStyle = _enumController$getEn2.PayStyle;
|
|
559
|
-
|
|
560
|
-
var _ref = _mutantsUtil.platform || {},
|
|
561
|
-
isNewRetailBCPos = _ref.isNewRetailBCPos;
|
|
562
|
-
|
|
563
|
-
_this2.store.setCurrentMode(id, PayStyle.hyczk, append);
|
|
567
|
+
_this2.handleCzkMoreData = function (params) {
|
|
564
568
|
_this2._val = _this2.store.paymode.currentMode.value;
|
|
565
569
|
var currentMode = _this2.store.paymode.currentMode;
|
|
566
570
|
|
|
567
|
-
var maxamount = Math.min(currentMode.maxamount, currentMode.
|
|
568
|
-
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)) {
|
|
569
573
|
_message2.default.error("本单最大可用储值卡结算金额为:" + (0, _utils.getFixedNumber)(maxamount) + ",请使用复合结算!", {
|
|
570
574
|
duration: 4
|
|
571
575
|
});
|
|
572
576
|
} else {
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
// return;
|
|
579
|
-
// }
|
|
580
|
-
// if (sMember && sMember.ID) {
|
|
581
|
-
// // noPlaySetPwd 点击结算方式设置密码,点加号不设置
|
|
582
|
-
// if (!sMember.WalletEnabled && params !== 'noPlaySetPwd' && !isReturn) {
|
|
583
|
-
// this.setState({
|
|
584
|
-
// newPass: '',
|
|
585
|
-
// newPassConfirm: '',
|
|
586
|
-
// showSetPwdModal: true
|
|
587
|
-
// })
|
|
588
|
-
// } else {
|
|
589
|
-
// this.setState({
|
|
590
|
-
// showSetPwdModal: false,
|
|
591
|
-
// czkVisible: true
|
|
592
|
-
// })
|
|
593
|
-
// }
|
|
594
|
-
// }
|
|
595
|
-
// // else {
|
|
596
|
-
// // Message.warn('请先录入会员');
|
|
597
|
-
// // }
|
|
598
|
-
// // this.setState({
|
|
599
|
-
// // czkVisible: true,
|
|
600
|
-
// // });
|
|
601
|
-
// } else {
|
|
602
|
-
// this.setState({
|
|
603
|
-
// czkVisible: true,
|
|
604
|
-
// });
|
|
605
|
-
// }
|
|
606
|
-
_this2.setState({
|
|
607
|
-
czkVisible: true
|
|
608
|
-
});
|
|
577
|
+
if (params) {
|
|
578
|
+
_this2.setState({
|
|
579
|
+
czkVisible: true
|
|
580
|
+
});
|
|
581
|
+
}
|
|
609
582
|
var brefund = _this2.store.brefund;
|
|
610
583
|
|
|
611
|
-
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));
|
|
612
585
|
_this2.setState({
|
|
613
586
|
storageValue: value11
|
|
614
587
|
});
|
|
615
|
-
if (currentMode.
|
|
588
|
+
if (currentMode.storageCardNo) {
|
|
616
589
|
_this2.setState({
|
|
617
|
-
czkValue: currentMode.
|
|
590
|
+
czkValue: currentMode.storageCardNo
|
|
618
591
|
});
|
|
619
592
|
} else {
|
|
620
593
|
_this2.setState({
|
|
@@ -622,95 +595,210 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
622
595
|
});
|
|
623
596
|
}
|
|
624
597
|
}
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
_this2.inputCzkAmount.input
|
|
631
|
-
|
|
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
|
+
}
|
|
632
607
|
}
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
_this2.connectRfCard();
|
|
608
|
+
}, 500);
|
|
609
|
+
}
|
|
636
610
|
};
|
|
637
611
|
|
|
638
|
-
_this2.
|
|
639
|
-
var
|
|
640
|
-
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;
|
|
641
615
|
|
|
642
616
|
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
643
617
|
while (1) {
|
|
644
618
|
switch (_context.prev = _context.next) {
|
|
645
619
|
case 0:
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
// Message.error("本单最大可用储值卡结算金额为:"+getFixedNumber(maxamount)+",请使用复合结算!");
|
|
649
|
-
// this.setState({
|
|
650
|
-
// czkVisible: false,
|
|
651
|
-
// });
|
|
652
|
-
// return;
|
|
653
|
-
// }
|
|
654
|
-
_enumController$getEn3 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn3.PayStyle;
|
|
620
|
+
_this2.connectRfCard();
|
|
621
|
+
_enumController$getEn2 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn2.PayStyle;
|
|
655
622
|
|
|
656
|
-
|
|
657
|
-
|
|
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;
|
|
658
629
|
break;
|
|
659
630
|
}
|
|
660
631
|
|
|
661
|
-
_context.next =
|
|
662
|
-
return _this2.store.
|
|
632
|
+
_context.next = 8;
|
|
633
|
+
return _this2.store.updateCurrentMode(_this2.store.paymode.currentMode.memberId);
|
|
663
634
|
|
|
664
|
-
case
|
|
665
|
-
|
|
666
|
-
_context.next = 7;
|
|
667
|
-
break;
|
|
668
|
-
}
|
|
635
|
+
case 8:
|
|
636
|
+
_context.t0 = _context.sent;
|
|
669
637
|
|
|
670
|
-
|
|
671
|
-
|
|
638
|
+
case 9:
|
|
639
|
+
memberdata1 = _context.t0;
|
|
672
640
|
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
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);
|
|
679
657
|
}
|
|
680
658
|
|
|
681
|
-
|
|
682
|
-
|
|
659
|
+
case 12:
|
|
660
|
+
case 'end':
|
|
661
|
+
return _context.stop();
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}, _callee, _this3);
|
|
665
|
+
}));
|
|
683
666
|
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
}
|
|
667
|
+
return function (_x, _x2) {
|
|
668
|
+
return _ref.apply(this, arguments);
|
|
669
|
+
};
|
|
670
|
+
}();
|
|
689
671
|
|
|
690
|
-
|
|
691
|
-
|
|
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
|
+
};
|
|
692
681
|
|
|
693
|
-
|
|
682
|
+
_this2.setMoreCzkIndex = function (index) {
|
|
683
|
+
_this2.setState({
|
|
684
|
+
selectedRowIndex: index
|
|
685
|
+
});
|
|
686
|
+
};
|
|
694
687
|
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
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
|
+
|
|
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;
|
|
703
713
|
|
|
704
|
-
|
|
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, isNeedPassword;
|
|
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, isNeedPassword = _this2$store$paymode$.isNeedPassword;
|
|
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:
|
|
705
793
|
case 'end':
|
|
706
|
-
return
|
|
794
|
+
return _context3.stop();
|
|
707
795
|
}
|
|
708
796
|
}
|
|
709
|
-
},
|
|
797
|
+
}, _callee3, _this3);
|
|
710
798
|
}));
|
|
711
799
|
|
|
712
|
-
return function (
|
|
713
|
-
return
|
|
800
|
+
return function (_x3) {
|
|
801
|
+
return _ref4.apply(this, arguments);
|
|
714
802
|
};
|
|
715
803
|
}();
|
|
716
804
|
|
|
@@ -722,7 +810,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
722
810
|
_this2.setState({
|
|
723
811
|
czkVisible: false,
|
|
724
812
|
storageValue: '0.00',
|
|
725
|
-
|
|
813
|
+
czkValue: null
|
|
726
814
|
});
|
|
727
815
|
_this2.closeRfCard();
|
|
728
816
|
_keyboard2.default.close();
|
|
@@ -735,23 +823,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
735
823
|
});
|
|
736
824
|
};
|
|
737
825
|
|
|
738
|
-
_this2.handleSetModal = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
739
|
-
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;
|
|
740
828
|
|
|
741
|
-
return _regenerator2.default.wrap(function
|
|
829
|
+
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
742
830
|
while (1) {
|
|
743
|
-
switch (
|
|
831
|
+
switch (_context4.prev = _context4.next) {
|
|
744
832
|
case 0:
|
|
745
|
-
_this2$
|
|
833
|
+
_this2$state2 = _this2.state, newPass = _this2$state2.newPass, newPassConfirm = _this2$state2.newPassConfirm, isInputMember = _this2$state2.isInputMember;
|
|
746
834
|
updataMemberInfo = _this2.props.updataMemberInfo;
|
|
747
|
-
|
|
835
|
+
_context4.next = 4;
|
|
748
836
|
return _this2.store.queryPwd(newPass, newPassConfirm);
|
|
749
837
|
|
|
750
838
|
case 4:
|
|
751
|
-
result =
|
|
839
|
+
result = _context4.sent;
|
|
840
|
+
cardTypeEnum = _this2.store.paymode.currentMode.cardTypeEnum;
|
|
752
841
|
|
|
753
842
|
if (!result) {
|
|
754
|
-
|
|
843
|
+
_context4.next = 18;
|
|
755
844
|
break;
|
|
756
845
|
}
|
|
757
846
|
|
|
@@ -762,42 +851,68 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
762
851
|
newPassConfirm: ''
|
|
763
852
|
});
|
|
764
853
|
_message2.default.warn('设置成功');
|
|
765
|
-
|
|
766
|
-
|
|
854
|
+
_this2.handleCzkData();
|
|
767
855
|
setTimeout(function () {
|
|
768
|
-
if (
|
|
769
|
-
_this2.
|
|
770
|
-
|
|
771
|
-
if (_this2.inputCzkAmount && _this2.inputCzkAmount.input) {
|
|
772
|
-
_this2.inputCzkAmount.input.focus();
|
|
773
|
-
_this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
|
|
774
|
-
}
|
|
856
|
+
if (_this2.inputCzkAmount && _this2.inputCzkAmount.input) {
|
|
857
|
+
_this2.inputCzkAmount.input.focus();
|
|
858
|
+
_this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
|
|
775
859
|
}
|
|
776
860
|
}, 350);
|
|
777
|
-
|
|
778
|
-
|
|
861
|
+
|
|
862
|
+
if (!(isInputMember && _this2.store.member.ID)) {
|
|
863
|
+
_context4.next = 16;
|
|
864
|
+
break;
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
_context4.next = 14;
|
|
779
868
|
return _this2.store.updateMemberInfo(_this2.store);
|
|
780
869
|
|
|
781
|
-
case
|
|
782
|
-
resp =
|
|
870
|
+
case 14:
|
|
871
|
+
resp = _context4.sent;
|
|
783
872
|
|
|
784
873
|
updataMemberInfo(resp);
|
|
785
874
|
|
|
786
|
-
case
|
|
875
|
+
case 16:
|
|
876
|
+
if (cardTypeEnum === 'BALANCE_CARD') {
|
|
877
|
+
_this2.store.paymode.updateCardInfo();
|
|
878
|
+
}
|
|
879
|
+
_this2.setState({
|
|
880
|
+
isInputMember: false
|
|
881
|
+
});
|
|
882
|
+
|
|
883
|
+
case 18:
|
|
787
884
|
case 'end':
|
|
788
|
-
return
|
|
885
|
+
return _context4.stop();
|
|
789
886
|
}
|
|
790
887
|
}
|
|
791
|
-
},
|
|
888
|
+
}, _callee4, _this3);
|
|
792
889
|
}));
|
|
793
890
|
|
|
891
|
+
_this2.onPressEnterCzk = function (field) {
|
|
892
|
+
var _ref6 = _this2.state || {},
|
|
893
|
+
_ref6$newPass = _ref6.newPass,
|
|
894
|
+
newPass = _ref6$newPass === undefined ? '' : _ref6$newPass,
|
|
895
|
+
_ref6$newPassConfirm = _ref6.newPassConfirm,
|
|
896
|
+
newPassConfirm = _ref6$newPassConfirm === undefined ? '' : _ref6$newPassConfirm;
|
|
897
|
+
|
|
898
|
+
if (field === 'newPass' && newPass.length === 6) {
|
|
899
|
+
_this2.inputConfirmAmount.input.focus();
|
|
900
|
+
}
|
|
901
|
+
if (field === 'newPassConfirm' && newPassConfirm.length === 6 && newPass.length === 6 && newPass === newPassConfirm) {
|
|
902
|
+
_this2.handleSetModal();
|
|
903
|
+
}
|
|
904
|
+
};
|
|
905
|
+
|
|
794
906
|
_this2.setPwdValue = function (field, value) {
|
|
907
|
+
if (!/^[0-9]*$/.test(value)) {
|
|
908
|
+
return;
|
|
909
|
+
}
|
|
795
910
|
_this2.setState((0, _defineProperty3.default)({}, field, value), function () {
|
|
796
|
-
var
|
|
797
|
-
|
|
798
|
-
newPass =
|
|
799
|
-
|
|
800
|
-
newPassConfirm =
|
|
911
|
+
var _ref7 = _this2.state || {},
|
|
912
|
+
_ref7$newPass = _ref7.newPass,
|
|
913
|
+
newPass = _ref7$newPass === undefined ? '' : _ref7$newPass,
|
|
914
|
+
_ref7$newPassConfirm = _ref7.newPassConfirm,
|
|
915
|
+
newPassConfirm = _ref7$newPassConfirm === undefined ? '' : _ref7$newPassConfirm;
|
|
801
916
|
|
|
802
917
|
if (newPassConfirm.length === 6 && newPass.length === 6 && newPass === newPassConfirm) {
|
|
803
918
|
_this2.setState({
|
|
@@ -808,15 +923,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
808
923
|
};
|
|
809
924
|
|
|
810
925
|
_this2.handleBlur = function (field) {
|
|
811
|
-
var
|
|
812
|
-
|
|
813
|
-
newPass =
|
|
814
|
-
|
|
815
|
-
newPassConfirm =
|
|
926
|
+
var _ref8 = _this2.state || {},
|
|
927
|
+
_ref8$newPass = _ref8.newPass,
|
|
928
|
+
newPass = _ref8$newPass === undefined ? '' : _ref8$newPass,
|
|
929
|
+
_ref8$newPassConfirm = _ref8.newPassConfirm,
|
|
930
|
+
newPassConfirm = _ref8$newPassConfirm === undefined ? '' : _ref8$newPassConfirm;
|
|
816
931
|
|
|
817
932
|
setTimeout(function () {
|
|
818
|
-
var
|
|
819
|
-
showSetPwdModal =
|
|
933
|
+
var _ref9 = _this2.state || {},
|
|
934
|
+
showSetPwdModal = _ref9.showSetPwdModal;
|
|
820
935
|
|
|
821
936
|
if (!showSetPwdModal) return;
|
|
822
937
|
if (field === 'newPass' && newPass.length < 6) {
|
|
@@ -873,8 +988,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
873
988
|
|
|
874
989
|
// TODO: 测试优惠券支付
|
|
875
990
|
|
|
876
|
-
var
|
|
877
|
-
isNewRetailBCPos =
|
|
991
|
+
var _ref10 = _mutantsUtil.platform || {},
|
|
992
|
+
isNewRetailBCPos = _ref10.isNewRetailBCPos;
|
|
878
993
|
|
|
879
994
|
if (isNewRetailBCPos && !_this2.store.paymode.currentMode.boriginReturn) {
|
|
880
995
|
_this2.store.getCouponList();
|
|
@@ -940,7 +1055,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
940
1055
|
setTimeout(function () {
|
|
941
1056
|
_this2.inputJfdxAmount.input.focus();
|
|
942
1057
|
_this2.inputJfdxAmount.input.setSelectionRange(0, _this2.inputJfdxAmount.input.value.length);
|
|
943
|
-
},
|
|
1058
|
+
}, 300);
|
|
944
1059
|
};
|
|
945
1060
|
|
|
946
1061
|
_this2.handleJfdxOk = function (e) {
|
|
@@ -958,8 +1073,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
958
1073
|
};
|
|
959
1074
|
|
|
960
1075
|
_this2.checkOfflineEnable = function (paymode, key) {
|
|
961
|
-
var
|
|
962
|
-
paymodes =
|
|
1076
|
+
var _ref11 = paymode || {},
|
|
1077
|
+
paymodes = _ref11.paymodes;
|
|
963
1078
|
|
|
964
1079
|
var isOffline = _mutantsMicrofx.stores.offlineSys.isOffline;
|
|
965
1080
|
|
|
@@ -990,7 +1105,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
990
1105
|
paymode.currentMode = null;
|
|
991
1106
|
switch (key) {
|
|
992
1107
|
case PayStyle.hyczk:
|
|
993
|
-
_this2.
|
|
1108
|
+
_this2.setState({
|
|
1109
|
+
isInputMember: true
|
|
1110
|
+
}, function () {
|
|
1111
|
+
_this2.showCzkModal(-1);
|
|
1112
|
+
});
|
|
994
1113
|
break;
|
|
995
1114
|
case PayStyle.jfdx:
|
|
996
1115
|
_this2.showJfdxModal(-1);
|
|
@@ -1099,7 +1218,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1099
1218
|
boriginReturn = _this2$store3.boriginReturn;
|
|
1100
1219
|
var noAlreadyWarn = _this2.state.noAlreadyWarn;
|
|
1101
1220
|
|
|
1102
|
-
|
|
1103
1221
|
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(key)) return false;
|
|
1104
1222
|
|
|
1105
1223
|
if (_this2.checkModeDisabled(key, brefund, boriginReturn)) {
|
|
@@ -1169,12 +1287,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1169
1287
|
}
|
|
1170
1288
|
};
|
|
1171
1289
|
|
|
1172
|
-
_this2.setCurrentFocusAndAddPay = function (key) {
|
|
1290
|
+
_this2.setCurrentFocusAndAddPay = function (key, payId) {
|
|
1173
1291
|
_this2.store.changeFocusAndAddPay(key);
|
|
1174
1292
|
if (_this2.store.bquick) {
|
|
1175
1293
|
_this2.handleSettle("quickPay");
|
|
1176
1294
|
} else {
|
|
1177
|
-
_this2.setFocusAndSelection(key);
|
|
1295
|
+
_this2.setFocusAndSelection(key, payId);
|
|
1178
1296
|
}
|
|
1179
1297
|
};
|
|
1180
1298
|
|
|
@@ -1205,7 +1323,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1205
1323
|
PayStyle = _enumController$getEn13.PayStyle;
|
|
1206
1324
|
|
|
1207
1325
|
var reg = /^[\d.]+$/g;
|
|
1208
|
-
if (_this2.store.paymode.currentMode.paymentType === PayStyle.hyczk) {
|
|
1326
|
+
if (_this2.store.paymode.currentMode.paymentType === PayStyle.hyczk || _this2.store.paymode.currentMode.paymentType === PayStyle.jfdx) {
|
|
1209
1327
|
if (!val) {
|
|
1210
1328
|
_this2.setState({
|
|
1211
1329
|
storageValue: val
|
|
@@ -1235,20 +1353,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1235
1353
|
}
|
|
1236
1354
|
}
|
|
1237
1355
|
}
|
|
1238
|
-
|
|
1239
|
-
var value = val;
|
|
1240
|
-
var amountMaxLength = parseInt(_this2.props.initData["AmountMaxLength"] || 10);
|
|
1241
|
-
if (isNaN(val) && val !== '-') {
|
|
1242
|
-
value = _this2._val;
|
|
1243
|
-
} else if (!_this2.store.brefund && !isNaN(val) && parseFloat(val) <= 0) {
|
|
1244
|
-
value = _this2._val;
|
|
1245
|
-
} else if (value.length > amountMaxLength) {
|
|
1246
|
-
value = _this2._val;
|
|
1247
|
-
} else {
|
|
1248
|
-
_this2._val = val;
|
|
1249
|
-
}
|
|
1250
|
-
_this2[_this2.inputkey].input.value = value;
|
|
1251
|
-
_this2.store.paymode.setCurrentModeValue(value, max);
|
|
1356
|
+
_this2.store.paymode.setCurrentModeValue(val, max);
|
|
1252
1357
|
};
|
|
1253
1358
|
|
|
1254
1359
|
_this2.onBlur = function (index, e) {
|
|
@@ -1307,8 +1412,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1307
1412
|
return;
|
|
1308
1413
|
}
|
|
1309
1414
|
|
|
1310
|
-
var
|
|
1311
|
-
isNewRetailBCPos =
|
|
1415
|
+
var _ref12 = _mutantsUtil.platform || {},
|
|
1416
|
+
isNewRetailBCPos = _ref12.isNewRetailBCPos;
|
|
1312
1417
|
|
|
1313
1418
|
if (isNewRetailBCPos) {
|
|
1314
1419
|
_this2.store.paymode.calcDjqCheckValue(q, _this2.store.dto);
|
|
@@ -1343,27 +1448,38 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1343
1448
|
if (_this2.czkdebounced) {
|
|
1344
1449
|
return;
|
|
1345
1450
|
}
|
|
1346
|
-
_this2.czkdebounced = (0, _debounce3.default)((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1347
|
-
|
|
1451
|
+
_this2.czkdebounced = (0, _debounce3.default)((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1452
|
+
var memberdata1;
|
|
1453
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1348
1454
|
while (1) {
|
|
1349
|
-
switch (
|
|
1455
|
+
switch (_context5.prev = _context5.next) {
|
|
1350
1456
|
case 0:
|
|
1351
|
-
|
|
1457
|
+
_context5.next = 2;
|
|
1352
1458
|
return _this2.store.loadCzk(v);
|
|
1353
1459
|
|
|
1354
1460
|
case 2:
|
|
1355
|
-
|
|
1461
|
+
memberdata1 = _context5.sent;
|
|
1462
|
+
|
|
1463
|
+
if (memberdata1 && memberdata1.length === 1) {
|
|
1464
|
+
if (_this2.store.paymode.currentMode.storageCardNo) {
|
|
1465
|
+
_this2.setState({
|
|
1466
|
+
czkValue: _this2.store.paymode.currentMode.storageCardNo
|
|
1467
|
+
});
|
|
1468
|
+
}
|
|
1469
|
+
} else if (memberdata1 && memberdata1.length >= 1) {
|
|
1356
1470
|
_this2.setState({
|
|
1357
|
-
|
|
1471
|
+
czkVisible: true,
|
|
1472
|
+
moreCzkVisible: true,
|
|
1473
|
+
memberdata1: memberdata1
|
|
1358
1474
|
});
|
|
1359
1475
|
}
|
|
1360
1476
|
|
|
1361
|
-
case
|
|
1477
|
+
case 4:
|
|
1362
1478
|
case 'end':
|
|
1363
|
-
return
|
|
1479
|
+
return _context5.stop();
|
|
1364
1480
|
}
|
|
1365
1481
|
}
|
|
1366
|
-
},
|
|
1482
|
+
}, _callee5, _this3);
|
|
1367
1483
|
})), 1000, {
|
|
1368
1484
|
'leading': true,
|
|
1369
1485
|
'trailing': false
|
|
@@ -1531,13 +1647,21 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1531
1647
|
return null;
|
|
1532
1648
|
};
|
|
1533
1649
|
|
|
1534
|
-
_this2.setFocusAndSelection = function (key) {
|
|
1650
|
+
_this2.setFocusAndSelection = function (key, payId) {
|
|
1535
1651
|
var that = _this2;
|
|
1536
1652
|
var paymode = _this2.store.paymode;
|
|
1537
1653
|
|
|
1654
|
+
var _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(),
|
|
1655
|
+
PayStyle = _enumController$getEn19.PayStyle;
|
|
1656
|
+
|
|
1538
1657
|
var themode = (0, _find3.default)(paymode.thePaymodes, function (mode) {
|
|
1539
1658
|
return mode.paymentType === key;
|
|
1540
1659
|
});
|
|
1660
|
+
if (key === PayStyle.hyczk) {
|
|
1661
|
+
themode = (0, _find3.default)(paymode.thePaymodes, function (mode) {
|
|
1662
|
+
return mode.paymethodId === payId;
|
|
1663
|
+
});
|
|
1664
|
+
}
|
|
1541
1665
|
var index = themode && themode.paymethodId || -1;
|
|
1542
1666
|
if (index !== -1) {
|
|
1543
1667
|
setTimeout(function () {
|
|
@@ -1552,11 +1676,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1552
1676
|
}
|
|
1553
1677
|
};
|
|
1554
1678
|
|
|
1555
|
-
_this2.settleUnReturn = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1679
|
+
_this2.settleUnReturn = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7() {
|
|
1556
1680
|
var that;
|
|
1557
|
-
return _regenerator2.default.wrap(function
|
|
1681
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1558
1682
|
while (1) {
|
|
1559
|
-
switch (
|
|
1683
|
+
switch (_context7.prev = _context7.next) {
|
|
1560
1684
|
case 0:
|
|
1561
1685
|
that = _this2;
|
|
1562
1686
|
|
|
@@ -1579,18 +1703,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1579
1703
|
onOk: function onOk() {
|
|
1580
1704
|
var _this4 = this;
|
|
1581
1705
|
|
|
1582
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1706
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
|
|
1583
1707
|
var result;
|
|
1584
|
-
return _regenerator2.default.wrap(function
|
|
1708
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1585
1709
|
while (1) {
|
|
1586
|
-
switch (
|
|
1710
|
+
switch (_context6.prev = _context6.next) {
|
|
1587
1711
|
case 0:
|
|
1588
1712
|
window.__queryingModal = (0, _utils.openQueryingModal)();
|
|
1589
|
-
|
|
1713
|
+
_context6.next = 3;
|
|
1590
1714
|
return that.store.querySettleResult();
|
|
1591
1715
|
|
|
1592
1716
|
case 3:
|
|
1593
|
-
result =
|
|
1717
|
+
result = _context6.sent;
|
|
1594
1718
|
|
|
1595
1719
|
setTimeout(function () {
|
|
1596
1720
|
if (window.__queryingModal) {
|
|
@@ -1598,34 +1722,34 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1598
1722
|
window.__queryingModal = null;
|
|
1599
1723
|
}
|
|
1600
1724
|
}, 0);
|
|
1601
|
-
|
|
1602
|
-
|
|
1725
|
+
_context6.t0 = result.Flag;
|
|
1726
|
+
_context6.next = _context6.t0 === "0" ? 8 : _context6.t0 === "1" ? 11 : _context6.t0 === "2" ? 13 : 15;
|
|
1603
1727
|
break;
|
|
1604
1728
|
|
|
1605
1729
|
case 8:
|
|
1606
1730
|
//成功
|
|
1607
1731
|
that.store.setDtoID(result.ID);
|
|
1608
1732
|
that.settleSuccess();
|
|
1609
|
-
return
|
|
1733
|
+
return _context6.abrupt('break', 15);
|
|
1610
1734
|
|
|
1611
1735
|
case 11:
|
|
1612
1736
|
//处理中
|
|
1613
1737
|
that.settleUnReturn();
|
|
1614
1738
|
// Message.info("结算正在处理中,请稍后再次查询。");
|
|
1615
|
-
return
|
|
1739
|
+
return _context6.abrupt('break', 15);
|
|
1616
1740
|
|
|
1617
1741
|
case 13:
|
|
1618
1742
|
//失败
|
|
1619
1743
|
_message2.default.info('\u7ED3\u7B97\u5931\u8D25\uFF0C\u539F\u56E0:' + result.Message + '\u3002');
|
|
1620
1744
|
// that.settleCanceled();
|
|
1621
|
-
return
|
|
1745
|
+
return _context6.abrupt('break', 15);
|
|
1622
1746
|
|
|
1623
1747
|
case 15:
|
|
1624
1748
|
case 'end':
|
|
1625
|
-
return
|
|
1749
|
+
return _context6.stop();
|
|
1626
1750
|
}
|
|
1627
1751
|
}
|
|
1628
|
-
},
|
|
1752
|
+
}, _callee6, _this4);
|
|
1629
1753
|
}))();
|
|
1630
1754
|
},
|
|
1631
1755
|
onCancel: function onCancel() {
|
|
@@ -1635,10 +1759,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1635
1759
|
|
|
1636
1760
|
case 2:
|
|
1637
1761
|
case 'end':
|
|
1638
|
-
return
|
|
1762
|
+
return _context7.stop();
|
|
1639
1763
|
}
|
|
1640
1764
|
}
|
|
1641
|
-
},
|
|
1765
|
+
}, _callee7, _this3);
|
|
1642
1766
|
}));
|
|
1643
1767
|
|
|
1644
1768
|
_this2.settleCanceled = function () {
|
|
@@ -1647,15 +1771,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1647
1771
|
_this2.cancelState();
|
|
1648
1772
|
};
|
|
1649
1773
|
|
|
1650
|
-
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1651
|
-
var _enumController$
|
|
1774
|
+
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
|
1775
|
+
var _enumController$getEn20, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, getSettleGift, type, resp1;
|
|
1652
1776
|
|
|
1653
|
-
return _regenerator2.default.wrap(function
|
|
1777
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1654
1778
|
while (1) {
|
|
1655
|
-
switch (
|
|
1779
|
+
switch (_context8.prev = _context8.next) {
|
|
1656
1780
|
case 0:
|
|
1657
1781
|
//提示成功
|
|
1658
|
-
_enumController$
|
|
1782
|
+
_enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn20.PayStyle;
|
|
1659
1783
|
_this2$store$paymode = _this2.store.paymode, amount = _this2$store$paymode.amount, received = _this2$store$paymode.received, thePaymodes = _this2$store$paymode.thePaymodes;
|
|
1660
1784
|
IdbusiType = _this2.store.dto.IdbusiType;
|
|
1661
1785
|
charge = _this2.store.paymode.charge;
|
|
@@ -1713,22 +1837,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1713
1837
|
resp1 = false;
|
|
1714
1838
|
|
|
1715
1839
|
if (!(type !== 1)) {
|
|
1716
|
-
|
|
1840
|
+
_context8.next = 20;
|
|
1717
1841
|
break;
|
|
1718
1842
|
}
|
|
1719
1843
|
|
|
1720
|
-
|
|
1721
|
-
|
|
1844
|
+
_context8.prev = 11;
|
|
1845
|
+
_context8.next = 14;
|
|
1722
1846
|
return getSettleGift();
|
|
1723
1847
|
|
|
1724
1848
|
case 14:
|
|
1725
|
-
resp1 =
|
|
1726
|
-
|
|
1849
|
+
resp1 = _context8.sent;
|
|
1850
|
+
_context8.next = 20;
|
|
1727
1851
|
break;
|
|
1728
1852
|
|
|
1729
1853
|
case 17:
|
|
1730
|
-
|
|
1731
|
-
|
|
1854
|
+
_context8.prev = 17;
|
|
1855
|
+
_context8.t0 = _context8['catch'](11);
|
|
1732
1856
|
|
|
1733
1857
|
console.log("获取支付礼包getSettleGift失败");
|
|
1734
1858
|
|
|
@@ -1766,23 +1890,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1766
1890
|
|
|
1767
1891
|
case 21:
|
|
1768
1892
|
case 'end':
|
|
1769
|
-
return
|
|
1893
|
+
return _context8.stop();
|
|
1770
1894
|
}
|
|
1771
1895
|
}
|
|
1772
|
-
},
|
|
1896
|
+
}, _callee8, _this3, [[11, 17]]);
|
|
1773
1897
|
}));
|
|
1774
1898
|
|
|
1775
1899
|
_this2.handleGuestShow = function (dtype, value) {
|
|
1776
1900
|
if (_this2.hasElectron === false) return;
|
|
1777
1901
|
var dt = _mutantsMicrofx.localStore.get('portsetting_hardSet') || [];
|
|
1778
1902
|
|
|
1779
|
-
var
|
|
1780
|
-
guestshow_enable =
|
|
1781
|
-
guestshow_clear =
|
|
1782
|
-
guestshow_welcome =
|
|
1783
|
-
guestshow_collect =
|
|
1784
|
-
guestshow_refund =
|
|
1785
|
-
guestshow_change =
|
|
1903
|
+
var _ref16 = dt || {},
|
|
1904
|
+
guestshow_enable = _ref16.guestshow_enable,
|
|
1905
|
+
guestshow_clear = _ref16.guestshow_clear,
|
|
1906
|
+
guestshow_welcome = _ref16.guestshow_welcome,
|
|
1907
|
+
guestshow_collect = _ref16.guestshow_collect,
|
|
1908
|
+
guestshow_refund = _ref16.guestshow_refund,
|
|
1909
|
+
guestshow_change = _ref16.guestshow_change;
|
|
1786
1910
|
|
|
1787
1911
|
var hasSuccess = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('portsetting_hardSet_isSuccess');
|
|
1788
1912
|
if (!guestshow_enable || !!guestshow_enable && hasSuccess == '0') return;
|
|
@@ -1817,108 +1941,108 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1817
1941
|
};
|
|
1818
1942
|
|
|
1819
1943
|
_this2.handleSettle = function () {
|
|
1820
|
-
var
|
|
1944
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(args) {
|
|
1821
1945
|
var handleUserInputs = function () {
|
|
1822
|
-
var
|
|
1946
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(promises) {
|
|
1823
1947
|
var results, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, p, _result;
|
|
1824
1948
|
|
|
1825
|
-
return _regenerator2.default.wrap(function
|
|
1949
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
1826
1950
|
while (1) {
|
|
1827
|
-
switch (
|
|
1951
|
+
switch (_context10.prev = _context10.next) {
|
|
1828
1952
|
case 0:
|
|
1829
1953
|
results = [];
|
|
1830
|
-
|
|
1954
|
+
_context10.prev = 1;
|
|
1831
1955
|
_iteratorNormalCompletion = true;
|
|
1832
1956
|
_didIteratorError = false;
|
|
1833
1957
|
_iteratorError = undefined;
|
|
1834
|
-
|
|
1958
|
+
_context10.prev = 5;
|
|
1835
1959
|
_iterator = (0, _getIterator3.default)(promises);
|
|
1836
1960
|
|
|
1837
1961
|
case 7:
|
|
1838
1962
|
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
|
|
1839
|
-
|
|
1963
|
+
_context10.next = 16;
|
|
1840
1964
|
break;
|
|
1841
1965
|
}
|
|
1842
1966
|
|
|
1843
1967
|
p = _step.value;
|
|
1844
|
-
|
|
1968
|
+
_context10.next = 11;
|
|
1845
1969
|
return p;
|
|
1846
1970
|
|
|
1847
1971
|
case 11:
|
|
1848
|
-
_result =
|
|
1972
|
+
_result = _context10.sent;
|
|
1849
1973
|
|
|
1850
1974
|
results.push(_result);
|
|
1851
1975
|
|
|
1852
1976
|
case 13:
|
|
1853
1977
|
_iteratorNormalCompletion = true;
|
|
1854
|
-
|
|
1978
|
+
_context10.next = 7;
|
|
1855
1979
|
break;
|
|
1856
1980
|
|
|
1857
1981
|
case 16:
|
|
1858
|
-
|
|
1982
|
+
_context10.next = 22;
|
|
1859
1983
|
break;
|
|
1860
1984
|
|
|
1861
1985
|
case 18:
|
|
1862
|
-
|
|
1863
|
-
|
|
1986
|
+
_context10.prev = 18;
|
|
1987
|
+
_context10.t0 = _context10['catch'](5);
|
|
1864
1988
|
_didIteratorError = true;
|
|
1865
|
-
_iteratorError =
|
|
1989
|
+
_iteratorError = _context10.t0;
|
|
1866
1990
|
|
|
1867
1991
|
case 22:
|
|
1868
|
-
|
|
1869
|
-
|
|
1992
|
+
_context10.prev = 22;
|
|
1993
|
+
_context10.prev = 23;
|
|
1870
1994
|
|
|
1871
1995
|
if (!_iteratorNormalCompletion && _iterator.return) {
|
|
1872
1996
|
_iterator.return();
|
|
1873
1997
|
}
|
|
1874
1998
|
|
|
1875
1999
|
case 25:
|
|
1876
|
-
|
|
2000
|
+
_context10.prev = 25;
|
|
1877
2001
|
|
|
1878
2002
|
if (!_didIteratorError) {
|
|
1879
|
-
|
|
2003
|
+
_context10.next = 28;
|
|
1880
2004
|
break;
|
|
1881
2005
|
}
|
|
1882
2006
|
|
|
1883
2007
|
throw _iteratorError;
|
|
1884
2008
|
|
|
1885
2009
|
case 28:
|
|
1886
|
-
return
|
|
2010
|
+
return _context10.finish(25);
|
|
1887
2011
|
|
|
1888
2012
|
case 29:
|
|
1889
|
-
return
|
|
2013
|
+
return _context10.finish(22);
|
|
1890
2014
|
|
|
1891
2015
|
case 30:
|
|
1892
2016
|
window.__loadingModal = (0, _utils.openLoadingModal)();
|
|
1893
|
-
|
|
2017
|
+
_context10.next = 33;
|
|
1894
2018
|
return commit(results);
|
|
1895
2019
|
|
|
1896
2020
|
case 33:
|
|
1897
|
-
|
|
2021
|
+
_context10.next = 37;
|
|
1898
2022
|
break;
|
|
1899
2023
|
|
|
1900
2024
|
case 35:
|
|
1901
|
-
|
|
1902
|
-
|
|
2025
|
+
_context10.prev = 35;
|
|
2026
|
+
_context10.t1 = _context10['catch'](1);
|
|
1903
2027
|
|
|
1904
2028
|
case 37:
|
|
1905
2029
|
case 'end':
|
|
1906
|
-
return
|
|
2030
|
+
return _context10.stop();
|
|
1907
2031
|
}
|
|
1908
2032
|
}
|
|
1909
|
-
},
|
|
2033
|
+
}, _callee10, this, [[1, 35], [5, 18, 22, 30], [23,, 25, 29]]);
|
|
1910
2034
|
}));
|
|
1911
2035
|
|
|
1912
|
-
return function handleUserInputs(
|
|
1913
|
-
return
|
|
2036
|
+
return function handleUserInputs(_x6) {
|
|
2037
|
+
return _ref19.apply(this, arguments);
|
|
1914
2038
|
};
|
|
1915
2039
|
}();
|
|
1916
2040
|
|
|
1917
|
-
var _enumController$
|
|
2041
|
+
var _enumController$getEn21, PayStyle, _this2$store6, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
|
|
1918
2042
|
|
|
1919
|
-
return _regenerator2.default.wrap(function
|
|
2043
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
1920
2044
|
while (1) {
|
|
1921
|
-
switch (
|
|
2045
|
+
switch (_context11.prev = _context11.next) {
|
|
1922
2046
|
case 0:
|
|
1923
2047
|
_this2.setState({
|
|
1924
2048
|
settleDisabled: true
|
|
@@ -1934,7 +2058,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1934
2058
|
// }
|
|
1935
2059
|
//
|
|
1936
2060
|
// testAsync(p);
|
|
1937
|
-
_enumController$
|
|
2061
|
+
_enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn21.PayStyle;
|
|
1938
2062
|
_this2$store6 = _this2.store, paymode = _this2$store6.paymode, brefund = _this2$store6.brefund, boriginReturn = _this2$store6.boriginReturn, newStyle = _this2$store6.newStyle;
|
|
1939
2063
|
isQuickPay = args === 'quickPay';
|
|
1940
2064
|
that = _this2;
|
|
@@ -1950,7 +2074,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1950
2074
|
});
|
|
1951
2075
|
|
|
1952
2076
|
if (!(that.checkCharge() && Math.abs(paymode.receivable) > that.props.initData("posChangeUpperAmount"))) {
|
|
1953
|
-
|
|
2077
|
+
_context11.next = 13;
|
|
1954
2078
|
break;
|
|
1955
2079
|
}
|
|
1956
2080
|
|
|
@@ -1958,11 +2082,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1958
2082
|
_this2.setState({
|
|
1959
2083
|
settleDisabled: false
|
|
1960
2084
|
});
|
|
1961
|
-
return
|
|
2085
|
+
return _context11.abrupt('return');
|
|
1962
2086
|
|
|
1963
2087
|
case 13:
|
|
1964
2088
|
if (!(args !== "zero" && !newStyle)) {
|
|
1965
|
-
|
|
2089
|
+
_context11.next = 19;
|
|
1966
2090
|
break;
|
|
1967
2091
|
}
|
|
1968
2092
|
|
|
@@ -1971,7 +2095,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1971
2095
|
});
|
|
1972
2096
|
|
|
1973
2097
|
if (!zeromode) {
|
|
1974
|
-
|
|
2098
|
+
_context11.next = 19;
|
|
1975
2099
|
break;
|
|
1976
2100
|
}
|
|
1977
2101
|
|
|
@@ -1979,7 +2103,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1979
2103
|
settleDisabled: false
|
|
1980
2104
|
});
|
|
1981
2105
|
_message2.default.error(zeromode.name + ' 的结算金额为零,不可以结算。');
|
|
1982
|
-
return
|
|
2106
|
+
return _context11.abrupt('return');
|
|
1983
2107
|
|
|
1984
2108
|
case 19:
|
|
1985
2109
|
promises = [];
|
|
@@ -1988,14 +2112,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1988
2112
|
}) : paymode.thePaymodes, 'orderBy');
|
|
1989
2113
|
|
|
1990
2114
|
if (!isQuickPay) {
|
|
1991
|
-
|
|
2115
|
+
_context11.next = 27;
|
|
1992
2116
|
break;
|
|
1993
2117
|
}
|
|
1994
2118
|
|
|
1995
2119
|
quickmode = thePaymodes[0];
|
|
1996
2120
|
|
|
1997
2121
|
if (!_this2.checkModeDisabled(quickmode.paymentType, brefund, boriginReturn)) {
|
|
1998
|
-
|
|
2122
|
+
_context11.next = 27;
|
|
1999
2123
|
break;
|
|
2000
2124
|
}
|
|
2001
2125
|
|
|
@@ -2003,7 +2127,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2003
2127
|
settleDisabled: false
|
|
2004
2128
|
});
|
|
2005
2129
|
_message2.default.error('退款不能使用' + quickmode.name + '结算,请使用其他结算方式!');
|
|
2006
|
-
return
|
|
2130
|
+
return _context11.abrupt('return');
|
|
2007
2131
|
|
|
2008
2132
|
case 27:
|
|
2009
2133
|
(0, _forEach3.default)(thePaymodes, function (mode) {
|
|
@@ -2013,27 +2137,27 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2013
2137
|
});
|
|
2014
2138
|
|
|
2015
2139
|
commit = function () {
|
|
2016
|
-
var
|
|
2140
|
+
var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(values) {
|
|
2017
2141
|
var result;
|
|
2018
|
-
return _regenerator2.default.wrap(function
|
|
2142
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
2019
2143
|
while (1) {
|
|
2020
|
-
switch (
|
|
2144
|
+
switch (_context9.prev = _context9.next) {
|
|
2021
2145
|
case 0:
|
|
2022
|
-
|
|
2146
|
+
_context9.next = 2;
|
|
2023
2147
|
return _this2.store.commit(_this2.props.bTest);
|
|
2024
2148
|
|
|
2025
2149
|
case 2:
|
|
2026
|
-
result =
|
|
2150
|
+
result = _context9.sent;
|
|
2027
2151
|
|
|
2028
2152
|
if (!(result === true)) {
|
|
2029
|
-
|
|
2153
|
+
_context9.next = 8;
|
|
2030
2154
|
break;
|
|
2031
2155
|
}
|
|
2032
2156
|
|
|
2033
2157
|
//成功
|
|
2034
2158
|
that.settleSuccess();
|
|
2035
2159
|
_promise2.default.resolve();
|
|
2036
|
-
|
|
2160
|
+
_context9.next = 23;
|
|
2037
2161
|
break;
|
|
2038
2162
|
|
|
2039
2163
|
case 8:
|
|
@@ -2050,24 +2174,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2050
2174
|
}, 0);
|
|
2051
2175
|
|
|
2052
2176
|
if (!(result && (result.Code || result.code))) {
|
|
2053
|
-
|
|
2177
|
+
_context9.next = 20;
|
|
2054
2178
|
break;
|
|
2055
2179
|
}
|
|
2056
2180
|
|
|
2057
|
-
|
|
2058
|
-
|
|
2181
|
+
_context9.t0 = result.Code || result.code;
|
|
2182
|
+
_context9.next = _context9.t0 === 'RE_Settle_UnReturn' ? 14 : _context9.t0 === 'ECONNABORTED' ? 18 : 20;
|
|
2059
2183
|
break;
|
|
2060
2184
|
|
|
2061
2185
|
case 14:
|
|
2062
2186
|
console.log('settlement--RE_Settle_UnReturn--调用清除数据==Focus==');
|
|
2063
2187
|
_this2.props.clearVoucherData && _this2.props.clearVoucherData();
|
|
2064
2188
|
_this2.cancelState();
|
|
2065
|
-
return
|
|
2189
|
+
return _context9.abrupt('break', 20);
|
|
2066
2190
|
|
|
2067
2191
|
case 18:
|
|
2068
2192
|
//error.code === 'ECONNABORTED' && error.message.indexOf('timeout')
|
|
2069
2193
|
result.message.indexOf('timeout') > -1 && that.settleUnReturn();
|
|
2070
|
-
return
|
|
2194
|
+
return _context9.abrupt('break', 20);
|
|
2071
2195
|
|
|
2072
2196
|
case 20:
|
|
2073
2197
|
if (isQuickPay) {
|
|
@@ -2075,19 +2199,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2075
2199
|
that.cancelState();
|
|
2076
2200
|
}
|
|
2077
2201
|
|
|
2078
|
-
|
|
2202
|
+
_context9.next = 23;
|
|
2079
2203
|
return _promise2.default.reject();
|
|
2080
2204
|
|
|
2081
2205
|
case 23:
|
|
2082
2206
|
case 'end':
|
|
2083
|
-
return
|
|
2207
|
+
return _context9.stop();
|
|
2084
2208
|
}
|
|
2085
2209
|
}
|
|
2086
|
-
},
|
|
2210
|
+
}, _callee9, _this3);
|
|
2087
2211
|
}));
|
|
2088
2212
|
|
|
2089
|
-
return function commit(
|
|
2090
|
-
return
|
|
2213
|
+
return function commit(_x5) {
|
|
2214
|
+
return _ref18.apply(this, arguments);
|
|
2091
2215
|
};
|
|
2092
2216
|
}();
|
|
2093
2217
|
|
|
@@ -2095,102 +2219,102 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2095
2219
|
|
|
2096
2220
|
case 30:
|
|
2097
2221
|
case 'end':
|
|
2098
|
-
return
|
|
2222
|
+
return _context11.stop();
|
|
2099
2223
|
}
|
|
2100
2224
|
}
|
|
2101
|
-
},
|
|
2225
|
+
}, _callee11, _this3);
|
|
2102
2226
|
}));
|
|
2103
2227
|
|
|
2104
|
-
return function (
|
|
2105
|
-
return
|
|
2228
|
+
return function (_x4) {
|
|
2229
|
+
return _ref17.apply(this, arguments);
|
|
2106
2230
|
};
|
|
2107
2231
|
}();
|
|
2108
2232
|
|
|
2109
|
-
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
2233
|
+
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
|
|
2110
2234
|
var handleUserInputs = function () {
|
|
2111
|
-
var
|
|
2235
|
+
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(promises) {
|
|
2112
2236
|
var results, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, p, _result2;
|
|
2113
2237
|
|
|
2114
|
-
return _regenerator2.default.wrap(function
|
|
2238
|
+
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
|
2115
2239
|
while (1) {
|
|
2116
|
-
switch (
|
|
2240
|
+
switch (_context13.prev = _context13.next) {
|
|
2117
2241
|
case 0:
|
|
2118
2242
|
results = [];
|
|
2119
|
-
|
|
2243
|
+
_context13.prev = 1;
|
|
2120
2244
|
_iteratorNormalCompletion2 = true;
|
|
2121
2245
|
_didIteratorError2 = false;
|
|
2122
2246
|
_iteratorError2 = undefined;
|
|
2123
|
-
|
|
2247
|
+
_context13.prev = 5;
|
|
2124
2248
|
_iterator2 = (0, _getIterator3.default)(promises);
|
|
2125
2249
|
|
|
2126
2250
|
case 7:
|
|
2127
2251
|
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {
|
|
2128
|
-
|
|
2252
|
+
_context13.next = 16;
|
|
2129
2253
|
break;
|
|
2130
2254
|
}
|
|
2131
2255
|
|
|
2132
2256
|
p = _step2.value;
|
|
2133
|
-
|
|
2257
|
+
_context13.next = 11;
|
|
2134
2258
|
return p;
|
|
2135
2259
|
|
|
2136
2260
|
case 11:
|
|
2137
|
-
_result2 =
|
|
2261
|
+
_result2 = _context13.sent;
|
|
2138
2262
|
|
|
2139
2263
|
results.push(_result2);
|
|
2140
2264
|
|
|
2141
2265
|
case 13:
|
|
2142
2266
|
_iteratorNormalCompletion2 = true;
|
|
2143
|
-
|
|
2267
|
+
_context13.next = 7;
|
|
2144
2268
|
break;
|
|
2145
2269
|
|
|
2146
2270
|
case 16:
|
|
2147
|
-
|
|
2271
|
+
_context13.next = 22;
|
|
2148
2272
|
break;
|
|
2149
2273
|
|
|
2150
2274
|
case 18:
|
|
2151
|
-
|
|
2152
|
-
|
|
2275
|
+
_context13.prev = 18;
|
|
2276
|
+
_context13.t0 = _context13['catch'](5);
|
|
2153
2277
|
_didIteratorError2 = true;
|
|
2154
|
-
_iteratorError2 =
|
|
2278
|
+
_iteratorError2 = _context13.t0;
|
|
2155
2279
|
|
|
2156
2280
|
case 22:
|
|
2157
|
-
|
|
2158
|
-
|
|
2281
|
+
_context13.prev = 22;
|
|
2282
|
+
_context13.prev = 23;
|
|
2159
2283
|
|
|
2160
2284
|
if (!_iteratorNormalCompletion2 && _iterator2.return) {
|
|
2161
2285
|
_iterator2.return();
|
|
2162
2286
|
}
|
|
2163
2287
|
|
|
2164
2288
|
case 25:
|
|
2165
|
-
|
|
2289
|
+
_context13.prev = 25;
|
|
2166
2290
|
|
|
2167
2291
|
if (!_didIteratorError2) {
|
|
2168
|
-
|
|
2292
|
+
_context13.next = 28;
|
|
2169
2293
|
break;
|
|
2170
2294
|
}
|
|
2171
2295
|
|
|
2172
2296
|
throw _iteratorError2;
|
|
2173
2297
|
|
|
2174
2298
|
case 28:
|
|
2175
|
-
return
|
|
2299
|
+
return _context13.finish(25);
|
|
2176
2300
|
|
|
2177
2301
|
case 29:
|
|
2178
|
-
return
|
|
2302
|
+
return _context13.finish(22);
|
|
2179
2303
|
|
|
2180
2304
|
case 30:
|
|
2181
|
-
|
|
2305
|
+
_context13.next = 32;
|
|
2182
2306
|
return commit(results);
|
|
2183
2307
|
|
|
2184
2308
|
case 32:
|
|
2185
|
-
|
|
2309
|
+
_context13.next = 37;
|
|
2186
2310
|
break;
|
|
2187
2311
|
|
|
2188
2312
|
case 34:
|
|
2189
|
-
|
|
2190
|
-
|
|
2313
|
+
_context13.prev = 34;
|
|
2314
|
+
_context13.t1 = _context13['catch'](1);
|
|
2191
2315
|
|
|
2192
|
-
if (
|
|
2193
|
-
_message2.default.error(
|
|
2316
|
+
if (_context13.t1 != "cancelpwd") {
|
|
2317
|
+
_message2.default.error(_context13.t1);
|
|
2194
2318
|
setTimeout(function () {
|
|
2195
2319
|
that.handleCzk();
|
|
2196
2320
|
}, 500);
|
|
@@ -2198,37 +2322,37 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2198
2322
|
|
|
2199
2323
|
case 37:
|
|
2200
2324
|
case 'end':
|
|
2201
|
-
return
|
|
2325
|
+
return _context13.stop();
|
|
2202
2326
|
}
|
|
2203
2327
|
}
|
|
2204
|
-
},
|
|
2328
|
+
}, _callee13, this, [[1, 34], [5, 18, 22, 30], [23,, 25, 29]]);
|
|
2205
2329
|
}));
|
|
2206
2330
|
|
|
2207
|
-
return function handleUserInputs(
|
|
2208
|
-
return
|
|
2331
|
+
return function handleUserInputs(_x8) {
|
|
2332
|
+
return _ref23.apply(this, arguments);
|
|
2209
2333
|
};
|
|
2210
2334
|
}();
|
|
2211
2335
|
|
|
2212
|
-
var that, curmode, promises,
|
|
2336
|
+
var that, curmode, promises, _ref21, isNewRetailBCPos, _enumController$getEn22, PayStyle, commit;
|
|
2213
2337
|
|
|
2214
|
-
return _regenerator2.default.wrap(function
|
|
2338
|
+
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
|
2215
2339
|
while (1) {
|
|
2216
|
-
switch (
|
|
2340
|
+
switch (_context14.prev = _context14.next) {
|
|
2217
2341
|
case 0:
|
|
2218
2342
|
that = _this2;
|
|
2219
2343
|
curmode = _this2.store.paymode.currentMode;
|
|
2220
2344
|
promises = [];
|
|
2221
|
-
|
|
2345
|
+
_ref21 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref21.isNewRetailBCPos;
|
|
2222
2346
|
|
|
2223
2347
|
if (isNewRetailBCPos) {
|
|
2224
2348
|
if (curmode.value > 0) {
|
|
2225
|
-
_enumController$
|
|
2349
|
+
_enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn22.PayStyle;
|
|
2226
2350
|
|
|
2227
2351
|
if (curmode.paymentType === PayStyle.hyczk) {
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
promises.push(that.inputPwd(curmode));
|
|
2352
|
+
if (curmode.cardTypeEnum === 'BALANCE_CARD') {
|
|
2353
|
+
!curmode.freePaymentPasswordStore && promises.push(that.inputPwd(curmode));
|
|
2354
|
+
} else {
|
|
2355
|
+
curmode.isNeedPassword && promises.push(that.inputPwd(curmode));
|
|
2232
2356
|
}
|
|
2233
2357
|
}
|
|
2234
2358
|
}
|
|
@@ -2239,57 +2363,57 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2239
2363
|
}
|
|
2240
2364
|
|
|
2241
2365
|
commit = function () {
|
|
2242
|
-
var
|
|
2366
|
+
var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(values) {
|
|
2243
2367
|
var result;
|
|
2244
|
-
return _regenerator2.default.wrap(function
|
|
2368
|
+
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
|
2245
2369
|
while (1) {
|
|
2246
|
-
switch (
|
|
2370
|
+
switch (_context12.prev = _context12.next) {
|
|
2247
2371
|
case 0:
|
|
2248
2372
|
if (!(values.length > 0)) {
|
|
2249
|
-
|
|
2373
|
+
_context12.next = 6;
|
|
2250
2374
|
break;
|
|
2251
2375
|
}
|
|
2252
2376
|
|
|
2253
|
-
|
|
2377
|
+
_context12.next = 3;
|
|
2254
2378
|
return that.store.validePwd(values[0]);
|
|
2255
2379
|
|
|
2256
2380
|
case 3:
|
|
2257
|
-
|
|
2258
|
-
|
|
2381
|
+
_context12.t0 = _context12.sent;
|
|
2382
|
+
_context12.next = 7;
|
|
2259
2383
|
break;
|
|
2260
2384
|
|
|
2261
2385
|
case 6:
|
|
2262
|
-
|
|
2386
|
+
_context12.t0 = "";
|
|
2263
2387
|
|
|
2264
2388
|
case 7:
|
|
2265
|
-
result =
|
|
2389
|
+
result = _context12.t0;
|
|
2266
2390
|
|
|
2267
2391
|
if (!(result == "")) {
|
|
2268
|
-
|
|
2392
|
+
_context12.next = 13;
|
|
2269
2393
|
break;
|
|
2270
2394
|
}
|
|
2271
2395
|
|
|
2272
2396
|
//成功
|
|
2273
2397
|
//返回
|
|
2274
|
-
that.setCurrentFocusAndAddPay(curmode.paymentType);
|
|
2398
|
+
that.setCurrentFocusAndAddPay(curmode.paymentType, curmode.paymethodId);
|
|
2275
2399
|
_promise2.default.resolve();
|
|
2276
|
-
|
|
2400
|
+
_context12.next = 15;
|
|
2277
2401
|
break;
|
|
2278
2402
|
|
|
2279
2403
|
case 13:
|
|
2280
|
-
|
|
2404
|
+
_context12.next = 15;
|
|
2281
2405
|
return _promise2.default.reject(result);
|
|
2282
2406
|
|
|
2283
2407
|
case 15:
|
|
2284
2408
|
case 'end':
|
|
2285
|
-
return
|
|
2409
|
+
return _context12.stop();
|
|
2286
2410
|
}
|
|
2287
2411
|
}
|
|
2288
|
-
},
|
|
2412
|
+
}, _callee12, _this3);
|
|
2289
2413
|
}));
|
|
2290
2414
|
|
|
2291
|
-
return function commit(
|
|
2292
|
-
return
|
|
2415
|
+
return function commit(_x7) {
|
|
2416
|
+
return _ref22.apply(this, arguments);
|
|
2293
2417
|
};
|
|
2294
2418
|
}();
|
|
2295
2419
|
|
|
@@ -2297,10 +2421,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2297
2421
|
|
|
2298
2422
|
case 7:
|
|
2299
2423
|
case 'end':
|
|
2300
|
-
return
|
|
2424
|
+
return _context14.stop();
|
|
2301
2425
|
}
|
|
2302
2426
|
}
|
|
2303
|
-
},
|
|
2427
|
+
}, _callee14, _this3);
|
|
2304
2428
|
}));
|
|
2305
2429
|
|
|
2306
2430
|
_this2.fKeyboardOnOk = function (paymethodeId) {
|
|
@@ -2340,15 +2464,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2340
2464
|
};
|
|
2341
2465
|
|
|
2342
2466
|
_this2.inputPwd = function () {
|
|
2343
|
-
var
|
|
2467
|
+
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(paymode) {
|
|
2344
2468
|
var that, confirmPwd;
|
|
2345
|
-
return _regenerator2.default.wrap(function
|
|
2469
|
+
return _regenerator2.default.wrap(function _callee15$(_context15) {
|
|
2346
2470
|
while (1) {
|
|
2347
|
-
switch (
|
|
2471
|
+
switch (_context15.prev = _context15.next) {
|
|
2348
2472
|
case 0:
|
|
2349
2473
|
that = _this2;
|
|
2350
2474
|
confirmPwd = _this2.state.confirmPwd;
|
|
2351
|
-
return
|
|
2475
|
+
return _context15.abrupt('return', new _promise2.default(function (resolve, reject) {
|
|
2352
2476
|
var modal = (0, _asyncModal2.default)({
|
|
2353
2477
|
onPressEnter: function onPressEnter() {
|
|
2354
2478
|
_keyboard2.default.close();
|
|
@@ -2356,8 +2480,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2356
2480
|
// if (v !== '') {
|
|
2357
2481
|
modal.destroy();
|
|
2358
2482
|
|
|
2359
|
-
var
|
|
2360
|
-
confirmPwd =
|
|
2483
|
+
var _ref25 = that.state || {},
|
|
2484
|
+
confirmPwd = _ref25.confirmPwd;
|
|
2361
2485
|
|
|
2362
2486
|
setTimeout(function () {
|
|
2363
2487
|
paymode.authCode = v;
|
|
@@ -2447,8 +2571,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2447
2571
|
type: 'primary', size: 'large', onClick: function onClick() {
|
|
2448
2572
|
var v = (0, _trim3.default)(that['inputAmount']['input']['value']);
|
|
2449
2573
|
|
|
2450
|
-
var
|
|
2451
|
-
confirmPwd =
|
|
2574
|
+
var _ref26 = that.state || {},
|
|
2575
|
+
confirmPwd = _ref26.confirmPwd;
|
|
2452
2576
|
// if (v !== '') {
|
|
2453
2577
|
|
|
2454
2578
|
|
|
@@ -2482,24 +2606,25 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2482
2606
|
|
|
2483
2607
|
case 3:
|
|
2484
2608
|
case 'end':
|
|
2485
|
-
return
|
|
2609
|
+
return _context15.stop();
|
|
2486
2610
|
}
|
|
2487
2611
|
}
|
|
2488
|
-
},
|
|
2612
|
+
}, _callee15, _this3);
|
|
2489
2613
|
}));
|
|
2490
2614
|
|
|
2491
|
-
return function (
|
|
2492
|
-
return
|
|
2615
|
+
return function (_x9) {
|
|
2616
|
+
return _ref24.apply(this, arguments);
|
|
2493
2617
|
};
|
|
2494
2618
|
}();
|
|
2495
2619
|
|
|
2496
2620
|
_this2.btnDebounced = function (type, bquick) {
|
|
2497
2621
|
_this2.setState({
|
|
2498
|
-
bquick: bquick
|
|
2622
|
+
bquick: bquick,
|
|
2623
|
+
isInputMember: true
|
|
2499
2624
|
});
|
|
2500
2625
|
|
|
2501
|
-
var _enumController$
|
|
2502
|
-
PayStyle = _enumController$
|
|
2626
|
+
var _enumController$getEn23 = _mutantsUtil.enumController.getEnumOj(),
|
|
2627
|
+
PayStyle = _enumController$getEn23.PayStyle;
|
|
2503
2628
|
|
|
2504
2629
|
var _this2$store7 = _this2.store,
|
|
2505
2630
|
paymode = _this2$store7.paymode,
|
|
@@ -2542,13 +2667,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2542
2667
|
|
|
2543
2668
|
_this2.onCzkChange = function (v) {
|
|
2544
2669
|
// console.log("czk change:"+new Date().toLocaleTimeString())
|
|
2545
|
-
var
|
|
2546
|
-
isNewRetailBCPos =
|
|
2670
|
+
var _ref27 = _mutantsUtil.platform || {},
|
|
2671
|
+
isNewRetailBCPos = _ref27.isNewRetailBCPos;
|
|
2547
2672
|
|
|
2548
2673
|
if (!isNewRetailBCPos) {
|
|
2549
2674
|
_this2.store.paymode.currentMode.member.setCardNo(v);
|
|
2550
2675
|
}
|
|
2551
|
-
if (!/^[
|
|
2676
|
+
if (!/^[A-Za-z0-9]*$/.test(v)) {
|
|
2552
2677
|
return;
|
|
2553
2678
|
}
|
|
2554
2679
|
_this2.setState({
|
|
@@ -2604,8 +2729,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2604
2729
|
};
|
|
2605
2730
|
|
|
2606
2731
|
_this2.checkCharge = function () {
|
|
2607
|
-
var _enumController$
|
|
2608
|
-
PayStyle = _enumController$
|
|
2732
|
+
var _enumController$getEn24 = _mutantsUtil.enumController.getEnumOj(),
|
|
2733
|
+
PayStyle = _enumController$getEn24.PayStyle;
|
|
2609
2734
|
|
|
2610
2735
|
var paymode = _this2.store.paymode;
|
|
2611
2736
|
|
|
@@ -2652,8 +2777,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2652
2777
|
};
|
|
2653
2778
|
|
|
2654
2779
|
_this2.getXianjinPayment = function (payType, value) {
|
|
2655
|
-
var _enumController$
|
|
2656
|
-
PayStyle = _enumController$
|
|
2780
|
+
var _enumController$getEn25 = _mutantsUtil.enumController.getEnumOj(),
|
|
2781
|
+
PayStyle = _enumController$getEn25.PayStyle;
|
|
2657
2782
|
|
|
2658
2783
|
var isManualIntoAmount = _this2.state.isManualIntoAmount;
|
|
2659
2784
|
|
|
@@ -2661,8 +2786,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2661
2786
|
};
|
|
2662
2787
|
|
|
2663
2788
|
_this2.getXianjinBalance = function (payType, value) {
|
|
2664
|
-
var _enumController$
|
|
2665
|
-
PayStyle = _enumController$
|
|
2789
|
+
var _enumController$getEn26 = _mutantsUtil.enumController.getEnumOj(),
|
|
2790
|
+
PayStyle = _enumController$getEn26.PayStyle;
|
|
2666
2791
|
//找零金额-存在权限控制
|
|
2667
2792
|
|
|
2668
2793
|
|
|
@@ -2682,9 +2807,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2682
2807
|
var isManualIntoAmount = void 0;
|
|
2683
2808
|
// 付款弹窗
|
|
2684
2809
|
return new _promise2.default(function (resolve, reject) {
|
|
2685
|
-
var _enumController$
|
|
2686
|
-
PayStyle = _enumController$
|
|
2687
|
-
PayIcon2 = _enumController$
|
|
2810
|
+
var _enumController$getEn27 = _mutantsUtil.enumController.getEnumOj(),
|
|
2811
|
+
PayStyle = _enumController$getEn27.PayStyle,
|
|
2812
|
+
PayIcon2 = _enumController$getEn27.PayIcon2;
|
|
2688
2813
|
|
|
2689
2814
|
var modal = (0, _asyncModal2.default)({
|
|
2690
2815
|
onPressEnter: function onPressEnter() {
|
|
@@ -2890,7 +3015,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2890
3015
|
settleDisabled: false
|
|
2891
3016
|
});
|
|
2892
3017
|
that.store.bquick && that.props.onCancelSettle && that.props.onCancelSettle();
|
|
2893
|
-
that.store.delPay(paymode.paymethodId);
|
|
3018
|
+
that.store.bquick && that.store.delPay(paymode.paymethodId);
|
|
2894
3019
|
reject('\u652F\u4ED8\u65B9\u5F0F: ' + paymode.name + '\u5931\u8D25');
|
|
2895
3020
|
} },
|
|
2896
3021
|
'\u53D6\u6D88'
|
|
@@ -2953,8 +3078,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2953
3078
|
paymode = _this2$store8.paymode,
|
|
2954
3079
|
newStyle = _this2$store8.newStyle;
|
|
2955
3080
|
|
|
2956
|
-
var _enumController$
|
|
2957
|
-
PayStyle = _enumController$
|
|
3081
|
+
var _enumController$getEn28 = _mutantsUtil.enumController.getEnumOj(),
|
|
3082
|
+
PayStyle = _enumController$getEn28.PayStyle;
|
|
2958
3083
|
|
|
2959
3084
|
var payTypeList = [PayStyle.SQBPAY, PayStyle.CSYH, PayStyle.smzf];
|
|
2960
3085
|
var payTypeFilterList = payTypeList.filter(function (filterType) {
|
|
@@ -2975,15 +3100,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2975
3100
|
};
|
|
2976
3101
|
|
|
2977
3102
|
_this2.checkModeDisabled = function (type, brefund, boriginReturn) {
|
|
2978
|
-
var _enumController$
|
|
2979
|
-
PayStyle = _enumController$
|
|
3103
|
+
var _enumController$getEn29 = _mutantsUtil.enumController.getEnumOj(),
|
|
3104
|
+
PayStyle = _enumController$getEn29.PayStyle;
|
|
2980
3105
|
|
|
2981
3106
|
return (brefund && (type == PayStyle.wx || type == PayStyle.zfb || type == PayStyle.smzf || type == PayStyle.jfdx || type == PayStyle.djq || type == PayStyle.SQBPAY || type == PayStyle.CSYH) || boriginReturn && type == PayStyle.hyczk) && !(boriginReturn && (type == PayStyle.wx || type == PayStyle.zfb)) || _this2.checkCurrentModeHaveMutex(type);
|
|
2982
3107
|
};
|
|
2983
3108
|
|
|
2984
3109
|
_this2.checkSettleDisabled = function (paymode, thePaymodes) {
|
|
2985
|
-
var _enumController$
|
|
2986
|
-
PayStyle = _enumController$
|
|
3110
|
+
var _enumController$getEn30 = _mutantsUtil.enumController.getEnumOj(),
|
|
3111
|
+
PayStyle = _enumController$getEn30.PayStyle;
|
|
2987
3112
|
|
|
2988
3113
|
console.log("settlement.checkSettleDisabled开始执行,参数:", { paymode: paymode, thePaymodes: thePaymodes });
|
|
2989
3114
|
if (paymode.amount == 0 && paymode.received == 0) {
|
|
@@ -3029,8 +3154,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3029
3154
|
};
|
|
3030
3155
|
|
|
3031
3156
|
_this2.editCzkModal = function () {
|
|
3032
|
-
var _enumController$
|
|
3033
|
-
PayStyle = _enumController$
|
|
3157
|
+
var _enumController$getEn31 = _mutantsUtil.enumController.getEnumOj(),
|
|
3158
|
+
PayStyle = _enumController$getEn31.PayStyle;
|
|
3034
3159
|
|
|
3035
3160
|
(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
|
|
3036
3161
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
@@ -3096,9 +3221,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3096
3221
|
isPrototypeClick: false
|
|
3097
3222
|
});
|
|
3098
3223
|
var that = _this2;
|
|
3099
|
-
var _this2$
|
|
3100
|
-
bquick = _this2$
|
|
3101
|
-
isPrototypeClick = _this2$
|
|
3224
|
+
var _this2$state3 = _this2.state,
|
|
3225
|
+
bquick = _this2$state3.bquick,
|
|
3226
|
+
isPrototypeClick = _this2$state3.isPrototypeClick;
|
|
3102
3227
|
|
|
3103
3228
|
if (!isPrototypeClick) {
|
|
3104
3229
|
if (bquick) {
|
|
@@ -3124,23 +3249,26 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3124
3249
|
|
|
3125
3250
|
_this2.hasElectron = hasElectron;
|
|
3126
3251
|
|
|
3127
|
-
var
|
|
3128
|
-
|
|
3129
|
-
|
|
3252
|
+
var _ref28 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {},
|
|
3253
|
+
MemberMeStorageCardInputByKeyBoard = _ref28.MemberMeStorageCardInputByKeyBoard,
|
|
3254
|
+
ICCardServer = _ref28.ICCardServer,
|
|
3255
|
+
ICCardPassword = _ref28.ICCardPassword;
|
|
3130
3256
|
|
|
3257
|
+
_this2.isStorageCardInputType = MemberMeStorageCardInputByKeyBoard; // 仅储值卡是否禁用键盘输入,'0'为不禁用 '1'为禁用
|
|
3131
3258
|
_this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
|
|
3132
3259
|
_this2.iCCardPassword = ICCardPassword; //IC卡密码
|
|
3133
3260
|
//移动端环境下,没有读取IC卡的方式。
|
|
3134
3261
|
|
|
3135
|
-
var
|
|
3136
|
-
isHorizontalPad =
|
|
3137
|
-
isHorizontalSunMi =
|
|
3262
|
+
var _ref29 = _mutantsUtil.platform || {},
|
|
3263
|
+
isHorizontalPad = _ref29.isHorizontalPad,
|
|
3264
|
+
isHorizontalSunMi = _ref29.isHorizontalSunMi;
|
|
3138
3265
|
|
|
3139
3266
|
_this2.isHorizontalPad = !!isHorizontalPad;
|
|
3140
3267
|
_this2.isHorizontalSunMi = !!isHorizontalSunMi;
|
|
3141
3268
|
_this2.isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;
|
|
3142
3269
|
_this2.handleReadICard = _this2.handleReadICard.bind(_this2);
|
|
3143
3270
|
_this2.setTimer = null;
|
|
3271
|
+
_this2.keypressStime = null;
|
|
3144
3272
|
return _this2;
|
|
3145
3273
|
}
|
|
3146
3274
|
|
|
@@ -3219,8 +3347,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3219
3347
|
_this6.connectRfCard(); //读取失败后,重新连接一下。
|
|
3220
3348
|
return;
|
|
3221
3349
|
} else if (ret.status === 1) {
|
|
3222
|
-
//this.searchMember(ret.value);
|
|
3223
|
-
|
|
3350
|
+
// this.searchMember(ret.value);
|
|
3351
|
+
// this.czkInput.input["value"]=ret.value;
|
|
3352
|
+
_this6.setState({
|
|
3353
|
+
czkValue: ret.value
|
|
3354
|
+
});
|
|
3224
3355
|
_this6.loadCzk(ret.value);
|
|
3225
3356
|
}
|
|
3226
3357
|
});
|
|
@@ -3281,9 +3412,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3281
3412
|
value: function renderToolbtn(mode, index) {
|
|
3282
3413
|
var _this7 = this;
|
|
3283
3414
|
|
|
3284
|
-
var _enumController$
|
|
3285
|
-
PayIcon = _enumController$
|
|
3286
|
-
PayStyle = _enumController$
|
|
3415
|
+
var _enumController$getEn32 = _mutantsUtil.enumController.getEnumOj(),
|
|
3416
|
+
PayIcon = _enumController$getEn32.PayIcon,
|
|
3417
|
+
PayStyle = _enumController$getEn32.PayStyle;
|
|
3287
3418
|
|
|
3288
3419
|
var isReturn = this.props.isReturn;
|
|
3289
3420
|
var _store = this.store,
|
|
@@ -3355,11 +3486,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3355
3486
|
value: function render() {
|
|
3356
3487
|
var _this8 = this;
|
|
3357
3488
|
|
|
3358
|
-
var _enumController$
|
|
3359
|
-
PayIcon = _enumController$
|
|
3360
|
-
PayIcon2 = _enumController$
|
|
3361
|
-
PayStyle = _enumController$
|
|
3362
|
-
Differentiate = _enumController$
|
|
3489
|
+
var _enumController$getEn33 = _mutantsUtil.enumController.getEnumOj(),
|
|
3490
|
+
PayIcon = _enumController$getEn33.PayIcon,
|
|
3491
|
+
PayIcon2 = _enumController$getEn33.PayIcon2,
|
|
3492
|
+
PayStyle = _enumController$getEn33.PayStyle,
|
|
3493
|
+
Differentiate = _enumController$getEn33.Differentiate;
|
|
3363
3494
|
|
|
3364
3495
|
var _state2 = this.state,
|
|
3365
3496
|
btnDissabled = _state2.btnDissabled,
|
|
@@ -3367,10 +3498,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3367
3498
|
discountTotalAmount = _state2.discountTotalAmount,
|
|
3368
3499
|
discountRetailTotalAount = _state2.discountRetailTotalAount,
|
|
3369
3500
|
discountPrototypeTotalAmount = _state2.discountPrototypeTotalAmount,
|
|
3370
|
-
storageValue = _state2.storageValue
|
|
3501
|
+
storageValue = _state2.storageValue,
|
|
3502
|
+
czkValue = _state2.czkValue,
|
|
3503
|
+
newPassConfirm = _state2.newPassConfirm,
|
|
3504
|
+
newPass = _state2.newPass;
|
|
3371
3505
|
|
|
3372
|
-
var
|
|
3373
|
-
isNewRetailBCPos =
|
|
3506
|
+
var _ref30 = _mutantsUtil.platform || {},
|
|
3507
|
+
isNewRetailBCPos = _ref30.isNewRetailBCPos;
|
|
3374
3508
|
|
|
3375
3509
|
var _store2 = this.store,
|
|
3376
3510
|
paymode = _store2.paymode,
|
|
@@ -3433,11 +3567,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3433
3567
|
quantity4 = 0;
|
|
3434
3568
|
var sumQuantity = 0; //数量总和的值,包括称重的。
|
|
3435
3569
|
|
|
3436
|
-
var
|
|
3437
|
-
|
|
3438
|
-
buyQuantity =
|
|
3439
|
-
|
|
3440
|
-
returnQuantity =
|
|
3570
|
+
var _ref31 = quantityDetail || {},
|
|
3571
|
+
_ref31$buyQuantity = _ref31.buyQuantity,
|
|
3572
|
+
buyQuantity = _ref31$buyQuantity === undefined ? 0 : _ref31$buyQuantity,
|
|
3573
|
+
_ref31$returnQuantity = _ref31.returnQuantity,
|
|
3574
|
+
returnQuantity = _ref31$returnQuantity === undefined ? 0 : _ref31$returnQuantity;
|
|
3441
3575
|
|
|
3442
3576
|
var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
|
|
3443
3577
|
quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
|
|
@@ -3455,7 +3589,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3455
3589
|
sumQuantity = this.changeDecimalBuZero(sumQuantity, quantityPrecision);
|
|
3456
3590
|
}
|
|
3457
3591
|
|
|
3458
|
-
var
|
|
3592
|
+
var themodeHyczk = thePaymodes.filter(function (mode) {
|
|
3593
|
+
return mode.paymentType === PayStyle.hyczk && mode.value !== '0.00';
|
|
3594
|
+
});
|
|
3459
3595
|
return _react2.default.createElement(
|
|
3460
3596
|
'div',
|
|
3461
3597
|
{ className: 'billingSettlement', ref: function ref(r) {
|
|
@@ -3661,13 +3797,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3661
3797
|
_react2.default.createElement(
|
|
3662
3798
|
'div',
|
|
3663
3799
|
{ className: (0, _classnames4.default)({ "main": true, "focusbottom": currentIndex == index }) },
|
|
3664
|
-
_react2.default.createElement(
|
|
3665
|
-
'div',
|
|
3666
|
-
{ className: 'lefticon primary-color', onClick: function onClick() {
|
|
3667
|
-
_this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType);
|
|
3668
|
-
} },
|
|
3669
|
-
_react2.default.createElement(_ticon2.default, { type: 'jianqu', className: 'minus' })
|
|
3670
|
-
),
|
|
3671
3800
|
_react2.default.createElement(
|
|
3672
3801
|
'div',
|
|
3673
3802
|
{ className: (0, _classnames4.default)({ "name": true }) },
|
|
@@ -3697,13 +3826,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3697
3826
|
}
|
|
3698
3827
|
})
|
|
3699
3828
|
),
|
|
3700
|
-
|
|
3701
|
-
'
|
|
3702
|
-
{ className: '
|
|
3703
|
-
|
|
3704
|
-
_this8.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
|
3829
|
+
_react2.default.createElement(
|
|
3830
|
+
'span',
|
|
3831
|
+
{ className: 'minus', onClick: function onClick() {
|
|
3832
|
+
_this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType);
|
|
3705
3833
|
} },
|
|
3706
|
-
_react2.default.createElement(_ticon2.default, { type: '
|
|
3834
|
+
_react2.default.createElement(_ticon2.default, { type: 'shanchu', className: 'minusIcon primary-color' })
|
|
3707
3835
|
)
|
|
3708
3836
|
),
|
|
3709
3837
|
mode.paymentType == PayStyle.djq ? _react2.default.createElement(
|
|
@@ -3730,7 +3858,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3730
3858
|
_react2.default.createElement(
|
|
3731
3859
|
'span',
|
|
3732
3860
|
{ className: 'fl' },
|
|
3733
|
-
|
|
3861
|
+
mode && mode.storageCardNo
|
|
3734
3862
|
),
|
|
3735
3863
|
_react2.default.createElement('br', null),
|
|
3736
3864
|
_react2.default.createElement(
|
|
@@ -3742,6 +3870,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3742
3870
|
'span',
|
|
3743
3871
|
{ className: 'fl' },
|
|
3744
3872
|
(0, _utils.getFixedNumber)(mode.balance)
|
|
3873
|
+
),
|
|
3874
|
+
_react2.default.createElement('br', null),
|
|
3875
|
+
themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === mode.paymethodId && !isReturn && _react2.default.createElement(
|
|
3876
|
+
_button2.default,
|
|
3877
|
+
{ onClick: function onClick() {
|
|
3878
|
+
_this8.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
|
3879
|
+
}, className: 'addCard btn-border-primary' },
|
|
3880
|
+
_react2.default.createElement(_ticon2.default, { type: 'jiahao', className: 'plus b-theme-color' }),
|
|
3881
|
+
_react2.default.createElement(
|
|
3882
|
+
'span',
|
|
3883
|
+
null,
|
|
3884
|
+
'\u6DFB\u52A0\u5361'
|
|
3885
|
+
)
|
|
3745
3886
|
)
|
|
3746
3887
|
)
|
|
3747
3888
|
);
|
|
@@ -4039,7 +4180,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4039
4180
|
// }
|
|
4040
4181
|
// }
|
|
4041
4182
|
// mode.paymentType == PayStyle.hyczk && czkinput && czkinput.value !== '0.00' ? this.editCzkModal() :
|
|
4042
|
-
|
|
4183
|
+
if (mode.paymentType == PayStyle.hyczk) {
|
|
4184
|
+
if (themodeHyczk && themodeHyczk.length === 0) {
|
|
4185
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4186
|
+
}
|
|
4187
|
+
} else {
|
|
4188
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4189
|
+
}
|
|
4043
4190
|
},
|
|
4044
4191
|
value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
|
|
4045
4192
|
return tm.paymentType == PayStyle.hyczk;
|
|
@@ -4092,7 +4239,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4092
4239
|
_react2.default.createElement(
|
|
4093
4240
|
'span',
|
|
4094
4241
|
null,
|
|
4095
|
-
|
|
4242
|
+
m && m.storageCardNo
|
|
4096
4243
|
),
|
|
4097
4244
|
_react2.default.createElement(
|
|
4098
4245
|
'span',
|
|
@@ -4103,6 +4250,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4103
4250
|
'span',
|
|
4104
4251
|
{ className: 'balance fr' },
|
|
4105
4252
|
'\u652F\u4ED8\u91D1\u989D\uFF1A'
|
|
4253
|
+
),
|
|
4254
|
+
_react2.default.createElement('br', null),
|
|
4255
|
+
themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === m.paymethodId && _react2.default.createElement(
|
|
4256
|
+
_button2.default,
|
|
4257
|
+
{ onClick: function onClick() {
|
|
4258
|
+
return _this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4259
|
+
}, className: 'addCard btn-border-primary' },
|
|
4260
|
+
_react2.default.createElement(_ticon2.default, { type: 'jiahao', className: 'plus b-theme-color' }),
|
|
4261
|
+
_react2.default.createElement(
|
|
4262
|
+
'span',
|
|
4263
|
+
null,
|
|
4264
|
+
'\u6DFB\u52A0\u5361'
|
|
4265
|
+
)
|
|
4106
4266
|
)
|
|
4107
4267
|
);
|
|
4108
4268
|
})
|
|
@@ -4262,14 +4422,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4262
4422
|
{ key: index + '', className: 'modeItem' },
|
|
4263
4423
|
_react2.default.createElement(
|
|
4264
4424
|
'div',
|
|
4265
|
-
{ className: 'main ' + (currentIndex == index && 'settlement-pay-item-border') },
|
|
4266
|
-
_react2.default.createElement(
|
|
4267
|
-
'div',
|
|
4268
|
-
{ className: 'lefticon', onClick: function onClick() {
|
|
4269
|
-
_this8.onDelPay(index);
|
|
4270
|
-
} },
|
|
4271
|
-
_react2.default.createElement(_ticon2.default, { type: 'jianqu', className: 'minus' })
|
|
4272
|
-
),
|
|
4425
|
+
{ className: 'main b-theme-color ' + (currentIndex == index && 'settlement-pay-item-border') },
|
|
4273
4426
|
_react2.default.createElement(
|
|
4274
4427
|
'div',
|
|
4275
4428
|
{ className: (0, _classnames4.default)({ "name": true }) },
|
|
@@ -4294,13 +4447,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4294
4447
|
}
|
|
4295
4448
|
})
|
|
4296
4449
|
),
|
|
4297
|
-
|
|
4450
|
+
_react2.default.createElement(
|
|
4298
4451
|
'div',
|
|
4299
|
-
{ className: '
|
|
4300
|
-
|
|
4301
|
-
_this8.appendCzkmode('', 'noPlaySetPwd');
|
|
4452
|
+
{ className: 'minus', onClick: function onClick() {
|
|
4453
|
+
_this8.onDelPay(index);
|
|
4302
4454
|
} },
|
|
4303
|
-
_react2.default.createElement(_ticon2.default, { type: '
|
|
4455
|
+
_react2.default.createElement(_ticon2.default, { type: 'shanchu', className: 'minusIcon primary-color' })
|
|
4304
4456
|
)
|
|
4305
4457
|
),
|
|
4306
4458
|
mode.paymentType == PayStyle.djq ? _react2.default.createElement(
|
|
@@ -4327,7 +4479,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4327
4479
|
_react2.default.createElement(
|
|
4328
4480
|
'span',
|
|
4329
4481
|
{ className: 'fl' },
|
|
4330
|
-
|
|
4482
|
+
mode && mode.storageCardNo
|
|
4331
4483
|
),
|
|
4332
4484
|
_react2.default.createElement('br', null),
|
|
4333
4485
|
_react2.default.createElement(
|
|
@@ -4516,7 +4668,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4516
4668
|
_react2.default.createElement(
|
|
4517
4669
|
'div',
|
|
4518
4670
|
{ className: (0, _classnames4.default)({ "main": true, "focusbottom": currentIndex == index }) },
|
|
4519
|
-
_react2.default.createElement('div', { className: 'lefticon' }),
|
|
4520
4671
|
_react2.default.createElement(
|
|
4521
4672
|
'div',
|
|
4522
4673
|
{ className: (0, _classnames4.default)({ "name": true }) },
|
|
@@ -4651,7 +4802,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4651
4802
|
visible: this.state.czkVisible,
|
|
4652
4803
|
maskClosable: false,
|
|
4653
4804
|
destroyOnClose: true,
|
|
4654
|
-
title: "
|
|
4805
|
+
title: "储值结算",
|
|
4655
4806
|
onCancel: this.handleCzkCancel,
|
|
4656
4807
|
keyboard: false,
|
|
4657
4808
|
centered: !this.isHorizontalPad ? true : false,
|
|
@@ -4682,7 +4833,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4682
4833
|
_react2.default.createElement(
|
|
4683
4834
|
'div',
|
|
4684
4835
|
{ className: 'value valuetext' },
|
|
4685
|
-
currentMode && currentMode.member.type || '普通'
|
|
4836
|
+
currentMode && currentMode.member && currentMode.member.type || '普通'
|
|
4686
4837
|
),
|
|
4687
4838
|
_react2.default.createElement(
|
|
4688
4839
|
'div',
|
|
@@ -4703,7 +4854,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4703
4854
|
_react2.default.createElement(
|
|
4704
4855
|
'div',
|
|
4705
4856
|
{ className: 'value' },
|
|
4706
|
-
currentMode && (0, _utils.getFixedNumber)(currentMode.
|
|
4857
|
+
currentMode && (0, _utils.getFixedNumber)(currentMode.balance)
|
|
4707
4858
|
),
|
|
4708
4859
|
_react2.default.createElement(
|
|
4709
4860
|
'div',
|
|
@@ -4724,7 +4875,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4724
4875
|
_react2.default.createElement(
|
|
4725
4876
|
'div',
|
|
4726
4877
|
{ className: 'value' },
|
|
4727
|
-
currentMode && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.
|
|
4878
|
+
currentMode && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.balance)))
|
|
4728
4879
|
),
|
|
4729
4880
|
_react2.default.createElement(
|
|
4730
4881
|
'div',
|
|
@@ -4739,29 +4890,83 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4739
4890
|
_react2.default.createElement(
|
|
4740
4891
|
'span',
|
|
4741
4892
|
null,
|
|
4742
|
-
'\
|
|
4893
|
+
'\u50A8\u503C\u5361\u53F7\uFF1A'
|
|
4743
4894
|
),
|
|
4744
4895
|
_react2.default.createElement(
|
|
4745
4896
|
'span',
|
|
4746
4897
|
null,
|
|
4747
4898
|
_react2.default.createElement(_input2.default, {
|
|
4748
4899
|
type: 'text',
|
|
4749
|
-
placeholder: '\u8BF7\u626B\u63CF\u6216\u8F93\u5165\
|
|
4750
|
-
|
|
4751
|
-
, className: 'input ' + (this.hasElectron === true && this.iCCardServer === 1 || this.isHorizontalPad === true ? 'temp' : ''),
|
|
4900
|
+
placeholder: '\u8BF7\u626B\u63CF\u6216\u8F93\u5165\u624B\u673A\u53F7/\u50A8\u503C\u5361\u53F7',
|
|
4901
|
+
className: 'input ' + (this.hasElectron === true && this.iCCardServer === 1 || this.isHorizontalPad === true ? 'temp' : ''),
|
|
4752
4902
|
onChange: function onChange(e) {
|
|
4753
4903
|
return _this8.onCzkChange(e.target.value);
|
|
4754
4904
|
},
|
|
4755
|
-
defaultValue:
|
|
4756
|
-
value:
|
|
4905
|
+
defaultValue: currentMode && currentMode.storageCardNo,
|
|
4906
|
+
value: czkValue,
|
|
4757
4907
|
ref: function ref(input) {
|
|
4758
4908
|
return _this8.czkInput = input;
|
|
4759
4909
|
},
|
|
4760
|
-
onKeyDown: function
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4910
|
+
onKeyDown: function () {
|
|
4911
|
+
var _ref32 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(e) {
|
|
4912
|
+
var time, _paymode;
|
|
4913
|
+
|
|
4914
|
+
return _regenerator2.default.wrap(function _callee16$(_context16) {
|
|
4915
|
+
while (1) {
|
|
4916
|
+
switch (_context16.prev = _context16.next) {
|
|
4917
|
+
case 0:
|
|
4918
|
+
if (!(e.keyCode == 13)) {
|
|
4919
|
+
_context16.next = 14;
|
|
4920
|
+
break;
|
|
4921
|
+
}
|
|
4922
|
+
|
|
4923
|
+
time = Date.parse(new Date());
|
|
4924
|
+
|
|
4925
|
+
if (!(_this8.isStorageCardInputType && time - _this8.keypressStime > 350)) {
|
|
4926
|
+
_context16.next = 7;
|
|
4927
|
+
break;
|
|
4928
|
+
}
|
|
4929
|
+
|
|
4930
|
+
_message2.default.warn('储值卡不可键盘录入,请刷卡!');
|
|
4931
|
+
_this8.keypressStime = null;
|
|
4932
|
+
_this8.setState({
|
|
4933
|
+
czkValue: null
|
|
4934
|
+
});
|
|
4935
|
+
return _context16.abrupt('return');
|
|
4936
|
+
|
|
4937
|
+
case 7:
|
|
4938
|
+
_this8.keypressStime = null;
|
|
4939
|
+
_context16.next = 10;
|
|
4940
|
+
return _this8.loadCzk(e.target.value);
|
|
4941
|
+
|
|
4942
|
+
case 10:
|
|
4943
|
+
_paymode = _this8.store.paymode;
|
|
4944
|
+
|
|
4945
|
+
if (!_paymode.currentMode.storageCardNo) {
|
|
4946
|
+
_this8.setState({
|
|
4947
|
+
czkvalue: null
|
|
4948
|
+
});
|
|
4949
|
+
}
|
|
4950
|
+
_context16.next = 15;
|
|
4951
|
+
break;
|
|
4952
|
+
|
|
4953
|
+
case 14:
|
|
4954
|
+
if (!_this8.keypressStime && e.keyCode !== 8) {
|
|
4955
|
+
_this8.keypressStime = Date.parse(new Date());
|
|
4956
|
+
}
|
|
4957
|
+
|
|
4958
|
+
case 15:
|
|
4959
|
+
case 'end':
|
|
4960
|
+
return _context16.stop();
|
|
4961
|
+
}
|
|
4962
|
+
}
|
|
4963
|
+
}, _callee16, _this8);
|
|
4964
|
+
}));
|
|
4965
|
+
|
|
4966
|
+
return function (_x11) {
|
|
4967
|
+
return _ref32.apply(this, arguments);
|
|
4968
|
+
};
|
|
4969
|
+
}(),
|
|
4765
4970
|
onFocus: function onFocus(e) {
|
|
4766
4971
|
_this8.inputTarget = _this8.czkInput.input;
|
|
4767
4972
|
!_this8.state.prototypeVisible && _keyboard2.default.open(function (v) {
|
|
@@ -4813,22 +5018,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4813
5018
|
className: _index.hotKey.hotKeyNotFilter('input'),
|
|
4814
5019
|
value: storageValue,
|
|
4815
5020
|
onChange: function onChange(event) {
|
|
4816
|
-
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.
|
|
5021
|
+
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.balance));
|
|
4817
5022
|
},
|
|
4818
|
-
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.
|
|
4819
|
-
ref: function ref(
|
|
4820
|
-
return _this8["inputCzkAmount"] =
|
|
5023
|
+
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)),
|
|
5024
|
+
ref: function ref(_ref33) {
|
|
5025
|
+
return _this8["inputCzkAmount"] = _ref33;
|
|
4821
5026
|
},
|
|
4822
5027
|
onFocus: function onFocus(e) {
|
|
4823
5028
|
_this8.inputkey = "inputCzkAmount";
|
|
4824
5029
|
_keyboard2.default.open(function (v) {
|
|
4825
5030
|
var value = _keyboard2.default.getNewValue(_this8[_this8.inputkey].input, _this8[_this8.inputkey].input.value, v);
|
|
4826
|
-
_this8.setCurrentModeValue(value, Math.min(currentMode.maxamount, currentMode.
|
|
5031
|
+
_this8.setCurrentModeValue(value, Math.min(currentMode.maxamount, currentMode.balance));
|
|
4827
5032
|
}, _this8.keyboardOnOk, _this8.keyboardOnClose)();
|
|
4828
5033
|
},
|
|
4829
5034
|
onBlur: function onBlur(e) {
|
|
4830
5035
|
_keyboard2.default.close();
|
|
4831
|
-
_this8.setCurrentModeValue((0, _utils.getFixedNumber)(_this8.inputCzkAmount.input.value), Math.min(currentMode.maxamount, currentMode.
|
|
5036
|
+
_this8.setCurrentModeValue((0, _utils.getFixedNumber)(_this8.inputCzkAmount.input.value), Math.min(currentMode.maxamount, currentMode.balance));
|
|
4832
5037
|
}
|
|
4833
5038
|
})
|
|
4834
5039
|
)
|
|
@@ -4866,6 +5071,47 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4866
5071
|
)
|
|
4867
5072
|
)
|
|
4868
5073
|
),
|
|
5074
|
+
_react2.default.createElement(
|
|
5075
|
+
_modal2.default,
|
|
5076
|
+
{
|
|
5077
|
+
wrapClassName: _index.hotKey.hotKeyBindClass('5', 'moreCzkModal') + ' ' + (this.isHorizontalPad ? 'extraHeight' : ''),
|
|
5078
|
+
width: '400px',
|
|
5079
|
+
visible: this.state.moreCzkVisible,
|
|
5080
|
+
maskClosable: false,
|
|
5081
|
+
destroyOnClose: true,
|
|
5082
|
+
title: "储值结算",
|
|
5083
|
+
onCancel: this.handleMoreCzkCancel,
|
|
5084
|
+
keyboard: false,
|
|
5085
|
+
centered: !this.isHorizontalPad ? true : false,
|
|
5086
|
+
footer: _react2.default.createElement(
|
|
5087
|
+
'div',
|
|
5088
|
+
{ className: 'action' },
|
|
5089
|
+
_react2.default.createElement(
|
|
5090
|
+
'span',
|
|
5091
|
+
{ className: 'showUseCard' },
|
|
5092
|
+
'\u4EC5\u5217\u793A\u53EF\u7528\u7684\u50A8\u503C\u5361'
|
|
5093
|
+
),
|
|
5094
|
+
_react2.default.createElement(
|
|
5095
|
+
_button2.default,
|
|
5096
|
+
{ onClick: this.handleMoreCzkCancel },
|
|
5097
|
+
'\u53D6\u6D88'
|
|
5098
|
+
),
|
|
5099
|
+
_react2.default.createElement(
|
|
5100
|
+
_button2.default,
|
|
5101
|
+
{ type: 'primary', onClick: this.handleMoreCzkOk },
|
|
5102
|
+
'\u786E\u5B9A'
|
|
5103
|
+
)
|
|
5104
|
+
)
|
|
5105
|
+
},
|
|
5106
|
+
_react2.default.createElement(
|
|
5107
|
+
'div',
|
|
5108
|
+
null,
|
|
5109
|
+
_react2.default.createElement(_moreCzkTable2.default, {
|
|
5110
|
+
setMoreCzkIndex: this.setMoreCzkIndex,
|
|
5111
|
+
selectedRowIndex: this.state.selectedRowIndex,
|
|
5112
|
+
dataSource: this.state.memberdata1 })
|
|
5113
|
+
)
|
|
5114
|
+
),
|
|
4869
5115
|
_react2.default.createElement(
|
|
4870
5116
|
_modal2.default,
|
|
4871
5117
|
(0, _defineProperty3.default)({
|
|
@@ -4889,7 +5135,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4889
5135
|
),
|
|
4890
5136
|
_react2.default.createElement(
|
|
4891
5137
|
_button2.default,
|
|
4892
|
-
{ type: 'primary', disabled:
|
|
5138
|
+
{ type: 'primary', disabled: btnDissabled, onClick: this.handleSetModal },
|
|
4893
5139
|
'\u786E\u5B9A'
|
|
4894
5140
|
)
|
|
4895
5141
|
)),
|
|
@@ -4907,21 +5153,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4907
5153
|
_react2.default.createElement(
|
|
4908
5154
|
'div',
|
|
4909
5155
|
{ className: 'two' },
|
|
4910
|
-
_react2.default.createElement(
|
|
5156
|
+
_react2.default.createElement(_input2.default.Password, {
|
|
4911
5157
|
className: 'content',
|
|
4912
|
-
newType: 'positive',
|
|
4913
|
-
bordered: true,
|
|
4914
5158
|
placeholder: '\u8BF7\u8F93\u51656\u4F4D\u6570\u5B57\u5BC6\u7801',
|
|
4915
5159
|
style: { width: 266, height: 32 },
|
|
4916
5160
|
maxLength: 6,
|
|
5161
|
+
value: newPass,
|
|
4917
5162
|
ref: function ref(input) {
|
|
4918
5163
|
return _this8.inputNewAmount = input;
|
|
4919
5164
|
},
|
|
4920
5165
|
onChange: function onChange(value) {
|
|
4921
|
-
return _this8.setPwdValue('newPass', value);
|
|
5166
|
+
return _this8.setPwdValue('newPass', value.target.value);
|
|
4922
5167
|
},
|
|
4923
5168
|
onBlur: function onBlur(value) {
|
|
4924
5169
|
return _this8.handleBlur('newPass');
|
|
5170
|
+
},
|
|
5171
|
+
onPressEnter: function onPressEnter() {
|
|
5172
|
+
return _this8.onPressEnterCzk('newPass');
|
|
4925
5173
|
}
|
|
4926
5174
|
})
|
|
4927
5175
|
)
|
|
@@ -4937,21 +5185,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4937
5185
|
_react2.default.createElement(
|
|
4938
5186
|
'div',
|
|
4939
5187
|
{ className: 'two' },
|
|
4940
|
-
_react2.default.createElement(
|
|
5188
|
+
_react2.default.createElement(_input2.default.Password, {
|
|
4941
5189
|
className: 'content',
|
|
4942
|
-
newType: 'positive',
|
|
4943
|
-
bordered: true,
|
|
4944
5190
|
placeholder: '\u8BF7\u786E\u8BA46\u4F4D\u6570\u5B57\u5BC6\u7801',
|
|
4945
5191
|
style: { width: 266, height: 32 },
|
|
4946
5192
|
maxLength: 6,
|
|
5193
|
+
value: newPassConfirm,
|
|
4947
5194
|
ref: function ref(input) {
|
|
4948
5195
|
return _this8.inputConfirmAmount = input;
|
|
4949
5196
|
},
|
|
4950
5197
|
onChange: function onChange(value) {
|
|
4951
|
-
return _this8.setPwdValue('newPassConfirm', value);
|
|
5198
|
+
return _this8.setPwdValue('newPassConfirm', value.target.value);
|
|
4952
5199
|
},
|
|
4953
5200
|
onBlur: function onBlur(value) {
|
|
4954
5201
|
return _this8.handleBlur('newPassConfirm');
|
|
5202
|
+
},
|
|
5203
|
+
onPressEnter: function onPressEnter() {
|
|
5204
|
+
return _this8.onPressEnterCzk('newPassConfirm');
|
|
4955
5205
|
}
|
|
4956
5206
|
})
|
|
4957
5207
|
)
|
|
@@ -5070,7 +5320,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5070
5320
|
_react2.default.createElement(
|
|
5071
5321
|
'div',
|
|
5072
5322
|
{ className: 'djq2' },
|
|
5073
|
-
(0, _map3.default)(currentMode
|
|
5323
|
+
currentMode && currentMode.djqs && currentMode.djqs.length > 0 ? (0, _map3.default)(currentMode.djqs || [], function (q, index) {
|
|
5074
5324
|
if (!_this8.state.couponLight && !q.count) {
|
|
5075
5325
|
return;
|
|
5076
5326
|
}
|
|
@@ -5180,7 +5430,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5180
5430
|
_react2.default.createElement('div', { className: 'point_top' }),
|
|
5181
5431
|
_react2.default.createElement('div', { className: 'point_bottom' })
|
|
5182
5432
|
);
|
|
5183
|
-
})
|
|
5433
|
+
}) : _react2.default.createElement(_tplusComponentsTouch.ProgressState, {
|
|
5434
|
+
state: "empty",
|
|
5435
|
+
stateCommonStyle: { 'paddingTop': "30px", backgroundColor: 'transparent' },
|
|
5436
|
+
empty: { buttonVisible: false, imgStyle: { width: '120px', height: '120px' } } })
|
|
5184
5437
|
)
|
|
5185
5438
|
),
|
|
5186
5439
|
currentMode && !currentMode.boriginReturn && _react2.default.createElement(
|
|
@@ -5316,7 +5569,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5316
5569
|
_react2.default.createElement(
|
|
5317
5570
|
'div',
|
|
5318
5571
|
{ className: 'value valuetext' },
|
|
5319
|
-
currentMode && currentMode.member.type || '普通'
|
|
5572
|
+
currentMode && currentMode.member && currentMode.member.type || '普通'
|
|
5320
5573
|
),
|
|
5321
5574
|
_react2.default.createElement(
|
|
5322
5575
|
'div',
|
|
@@ -5337,7 +5590,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5337
5590
|
_react2.default.createElement(
|
|
5338
5591
|
'div',
|
|
5339
5592
|
{ className: 'value' },
|
|
5340
|
-
currentMode && currentMode.member.bonusPoints
|
|
5593
|
+
currentMode && currentMode.member && currentMode.member.bonusPoints
|
|
5341
5594
|
),
|
|
5342
5595
|
_react2.default.createElement(
|
|
5343
5596
|
'div',
|
|
@@ -5358,12 +5611,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5358
5611
|
_react2.default.createElement(
|
|
5359
5612
|
'div',
|
|
5360
5613
|
{ className: 'value' },
|
|
5361
|
-
currentMode && (0, _utils.getFixedNumber)(currentMode.
|
|
5614
|
+
currentMode && currentMode.member && (0, _utils.getFixedNumber)(currentMode.steadCashIntegral)
|
|
5362
5615
|
),
|
|
5363
5616
|
_react2.default.createElement(
|
|
5364
5617
|
'div',
|
|
5365
5618
|
{ className: 'name' },
|
|
5366
|
-
'\
|
|
5619
|
+
'\u672C\u5355\u4F7F\u7528\u79EF\u5206'
|
|
5367
5620
|
)
|
|
5368
5621
|
),
|
|
5369
5622
|
_react2.default.createElement(
|
|
@@ -5379,12 +5632,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5379
5632
|
_react2.default.createElement(
|
|
5380
5633
|
'div',
|
|
5381
5634
|
{ className: 'value' },
|
|
5382
|
-
currentMode && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.member.exchangable)))
|
|
5635
|
+
currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.member.exchangable)))
|
|
5383
5636
|
),
|
|
5384
5637
|
_react2.default.createElement(
|
|
5385
5638
|
'div',
|
|
5386
5639
|
{ className: 'name' },
|
|
5387
|
-
'\u672C\u5355\u53EF\
|
|
5640
|
+
'\u672C\u5355\u53EF\u62B5\u73B0\u91D1\u989D'
|
|
5388
5641
|
)
|
|
5389
5642
|
)
|
|
5390
5643
|
),
|
|
@@ -5399,7 +5652,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5399
5652
|
_react2.default.createElement(
|
|
5400
5653
|
'span',
|
|
5401
5654
|
{ className: 'notext' },
|
|
5402
|
-
currentMode && currentMode.member.cardNo
|
|
5655
|
+
currentMode && currentMode.member && currentMode.member.cardNo
|
|
5403
5656
|
)
|
|
5404
5657
|
),
|
|
5405
5658
|
_react2.default.createElement(
|
|
@@ -5430,12 +5683,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5430
5683
|
_react2.default.createElement(_input2.default, {
|
|
5431
5684
|
className: _index.hotKey.hotKeyNotFilter('input'),
|
|
5432
5685
|
type: 'text',
|
|
5686
|
+
value: storageValue,
|
|
5433
5687
|
onChange: function onChange(e) {
|
|
5434
5688
|
_this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
5435
5689
|
},
|
|
5436
|
-
defaultValue: currentMode && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
|
5437
|
-
ref: function ref(
|
|
5438
|
-
return _this8["inputJfdxAmount"] =
|
|
5690
|
+
defaultValue: currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
|
5691
|
+
ref: function ref(_ref34) {
|
|
5692
|
+
return _this8["inputJfdxAmount"] = _ref34;
|
|
5439
5693
|
},
|
|
5440
5694
|
onFocus: function onFocus(e) {
|
|
5441
5695
|
_this8.inputkey = "inputJfdxAmount";
|