tplus-components-touch 3.26.7 → 3.27.3
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/README.md +16 -16
- package/dist/components/acCitySelect/CitySelect.js +18 -18
- package/dist/components/acCitySelect/CitySelect.js.map +1 -1
- package/dist/components/acCitySelect/CitySelect.less +9 -9
- package/dist/components/acCitySelect/citys.js.map +1 -1
- package/dist/components/acCitySelect/index.js.map +1 -1
- package/dist/components/acCitySelect/provinceData.js +7 -7
- package/dist/components/acCitySelect/provinceData.js.map +1 -1
- package/dist/components/addLog/AddLogProcessor.js +6 -6
- package/dist/components/addLog/AddLogProcessor.js.map +1 -1
- package/dist/components/addLog/OperationLogApi.js +3 -3
- package/dist/components/addLog/OperationLogApi.js.map +1 -1
- package/dist/components/autoComplete/index.js +14 -14
- package/dist/components/autoComplete/index.js.map +1 -1
- package/dist/components/autoComplete/index.less +89 -89
- package/dist/components/autoComplete/option.js.map +1 -1
- package/dist/components/autoCompleteWithKeyboard/index.js +14 -14
- package/dist/components/autoCompleteWithKeyboard/index.js.map +1 -1
- package/dist/components/autoCompleteWithKeyboard/index.less +7 -7
- package/dist/components/billSearch/api.js +98 -37
- package/dist/components/billSearch/api.js.map +1 -1
- package/dist/components/billSearch/index.js +6 -6
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/billSearch/index.less +373 -373
- package/dist/components/cloudPrint/BTPrintFormatUtil.js +17 -17
- package/dist/components/cloudPrint/BTPrintFormatUtil.js.map +1 -1
- package/dist/components/cloudPrint/api.js.map +1 -1
- package/dist/components/cloudPrint/index.js.map +1 -1
- package/dist/components/cloudPrint/printDispatch.js +7 -7
- package/dist/components/cloudPrint/printDispatch.js.map +1 -1
- package/dist/components/commonForm/addressPicker/index.js +23 -14
- package/dist/components/commonForm/addressPicker/index.js.map +1 -1
- package/dist/components/commonForm/addressPicker/style.less +10 -10
- package/dist/components/commonForm/autoComplete/index.js.map +1 -1
- package/dist/components/commonForm/autoComplete/style.less +2 -2
- package/dist/components/commonForm/datePicker/index.js.map +1 -1
- package/dist/components/commonForm/datePicker/style.less +4 -4
- package/dist/components/commonForm/formControl/index.js.map +1 -1
- package/dist/components/commonForm/index.js +13 -7
- package/dist/components/commonForm/index.js.map +1 -1
- package/dist/components/commonForm/inputNumber/index.js.map +1 -1
- package/dist/components/commonForm/inputNumber/style.less +10 -10
- package/dist/components/commonForm/radio/index.js.map +1 -1
- package/dist/components/commonForm/style.less +1 -1
- package/dist/components/deliverySearch/api.js +21 -21
- package/dist/components/deliverySearch/api.js.map +1 -1
- package/dist/components/deliverySearch/index.js +6 -6
- package/dist/components/deliverySearch/index.js.map +1 -1
- package/dist/components/deliverySearch/index.less +553 -553
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/hardwareAPI/index.js.map +1 -1
- package/dist/components/hotKey/config.js +23 -23
- package/dist/components/hotKey/config.js.map +1 -1
- package/dist/components/hotKey/hotKeyModal.js.map +1 -1
- package/dist/components/hotKey/index.js +26 -26
- package/dist/components/hotKey/index.js.map +1 -1
- package/dist/components/hotKey/localConfig.js +66 -133
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/hotKey/style.less +96 -96
- package/dist/components/hotKey/utils.js.map +1 -1
- package/dist/components/input/index.js +6 -6
- package/dist/components/input/index.js.map +1 -1
- package/dist/components/input/style.less +99 -99
- package/dist/components/input/tplusInput/index.js +30 -30
- package/dist/components/input/tplusInput/index.js.map +1 -1
- package/dist/components/input/tplusInput/inputContent.js.map +1 -1
- package/dist/components/input/tplusInput/inputs.js.map +1 -1
- package/dist/components/input/tplusInput/style.less +132 -132
- package/dist/components/input/utils/index.js.map +1 -1
- package/dist/components/inventorySearch/api.js +58 -58
- package/dist/components/inventorySearch/api.js.map +1 -1
- package/dist/components/inventorySearch/index.js +3 -3
- package/dist/components/inventorySearch/index.js.map +1 -1
- package/dist/components/inventorySearch/index.less +119 -119
- package/dist/components/inventorySearch/store.js.map +1 -1
- package/dist/components/inventorySearch/tab.js.map +1 -1
- package/dist/components/keyboard/index.js.map +1 -1
- package/dist/components/keyboard/index.less +469 -469
- package/dist/components/keyboard/letterKeyboard.js +2 -2
- package/dist/components/keyboard/letterKeyboard.js.map +1 -1
- package/dist/components/keyboard/numKeyboard.js +4 -4
- package/dist/components/keyboard/numKeyboard.js.map +1 -1
- package/dist/components/keyboard/numKeyboardScan.js.map +1 -1
- package/dist/components/keyboard/numberButton_input.js +5 -5
- package/dist/components/keyboard/numberButton_input.js.map +1 -1
- package/dist/components/keyboard/numkeyboardPassword.js +4 -4
- package/dist/components/keyboard/numkeyboardPassword.js.map +1 -1
- package/dist/components/keyboard/onlyKeyboard.js +7 -7
- package/dist/components/keyboard/onlyKeyboard.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton.js +2 -2
- package/dist/components/keyboard/onlyLetterButton.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton2.js +2 -2
- package/dist/components/keyboard/onlyLetterButton2.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton2.less +161 -161
- package/dist/components/keyboard/onlyNumberButton.js +2 -2
- package/dist/components/keyboard/onlyNumberButton.js.map +1 -1
- package/dist/components/keyboard/onlyNumberButton2.js +3 -3
- package/dist/components/keyboard/onlyNumberButton2.js.map +1 -1
- package/dist/components/keyboard/textKeyboard.js.map +1 -1
- package/dist/components/layout/hamburger.js.map +1 -1
- package/dist/components/layout/index.js +10 -10
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/layout.js.map +1 -1
- package/dist/components/layout/sider.js +12 -12
- package/dist/components/layout/sider.js.map +1 -1
- package/dist/components/layout/style.less +82 -82
- package/dist/components/loading/index.js +15 -15
- package/dist/components/loading/index.js.map +1 -1
- package/dist/components/loading/loadingContent.js.map +1 -1
- package/dist/components/loading/style.less +61 -61
- package/dist/components/loading/utils.js.map +1 -1
- package/dist/components/message/index.js +8 -8
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/message/index.less +101 -101
- package/dist/components/modal/index.js.map +1 -1
- package/dist/components/modal/index.less +19 -19
- package/dist/components/modalVertical/index.js +7 -7
- package/dist/components/modalVertical/index.js.map +1 -1
- package/dist/components/modalVertical/style.less +60 -60
- package/dist/components/modalWraper/index.js +15 -15
- package/dist/components/modalWraper/index.js.map +1 -1
- package/dist/components/modalWraper/style.less +257 -257
- package/dist/components/modalWraper/utils.js.map +1 -1
- package/dist/components/notification/index.js +4 -4
- package/dist/components/notification/index.js.map +1 -1
- package/dist/components/notification/index.less +51 -51
- package/dist/components/overflowTip/index.js +15 -15
- package/dist/components/overflowTip/index.js.map +1 -1
- package/dist/components/overflowTip/style.less +66 -66
- package/dist/components/page/index.js.map +1 -1
- package/dist/components/page/index.less +21 -21
- package/dist/components/presale/pickup.js +419 -0
- package/dist/components/presale/pickup.js.map +1 -0
- package/dist/components/presale/style.less +48 -0
- package/dist/components/product/detail.js +7 -7
- package/dist/components/product/detail.js.map +1 -1
- package/dist/components/product/getCard.js +5 -5
- package/dist/components/product/getCard.js.map +1 -1
- package/dist/components/product/index.less +128 -128
- package/dist/components/progressState/EmptyAndErrorView.js.map +1 -1
- package/dist/components/progressState/ProgressState.js +10 -10
- package/dist/components/progressState/ProgressState.js.map +1 -1
- package/dist/components/progressState/index.js.map +1 -1
- package/dist/components/progressState/style.less +65 -65
- package/dist/components/scan/index.js.map +1 -1
- package/dist/components/scan/index.less +33 -33
- package/dist/components/select/index.js.map +1 -1
- package/dist/components/select/index.less +11 -11
- package/dist/components/settlement/asyncModal.js.map +1 -1
- package/dist/components/settlement/index.js.map +1 -1
- package/dist/components/settlement/prototypeTable/index.js.map +1 -1
- package/dist/components/settlement/prototypeTable/style.less +58 -58
- package/dist/components/settlement/prototypeTable/utils.js.map +1 -1
- package/dist/components/settlement/settlement.js +677 -639
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +1600 -1646
- package/dist/components/settlement/settlementStore.js +316 -431
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/settlement/utils.js.map +1 -1
- package/dist/components/socket/index.js +11 -11
- package/dist/components/socket/index.js.map +1 -1
- package/dist/components/spin/index.js +6 -6
- package/dist/components/spin/index.js.map +1 -1
- package/dist/components/spin/spin-style.less +436 -436
- package/dist/components/test/index.js +3 -3
- package/dist/components/test/index.js.map +1 -1
- package/dist/components/ticon/iconfont/demo.css +539 -539
- package/dist/components/ticon/iconfont/demo_index.html +5225 -5248
- package/dist/components/ticon/iconfont/iconfont.css +891 -895
- 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 +1542 -1549
- package/dist/components/ticon/iconfont/iconfont.svg +593 -593
- 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/ticon/index.js.map +1 -1
- package/dist/components/touchScroll/index.js +9 -9
- package/dist/components/touchScroll/index.js.map +1 -1
- package/dist/components/touchTable/AuthProcess.js.map +1 -1
- package/dist/components/touchTable/generateWater.js.map +1 -1
- package/dist/components/touchTable/index.js +18 -9
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/components/touchTable/index.less +369 -369
- package/dist/components/touchTable/utils.js.map +1 -1
- package/dist/demo/PopOverDemo.js.map +1 -1
- package/dist/index.js +13 -8
- package/dist/index.js.map +1 -1
- package/dist/util/tools.js.map +1 -1
- package/locales/zh/tplus-components-touch.json +1 -1
- package/locales/zh-CN/tplus-components-touch.json +1 -1
- package/mocks/memberInfo.json +79 -79
- package/package.json +2 -2
- package/tsconfig.json +26 -26
|
@@ -24,6 +24,10 @@ var _carousel = require('antd/es/carousel');
|
|
|
24
24
|
|
|
25
25
|
var _carousel2 = _interopRequireDefault(_carousel);
|
|
26
26
|
|
|
27
|
+
var _keys = require('babel-runtime/core-js/object/keys');
|
|
28
|
+
|
|
29
|
+
var _keys2 = _interopRequireDefault(_keys);
|
|
30
|
+
|
|
27
31
|
var _button = require('antd/es/button');
|
|
28
32
|
|
|
29
33
|
var _button2 = _interopRequireDefault(_button);
|
|
@@ -253,8 +257,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
253
257
|
currentKey: null,
|
|
254
258
|
couponLight: true,
|
|
255
259
|
storageValue: '0.00',
|
|
256
|
-
czkValue: null
|
|
257
|
-
isInputMember: false };
|
|
260
|
+
czkValue: null };
|
|
258
261
|
_this2.compoundHotkeysList = (window.$.operationControl[5] ? window.$.operationControl[5].control || [] : []).map(function (key) {
|
|
259
262
|
return key.toLocaleUpperCase();
|
|
260
263
|
});
|
|
@@ -301,12 +304,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
301
304
|
_this2.inputkey = "inputJfdxAmount";
|
|
302
305
|
_this2["inputJfdxAmount"].input.value = currentMode && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable));
|
|
303
306
|
_this2.setCurrentModeValue(_this2.inputJfdxAmount.input.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
304
|
-
} else if (_this2.state.czkVisible && currentMode && currentMode.value >= 0 && currentMode.balance !== undefined) {
|
|
307
|
+
} else if (_this2.state.czkVisible && currentMode && currentMode.value >= 0 && currentMode.member.balance !== undefined) {
|
|
305
308
|
_this2.inputkey = "inputCzkAmount";
|
|
306
|
-
_this2["inputCzkAmount"] && _this2["inputCzkAmount"].input && (_this2["inputCzkAmount"].input.value = (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)));
|
|
307
|
-
var maxamount = Math.min(currentMode.maxamount, currentMode.balance);
|
|
309
|
+
_this2["inputCzkAmount"] && _this2["inputCzkAmount"].input && (_this2["inputCzkAmount"].input.value = (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.balance)));
|
|
310
|
+
var maxamount = Math.min(currentMode.maxamount, currentMode.member.balance);
|
|
308
311
|
_this2.inputCzkAmount && _this2.inputCzkAmount.input && _this2.setCurrentModeValue(_this2.inputCzkAmount.input.value, maxamount);
|
|
309
|
-
if (_this2.store.bquick && currentMode.
|
|
312
|
+
if (_this2.store.bquick && currentMode.member.id && parseFloat(_this2.store.paymode.amount) > parseFloat(maxamount)) {
|
|
310
313
|
_message2.default.error("本单最大可用储值卡结算金额为:" + (0, _utils.getFixedNumber)(maxamount) + ",请使用复合结算!", {
|
|
311
314
|
duration: 4
|
|
312
315
|
});
|
|
@@ -554,185 +557,164 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
554
557
|
});
|
|
555
558
|
};
|
|
556
559
|
|
|
557
|
-
_this2.showCzkModal = function () {
|
|
558
|
-
var
|
|
559
|
-
|
|
560
|
+
_this2.showCzkModal = function (id, append, params) {
|
|
561
|
+
var _enumController$getEn2 = _mutantsUtil.enumController.getEnumOj(),
|
|
562
|
+
PayStyle = _enumController$getEn2.PayStyle;
|
|
563
|
+
|
|
564
|
+
var _ref = _mutantsUtil.platform || {},
|
|
565
|
+
isNewRetailBCPos = _ref.isNewRetailBCPos;
|
|
566
|
+
|
|
567
|
+
_this2.store.setCurrentMode(id, PayStyle.hyczk, append);
|
|
568
|
+
_this2._val = _this2.store.paymode.currentMode.value;
|
|
569
|
+
var currentMode = _this2.store.paymode.currentMode;
|
|
570
|
+
|
|
571
|
+
var maxamount = Math.min(currentMode.maxamount, currentMode.member.balance);
|
|
572
|
+
if (_this2.store.bquick && currentMode.member.id && parseFloat(_this2.store.paymode.amount) > parseFloat(maxamount)) {
|
|
573
|
+
_message2.default.error("本单最大可用储值卡结算金额为:" + (0, _utils.getFixedNumber)(maxamount) + ",请使用复合结算!", {
|
|
574
|
+
duration: 4
|
|
575
|
+
});
|
|
576
|
+
} else {
|
|
577
|
+
// if (isNewRetailBCPos) {
|
|
578
|
+
// let { isReturn } = this.props;
|
|
579
|
+
// let sMember = this.store.member;
|
|
580
|
+
// if (!sMember.StorageCardEnable) {
|
|
581
|
+
// Message.warn("该储值卡已停用");
|
|
582
|
+
// return;
|
|
583
|
+
// }
|
|
584
|
+
// if (sMember && sMember.ID) {
|
|
585
|
+
// // noPlaySetPwd 点击结算方式设置密码,点加号不设置
|
|
586
|
+
// if (!sMember.WalletEnabled && params !== 'noPlaySetPwd' && !isReturn) {
|
|
587
|
+
// this.setState({
|
|
588
|
+
// newPass: '',
|
|
589
|
+
// newPassConfirm: '',
|
|
590
|
+
// showSetPwdModal: true
|
|
591
|
+
// })
|
|
592
|
+
// } else {
|
|
593
|
+
// this.setState({
|
|
594
|
+
// showSetPwdModal: false,
|
|
595
|
+
// czkVisible: true
|
|
596
|
+
// })
|
|
597
|
+
// }
|
|
598
|
+
// }
|
|
599
|
+
// // else {
|
|
600
|
+
// // Message.warn('请先录入会员');
|
|
601
|
+
// // }
|
|
602
|
+
// // this.setState({
|
|
603
|
+
// // czkVisible: true,
|
|
604
|
+
// // });
|
|
605
|
+
// } else {
|
|
606
|
+
// this.setState({
|
|
607
|
+
// czkVisible: true,
|
|
608
|
+
// });
|
|
609
|
+
// }
|
|
610
|
+
_this2.setState({
|
|
611
|
+
czkVisible: true
|
|
612
|
+
});
|
|
613
|
+
var brefund = _this2.store.brefund;
|
|
614
|
+
|
|
615
|
+
var value11 = currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.member.balance));
|
|
616
|
+
_this2.setState({
|
|
617
|
+
storageValue: value11
|
|
618
|
+
});
|
|
619
|
+
if (currentMode.member.id) {
|
|
620
|
+
_this2.setState({
|
|
621
|
+
czkValue: currentMode.member.StorageCardNo
|
|
622
|
+
});
|
|
623
|
+
} else {
|
|
624
|
+
_this2.setState({
|
|
625
|
+
czkValue: null
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
setTimeout(function () {
|
|
630
|
+
if (!currentMode.member || !currentMode.member.id) {
|
|
631
|
+
_this2.czkInput && _this2.czkInput.input.focus();
|
|
632
|
+
} else {
|
|
633
|
+
if (_this2.inputCzkAmount && _this2.inputCzkAmount.input) {
|
|
634
|
+
_this2.inputCzkAmount.input.focus();
|
|
635
|
+
_this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
}, 500);
|
|
639
|
+
_this2.connectRfCard();
|
|
640
|
+
};
|
|
641
|
+
|
|
642
|
+
_this2.handleCzkOk = function () {
|
|
643
|
+
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(e) {
|
|
644
|
+
var _enumController$getEn3, PayStyle;
|
|
560
645
|
|
|
561
646
|
return _regenerator2.default.wrap(function _callee$(_context) {
|
|
562
647
|
while (1) {
|
|
563
648
|
switch (_context.prev = _context.next) {
|
|
564
649
|
case 0:
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
650
|
+
// const maxamount=Math.min(this.store.paymode.currentMode.maxamount,this.store.paymode.currentMode.member.balance);
|
|
651
|
+
// if(this.store.bquick && this.store.paymode.amount>maxamount){
|
|
652
|
+
// Message.error("本单最大可用储值卡结算金额为:"+getFixedNumber(maxamount)+",请使用复合结算!");
|
|
653
|
+
// this.setState({
|
|
654
|
+
// czkVisible: false,
|
|
655
|
+
// });
|
|
656
|
+
// return;
|
|
657
|
+
// }
|
|
658
|
+
_enumController$getEn3 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn3.PayStyle;
|
|
571
659
|
|
|
572
|
-
if (
|
|
573
|
-
_context.next =
|
|
660
|
+
if (_this2.store.paymode.currentMode.member.id) {
|
|
661
|
+
_context.next = 4;
|
|
574
662
|
break;
|
|
575
663
|
}
|
|
576
664
|
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
});
|
|
580
|
-
_context.next = 18;
|
|
581
|
-
break;
|
|
582
|
-
|
|
583
|
-
case 9:
|
|
584
|
-
_this2.setState({
|
|
585
|
-
czkVisible: true
|
|
586
|
-
});
|
|
587
|
-
brefund = _this2.store.brefund;
|
|
588
|
-
value11 = currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance));
|
|
665
|
+
_context.next = 4;
|
|
666
|
+
return _this2.store.loadCzk(_this2.czkInput.input.value);
|
|
589
667
|
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
if (currentMode.storageCardNo) {
|
|
594
|
-
_this2.setState({
|
|
595
|
-
czkValue: currentMode.storageCardNo
|
|
596
|
-
});
|
|
597
|
-
} else {
|
|
598
|
-
_this2.setState({
|
|
599
|
-
czkValue: null
|
|
600
|
-
});
|
|
601
|
-
}
|
|
602
|
-
isInputMember = _this2.state.isInputMember;
|
|
603
|
-
|
|
604
|
-
if (!isInputMember) {
|
|
605
|
-
_context.next = 18;
|
|
668
|
+
case 4:
|
|
669
|
+
if (_this2.store.paymode.currentMode.member.id) {
|
|
670
|
+
_context.next = 7;
|
|
606
671
|
break;
|
|
607
672
|
}
|
|
608
673
|
|
|
609
|
-
|
|
610
|
-
return
|
|
611
|
-
|
|
612
|
-
case 18:
|
|
613
|
-
setTimeout(function () {
|
|
614
|
-
if (!currentMode.storageCardNo) {
|
|
615
|
-
_this2.czkInput && _this2.czkInput.input.focus();
|
|
616
|
-
} else {
|
|
617
|
-
if (_this2.inputCzkAmount && _this2.inputCzkAmount.input) {
|
|
618
|
-
_this2.inputCzkAmount.input.focus();
|
|
619
|
-
_this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
}, 500);
|
|
623
|
-
_this2.connectRfCard();
|
|
624
|
-
|
|
625
|
-
case 20:
|
|
626
|
-
case 'end':
|
|
627
|
-
return _context.stop();
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
}, _callee, _this3);
|
|
631
|
-
}));
|
|
632
|
-
|
|
633
|
-
return function (_x, _x2, _x3) {
|
|
634
|
-
return _ref.apply(this, arguments);
|
|
635
|
-
};
|
|
636
|
-
}();
|
|
637
|
-
|
|
638
|
-
_this2.handleCzkData = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
|
639
|
-
var _enumController$getEn3, PayStyle;
|
|
640
|
-
|
|
641
|
-
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
642
|
-
while (1) {
|
|
643
|
-
switch (_context2.prev = _context2.next) {
|
|
644
|
-
case 0:
|
|
645
|
-
_this2.setState({
|
|
646
|
-
isInputMember: false
|
|
647
|
-
});
|
|
648
|
-
_enumController$getEn3 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn3.PayStyle;
|
|
649
|
-
|
|
650
|
-
if (_this2.store.paymode.currentMode.storageCardNo) {
|
|
651
|
-
_context2.next = 5;
|
|
652
|
-
break;
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
_context2.next = 5;
|
|
656
|
-
return _this2.store.loadCzk(_this2.czkInput.input.value);
|
|
657
|
-
|
|
658
|
-
case 5:
|
|
659
|
-
if (_this2.store.paymode.currentMode.storageCardNo) {
|
|
660
|
-
_context2.next = 8;
|
|
661
|
-
break;
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
_message2.default.error("请录入储值卡!");
|
|
665
|
-
return _context2.abrupt('return');
|
|
666
|
-
|
|
667
|
-
case 8:
|
|
668
|
-
if (!(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
|
|
669
|
-
return mode.paymethodId != _this2.store.paymode.currentMode.paymethodId && mode.paymentType == PayStyle.hyczk && mode.storageCardNo == _this2.store.paymode.currentMode.storageCardNo;
|
|
670
|
-
})) {
|
|
671
|
-
_context2.next = 11;
|
|
672
|
-
break;
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
_message2.default.error("该储值卡已使用。");
|
|
676
|
-
return _context2.abrupt('return');
|
|
677
|
-
|
|
678
|
-
case 11:
|
|
679
|
-
if (!(_this2.store.bquick && _this2.store.paymode.amount != _this2.store.paymode.currentMode.value)) {
|
|
680
|
-
_context2.next = 14;
|
|
681
|
-
break;
|
|
682
|
-
}
|
|
674
|
+
_message2.default.error("请录入储值卡!");
|
|
675
|
+
return _context.abrupt('return');
|
|
683
676
|
|
|
684
|
-
|
|
685
|
-
|
|
677
|
+
case 7:
|
|
678
|
+
if (!(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
|
|
679
|
+
return mode.paymethodId != _this2.store.paymode.currentMode.paymethodId && mode.paymentType == PayStyle.hyczk && mode.member.id == _this2.store.paymode.currentMode.member.id;
|
|
680
|
+
})) {
|
|
681
|
+
_context.next = 10;
|
|
682
|
+
break;
|
|
683
|
+
}
|
|
686
684
|
|
|
687
|
-
|
|
685
|
+
_message2.default.error("该储值卡已使用。");
|
|
686
|
+
return _context.abrupt('return');
|
|
688
687
|
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
_this2.closeRfCard();
|
|
695
|
-
_this2.store.paymode.calcMemberBalance();
|
|
696
|
-
_this2.handleCzk();
|
|
697
|
-
|
|
698
|
-
case 18:
|
|
699
|
-
case 'end':
|
|
700
|
-
return _context2.stop();
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
}, _callee2, _this3);
|
|
704
|
-
}));
|
|
688
|
+
case 10:
|
|
689
|
+
if (!(_this2.store.bquick && _this2.store.paymode.amount != _this2.store.paymode.currentMode.value)) {
|
|
690
|
+
_context.next = 13;
|
|
691
|
+
break;
|
|
692
|
+
}
|
|
705
693
|
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
var _this2$store$paymode$, walletEnabled, cardTypeEnum;
|
|
694
|
+
_message2.default.error("实收金额应等于应收金额。");
|
|
695
|
+
return _context.abrupt('return');
|
|
709
696
|
|
|
710
|
-
|
|
711
|
-
while (1) {
|
|
712
|
-
switch (_context3.prev = _context3.next) {
|
|
713
|
-
case 0:
|
|
714
|
-
// 判断是否有密码
|
|
715
|
-
_this2$store$paymode$ = _this2.store.paymode.currentMode, walletEnabled = _this2$store$paymode$.walletEnabled, cardTypeEnum = _this2$store$paymode$.cardTypeEnum;
|
|
697
|
+
case 13:
|
|
716
698
|
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
699
|
+
_this2.setState({
|
|
700
|
+
czkVisible: false,
|
|
701
|
+
storageValue: '0.00',
|
|
702
|
+
czkvalue: null
|
|
703
|
+
});
|
|
704
|
+
_this2.closeRfCard();
|
|
705
|
+
_this2.store.paymode.calcMemberBalance();
|
|
706
|
+
_this2.handleCzk();
|
|
725
707
|
|
|
726
|
-
case
|
|
708
|
+
case 17:
|
|
727
709
|
case 'end':
|
|
728
|
-
return
|
|
710
|
+
return _context.stop();
|
|
729
711
|
}
|
|
730
712
|
}
|
|
731
|
-
},
|
|
713
|
+
}, _callee, _this3);
|
|
732
714
|
}));
|
|
733
715
|
|
|
734
|
-
return function (
|
|
735
|
-
return
|
|
716
|
+
return function (_x) {
|
|
717
|
+
return _ref2.apply(this, arguments);
|
|
736
718
|
};
|
|
737
719
|
}();
|
|
738
720
|
|
|
@@ -744,7 +726,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
744
726
|
_this2.setState({
|
|
745
727
|
czkVisible: false,
|
|
746
728
|
storageValue: '0.00',
|
|
747
|
-
|
|
729
|
+
czkvalue: null
|
|
748
730
|
});
|
|
749
731
|
_this2.closeRfCard();
|
|
750
732
|
_keyboard2.default.close();
|
|
@@ -757,24 +739,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
757
739
|
});
|
|
758
740
|
};
|
|
759
741
|
|
|
760
|
-
_this2.handleSetModal = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
761
|
-
var _this2$state, newPass, newPassConfirm,
|
|
742
|
+
_this2.handleSetModal = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
|
743
|
+
var _this2$state, newPass, newPassConfirm, updataMemberInfo, result, currentMode, resp;
|
|
762
744
|
|
|
763
|
-
return _regenerator2.default.wrap(function
|
|
745
|
+
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
764
746
|
while (1) {
|
|
765
|
-
switch (
|
|
747
|
+
switch (_context2.prev = _context2.next) {
|
|
766
748
|
case 0:
|
|
767
|
-
_this2$state = _this2.state, newPass = _this2$state.newPass, newPassConfirm = _this2$state.newPassConfirm
|
|
749
|
+
_this2$state = _this2.state, newPass = _this2$state.newPass, newPassConfirm = _this2$state.newPassConfirm;
|
|
768
750
|
updataMemberInfo = _this2.props.updataMemberInfo;
|
|
769
|
-
|
|
751
|
+
_context2.next = 4;
|
|
770
752
|
return _this2.store.queryPwd(newPass, newPassConfirm);
|
|
771
753
|
|
|
772
754
|
case 4:
|
|
773
|
-
result =
|
|
774
|
-
cardTypeEnum = _this2.store.paymode.currentMode.cardTypeEnum;
|
|
755
|
+
result = _context2.sent;
|
|
775
756
|
|
|
776
757
|
if (!result) {
|
|
777
|
-
|
|
758
|
+
_context2.next = 15;
|
|
778
759
|
break;
|
|
779
760
|
}
|
|
780
761
|
|
|
@@ -785,55 +766,42 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
785
766
|
newPassConfirm: ''
|
|
786
767
|
});
|
|
787
768
|
_message2.default.warn('设置成功');
|
|
788
|
-
_this2.
|
|
769
|
+
currentMode = _this2.store.paymode.currentMode;
|
|
770
|
+
|
|
789
771
|
setTimeout(function () {
|
|
790
|
-
if (
|
|
791
|
-
_this2.
|
|
792
|
-
|
|
772
|
+
if (!currentMode.member || !currentMode.member.id) {
|
|
773
|
+
_this2.czkInput && _this2.czkInput.input.focus();
|
|
774
|
+
} else {
|
|
775
|
+
if (_this2.inputCzkAmount && _this2.inputCzkAmount.input) {
|
|
776
|
+
_this2.inputCzkAmount.input.focus();
|
|
777
|
+
_this2.inputCzkAmount.input.setSelectionRange(0, _this2.inputCzkAmount.input.value.length);
|
|
778
|
+
}
|
|
793
779
|
}
|
|
794
780
|
}, 350);
|
|
795
781
|
_this2.connectRfCard();
|
|
796
|
-
|
|
797
|
-
if (!isInputMember) {
|
|
798
|
-
_context4.next = 19;
|
|
799
|
-
break;
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
_context4.next = 15;
|
|
782
|
+
_context2.next = 13;
|
|
803
783
|
return _this2.store.updateMemberInfo(_this2.store);
|
|
804
784
|
|
|
805
|
-
case
|
|
806
|
-
resp =
|
|
785
|
+
case 13:
|
|
786
|
+
resp = _context2.sent;
|
|
807
787
|
|
|
808
788
|
updataMemberInfo(resp);
|
|
809
|
-
_context4.next = 20;
|
|
810
|
-
break;
|
|
811
|
-
|
|
812
|
-
case 19:
|
|
813
|
-
if (cardTypeEnum === 'BALANCE_CARD') {
|
|
814
|
-
_this2.store.updateCardInfo();
|
|
815
|
-
}
|
|
816
789
|
|
|
817
|
-
case
|
|
818
|
-
_this2.setState({
|
|
819
|
-
isInputMember: false
|
|
820
|
-
});
|
|
821
|
-
|
|
822
|
-
case 21:
|
|
790
|
+
case 15:
|
|
823
791
|
case 'end':
|
|
824
|
-
return
|
|
792
|
+
return _context2.stop();
|
|
825
793
|
}
|
|
826
794
|
}
|
|
827
|
-
},
|
|
795
|
+
}, _callee2, _this3);
|
|
828
796
|
}));
|
|
829
797
|
|
|
830
798
|
_this2.setPwdValue = function (field, value) {
|
|
831
799
|
_this2.setState((0, _defineProperty3.default)({}, field, value), function () {
|
|
832
|
-
var
|
|
833
|
-
|
|
834
|
-
newPass =
|
|
835
|
-
|
|
836
|
-
newPassConfirm =
|
|
800
|
+
var _ref4 = _this2.state || {},
|
|
801
|
+
_ref4$newPass = _ref4.newPass,
|
|
802
|
+
newPass = _ref4$newPass === undefined ? '' : _ref4$newPass,
|
|
803
|
+
_ref4$newPassConfirm = _ref4.newPassConfirm,
|
|
804
|
+
newPassConfirm = _ref4$newPassConfirm === undefined ? '' : _ref4$newPassConfirm;
|
|
837
805
|
|
|
838
806
|
if (newPassConfirm.length === 6 && newPass.length === 6 && newPass === newPassConfirm) {
|
|
839
807
|
_this2.setState({
|
|
@@ -844,15 +812,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
844
812
|
};
|
|
845
813
|
|
|
846
814
|
_this2.handleBlur = function (field) {
|
|
847
|
-
var
|
|
848
|
-
|
|
849
|
-
newPass =
|
|
850
|
-
|
|
851
|
-
newPassConfirm =
|
|
815
|
+
var _ref5 = _this2.state || {},
|
|
816
|
+
_ref5$newPass = _ref5.newPass,
|
|
817
|
+
newPass = _ref5$newPass === undefined ? '' : _ref5$newPass,
|
|
818
|
+
_ref5$newPassConfirm = _ref5.newPassConfirm,
|
|
819
|
+
newPassConfirm = _ref5$newPassConfirm === undefined ? '' : _ref5$newPassConfirm;
|
|
852
820
|
|
|
853
821
|
setTimeout(function () {
|
|
854
|
-
var
|
|
855
|
-
showSetPwdModal =
|
|
822
|
+
var _ref6 = _this2.state || {},
|
|
823
|
+
showSetPwdModal = _ref6.showSetPwdModal;
|
|
856
824
|
|
|
857
825
|
if (!showSetPwdModal) return;
|
|
858
826
|
if (field === 'newPass' && newPass.length < 6) {
|
|
@@ -909,8 +877,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
909
877
|
|
|
910
878
|
// TODO: 测试优惠券支付
|
|
911
879
|
|
|
912
|
-
var
|
|
913
|
-
isNewRetailBCPos =
|
|
880
|
+
var _ref7 = _mutantsUtil.platform || {},
|
|
881
|
+
isNewRetailBCPos = _ref7.isNewRetailBCPos;
|
|
914
882
|
|
|
915
883
|
if (isNewRetailBCPos && !_this2.store.paymode.currentMode.boriginReturn) {
|
|
916
884
|
_this2.store.getCouponList();
|
|
@@ -994,8 +962,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
994
962
|
};
|
|
995
963
|
|
|
996
964
|
_this2.checkOfflineEnable = function (paymode, key) {
|
|
997
|
-
var
|
|
998
|
-
paymodes =
|
|
965
|
+
var _ref8 = paymode || {},
|
|
966
|
+
paymodes = _ref8.paymodes;
|
|
999
967
|
|
|
1000
968
|
var isOffline = _mutantsMicrofx.stores.offlineSys.isOffline;
|
|
1001
969
|
|
|
@@ -1027,9 +995,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1027
995
|
switch (key) {
|
|
1028
996
|
case PayStyle.hyczk:
|
|
1029
997
|
_this2.showCzkModal(-1);
|
|
1030
|
-
_this2.store.dto.Idmember && _this2.setState({
|
|
1031
|
-
isInputMember: true
|
|
1032
|
-
});
|
|
1033
998
|
break;
|
|
1034
999
|
case PayStyle.jfdx:
|
|
1035
1000
|
_this2.showJfdxModal(-1);
|
|
@@ -1138,6 +1103,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1138
1103
|
boriginReturn = _this2$store3.boriginReturn;
|
|
1139
1104
|
var noAlreadyWarn = _this2.state.noAlreadyWarn;
|
|
1140
1105
|
|
|
1106
|
+
|
|
1141
1107
|
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(key)) return false;
|
|
1142
1108
|
|
|
1143
1109
|
if (_this2.checkModeDisabled(key, brefund, boriginReturn)) {
|
|
@@ -1207,12 +1173,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1207
1173
|
}
|
|
1208
1174
|
};
|
|
1209
1175
|
|
|
1210
|
-
_this2.setCurrentFocusAndAddPay = function (key
|
|
1176
|
+
_this2.setCurrentFocusAndAddPay = function (key) {
|
|
1211
1177
|
_this2.store.changeFocusAndAddPay(key);
|
|
1212
1178
|
if (_this2.store.bquick) {
|
|
1213
1179
|
_this2.handleSettle("quickPay");
|
|
1214
1180
|
} else {
|
|
1215
|
-
_this2.setFocusAndSelection(key
|
|
1181
|
+
_this2.setFocusAndSelection(key);
|
|
1216
1182
|
}
|
|
1217
1183
|
};
|
|
1218
1184
|
|
|
@@ -1345,8 +1311,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1345
1311
|
return;
|
|
1346
1312
|
}
|
|
1347
1313
|
|
|
1348
|
-
var
|
|
1349
|
-
isNewRetailBCPos =
|
|
1314
|
+
var _ref9 = _mutantsUtil.platform || {},
|
|
1315
|
+
isNewRetailBCPos = _ref9.isNewRetailBCPos;
|
|
1350
1316
|
|
|
1351
1317
|
if (isNewRetailBCPos) {
|
|
1352
1318
|
_this2.store.paymode.calcDjqCheckValue(q, _this2.store.dto);
|
|
@@ -1381,31 +1347,27 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1381
1347
|
if (_this2.czkdebounced) {
|
|
1382
1348
|
return;
|
|
1383
1349
|
}
|
|
1384
|
-
_this2.czkdebounced = (0, _debounce3.default)((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1350
|
+
_this2.czkdebounced = (0, _debounce3.default)((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
|
|
1351
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
1388
1352
|
while (1) {
|
|
1389
|
-
switch (
|
|
1353
|
+
switch (_context3.prev = _context3.next) {
|
|
1390
1354
|
case 0:
|
|
1391
|
-
|
|
1355
|
+
_context3.next = 2;
|
|
1392
1356
|
return _this2.store.loadCzk(v);
|
|
1393
1357
|
|
|
1394
1358
|
case 2:
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
if (_this2.store.paymode.currentMode.storageCardNo) {
|
|
1359
|
+
if (_this2.store.paymode.currentMode.StorageCardNo) {
|
|
1398
1360
|
_this2.setState({
|
|
1399
|
-
czkValue: _this2.store.paymode.currentMode.
|
|
1361
|
+
czkValue: _this2.store.paymode.currentMode.StorageCardNo
|
|
1400
1362
|
});
|
|
1401
1363
|
}
|
|
1402
1364
|
|
|
1403
|
-
case
|
|
1365
|
+
case 3:
|
|
1404
1366
|
case 'end':
|
|
1405
|
-
return
|
|
1367
|
+
return _context3.stop();
|
|
1406
1368
|
}
|
|
1407
1369
|
}
|
|
1408
|
-
},
|
|
1370
|
+
}, _callee3, _this3);
|
|
1409
1371
|
})), 1000, {
|
|
1410
1372
|
'leading': true,
|
|
1411
1373
|
'trailing': false
|
|
@@ -1573,21 +1535,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1573
1535
|
return null;
|
|
1574
1536
|
};
|
|
1575
1537
|
|
|
1576
|
-
_this2.setFocusAndSelection = function (key
|
|
1538
|
+
_this2.setFocusAndSelection = function (key) {
|
|
1577
1539
|
var that = _this2;
|
|
1578
1540
|
var paymode = _this2.store.paymode;
|
|
1579
1541
|
|
|
1580
|
-
var _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(),
|
|
1581
|
-
PayStyle = _enumController$getEn19.PayStyle;
|
|
1582
|
-
|
|
1583
1542
|
var themode = (0, _find3.default)(paymode.thePaymodes, function (mode) {
|
|
1584
1543
|
return mode.paymentType === key;
|
|
1585
1544
|
});
|
|
1586
|
-
if (key === PayStyle.hyczk) {
|
|
1587
|
-
themode = (0, _find3.default)(paymode.thePaymodes, function (mode) {
|
|
1588
|
-
return mode.paymethodId === payId;
|
|
1589
|
-
});
|
|
1590
|
-
}
|
|
1591
1545
|
var index = themode && themode.paymethodId || -1;
|
|
1592
1546
|
if (index !== -1) {
|
|
1593
1547
|
setTimeout(function () {
|
|
@@ -1602,11 +1556,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1602
1556
|
}
|
|
1603
1557
|
};
|
|
1604
1558
|
|
|
1605
|
-
_this2.settleUnReturn = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1559
|
+
_this2.settleUnReturn = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1606
1560
|
var that;
|
|
1607
|
-
return _regenerator2.default.wrap(function
|
|
1561
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1608
1562
|
while (1) {
|
|
1609
|
-
switch (
|
|
1563
|
+
switch (_context5.prev = _context5.next) {
|
|
1610
1564
|
case 0:
|
|
1611
1565
|
that = _this2;
|
|
1612
1566
|
|
|
@@ -1629,18 +1583,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1629
1583
|
onOk: function onOk() {
|
|
1630
1584
|
var _this4 = this;
|
|
1631
1585
|
|
|
1632
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1586
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
|
1633
1587
|
var result;
|
|
1634
|
-
return _regenerator2.default.wrap(function
|
|
1588
|
+
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
1635
1589
|
while (1) {
|
|
1636
|
-
switch (
|
|
1590
|
+
switch (_context4.prev = _context4.next) {
|
|
1637
1591
|
case 0:
|
|
1638
1592
|
window.__queryingModal = (0, _utils.openQueryingModal)();
|
|
1639
|
-
|
|
1593
|
+
_context4.next = 3;
|
|
1640
1594
|
return that.store.querySettleResult();
|
|
1641
1595
|
|
|
1642
1596
|
case 3:
|
|
1643
|
-
result =
|
|
1597
|
+
result = _context4.sent;
|
|
1644
1598
|
|
|
1645
1599
|
setTimeout(function () {
|
|
1646
1600
|
if (window.__queryingModal) {
|
|
@@ -1648,34 +1602,34 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1648
1602
|
window.__queryingModal = null;
|
|
1649
1603
|
}
|
|
1650
1604
|
}, 0);
|
|
1651
|
-
|
|
1652
|
-
|
|
1605
|
+
_context4.t0 = result.Flag;
|
|
1606
|
+
_context4.next = _context4.t0 === "0" ? 8 : _context4.t0 === "1" ? 11 : _context4.t0 === "2" ? 13 : 15;
|
|
1653
1607
|
break;
|
|
1654
1608
|
|
|
1655
1609
|
case 8:
|
|
1656
1610
|
//成功
|
|
1657
1611
|
that.store.setDtoID(result.ID);
|
|
1658
1612
|
that.settleSuccess();
|
|
1659
|
-
return
|
|
1613
|
+
return _context4.abrupt('break', 15);
|
|
1660
1614
|
|
|
1661
1615
|
case 11:
|
|
1662
1616
|
//处理中
|
|
1663
1617
|
that.settleUnReturn();
|
|
1664
1618
|
// Message.info("结算正在处理中,请稍后再次查询。");
|
|
1665
|
-
return
|
|
1619
|
+
return _context4.abrupt('break', 15);
|
|
1666
1620
|
|
|
1667
1621
|
case 13:
|
|
1668
1622
|
//失败
|
|
1669
1623
|
_message2.default.info('\u7ED3\u7B97\u5931\u8D25\uFF0C\u539F\u56E0:' + result.Message + '\u3002');
|
|
1670
1624
|
// that.settleCanceled();
|
|
1671
|
-
return
|
|
1625
|
+
return _context4.abrupt('break', 15);
|
|
1672
1626
|
|
|
1673
1627
|
case 15:
|
|
1674
1628
|
case 'end':
|
|
1675
|
-
return
|
|
1629
|
+
return _context4.stop();
|
|
1676
1630
|
}
|
|
1677
1631
|
}
|
|
1678
|
-
},
|
|
1632
|
+
}, _callee4, _this4);
|
|
1679
1633
|
}))();
|
|
1680
1634
|
},
|
|
1681
1635
|
onCancel: function onCancel() {
|
|
@@ -1685,10 +1639,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1685
1639
|
|
|
1686
1640
|
case 2:
|
|
1687
1641
|
case 'end':
|
|
1688
|
-
return
|
|
1642
|
+
return _context5.stop();
|
|
1689
1643
|
}
|
|
1690
1644
|
}
|
|
1691
|
-
},
|
|
1645
|
+
}, _callee5, _this3);
|
|
1692
1646
|
}));
|
|
1693
1647
|
|
|
1694
1648
|
_this2.settleCanceled = function () {
|
|
@@ -1697,15 +1651,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1697
1651
|
_this2.cancelState();
|
|
1698
1652
|
};
|
|
1699
1653
|
|
|
1700
|
-
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1701
|
-
var _enumController$
|
|
1654
|
+
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
|
|
1655
|
+
var _enumController$getEn19, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, getSettleGift, type, resp1;
|
|
1702
1656
|
|
|
1703
|
-
return _regenerator2.default.wrap(function
|
|
1657
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1704
1658
|
while (1) {
|
|
1705
|
-
switch (
|
|
1659
|
+
switch (_context6.prev = _context6.next) {
|
|
1706
1660
|
case 0:
|
|
1707
1661
|
//提示成功
|
|
1708
|
-
_enumController$
|
|
1662
|
+
_enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn19.PayStyle;
|
|
1709
1663
|
_this2$store$paymode = _this2.store.paymode, amount = _this2$store$paymode.amount, received = _this2$store$paymode.received, thePaymodes = _this2$store$paymode.thePaymodes;
|
|
1710
1664
|
IdbusiType = _this2.store.dto.IdbusiType;
|
|
1711
1665
|
charge = _this2.store.paymode.charge;
|
|
@@ -1763,22 +1717,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1763
1717
|
resp1 = false;
|
|
1764
1718
|
|
|
1765
1719
|
if (!(type !== 1)) {
|
|
1766
|
-
|
|
1720
|
+
_context6.next = 20;
|
|
1767
1721
|
break;
|
|
1768
1722
|
}
|
|
1769
1723
|
|
|
1770
|
-
|
|
1771
|
-
|
|
1724
|
+
_context6.prev = 11;
|
|
1725
|
+
_context6.next = 14;
|
|
1772
1726
|
return getSettleGift();
|
|
1773
1727
|
|
|
1774
1728
|
case 14:
|
|
1775
|
-
resp1 =
|
|
1776
|
-
|
|
1729
|
+
resp1 = _context6.sent;
|
|
1730
|
+
_context6.next = 20;
|
|
1777
1731
|
break;
|
|
1778
1732
|
|
|
1779
1733
|
case 17:
|
|
1780
|
-
|
|
1781
|
-
|
|
1734
|
+
_context6.prev = 17;
|
|
1735
|
+
_context6.t0 = _context6['catch'](11);
|
|
1782
1736
|
|
|
1783
1737
|
console.log("获取支付礼包getSettleGift失败");
|
|
1784
1738
|
|
|
@@ -1816,23 +1770,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1816
1770
|
|
|
1817
1771
|
case 21:
|
|
1818
1772
|
case 'end':
|
|
1819
|
-
return
|
|
1773
|
+
return _context6.stop();
|
|
1820
1774
|
}
|
|
1821
1775
|
}
|
|
1822
|
-
},
|
|
1776
|
+
}, _callee6, _this3, [[11, 17]]);
|
|
1823
1777
|
}));
|
|
1824
1778
|
|
|
1825
1779
|
_this2.handleGuestShow = function (dtype, value) {
|
|
1826
1780
|
if (_this2.hasElectron === false) return;
|
|
1827
1781
|
var dt = _mutantsMicrofx.localStore.get('portsetting_hardSet') || [];
|
|
1828
1782
|
|
|
1829
|
-
var
|
|
1830
|
-
guestshow_enable =
|
|
1831
|
-
guestshow_clear =
|
|
1832
|
-
guestshow_welcome =
|
|
1833
|
-
guestshow_collect =
|
|
1834
|
-
guestshow_refund =
|
|
1835
|
-
guestshow_change =
|
|
1783
|
+
var _ref13 = dt || {},
|
|
1784
|
+
guestshow_enable = _ref13.guestshow_enable,
|
|
1785
|
+
guestshow_clear = _ref13.guestshow_clear,
|
|
1786
|
+
guestshow_welcome = _ref13.guestshow_welcome,
|
|
1787
|
+
guestshow_collect = _ref13.guestshow_collect,
|
|
1788
|
+
guestshow_refund = _ref13.guestshow_refund,
|
|
1789
|
+
guestshow_change = _ref13.guestshow_change;
|
|
1836
1790
|
|
|
1837
1791
|
var hasSuccess = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('portsetting_hardSet_isSuccess');
|
|
1838
1792
|
if (!guestshow_enable || !!guestshow_enable && hasSuccess == '0') return;
|
|
@@ -1867,108 +1821,108 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1867
1821
|
};
|
|
1868
1822
|
|
|
1869
1823
|
_this2.handleSettle = function () {
|
|
1870
|
-
var
|
|
1824
|
+
var _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(args) {
|
|
1871
1825
|
var handleUserInputs = function () {
|
|
1872
|
-
var
|
|
1826
|
+
var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(promises) {
|
|
1873
1827
|
var results, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, p, _result;
|
|
1874
1828
|
|
|
1875
|
-
return _regenerator2.default.wrap(function
|
|
1829
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1876
1830
|
while (1) {
|
|
1877
|
-
switch (
|
|
1831
|
+
switch (_context8.prev = _context8.next) {
|
|
1878
1832
|
case 0:
|
|
1879
1833
|
results = [];
|
|
1880
|
-
|
|
1834
|
+
_context8.prev = 1;
|
|
1881
1835
|
_iteratorNormalCompletion = true;
|
|
1882
1836
|
_didIteratorError = false;
|
|
1883
1837
|
_iteratorError = undefined;
|
|
1884
|
-
|
|
1838
|
+
_context8.prev = 5;
|
|
1885
1839
|
_iterator = (0, _getIterator3.default)(promises);
|
|
1886
1840
|
|
|
1887
1841
|
case 7:
|
|
1888
1842
|
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
|
|
1889
|
-
|
|
1843
|
+
_context8.next = 16;
|
|
1890
1844
|
break;
|
|
1891
1845
|
}
|
|
1892
1846
|
|
|
1893
1847
|
p = _step.value;
|
|
1894
|
-
|
|
1848
|
+
_context8.next = 11;
|
|
1895
1849
|
return p;
|
|
1896
1850
|
|
|
1897
1851
|
case 11:
|
|
1898
|
-
_result =
|
|
1852
|
+
_result = _context8.sent;
|
|
1899
1853
|
|
|
1900
1854
|
results.push(_result);
|
|
1901
1855
|
|
|
1902
1856
|
case 13:
|
|
1903
1857
|
_iteratorNormalCompletion = true;
|
|
1904
|
-
|
|
1858
|
+
_context8.next = 7;
|
|
1905
1859
|
break;
|
|
1906
1860
|
|
|
1907
1861
|
case 16:
|
|
1908
|
-
|
|
1862
|
+
_context8.next = 22;
|
|
1909
1863
|
break;
|
|
1910
1864
|
|
|
1911
1865
|
case 18:
|
|
1912
|
-
|
|
1913
|
-
|
|
1866
|
+
_context8.prev = 18;
|
|
1867
|
+
_context8.t0 = _context8['catch'](5);
|
|
1914
1868
|
_didIteratorError = true;
|
|
1915
|
-
_iteratorError =
|
|
1869
|
+
_iteratorError = _context8.t0;
|
|
1916
1870
|
|
|
1917
1871
|
case 22:
|
|
1918
|
-
|
|
1919
|
-
|
|
1872
|
+
_context8.prev = 22;
|
|
1873
|
+
_context8.prev = 23;
|
|
1920
1874
|
|
|
1921
1875
|
if (!_iteratorNormalCompletion && _iterator.return) {
|
|
1922
1876
|
_iterator.return();
|
|
1923
1877
|
}
|
|
1924
1878
|
|
|
1925
1879
|
case 25:
|
|
1926
|
-
|
|
1880
|
+
_context8.prev = 25;
|
|
1927
1881
|
|
|
1928
1882
|
if (!_didIteratorError) {
|
|
1929
|
-
|
|
1883
|
+
_context8.next = 28;
|
|
1930
1884
|
break;
|
|
1931
1885
|
}
|
|
1932
1886
|
|
|
1933
1887
|
throw _iteratorError;
|
|
1934
1888
|
|
|
1935
1889
|
case 28:
|
|
1936
|
-
return
|
|
1890
|
+
return _context8.finish(25);
|
|
1937
1891
|
|
|
1938
1892
|
case 29:
|
|
1939
|
-
return
|
|
1893
|
+
return _context8.finish(22);
|
|
1940
1894
|
|
|
1941
1895
|
case 30:
|
|
1942
1896
|
window.__loadingModal = (0, _utils.openLoadingModal)();
|
|
1943
|
-
|
|
1897
|
+
_context8.next = 33;
|
|
1944
1898
|
return commit(results);
|
|
1945
1899
|
|
|
1946
1900
|
case 33:
|
|
1947
|
-
|
|
1901
|
+
_context8.next = 37;
|
|
1948
1902
|
break;
|
|
1949
1903
|
|
|
1950
1904
|
case 35:
|
|
1951
|
-
|
|
1952
|
-
|
|
1905
|
+
_context8.prev = 35;
|
|
1906
|
+
_context8.t1 = _context8['catch'](1);
|
|
1953
1907
|
|
|
1954
1908
|
case 37:
|
|
1955
1909
|
case 'end':
|
|
1956
|
-
return
|
|
1910
|
+
return _context8.stop();
|
|
1957
1911
|
}
|
|
1958
1912
|
}
|
|
1959
|
-
},
|
|
1913
|
+
}, _callee8, this, [[1, 35], [5, 18, 22, 30], [23,, 25, 29]]);
|
|
1960
1914
|
}));
|
|
1961
1915
|
|
|
1962
|
-
return function handleUserInputs(
|
|
1963
|
-
return
|
|
1916
|
+
return function handleUserInputs(_x4) {
|
|
1917
|
+
return _ref16.apply(this, arguments);
|
|
1964
1918
|
};
|
|
1965
1919
|
}();
|
|
1966
1920
|
|
|
1967
|
-
var _enumController$
|
|
1921
|
+
var _enumController$getEn20, PayStyle, _this2$store6, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
|
|
1968
1922
|
|
|
1969
|
-
return _regenerator2.default.wrap(function
|
|
1923
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
1970
1924
|
while (1) {
|
|
1971
|
-
switch (
|
|
1925
|
+
switch (_context9.prev = _context9.next) {
|
|
1972
1926
|
case 0:
|
|
1973
1927
|
_this2.setState({
|
|
1974
1928
|
settleDisabled: true
|
|
@@ -1984,7 +1938,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1984
1938
|
// }
|
|
1985
1939
|
//
|
|
1986
1940
|
// testAsync(p);
|
|
1987
|
-
_enumController$
|
|
1941
|
+
_enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn20.PayStyle;
|
|
1988
1942
|
_this2$store6 = _this2.store, paymode = _this2$store6.paymode, brefund = _this2$store6.brefund, boriginReturn = _this2$store6.boriginReturn, newStyle = _this2$store6.newStyle;
|
|
1989
1943
|
isQuickPay = args === 'quickPay';
|
|
1990
1944
|
that = _this2;
|
|
@@ -2000,7 +1954,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2000
1954
|
});
|
|
2001
1955
|
|
|
2002
1956
|
if (!(that.checkCharge() && Math.abs(paymode.receivable) > that.props.initData("posChangeUpperAmount"))) {
|
|
2003
|
-
|
|
1957
|
+
_context9.next = 13;
|
|
2004
1958
|
break;
|
|
2005
1959
|
}
|
|
2006
1960
|
|
|
@@ -2008,11 +1962,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2008
1962
|
_this2.setState({
|
|
2009
1963
|
settleDisabled: false
|
|
2010
1964
|
});
|
|
2011
|
-
return
|
|
1965
|
+
return _context9.abrupt('return');
|
|
2012
1966
|
|
|
2013
1967
|
case 13:
|
|
2014
1968
|
if (!(args !== "zero" && !newStyle)) {
|
|
2015
|
-
|
|
1969
|
+
_context9.next = 19;
|
|
2016
1970
|
break;
|
|
2017
1971
|
}
|
|
2018
1972
|
|
|
@@ -2021,7 +1975,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2021
1975
|
});
|
|
2022
1976
|
|
|
2023
1977
|
if (!zeromode) {
|
|
2024
|
-
|
|
1978
|
+
_context9.next = 19;
|
|
2025
1979
|
break;
|
|
2026
1980
|
}
|
|
2027
1981
|
|
|
@@ -2029,7 +1983,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2029
1983
|
settleDisabled: false
|
|
2030
1984
|
});
|
|
2031
1985
|
_message2.default.error(zeromode.name + ' 的结算金额为零,不可以结算。');
|
|
2032
|
-
return
|
|
1986
|
+
return _context9.abrupt('return');
|
|
2033
1987
|
|
|
2034
1988
|
case 19:
|
|
2035
1989
|
promises = [];
|
|
@@ -2038,14 +1992,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2038
1992
|
}) : paymode.thePaymodes, 'orderBy');
|
|
2039
1993
|
|
|
2040
1994
|
if (!isQuickPay) {
|
|
2041
|
-
|
|
1995
|
+
_context9.next = 27;
|
|
2042
1996
|
break;
|
|
2043
1997
|
}
|
|
2044
1998
|
|
|
2045
1999
|
quickmode = thePaymodes[0];
|
|
2046
2000
|
|
|
2047
2001
|
if (!_this2.checkModeDisabled(quickmode.paymentType, brefund, boriginReturn)) {
|
|
2048
|
-
|
|
2002
|
+
_context9.next = 27;
|
|
2049
2003
|
break;
|
|
2050
2004
|
}
|
|
2051
2005
|
|
|
@@ -2053,7 +2007,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2053
2007
|
settleDisabled: false
|
|
2054
2008
|
});
|
|
2055
2009
|
_message2.default.error('退款不能使用' + quickmode.name + '结算,请使用其他结算方式!');
|
|
2056
|
-
return
|
|
2010
|
+
return _context9.abrupt('return');
|
|
2057
2011
|
|
|
2058
2012
|
case 27:
|
|
2059
2013
|
(0, _forEach3.default)(thePaymodes, function (mode) {
|
|
@@ -2063,27 +2017,27 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2063
2017
|
});
|
|
2064
2018
|
|
|
2065
2019
|
commit = function () {
|
|
2066
|
-
var
|
|
2020
|
+
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(values) {
|
|
2067
2021
|
var result;
|
|
2068
|
-
return _regenerator2.default.wrap(function
|
|
2022
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
2069
2023
|
while (1) {
|
|
2070
|
-
switch (
|
|
2024
|
+
switch (_context7.prev = _context7.next) {
|
|
2071
2025
|
case 0:
|
|
2072
|
-
|
|
2026
|
+
_context7.next = 2;
|
|
2073
2027
|
return _this2.store.commit(_this2.props.bTest);
|
|
2074
2028
|
|
|
2075
2029
|
case 2:
|
|
2076
|
-
result =
|
|
2030
|
+
result = _context7.sent;
|
|
2077
2031
|
|
|
2078
2032
|
if (!(result === true)) {
|
|
2079
|
-
|
|
2033
|
+
_context7.next = 8;
|
|
2080
2034
|
break;
|
|
2081
2035
|
}
|
|
2082
2036
|
|
|
2083
2037
|
//成功
|
|
2084
2038
|
that.settleSuccess();
|
|
2085
2039
|
_promise2.default.resolve();
|
|
2086
|
-
|
|
2040
|
+
_context7.next = 23;
|
|
2087
2041
|
break;
|
|
2088
2042
|
|
|
2089
2043
|
case 8:
|
|
@@ -2100,24 +2054,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2100
2054
|
}, 0);
|
|
2101
2055
|
|
|
2102
2056
|
if (!(result && (result.Code || result.code))) {
|
|
2103
|
-
|
|
2057
|
+
_context7.next = 20;
|
|
2104
2058
|
break;
|
|
2105
2059
|
}
|
|
2106
2060
|
|
|
2107
|
-
|
|
2108
|
-
|
|
2061
|
+
_context7.t0 = result.Code || result.code;
|
|
2062
|
+
_context7.next = _context7.t0 === 'RE_Settle_UnReturn' ? 14 : _context7.t0 === 'ECONNABORTED' ? 18 : 20;
|
|
2109
2063
|
break;
|
|
2110
2064
|
|
|
2111
2065
|
case 14:
|
|
2112
2066
|
console.log('settlement--RE_Settle_UnReturn--调用清除数据==Focus==');
|
|
2113
2067
|
_this2.props.clearVoucherData && _this2.props.clearVoucherData();
|
|
2114
2068
|
_this2.cancelState();
|
|
2115
|
-
return
|
|
2069
|
+
return _context7.abrupt('break', 20);
|
|
2116
2070
|
|
|
2117
2071
|
case 18:
|
|
2118
2072
|
//error.code === 'ECONNABORTED' && error.message.indexOf('timeout')
|
|
2119
2073
|
result.message.indexOf('timeout') > -1 && that.settleUnReturn();
|
|
2120
|
-
return
|
|
2074
|
+
return _context7.abrupt('break', 20);
|
|
2121
2075
|
|
|
2122
2076
|
case 20:
|
|
2123
2077
|
if (isQuickPay) {
|
|
@@ -2125,19 +2079,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2125
2079
|
that.cancelState();
|
|
2126
2080
|
}
|
|
2127
2081
|
|
|
2128
|
-
|
|
2082
|
+
_context7.next = 23;
|
|
2129
2083
|
return _promise2.default.reject();
|
|
2130
2084
|
|
|
2131
2085
|
case 23:
|
|
2132
2086
|
case 'end':
|
|
2133
|
-
return
|
|
2087
|
+
return _context7.stop();
|
|
2134
2088
|
}
|
|
2135
2089
|
}
|
|
2136
|
-
},
|
|
2090
|
+
}, _callee7, _this3);
|
|
2137
2091
|
}));
|
|
2138
2092
|
|
|
2139
|
-
return function commit(
|
|
2140
|
-
return
|
|
2093
|
+
return function commit(_x3) {
|
|
2094
|
+
return _ref15.apply(this, arguments);
|
|
2141
2095
|
};
|
|
2142
2096
|
}();
|
|
2143
2097
|
|
|
@@ -2145,102 +2099,102 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2145
2099
|
|
|
2146
2100
|
case 30:
|
|
2147
2101
|
case 'end':
|
|
2148
|
-
return
|
|
2102
|
+
return _context9.stop();
|
|
2149
2103
|
}
|
|
2150
2104
|
}
|
|
2151
|
-
},
|
|
2105
|
+
}, _callee9, _this3);
|
|
2152
2106
|
}));
|
|
2153
2107
|
|
|
2154
|
-
return function (
|
|
2155
|
-
return
|
|
2108
|
+
return function (_x2) {
|
|
2109
|
+
return _ref14.apply(this, arguments);
|
|
2156
2110
|
};
|
|
2157
2111
|
}();
|
|
2158
2112
|
|
|
2159
|
-
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
2113
|
+
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12() {
|
|
2160
2114
|
var handleUserInputs = function () {
|
|
2161
|
-
var
|
|
2115
|
+
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(promises) {
|
|
2162
2116
|
var results, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, p, _result2;
|
|
2163
2117
|
|
|
2164
|
-
return _regenerator2.default.wrap(function
|
|
2118
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
2165
2119
|
while (1) {
|
|
2166
|
-
switch (
|
|
2120
|
+
switch (_context11.prev = _context11.next) {
|
|
2167
2121
|
case 0:
|
|
2168
2122
|
results = [];
|
|
2169
|
-
|
|
2123
|
+
_context11.prev = 1;
|
|
2170
2124
|
_iteratorNormalCompletion2 = true;
|
|
2171
2125
|
_didIteratorError2 = false;
|
|
2172
2126
|
_iteratorError2 = undefined;
|
|
2173
|
-
|
|
2127
|
+
_context11.prev = 5;
|
|
2174
2128
|
_iterator2 = (0, _getIterator3.default)(promises);
|
|
2175
2129
|
|
|
2176
2130
|
case 7:
|
|
2177
2131
|
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {
|
|
2178
|
-
|
|
2132
|
+
_context11.next = 16;
|
|
2179
2133
|
break;
|
|
2180
2134
|
}
|
|
2181
2135
|
|
|
2182
2136
|
p = _step2.value;
|
|
2183
|
-
|
|
2137
|
+
_context11.next = 11;
|
|
2184
2138
|
return p;
|
|
2185
2139
|
|
|
2186
2140
|
case 11:
|
|
2187
|
-
_result2 =
|
|
2141
|
+
_result2 = _context11.sent;
|
|
2188
2142
|
|
|
2189
2143
|
results.push(_result2);
|
|
2190
2144
|
|
|
2191
2145
|
case 13:
|
|
2192
2146
|
_iteratorNormalCompletion2 = true;
|
|
2193
|
-
|
|
2147
|
+
_context11.next = 7;
|
|
2194
2148
|
break;
|
|
2195
2149
|
|
|
2196
2150
|
case 16:
|
|
2197
|
-
|
|
2151
|
+
_context11.next = 22;
|
|
2198
2152
|
break;
|
|
2199
2153
|
|
|
2200
2154
|
case 18:
|
|
2201
|
-
|
|
2202
|
-
|
|
2155
|
+
_context11.prev = 18;
|
|
2156
|
+
_context11.t0 = _context11['catch'](5);
|
|
2203
2157
|
_didIteratorError2 = true;
|
|
2204
|
-
_iteratorError2 =
|
|
2158
|
+
_iteratorError2 = _context11.t0;
|
|
2205
2159
|
|
|
2206
2160
|
case 22:
|
|
2207
|
-
|
|
2208
|
-
|
|
2161
|
+
_context11.prev = 22;
|
|
2162
|
+
_context11.prev = 23;
|
|
2209
2163
|
|
|
2210
2164
|
if (!_iteratorNormalCompletion2 && _iterator2.return) {
|
|
2211
2165
|
_iterator2.return();
|
|
2212
2166
|
}
|
|
2213
2167
|
|
|
2214
2168
|
case 25:
|
|
2215
|
-
|
|
2169
|
+
_context11.prev = 25;
|
|
2216
2170
|
|
|
2217
2171
|
if (!_didIteratorError2) {
|
|
2218
|
-
|
|
2172
|
+
_context11.next = 28;
|
|
2219
2173
|
break;
|
|
2220
2174
|
}
|
|
2221
2175
|
|
|
2222
2176
|
throw _iteratorError2;
|
|
2223
2177
|
|
|
2224
2178
|
case 28:
|
|
2225
|
-
return
|
|
2179
|
+
return _context11.finish(25);
|
|
2226
2180
|
|
|
2227
2181
|
case 29:
|
|
2228
|
-
return
|
|
2182
|
+
return _context11.finish(22);
|
|
2229
2183
|
|
|
2230
2184
|
case 30:
|
|
2231
|
-
|
|
2185
|
+
_context11.next = 32;
|
|
2232
2186
|
return commit(results);
|
|
2233
2187
|
|
|
2234
2188
|
case 32:
|
|
2235
|
-
|
|
2189
|
+
_context11.next = 37;
|
|
2236
2190
|
break;
|
|
2237
2191
|
|
|
2238
2192
|
case 34:
|
|
2239
|
-
|
|
2240
|
-
|
|
2193
|
+
_context11.prev = 34;
|
|
2194
|
+
_context11.t1 = _context11['catch'](1);
|
|
2241
2195
|
|
|
2242
|
-
if (
|
|
2243
|
-
_message2.default.error(
|
|
2196
|
+
if (_context11.t1 != "cancelpwd") {
|
|
2197
|
+
_message2.default.error(_context11.t1);
|
|
2244
2198
|
setTimeout(function () {
|
|
2245
2199
|
that.handleCzk();
|
|
2246
2200
|
}, 500);
|
|
@@ -2248,34 +2202,36 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2248
2202
|
|
|
2249
2203
|
case 37:
|
|
2250
2204
|
case 'end':
|
|
2251
|
-
return
|
|
2205
|
+
return _context11.stop();
|
|
2252
2206
|
}
|
|
2253
2207
|
}
|
|
2254
|
-
},
|
|
2208
|
+
}, _callee11, this, [[1, 34], [5, 18, 22, 30], [23,, 25, 29]]);
|
|
2255
2209
|
}));
|
|
2256
2210
|
|
|
2257
|
-
return function handleUserInputs(
|
|
2258
|
-
return
|
|
2211
|
+
return function handleUserInputs(_x6) {
|
|
2212
|
+
return _ref20.apply(this, arguments);
|
|
2259
2213
|
};
|
|
2260
2214
|
}();
|
|
2261
2215
|
|
|
2262
|
-
var that, curmode, promises,
|
|
2216
|
+
var that, curmode, promises, _ref18, isNewRetailBCPos, _enumController$getEn21, PayStyle, isNeedPasswordForStoragePay, commit;
|
|
2263
2217
|
|
|
2264
|
-
return _regenerator2.default.wrap(function
|
|
2218
|
+
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
|
2265
2219
|
while (1) {
|
|
2266
|
-
switch (
|
|
2220
|
+
switch (_context12.prev = _context12.next) {
|
|
2267
2221
|
case 0:
|
|
2268
2222
|
that = _this2;
|
|
2269
2223
|
curmode = _this2.store.paymode.currentMode;
|
|
2270
2224
|
promises = [];
|
|
2271
|
-
|
|
2225
|
+
_ref18 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref18.isNewRetailBCPos;
|
|
2272
2226
|
|
|
2273
2227
|
if (isNewRetailBCPos) {
|
|
2274
2228
|
if (curmode.value > 0) {
|
|
2275
|
-
_enumController$
|
|
2229
|
+
_enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn21.PayStyle;
|
|
2276
2230
|
|
|
2277
2231
|
if (curmode.paymentType === PayStyle.hyczk) {
|
|
2278
|
-
|
|
2232
|
+
isNeedPasswordForStoragePay = (0, _tplusPoslogin.PosInitData)('IsNeedPasswordForStoragePay');
|
|
2233
|
+
|
|
2234
|
+
if (isNeedPasswordForStoragePay) {
|
|
2279
2235
|
promises.push(that.inputPwd(curmode));
|
|
2280
2236
|
}
|
|
2281
2237
|
}
|
|
@@ -2287,57 +2243,57 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2287
2243
|
}
|
|
2288
2244
|
|
|
2289
2245
|
commit = function () {
|
|
2290
|
-
var
|
|
2246
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(values) {
|
|
2291
2247
|
var result;
|
|
2292
|
-
return _regenerator2.default.wrap(function
|
|
2248
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
2293
2249
|
while (1) {
|
|
2294
|
-
switch (
|
|
2250
|
+
switch (_context10.prev = _context10.next) {
|
|
2295
2251
|
case 0:
|
|
2296
2252
|
if (!(values.length > 0)) {
|
|
2297
|
-
|
|
2253
|
+
_context10.next = 6;
|
|
2298
2254
|
break;
|
|
2299
2255
|
}
|
|
2300
2256
|
|
|
2301
|
-
|
|
2257
|
+
_context10.next = 3;
|
|
2302
2258
|
return that.store.validePwd(values[0]);
|
|
2303
2259
|
|
|
2304
2260
|
case 3:
|
|
2305
|
-
|
|
2306
|
-
|
|
2261
|
+
_context10.t0 = _context10.sent;
|
|
2262
|
+
_context10.next = 7;
|
|
2307
2263
|
break;
|
|
2308
2264
|
|
|
2309
2265
|
case 6:
|
|
2310
|
-
|
|
2266
|
+
_context10.t0 = "";
|
|
2311
2267
|
|
|
2312
2268
|
case 7:
|
|
2313
|
-
result =
|
|
2269
|
+
result = _context10.t0;
|
|
2314
2270
|
|
|
2315
2271
|
if (!(result == "")) {
|
|
2316
|
-
|
|
2272
|
+
_context10.next = 13;
|
|
2317
2273
|
break;
|
|
2318
2274
|
}
|
|
2319
2275
|
|
|
2320
2276
|
//成功
|
|
2321
2277
|
//返回
|
|
2322
|
-
that.setCurrentFocusAndAddPay(curmode.paymentType
|
|
2278
|
+
that.setCurrentFocusAndAddPay(curmode.paymentType);
|
|
2323
2279
|
_promise2.default.resolve();
|
|
2324
|
-
|
|
2280
|
+
_context10.next = 15;
|
|
2325
2281
|
break;
|
|
2326
2282
|
|
|
2327
2283
|
case 13:
|
|
2328
|
-
|
|
2284
|
+
_context10.next = 15;
|
|
2329
2285
|
return _promise2.default.reject(result);
|
|
2330
2286
|
|
|
2331
2287
|
case 15:
|
|
2332
2288
|
case 'end':
|
|
2333
|
-
return
|
|
2289
|
+
return _context10.stop();
|
|
2334
2290
|
}
|
|
2335
2291
|
}
|
|
2336
|
-
},
|
|
2292
|
+
}, _callee10, _this3);
|
|
2337
2293
|
}));
|
|
2338
2294
|
|
|
2339
|
-
return function commit(
|
|
2340
|
-
return
|
|
2295
|
+
return function commit(_x5) {
|
|
2296
|
+
return _ref19.apply(this, arguments);
|
|
2341
2297
|
};
|
|
2342
2298
|
}();
|
|
2343
2299
|
|
|
@@ -2345,10 +2301,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2345
2301
|
|
|
2346
2302
|
case 7:
|
|
2347
2303
|
case 'end':
|
|
2348
|
-
return
|
|
2304
|
+
return _context12.stop();
|
|
2349
2305
|
}
|
|
2350
2306
|
}
|
|
2351
|
-
},
|
|
2307
|
+
}, _callee12, _this3);
|
|
2352
2308
|
}));
|
|
2353
2309
|
|
|
2354
2310
|
_this2.fKeyboardOnOk = function (paymethodeId) {
|
|
@@ -2388,15 +2344,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2388
2344
|
};
|
|
2389
2345
|
|
|
2390
2346
|
_this2.inputPwd = function () {
|
|
2391
|
-
var
|
|
2347
|
+
var _ref21 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(paymode) {
|
|
2392
2348
|
var that, confirmPwd;
|
|
2393
|
-
return _regenerator2.default.wrap(function
|
|
2349
|
+
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
|
2394
2350
|
while (1) {
|
|
2395
|
-
switch (
|
|
2351
|
+
switch (_context13.prev = _context13.next) {
|
|
2396
2352
|
case 0:
|
|
2397
2353
|
that = _this2;
|
|
2398
2354
|
confirmPwd = _this2.state.confirmPwd;
|
|
2399
|
-
return
|
|
2355
|
+
return _context13.abrupt('return', new _promise2.default(function (resolve, reject) {
|
|
2400
2356
|
var modal = (0, _asyncModal2.default)({
|
|
2401
2357
|
onPressEnter: function onPressEnter() {
|
|
2402
2358
|
_keyboard2.default.close();
|
|
@@ -2404,8 +2360,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2404
2360
|
// if (v !== '') {
|
|
2405
2361
|
modal.destroy();
|
|
2406
2362
|
|
|
2407
|
-
var
|
|
2408
|
-
confirmPwd =
|
|
2363
|
+
var _ref22 = that.state || {},
|
|
2364
|
+
confirmPwd = _ref22.confirmPwd;
|
|
2409
2365
|
|
|
2410
2366
|
setTimeout(function () {
|
|
2411
2367
|
paymode.authCode = v;
|
|
@@ -2495,8 +2451,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2495
2451
|
type: 'primary', size: 'large', onClick: function onClick() {
|
|
2496
2452
|
var v = (0, _trim3.default)(that['inputAmount']['input']['value']);
|
|
2497
2453
|
|
|
2498
|
-
var
|
|
2499
|
-
confirmPwd =
|
|
2454
|
+
var _ref23 = that.state || {},
|
|
2455
|
+
confirmPwd = _ref23.confirmPwd;
|
|
2500
2456
|
// if (v !== '') {
|
|
2501
2457
|
|
|
2502
2458
|
|
|
@@ -2530,68 +2486,181 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2530
2486
|
|
|
2531
2487
|
case 3:
|
|
2532
2488
|
case 'end':
|
|
2533
|
-
return
|
|
2489
|
+
return _context13.stop();
|
|
2534
2490
|
}
|
|
2535
2491
|
}
|
|
2536
|
-
},
|
|
2492
|
+
}, _callee13, _this3);
|
|
2537
2493
|
}));
|
|
2538
2494
|
|
|
2539
|
-
return function (
|
|
2540
|
-
return
|
|
2495
|
+
return function (_x7) {
|
|
2496
|
+
return _ref21.apply(this, arguments);
|
|
2541
2497
|
};
|
|
2542
2498
|
}();
|
|
2543
2499
|
|
|
2544
|
-
_this2.
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2500
|
+
_this2.isNoProductTip = function (nonProductMap) {
|
|
2501
|
+
var names = [];
|
|
2502
|
+
var temphtml = [];
|
|
2503
|
+
var count = 0;
|
|
2504
|
+
if ((0, _keys2.default)(nonProductMap).length > 0) {
|
|
2505
|
+
for (var key in nonProductMap) {
|
|
2506
|
+
count++;
|
|
2507
|
+
names.push('【' + key + '】');
|
|
2508
|
+
temphtml.push(count + '、' + nonProductMap[key]);
|
|
2509
|
+
}
|
|
2510
|
+
_modalWraper2.default.warning({
|
|
2511
|
+
title: '不可配送商品',
|
|
2512
|
+
content: '\u5546\u54C1' + names.join(',') + '\u4E0D\u53EF\u914D\u9001\uFF0C\u53EF\u80FD\u539F\u56E0\u5982\u4E0B\uFF1A' + temphtml.join(';')
|
|
2513
|
+
});
|
|
2514
|
+
return true;
|
|
2515
|
+
}
|
|
2516
|
+
return false;
|
|
2517
|
+
};
|
|
2548
2518
|
|
|
2549
|
-
|
|
2550
|
-
|
|
2519
|
+
_this2.btnDebounced = function () {
|
|
2520
|
+
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(type, bquick) {
|
|
2521
|
+
var _ref25, IdbusiType, CustomerPhone, DistributionMode, _this2$store7, getPerformanceDistributionValue, getPosFreight, updataFreight, IPMSG, _ref26, nonProductMap, _ref26$freightProduct, freightProductDTOList, data, _enumController$getEn22, PayStyle, _this2$store8, paymode, brefund, boriginReturn, newStyle, status;
|
|
2522
|
+
|
|
2523
|
+
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
|
2524
|
+
while (1) {
|
|
2525
|
+
switch (_context14.prev = _context14.next) {
|
|
2526
|
+
case 0:
|
|
2527
|
+
_ref25 = _this2.context.viewModel.data || {}, IdbusiType = _ref25.IdbusiType, CustomerPhone = _ref25.CustomerPhone, DistributionMode = _ref25.DistributionMode;
|
|
2528
|
+
//预订时,若没录入买家手机号,或配送方式为快递时,弹框买家信息确认框
|
|
2529
|
+
|
|
2530
|
+
if (!(IdbusiType == 38)) {
|
|
2531
|
+
_context14.next = 28;
|
|
2532
|
+
break;
|
|
2533
|
+
}
|
|
2551
2534
|
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
newStyle = _this2$store7.newStyle;
|
|
2535
|
+
if (!(!CustomerPhone || DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
|
|
2536
|
+
_context14.next = 5;
|
|
2537
|
+
break;
|
|
2538
|
+
}
|
|
2557
2539
|
|
|
2540
|
+
_context14.next = 5;
|
|
2541
|
+
return _this2.props.openBuyerModal();
|
|
2558
2542
|
|
|
2559
|
-
|
|
2543
|
+
case 5:
|
|
2544
|
+
if (!(DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
|
|
2545
|
+
_context14.next = 28;
|
|
2546
|
+
break;
|
|
2547
|
+
}
|
|
2560
2548
|
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
if (v.paymentType === PayStyle.xianjin && v.value !== '0.00') {
|
|
2564
|
-
status = true;
|
|
2565
|
-
}
|
|
2566
|
-
});
|
|
2567
|
-
_this2.setState({
|
|
2568
|
-
isXianjin: status ? true : false
|
|
2569
|
-
});
|
|
2549
|
+
_this2$store7 = _this2.store, getPerformanceDistributionValue = _this2$store7.getPerformanceDistributionValue, getPosFreight = _this2$store7.getPosFreight, updataFreight = _this2$store7.updataFreight;
|
|
2550
|
+
IPMSG = {};
|
|
2570
2551
|
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2552
|
+
if (!!window.localStorage.IPMSG) {
|
|
2553
|
+
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
2554
|
+
}
|
|
2555
|
+
_context14.next = 11;
|
|
2556
|
+
return getPerformanceDistributionValue({ cip: IPMSG.query || "", dto: _this2.context.viewModel.data });
|
|
2557
|
+
|
|
2558
|
+
case 11:
|
|
2559
|
+
_ref26 = _context14.sent;
|
|
2560
|
+
nonProductMap = _ref26.nonProductMap;
|
|
2561
|
+
_ref26$freightProduct = _ref26.freightProductDTOList;
|
|
2562
|
+
freightProductDTOList = _ref26$freightProduct === undefined ? [] : _ref26$freightProduct;
|
|
2563
|
+
|
|
2564
|
+
console.log('zlfnonProductMap', nonProductMap);
|
|
2565
|
+
console.log('zlffreightProductDTOList', freightProductDTOList);
|
|
2566
|
+
|
|
2567
|
+
if (!_this2.isNoProductTip(nonProductMap)) {
|
|
2568
|
+
_context14.next = 19;
|
|
2569
|
+
break;
|
|
2570
|
+
}
|
|
2571
|
+
|
|
2572
|
+
return _context14.abrupt('return');
|
|
2573
|
+
|
|
2574
|
+
case 19:
|
|
2575
|
+
_context14.next = 21;
|
|
2576
|
+
return _this2.props.openWareHouseModal(freightProductDTOList);
|
|
2577
|
+
|
|
2578
|
+
case 21:
|
|
2579
|
+
_context14.next = 23;
|
|
2580
|
+
return getPosFreight({ cip: IPMSG.query || "", dto: _this2.context.viewModel.data });
|
|
2581
|
+
|
|
2582
|
+
case 23:
|
|
2583
|
+
data = _context14.sent;
|
|
2584
|
+
|
|
2585
|
+
if (!_this2.isNoProductTip(data.nonProductMap)) {
|
|
2586
|
+
_context14.next = 26;
|
|
2587
|
+
break;
|
|
2588
|
+
}
|
|
2589
|
+
|
|
2590
|
+
return _context14.abrupt('return');
|
|
2591
|
+
|
|
2592
|
+
case 26:
|
|
2593
|
+
_context14.next = 28;
|
|
2594
|
+
return _this2.props.updataFreight(data.freight);
|
|
2595
|
+
|
|
2596
|
+
case 28:
|
|
2597
|
+
|
|
2598
|
+
_this2.setState({
|
|
2599
|
+
bquick: bquick
|
|
2600
|
+
});
|
|
2601
|
+
_enumController$getEn22 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn22.PayStyle;
|
|
2602
|
+
_this2$store8 = _this2.store, paymode = _this2$store8.paymode, brefund = _this2$store8.brefund, boriginReturn = _this2$store8.boriginReturn, newStyle = _this2$store8.newStyle;
|
|
2603
|
+
|
|
2604
|
+
if (!(bquick && !_mutantsMicrofx.stores.offlineSys.shouldSettlement(type))) {
|
|
2605
|
+
_context14.next = 33;
|
|
2606
|
+
break;
|
|
2607
|
+
}
|
|
2608
|
+
|
|
2609
|
+
return _context14.abrupt('return', false);
|
|
2610
|
+
|
|
2611
|
+
case 33:
|
|
2612
|
+
status = false;
|
|
2613
|
+
|
|
2614
|
+
paymode.thePaymodes.forEach(function (v) {
|
|
2615
|
+
if (v.paymentType === PayStyle.xianjin && v.value !== '0.00') {
|
|
2616
|
+
status = true;
|
|
2617
|
+
}
|
|
2618
|
+
});
|
|
2619
|
+
_this2.setState({
|
|
2620
|
+
isXianjin: status ? true : false
|
|
2621
|
+
});
|
|
2622
|
+
|
|
2623
|
+
if (!_this2.btndebounced) {
|
|
2624
|
+
_context14.next = 38;
|
|
2625
|
+
break;
|
|
2626
|
+
}
|
|
2627
|
+
|
|
2628
|
+
return _context14.abrupt('return');
|
|
2629
|
+
|
|
2630
|
+
case 38:
|
|
2631
|
+
_this2.btndebounced = (0, _debounce3.default)(function () {
|
|
2632
|
+
if (bquick) {
|
|
2633
|
+
_this2.quickSettle(type);
|
|
2634
|
+
} else {
|
|
2635
|
+
_this2.showModal();
|
|
2636
|
+
}
|
|
2637
|
+
}, 1000, {
|
|
2638
|
+
'leading': true,
|
|
2639
|
+
'trailing': false
|
|
2640
|
+
});
|
|
2641
|
+
_this2.btndebounced();
|
|
2642
|
+
setTimeout(function () {
|
|
2643
|
+
_this2.btndebounced.cancel();
|
|
2644
|
+
_this2.btndebounced = null;
|
|
2645
|
+
}, 2000);
|
|
2646
|
+
|
|
2647
|
+
case 41:
|
|
2648
|
+
case 'end':
|
|
2649
|
+
return _context14.stop();
|
|
2650
|
+
}
|
|
2651
|
+
}
|
|
2652
|
+
}, _callee14, _this3);
|
|
2653
|
+
}));
|
|
2654
|
+
|
|
2655
|
+
return function (_x8, _x9) {
|
|
2656
|
+
return _ref24.apply(this, arguments);
|
|
2657
|
+
};
|
|
2658
|
+
}();
|
|
2590
2659
|
|
|
2591
2660
|
_this2.onCzkChange = function (v) {
|
|
2592
2661
|
// console.log("czk change:"+new Date().toLocaleTimeString())
|
|
2593
|
-
var
|
|
2594
|
-
isNewRetailBCPos =
|
|
2662
|
+
var _ref27 = _mutantsUtil.platform || {},
|
|
2663
|
+
isNewRetailBCPos = _ref27.isNewRetailBCPos;
|
|
2595
2664
|
|
|
2596
2665
|
if (!isNewRetailBCPos) {
|
|
2597
2666
|
_this2.store.paymode.currentMode.member.setCardNo(v);
|
|
@@ -2652,8 +2721,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2652
2721
|
};
|
|
2653
2722
|
|
|
2654
2723
|
_this2.checkCharge = function () {
|
|
2655
|
-
var _enumController$
|
|
2656
|
-
PayStyle = _enumController$
|
|
2724
|
+
var _enumController$getEn23 = _mutantsUtil.enumController.getEnumOj(),
|
|
2725
|
+
PayStyle = _enumController$getEn23.PayStyle;
|
|
2657
2726
|
|
|
2658
2727
|
var paymode = _this2.store.paymode;
|
|
2659
2728
|
|
|
@@ -2700,8 +2769,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2700
2769
|
};
|
|
2701
2770
|
|
|
2702
2771
|
_this2.getXianjinPayment = function (payType, value) {
|
|
2703
|
-
var _enumController$
|
|
2704
|
-
PayStyle = _enumController$
|
|
2772
|
+
var _enumController$getEn24 = _mutantsUtil.enumController.getEnumOj(),
|
|
2773
|
+
PayStyle = _enumController$getEn24.PayStyle;
|
|
2705
2774
|
|
|
2706
2775
|
var isManualIntoAmount = _this2.state.isManualIntoAmount;
|
|
2707
2776
|
|
|
@@ -2709,8 +2778,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2709
2778
|
};
|
|
2710
2779
|
|
|
2711
2780
|
_this2.getXianjinBalance = function (payType, value) {
|
|
2712
|
-
var _enumController$
|
|
2713
|
-
PayStyle = _enumController$
|
|
2781
|
+
var _enumController$getEn25 = _mutantsUtil.enumController.getEnumOj(),
|
|
2782
|
+
PayStyle = _enumController$getEn25.PayStyle;
|
|
2714
2783
|
//找零金额-存在权限控制
|
|
2715
2784
|
|
|
2716
2785
|
|
|
@@ -2728,11 +2797,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2728
2797
|
type = _this2$props3.type;
|
|
2729
2798
|
|
|
2730
2799
|
var isManualIntoAmount = void 0;
|
|
2800
|
+
var _this2$context$viewMo2 = _this2.context.viewModel.data,
|
|
2801
|
+
BuyerPayFreight = _this2$context$viewMo2.BuyerPayFreight,
|
|
2802
|
+
DistributionMode = _this2$context$viewMo2.DistributionMode;
|
|
2731
2803
|
// 付款弹窗
|
|
2804
|
+
|
|
2732
2805
|
return new _promise2.default(function (resolve, reject) {
|
|
2733
|
-
var _enumController$
|
|
2734
|
-
PayStyle = _enumController$
|
|
2735
|
-
PayIcon2 = _enumController$
|
|
2806
|
+
var _enumController$getEn26 = _mutantsUtil.enumController.getEnumOj(),
|
|
2807
|
+
PayStyle = _enumController$getEn26.PayStyle,
|
|
2808
|
+
PayIcon2 = _enumController$getEn26.PayIcon2;
|
|
2736
2809
|
|
|
2737
2810
|
var modal = (0, _asyncModal2.default)({
|
|
2738
2811
|
onPressEnter: function onPressEnter() {
|
|
@@ -2817,7 +2890,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2817
2890
|
_react2.default.createElement(
|
|
2818
2891
|
'span',
|
|
2819
2892
|
{ className: 'yfje' },
|
|
2820
|
-
paymode.value
|
|
2893
|
+
paymode.value,
|
|
2894
|
+
(DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && BuyerPayFreight && BuyerPayFreight > 0 ? _react2.default.createElement(
|
|
2895
|
+
'span',
|
|
2896
|
+
{ className: 'freight' },
|
|
2897
|
+
'(\u5305\u542B',
|
|
2898
|
+
BuyerPayFreight,
|
|
2899
|
+
'\u5143\u8FD0\u8D39)'
|
|
2900
|
+
) : null
|
|
2821
2901
|
)
|
|
2822
2902
|
),
|
|
2823
2903
|
paymode.paymentType == PayStyle.xianjin && _react2.default.createElement(
|
|
@@ -2997,12 +3077,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2997
3077
|
};
|
|
2998
3078
|
|
|
2999
3079
|
_this2.checkCurrentModeHaveMutex = function (type) {
|
|
3000
|
-
var _this2$
|
|
3001
|
-
paymode = _this2$
|
|
3002
|
-
newStyle = _this2$
|
|
3080
|
+
var _this2$store9 = _this2.store,
|
|
3081
|
+
paymode = _this2$store9.paymode,
|
|
3082
|
+
newStyle = _this2$store9.newStyle;
|
|
3003
3083
|
|
|
3004
|
-
var _enumController$
|
|
3005
|
-
PayStyle = _enumController$
|
|
3084
|
+
var _enumController$getEn27 = _mutantsUtil.enumController.getEnumOj(),
|
|
3085
|
+
PayStyle = _enumController$getEn27.PayStyle;
|
|
3006
3086
|
|
|
3007
3087
|
var payTypeList = [PayStyle.SQBPAY, PayStyle.CSYH, PayStyle.smzf];
|
|
3008
3088
|
var payTypeFilterList = payTypeList.filter(function (filterType) {
|
|
@@ -3023,15 +3103,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3023
3103
|
};
|
|
3024
3104
|
|
|
3025
3105
|
_this2.checkModeDisabled = function (type, brefund, boriginReturn) {
|
|
3026
|
-
var _enumController$
|
|
3027
|
-
PayStyle = _enumController$
|
|
3106
|
+
var _enumController$getEn28 = _mutantsUtil.enumController.getEnumOj(),
|
|
3107
|
+
PayStyle = _enumController$getEn28.PayStyle;
|
|
3028
3108
|
|
|
3029
3109
|
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);
|
|
3030
3110
|
};
|
|
3031
3111
|
|
|
3032
3112
|
_this2.checkSettleDisabled = function (paymode, thePaymodes) {
|
|
3033
|
-
var _enumController$
|
|
3034
|
-
PayStyle = _enumController$
|
|
3113
|
+
var _enumController$getEn29 = _mutantsUtil.enumController.getEnumOj(),
|
|
3114
|
+
PayStyle = _enumController$getEn29.PayStyle;
|
|
3035
3115
|
|
|
3036
3116
|
console.log("settlement.checkSettleDisabled开始执行,参数:", { paymode: paymode, thePaymodes: thePaymodes });
|
|
3037
3117
|
if (paymode.amount == 0 && paymode.received == 0) {
|
|
@@ -3077,8 +3157,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3077
3157
|
};
|
|
3078
3158
|
|
|
3079
3159
|
_this2.editCzkModal = function () {
|
|
3080
|
-
var _enumController$
|
|
3081
|
-
PayStyle = _enumController$
|
|
3160
|
+
var _enumController$getEn30 = _mutantsUtil.enumController.getEnumOj(),
|
|
3161
|
+
PayStyle = _enumController$getEn30.PayStyle;
|
|
3082
3162
|
|
|
3083
3163
|
(0, _find3.default)(_this2.store.paymode.thePaymodes, function (mode) {
|
|
3084
3164
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
@@ -3172,29 +3252,30 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3172
3252
|
|
|
3173
3253
|
_this2.hasElectron = hasElectron;
|
|
3174
3254
|
|
|
3175
|
-
var
|
|
3176
|
-
|
|
3255
|
+
var _ref28 = _mutantsMicrofx.localStore.get('user') || {},
|
|
3256
|
+
_ref28$loginInfo = _ref28.loginInfo;
|
|
3177
3257
|
|
|
3178
|
-
|
|
3179
|
-
var
|
|
3180
|
-
|
|
3181
|
-
|
|
3258
|
+
_ref28$loginInfo = _ref28$loginInfo === undefined ? {} : _ref28$loginInfo;
|
|
3259
|
+
var ICCardServer = _ref28$loginInfo.ICCardServer,
|
|
3260
|
+
ICCardPassword = _ref28$loginInfo.ICCardPassword,
|
|
3261
|
+
Book = _ref28$loginInfo.Book,
|
|
3262
|
+
PercentageWhenBook = _ref28$loginInfo.PercentageWhenBook;
|
|
3182
3263
|
|
|
3183
|
-
_this2.isStorageCardInputType = MemberMeStorageCardInputByKeyBoard; // 仅储值卡是否禁用键盘输入,'0'为不禁用 '1'为禁用
|
|
3184
3264
|
_this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
|
|
3185
3265
|
_this2.iCCardPassword = ICCardPassword; //IC卡密码
|
|
3266
|
+
_this2.isBook = Book;
|
|
3267
|
+
_this2.percentageWhenBook = PercentageWhenBook;
|
|
3186
3268
|
//移动端环境下,没有读取IC卡的方式。
|
|
3187
3269
|
|
|
3188
|
-
var
|
|
3189
|
-
isHorizontalPad =
|
|
3190
|
-
isHorizontalSunMi =
|
|
3270
|
+
var _ref29 = _mutantsUtil.platform || {},
|
|
3271
|
+
isHorizontalPad = _ref29.isHorizontalPad,
|
|
3272
|
+
isHorizontalSunMi = _ref29.isHorizontalSunMi;
|
|
3191
3273
|
|
|
3192
3274
|
_this2.isHorizontalPad = !!isHorizontalPad;
|
|
3193
3275
|
_this2.isHorizontalSunMi = !!isHorizontalSunMi;
|
|
3194
3276
|
_this2.isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;
|
|
3195
3277
|
_this2.handleReadICard = _this2.handleReadICard.bind(_this2);
|
|
3196
3278
|
_this2.setTimer = null;
|
|
3197
|
-
_this2.keypressStime = null;
|
|
3198
3279
|
return _this2;
|
|
3199
3280
|
}
|
|
3200
3281
|
|
|
@@ -3303,11 +3384,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3303
3384
|
//jfdx
|
|
3304
3385
|
|
|
3305
3386
|
|
|
3306
|
-
/**
|
|
3307
|
-
*
|
|
3308
|
-
* @param {*} thePaymodes 支付方式列表
|
|
3309
|
-
* @param {*} currenIndex 当前支付方式下标
|
|
3310
|
-
* @param {*} symbol 从当前currenIndex开始 还是从当前currenIndex截止
|
|
3387
|
+
/**
|
|
3388
|
+
*
|
|
3389
|
+
* @param {*} thePaymodes 支付方式列表
|
|
3390
|
+
* @param {*} currenIndex 当前支付方式下标
|
|
3391
|
+
* @param {*} symbol 从当前currenIndex开始 还是从当前currenIndex截止
|
|
3311
3392
|
*/
|
|
3312
3393
|
|
|
3313
3394
|
// 处理客显显示功能
|
|
@@ -3335,9 +3416,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3335
3416
|
value: function renderToolbtn(mode, index) {
|
|
3336
3417
|
var _this7 = this;
|
|
3337
3418
|
|
|
3338
|
-
var _enumController$
|
|
3339
|
-
PayIcon = _enumController$
|
|
3340
|
-
PayStyle = _enumController$
|
|
3419
|
+
var _enumController$getEn31 = _mutantsUtil.enumController.getEnumOj(),
|
|
3420
|
+
PayIcon = _enumController$getEn31.PayIcon,
|
|
3421
|
+
PayStyle = _enumController$getEn31.PayStyle;
|
|
3341
3422
|
|
|
3342
3423
|
var isReturn = this.props.isReturn;
|
|
3343
3424
|
var _store = this.store,
|
|
@@ -3409,11 +3490,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3409
3490
|
value: function render() {
|
|
3410
3491
|
var _this8 = this;
|
|
3411
3492
|
|
|
3412
|
-
var _enumController$
|
|
3413
|
-
PayIcon = _enumController$
|
|
3414
|
-
PayIcon2 = _enumController$
|
|
3415
|
-
PayStyle = _enumController$
|
|
3416
|
-
Differentiate = _enumController$
|
|
3493
|
+
var _enumController$getEn32 = _mutantsUtil.enumController.getEnumOj(),
|
|
3494
|
+
PayIcon = _enumController$getEn32.PayIcon,
|
|
3495
|
+
PayIcon2 = _enumController$getEn32.PayIcon2,
|
|
3496
|
+
PayStyle = _enumController$getEn32.PayStyle,
|
|
3497
|
+
Differentiate = _enumController$getEn32.Differentiate;
|
|
3417
3498
|
|
|
3418
3499
|
var _state2 = this.state,
|
|
3419
3500
|
btnDissabled = _state2.btnDissabled,
|
|
@@ -3421,11 +3502,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3421
3502
|
discountTotalAmount = _state2.discountTotalAmount,
|
|
3422
3503
|
discountRetailTotalAount = _state2.discountRetailTotalAount,
|
|
3423
3504
|
discountPrototypeTotalAmount = _state2.discountPrototypeTotalAmount,
|
|
3424
|
-
storageValue = _state2.storageValue
|
|
3425
|
-
czkValue = _state2.czkValue;
|
|
3505
|
+
storageValue = _state2.storageValue;
|
|
3426
3506
|
|
|
3427
|
-
var
|
|
3428
|
-
isNewRetailBCPos =
|
|
3507
|
+
var _ref30 = _mutantsUtil.platform || {},
|
|
3508
|
+
isNewRetailBCPos = _ref30.isNewRetailBCPos;
|
|
3429
3509
|
|
|
3430
3510
|
var _store2 = this.store,
|
|
3431
3511
|
paymode = _store2.paymode,
|
|
@@ -3444,6 +3524,21 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3444
3524
|
|
|
3445
3525
|
var boriginReturn = this.context && this.context.viewModel && this.context.viewModel.data && JSON.getCellValue(this.context.viewModel.data, "IsOriginalReturn");
|
|
3446
3526
|
var totalTaxAmount = this.context && this.context.viewModel && this.context.viewModel.data && this.context.viewModel.data.TotalTaxAmount;
|
|
3527
|
+
|
|
3528
|
+
//收订金
|
|
3529
|
+
|
|
3530
|
+
var _ref31 = this.context && this.context.viewModel && this.context.viewModel.data,
|
|
3531
|
+
IdbusiType = _ref31.IdbusiType,
|
|
3532
|
+
DistributionMode = _ref31.DistributionMode,
|
|
3533
|
+
BuyerPayFreight = _ref31.BuyerPayFreight;
|
|
3534
|
+
|
|
3535
|
+
if (IdbusiType == 38 && this.isBook && this.percentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
|
|
3536
|
+
totalTaxAmount = totalTaxAmount * this.percentageWhenBook / 100;
|
|
3537
|
+
}
|
|
3538
|
+
if (IdbusiType == 39) {
|
|
3539
|
+
totalTaxAmount = _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount;
|
|
3540
|
+
}
|
|
3541
|
+
|
|
3447
3542
|
// 单据模式
|
|
3448
3543
|
var thePaymodes = newStyle ? (0, _filter3.default)(paymode.thePaymodes, function (m) {
|
|
3449
3544
|
return !(_this8.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0);
|
|
@@ -3488,11 +3583,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3488
3583
|
quantity4 = 0;
|
|
3489
3584
|
var sumQuantity = 0; //数量总和的值,包括称重的。
|
|
3490
3585
|
|
|
3491
|
-
var
|
|
3492
|
-
|
|
3493
|
-
buyQuantity =
|
|
3494
|
-
|
|
3495
|
-
returnQuantity =
|
|
3586
|
+
var _ref32 = quantityDetail || {},
|
|
3587
|
+
_ref32$buyQuantity = _ref32.buyQuantity,
|
|
3588
|
+
buyQuantity = _ref32$buyQuantity === undefined ? 0 : _ref32$buyQuantity,
|
|
3589
|
+
_ref32$returnQuantity = _ref32.returnQuantity,
|
|
3590
|
+
returnQuantity = _ref32$returnQuantity === undefined ? 0 : _ref32$returnQuantity;
|
|
3496
3591
|
|
|
3497
3592
|
var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
|
|
3498
3593
|
quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
|
|
@@ -3510,9 +3605,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3510
3605
|
sumQuantity = this.changeDecimalBuZero(sumQuantity, quantityPrecision);
|
|
3511
3606
|
}
|
|
3512
3607
|
|
|
3513
|
-
var
|
|
3514
|
-
return mode.paymentType === PayStyle.hyczk && mode.value !== '0.00';
|
|
3515
|
-
});
|
|
3608
|
+
var isNeedPasswordForStoragePay = (0, _tplusPoslogin.PosInitData)('IsNeedPasswordForStoragePay');
|
|
3516
3609
|
return _react2.default.createElement(
|
|
3517
3610
|
'div',
|
|
3518
3611
|
{ className: 'billingSettlement', ref: function ref(r) {
|
|
@@ -3718,6 +3811,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3718
3811
|
_react2.default.createElement(
|
|
3719
3812
|
'div',
|
|
3720
3813
|
{ className: (0, _classnames4.default)({ "main": true, "focusbottom": currentIndex == index }) },
|
|
3814
|
+
_react2.default.createElement(
|
|
3815
|
+
'div',
|
|
3816
|
+
{ className: 'lefticon primary-color', onClick: function onClick() {
|
|
3817
|
+
_this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType);
|
|
3818
|
+
} },
|
|
3819
|
+
_react2.default.createElement(_ticon2.default, { type: 'jianqu', className: 'minus' })
|
|
3820
|
+
),
|
|
3721
3821
|
_react2.default.createElement(
|
|
3722
3822
|
'div',
|
|
3723
3823
|
{ className: (0, _classnames4.default)({ "name": true }) },
|
|
@@ -3747,12 +3847,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3747
3847
|
}
|
|
3748
3848
|
})
|
|
3749
3849
|
),
|
|
3750
|
-
_react2.default.createElement(
|
|
3751
|
-
'
|
|
3752
|
-
{ className: '
|
|
3753
|
-
|
|
3850
|
+
!isNeedPasswordForStoragePay && _react2.default.createElement(
|
|
3851
|
+
'div',
|
|
3852
|
+
{ className: 'righticon', style: { display: mode.paymentType == PayStyle.hyczk ? 'inline-block' : 'none' },
|
|
3853
|
+
onClick: function onClick() {
|
|
3854
|
+
_this8.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
|
3754
3855
|
} },
|
|
3755
|
-
_react2.default.createElement(_ticon2.default, { type: '
|
|
3856
|
+
_react2.default.createElement(_ticon2.default, { type: 'zengjia', className: 'plus primary-color' })
|
|
3756
3857
|
)
|
|
3757
3858
|
),
|
|
3758
3859
|
mode.paymentType == PayStyle.djq ? _react2.default.createElement(
|
|
@@ -3779,7 +3880,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3779
3880
|
_react2.default.createElement(
|
|
3780
3881
|
'span',
|
|
3781
3882
|
{ className: 'fl' },
|
|
3782
|
-
mode && mode.
|
|
3883
|
+
isNewRetailBCPos ? mode.member && mode.member.StorageCardNo : mode.member && mode.member.cardNo
|
|
3783
3884
|
),
|
|
3784
3885
|
_react2.default.createElement('br', null),
|
|
3785
3886
|
_react2.default.createElement(
|
|
@@ -3791,19 +3892,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3791
3892
|
'span',
|
|
3792
3893
|
{ className: 'fl' },
|
|
3793
3894
|
(0, _utils.getFixedNumber)(mode.balance)
|
|
3794
|
-
),
|
|
3795
|
-
_react2.default.createElement('br', null),
|
|
3796
|
-
themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === mode.paymethodId && !isReturn && _react2.default.createElement(
|
|
3797
|
-
_button2.default,
|
|
3798
|
-
{ onClick: function onClick() {
|
|
3799
|
-
_this8.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
|
3800
|
-
}, className: 'addCard btn-border-primary' },
|
|
3801
|
-
_react2.default.createElement(_ticon2.default, { type: 'jiahao', className: 'plus b-theme-color' }),
|
|
3802
|
-
_react2.default.createElement(
|
|
3803
|
-
'span',
|
|
3804
|
-
null,
|
|
3805
|
-
'\u6DFB\u52A0\u5361'
|
|
3806
|
-
)
|
|
3807
3895
|
)
|
|
3808
3896
|
)
|
|
3809
3897
|
);
|
|
@@ -3884,6 +3972,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3884
3972
|
{ className: 'received' },
|
|
3885
3973
|
(0, _utils.getFixedNumber)(Math.abs(paymode.receivable))
|
|
3886
3974
|
)
|
|
3975
|
+
),
|
|
3976
|
+
_react2.default.createElement(
|
|
3977
|
+
'div',
|
|
3978
|
+
{ className: 'receivable', style: { display: (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && BuyerPayFreight && BuyerPayFreight > 0 ? 'block' : 'none' } },
|
|
3979
|
+
_react2.default.createElement(
|
|
3980
|
+
'span',
|
|
3981
|
+
null,
|
|
3982
|
+
'\u8FD0\u8D39'
|
|
3983
|
+
),
|
|
3984
|
+
_react2.default.createElement(
|
|
3985
|
+
'span',
|
|
3986
|
+
{ className: 'received' },
|
|
3987
|
+
(0, _utils.getFixedNumber)(Math.abs(BuyerPayFreight))
|
|
3988
|
+
)
|
|
3887
3989
|
)
|
|
3888
3990
|
),
|
|
3889
3991
|
!isReturn && _react2.default.createElement(
|
|
@@ -4100,14 +4202,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4100
4202
|
// return;
|
|
4101
4203
|
// }
|
|
4102
4204
|
// }
|
|
4103
|
-
// mode.paymentType == PayStyle.hyczk && czkinput && czkinput.value !== '0.00' ? this.editCzkModal() :
|
|
4104
|
-
|
|
4105
|
-
if (themodeHyczk && themodeHyczk.length === 0) {
|
|
4106
|
-
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4107
|
-
}
|
|
4108
|
-
} else {
|
|
4109
|
-
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4110
|
-
}
|
|
4205
|
+
// mode.paymentType == PayStyle.hyczk && czkinput && czkinput.value !== '0.00' ? this.editCzkModal() :
|
|
4206
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4111
4207
|
},
|
|
4112
4208
|
value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
|
|
4113
4209
|
return tm.paymentType == PayStyle.hyczk;
|
|
@@ -4160,7 +4256,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4160
4256
|
_react2.default.createElement(
|
|
4161
4257
|
'span',
|
|
4162
4258
|
null,
|
|
4163
|
-
m && m.
|
|
4259
|
+
isNewRetailBCPos ? m.member && m.member.StorageCardNo : m.member && m.member.cardNo
|
|
4164
4260
|
),
|
|
4165
4261
|
_react2.default.createElement(
|
|
4166
4262
|
'span',
|
|
@@ -4171,19 +4267,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4171
4267
|
'span',
|
|
4172
4268
|
{ className: 'balance fr' },
|
|
4173
4269
|
'\u652F\u4ED8\u91D1\u989D\uFF1A'
|
|
4174
|
-
),
|
|
4175
|
-
_react2.default.createElement('br', null),
|
|
4176
|
-
themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === m.paymethodId && _react2.default.createElement(
|
|
4177
|
-
_button2.default,
|
|
4178
|
-
{ onClick: function onClick() {
|
|
4179
|
-
return _this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4180
|
-
}, className: 'addCard btn-border-primary' },
|
|
4181
|
-
_react2.default.createElement(_ticon2.default, { type: 'jiahao', className: 'plus b-theme-color' }),
|
|
4182
|
-
_react2.default.createElement(
|
|
4183
|
-
'span',
|
|
4184
|
-
null,
|
|
4185
|
-
'\u6DFB\u52A0\u5361'
|
|
4186
|
-
)
|
|
4187
4270
|
)
|
|
4188
4271
|
);
|
|
4189
4272
|
})
|
|
@@ -4343,7 +4426,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4343
4426
|
{ key: index + '', className: 'modeItem' },
|
|
4344
4427
|
_react2.default.createElement(
|
|
4345
4428
|
'div',
|
|
4346
|
-
{ className: 'main
|
|
4429
|
+
{ className: 'main ' + (currentIndex == index && 'settlement-pay-item-border') },
|
|
4430
|
+
_react2.default.createElement(
|
|
4431
|
+
'div',
|
|
4432
|
+
{ className: 'lefticon', onClick: function onClick() {
|
|
4433
|
+
_this8.onDelPay(index);
|
|
4434
|
+
} },
|
|
4435
|
+
_react2.default.createElement(_ticon2.default, { type: 'jianqu', className: 'minus' })
|
|
4436
|
+
),
|
|
4347
4437
|
_react2.default.createElement(
|
|
4348
4438
|
'div',
|
|
4349
4439
|
{ className: (0, _classnames4.default)({ "name": true }) },
|
|
@@ -4368,12 +4458,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4368
4458
|
}
|
|
4369
4459
|
})
|
|
4370
4460
|
),
|
|
4371
|
-
_react2.default.createElement(
|
|
4461
|
+
!isNeedPasswordForStoragePay && _react2.default.createElement(
|
|
4372
4462
|
'div',
|
|
4373
|
-
{ className: '
|
|
4374
|
-
|
|
4463
|
+
{ className: 'righticon', style: { display: mode.paymentType == PayStyle.hyczk ? 'inline-block' : 'none' },
|
|
4464
|
+
onClick: function onClick() {
|
|
4465
|
+
_this8.appendCzkmode('', 'noPlaySetPwd');
|
|
4375
4466
|
} },
|
|
4376
|
-
_react2.default.createElement(_ticon2.default, { type: '
|
|
4467
|
+
_react2.default.createElement(_ticon2.default, { type: 'zengjia', className: 'plus primary-color' })
|
|
4377
4468
|
)
|
|
4378
4469
|
),
|
|
4379
4470
|
mode.paymentType == PayStyle.djq ? _react2.default.createElement(
|
|
@@ -4400,7 +4491,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4400
4491
|
_react2.default.createElement(
|
|
4401
4492
|
'span',
|
|
4402
4493
|
{ className: 'fl' },
|
|
4403
|
-
mode && mode.
|
|
4494
|
+
isNewRetailBCPos ? mode.member && mode.member.StorageCardNo : mode.member && mode.member.cardNo
|
|
4404
4495
|
),
|
|
4405
4496
|
_react2.default.createElement('br', null),
|
|
4406
4497
|
_react2.default.createElement(
|
|
@@ -4589,6 +4680,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4589
4680
|
_react2.default.createElement(
|
|
4590
4681
|
'div',
|
|
4591
4682
|
{ className: (0, _classnames4.default)({ "main": true, "focusbottom": currentIndex == index }) },
|
|
4683
|
+
_react2.default.createElement('div', { className: 'lefticon' }),
|
|
4592
4684
|
_react2.default.createElement(
|
|
4593
4685
|
'div',
|
|
4594
4686
|
{ className: (0, _classnames4.default)({ "name": true }) },
|
|
@@ -4723,7 +4815,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4723
4815
|
visible: this.state.czkVisible,
|
|
4724
4816
|
maskClosable: false,
|
|
4725
4817
|
destroyOnClose: true,
|
|
4726
|
-
title: "
|
|
4818
|
+
title: "余额结算",
|
|
4727
4819
|
onCancel: this.handleCzkCancel,
|
|
4728
4820
|
keyboard: false,
|
|
4729
4821
|
centered: !this.isHorizontalPad ? true : false,
|
|
@@ -4754,7 +4846,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4754
4846
|
_react2.default.createElement(
|
|
4755
4847
|
'div',
|
|
4756
4848
|
{ className: 'value valuetext' },
|
|
4757
|
-
currentMode && currentMode.member
|
|
4849
|
+
currentMode && currentMode.member.type || '普通'
|
|
4758
4850
|
),
|
|
4759
4851
|
_react2.default.createElement(
|
|
4760
4852
|
'div',
|
|
@@ -4775,7 +4867,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4775
4867
|
_react2.default.createElement(
|
|
4776
4868
|
'div',
|
|
4777
4869
|
{ className: 'value' },
|
|
4778
|
-
currentMode && (0, _utils.getFixedNumber)(currentMode.balance)
|
|
4870
|
+
currentMode && (0, _utils.getFixedNumber)(currentMode.member.balance)
|
|
4779
4871
|
),
|
|
4780
4872
|
_react2.default.createElement(
|
|
4781
4873
|
'div',
|
|
@@ -4796,7 +4888,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4796
4888
|
_react2.default.createElement(
|
|
4797
4889
|
'div',
|
|
4798
4890
|
{ className: 'value' },
|
|
4799
|
-
currentMode && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.balance)))
|
|
4891
|
+
currentMode && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.member.balance)))
|
|
4800
4892
|
),
|
|
4801
4893
|
_react2.default.createElement(
|
|
4802
4894
|
'div',
|
|
@@ -4811,83 +4903,29 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4811
4903
|
_react2.default.createElement(
|
|
4812
4904
|
'span',
|
|
4813
4905
|
null,
|
|
4814
|
-
'\
|
|
4906
|
+
'\u4F59\u989D\u5361\u53F7\uFF1A'
|
|
4815
4907
|
),
|
|
4816
4908
|
_react2.default.createElement(
|
|
4817
4909
|
'span',
|
|
4818
4910
|
null,
|
|
4819
4911
|
_react2.default.createElement(_input2.default, {
|
|
4820
4912
|
type: 'text',
|
|
4821
|
-
placeholder: '\u8BF7\u626B\u63CF\u6216\u8F93\u5165\
|
|
4822
|
-
|
|
4913
|
+
placeholder: '\u8BF7\u626B\u63CF\u6216\u8F93\u5165\u4F59\u989D\u5361'
|
|
4914
|
+
// disabled={currentMode && !currentMode.member.StorageCardNo && isReturn ? true: false}
|
|
4915
|
+
, className: 'input ' + (this.hasElectron === true && this.iCCardServer === 1 || this.isHorizontalPad === true ? 'temp' : ''),
|
|
4823
4916
|
onChange: function onChange(e) {
|
|
4824
4917
|
return _this8.onCzkChange(e.target.value);
|
|
4825
4918
|
},
|
|
4826
|
-
defaultValue: currentMode && currentMode.
|
|
4827
|
-
value: czkValue,
|
|
4919
|
+
defaultValue: isNewRetailBCPos ? currentMode && currentMode.member.StorageCardNo : currentMode && currentMode.member.cardNo,
|
|
4920
|
+
value: this.state.czkValue,
|
|
4828
4921
|
ref: function ref(input) {
|
|
4829
4922
|
return _this8.czkInput = input;
|
|
4830
4923
|
},
|
|
4831
|
-
onKeyDown: function () {
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
while (1) {
|
|
4837
|
-
switch (_context16.prev = _context16.next) {
|
|
4838
|
-
case 0:
|
|
4839
|
-
if (!(e.keyCode == 13)) {
|
|
4840
|
-
_context16.next = 14;
|
|
4841
|
-
break;
|
|
4842
|
-
}
|
|
4843
|
-
|
|
4844
|
-
time = Date.parse(new Date());
|
|
4845
|
-
|
|
4846
|
-
if (!(_this8.isStorageCardInputType && time - _this8.keypressStime > 350)) {
|
|
4847
|
-
_context16.next = 7;
|
|
4848
|
-
break;
|
|
4849
|
-
}
|
|
4850
|
-
|
|
4851
|
-
_message2.default.warn('储值卡不可键盘录入,请刷卡!');
|
|
4852
|
-
_this8.keypressStime = null;
|
|
4853
|
-
_this8.setState({
|
|
4854
|
-
czkValue: null
|
|
4855
|
-
});
|
|
4856
|
-
return _context16.abrupt('return');
|
|
4857
|
-
|
|
4858
|
-
case 7:
|
|
4859
|
-
_this8.keypressStime = null;
|
|
4860
|
-
_context16.next = 10;
|
|
4861
|
-
return _this8.loadCzk(e.target.value);
|
|
4862
|
-
|
|
4863
|
-
case 10:
|
|
4864
|
-
_paymode = _this8.store.paymode;
|
|
4865
|
-
|
|
4866
|
-
if (!_paymode.currentMode.storageCardNo) {
|
|
4867
|
-
_this8.setState({
|
|
4868
|
-
czkvalue: null
|
|
4869
|
-
});
|
|
4870
|
-
}
|
|
4871
|
-
_context16.next = 15;
|
|
4872
|
-
break;
|
|
4873
|
-
|
|
4874
|
-
case 14:
|
|
4875
|
-
if (!_this8.keypressStime && e.keyCode !== 8) {
|
|
4876
|
-
_this8.keypressStime = Date.parse(new Date());
|
|
4877
|
-
}
|
|
4878
|
-
|
|
4879
|
-
case 15:
|
|
4880
|
-
case 'end':
|
|
4881
|
-
return _context16.stop();
|
|
4882
|
-
}
|
|
4883
|
-
}
|
|
4884
|
-
}, _callee16, _this8);
|
|
4885
|
-
}));
|
|
4886
|
-
|
|
4887
|
-
return function (_x12) {
|
|
4888
|
-
return _ref30.apply(this, arguments);
|
|
4889
|
-
};
|
|
4890
|
-
}(),
|
|
4924
|
+
onKeyDown: function onKeyDown(e) {
|
|
4925
|
+
if (e.keyCode == 13) {
|
|
4926
|
+
_this8.loadCzk(e.target.value);
|
|
4927
|
+
}
|
|
4928
|
+
},
|
|
4891
4929
|
onFocus: function onFocus(e) {
|
|
4892
4930
|
_this8.inputTarget = _this8.czkInput.input;
|
|
4893
4931
|
!_this8.state.prototypeVisible && _keyboard2.default.open(function (v) {
|
|
@@ -4939,22 +4977,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4939
4977
|
className: _index.hotKey.hotKeyNotFilter('input'),
|
|
4940
4978
|
value: storageValue,
|
|
4941
4979
|
onChange: function onChange(event) {
|
|
4942
|
-
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.balance));
|
|
4980
|
+
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.member.balance));
|
|
4943
4981
|
},
|
|
4944
|
-
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)),
|
|
4945
|
-
ref: function ref(
|
|
4946
|
-
return _this8["inputCzkAmount"] =
|
|
4982
|
+
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.member.balance)),
|
|
4983
|
+
ref: function ref(_ref33) {
|
|
4984
|
+
return _this8["inputCzkAmount"] = _ref33;
|
|
4947
4985
|
},
|
|
4948
4986
|
onFocus: function onFocus(e) {
|
|
4949
4987
|
_this8.inputkey = "inputCzkAmount";
|
|
4950
4988
|
_keyboard2.default.open(function (v) {
|
|
4951
4989
|
var value = _keyboard2.default.getNewValue(_this8[_this8.inputkey].input, _this8[_this8.inputkey].input.value, v);
|
|
4952
|
-
_this8.setCurrentModeValue(value, Math.min(currentMode.maxamount, currentMode.balance));
|
|
4990
|
+
_this8.setCurrentModeValue(value, Math.min(currentMode.maxamount, currentMode.member.balance));
|
|
4953
4991
|
}, _this8.keyboardOnOk, _this8.keyboardOnClose)();
|
|
4954
4992
|
},
|
|
4955
4993
|
onBlur: function onBlur(e) {
|
|
4956
4994
|
_keyboard2.default.close();
|
|
4957
|
-
_this8.setCurrentModeValue((0, _utils.getFixedNumber)(_this8.inputCzkAmount.input.value), Math.min(currentMode.maxamount, currentMode.balance));
|
|
4995
|
+
_this8.setCurrentModeValue((0, _utils.getFixedNumber)(_this8.inputCzkAmount.input.value), Math.min(currentMode.maxamount, currentMode.member.balance));
|
|
4958
4996
|
}
|
|
4959
4997
|
})
|
|
4960
4998
|
)
|
|
@@ -5015,7 +5053,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5015
5053
|
),
|
|
5016
5054
|
_react2.default.createElement(
|
|
5017
5055
|
_button2.default,
|
|
5018
|
-
{ type: 'primary', disabled: btnDissabled, onClick: this.handleSetModal },
|
|
5056
|
+
{ type: 'primary', disabled: currentMode && currentMode.errinfo != '' || btnDissabled, onClick: this.handleSetModal },
|
|
5019
5057
|
'\u786E\u5B9A'
|
|
5020
5058
|
)
|
|
5021
5059
|
)),
|
|
@@ -5442,7 +5480,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5442
5480
|
_react2.default.createElement(
|
|
5443
5481
|
'div',
|
|
5444
5482
|
{ className: 'value valuetext' },
|
|
5445
|
-
currentMode && currentMode.member
|
|
5483
|
+
currentMode && currentMode.member.type || '普通'
|
|
5446
5484
|
),
|
|
5447
5485
|
_react2.default.createElement(
|
|
5448
5486
|
'div',
|
|
@@ -5463,7 +5501,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5463
5501
|
_react2.default.createElement(
|
|
5464
5502
|
'div',
|
|
5465
5503
|
{ className: 'value' },
|
|
5466
|
-
currentMode && currentMode.member
|
|
5504
|
+
currentMode && currentMode.member.bonusPoints
|
|
5467
5505
|
),
|
|
5468
5506
|
_react2.default.createElement(
|
|
5469
5507
|
'div',
|
|
@@ -5484,7 +5522,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5484
5522
|
_react2.default.createElement(
|
|
5485
5523
|
'div',
|
|
5486
5524
|
{ className: 'value' },
|
|
5487
|
-
currentMode &&
|
|
5525
|
+
currentMode && (0, _utils.getFixedNumber)(currentMode.member.exchangable)
|
|
5488
5526
|
),
|
|
5489
5527
|
_react2.default.createElement(
|
|
5490
5528
|
'div',
|
|
@@ -5505,7 +5543,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5505
5543
|
_react2.default.createElement(
|
|
5506
5544
|
'div',
|
|
5507
5545
|
{ className: 'value' },
|
|
5508
|
-
currentMode &&
|
|
5546
|
+
currentMode && (0, _utils.getFixedNumber)(Math.max(0, Math.min(currentMode.maxamount, currentMode.member.exchangable)))
|
|
5509
5547
|
),
|
|
5510
5548
|
_react2.default.createElement(
|
|
5511
5549
|
'div',
|
|
@@ -5525,7 +5563,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5525
5563
|
_react2.default.createElement(
|
|
5526
5564
|
'span',
|
|
5527
5565
|
{ className: 'notext' },
|
|
5528
|
-
currentMode && currentMode.member
|
|
5566
|
+
currentMode && currentMode.member.cardNo
|
|
5529
5567
|
)
|
|
5530
5568
|
),
|
|
5531
5569
|
_react2.default.createElement(
|
|
@@ -5559,9 +5597,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5559
5597
|
onChange: function onChange(e) {
|
|
5560
5598
|
_this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
5561
5599
|
},
|
|
5562
|
-
defaultValue: currentMode &&
|
|
5563
|
-
ref: function ref(
|
|
5564
|
-
return _this8["inputJfdxAmount"] =
|
|
5600
|
+
defaultValue: currentMode && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
|
5601
|
+
ref: function ref(_ref34) {
|
|
5602
|
+
return _this8["inputJfdxAmount"] = _ref34;
|
|
5565
5603
|
},
|
|
5566
5604
|
onFocus: function onFocus(e) {
|
|
5567
5605
|
_this8.inputkey = "inputJfdxAmount";
|