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