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