tplus-components-touch 3.36.1 → 3.36.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/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/modalWraper/index.js +1 -1
- package/dist/components/modalWraper/index.js.map +1 -1
- 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/index.js +9 -0
- package/dist/components/settlement/index.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 +749 -501
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +101 -10
- package/dist/components/settlement/settlementStore.js +1072 -463
- 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 +35 -35
|
@@ -160,10 +160,6 @@ var _modalWraper2 = _interopRequireDefault(_modalWraper);
|
|
|
160
160
|
|
|
161
161
|
var _utils = require('./utils');
|
|
162
162
|
|
|
163
|
-
var _settlementStore = require('./settlementStore');
|
|
164
|
-
|
|
165
|
-
var _settlementStore2 = _interopRequireDefault(_settlementStore);
|
|
166
|
-
|
|
167
163
|
var _keyboard = require('../keyboard');
|
|
168
164
|
|
|
169
165
|
var _keyboard2 = _interopRequireDefault(_keyboard);
|
|
@@ -208,6 +204,12 @@ var _index2 = require('./prototypeTable/index');
|
|
|
208
204
|
|
|
209
205
|
var _index3 = _interopRequireDefault(_index2);
|
|
210
206
|
|
|
207
|
+
var _tplusComponentsTouch = require('tplus-components-touch');
|
|
208
|
+
|
|
209
|
+
var _moreCzkTable = require('./moreCzkTable');
|
|
210
|
+
|
|
211
|
+
var _moreCzkTable2 = _interopRequireDefault(_moreCzkTable);
|
|
212
|
+
|
|
211
213
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
212
214
|
|
|
213
215
|
var hasElectron = _mutantsMicrofx.env.platform === _mutantsMicrofx.env.constant.platform.electron;
|
|
@@ -228,6 +230,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
228
230
|
czkVisible: false,
|
|
229
231
|
djqVisible: false,
|
|
230
232
|
jfdxVisible: false,
|
|
233
|
+
moreCzkVisible: false,
|
|
231
234
|
showSetPwdModal: false,
|
|
232
235
|
prototypeVisible: false, // 优惠明细弹出框
|
|
233
236
|
currentIndex: 0,
|
|
@@ -246,6 +249,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
246
249
|
protytypeCount: null,
|
|
247
250
|
isPrototypeClick: false,
|
|
248
251
|
dataSource: [],
|
|
252
|
+
memberdata1: [],
|
|
249
253
|
discountTotalAmount: null,
|
|
250
254
|
discountRetailTotalAount: null,
|
|
251
255
|
discountPrototypeTotalAmount: null,
|
|
@@ -253,14 +257,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
253
257
|
currentKey: null,
|
|
254
258
|
couponLight: true,
|
|
255
259
|
storageValue: '0.00',
|
|
256
|
-
czkValue: null
|
|
260
|
+
czkValue: null,
|
|
261
|
+
isInputMember: false,
|
|
262
|
+
selectedRowIndex: 0 };
|
|
257
263
|
_this2.compoundHotkeysList = (window.$.operationControl[5] ? window.$.operationControl[5].control || [] : []).map(function (key) {
|
|
258
264
|
return key.toLocaleUpperCase();
|
|
259
265
|
});
|
|
260
266
|
_this2.hotkeydebounced = null;
|
|
261
267
|
_this2.hotkeydebouncedPayMode = "";
|
|
262
268
|
_this2.currentInput = null;
|
|
263
|
-
_this2.store =
|
|
269
|
+
_this2.store = _mutantsMicrofx.stores.settlementStore;
|
|
264
270
|
|
|
265
271
|
_this2.resizeSettlementToolBtns = function () {
|
|
266
272
|
var newStyle = _this2.store.newStyle;
|
|
@@ -300,12 +306,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
300
306
|
_this2.inputkey = "inputJfdxAmount";
|
|
301
307
|
_this2["inputJfdxAmount"].input.value = currentMode && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable));
|
|
302
308
|
_this2.setCurrentModeValue(_this2.inputJfdxAmount.input.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
303
|
-
} else if (_this2.state.czkVisible && currentMode && currentMode.value >= 0 && currentMode.
|
|
309
|
+
} else if (_this2.state.czkVisible && currentMode && currentMode.value >= 0 && currentMode.balance !== undefined) {
|
|
304
310
|
_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.
|
|
311
|
+
_this2["inputCzkAmount"] && _this2["inputCzkAmount"].input && (_this2["inputCzkAmount"].input.value = (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)));
|
|
312
|
+
var maxamount = Math.min(currentMode.maxamount, currentMode.balance);
|
|
307
313
|
_this2.inputCzkAmount && _this2.inputCzkAmount.input && _this2.setCurrentModeValue(_this2.inputCzkAmount.input.value, maxamount);
|
|
308
|
-
if (_this2.store.bquick && currentMode.
|
|
314
|
+
if (_this2.store.bquick && currentMode.storageCardNo && parseFloat(_this2.store.paymode.amount) > parseFloat(maxamount)) {
|
|
309
315
|
_message2.default.error("本单最大可用储值卡结算金额为:" + (0, _utils.getFixedNumber)(maxamount) + ",请使用复合结算!", {
|
|
310
316
|
duration: 4
|
|
311
317
|
});
|
|
@@ -325,7 +331,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
325
331
|
var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
|
|
326
332
|
PayStyle = _enumController$getEn.PayStyle;
|
|
327
333
|
|
|
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);
|
|
334
|
+
_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
335
|
var amount = _this2.store.paymode.amount;
|
|
330
336
|
if (amount == 0) {
|
|
331
337
|
_this2.settleZero();
|
|
@@ -355,7 +361,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
355
361
|
isReturn = _this2$props.isReturn,
|
|
356
362
|
type = _this2$props.type;
|
|
357
363
|
|
|
358
|
-
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate()).then(function (result) {
|
|
364
|
+
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate({ isNotAutoFocus: true })).then(function (result) {
|
|
359
365
|
if (result) {
|
|
360
366
|
_this2.setState({
|
|
361
367
|
settleDisabled: false
|
|
@@ -450,7 +456,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
450
456
|
}
|
|
451
457
|
item.InventoryName = item.Inventory.Name;
|
|
452
458
|
item.Discount = (0, _utils.getRoundValue)(item.RetailPrice - item.TaxPrice, pricePrecision);
|
|
453
|
-
item.TotalDiscount =
|
|
459
|
+
//item.TotalDiscount = getFixedNumber(item.Discount * item.Quantity);
|
|
460
|
+
item.TotalDiscount = item.DetailDiscountAmount;
|
|
454
461
|
item.nAmount = (0, _utils.getFixedNumber)(item.TaxAmount);
|
|
455
462
|
item.UnitName = item.Unit.Name;
|
|
456
463
|
item.nQuantity = (0, _utils.getRoundValue)(item.Quantity, quantityPrecision);
|
|
@@ -553,68 +560,30 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
553
560
|
});
|
|
554
561
|
};
|
|
555
562
|
|
|
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);
|
|
563
|
+
_this2.handleCzkMoreData = function (params) {
|
|
564
564
|
_this2._val = _this2.store.paymode.currentMode.value;
|
|
565
565
|
var currentMode = _this2.store.paymode.currentMode;
|
|
566
566
|
|
|
567
|
-
var maxamount = Math.min(currentMode.maxamount, currentMode.
|
|
568
|
-
if (_this2.store.bquick && currentMode.
|
|
567
|
+
var maxamount = Math.min(currentMode.maxamount, currentMode.balance);
|
|
568
|
+
if (_this2.store.bquick && currentMode.storageCardNo && parseFloat(_this2.store.paymode.amount) > parseFloat(maxamount)) {
|
|
569
569
|
_message2.default.error("本单最大可用储值卡结算金额为:" + (0, _utils.getFixedNumber)(maxamount) + ",请使用复合结算!", {
|
|
570
570
|
duration: 4
|
|
571
571
|
});
|
|
572
572
|
} 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
|
-
});
|
|
573
|
+
if (params) {
|
|
574
|
+
_this2.setState({
|
|
575
|
+
czkVisible: true
|
|
576
|
+
});
|
|
577
|
+
}
|
|
609
578
|
var brefund = _this2.store.brefund;
|
|
610
579
|
|
|
611
|
-
var value11 = currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.
|
|
580
|
+
var value11 = currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance));
|
|
612
581
|
_this2.setState({
|
|
613
582
|
storageValue: value11
|
|
614
583
|
});
|
|
615
|
-
if (currentMode.
|
|
584
|
+
if (currentMode.storageCardNo) {
|
|
616
585
|
_this2.setState({
|
|
617
|
-
czkValue: currentMode.
|
|
586
|
+
czkValue: currentMode.storageCardNo
|
|
618
587
|
});
|
|
619
588
|
} else {
|
|
620
589
|
_this2.setState({
|
|
@@ -622,86 +591,68 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
622
591
|
});
|
|
623
592
|
}
|
|
624
593
|
}
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
_this2.inputCzkAmount.input
|
|
631
|
-
|
|
594
|
+
if (params) {
|
|
595
|
+
setTimeout(function () {
|
|
596
|
+
if (!currentMode.storageCardNo) {
|
|
597
|
+
_this2.czkInput && _this2.czkInput.input.focus();
|
|
598
|
+
} else {
|
|
599
|
+
if (_this2.inputCzkAmount && _this2.inputCzkAmount.input) {
|
|
600
|
+
_this2.inputCzkAmount.input.focus();
|
|
601
|
+
_this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
|
|
602
|
+
}
|
|
632
603
|
}
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
_this2.connectRfCard();
|
|
604
|
+
}, 500);
|
|
605
|
+
}
|
|
636
606
|
};
|
|
637
607
|
|
|
638
|
-
_this2.
|
|
639
|
-
var
|
|
640
|
-
var _enumController$
|
|
608
|
+
_this2.showCzkModal = function () {
|
|
609
|
+
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(id, append) {
|
|
610
|
+
var _enumController$getEn2, PayStyle, _ref2, isInputMember, memberdata1;
|
|
641
611
|
|
|
642
612
|
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
643
613
|
while (1) {
|
|
644
614
|
switch (_context.prev = _context.next) {
|
|
645
615
|
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;
|
|
655
|
-
|
|
656
|
-
if (_this2.store.paymode.currentMode.member.id) {
|
|
657
|
-
_context.next = 4;
|
|
658
|
-
break;
|
|
659
|
-
}
|
|
616
|
+
_this2.connectRfCard();
|
|
617
|
+
_enumController$getEn2 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn2.PayStyle;
|
|
660
618
|
|
|
661
|
-
|
|
662
|
-
|
|
619
|
+
_this2.store.setCurrentMode(id, PayStyle.hyczk, append);
|
|
620
|
+
_ref2 = _this2.state || {}, isInputMember = _ref2.isInputMember;
|
|
621
|
+
_context.t0 = isInputMember && _this2.store.paymode.currentMode.memberId;
|
|
663
622
|
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
_context.next = 7;
|
|
623
|
+
if (!_context.t0) {
|
|
624
|
+
_context.next = 9;
|
|
667
625
|
break;
|
|
668
626
|
}
|
|
669
627
|
|
|
670
|
-
|
|
671
|
-
return
|
|
628
|
+
_context.next = 8;
|
|
629
|
+
return _this2.store.updateCurrentMode(_this2.store.paymode.currentMode.memberId);
|
|
672
630
|
|
|
673
|
-
case
|
|
674
|
-
|
|
675
|
-
return mode.paymethodId != _this2.store.paymode.currentMode.paymethodId && mode.paymentType == PayStyle.hyczk && mode.member.id == _this2.store.paymode.currentMode.member.id;
|
|
676
|
-
})) {
|
|
677
|
-
_context.next = 10;
|
|
678
|
-
break;
|
|
679
|
-
}
|
|
631
|
+
case 8:
|
|
632
|
+
_context.t0 = _context.sent;
|
|
680
633
|
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
case 10:
|
|
685
|
-
if (!(_this2.store.bquick && _this2.store.paymode.amount != _this2.store.paymode.currentMode.value)) {
|
|
686
|
-
_context.next = 13;
|
|
687
|
-
break;
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
_message2.default.error("实收金额应等于应收金额。");
|
|
691
|
-
return _context.abrupt('return');
|
|
692
|
-
|
|
693
|
-
case 13:
|
|
634
|
+
case 9:
|
|
635
|
+
memberdata1 = _context.t0;
|
|
694
636
|
|
|
695
637
|
_this2.setState({
|
|
696
|
-
czkVisible:
|
|
697
|
-
storageValue: '0.00',
|
|
698
|
-
czkvalue: null
|
|
638
|
+
czkVisible: true
|
|
699
639
|
});
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
640
|
+
if (memberdata1 && memberdata1.length === 1) {
|
|
641
|
+
_this2.handleCzkMoreData(true);
|
|
642
|
+
_this2.store.handleCzkData(memberdata1[0]);
|
|
643
|
+
} else if (memberdata1 && memberdata1.length >= 1) {
|
|
644
|
+
_this2.setState({
|
|
645
|
+
moreCzkVisible: true,
|
|
646
|
+
memberdata1: memberdata1
|
|
647
|
+
});
|
|
648
|
+
} else {
|
|
649
|
+
_this2.setState({});
|
|
650
|
+
setTimeout(function () {
|
|
651
|
+
_this2.czkInput && _this2.czkInput.input.focus();
|
|
652
|
+
}, 300);
|
|
653
|
+
}
|
|
703
654
|
|
|
704
|
-
case
|
|
655
|
+
case 12:
|
|
705
656
|
case 'end':
|
|
706
657
|
return _context.stop();
|
|
707
658
|
}
|
|
@@ -709,8 +660,141 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
709
660
|
}, _callee, _this3);
|
|
710
661
|
}));
|
|
711
662
|
|
|
712
|
-
return function (_x) {
|
|
713
|
-
return
|
|
663
|
+
return function (_x, _x2) {
|
|
664
|
+
return _ref.apply(this, arguments);
|
|
665
|
+
};
|
|
666
|
+
}();
|
|
667
|
+
|
|
668
|
+
_this2.handleMoreCzkCancel = function () {
|
|
669
|
+
_this2.setState({
|
|
670
|
+
moreCzkVisible: false,
|
|
671
|
+
selectedRowIndex: 0
|
|
672
|
+
});
|
|
673
|
+
setTimeout(function () {
|
|
674
|
+
_this2.czkInput && _this2.czkInput.input.focus();
|
|
675
|
+
}, 300);
|
|
676
|
+
};
|
|
677
|
+
|
|
678
|
+
_this2.setMoreCzkIndex = function (index) {
|
|
679
|
+
_this2.setState({
|
|
680
|
+
selectedRowIndex: index
|
|
681
|
+
});
|
|
682
|
+
};
|
|
683
|
+
|
|
684
|
+
_this2.handleMoreCzkOk = function () {
|
|
685
|
+
var _this2$state = _this2.state,
|
|
686
|
+
memberdata1 = _this2$state.memberdata1,
|
|
687
|
+
selectedRowIndex = _this2$state.selectedRowIndex;
|
|
688
|
+
|
|
689
|
+
_this2.store.paymode.updateCardInfo(memberdata1[selectedRowIndex]);
|
|
690
|
+
_this2.handleCzkMoreData();
|
|
691
|
+
_this2.store.handleCzkData(memberdata1[selectedRowIndex]);
|
|
692
|
+
_this2.setState({
|
|
693
|
+
moreCzkVisible: false,
|
|
694
|
+
selectedRowIndex: 0
|
|
695
|
+
});
|
|
696
|
+
};
|
|
697
|
+
|
|
698
|
+
_this2.handleCzkData = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
|
699
|
+
var _enumController$getEn3, PayStyle;
|
|
700
|
+
|
|
701
|
+
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
702
|
+
while (1) {
|
|
703
|
+
switch (_context2.prev = _context2.next) {
|
|
704
|
+
case 0:
|
|
705
|
+
_this2.setState({
|
|
706
|
+
isInputMember: false
|
|
707
|
+
});
|
|
708
|
+
_enumController$getEn3 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn3.PayStyle;
|
|
709
|
+
|
|
710
|
+
if (_this2.store.paymode.currentMode.storageCardNo) {
|
|
711
|
+
_context2.next = 5;
|
|
712
|
+
break;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
_context2.next = 5;
|
|
716
|
+
return _this2.store.loadCzk(_this2.czkInput.input.value);
|
|
717
|
+
|
|
718
|
+
case 5:
|
|
719
|
+
if (_this2.store.paymode.currentMode.storageCardNo) {
|
|
720
|
+
_context2.next = 8;
|
|
721
|
+
break;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
_message2.default.error("请录入储值卡!");
|
|
725
|
+
return _context2.abrupt('return');
|
|
726
|
+
|
|
727
|
+
case 8:
|
|
728
|
+
if (!(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
|
|
729
|
+
return mode.paymethodId != _this2.store.paymode.currentMode.paymethodId && mode.paymentType == PayStyle.hyczk && mode.storageCardNo == _this2.store.paymode.currentMode.storageCardNo;
|
|
730
|
+
})) {
|
|
731
|
+
_context2.next = 11;
|
|
732
|
+
break;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
_message2.default.error("该储值卡已使用。");
|
|
736
|
+
return _context2.abrupt('return');
|
|
737
|
+
|
|
738
|
+
case 11:
|
|
739
|
+
if (!(_this2.store.bquick && _this2.store.paymode.amount != _this2.store.paymode.currentMode.value)) {
|
|
740
|
+
_context2.next = 14;
|
|
741
|
+
break;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
_message2.default.error("实收金额应等于应收金额。");
|
|
745
|
+
return _context2.abrupt('return');
|
|
746
|
+
|
|
747
|
+
case 14:
|
|
748
|
+
|
|
749
|
+
_this2.setState({
|
|
750
|
+
czkVisible: false,
|
|
751
|
+
storageValue: '0.00',
|
|
752
|
+
czkValue: null
|
|
753
|
+
});
|
|
754
|
+
_this2.closeRfCard();
|
|
755
|
+
_this2.store.paymode.calcMemberBalance();
|
|
756
|
+
_this2.handleCzk();
|
|
757
|
+
|
|
758
|
+
case 18:
|
|
759
|
+
case 'end':
|
|
760
|
+
return _context2.stop();
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}, _callee2, _this3);
|
|
764
|
+
}));
|
|
765
|
+
|
|
766
|
+
_this2.handleCzkOk = function () {
|
|
767
|
+
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(e) {
|
|
768
|
+
var _this2$store$paymode$, walletEnabled, cardTypeEnum, freePaymentPasswordStore, isNeedPassword;
|
|
769
|
+
|
|
770
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
771
|
+
while (1) {
|
|
772
|
+
switch (_context3.prev = _context3.next) {
|
|
773
|
+
case 0:
|
|
774
|
+
// 判断是否有密码
|
|
775
|
+
_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;
|
|
776
|
+
|
|
777
|
+
if (cardTypeEnum === 'BALANCE_CARD' && freePaymentPasswordStore) {
|
|
778
|
+
_this2.handleCzkData();
|
|
779
|
+
} else if (cardTypeEnum === 'BALANCE_CARD' && !walletEnabled) {
|
|
780
|
+
_this2.setState({
|
|
781
|
+
showSetPwdModal: true,
|
|
782
|
+
btnDissabled: true
|
|
783
|
+
});
|
|
784
|
+
} else {
|
|
785
|
+
_this2.handleCzkData();
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
case 2:
|
|
789
|
+
case 'end':
|
|
790
|
+
return _context3.stop();
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
}, _callee3, _this3);
|
|
794
|
+
}));
|
|
795
|
+
|
|
796
|
+
return function (_x3) {
|
|
797
|
+
return _ref4.apply(this, arguments);
|
|
714
798
|
};
|
|
715
799
|
}();
|
|
716
800
|
|
|
@@ -722,7 +806,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
722
806
|
_this2.setState({
|
|
723
807
|
czkVisible: false,
|
|
724
808
|
storageValue: '0.00',
|
|
725
|
-
|
|
809
|
+
czkValue: null
|
|
726
810
|
});
|
|
727
811
|
_this2.closeRfCard();
|
|
728
812
|
_keyboard2.default.close();
|
|
@@ -735,23 +819,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
735
819
|
});
|
|
736
820
|
};
|
|
737
821
|
|
|
738
|
-
_this2.handleSetModal = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
739
|
-
var _this2$
|
|
822
|
+
_this2.handleSetModal = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
|
823
|
+
var _this2$state2, newPass, newPassConfirm, isInputMember, updataMemberInfo, result, cardTypeEnum, resp;
|
|
740
824
|
|
|
741
|
-
return _regenerator2.default.wrap(function
|
|
825
|
+
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
742
826
|
while (1) {
|
|
743
|
-
switch (
|
|
827
|
+
switch (_context4.prev = _context4.next) {
|
|
744
828
|
case 0:
|
|
745
|
-
_this2$
|
|
829
|
+
_this2$state2 = _this2.state, newPass = _this2$state2.newPass, newPassConfirm = _this2$state2.newPassConfirm, isInputMember = _this2$state2.isInputMember;
|
|
746
830
|
updataMemberInfo = _this2.props.updataMemberInfo;
|
|
747
|
-
|
|
831
|
+
_context4.next = 4;
|
|
748
832
|
return _this2.store.queryPwd(newPass, newPassConfirm);
|
|
749
833
|
|
|
750
834
|
case 4:
|
|
751
|
-
result =
|
|
835
|
+
result = _context4.sent;
|
|
836
|
+
cardTypeEnum = _this2.store.paymode.currentMode.cardTypeEnum;
|
|
752
837
|
|
|
753
838
|
if (!result) {
|
|
754
|
-
|
|
839
|
+
_context4.next = 18;
|
|
755
840
|
break;
|
|
756
841
|
}
|
|
757
842
|
|
|
@@ -762,42 +847,68 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
762
847
|
newPassConfirm: ''
|
|
763
848
|
});
|
|
764
849
|
_message2.default.warn('设置成功');
|
|
765
|
-
|
|
766
|
-
|
|
850
|
+
_this2.handleCzkData();
|
|
767
851
|
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
|
-
}
|
|
852
|
+
if (_this2.inputCzkAmount && _this2.inputCzkAmount.input) {
|
|
853
|
+
_this2.inputCzkAmount.input.focus();
|
|
854
|
+
_this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
|
|
775
855
|
}
|
|
776
856
|
}, 350);
|
|
777
|
-
|
|
778
|
-
|
|
857
|
+
|
|
858
|
+
if (!(isInputMember && _this2.store.member.ID)) {
|
|
859
|
+
_context4.next = 16;
|
|
860
|
+
break;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
_context4.next = 14;
|
|
779
864
|
return _this2.store.updateMemberInfo(_this2.store);
|
|
780
865
|
|
|
781
|
-
case
|
|
782
|
-
resp =
|
|
866
|
+
case 14:
|
|
867
|
+
resp = _context4.sent;
|
|
783
868
|
|
|
784
869
|
updataMemberInfo(resp);
|
|
785
870
|
|
|
786
|
-
case
|
|
871
|
+
case 16:
|
|
872
|
+
if (cardTypeEnum === 'BALANCE_CARD') {
|
|
873
|
+
_this2.store.paymode.updateCardInfo();
|
|
874
|
+
}
|
|
875
|
+
_this2.setState({
|
|
876
|
+
isInputMember: false
|
|
877
|
+
});
|
|
878
|
+
|
|
879
|
+
case 18:
|
|
787
880
|
case 'end':
|
|
788
|
-
return
|
|
881
|
+
return _context4.stop();
|
|
789
882
|
}
|
|
790
883
|
}
|
|
791
|
-
},
|
|
884
|
+
}, _callee4, _this3);
|
|
792
885
|
}));
|
|
793
886
|
|
|
887
|
+
_this2.onPressEnterCzk = function (field) {
|
|
888
|
+
var _ref6 = _this2.state || {},
|
|
889
|
+
_ref6$newPass = _ref6.newPass,
|
|
890
|
+
newPass = _ref6$newPass === undefined ? '' : _ref6$newPass,
|
|
891
|
+
_ref6$newPassConfirm = _ref6.newPassConfirm,
|
|
892
|
+
newPassConfirm = _ref6$newPassConfirm === undefined ? '' : _ref6$newPassConfirm;
|
|
893
|
+
|
|
894
|
+
if (field === 'newPass' && newPass.length === 6) {
|
|
895
|
+
_this2.inputConfirmAmount.input.focus();
|
|
896
|
+
}
|
|
897
|
+
if (field === 'newPassConfirm' && newPassConfirm.length === 6 && newPass.length === 6 && newPass === newPassConfirm) {
|
|
898
|
+
_this2.handleSetModal();
|
|
899
|
+
}
|
|
900
|
+
};
|
|
901
|
+
|
|
794
902
|
_this2.setPwdValue = function (field, value) {
|
|
903
|
+
if (!/^[0-9]*$/.test(value)) {
|
|
904
|
+
return;
|
|
905
|
+
}
|
|
795
906
|
_this2.setState((0, _defineProperty3.default)({}, field, value), function () {
|
|
796
|
-
var
|
|
797
|
-
|
|
798
|
-
newPass =
|
|
799
|
-
|
|
800
|
-
newPassConfirm =
|
|
907
|
+
var _ref7 = _this2.state || {},
|
|
908
|
+
_ref7$newPass = _ref7.newPass,
|
|
909
|
+
newPass = _ref7$newPass === undefined ? '' : _ref7$newPass,
|
|
910
|
+
_ref7$newPassConfirm = _ref7.newPassConfirm,
|
|
911
|
+
newPassConfirm = _ref7$newPassConfirm === undefined ? '' : _ref7$newPassConfirm;
|
|
801
912
|
|
|
802
913
|
if (newPassConfirm.length === 6 && newPass.length === 6 && newPass === newPassConfirm) {
|
|
803
914
|
_this2.setState({
|
|
@@ -808,15 +919,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
808
919
|
};
|
|
809
920
|
|
|
810
921
|
_this2.handleBlur = function (field) {
|
|
811
|
-
var
|
|
812
|
-
|
|
813
|
-
newPass =
|
|
814
|
-
|
|
815
|
-
newPassConfirm =
|
|
922
|
+
var _ref8 = _this2.state || {},
|
|
923
|
+
_ref8$newPass = _ref8.newPass,
|
|
924
|
+
newPass = _ref8$newPass === undefined ? '' : _ref8$newPass,
|
|
925
|
+
_ref8$newPassConfirm = _ref8.newPassConfirm,
|
|
926
|
+
newPassConfirm = _ref8$newPassConfirm === undefined ? '' : _ref8$newPassConfirm;
|
|
816
927
|
|
|
817
928
|
setTimeout(function () {
|
|
818
|
-
var
|
|
819
|
-
showSetPwdModal =
|
|
929
|
+
var _ref9 = _this2.state || {},
|
|
930
|
+
showSetPwdModal = _ref9.showSetPwdModal;
|
|
820
931
|
|
|
821
932
|
if (!showSetPwdModal) return;
|
|
822
933
|
if (field === 'newPass' && newPass.length < 6) {
|
|
@@ -873,8 +984,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
873
984
|
|
|
874
985
|
// TODO: 测试优惠券支付
|
|
875
986
|
|
|
876
|
-
var
|
|
877
|
-
isNewRetailBCPos =
|
|
987
|
+
var _ref10 = _mutantsUtil.platform || {},
|
|
988
|
+
isNewRetailBCPos = _ref10.isNewRetailBCPos;
|
|
878
989
|
|
|
879
990
|
if (isNewRetailBCPos && !_this2.store.paymode.currentMode.boriginReturn) {
|
|
880
991
|
_this2.store.getCouponList();
|
|
@@ -958,8 +1069,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
958
1069
|
};
|
|
959
1070
|
|
|
960
1071
|
_this2.checkOfflineEnable = function (paymode, key) {
|
|
961
|
-
var
|
|
962
|
-
paymodes =
|
|
1072
|
+
var _ref11 = paymode || {},
|
|
1073
|
+
paymodes = _ref11.paymodes;
|
|
963
1074
|
|
|
964
1075
|
var isOffline = _mutantsMicrofx.stores.offlineSys.isOffline;
|
|
965
1076
|
|
|
@@ -990,7 +1101,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
990
1101
|
paymode.currentMode = null;
|
|
991
1102
|
switch (key) {
|
|
992
1103
|
case PayStyle.hyczk:
|
|
993
|
-
_this2.
|
|
1104
|
+
_this2.setState({
|
|
1105
|
+
isInputMember: true
|
|
1106
|
+
}, function () {
|
|
1107
|
+
_this2.showCzkModal(-1);
|
|
1108
|
+
});
|
|
994
1109
|
break;
|
|
995
1110
|
case PayStyle.jfdx:
|
|
996
1111
|
_this2.showJfdxModal(-1);
|
|
@@ -1099,7 +1214,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1099
1214
|
boriginReturn = _this2$store3.boriginReturn;
|
|
1100
1215
|
var noAlreadyWarn = _this2.state.noAlreadyWarn;
|
|
1101
1216
|
|
|
1102
|
-
|
|
1103
1217
|
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(key)) return false;
|
|
1104
1218
|
|
|
1105
1219
|
if (_this2.checkModeDisabled(key, brefund, boriginReturn)) {
|
|
@@ -1169,12 +1283,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1169
1283
|
}
|
|
1170
1284
|
};
|
|
1171
1285
|
|
|
1172
|
-
_this2.setCurrentFocusAndAddPay = function (key) {
|
|
1286
|
+
_this2.setCurrentFocusAndAddPay = function (key, payId) {
|
|
1173
1287
|
_this2.store.changeFocusAndAddPay(key);
|
|
1174
1288
|
if (_this2.store.bquick) {
|
|
1175
1289
|
_this2.handleSettle("quickPay");
|
|
1176
1290
|
} else {
|
|
1177
|
-
_this2.setFocusAndSelection(key);
|
|
1291
|
+
_this2.setFocusAndSelection(key, payId);
|
|
1178
1292
|
}
|
|
1179
1293
|
};
|
|
1180
1294
|
|
|
@@ -1205,7 +1319,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1205
1319
|
PayStyle = _enumController$getEn13.PayStyle;
|
|
1206
1320
|
|
|
1207
1321
|
var reg = /^[\d.]+$/g;
|
|
1208
|
-
if (_this2.store.paymode.currentMode.paymentType === PayStyle.hyczk) {
|
|
1322
|
+
if (_this2.store.paymode.currentMode.paymentType === PayStyle.hyczk || _this2.store.paymode.currentMode.paymentType === PayStyle.jfdx) {
|
|
1209
1323
|
if (!val) {
|
|
1210
1324
|
_this2.setState({
|
|
1211
1325
|
storageValue: val
|
|
@@ -1236,19 +1350,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1236
1350
|
}
|
|
1237
1351
|
}
|
|
1238
1352
|
// let bjfdx=this.store.paymode.currentMode.paymentType==PayStyle.jfdx;
|
|
1239
|
-
|
|
1240
|
-
var amountMaxLength = parseInt(_this2.props.initData["AmountMaxLength"] || 10);
|
|
1241
|
-
if (isNaN(val) && val !== '-') {
|
|
1242
|
-
value = _this2._val;
|
|
1243
|
-
} else if (!_this2.store.brefund && !isNaN(val) && parseFloat(val) <= 0) {
|
|
1244
|
-
value = _this2._val;
|
|
1245
|
-
} else if (value.length > amountMaxLength) {
|
|
1246
|
-
value = _this2._val;
|
|
1247
|
-
} else {
|
|
1248
|
-
_this2._val = val;
|
|
1249
|
-
}
|
|
1250
|
-
_this2[_this2.inputkey].input.value = value;
|
|
1251
|
-
_this2.store.paymode.setCurrentModeValue(value, max);
|
|
1353
|
+
_this2.store.paymode.setCurrentModeValue(val, max);
|
|
1252
1354
|
};
|
|
1253
1355
|
|
|
1254
1356
|
_this2.onBlur = function (index, e) {
|
|
@@ -1307,8 +1409,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1307
1409
|
return;
|
|
1308
1410
|
}
|
|
1309
1411
|
|
|
1310
|
-
var
|
|
1311
|
-
isNewRetailBCPos =
|
|
1412
|
+
var _ref12 = _mutantsUtil.platform || {},
|
|
1413
|
+
isNewRetailBCPos = _ref12.isNewRetailBCPos;
|
|
1312
1414
|
|
|
1313
1415
|
if (isNewRetailBCPos) {
|
|
1314
1416
|
_this2.store.paymode.calcDjqCheckValue(q, _this2.store.dto);
|
|
@@ -1343,27 +1445,38 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1343
1445
|
if (_this2.czkdebounced) {
|
|
1344
1446
|
return;
|
|
1345
1447
|
}
|
|
1346
|
-
_this2.czkdebounced = (0, _debounce3.default)((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1347
|
-
|
|
1448
|
+
_this2.czkdebounced = (0, _debounce3.default)((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1449
|
+
var memberdata1;
|
|
1450
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1348
1451
|
while (1) {
|
|
1349
|
-
switch (
|
|
1452
|
+
switch (_context5.prev = _context5.next) {
|
|
1350
1453
|
case 0:
|
|
1351
|
-
|
|
1454
|
+
_context5.next = 2;
|
|
1352
1455
|
return _this2.store.loadCzk(v);
|
|
1353
1456
|
|
|
1354
1457
|
case 2:
|
|
1355
|
-
|
|
1458
|
+
memberdata1 = _context5.sent;
|
|
1459
|
+
|
|
1460
|
+
if (memberdata1 && memberdata1.length === 1) {
|
|
1461
|
+
if (_this2.store.paymode.currentMode.storageCardNo) {
|
|
1462
|
+
_this2.setState({
|
|
1463
|
+
czkValue: _this2.store.paymode.currentMode.storageCardNo
|
|
1464
|
+
});
|
|
1465
|
+
}
|
|
1466
|
+
} else if (memberdata1 && memberdata1.length >= 1) {
|
|
1356
1467
|
_this2.setState({
|
|
1357
|
-
|
|
1468
|
+
czkVisible: true,
|
|
1469
|
+
moreCzkVisible: true,
|
|
1470
|
+
memberdata1: memberdata1
|
|
1358
1471
|
});
|
|
1359
1472
|
}
|
|
1360
1473
|
|
|
1361
|
-
case
|
|
1474
|
+
case 4:
|
|
1362
1475
|
case 'end':
|
|
1363
|
-
return
|
|
1476
|
+
return _context5.stop();
|
|
1364
1477
|
}
|
|
1365
1478
|
}
|
|
1366
|
-
},
|
|
1479
|
+
}, _callee5, _this3);
|
|
1367
1480
|
})), 1000, {
|
|
1368
1481
|
'leading': true,
|
|
1369
1482
|
'trailing': false
|
|
@@ -1531,13 +1644,21 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1531
1644
|
return null;
|
|
1532
1645
|
};
|
|
1533
1646
|
|
|
1534
|
-
_this2.setFocusAndSelection = function (key) {
|
|
1647
|
+
_this2.setFocusAndSelection = function (key, payId) {
|
|
1535
1648
|
var that = _this2;
|
|
1536
1649
|
var paymode = _this2.store.paymode;
|
|
1537
1650
|
|
|
1651
|
+
var _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(),
|
|
1652
|
+
PayStyle = _enumController$getEn19.PayStyle;
|
|
1653
|
+
|
|
1538
1654
|
var themode = (0, _find3.default)(paymode.thePaymodes, function (mode) {
|
|
1539
1655
|
return mode.paymentType === key;
|
|
1540
1656
|
});
|
|
1657
|
+
if (key === PayStyle.hyczk) {
|
|
1658
|
+
themode = (0, _find3.default)(paymode.thePaymodes, function (mode) {
|
|
1659
|
+
return mode.paymethodId === payId;
|
|
1660
|
+
});
|
|
1661
|
+
}
|
|
1541
1662
|
var index = themode && themode.paymethodId || -1;
|
|
1542
1663
|
if (index !== -1) {
|
|
1543
1664
|
setTimeout(function () {
|
|
@@ -1552,11 +1673,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1552
1673
|
}
|
|
1553
1674
|
};
|
|
1554
1675
|
|
|
1555
|
-
_this2.settleUnReturn = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1676
|
+
_this2.settleUnReturn = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7() {
|
|
1556
1677
|
var that;
|
|
1557
|
-
return _regenerator2.default.wrap(function
|
|
1678
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1558
1679
|
while (1) {
|
|
1559
|
-
switch (
|
|
1680
|
+
switch (_context7.prev = _context7.next) {
|
|
1560
1681
|
case 0:
|
|
1561
1682
|
that = _this2;
|
|
1562
1683
|
|
|
@@ -1579,18 +1700,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1579
1700
|
onOk: function onOk() {
|
|
1580
1701
|
var _this4 = this;
|
|
1581
1702
|
|
|
1582
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1703
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
|
|
1583
1704
|
var result;
|
|
1584
|
-
return _regenerator2.default.wrap(function
|
|
1705
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1585
1706
|
while (1) {
|
|
1586
|
-
switch (
|
|
1707
|
+
switch (_context6.prev = _context6.next) {
|
|
1587
1708
|
case 0:
|
|
1588
1709
|
window.__queryingModal = (0, _utils.openQueryingModal)();
|
|
1589
|
-
|
|
1710
|
+
_context6.next = 3;
|
|
1590
1711
|
return that.store.querySettleResult();
|
|
1591
1712
|
|
|
1592
1713
|
case 3:
|
|
1593
|
-
result =
|
|
1714
|
+
result = _context6.sent;
|
|
1594
1715
|
|
|
1595
1716
|
setTimeout(function () {
|
|
1596
1717
|
if (window.__queryingModal) {
|
|
@@ -1598,34 +1719,34 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1598
1719
|
window.__queryingModal = null;
|
|
1599
1720
|
}
|
|
1600
1721
|
}, 0);
|
|
1601
|
-
|
|
1602
|
-
|
|
1722
|
+
_context6.t0 = result.Flag;
|
|
1723
|
+
_context6.next = _context6.t0 === "0" ? 8 : _context6.t0 === "1" ? 11 : _context6.t0 === "2" ? 13 : 15;
|
|
1603
1724
|
break;
|
|
1604
1725
|
|
|
1605
1726
|
case 8:
|
|
1606
1727
|
//成功
|
|
1607
1728
|
that.store.setDtoID(result.ID);
|
|
1608
1729
|
that.settleSuccess();
|
|
1609
|
-
return
|
|
1730
|
+
return _context6.abrupt('break', 15);
|
|
1610
1731
|
|
|
1611
1732
|
case 11:
|
|
1612
1733
|
//处理中
|
|
1613
1734
|
that.settleUnReturn();
|
|
1614
1735
|
// Message.info("结算正在处理中,请稍后再次查询。");
|
|
1615
|
-
return
|
|
1736
|
+
return _context6.abrupt('break', 15);
|
|
1616
1737
|
|
|
1617
1738
|
case 13:
|
|
1618
1739
|
//失败
|
|
1619
1740
|
_message2.default.info('\u7ED3\u7B97\u5931\u8D25\uFF0C\u539F\u56E0:' + result.Message + '\u3002');
|
|
1620
1741
|
// that.settleCanceled();
|
|
1621
|
-
return
|
|
1742
|
+
return _context6.abrupt('break', 15);
|
|
1622
1743
|
|
|
1623
1744
|
case 15:
|
|
1624
1745
|
case 'end':
|
|
1625
|
-
return
|
|
1746
|
+
return _context6.stop();
|
|
1626
1747
|
}
|
|
1627
1748
|
}
|
|
1628
|
-
},
|
|
1749
|
+
}, _callee6, _this4);
|
|
1629
1750
|
}))();
|
|
1630
1751
|
},
|
|
1631
1752
|
onCancel: function onCancel() {
|
|
@@ -1635,10 +1756,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1635
1756
|
|
|
1636
1757
|
case 2:
|
|
1637
1758
|
case 'end':
|
|
1638
|
-
return
|
|
1759
|
+
return _context7.stop();
|
|
1639
1760
|
}
|
|
1640
1761
|
}
|
|
1641
|
-
},
|
|
1762
|
+
}, _callee7, _this3);
|
|
1642
1763
|
}));
|
|
1643
1764
|
|
|
1644
1765
|
_this2.settleCanceled = function () {
|
|
@@ -1647,15 +1768,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1647
1768
|
_this2.cancelState();
|
|
1648
1769
|
};
|
|
1649
1770
|
|
|
1650
|
-
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1651
|
-
var _enumController$
|
|
1771
|
+
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
|
1772
|
+
var _enumController$getEn20, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, getSettleGift, type, resp1;
|
|
1652
1773
|
|
|
1653
|
-
return _regenerator2.default.wrap(function
|
|
1774
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1654
1775
|
while (1) {
|
|
1655
|
-
switch (
|
|
1776
|
+
switch (_context8.prev = _context8.next) {
|
|
1656
1777
|
case 0:
|
|
1657
1778
|
//提示成功
|
|
1658
|
-
_enumController$
|
|
1779
|
+
_enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn20.PayStyle;
|
|
1659
1780
|
_this2$store$paymode = _this2.store.paymode, amount = _this2$store$paymode.amount, received = _this2$store$paymode.received, thePaymodes = _this2$store$paymode.thePaymodes;
|
|
1660
1781
|
IdbusiType = _this2.store.dto.IdbusiType;
|
|
1661
1782
|
charge = _this2.store.paymode.charge;
|
|
@@ -1713,22 +1834,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1713
1834
|
resp1 = false;
|
|
1714
1835
|
|
|
1715
1836
|
if (!(type !== 1)) {
|
|
1716
|
-
|
|
1837
|
+
_context8.next = 20;
|
|
1717
1838
|
break;
|
|
1718
1839
|
}
|
|
1719
1840
|
|
|
1720
|
-
|
|
1721
|
-
|
|
1841
|
+
_context8.prev = 11;
|
|
1842
|
+
_context8.next = 14;
|
|
1722
1843
|
return getSettleGift();
|
|
1723
1844
|
|
|
1724
1845
|
case 14:
|
|
1725
|
-
resp1 =
|
|
1726
|
-
|
|
1846
|
+
resp1 = _context8.sent;
|
|
1847
|
+
_context8.next = 20;
|
|
1727
1848
|
break;
|
|
1728
1849
|
|
|
1729
1850
|
case 17:
|
|
1730
|
-
|
|
1731
|
-
|
|
1851
|
+
_context8.prev = 17;
|
|
1852
|
+
_context8.t0 = _context8['catch'](11);
|
|
1732
1853
|
|
|
1733
1854
|
console.log("获取支付礼包getSettleGift失败");
|
|
1734
1855
|
|
|
@@ -1766,23 +1887,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1766
1887
|
|
|
1767
1888
|
case 21:
|
|
1768
1889
|
case 'end':
|
|
1769
|
-
return
|
|
1890
|
+
return _context8.stop();
|
|
1770
1891
|
}
|
|
1771
1892
|
}
|
|
1772
|
-
},
|
|
1893
|
+
}, _callee8, _this3, [[11, 17]]);
|
|
1773
1894
|
}));
|
|
1774
1895
|
|
|
1775
1896
|
_this2.handleGuestShow = function (dtype, value) {
|
|
1776
1897
|
if (_this2.hasElectron === false) return;
|
|
1777
1898
|
var dt = _mutantsMicrofx.localStore.get('portsetting_hardSet') || [];
|
|
1778
1899
|
|
|
1779
|
-
var
|
|
1780
|
-
guestshow_enable =
|
|
1781
|
-
guestshow_clear =
|
|
1782
|
-
guestshow_welcome =
|
|
1783
|
-
guestshow_collect =
|
|
1784
|
-
guestshow_refund =
|
|
1785
|
-
guestshow_change =
|
|
1900
|
+
var _ref16 = dt || {},
|
|
1901
|
+
guestshow_enable = _ref16.guestshow_enable,
|
|
1902
|
+
guestshow_clear = _ref16.guestshow_clear,
|
|
1903
|
+
guestshow_welcome = _ref16.guestshow_welcome,
|
|
1904
|
+
guestshow_collect = _ref16.guestshow_collect,
|
|
1905
|
+
guestshow_refund = _ref16.guestshow_refund,
|
|
1906
|
+
guestshow_change = _ref16.guestshow_change;
|
|
1786
1907
|
|
|
1787
1908
|
var hasSuccess = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('portsetting_hardSet_isSuccess');
|
|
1788
1909
|
if (!guestshow_enable || !!guestshow_enable && hasSuccess == '0') return;
|
|
@@ -1817,124 +1938,114 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1817
1938
|
};
|
|
1818
1939
|
|
|
1819
1940
|
_this2.handleSettle = function () {
|
|
1820
|
-
var
|
|
1941
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(args) {
|
|
1821
1942
|
var handleUserInputs = function () {
|
|
1822
|
-
var
|
|
1943
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(promises) {
|
|
1823
1944
|
var results, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, p, _result;
|
|
1824
1945
|
|
|
1825
|
-
return _regenerator2.default.wrap(function
|
|
1946
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
1826
1947
|
while (1) {
|
|
1827
|
-
switch (
|
|
1948
|
+
switch (_context10.prev = _context10.next) {
|
|
1828
1949
|
case 0:
|
|
1829
1950
|
results = [];
|
|
1830
|
-
|
|
1951
|
+
_context10.prev = 1;
|
|
1831
1952
|
_iteratorNormalCompletion = true;
|
|
1832
1953
|
_didIteratorError = false;
|
|
1833
1954
|
_iteratorError = undefined;
|
|
1834
|
-
|
|
1955
|
+
_context10.prev = 5;
|
|
1835
1956
|
_iterator = (0, _getIterator3.default)(promises);
|
|
1836
1957
|
|
|
1837
1958
|
case 7:
|
|
1838
1959
|
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
|
|
1839
|
-
|
|
1960
|
+
_context10.next = 16;
|
|
1840
1961
|
break;
|
|
1841
1962
|
}
|
|
1842
1963
|
|
|
1843
1964
|
p = _step.value;
|
|
1844
|
-
|
|
1965
|
+
_context10.next = 11;
|
|
1845
1966
|
return p;
|
|
1846
1967
|
|
|
1847
1968
|
case 11:
|
|
1848
|
-
_result =
|
|
1969
|
+
_result = _context10.sent;
|
|
1849
1970
|
|
|
1850
1971
|
results.push(_result);
|
|
1851
1972
|
|
|
1852
1973
|
case 13:
|
|
1853
1974
|
_iteratorNormalCompletion = true;
|
|
1854
|
-
|
|
1975
|
+
_context10.next = 7;
|
|
1855
1976
|
break;
|
|
1856
1977
|
|
|
1857
1978
|
case 16:
|
|
1858
|
-
|
|
1979
|
+
_context10.next = 22;
|
|
1859
1980
|
break;
|
|
1860
1981
|
|
|
1861
1982
|
case 18:
|
|
1862
|
-
|
|
1863
|
-
|
|
1983
|
+
_context10.prev = 18;
|
|
1984
|
+
_context10.t0 = _context10['catch'](5);
|
|
1864
1985
|
_didIteratorError = true;
|
|
1865
|
-
_iteratorError =
|
|
1986
|
+
_iteratorError = _context10.t0;
|
|
1866
1987
|
|
|
1867
1988
|
case 22:
|
|
1868
|
-
|
|
1869
|
-
|
|
1989
|
+
_context10.prev = 22;
|
|
1990
|
+
_context10.prev = 23;
|
|
1870
1991
|
|
|
1871
1992
|
if (!_iteratorNormalCompletion && _iterator.return) {
|
|
1872
1993
|
_iterator.return();
|
|
1873
1994
|
}
|
|
1874
1995
|
|
|
1875
1996
|
case 25:
|
|
1876
|
-
|
|
1997
|
+
_context10.prev = 25;
|
|
1877
1998
|
|
|
1878
1999
|
if (!_didIteratorError) {
|
|
1879
|
-
|
|
2000
|
+
_context10.next = 28;
|
|
1880
2001
|
break;
|
|
1881
2002
|
}
|
|
1882
2003
|
|
|
1883
2004
|
throw _iteratorError;
|
|
1884
2005
|
|
|
1885
2006
|
case 28:
|
|
1886
|
-
return
|
|
2007
|
+
return _context10.finish(25);
|
|
1887
2008
|
|
|
1888
2009
|
case 29:
|
|
1889
|
-
return
|
|
2010
|
+
return _context10.finish(22);
|
|
1890
2011
|
|
|
1891
2012
|
case 30:
|
|
1892
2013
|
window.__loadingModal = (0, _utils.openLoadingModal)();
|
|
1893
|
-
|
|
2014
|
+
_context10.next = 33;
|
|
1894
2015
|
return commit(results);
|
|
1895
2016
|
|
|
1896
2017
|
case 33:
|
|
1897
|
-
|
|
2018
|
+
_context10.next = 37;
|
|
1898
2019
|
break;
|
|
1899
2020
|
|
|
1900
2021
|
case 35:
|
|
1901
|
-
|
|
1902
|
-
|
|
2022
|
+
_context10.prev = 35;
|
|
2023
|
+
_context10.t1 = _context10['catch'](1);
|
|
1903
2024
|
|
|
1904
2025
|
case 37:
|
|
1905
2026
|
case 'end':
|
|
1906
|
-
return
|
|
2027
|
+
return _context10.stop();
|
|
1907
2028
|
}
|
|
1908
2029
|
}
|
|
1909
|
-
},
|
|
2030
|
+
}, _callee10, this, [[1, 35], [5, 18, 22, 30], [23,, 25, 29]]);
|
|
1910
2031
|
}));
|
|
1911
2032
|
|
|
1912
|
-
return function handleUserInputs(
|
|
1913
|
-
return
|
|
2033
|
+
return function handleUserInputs(_x6) {
|
|
2034
|
+
return _ref19.apply(this, arguments);
|
|
1914
2035
|
};
|
|
1915
2036
|
}();
|
|
1916
2037
|
|
|
1917
|
-
var _enumController$
|
|
2038
|
+
var _enumController$getEn21, PayStyle, _this2$store6, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
|
|
1918
2039
|
|
|
1919
|
-
return _regenerator2.default.wrap(function
|
|
2040
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
1920
2041
|
while (1) {
|
|
1921
|
-
switch (
|
|
2042
|
+
switch (_context11.prev = _context11.next) {
|
|
1922
2043
|
case 0:
|
|
1923
2044
|
_this2.setState({
|
|
1924
2045
|
settleDisabled: true
|
|
1925
2046
|
});
|
|
1926
2047
|
console.log("settlement.handleSettle开始执行,参数:", +args);
|
|
1927
|
-
|
|
1928
|
-
// res(args);
|
|
1929
|
-
// });
|
|
1930
|
-
//
|
|
1931
|
-
// const testAsync = async (p) => {
|
|
1932
|
-
// let result = await p;
|
|
1933
|
-
// console.log(result);
|
|
1934
|
-
// }
|
|
1935
|
-
//
|
|
1936
|
-
// testAsync(p);
|
|
1937
|
-
_enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn20.PayStyle;
|
|
2048
|
+
_enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn21.PayStyle;
|
|
1938
2049
|
_this2$store6 = _this2.store, paymode = _this2$store6.paymode, brefund = _this2$store6.brefund, boriginReturn = _this2$store6.boriginReturn, newStyle = _this2$store6.newStyle;
|
|
1939
2050
|
isQuickPay = args === 'quickPay';
|
|
1940
2051
|
that = _this2;
|
|
@@ -1950,7 +2061,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1950
2061
|
});
|
|
1951
2062
|
|
|
1952
2063
|
if (!(that.checkCharge() && Math.abs(paymode.receivable) > that.props.initData("posChangeUpperAmount"))) {
|
|
1953
|
-
|
|
2064
|
+
_context11.next = 13;
|
|
1954
2065
|
break;
|
|
1955
2066
|
}
|
|
1956
2067
|
|
|
@@ -1958,11 +2069,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1958
2069
|
_this2.setState({
|
|
1959
2070
|
settleDisabled: false
|
|
1960
2071
|
});
|
|
1961
|
-
return
|
|
2072
|
+
return _context11.abrupt('return');
|
|
1962
2073
|
|
|
1963
2074
|
case 13:
|
|
1964
2075
|
if (!(args !== "zero" && !newStyle)) {
|
|
1965
|
-
|
|
2076
|
+
_context11.next = 19;
|
|
1966
2077
|
break;
|
|
1967
2078
|
}
|
|
1968
2079
|
|
|
@@ -1971,7 +2082,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1971
2082
|
});
|
|
1972
2083
|
|
|
1973
2084
|
if (!zeromode) {
|
|
1974
|
-
|
|
2085
|
+
_context11.next = 19;
|
|
1975
2086
|
break;
|
|
1976
2087
|
}
|
|
1977
2088
|
|
|
@@ -1979,7 +2090,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1979
2090
|
settleDisabled: false
|
|
1980
2091
|
});
|
|
1981
2092
|
_message2.default.error(zeromode.name + ' 的结算金额为零,不可以结算。');
|
|
1982
|
-
return
|
|
2093
|
+
return _context11.abrupt('return');
|
|
1983
2094
|
|
|
1984
2095
|
case 19:
|
|
1985
2096
|
promises = [];
|
|
@@ -1988,14 +2099,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1988
2099
|
}) : paymode.thePaymodes, 'orderBy');
|
|
1989
2100
|
|
|
1990
2101
|
if (!isQuickPay) {
|
|
1991
|
-
|
|
2102
|
+
_context11.next = 27;
|
|
1992
2103
|
break;
|
|
1993
2104
|
}
|
|
1994
2105
|
|
|
1995
2106
|
quickmode = thePaymodes[0];
|
|
1996
2107
|
|
|
1997
2108
|
if (!_this2.checkModeDisabled(quickmode.paymentType, brefund, boriginReturn)) {
|
|
1998
|
-
|
|
2109
|
+
_context11.next = 27;
|
|
1999
2110
|
break;
|
|
2000
2111
|
}
|
|
2001
2112
|
|
|
@@ -2003,7 +2114,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2003
2114
|
settleDisabled: false
|
|
2004
2115
|
});
|
|
2005
2116
|
_message2.default.error('退款不能使用' + quickmode.name + '结算,请使用其他结算方式!');
|
|
2006
|
-
return
|
|
2117
|
+
return _context11.abrupt('return');
|
|
2007
2118
|
|
|
2008
2119
|
case 27:
|
|
2009
2120
|
(0, _forEach3.default)(thePaymodes, function (mode) {
|
|
@@ -2013,27 +2124,27 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2013
2124
|
});
|
|
2014
2125
|
|
|
2015
2126
|
commit = function () {
|
|
2016
|
-
var
|
|
2127
|
+
var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(values) {
|
|
2017
2128
|
var result;
|
|
2018
|
-
return _regenerator2.default.wrap(function
|
|
2129
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
2019
2130
|
while (1) {
|
|
2020
|
-
switch (
|
|
2131
|
+
switch (_context9.prev = _context9.next) {
|
|
2021
2132
|
case 0:
|
|
2022
|
-
|
|
2133
|
+
_context9.next = 2;
|
|
2023
2134
|
return _this2.store.commit(_this2.props.bTest);
|
|
2024
2135
|
|
|
2025
2136
|
case 2:
|
|
2026
|
-
result =
|
|
2137
|
+
result = _context9.sent;
|
|
2027
2138
|
|
|
2028
2139
|
if (!(result === true)) {
|
|
2029
|
-
|
|
2140
|
+
_context9.next = 8;
|
|
2030
2141
|
break;
|
|
2031
2142
|
}
|
|
2032
2143
|
|
|
2033
2144
|
//成功
|
|
2034
2145
|
that.settleSuccess();
|
|
2035
2146
|
_promise2.default.resolve();
|
|
2036
|
-
|
|
2147
|
+
_context9.next = 23;
|
|
2037
2148
|
break;
|
|
2038
2149
|
|
|
2039
2150
|
case 8:
|
|
@@ -2050,24 +2161,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2050
2161
|
}, 0);
|
|
2051
2162
|
|
|
2052
2163
|
if (!(result && (result.Code || result.code))) {
|
|
2053
|
-
|
|
2164
|
+
_context9.next = 20;
|
|
2054
2165
|
break;
|
|
2055
2166
|
}
|
|
2056
2167
|
|
|
2057
|
-
|
|
2058
|
-
|
|
2168
|
+
_context9.t0 = result.Code || result.code;
|
|
2169
|
+
_context9.next = _context9.t0 === 'RE_Settle_UnReturn' ? 14 : _context9.t0 === 'ECONNABORTED' ? 18 : 20;
|
|
2059
2170
|
break;
|
|
2060
2171
|
|
|
2061
2172
|
case 14:
|
|
2062
2173
|
console.log('settlement--RE_Settle_UnReturn--调用清除数据==Focus==');
|
|
2063
2174
|
_this2.props.clearVoucherData && _this2.props.clearVoucherData();
|
|
2064
2175
|
_this2.cancelState();
|
|
2065
|
-
return
|
|
2176
|
+
return _context9.abrupt('break', 20);
|
|
2066
2177
|
|
|
2067
2178
|
case 18:
|
|
2068
2179
|
//error.code === 'ECONNABORTED' && error.message.indexOf('timeout')
|
|
2069
2180
|
result.message.indexOf('timeout') > -1 && that.settleUnReturn();
|
|
2070
|
-
return
|
|
2181
|
+
return _context9.abrupt('break', 20);
|
|
2071
2182
|
|
|
2072
2183
|
case 20:
|
|
2073
2184
|
if (isQuickPay) {
|
|
@@ -2075,19 +2186,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2075
2186
|
that.cancelState();
|
|
2076
2187
|
}
|
|
2077
2188
|
|
|
2078
|
-
|
|
2189
|
+
_context9.next = 23;
|
|
2079
2190
|
return _promise2.default.reject();
|
|
2080
2191
|
|
|
2081
2192
|
case 23:
|
|
2082
2193
|
case 'end':
|
|
2083
|
-
return
|
|
2194
|
+
return _context9.stop();
|
|
2084
2195
|
}
|
|
2085
2196
|
}
|
|
2086
|
-
},
|
|
2197
|
+
}, _callee9, _this3);
|
|
2087
2198
|
}));
|
|
2088
2199
|
|
|
2089
|
-
return function commit(
|
|
2090
|
-
return
|
|
2200
|
+
return function commit(_x5) {
|
|
2201
|
+
return _ref18.apply(this, arguments);
|
|
2091
2202
|
};
|
|
2092
2203
|
}();
|
|
2093
2204
|
|
|
@@ -2095,102 +2206,102 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2095
2206
|
|
|
2096
2207
|
case 30:
|
|
2097
2208
|
case 'end':
|
|
2098
|
-
return
|
|
2209
|
+
return _context11.stop();
|
|
2099
2210
|
}
|
|
2100
2211
|
}
|
|
2101
|
-
},
|
|
2212
|
+
}, _callee11, _this3);
|
|
2102
2213
|
}));
|
|
2103
2214
|
|
|
2104
|
-
return function (
|
|
2105
|
-
return
|
|
2215
|
+
return function (_x4) {
|
|
2216
|
+
return _ref17.apply(this, arguments);
|
|
2106
2217
|
};
|
|
2107
2218
|
}();
|
|
2108
2219
|
|
|
2109
|
-
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
2220
|
+
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
|
|
2110
2221
|
var handleUserInputs = function () {
|
|
2111
|
-
var
|
|
2222
|
+
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(promises) {
|
|
2112
2223
|
var results, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, p, _result2;
|
|
2113
2224
|
|
|
2114
|
-
return _regenerator2.default.wrap(function
|
|
2225
|
+
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
|
2115
2226
|
while (1) {
|
|
2116
|
-
switch (
|
|
2227
|
+
switch (_context13.prev = _context13.next) {
|
|
2117
2228
|
case 0:
|
|
2118
2229
|
results = [];
|
|
2119
|
-
|
|
2230
|
+
_context13.prev = 1;
|
|
2120
2231
|
_iteratorNormalCompletion2 = true;
|
|
2121
2232
|
_didIteratorError2 = false;
|
|
2122
2233
|
_iteratorError2 = undefined;
|
|
2123
|
-
|
|
2234
|
+
_context13.prev = 5;
|
|
2124
2235
|
_iterator2 = (0, _getIterator3.default)(promises);
|
|
2125
2236
|
|
|
2126
2237
|
case 7:
|
|
2127
2238
|
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {
|
|
2128
|
-
|
|
2239
|
+
_context13.next = 16;
|
|
2129
2240
|
break;
|
|
2130
2241
|
}
|
|
2131
2242
|
|
|
2132
2243
|
p = _step2.value;
|
|
2133
|
-
|
|
2244
|
+
_context13.next = 11;
|
|
2134
2245
|
return p;
|
|
2135
2246
|
|
|
2136
2247
|
case 11:
|
|
2137
|
-
_result2 =
|
|
2248
|
+
_result2 = _context13.sent;
|
|
2138
2249
|
|
|
2139
2250
|
results.push(_result2);
|
|
2140
2251
|
|
|
2141
2252
|
case 13:
|
|
2142
2253
|
_iteratorNormalCompletion2 = true;
|
|
2143
|
-
|
|
2254
|
+
_context13.next = 7;
|
|
2144
2255
|
break;
|
|
2145
2256
|
|
|
2146
2257
|
case 16:
|
|
2147
|
-
|
|
2258
|
+
_context13.next = 22;
|
|
2148
2259
|
break;
|
|
2149
2260
|
|
|
2150
2261
|
case 18:
|
|
2151
|
-
|
|
2152
|
-
|
|
2262
|
+
_context13.prev = 18;
|
|
2263
|
+
_context13.t0 = _context13['catch'](5);
|
|
2153
2264
|
_didIteratorError2 = true;
|
|
2154
|
-
_iteratorError2 =
|
|
2265
|
+
_iteratorError2 = _context13.t0;
|
|
2155
2266
|
|
|
2156
2267
|
case 22:
|
|
2157
|
-
|
|
2158
|
-
|
|
2268
|
+
_context13.prev = 22;
|
|
2269
|
+
_context13.prev = 23;
|
|
2159
2270
|
|
|
2160
2271
|
if (!_iteratorNormalCompletion2 && _iterator2.return) {
|
|
2161
2272
|
_iterator2.return();
|
|
2162
2273
|
}
|
|
2163
2274
|
|
|
2164
2275
|
case 25:
|
|
2165
|
-
|
|
2276
|
+
_context13.prev = 25;
|
|
2166
2277
|
|
|
2167
2278
|
if (!_didIteratorError2) {
|
|
2168
|
-
|
|
2279
|
+
_context13.next = 28;
|
|
2169
2280
|
break;
|
|
2170
2281
|
}
|
|
2171
2282
|
|
|
2172
2283
|
throw _iteratorError2;
|
|
2173
2284
|
|
|
2174
2285
|
case 28:
|
|
2175
|
-
return
|
|
2286
|
+
return _context13.finish(25);
|
|
2176
2287
|
|
|
2177
2288
|
case 29:
|
|
2178
|
-
return
|
|
2289
|
+
return _context13.finish(22);
|
|
2179
2290
|
|
|
2180
2291
|
case 30:
|
|
2181
|
-
|
|
2292
|
+
_context13.next = 32;
|
|
2182
2293
|
return commit(results);
|
|
2183
2294
|
|
|
2184
2295
|
case 32:
|
|
2185
|
-
|
|
2296
|
+
_context13.next = 37;
|
|
2186
2297
|
break;
|
|
2187
2298
|
|
|
2188
2299
|
case 34:
|
|
2189
|
-
|
|
2190
|
-
|
|
2300
|
+
_context13.prev = 34;
|
|
2301
|
+
_context13.t1 = _context13['catch'](1);
|
|
2191
2302
|
|
|
2192
|
-
if (
|
|
2193
|
-
_message2.default.error(
|
|
2303
|
+
if (_context13.t1 != "cancelpwd") {
|
|
2304
|
+
_message2.default.error(_context13.t1);
|
|
2194
2305
|
setTimeout(function () {
|
|
2195
2306
|
that.handleCzk();
|
|
2196
2307
|
}, 500);
|
|
@@ -2198,37 +2309,37 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2198
2309
|
|
|
2199
2310
|
case 37:
|
|
2200
2311
|
case 'end':
|
|
2201
|
-
return
|
|
2312
|
+
return _context13.stop();
|
|
2202
2313
|
}
|
|
2203
2314
|
}
|
|
2204
|
-
},
|
|
2315
|
+
}, _callee13, this, [[1, 34], [5, 18, 22, 30], [23,, 25, 29]]);
|
|
2205
2316
|
}));
|
|
2206
2317
|
|
|
2207
|
-
return function handleUserInputs(
|
|
2208
|
-
return
|
|
2318
|
+
return function handleUserInputs(_x8) {
|
|
2319
|
+
return _ref23.apply(this, arguments);
|
|
2209
2320
|
};
|
|
2210
2321
|
}();
|
|
2211
2322
|
|
|
2212
|
-
var that, curmode, promises,
|
|
2323
|
+
var that, curmode, promises, _ref21, isNewRetailBCPos, _enumController$getEn22, PayStyle, commit;
|
|
2213
2324
|
|
|
2214
|
-
return _regenerator2.default.wrap(function
|
|
2325
|
+
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
|
2215
2326
|
while (1) {
|
|
2216
|
-
switch (
|
|
2327
|
+
switch (_context14.prev = _context14.next) {
|
|
2217
2328
|
case 0:
|
|
2218
2329
|
that = _this2;
|
|
2219
2330
|
curmode = _this2.store.paymode.currentMode;
|
|
2220
2331
|
promises = [];
|
|
2221
|
-
|
|
2332
|
+
_ref21 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref21.isNewRetailBCPos;
|
|
2222
2333
|
|
|
2223
2334
|
if (isNewRetailBCPos) {
|
|
2224
2335
|
if (curmode.value > 0) {
|
|
2225
|
-
_enumController$
|
|
2336
|
+
_enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn22.PayStyle;
|
|
2226
2337
|
|
|
2227
2338
|
if (curmode.paymentType === PayStyle.hyczk) {
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
promises.push(that.inputPwd(curmode));
|
|
2339
|
+
if (curmode.cardTypeEnum === 'BALANCE_CARD') {
|
|
2340
|
+
!curmode.freePaymentPasswordStore && promises.push(that.inputPwd(curmode));
|
|
2341
|
+
} else {
|
|
2342
|
+
curmode.isNeedPassword && promises.push(that.inputPwd(curmode));
|
|
2232
2343
|
}
|
|
2233
2344
|
}
|
|
2234
2345
|
}
|
|
@@ -2239,57 +2350,57 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2239
2350
|
}
|
|
2240
2351
|
|
|
2241
2352
|
commit = function () {
|
|
2242
|
-
var
|
|
2353
|
+
var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(values) {
|
|
2243
2354
|
var result;
|
|
2244
|
-
return _regenerator2.default.wrap(function
|
|
2355
|
+
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
|
2245
2356
|
while (1) {
|
|
2246
|
-
switch (
|
|
2357
|
+
switch (_context12.prev = _context12.next) {
|
|
2247
2358
|
case 0:
|
|
2248
2359
|
if (!(values.length > 0)) {
|
|
2249
|
-
|
|
2360
|
+
_context12.next = 6;
|
|
2250
2361
|
break;
|
|
2251
2362
|
}
|
|
2252
2363
|
|
|
2253
|
-
|
|
2364
|
+
_context12.next = 3;
|
|
2254
2365
|
return that.store.validePwd(values[0]);
|
|
2255
2366
|
|
|
2256
2367
|
case 3:
|
|
2257
|
-
|
|
2258
|
-
|
|
2368
|
+
_context12.t0 = _context12.sent;
|
|
2369
|
+
_context12.next = 7;
|
|
2259
2370
|
break;
|
|
2260
2371
|
|
|
2261
2372
|
case 6:
|
|
2262
|
-
|
|
2373
|
+
_context12.t0 = "";
|
|
2263
2374
|
|
|
2264
2375
|
case 7:
|
|
2265
|
-
result =
|
|
2376
|
+
result = _context12.t0;
|
|
2266
2377
|
|
|
2267
2378
|
if (!(result == "")) {
|
|
2268
|
-
|
|
2379
|
+
_context12.next = 13;
|
|
2269
2380
|
break;
|
|
2270
2381
|
}
|
|
2271
2382
|
|
|
2272
2383
|
//成功
|
|
2273
2384
|
//返回
|
|
2274
|
-
that.setCurrentFocusAndAddPay(curmode.paymentType);
|
|
2385
|
+
that.setCurrentFocusAndAddPay(curmode.paymentType, curmode.paymethodId);
|
|
2275
2386
|
_promise2.default.resolve();
|
|
2276
|
-
|
|
2387
|
+
_context12.next = 15;
|
|
2277
2388
|
break;
|
|
2278
2389
|
|
|
2279
2390
|
case 13:
|
|
2280
|
-
|
|
2391
|
+
_context12.next = 15;
|
|
2281
2392
|
return _promise2.default.reject(result);
|
|
2282
2393
|
|
|
2283
2394
|
case 15:
|
|
2284
2395
|
case 'end':
|
|
2285
|
-
return
|
|
2396
|
+
return _context12.stop();
|
|
2286
2397
|
}
|
|
2287
2398
|
}
|
|
2288
|
-
},
|
|
2399
|
+
}, _callee12, _this3);
|
|
2289
2400
|
}));
|
|
2290
2401
|
|
|
2291
|
-
return function commit(
|
|
2292
|
-
return
|
|
2402
|
+
return function commit(_x7) {
|
|
2403
|
+
return _ref22.apply(this, arguments);
|
|
2293
2404
|
};
|
|
2294
2405
|
}();
|
|
2295
2406
|
|
|
@@ -2297,10 +2408,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2297
2408
|
|
|
2298
2409
|
case 7:
|
|
2299
2410
|
case 'end':
|
|
2300
|
-
return
|
|
2411
|
+
return _context14.stop();
|
|
2301
2412
|
}
|
|
2302
2413
|
}
|
|
2303
|
-
},
|
|
2414
|
+
}, _callee14, _this3);
|
|
2304
2415
|
}));
|
|
2305
2416
|
|
|
2306
2417
|
_this2.fKeyboardOnOk = function (paymethodeId) {
|
|
@@ -2340,15 +2451,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2340
2451
|
};
|
|
2341
2452
|
|
|
2342
2453
|
_this2.inputPwd = function () {
|
|
2343
|
-
var
|
|
2454
|
+
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(paymode) {
|
|
2344
2455
|
var that, confirmPwd;
|
|
2345
|
-
return _regenerator2.default.wrap(function
|
|
2456
|
+
return _regenerator2.default.wrap(function _callee15$(_context15) {
|
|
2346
2457
|
while (1) {
|
|
2347
|
-
switch (
|
|
2458
|
+
switch (_context15.prev = _context15.next) {
|
|
2348
2459
|
case 0:
|
|
2349
2460
|
that = _this2;
|
|
2350
2461
|
confirmPwd = _this2.state.confirmPwd;
|
|
2351
|
-
return
|
|
2462
|
+
return _context15.abrupt('return', new _promise2.default(function (resolve, reject) {
|
|
2352
2463
|
var modal = (0, _asyncModal2.default)({
|
|
2353
2464
|
onPressEnter: function onPressEnter() {
|
|
2354
2465
|
_keyboard2.default.close();
|
|
@@ -2356,8 +2467,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2356
2467
|
// if (v !== '') {
|
|
2357
2468
|
modal.destroy();
|
|
2358
2469
|
|
|
2359
|
-
var
|
|
2360
|
-
confirmPwd =
|
|
2470
|
+
var _ref25 = that.state || {},
|
|
2471
|
+
confirmPwd = _ref25.confirmPwd;
|
|
2361
2472
|
|
|
2362
2473
|
setTimeout(function () {
|
|
2363
2474
|
paymode.authCode = v;
|
|
@@ -2447,8 +2558,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2447
2558
|
type: 'primary', size: 'large', onClick: function onClick() {
|
|
2448
2559
|
var v = (0, _trim3.default)(that['inputAmount']['input']['value']);
|
|
2449
2560
|
|
|
2450
|
-
var
|
|
2451
|
-
confirmPwd =
|
|
2561
|
+
var _ref26 = that.state || {},
|
|
2562
|
+
confirmPwd = _ref26.confirmPwd;
|
|
2452
2563
|
// if (v !== '') {
|
|
2453
2564
|
|
|
2454
2565
|
|
|
@@ -2482,24 +2593,25 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2482
2593
|
|
|
2483
2594
|
case 3:
|
|
2484
2595
|
case 'end':
|
|
2485
|
-
return
|
|
2596
|
+
return _context15.stop();
|
|
2486
2597
|
}
|
|
2487
2598
|
}
|
|
2488
|
-
},
|
|
2599
|
+
}, _callee15, _this3);
|
|
2489
2600
|
}));
|
|
2490
2601
|
|
|
2491
|
-
return function (
|
|
2492
|
-
return
|
|
2602
|
+
return function (_x9) {
|
|
2603
|
+
return _ref24.apply(this, arguments);
|
|
2493
2604
|
};
|
|
2494
2605
|
}();
|
|
2495
2606
|
|
|
2496
2607
|
_this2.btnDebounced = function (type, bquick) {
|
|
2497
2608
|
_this2.setState({
|
|
2498
|
-
bquick: bquick
|
|
2609
|
+
bquick: bquick,
|
|
2610
|
+
isInputMember: true
|
|
2499
2611
|
});
|
|
2500
2612
|
|
|
2501
|
-
var _enumController$
|
|
2502
|
-
PayStyle = _enumController$
|
|
2613
|
+
var _enumController$getEn23 = _mutantsUtil.enumController.getEnumOj(),
|
|
2614
|
+
PayStyle = _enumController$getEn23.PayStyle;
|
|
2503
2615
|
|
|
2504
2616
|
var _this2$store7 = _this2.store,
|
|
2505
2617
|
paymode = _this2$store7.paymode,
|
|
@@ -2542,13 +2654,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2542
2654
|
|
|
2543
2655
|
_this2.onCzkChange = function (v) {
|
|
2544
2656
|
// console.log("czk change:"+new Date().toLocaleTimeString())
|
|
2545
|
-
var
|
|
2546
|
-
isNewRetailBCPos =
|
|
2657
|
+
var _ref27 = _mutantsUtil.platform || {},
|
|
2658
|
+
isNewRetailBCPos = _ref27.isNewRetailBCPos;
|
|
2547
2659
|
|
|
2548
2660
|
if (!isNewRetailBCPos) {
|
|
2549
2661
|
_this2.store.paymode.currentMode.member.setCardNo(v);
|
|
2550
2662
|
}
|
|
2551
|
-
if (!/^[
|
|
2663
|
+
if (!/^[A-Za-z0-9]*$/.test(v)) {
|
|
2552
2664
|
return;
|
|
2553
2665
|
}
|
|
2554
2666
|
_this2.setState({
|
|
@@ -2604,8 +2716,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2604
2716
|
};
|
|
2605
2717
|
|
|
2606
2718
|
_this2.checkCharge = function () {
|
|
2607
|
-
var _enumController$
|
|
2608
|
-
PayStyle = _enumController$
|
|
2719
|
+
var _enumController$getEn24 = _mutantsUtil.enumController.getEnumOj(),
|
|
2720
|
+
PayStyle = _enumController$getEn24.PayStyle;
|
|
2609
2721
|
|
|
2610
2722
|
var paymode = _this2.store.paymode;
|
|
2611
2723
|
|
|
@@ -2652,8 +2764,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2652
2764
|
};
|
|
2653
2765
|
|
|
2654
2766
|
_this2.getXianjinPayment = function (payType, value) {
|
|
2655
|
-
var _enumController$
|
|
2656
|
-
PayStyle = _enumController$
|
|
2767
|
+
var _enumController$getEn25 = _mutantsUtil.enumController.getEnumOj(),
|
|
2768
|
+
PayStyle = _enumController$getEn25.PayStyle;
|
|
2657
2769
|
|
|
2658
2770
|
var isManualIntoAmount = _this2.state.isManualIntoAmount;
|
|
2659
2771
|
|
|
@@ -2661,8 +2773,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2661
2773
|
};
|
|
2662
2774
|
|
|
2663
2775
|
_this2.getXianjinBalance = function (payType, value) {
|
|
2664
|
-
var _enumController$
|
|
2665
|
-
PayStyle = _enumController$
|
|
2776
|
+
var _enumController$getEn26 = _mutantsUtil.enumController.getEnumOj(),
|
|
2777
|
+
PayStyle = _enumController$getEn26.PayStyle;
|
|
2666
2778
|
//找零金额-存在权限控制
|
|
2667
2779
|
|
|
2668
2780
|
|
|
@@ -2682,9 +2794,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2682
2794
|
var isManualIntoAmount = void 0;
|
|
2683
2795
|
// 付款弹窗
|
|
2684
2796
|
return new _promise2.default(function (resolve, reject) {
|
|
2685
|
-
var _enumController$
|
|
2686
|
-
PayStyle = _enumController$
|
|
2687
|
-
PayIcon2 = _enumController$
|
|
2797
|
+
var _enumController$getEn27 = _mutantsUtil.enumController.getEnumOj(),
|
|
2798
|
+
PayStyle = _enumController$getEn27.PayStyle,
|
|
2799
|
+
PayIcon2 = _enumController$getEn27.PayIcon2;
|
|
2688
2800
|
|
|
2689
2801
|
var modal = (0, _asyncModal2.default)({
|
|
2690
2802
|
onPressEnter: function onPressEnter() {
|
|
@@ -2890,7 +3002,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2890
3002
|
settleDisabled: false
|
|
2891
3003
|
});
|
|
2892
3004
|
that.store.bquick && that.props.onCancelSettle && that.props.onCancelSettle();
|
|
2893
|
-
that.store.delPay(paymode.paymethodId);
|
|
3005
|
+
that.store.bquick && that.store.delPay(paymode.paymethodId);
|
|
2894
3006
|
reject('\u652F\u4ED8\u65B9\u5F0F: ' + paymode.name + '\u5931\u8D25');
|
|
2895
3007
|
} },
|
|
2896
3008
|
'\u53D6\u6D88'
|
|
@@ -2953,8 +3065,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2953
3065
|
paymode = _this2$store8.paymode,
|
|
2954
3066
|
newStyle = _this2$store8.newStyle;
|
|
2955
3067
|
|
|
2956
|
-
var _enumController$
|
|
2957
|
-
PayStyle = _enumController$
|
|
3068
|
+
var _enumController$getEn28 = _mutantsUtil.enumController.getEnumOj(),
|
|
3069
|
+
PayStyle = _enumController$getEn28.PayStyle;
|
|
2958
3070
|
|
|
2959
3071
|
var payTypeList = [PayStyle.SQBPAY, PayStyle.CSYH, PayStyle.smzf];
|
|
2960
3072
|
var payTypeFilterList = payTypeList.filter(function (filterType) {
|
|
@@ -2975,15 +3087,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2975
3087
|
};
|
|
2976
3088
|
|
|
2977
3089
|
_this2.checkModeDisabled = function (type, brefund, boriginReturn) {
|
|
2978
|
-
var _enumController$
|
|
2979
|
-
PayStyle = _enumController$
|
|
3090
|
+
var _enumController$getEn29 = _mutantsUtil.enumController.getEnumOj(),
|
|
3091
|
+
PayStyle = _enumController$getEn29.PayStyle;
|
|
2980
3092
|
|
|
2981
3093
|
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
3094
|
};
|
|
2983
3095
|
|
|
2984
3096
|
_this2.checkSettleDisabled = function (paymode, thePaymodes) {
|
|
2985
|
-
var _enumController$
|
|
2986
|
-
PayStyle = _enumController$
|
|
3097
|
+
var _enumController$getEn30 = _mutantsUtil.enumController.getEnumOj(),
|
|
3098
|
+
PayStyle = _enumController$getEn30.PayStyle;
|
|
2987
3099
|
|
|
2988
3100
|
console.log("settlement.checkSettleDisabled开始执行,参数:", { paymode: paymode, thePaymodes: thePaymodes });
|
|
2989
3101
|
if (paymode.amount == 0 && paymode.received == 0) {
|
|
@@ -3029,8 +3141,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3029
3141
|
};
|
|
3030
3142
|
|
|
3031
3143
|
_this2.editCzkModal = function () {
|
|
3032
|
-
var _enumController$
|
|
3033
|
-
PayStyle = _enumController$
|
|
3144
|
+
var _enumController$getEn31 = _mutantsUtil.enumController.getEnumOj(),
|
|
3145
|
+
PayStyle = _enumController$getEn31.PayStyle;
|
|
3034
3146
|
|
|
3035
3147
|
(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
|
|
3036
3148
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
@@ -3096,9 +3208,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3096
3208
|
isPrototypeClick: false
|
|
3097
3209
|
});
|
|
3098
3210
|
var that = _this2;
|
|
3099
|
-
var _this2$
|
|
3100
|
-
bquick = _this2$
|
|
3101
|
-
isPrototypeClick = _this2$
|
|
3211
|
+
var _this2$state3 = _this2.state,
|
|
3212
|
+
bquick = _this2$state3.bquick,
|
|
3213
|
+
isPrototypeClick = _this2$state3.isPrototypeClick;
|
|
3102
3214
|
|
|
3103
3215
|
if (!isPrototypeClick) {
|
|
3104
3216
|
if (bquick) {
|
|
@@ -3124,31 +3236,32 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3124
3236
|
|
|
3125
3237
|
_this2.hasElectron = hasElectron;
|
|
3126
3238
|
|
|
3127
|
-
var
|
|
3128
|
-
|
|
3129
|
-
|
|
3239
|
+
var _ref28 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {},
|
|
3240
|
+
MemberMeStorageCardInputByKeyBoard = _ref28.MemberMeStorageCardInputByKeyBoard,
|
|
3241
|
+
ICCardServer = _ref28.ICCardServer,
|
|
3242
|
+
ICCardPassword = _ref28.ICCardPassword;
|
|
3130
3243
|
|
|
3244
|
+
_this2.isStorageCardInputType = MemberMeStorageCardInputByKeyBoard; // 仅储值卡是否禁用键盘输入,'0'为不禁用 '1'为禁用
|
|
3131
3245
|
_this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
|
|
3132
3246
|
_this2.iCCardPassword = ICCardPassword; //IC卡密码
|
|
3133
3247
|
//移动端环境下,没有读取IC卡的方式。
|
|
3134
3248
|
|
|
3135
|
-
var
|
|
3136
|
-
isHorizontalPad =
|
|
3137
|
-
isHorizontalSunMi =
|
|
3249
|
+
var _ref29 = _mutantsUtil.platform || {},
|
|
3250
|
+
isHorizontalPad = _ref29.isHorizontalPad,
|
|
3251
|
+
isHorizontalSunMi = _ref29.isHorizontalSunMi;
|
|
3138
3252
|
|
|
3139
3253
|
_this2.isHorizontalPad = !!isHorizontalPad;
|
|
3140
3254
|
_this2.isHorizontalSunMi = !!isHorizontalSunMi;
|
|
3141
3255
|
_this2.isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;
|
|
3142
3256
|
_this2.handleReadICard = _this2.handleReadICard.bind(_this2);
|
|
3143
3257
|
_this2.setTimer = null;
|
|
3258
|
+
_this2.keypressStime = null;
|
|
3144
3259
|
return _this2;
|
|
3145
3260
|
}
|
|
3146
3261
|
|
|
3147
3262
|
(0, _createClass3.default)(Settlement, [{
|
|
3148
3263
|
key: 'componentDidMount',
|
|
3149
3264
|
value: function componentDidMount() {
|
|
3150
|
-
//let retailDetails=this.context.viewModel.data.RetailDetails;//明细
|
|
3151
|
-
//let totalRetailAmount=this.context.viewModel.data.TotalRetailAmount;//零售金额合计
|
|
3152
3265
|
this.store.initPaymodes(this.updateInput, this.props.type, this.props.MemberPoints);
|
|
3153
3266
|
}
|
|
3154
3267
|
}, {
|
|
@@ -3219,8 +3332,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3219
3332
|
_this6.connectRfCard(); //读取失败后,重新连接一下。
|
|
3220
3333
|
return;
|
|
3221
3334
|
} else if (ret.status === 1) {
|
|
3222
|
-
//this.searchMember(ret.value);
|
|
3223
|
-
|
|
3335
|
+
// this.searchMember(ret.value);
|
|
3336
|
+
// this.czkInput.input["value"]=ret.value;
|
|
3337
|
+
_this6.setState({
|
|
3338
|
+
czkValue: ret.value
|
|
3339
|
+
});
|
|
3224
3340
|
_this6.loadCzk(ret.value);
|
|
3225
3341
|
}
|
|
3226
3342
|
});
|
|
@@ -3268,7 +3384,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3268
3384
|
}, {
|
|
3269
3385
|
key: 'onKeyboardChange',
|
|
3270
3386
|
value: function onKeyboardChange(key) {
|
|
3387
|
+
var _enumController$getEn32 = _mutantsUtil.enumController.getEnumOj(),
|
|
3388
|
+
PayStyle = _enumController$getEn32.PayStyle;
|
|
3389
|
+
|
|
3271
3390
|
if (this.currentInput) {
|
|
3391
|
+
if (this.store.paymode.currentMode) {
|
|
3392
|
+
var paymentType1 = this.store.paymode.currentMode.paymentType;
|
|
3393
|
+
if (paymentType1 === PayStyle.djq || paymentType1 === PayStyle.hyczk || paymentType1 === PayStyle.jfdx) {
|
|
3394
|
+
return;
|
|
3395
|
+
}
|
|
3396
|
+
}
|
|
3272
3397
|
var value = _keyboard2.default.getNewValue(this.currentInput, this.currentInput.value, key, true);
|
|
3273
3398
|
if (!isNaN(value) || value == '-') {
|
|
3274
3399
|
this.currentInput.value = value;
|
|
@@ -3281,9 +3406,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3281
3406
|
value: function renderToolbtn(mode, index) {
|
|
3282
3407
|
var _this7 = this;
|
|
3283
3408
|
|
|
3284
|
-
var _enumController$
|
|
3285
|
-
PayIcon = _enumController$
|
|
3286
|
-
PayStyle = _enumController$
|
|
3409
|
+
var _enumController$getEn33 = _mutantsUtil.enumController.getEnumOj(),
|
|
3410
|
+
PayIcon = _enumController$getEn33.PayIcon,
|
|
3411
|
+
PayStyle = _enumController$getEn33.PayStyle;
|
|
3287
3412
|
|
|
3288
3413
|
var isReturn = this.props.isReturn;
|
|
3289
3414
|
var _store = this.store,
|
|
@@ -3355,11 +3480,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3355
3480
|
value: function render() {
|
|
3356
3481
|
var _this8 = this;
|
|
3357
3482
|
|
|
3358
|
-
var _enumController$
|
|
3359
|
-
PayIcon = _enumController$
|
|
3360
|
-
PayIcon2 = _enumController$
|
|
3361
|
-
PayStyle = _enumController$
|
|
3362
|
-
Differentiate = _enumController$
|
|
3483
|
+
var _enumController$getEn34 = _mutantsUtil.enumController.getEnumOj(),
|
|
3484
|
+
PayIcon = _enumController$getEn34.PayIcon,
|
|
3485
|
+
PayIcon2 = _enumController$getEn34.PayIcon2,
|
|
3486
|
+
PayStyle = _enumController$getEn34.PayStyle,
|
|
3487
|
+
Differentiate = _enumController$getEn34.Differentiate;
|
|
3363
3488
|
|
|
3364
3489
|
var _state2 = this.state,
|
|
3365
3490
|
btnDissabled = _state2.btnDissabled,
|
|
@@ -3367,10 +3492,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3367
3492
|
discountTotalAmount = _state2.discountTotalAmount,
|
|
3368
3493
|
discountRetailTotalAount = _state2.discountRetailTotalAount,
|
|
3369
3494
|
discountPrototypeTotalAmount = _state2.discountPrototypeTotalAmount,
|
|
3370
|
-
storageValue = _state2.storageValue
|
|
3495
|
+
storageValue = _state2.storageValue,
|
|
3496
|
+
czkValue = _state2.czkValue,
|
|
3497
|
+
newPassConfirm = _state2.newPassConfirm,
|
|
3498
|
+
newPass = _state2.newPass;
|
|
3371
3499
|
|
|
3372
|
-
var
|
|
3373
|
-
isNewRetailBCPos =
|
|
3500
|
+
var _ref30 = _mutantsUtil.platform || {},
|
|
3501
|
+
isNewRetailBCPos = _ref30.isNewRetailBCPos;
|
|
3374
3502
|
|
|
3375
3503
|
var _store2 = this.store,
|
|
3376
3504
|
paymode = _store2.paymode,
|
|
@@ -3433,11 +3561,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3433
3561
|
quantity4 = 0;
|
|
3434
3562
|
var sumQuantity = 0; //数量总和的值,包括称重的。
|
|
3435
3563
|
|
|
3436
|
-
var
|
|
3437
|
-
|
|
3438
|
-
buyQuantity =
|
|
3439
|
-
|
|
3440
|
-
returnQuantity =
|
|
3564
|
+
var _ref31 = quantityDetail || {},
|
|
3565
|
+
_ref31$buyQuantity = _ref31.buyQuantity,
|
|
3566
|
+
buyQuantity = _ref31$buyQuantity === undefined ? 0 : _ref31$buyQuantity,
|
|
3567
|
+
_ref31$returnQuantity = _ref31.returnQuantity,
|
|
3568
|
+
returnQuantity = _ref31$returnQuantity === undefined ? 0 : _ref31$returnQuantity;
|
|
3441
3569
|
|
|
3442
3570
|
var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
|
|
3443
3571
|
quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
|
|
@@ -3455,7 +3583,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3455
3583
|
sumQuantity = this.changeDecimalBuZero(sumQuantity, quantityPrecision);
|
|
3456
3584
|
}
|
|
3457
3585
|
|
|
3458
|
-
var
|
|
3586
|
+
var themodeHyczk = thePaymodes.filter(function (mode) {
|
|
3587
|
+
return mode.paymentType === PayStyle.hyczk && mode.value !== '0.00';
|
|
3588
|
+
});
|
|
3459
3589
|
return _react2.default.createElement(
|
|
3460
3590
|
'div',
|
|
3461
3591
|
{ className: 'billingSettlement', ref: function ref(r) {
|
|
@@ -3661,13 +3791,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3661
3791
|
_react2.default.createElement(
|
|
3662
3792
|
'div',
|
|
3663
3793
|
{ 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
3794
|
_react2.default.createElement(
|
|
3672
3795
|
'div',
|
|
3673
3796
|
{ className: (0, _classnames4.default)({ "name": true }) },
|
|
@@ -3697,13 +3820,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3697
3820
|
}
|
|
3698
3821
|
})
|
|
3699
3822
|
),
|
|
3700
|
-
|
|
3701
|
-
'
|
|
3702
|
-
{ className: '
|
|
3703
|
-
|
|
3704
|
-
_this8.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
|
3823
|
+
_react2.default.createElement(
|
|
3824
|
+
'span',
|
|
3825
|
+
{ className: 'minus', onClick: function onClick() {
|
|
3826
|
+
_this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType);
|
|
3705
3827
|
} },
|
|
3706
|
-
_react2.default.createElement(_ticon2.default, { type: '
|
|
3828
|
+
_react2.default.createElement(_ticon2.default, { type: 'shanchu', className: 'minusIcon primary-color' })
|
|
3707
3829
|
)
|
|
3708
3830
|
),
|
|
3709
3831
|
mode.paymentType == PayStyle.djq ? _react2.default.createElement(
|
|
@@ -3730,7 +3852,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3730
3852
|
_react2.default.createElement(
|
|
3731
3853
|
'span',
|
|
3732
3854
|
{ className: 'fl' },
|
|
3733
|
-
|
|
3855
|
+
mode && mode.storageCardNo
|
|
3734
3856
|
),
|
|
3735
3857
|
_react2.default.createElement('br', null),
|
|
3736
3858
|
_react2.default.createElement(
|
|
@@ -3742,6 +3864,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3742
3864
|
'span',
|
|
3743
3865
|
{ className: 'fl' },
|
|
3744
3866
|
(0, _utils.getFixedNumber)(mode.balance)
|
|
3867
|
+
),
|
|
3868
|
+
_react2.default.createElement('br', null),
|
|
3869
|
+
themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === mode.paymethodId && !isReturn && _react2.default.createElement(
|
|
3870
|
+
_button2.default,
|
|
3871
|
+
{ onClick: function onClick() {
|
|
3872
|
+
_this8.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
|
3873
|
+
}, className: 'addCard btn-border-primary' },
|
|
3874
|
+
_react2.default.createElement(_ticon2.default, { type: 'jiahao', className: 'plus b-theme-color' }),
|
|
3875
|
+
_react2.default.createElement(
|
|
3876
|
+
'span',
|
|
3877
|
+
null,
|
|
3878
|
+
'\u6DFB\u52A0\u5361'
|
|
3879
|
+
)
|
|
3745
3880
|
)
|
|
3746
3881
|
)
|
|
3747
3882
|
);
|
|
@@ -4039,7 +4174,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4039
4174
|
// }
|
|
4040
4175
|
// }
|
|
4041
4176
|
// mode.paymentType == PayStyle.hyczk && czkinput && czkinput.value !== '0.00' ? this.editCzkModal() :
|
|
4042
|
-
|
|
4177
|
+
if (mode.paymentType == PayStyle.hyczk) {
|
|
4178
|
+
if (themodeHyczk && themodeHyczk.length === 0) {
|
|
4179
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4180
|
+
}
|
|
4181
|
+
} else {
|
|
4182
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4183
|
+
}
|
|
4043
4184
|
},
|
|
4044
4185
|
value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
|
|
4045
4186
|
return tm.paymentType == PayStyle.hyczk;
|
|
@@ -4092,7 +4233,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4092
4233
|
_react2.default.createElement(
|
|
4093
4234
|
'span',
|
|
4094
4235
|
null,
|
|
4095
|
-
|
|
4236
|
+
m && m.storageCardNo
|
|
4096
4237
|
),
|
|
4097
4238
|
_react2.default.createElement(
|
|
4098
4239
|
'span',
|
|
@@ -4103,6 +4244,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4103
4244
|
'span',
|
|
4104
4245
|
{ className: 'balance fr' },
|
|
4105
4246
|
'\u652F\u4ED8\u91D1\u989D\uFF1A'
|
|
4247
|
+
),
|
|
4248
|
+
_react2.default.createElement('br', null),
|
|
4249
|
+
themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === m.paymethodId && _react2.default.createElement(
|
|
4250
|
+
_button2.default,
|
|
4251
|
+
{ onClick: function onClick() {
|
|
4252
|
+
return _this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4253
|
+
}, className: 'addCard btn-border-primary' },
|
|
4254
|
+
_react2.default.createElement(_ticon2.default, { type: 'jiahao', className: 'plus b-theme-color' }),
|
|
4255
|
+
_react2.default.createElement(
|
|
4256
|
+
'span',
|
|
4257
|
+
null,
|
|
4258
|
+
'\u6DFB\u52A0\u5361'
|
|
4259
|
+
)
|
|
4106
4260
|
)
|
|
4107
4261
|
);
|
|
4108
4262
|
})
|
|
@@ -4262,14 +4416,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4262
4416
|
{ key: index + '', className: 'modeItem' },
|
|
4263
4417
|
_react2.default.createElement(
|
|
4264
4418
|
'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
|
-
),
|
|
4419
|
+
{ className: 'main b-theme-color ' + (currentIndex == index && 'settlement-pay-item-border') },
|
|
4273
4420
|
_react2.default.createElement(
|
|
4274
4421
|
'div',
|
|
4275
4422
|
{ className: (0, _classnames4.default)({ "name": true }) },
|
|
@@ -4294,13 +4441,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4294
4441
|
}
|
|
4295
4442
|
})
|
|
4296
4443
|
),
|
|
4297
|
-
|
|
4444
|
+
_react2.default.createElement(
|
|
4298
4445
|
'div',
|
|
4299
|
-
{ className: '
|
|
4300
|
-
|
|
4301
|
-
_this8.appendCzkmode('', 'noPlaySetPwd');
|
|
4446
|
+
{ className: 'minus', onClick: function onClick() {
|
|
4447
|
+
_this8.onDelPay(index);
|
|
4302
4448
|
} },
|
|
4303
|
-
_react2.default.createElement(_ticon2.default, { type: '
|
|
4449
|
+
_react2.default.createElement(_ticon2.default, { type: 'shanchu', className: 'minusIcon primary-color' })
|
|
4304
4450
|
)
|
|
4305
4451
|
),
|
|
4306
4452
|
mode.paymentType == PayStyle.djq ? _react2.default.createElement(
|
|
@@ -4327,7 +4473,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4327
4473
|
_react2.default.createElement(
|
|
4328
4474
|
'span',
|
|
4329
4475
|
{ className: 'fl' },
|
|
4330
|
-
|
|
4476
|
+
mode && mode.storageCardNo
|
|
4331
4477
|
),
|
|
4332
4478
|
_react2.default.createElement('br', null),
|
|
4333
4479
|
_react2.default.createElement(
|
|
@@ -4516,7 +4662,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4516
4662
|
_react2.default.createElement(
|
|
4517
4663
|
'div',
|
|
4518
4664
|
{ className: (0, _classnames4.default)({ "main": true, "focusbottom": currentIndex == index }) },
|
|
4519
|
-
_react2.default.createElement('div', { className: 'lefticon' }),
|
|
4520
4665
|
_react2.default.createElement(
|
|
4521
4666
|
'div',
|
|
4522
4667
|
{ className: (0, _classnames4.default)({ "name": true }) },
|
|
@@ -4651,7 +4796,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4651
4796
|
visible: this.state.czkVisible,
|
|
4652
4797
|
maskClosable: false,
|
|
4653
4798
|
destroyOnClose: true,
|
|
4654
|
-
title: "
|
|
4799
|
+
title: "储值结算",
|
|
4655
4800
|
onCancel: this.handleCzkCancel,
|
|
4656
4801
|
keyboard: false,
|
|
4657
4802
|
centered: !this.isHorizontalPad ? true : false,
|
|
@@ -4682,7 +4827,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4682
4827
|
_react2.default.createElement(
|
|
4683
4828
|
'div',
|
|
4684
4829
|
{ className: 'value valuetext' },
|
|
4685
|
-
currentMode && currentMode.member.type || '普通'
|
|
4830
|
+
currentMode && currentMode.member && currentMode.member.type || '普通'
|
|
4686
4831
|
),
|
|
4687
4832
|
_react2.default.createElement(
|
|
4688
4833
|
'div',
|
|
@@ -4703,7 +4848,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4703
4848
|
_react2.default.createElement(
|
|
4704
4849
|
'div',
|
|
4705
4850
|
{ className: 'value' },
|
|
4706
|
-
currentMode && (0, _utils.getFixedNumber)(currentMode.
|
|
4851
|
+
currentMode && (0, _utils.getFixedNumber)(currentMode.balance)
|
|
4707
4852
|
),
|
|
4708
4853
|
_react2.default.createElement(
|
|
4709
4854
|
'div',
|
|
@@ -4724,7 +4869,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4724
4869
|
_react2.default.createElement(
|
|
4725
4870
|
'div',
|
|
4726
4871
|
{ className: 'value' },
|
|
4727
|
-
currentMode && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.
|
|
4872
|
+
currentMode && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.balance)))
|
|
4728
4873
|
),
|
|
4729
4874
|
_react2.default.createElement(
|
|
4730
4875
|
'div',
|
|
@@ -4739,29 +4884,83 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4739
4884
|
_react2.default.createElement(
|
|
4740
4885
|
'span',
|
|
4741
4886
|
null,
|
|
4742
|
-
'\
|
|
4887
|
+
'\u50A8\u503C\u5361\u53F7\uFF1A'
|
|
4743
4888
|
),
|
|
4744
4889
|
_react2.default.createElement(
|
|
4745
4890
|
'span',
|
|
4746
4891
|
null,
|
|
4747
4892
|
_react2.default.createElement(_input2.default, {
|
|
4748
4893
|
type: 'text',
|
|
4749
|
-
placeholder: '\u8BF7\u626B\u63CF\u6216\u8F93\u5165\
|
|
4750
|
-
|
|
4751
|
-
, className: 'input ' + (this.hasElectron === true && this.iCCardServer === 1 || this.isHorizontalPad === true ? 'temp' : ''),
|
|
4894
|
+
placeholder: '\u8BF7\u626B\u63CF\u6216\u8F93\u5165\u624B\u673A\u53F7/\u50A8\u503C\u5361\u53F7',
|
|
4895
|
+
className: 'input ' + (this.hasElectron === true && this.iCCardServer === 1 || this.isHorizontalPad === true ? 'temp' : ''),
|
|
4752
4896
|
onChange: function onChange(e) {
|
|
4753
4897
|
return _this8.onCzkChange(e.target.value);
|
|
4754
4898
|
},
|
|
4755
|
-
defaultValue:
|
|
4756
|
-
value:
|
|
4899
|
+
defaultValue: currentMode && currentMode.storageCardNo,
|
|
4900
|
+
value: czkValue,
|
|
4757
4901
|
ref: function ref(input) {
|
|
4758
4902
|
return _this8.czkInput = input;
|
|
4759
4903
|
},
|
|
4760
|
-
onKeyDown: function
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4904
|
+
onKeyDown: function () {
|
|
4905
|
+
var _ref32 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(e) {
|
|
4906
|
+
var time, _paymode;
|
|
4907
|
+
|
|
4908
|
+
return _regenerator2.default.wrap(function _callee16$(_context16) {
|
|
4909
|
+
while (1) {
|
|
4910
|
+
switch (_context16.prev = _context16.next) {
|
|
4911
|
+
case 0:
|
|
4912
|
+
if (!(e.keyCode == 13)) {
|
|
4913
|
+
_context16.next = 14;
|
|
4914
|
+
break;
|
|
4915
|
+
}
|
|
4916
|
+
|
|
4917
|
+
time = Date.parse(new Date());
|
|
4918
|
+
|
|
4919
|
+
if (!(_this8.isStorageCardInputType && time - _this8.keypressStime > 350)) {
|
|
4920
|
+
_context16.next = 7;
|
|
4921
|
+
break;
|
|
4922
|
+
}
|
|
4923
|
+
|
|
4924
|
+
_message2.default.warn('储值卡不可键盘录入,请刷卡!');
|
|
4925
|
+
_this8.keypressStime = null;
|
|
4926
|
+
_this8.setState({
|
|
4927
|
+
czkValue: null
|
|
4928
|
+
});
|
|
4929
|
+
return _context16.abrupt('return');
|
|
4930
|
+
|
|
4931
|
+
case 7:
|
|
4932
|
+
_this8.keypressStime = null;
|
|
4933
|
+
_context16.next = 10;
|
|
4934
|
+
return _this8.loadCzk(e.target.value);
|
|
4935
|
+
|
|
4936
|
+
case 10:
|
|
4937
|
+
_paymode = _this8.store.paymode;
|
|
4938
|
+
|
|
4939
|
+
if (!_paymode.currentMode.storageCardNo) {
|
|
4940
|
+
_this8.setState({
|
|
4941
|
+
czkvalue: null
|
|
4942
|
+
});
|
|
4943
|
+
}
|
|
4944
|
+
_context16.next = 15;
|
|
4945
|
+
break;
|
|
4946
|
+
|
|
4947
|
+
case 14:
|
|
4948
|
+
if (!_this8.keypressStime && e.keyCode !== 8) {
|
|
4949
|
+
_this8.keypressStime = Date.parse(new Date());
|
|
4950
|
+
}
|
|
4951
|
+
|
|
4952
|
+
case 15:
|
|
4953
|
+
case 'end':
|
|
4954
|
+
return _context16.stop();
|
|
4955
|
+
}
|
|
4956
|
+
}
|
|
4957
|
+
}, _callee16, _this8);
|
|
4958
|
+
}));
|
|
4959
|
+
|
|
4960
|
+
return function (_x11) {
|
|
4961
|
+
return _ref32.apply(this, arguments);
|
|
4962
|
+
};
|
|
4963
|
+
}(),
|
|
4765
4964
|
onFocus: function onFocus(e) {
|
|
4766
4965
|
_this8.inputTarget = _this8.czkInput.input;
|
|
4767
4966
|
!_this8.state.prototypeVisible && _keyboard2.default.open(function (v) {
|
|
@@ -4813,22 +5012,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4813
5012
|
className: _index.hotKey.hotKeyNotFilter('input'),
|
|
4814
5013
|
value: storageValue,
|
|
4815
5014
|
onChange: function onChange(event) {
|
|
4816
|
-
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.
|
|
5015
|
+
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.balance));
|
|
4817
5016
|
},
|
|
4818
|
-
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.
|
|
4819
|
-
ref: function ref(
|
|
4820
|
-
return _this8["inputCzkAmount"] =
|
|
5017
|
+
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)),
|
|
5018
|
+
ref: function ref(_ref33) {
|
|
5019
|
+
return _this8["inputCzkAmount"] = _ref33;
|
|
4821
5020
|
},
|
|
4822
5021
|
onFocus: function onFocus(e) {
|
|
4823
5022
|
_this8.inputkey = "inputCzkAmount";
|
|
4824
5023
|
_keyboard2.default.open(function (v) {
|
|
4825
5024
|
var value = _keyboard2.default.getNewValue(_this8[_this8.inputkey].input, _this8[_this8.inputkey].input.value, v);
|
|
4826
|
-
_this8.setCurrentModeValue(value, Math.min(currentMode.maxamount, currentMode.
|
|
5025
|
+
_this8.setCurrentModeValue(value, Math.min(currentMode.maxamount, currentMode.balance));
|
|
4827
5026
|
}, _this8.keyboardOnOk, _this8.keyboardOnClose)();
|
|
4828
5027
|
},
|
|
4829
5028
|
onBlur: function onBlur(e) {
|
|
4830
5029
|
_keyboard2.default.close();
|
|
4831
|
-
_this8.setCurrentModeValue((0, _utils.getFixedNumber)(_this8.inputCzkAmount.input.value), Math.min(currentMode.maxamount, currentMode.
|
|
5030
|
+
_this8.setCurrentModeValue((0, _utils.getFixedNumber)(_this8.inputCzkAmount.input.value), Math.min(currentMode.maxamount, currentMode.balance));
|
|
4832
5031
|
}
|
|
4833
5032
|
})
|
|
4834
5033
|
)
|
|
@@ -4866,6 +5065,47 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4866
5065
|
)
|
|
4867
5066
|
)
|
|
4868
5067
|
),
|
|
5068
|
+
_react2.default.createElement(
|
|
5069
|
+
_modal2.default,
|
|
5070
|
+
{
|
|
5071
|
+
wrapClassName: _index.hotKey.hotKeyBindClass('5', 'moreCzkModal') + ' ' + (this.isHorizontalPad ? 'extraHeight' : ''),
|
|
5072
|
+
width: '400px',
|
|
5073
|
+
visible: this.state.moreCzkVisible,
|
|
5074
|
+
maskClosable: false,
|
|
5075
|
+
destroyOnClose: true,
|
|
5076
|
+
title: "储值结算",
|
|
5077
|
+
onCancel: this.handleMoreCzkCancel,
|
|
5078
|
+
keyboard: false,
|
|
5079
|
+
centered: !this.isHorizontalPad ? true : false,
|
|
5080
|
+
footer: _react2.default.createElement(
|
|
5081
|
+
'div',
|
|
5082
|
+
{ className: 'action' },
|
|
5083
|
+
_react2.default.createElement(
|
|
5084
|
+
'span',
|
|
5085
|
+
{ className: 'showUseCard' },
|
|
5086
|
+
'\u4EC5\u5217\u793A\u53EF\u7528\u7684\u50A8\u503C\u5361'
|
|
5087
|
+
),
|
|
5088
|
+
_react2.default.createElement(
|
|
5089
|
+
_button2.default,
|
|
5090
|
+
{ onClick: this.handleMoreCzkCancel },
|
|
5091
|
+
'\u53D6\u6D88'
|
|
5092
|
+
),
|
|
5093
|
+
_react2.default.createElement(
|
|
5094
|
+
_button2.default,
|
|
5095
|
+
{ type: 'primary', onClick: this.handleMoreCzkOk },
|
|
5096
|
+
'\u786E\u5B9A'
|
|
5097
|
+
)
|
|
5098
|
+
)
|
|
5099
|
+
},
|
|
5100
|
+
_react2.default.createElement(
|
|
5101
|
+
'div',
|
|
5102
|
+
null,
|
|
5103
|
+
_react2.default.createElement(_moreCzkTable2.default, {
|
|
5104
|
+
setMoreCzkIndex: this.setMoreCzkIndex,
|
|
5105
|
+
selectedRowIndex: this.state.selectedRowIndex,
|
|
5106
|
+
dataSource: this.state.memberdata1 })
|
|
5107
|
+
)
|
|
5108
|
+
),
|
|
4869
5109
|
_react2.default.createElement(
|
|
4870
5110
|
_modal2.default,
|
|
4871
5111
|
(0, _defineProperty3.default)({
|
|
@@ -4889,7 +5129,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4889
5129
|
),
|
|
4890
5130
|
_react2.default.createElement(
|
|
4891
5131
|
_button2.default,
|
|
4892
|
-
{ type: 'primary', disabled:
|
|
5132
|
+
{ type: 'primary', disabled: btnDissabled, onClick: this.handleSetModal },
|
|
4893
5133
|
'\u786E\u5B9A'
|
|
4894
5134
|
)
|
|
4895
5135
|
)),
|
|
@@ -4907,21 +5147,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4907
5147
|
_react2.default.createElement(
|
|
4908
5148
|
'div',
|
|
4909
5149
|
{ className: 'two' },
|
|
4910
|
-
_react2.default.createElement(
|
|
5150
|
+
_react2.default.createElement(_input2.default.Password, {
|
|
4911
5151
|
className: 'content',
|
|
4912
|
-
newType: 'positive',
|
|
4913
|
-
bordered: true,
|
|
4914
5152
|
placeholder: '\u8BF7\u8F93\u51656\u4F4D\u6570\u5B57\u5BC6\u7801',
|
|
4915
5153
|
style: { width: 266, height: 32 },
|
|
4916
5154
|
maxLength: 6,
|
|
5155
|
+
value: newPass,
|
|
4917
5156
|
ref: function ref(input) {
|
|
4918
5157
|
return _this8.inputNewAmount = input;
|
|
4919
5158
|
},
|
|
4920
5159
|
onChange: function onChange(value) {
|
|
4921
|
-
return _this8.setPwdValue('newPass', value);
|
|
5160
|
+
return _this8.setPwdValue('newPass', value.target.value);
|
|
4922
5161
|
},
|
|
4923
5162
|
onBlur: function onBlur(value) {
|
|
4924
5163
|
return _this8.handleBlur('newPass');
|
|
5164
|
+
},
|
|
5165
|
+
onPressEnter: function onPressEnter() {
|
|
5166
|
+
return _this8.onPressEnterCzk('newPass');
|
|
4925
5167
|
}
|
|
4926
5168
|
})
|
|
4927
5169
|
)
|
|
@@ -4937,21 +5179,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4937
5179
|
_react2.default.createElement(
|
|
4938
5180
|
'div',
|
|
4939
5181
|
{ className: 'two' },
|
|
4940
|
-
_react2.default.createElement(
|
|
5182
|
+
_react2.default.createElement(_input2.default.Password, {
|
|
4941
5183
|
className: 'content',
|
|
4942
|
-
newType: 'positive',
|
|
4943
|
-
bordered: true,
|
|
4944
5184
|
placeholder: '\u8BF7\u786E\u8BA46\u4F4D\u6570\u5B57\u5BC6\u7801',
|
|
4945
5185
|
style: { width: 266, height: 32 },
|
|
4946
5186
|
maxLength: 6,
|
|
5187
|
+
value: newPassConfirm,
|
|
4947
5188
|
ref: function ref(input) {
|
|
4948
5189
|
return _this8.inputConfirmAmount = input;
|
|
4949
5190
|
},
|
|
4950
5191
|
onChange: function onChange(value) {
|
|
4951
|
-
return _this8.setPwdValue('newPassConfirm', value);
|
|
5192
|
+
return _this8.setPwdValue('newPassConfirm', value.target.value);
|
|
4952
5193
|
},
|
|
4953
5194
|
onBlur: function onBlur(value) {
|
|
4954
5195
|
return _this8.handleBlur('newPassConfirm');
|
|
5196
|
+
},
|
|
5197
|
+
onPressEnter: function onPressEnter() {
|
|
5198
|
+
return _this8.onPressEnterCzk('newPassConfirm');
|
|
4955
5199
|
}
|
|
4956
5200
|
})
|
|
4957
5201
|
)
|
|
@@ -5070,7 +5314,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5070
5314
|
_react2.default.createElement(
|
|
5071
5315
|
'div',
|
|
5072
5316
|
{ className: 'djq2' },
|
|
5073
|
-
(0, _map3.default)(currentMode
|
|
5317
|
+
currentMode && currentMode.djqs && currentMode.djqs.length > 0 ? (0, _map3.default)(currentMode.djqs || [], function (q, index) {
|
|
5074
5318
|
if (!_this8.state.couponLight && !q.count) {
|
|
5075
5319
|
return;
|
|
5076
5320
|
}
|
|
@@ -5089,7 +5333,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5089
5333
|
_react2.default.createElement(
|
|
5090
5334
|
'span',
|
|
5091
5335
|
null,
|
|
5092
|
-
q.
|
|
5336
|
+
q.nominalAmount
|
|
5093
5337
|
),
|
|
5094
5338
|
_react2.default.createElement(
|
|
5095
5339
|
'span',
|
|
@@ -5180,7 +5424,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5180
5424
|
_react2.default.createElement('div', { className: 'point_top' }),
|
|
5181
5425
|
_react2.default.createElement('div', { className: 'point_bottom' })
|
|
5182
5426
|
);
|
|
5183
|
-
})
|
|
5427
|
+
}) : _react2.default.createElement(_tplusComponentsTouch.ProgressState, {
|
|
5428
|
+
state: "empty",
|
|
5429
|
+
stateCommonStyle: { 'paddingTop': "30px", backgroundColor: 'transparent' },
|
|
5430
|
+
empty: { buttonVisible: false, imgStyle: { width: '120px', height: '120px' } } })
|
|
5184
5431
|
)
|
|
5185
5432
|
),
|
|
5186
5433
|
currentMode && !currentMode.boriginReturn && _react2.default.createElement(
|
|
@@ -5316,7 +5563,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5316
5563
|
_react2.default.createElement(
|
|
5317
5564
|
'div',
|
|
5318
5565
|
{ className: 'value valuetext' },
|
|
5319
|
-
currentMode && currentMode.member.type || '普通'
|
|
5566
|
+
currentMode && currentMode.member && currentMode.member.type || '普通'
|
|
5320
5567
|
),
|
|
5321
5568
|
_react2.default.createElement(
|
|
5322
5569
|
'div',
|
|
@@ -5337,7 +5584,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5337
5584
|
_react2.default.createElement(
|
|
5338
5585
|
'div',
|
|
5339
5586
|
{ className: 'value' },
|
|
5340
|
-
currentMode && currentMode.member.bonusPoints
|
|
5587
|
+
currentMode && currentMode.member && currentMode.member.bonusPoints
|
|
5341
5588
|
),
|
|
5342
5589
|
_react2.default.createElement(
|
|
5343
5590
|
'div',
|
|
@@ -5358,7 +5605,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5358
5605
|
_react2.default.createElement(
|
|
5359
5606
|
'div',
|
|
5360
5607
|
{ className: 'value' },
|
|
5361
|
-
currentMode && (0, _utils.getFixedNumber)(currentMode.member.exchangable)
|
|
5608
|
+
currentMode && currentMode.member && (0, _utils.getFixedNumber)(currentMode.member.exchangable)
|
|
5362
5609
|
),
|
|
5363
5610
|
_react2.default.createElement(
|
|
5364
5611
|
'div',
|
|
@@ -5379,7 +5626,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5379
5626
|
_react2.default.createElement(
|
|
5380
5627
|
'div',
|
|
5381
5628
|
{ className: 'value' },
|
|
5382
|
-
currentMode && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.member.exchangable)))
|
|
5629
|
+
currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.member.exchangable)))
|
|
5383
5630
|
),
|
|
5384
5631
|
_react2.default.createElement(
|
|
5385
5632
|
'div',
|
|
@@ -5399,7 +5646,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5399
5646
|
_react2.default.createElement(
|
|
5400
5647
|
'span',
|
|
5401
5648
|
{ className: 'notext' },
|
|
5402
|
-
currentMode && currentMode.member.cardNo
|
|
5649
|
+
currentMode && currentMode.member && currentMode.member.cardNo
|
|
5403
5650
|
)
|
|
5404
5651
|
),
|
|
5405
5652
|
_react2.default.createElement(
|
|
@@ -5430,12 +5677,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5430
5677
|
_react2.default.createElement(_input2.default, {
|
|
5431
5678
|
className: _index.hotKey.hotKeyNotFilter('input'),
|
|
5432
5679
|
type: 'text',
|
|
5680
|
+
value: storageValue,
|
|
5433
5681
|
onChange: function onChange(e) {
|
|
5434
5682
|
_this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
5435
5683
|
},
|
|
5436
|
-
defaultValue: currentMode && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
|
5437
|
-
ref: function ref(
|
|
5438
|
-
return _this8["inputJfdxAmount"] =
|
|
5684
|
+
defaultValue: currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
|
5685
|
+
ref: function ref(_ref34) {
|
|
5686
|
+
return _this8["inputJfdxAmount"] = _ref34;
|
|
5439
5687
|
},
|
|
5440
5688
|
onFocus: function onFocus(e) {
|
|
5441
5689
|
_this8.inputkey = "inputJfdxAmount";
|