tplus-components-touch 3.33.8 → 3.34.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +29 -29
- 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 +384 -376
- 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 +7 -7
- 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 +4 -4
- 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.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/scanInput.js.map +1 -1
- package/dist/components/input/scanInput.less +27 -27
- 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 +475 -469
- package/dist/components/keyboard/letterKeyboard.js +2 -2
- package/dist/components/keyboard/letterKeyboard.js.map +1 -1
- package/dist/components/keyboard/numKeyboard.js +8 -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 +6 -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 +156 -156
- 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 +15 -13
- 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 +72 -72
- 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 +16 -16
- 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/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/moreCzkTable/index.js.map +1 -1
- package/dist/components/settlement/moreCzkTable/style.less +6 -6
- 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 +306 -832
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +1666 -1686
- package/dist/components/settlement/settlementCopy.js +5731 -0
- package/dist/components/settlement/settlementCopy.js.map +1 -0
- package/dist/components/settlement/settlementStore.js +360 -642
- 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_index.html +5248 -5248
- package/dist/components/ticon/iconfont/iconfont.css +895 -895
- package/dist/components/ticon/iconfont/iconfont.json +1549 -1549
- package/dist/components/ticon/iconfont/iconfont.svg +593 -593
- 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 +9 -9
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/components/touchTable/index.less +376 -376
- package/dist/components/touchTable/utils.js.map +1 -1
- package/dist/demo/PopOverDemo.js.map +1 -1
- package/dist/index.js +7 -7
- 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
|
@@ -41,7 +41,7 @@ var _createClass2 = require('babel-runtime/helpers/createClass');
|
|
|
41
41
|
|
|
42
42
|
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
43
43
|
|
|
44
|
-
var _desc, _value, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4,
|
|
44
|
+
var _desc, _value, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _desc2, _value2, _class3, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _desc3, _value3, _class5, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19;
|
|
45
45
|
|
|
46
46
|
var _mobx = require('mobx');
|
|
47
47
|
|
|
@@ -168,7 +168,6 @@ var SettlementStore = (_class = function () {
|
|
|
168
168
|
(0, _classCallCheck3.default)(this, SettlementStore);
|
|
169
169
|
this.paymode = null;
|
|
170
170
|
this.dto = null;
|
|
171
|
-
this.dtoParams = null;
|
|
172
171
|
this.member = null;
|
|
173
172
|
this.brefund = false;
|
|
174
173
|
this.bquick = false;
|
|
@@ -428,47 +427,6 @@ var SettlementStore = (_class = function () {
|
|
|
428
427
|
};
|
|
429
428
|
}();
|
|
430
429
|
|
|
431
|
-
this.repeatStorageModal = function (content) {
|
|
432
|
-
return new _promise2.default(function (resolve, reject) {
|
|
433
|
-
_tplusComponentsTouch.ModalWraper.confirm({
|
|
434
|
-
title: '',
|
|
435
|
-
okText: '继续储值',
|
|
436
|
-
className: 'repeat-modal',
|
|
437
|
-
zIndex: 1007,
|
|
438
|
-
content: content,
|
|
439
|
-
onOk: function () {
|
|
440
|
-
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
|
441
|
-
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
442
|
-
while (1) {
|
|
443
|
-
switch (_context2.prev = _context2.next) {
|
|
444
|
-
case 0:
|
|
445
|
-
_context2.next = 2;
|
|
446
|
-
return _this2.saveMember();
|
|
447
|
-
|
|
448
|
-
case 2:
|
|
449
|
-
resolve(true);
|
|
450
|
-
|
|
451
|
-
case 3:
|
|
452
|
-
case 'end':
|
|
453
|
-
return _context2.stop();
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
}, _callee2, _this2);
|
|
457
|
-
}));
|
|
458
|
-
|
|
459
|
-
return function onOk() {
|
|
460
|
-
return _ref5.apply(this, arguments);
|
|
461
|
-
};
|
|
462
|
-
}(),
|
|
463
|
-
onCancel: function onCancel() {
|
|
464
|
-
resolve(false);
|
|
465
|
-
}
|
|
466
|
-
});
|
|
467
|
-
});
|
|
468
|
-
};
|
|
469
|
-
|
|
470
|
-
_initDefineProp(this, 'setVoucherDate', _descriptor5, this);
|
|
471
|
-
|
|
472
430
|
this.checkIntegralExchangeReturn = function (id) {
|
|
473
431
|
return new _promise2.default(function (resolve, reject) {
|
|
474
432
|
(0, _tplusApi.tApi)({ param: { refVoucherId: id } }, 'chanjet.RE.NewPos.GetNewIntegralExchange', false, false, { timeout_skip: true }).then(function (resp) {
|
|
@@ -584,8 +542,8 @@ var SettlementStore = (_class = function () {
|
|
|
584
542
|
var _enumController$getEn5 = _mutantsUtil.enumController.getEnumOj(),
|
|
585
543
|
PayStyle = _enumController$getEn5.PayStyle;
|
|
586
544
|
|
|
587
|
-
var
|
|
588
|
-
isNewRetailBCPos =
|
|
545
|
+
var _ref5 = _mutantsUtil.platform || {},
|
|
546
|
+
isNewRetailBCPos = _ref5.isNewRetailBCPos;
|
|
589
547
|
|
|
590
548
|
console.log(this.dto, 'dto==========');
|
|
591
549
|
this.paymode.checkList = [];
|
|
@@ -604,21 +562,20 @@ var SettlementStore = (_class = function () {
|
|
|
604
562
|
authCode: detail.PaymentCode,
|
|
605
563
|
steadCashIntegral: detail.SteadCashIntegral,
|
|
606
564
|
overchargesAmount: detail.OverchargesAmount,
|
|
607
|
-
boriginReturn: true
|
|
608
|
-
thirdPaymentReturnInfo: detail.ThirdPaymentReturnInfo
|
|
565
|
+
boriginReturn: true
|
|
609
566
|
});
|
|
610
567
|
_this5.paymode.currentMode = newmode;
|
|
611
568
|
if (themode.paymentType == PayStyle.djq) {
|
|
612
569
|
(0, _each3.default)(_this5.dto.RetailCouponDetails, function (djq) {
|
|
613
570
|
if (isNewRetailBCPos) {
|
|
614
|
-
var
|
|
615
|
-
displayText =
|
|
616
|
-
promoRuleId =
|
|
617
|
-
dateMount =
|
|
618
|
-
promoMethodEnum =
|
|
619
|
-
discountPct =
|
|
620
|
-
promoId =
|
|
621
|
-
id =
|
|
571
|
+
var _ref6 = djq || {},
|
|
572
|
+
displayText = _ref6.displayText,
|
|
573
|
+
promoRuleId = _ref6.promoRuleId,
|
|
574
|
+
dateMount = _ref6.dateMount,
|
|
575
|
+
promoMethodEnum = _ref6.promoMethodEnum,
|
|
576
|
+
discountPct = _ref6.discountPct,
|
|
577
|
+
promoId = _ref6.promoId,
|
|
578
|
+
id = _ref6.id;
|
|
622
579
|
|
|
623
580
|
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false, _this5.dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, null, id, true);
|
|
624
581
|
return;
|
|
@@ -726,44 +683,44 @@ var SettlementStore = (_class = function () {
|
|
|
726
683
|
var IdStore = this.storeInfo.storeID;
|
|
727
684
|
var StoreCode = this.storeInfo.storeCode; //_find(this.storeInfo.storeInfos,(store)=>{return store.ID==IdStore;}).Code;
|
|
728
685
|
|
|
729
|
-
var
|
|
730
|
-
isNewRetailBCPos =
|
|
686
|
+
var _ref7 = _mutantsUtil.platform || {},
|
|
687
|
+
isNewRetailBCPos = _ref7.isNewRetailBCPos;
|
|
731
688
|
|
|
732
689
|
var address = '';
|
|
733
690
|
if (isNewRetailBCPos) {
|
|
734
691
|
// address = '/member/memberProfile/FindByStorageCode/'+v;
|
|
735
692
|
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + v + '/' + true;
|
|
736
693
|
return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function () {
|
|
737
|
-
var
|
|
694
|
+
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(result) {
|
|
738
695
|
var data, m;
|
|
739
|
-
return _regenerator2.default.wrap(function
|
|
696
|
+
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
740
697
|
while (1) {
|
|
741
|
-
switch (
|
|
698
|
+
switch (_context2.prev = _context2.next) {
|
|
742
699
|
case 0:
|
|
743
700
|
data = result.data;
|
|
744
701
|
m = data && data.length && data[0];
|
|
745
702
|
|
|
746
703
|
if (!(result && result.data.length)) {
|
|
747
|
-
|
|
704
|
+
_context2.next = 25;
|
|
748
705
|
break;
|
|
749
706
|
}
|
|
750
707
|
|
|
751
708
|
if (!(result.data.length === 1)) {
|
|
752
|
-
|
|
709
|
+
_context2.next = 14;
|
|
753
710
|
break;
|
|
754
711
|
}
|
|
755
712
|
|
|
756
713
|
if (!(m.CardTypeEnum === 'BALANCE_CARD')) {
|
|
757
|
-
|
|
714
|
+
_context2.next = 10;
|
|
758
715
|
break;
|
|
759
716
|
}
|
|
760
717
|
|
|
761
718
|
_this7.paymode.updateCardInfo(m);
|
|
762
719
|
_this7.handleCzkData(m);
|
|
763
|
-
return
|
|
720
|
+
return _context2.abrupt('return', result.data);
|
|
764
721
|
|
|
765
722
|
case 10:
|
|
766
|
-
|
|
723
|
+
_context2.next = 12;
|
|
767
724
|
return (0, _tplusApi.ccApi)({ dto: _this7.dto, meStorageCardId: m.MeStorageCardId }, '/retail/RetailPos/validateRetailStorageCard', false, false).then(function (result1) {
|
|
768
725
|
var data1 = result1.data ? JSON.parse(result1.data)[0] : {};
|
|
769
726
|
if (data1.enable) {
|
|
@@ -776,40 +733,40 @@ var SettlementStore = (_class = function () {
|
|
|
776
733
|
});
|
|
777
734
|
|
|
778
735
|
case 12:
|
|
779
|
-
|
|
736
|
+
_context2.next = 25;
|
|
780
737
|
break;
|
|
781
738
|
|
|
782
739
|
case 14:
|
|
783
740
|
if (!(result.data && result.data.length === 1)) {
|
|
784
|
-
|
|
741
|
+
_context2.next = 19;
|
|
785
742
|
break;
|
|
786
743
|
}
|
|
787
744
|
|
|
788
745
|
_this7.paymode.updateCardInfo(result.data[0]);
|
|
789
|
-
return
|
|
746
|
+
return _context2.abrupt('return', result.data);
|
|
790
747
|
|
|
791
748
|
case 19:
|
|
792
749
|
if (!(result.data && result.data.length > 1)) {
|
|
793
|
-
|
|
750
|
+
_context2.next = 23;
|
|
794
751
|
break;
|
|
795
752
|
}
|
|
796
753
|
|
|
797
|
-
return
|
|
754
|
+
return _context2.abrupt('return', result.data);
|
|
798
755
|
|
|
799
756
|
case 23:
|
|
800
757
|
_message2.default.warn('没有可用储值卡!');
|
|
801
|
-
return
|
|
758
|
+
return _context2.abrupt('return', false);
|
|
802
759
|
|
|
803
760
|
case 25:
|
|
804
761
|
case 'end':
|
|
805
|
-
return
|
|
762
|
+
return _context2.stop();
|
|
806
763
|
}
|
|
807
764
|
}
|
|
808
|
-
},
|
|
765
|
+
}, _callee2, _this7);
|
|
809
766
|
}));
|
|
810
767
|
|
|
811
768
|
return function (_x2) {
|
|
812
|
-
return
|
|
769
|
+
return _ref8.apply(this, arguments);
|
|
813
770
|
};
|
|
814
771
|
}()
|
|
815
772
|
// result.data.forEach((m) => {
|
|
@@ -952,7 +909,6 @@ var SettlementStore = (_class = function () {
|
|
|
952
909
|
name: themode.name,
|
|
953
910
|
exchangeRate: themode.exchangeRate,
|
|
954
911
|
calDirection: themode.calDirection,
|
|
955
|
-
thridPayment: themode.thridPayment,
|
|
956
912
|
value: value,
|
|
957
913
|
value2: (0, _utils.getFixedNumber)(themode.calDirection == "88" ? value / themode.exchangeRate : value * themode.exchangeRate),
|
|
958
914
|
value3: value,
|
|
@@ -981,7 +937,7 @@ var SettlementStore = (_class = function () {
|
|
|
981
937
|
if (type == PayStyle.hyczk || type == PayStyle.jfdx || type == PayStyle.djq) {
|
|
982
938
|
this.setMaxAmount(type, mode);
|
|
983
939
|
}
|
|
984
|
-
console.log(
|
|
940
|
+
console.log(mode);
|
|
985
941
|
return mode;
|
|
986
942
|
}
|
|
987
943
|
}, {
|
|
@@ -1018,6 +974,15 @@ var SettlementStore = (_class = function () {
|
|
|
1018
974
|
key: 'changeFocusOnly',
|
|
1019
975
|
value: function changeFocusOnly(type) {
|
|
1020
976
|
this.paymode.currentFocus = type;
|
|
977
|
+
// 获取焦点时带入剩余的值
|
|
978
|
+
// let mode=_find(this.paymode.thePaymodes,{'paymentType':type});
|
|
979
|
+
// if(mode && this.isIntegralExchange){
|
|
980
|
+
// const shouldSetValue =getFixedNumber(parseFloat(this.paymode.receivable) + parseFloat(mode.value));
|
|
981
|
+
// mode.value = shouldSetValue;
|
|
982
|
+
// mode.value2 = getFixedNumber(mode.calDirection=="88"?shouldSetValue / mode.exchangeRate:(shouldSetValue * mode.exchangeRate));
|
|
983
|
+
// mode.value3 = shouldSetValue;
|
|
984
|
+
// this.paymode.calcReserved();
|
|
985
|
+
// }
|
|
1021
986
|
}
|
|
1022
987
|
}, {
|
|
1023
988
|
key: 'changeClickFocusOnly',
|
|
@@ -1079,13 +1044,6 @@ var SettlementStore = (_class = function () {
|
|
|
1079
1044
|
var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
|
|
1080
1045
|
PayStyle = _enumController$getEn12.PayStyle;
|
|
1081
1046
|
|
|
1082
|
-
var hasThirdPay = this.paymode.thePaymodes.findIndex(function (v) {
|
|
1083
|
-
return !!v.thridPayment;
|
|
1084
|
-
});
|
|
1085
|
-
if (hasThirdPay > -1) {
|
|
1086
|
-
_message2.default.warn('二开支付目前仅支持单一结算。');
|
|
1087
|
-
return;
|
|
1088
|
-
}
|
|
1089
1047
|
var pos = this.paymode.thePaymodes.length;
|
|
1090
1048
|
if (type == PayStyle.hyczk) {
|
|
1091
1049
|
var index = (0, _findLastIndex3.default)(this.paymode.thePaymodes, function (m) {
|
|
@@ -1093,6 +1051,8 @@ var SettlementStore = (_class = function () {
|
|
|
1093
1051
|
});
|
|
1094
1052
|
pos = index == -1 ? pos : index + 1;
|
|
1095
1053
|
}
|
|
1054
|
+
// this.paymode.thePaymodes.push(this.genNewMode(type) );
|
|
1055
|
+
|
|
1096
1056
|
this.paymode.thePaymodes.splice(pos, 0, this.genNewMode(type, this.newStyle && type == PayStyle.hyczk, undefined, isQuick));
|
|
1097
1057
|
this.paymode.calcReserved();
|
|
1098
1058
|
}
|
|
@@ -1108,159 +1068,83 @@ var SettlementStore = (_class = function () {
|
|
|
1108
1068
|
this.paymode.currentFocus = -1;
|
|
1109
1069
|
this.paymode.calcReserved();
|
|
1110
1070
|
}
|
|
1111
|
-
|
|
1112
|
-
// 获取储值是否重复, 在commit方法中使用
|
|
1113
|
-
|
|
1114
|
-
}, {
|
|
1115
|
-
key: 'findStorageBillValidate',
|
|
1116
|
-
value: function findStorageBillValidate() {
|
|
1117
|
-
var _this10 = this;
|
|
1118
|
-
|
|
1119
|
-
var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
|
|
1120
|
-
PayStyle = _enumController$getEn14.PayStyle;
|
|
1121
|
-
|
|
1122
|
-
(0, _mobx.runInAction)(function () {
|
|
1123
|
-
_this10.dto.StorageMutiSettleDetails = [];
|
|
1124
|
-
var thePaymodes = _this10.newStyle ? (0, _filter3.default)(_this10.paymode.thePaymodes, function (mode) {
|
|
1125
|
-
return parseFloat(mode.value) != 0;
|
|
1126
|
-
}) : _this10.paymode.thePaymodes;
|
|
1127
|
-
(0, _each3.default)(thePaymodes, function (mode) {
|
|
1128
|
-
var themode = (0, _find3.default)(_this10.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1129
|
-
|
|
1130
|
-
var value = parseFloat(mode.value);
|
|
1131
|
-
var giveChange = null;
|
|
1132
|
-
if (mode.paymentType == PayStyle.xianjin && _this10.paymode.receivable < 0 && value > Math.abs(_this10.paymode.receivable)) {
|
|
1133
|
-
value = Math.Add(value, _this10.paymode.receivable);
|
|
1134
|
-
giveChange = Math.abs(_this10.paymode.receivable);
|
|
1135
|
-
}
|
|
1136
|
-
_this10.dto.StorageMutiSettleDetails.push({
|
|
1137
|
-
Code: mode.paymethodId,
|
|
1138
|
-
StorageAmount: value,
|
|
1139
|
-
GiveChange: giveChange,
|
|
1140
|
-
IdsettleStyle: themode.idSettleStyle,
|
|
1141
|
-
IdbankAccount: themode.idBankAccount,
|
|
1142
|
-
PaymentCode: mode.authCode,
|
|
1143
|
-
DynamicPropertyKeys: [],
|
|
1144
|
-
DynamicPropertyValues: [],
|
|
1145
|
-
DataSource: { Id: _this10.dataSource }
|
|
1146
|
-
});
|
|
1147
|
-
});
|
|
1148
|
-
});
|
|
1149
|
-
return (0, _tplusApi.ccApi)((0, _extends3.default)({}, this.dto), '/marketingtool/Storage/findStorageBillValidate', false, false);
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
|
-
//判断是否重复弹框
|
|
1153
|
-
|
|
1154
1071
|
}, {
|
|
1155
1072
|
key: 'commit',
|
|
1156
1073
|
value: function () {
|
|
1157
|
-
var
|
|
1158
|
-
var
|
|
1074
|
+
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(bTest) {
|
|
1075
|
+
var _ref10, isNewRetailBCPos;
|
|
1159
1076
|
|
|
1160
|
-
return _regenerator2.default.wrap(function
|
|
1077
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
1161
1078
|
while (1) {
|
|
1162
|
-
switch (
|
|
1079
|
+
switch (_context3.prev = _context3.next) {
|
|
1163
1080
|
case 0:
|
|
1164
1081
|
console.log('settlementStore.commit开始,参数:' + bTest);
|
|
1165
1082
|
|
|
1166
1083
|
if (!bTest) {
|
|
1167
|
-
|
|
1084
|
+
_context3.next = 3;
|
|
1168
1085
|
break;
|
|
1169
1086
|
}
|
|
1170
1087
|
|
|
1171
|
-
return
|
|
1088
|
+
return _context3.abrupt('return', _promise2.default.resolve(true));
|
|
1172
1089
|
|
|
1173
1090
|
case 3:
|
|
1174
|
-
|
|
1091
|
+
_ref10 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref10.isNewRetailBCPos;
|
|
1092
|
+
_context3.prev = 4;
|
|
1175
1093
|
|
|
1176
1094
|
if (!(this.type == 1)) {
|
|
1177
|
-
|
|
1178
|
-
break;
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
_context4.next = 7;
|
|
1182
|
-
return this.findStorageBillValidate();
|
|
1183
|
-
|
|
1184
|
-
case 7:
|
|
1185
|
-
ret = _context4.sent;
|
|
1186
|
-
_ref11 = ret || {}, _ref11$data = _ref11.data;
|
|
1187
|
-
_ref11$data = _ref11$data === undefined ? {} : _ref11$data;
|
|
1188
|
-
code = _ref11$data.code, returnMsg = _ref11$data.returnMsg;
|
|
1189
|
-
|
|
1190
|
-
if (!(code && code == 10001)) {
|
|
1191
|
-
_context4.next = 19;
|
|
1095
|
+
_context3.next = 10;
|
|
1192
1096
|
break;
|
|
1193
1097
|
}
|
|
1194
1098
|
|
|
1195
|
-
|
|
1196
|
-
return this.
|
|
1099
|
+
_context3.next = 8;
|
|
1100
|
+
return this.saveMember();
|
|
1197
1101
|
|
|
1198
|
-
case
|
|
1199
|
-
|
|
1102
|
+
case 8:
|
|
1103
|
+
_context3.next = 18;
|
|
1104
|
+
break;
|
|
1200
1105
|
|
|
1201
|
-
|
|
1202
|
-
|
|
1106
|
+
case 10:
|
|
1107
|
+
if (!isNewRetailBCPos) {
|
|
1108
|
+
_context3.next = 13;
|
|
1203
1109
|
break;
|
|
1204
1110
|
}
|
|
1205
1111
|
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
case 17:
|
|
1209
|
-
_context4.next = 21;
|
|
1210
|
-
break;
|
|
1211
|
-
|
|
1212
|
-
case 19:
|
|
1213
|
-
_context4.next = 21;
|
|
1214
|
-
return this.saveMember();
|
|
1215
|
-
|
|
1216
|
-
case 21:
|
|
1217
|
-
_context4.next = 32;
|
|
1218
|
-
break;
|
|
1219
|
-
|
|
1220
|
-
case 23:
|
|
1221
|
-
_context4.next = 25;
|
|
1112
|
+
_context3.next = 13;
|
|
1222
1113
|
return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
|
|
1223
1114
|
|
|
1224
|
-
case
|
|
1225
|
-
|
|
1115
|
+
case 13:
|
|
1116
|
+
_context3.next = 15;
|
|
1226
1117
|
return this.save();
|
|
1227
1118
|
|
|
1228
|
-
case
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
if (!(_ret === false)) {
|
|
1232
|
-
_context4.next = 30;
|
|
1119
|
+
case 15:
|
|
1120
|
+
if (!isNewRetailBCPos) {
|
|
1121
|
+
_context3.next = 18;
|
|
1233
1122
|
break;
|
|
1234
1123
|
}
|
|
1235
1124
|
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
case 30:
|
|
1239
|
-
_context4.next = 32;
|
|
1125
|
+
_context3.next = 18;
|
|
1240
1126
|
return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
|
|
1241
1127
|
|
|
1242
|
-
case
|
|
1243
|
-
return
|
|
1128
|
+
case 18:
|
|
1129
|
+
return _context3.abrupt('return', _promise2.default.resolve(true));
|
|
1244
1130
|
|
|
1245
|
-
case
|
|
1246
|
-
|
|
1247
|
-
|
|
1131
|
+
case 21:
|
|
1132
|
+
_context3.prev = 21;
|
|
1133
|
+
_context3.t0 = _context3['catch'](4);
|
|
1248
1134
|
|
|
1249
|
-
console.error('settlementStore.commit失败,错误信息:' +
|
|
1250
|
-
|
|
1251
|
-
this.thirdPayRefund();
|
|
1252
|
-
return _context4.abrupt('return', _promise2.default.resolve(_context4.t0));
|
|
1135
|
+
console.error('settlementStore.commit失败,错误信息:' + _context3.t0);
|
|
1136
|
+
return _context3.abrupt('return', _promise2.default.resolve(_context3.t0));
|
|
1253
1137
|
|
|
1254
|
-
case
|
|
1138
|
+
case 25:
|
|
1255
1139
|
case 'end':
|
|
1256
|
-
return
|
|
1140
|
+
return _context3.stop();
|
|
1257
1141
|
}
|
|
1258
1142
|
}
|
|
1259
|
-
},
|
|
1143
|
+
}, _callee3, this, [[4, 21]]);
|
|
1260
1144
|
}));
|
|
1261
1145
|
|
|
1262
1146
|
function commit(_x3) {
|
|
1263
|
-
return
|
|
1147
|
+
return _ref9.apply(this, arguments);
|
|
1264
1148
|
}
|
|
1265
1149
|
|
|
1266
1150
|
return commit;
|
|
@@ -1274,26 +1158,26 @@ var SettlementStore = (_class = function () {
|
|
|
1274
1158
|
}, {
|
|
1275
1159
|
key: 'saveMember',
|
|
1276
1160
|
value: function saveMember() {
|
|
1277
|
-
var
|
|
1161
|
+
var _this10 = this;
|
|
1278
1162
|
|
|
1279
|
-
var _enumController$
|
|
1280
|
-
PayStyle = _enumController$
|
|
1163
|
+
var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
|
|
1164
|
+
PayStyle = _enumController$getEn14.PayStyle;
|
|
1281
1165
|
|
|
1282
1166
|
(0, _mobx.runInAction)(function () {
|
|
1283
|
-
|
|
1284
|
-
var thePaymodes =
|
|
1167
|
+
_this10.dto.StorageMutiSettleDetails = [];
|
|
1168
|
+
var thePaymodes = _this10.newStyle ? (0, _filter3.default)(_this10.paymode.thePaymodes, function (mode) {
|
|
1285
1169
|
return parseFloat(mode.value) != 0;
|
|
1286
|
-
}) :
|
|
1170
|
+
}) : _this10.paymode.thePaymodes;
|
|
1287
1171
|
(0, _each3.default)(thePaymodes, function (mode) {
|
|
1288
|
-
var themode = (0, _find3.default)(
|
|
1172
|
+
var themode = (0, _find3.default)(_this10.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1289
1173
|
|
|
1290
1174
|
var value = parseFloat(mode.value);
|
|
1291
1175
|
var giveChange = null;
|
|
1292
|
-
if (mode.paymentType == PayStyle.xianjin &&
|
|
1293
|
-
value = Math.Add(value,
|
|
1294
|
-
giveChange = Math.abs(
|
|
1176
|
+
if (mode.paymentType == PayStyle.xianjin && _this10.paymode.receivable < 0 && value > Math.abs(_this10.paymode.receivable)) {
|
|
1177
|
+
value = Math.Add(value, _this10.paymode.receivable);
|
|
1178
|
+
giveChange = Math.abs(_this10.paymode.receivable);
|
|
1295
1179
|
}
|
|
1296
|
-
|
|
1180
|
+
_this10.dto.StorageMutiSettleDetails.push({
|
|
1297
1181
|
Code: mode.paymethodId,
|
|
1298
1182
|
StorageAmount: value,
|
|
1299
1183
|
GiveChange: giveChange,
|
|
@@ -1302,7 +1186,7 @@ var SettlementStore = (_class = function () {
|
|
|
1302
1186
|
PaymentCode: mode.authCode,
|
|
1303
1187
|
DynamicPropertyKeys: [],
|
|
1304
1188
|
DynamicPropertyValues: [],
|
|
1305
|
-
DataSource: { Id:
|
|
1189
|
+
DataSource: { Id: _this10.dataSource }
|
|
1306
1190
|
});
|
|
1307
1191
|
});
|
|
1308
1192
|
});
|
|
@@ -1312,37 +1196,37 @@ var SettlementStore = (_class = function () {
|
|
|
1312
1196
|
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1313
1197
|
}
|
|
1314
1198
|
return (0, _tplusApi.tApi)({ dto: this.dto }, 'chanjet.ME.INewRetailMemberStorage.Save', false, false).then(function (resp) {
|
|
1315
|
-
|
|
1199
|
+
_this10.handlePrint(resp);
|
|
1316
1200
|
});
|
|
1317
1201
|
}
|
|
1318
1202
|
}, {
|
|
1319
1203
|
key: 'save',
|
|
1320
1204
|
value: function () {
|
|
1321
|
-
var
|
|
1322
|
-
var
|
|
1205
|
+
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
|
1206
|
+
var _this11 = this;
|
|
1323
1207
|
|
|
1324
|
-
var _enumController$
|
|
1208
|
+
var _enumController$getEn15, PayStyle, _ref13, isNewRetailBCPos, IPMSG, RetailTypeEnum;
|
|
1325
1209
|
|
|
1326
|
-
return _regenerator2.default.wrap(function
|
|
1210
|
+
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
1327
1211
|
while (1) {
|
|
1328
|
-
switch (
|
|
1212
|
+
switch (_context4.prev = _context4.next) {
|
|
1329
1213
|
case 0:
|
|
1330
|
-
_enumController$
|
|
1214
|
+
_enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn15.PayStyle;
|
|
1331
1215
|
|
|
1332
1216
|
(0, _mobx.runInAction)(function () {
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1217
|
+
_this11.dto.RetailPaymentDetails = [];
|
|
1218
|
+
_this11.dto.RetailStorageDetails = [];
|
|
1219
|
+
_this11.dto.RetailCouponDetails = [];
|
|
1336
1220
|
var czkSum = 0;
|
|
1337
1221
|
var count = 0;
|
|
1338
|
-
var thePaymodes =
|
|
1222
|
+
var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
|
|
1339
1223
|
return parseFloat(mode.value) != 0;
|
|
1340
|
-
}) :
|
|
1224
|
+
}) : _this11.paymode.thePaymodes;
|
|
1341
1225
|
(0, _each3.default)(thePaymodes, function (mode, index) {
|
|
1342
|
-
var themode = (0, _find3.default)(
|
|
1226
|
+
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1343
1227
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
1344
1228
|
czkSum = Math.Add(czkSum, mode.value);
|
|
1345
|
-
|
|
1229
|
+
_this11.dto.RetailStorageDetails.push({
|
|
1346
1230
|
Code: mode.paymethodId,
|
|
1347
1231
|
MeStorageCardId: mode.meStorageCardId,
|
|
1348
1232
|
StoragePaymentAmount: mode.value,
|
|
@@ -1351,17 +1235,17 @@ var SettlementStore = (_class = function () {
|
|
|
1351
1235
|
Idmember: mode.memberId,
|
|
1352
1236
|
DynamicPropertyKeys: [],
|
|
1353
1237
|
DynamicPropertyValues: [],
|
|
1354
|
-
DataSource: { Id:
|
|
1238
|
+
DataSource: { Id: _this11.dataSource },
|
|
1355
1239
|
Password: mode.authCode
|
|
1356
1240
|
});
|
|
1357
1241
|
} else {
|
|
1358
1242
|
var value = parseFloat(mode.value);
|
|
1359
1243
|
var giveChange = null;
|
|
1360
|
-
if (mode.paymentType == PayStyle.xianjin &&
|
|
1361
|
-
value = Math.Add(value,
|
|
1362
|
-
giveChange = Math.abs(
|
|
1244
|
+
if (mode.paymentType == PayStyle.xianjin && _this11.paymode.receivable < 0 && value > Math.abs(_this11.paymode.receivable)) {
|
|
1245
|
+
value = Math.Add(value, _this11.paymode.receivable);
|
|
1246
|
+
giveChange = Math.abs(_this11.paymode.receivable);
|
|
1363
1247
|
}
|
|
1364
|
-
|
|
1248
|
+
_this11.dto.RetailPaymentDetails.push({
|
|
1365
1249
|
Code: mode.paymethodId,
|
|
1366
1250
|
OrigAmount: mode.exchangeRate != 1 ? mode.value2 : value,
|
|
1367
1251
|
Amount: value,
|
|
@@ -1375,13 +1259,11 @@ var SettlementStore = (_class = function () {
|
|
|
1375
1259
|
OverchargesAmount: mode.overchargesAmount,
|
|
1376
1260
|
DynamicPropertyKeys: [],
|
|
1377
1261
|
DynamicPropertyValues: [],
|
|
1378
|
-
DataSource: { Id:
|
|
1379
|
-
ThirdPaymentInfo: themode.thridPayment || null,
|
|
1380
|
-
ThirdPaymentReturnInfo: mode.thirdPaymentReturnInfo || null
|
|
1262
|
+
DataSource: { Id: _this11.dataSource }
|
|
1381
1263
|
});
|
|
1382
1264
|
if (mode.paymentType == PayStyle.djq) {
|
|
1383
|
-
(0, _each3.default)(
|
|
1384
|
-
|
|
1265
|
+
(0, _each3.default)(_this11.paymode.checkList && _this11.paymode.checkList.length ? _this11.paymode.checkList : mode.djqs, function (djq) {
|
|
1266
|
+
_this11.dto.RetailCouponDetails.push({
|
|
1385
1267
|
CouponCode: djq.promoCouponCode,
|
|
1386
1268
|
ReductionAmount: djq.amount,
|
|
1387
1269
|
EnableAmount: djq.doorsill,
|
|
@@ -1391,28 +1273,53 @@ var SettlementStore = (_class = function () {
|
|
|
1391
1273
|
PromotionId: djq.promoId,
|
|
1392
1274
|
PromotionRuleId: djq.promoRuleId,
|
|
1393
1275
|
PromoCouponAllocatedId: djq.id,
|
|
1394
|
-
DataSource: { Id:
|
|
1276
|
+
DataSource: { Id: _this11.dataSource }
|
|
1395
1277
|
});
|
|
1396
1278
|
});
|
|
1397
1279
|
}
|
|
1398
1280
|
}
|
|
1399
1281
|
});
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1282
|
+
|
|
1283
|
+
var _ref12 = _mutantsUtil.platform || {},
|
|
1284
|
+
isNewRetailBCPos = _ref12.isNewRetailBCPos;
|
|
1285
|
+
|
|
1286
|
+
if (_this11.dto.RetailStorageDetails.length > 0) {
|
|
1287
|
+
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
|
|
1288
|
+
if (isNewRetailBCPos) {
|
|
1289
|
+
_this11.dto.RetailPaymentDetails.push({
|
|
1290
|
+
Code: _this11.paymode.counter,
|
|
1291
|
+
OrigAmount: czkSum,
|
|
1292
|
+
Amount: czkSum,
|
|
1293
|
+
IdsettleStyle: themode.idSettleStyle,
|
|
1294
|
+
IdbankAccount: themode.idBankAccount,
|
|
1295
|
+
DynamicPropertyKeys: [],
|
|
1296
|
+
DynamicPropertyValues: [],
|
|
1297
|
+
DataSource: { Id: _this11.dataSource },
|
|
1298
|
+
RetailStorageDetails: _this11.dto.RetailStorageDetails
|
|
1299
|
+
});
|
|
1300
|
+
} else {
|
|
1301
|
+
_this11.dto.RetailPaymentDetails.push({
|
|
1302
|
+
Code: _this11.paymode.counter,
|
|
1303
|
+
OrigAmount: czkSum,
|
|
1304
|
+
Amount: czkSum,
|
|
1305
|
+
IdsettleStyle: themode.idSettleStyle,
|
|
1306
|
+
IdbankAccount: themode.idBankAccount,
|
|
1307
|
+
DynamicPropertyKeys: [],
|
|
1308
|
+
DynamicPropertyValues: [],
|
|
1309
|
+
DataSource: { Id: _this11.dataSource }
|
|
1310
|
+
});
|
|
1311
|
+
}
|
|
1413
1312
|
}
|
|
1414
1313
|
});
|
|
1415
|
-
|
|
1314
|
+
_ref13 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref13.isNewRetailBCPos;
|
|
1315
|
+
|
|
1316
|
+
console.log('bc_pos\u73AF\u5883:' + isNewRetailBCPos + ',\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
|
|
1317
|
+
|
|
1318
|
+
if (!isNewRetailBCPos) {
|
|
1319
|
+
_context4.next = 20;
|
|
1320
|
+
break;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1416
1323
|
// cc结算调用
|
|
1417
1324
|
IPMSG = {};
|
|
1418
1325
|
|
|
@@ -1420,246 +1327,65 @@ var SettlementStore = (_class = function () {
|
|
|
1420
1327
|
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1421
1328
|
}
|
|
1422
1329
|
RetailTypeEnum = this.dto.IdbusiType == 36 ? "INTEGRAL_EXCHANGE" : "NORMAL";
|
|
1423
|
-
|
|
1330
|
+
_context4.t1 = this.dto.IdbusiType == 37;
|
|
1424
1331
|
|
|
1425
|
-
if (!
|
|
1426
|
-
|
|
1332
|
+
if (!_context4.t1) {
|
|
1333
|
+
_context4.next = 13;
|
|
1427
1334
|
break;
|
|
1428
1335
|
}
|
|
1429
1336
|
|
|
1430
|
-
|
|
1337
|
+
_context4.next = 12;
|
|
1431
1338
|
return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
|
|
1432
1339
|
|
|
1433
|
-
case
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
case 11:
|
|
1437
|
-
_context5.t0 = _context5.t1;
|
|
1438
|
-
|
|
1439
|
-
if (_context5.t0) {
|
|
1440
|
-
_context5.next = 14;
|
|
1441
|
-
break;
|
|
1442
|
-
}
|
|
1340
|
+
case 12:
|
|
1341
|
+
_context4.t1 = _context4.sent;
|
|
1443
1342
|
|
|
1444
|
-
|
|
1343
|
+
case 13:
|
|
1344
|
+
_context4.t0 = _context4.t1;
|
|
1445
1345
|
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
_context5.next = 33;
|
|
1346
|
+
if (_context4.t0) {
|
|
1347
|
+
_context4.next = 16;
|
|
1449
1348
|
break;
|
|
1450
1349
|
}
|
|
1451
1350
|
|
|
1452
|
-
|
|
1453
|
-
//处理存在二开支付情况
|
|
1351
|
+
_context4.t0 = this.dto.IdbusiType != 37;
|
|
1454
1352
|
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
if (!(payList && payList.length > 0)) {
|
|
1460
|
-
_context5.next = 30;
|
|
1353
|
+
case 16:
|
|
1354
|
+
if (!_context4.t0) {
|
|
1355
|
+
_context4.next = 18;
|
|
1461
1356
|
break;
|
|
1462
1357
|
}
|
|
1463
1358
|
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
case 22:
|
|
1470
|
-
ret = _context5.sent;
|
|
1471
|
-
_ref13 = ret || {}, type = _ref13.type, data = _ref13.data, msg = _ref13.msg, code = _ref13.code;
|
|
1472
|
-
|
|
1473
|
-
if (!(type === true)) {
|
|
1474
|
-
_context5.next = 28;
|
|
1475
|
-
break;
|
|
1476
|
-
}
|
|
1359
|
+
return _context4.abrupt('return', (0, _tplusApi.ccApi)({ dto: (0, _extends3.default)({}, this.dto.cut(), { RetailOms: { RetailTypeEnum: RetailTypeEnum } }), cip: IPMSG.query || "" }, '/retail/RetailPos/settle', false, false, { method: 'post', timeout_skip: true }).then(function (resp) {
|
|
1360
|
+
_this11.setDtoID(resp.ID);
|
|
1361
|
+
_this11.paymode.checkList = [];
|
|
1362
|
+
_this11.billID = resp.ID;
|
|
1363
|
+
}));
|
|
1477
1364
|
|
|
1478
|
-
|
|
1479
|
-
|
|
1365
|
+
case 18:
|
|
1366
|
+
_context4.next = 21;
|
|
1480
1367
|
break;
|
|
1481
1368
|
|
|
1482
|
-
case
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
case 30:
|
|
1487
|
-
this.dtoParams = dtoParams;
|
|
1488
|
-
console.log('结算信息:', dtoParams);
|
|
1489
|
-
return _context5.abrupt('return', (0, _tplusApi.ccApi)({ dto: dtoParams, cip: IPMSG.query || "" }, '/retail/RetailPos/settle', false, false, { method: 'post', timeout_skip: true }).then(function (resp) {
|
|
1490
|
-
var _ref14 = resp || {},
|
|
1491
|
-
ID = _ref14.ID;
|
|
1492
|
-
|
|
1493
|
-
_this12.setDtoID(ID);
|
|
1494
|
-
_this12.billID = ID;
|
|
1495
|
-
_this12.paymode.checkList = [];
|
|
1369
|
+
case 20:
|
|
1370
|
+
return _context4.abrupt('return', (0, _tplusApi.tApi)({ dto: this.dto.cut() }, 'chanjet.RE.newRetail.Settle', false, false, { timeout_skip: true }).then(function (resp) {
|
|
1371
|
+
_this11.setDtoID(resp.ID);
|
|
1372
|
+
_this11.billID = resp.ID;
|
|
1496
1373
|
}));
|
|
1497
1374
|
|
|
1498
|
-
case
|
|
1375
|
+
case 21:
|
|
1499
1376
|
case 'end':
|
|
1500
|
-
return
|
|
1377
|
+
return _context4.stop();
|
|
1501
1378
|
}
|
|
1502
1379
|
}
|
|
1503
|
-
},
|
|
1380
|
+
}, _callee4, this);
|
|
1504
1381
|
}));
|
|
1505
1382
|
|
|
1506
1383
|
function save() {
|
|
1507
|
-
return
|
|
1384
|
+
return _ref11.apply(this, arguments);
|
|
1508
1385
|
}
|
|
1509
1386
|
|
|
1510
1387
|
return save;
|
|
1511
1388
|
}()
|
|
1512
|
-
|
|
1513
|
-
//裁剪二开支付数据
|
|
1514
|
-
|
|
1515
|
-
}, {
|
|
1516
|
-
key: 'removeThirdPayDto',
|
|
1517
|
-
value: function removeThirdPayDto(dto) {
|
|
1518
|
-
var data = (0, _extends3.default)({}, dto);
|
|
1519
|
-
delete data['DynamicPropertyKeys'];
|
|
1520
|
-
delete data['DynamicPropertyValues'];
|
|
1521
|
-
return data;
|
|
1522
|
-
}
|
|
1523
|
-
|
|
1524
|
-
//二开支付
|
|
1525
|
-
|
|
1526
|
-
}, {
|
|
1527
|
-
key: 'thirdPay',
|
|
1528
|
-
value: function () {
|
|
1529
|
-
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(status, dto) {
|
|
1530
|
-
var cto, params, ret, _ref16, Code, Message, Result, _ref17, ThirdPaymentReturnInfo;
|
|
1531
|
-
|
|
1532
|
-
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1533
|
-
while (1) {
|
|
1534
|
-
switch (_context6.prev = _context6.next) {
|
|
1535
|
-
case 0:
|
|
1536
|
-
cto = this.removeThirdPayDto(dto);
|
|
1537
|
-
params = { TradeType: status, dto: cto };
|
|
1538
|
-
|
|
1539
|
-
console.log('刷卡信息:', (0, _stringify2.default)(params));
|
|
1540
|
-
_context6.next = 5;
|
|
1541
|
-
return new _promise2.default(function (resolve, reject) {
|
|
1542
|
-
_mutantsMicrofx.nativeMs.setIpcRendererMethod('ThirdPayment', (0, _extends3.default)({}, params), function (res) {
|
|
1543
|
-
return resolve(res);
|
|
1544
|
-
});
|
|
1545
|
-
});
|
|
1546
|
-
|
|
1547
|
-
case 5:
|
|
1548
|
-
ret = _context6.sent;
|
|
1549
|
-
|
|
1550
|
-
console.log('刷卡返回信息:', ret);
|
|
1551
|
-
ret = JSON.parse(ret);
|
|
1552
|
-
_ref16 = ret || {}, Code = _ref16.Code, Message = _ref16.Message, Result = _ref16.Result;
|
|
1553
|
-
|
|
1554
|
-
if (!(Code > 0)) {
|
|
1555
|
-
_context6.next = 13;
|
|
1556
|
-
break;
|
|
1557
|
-
}
|
|
1558
|
-
|
|
1559
|
-
return _context6.abrupt('return', { type: false, data: null, msg: Message, code: Code });
|
|
1560
|
-
|
|
1561
|
-
case 13:
|
|
1562
|
-
if (!(status == '00')) {
|
|
1563
|
-
_context6.next = 19;
|
|
1564
|
-
break;
|
|
1565
|
-
}
|
|
1566
|
-
|
|
1567
|
-
_ref17 = Result || {}, ThirdPaymentReturnInfo = _ref17.ThirdPaymentReturnInfo;
|
|
1568
|
-
|
|
1569
|
-
dto.RetailPaymentDetails.forEach(function (v) {
|
|
1570
|
-
if (v.ThirdPaymentInfo != null) {
|
|
1571
|
-
v.ThirdPaymentReturnInfo = ThirdPaymentReturnInfo;
|
|
1572
|
-
}
|
|
1573
|
-
});
|
|
1574
|
-
return _context6.abrupt('return', { type: true, data: dto, msg: Message, code: Code });
|
|
1575
|
-
|
|
1576
|
-
case 19:
|
|
1577
|
-
if (!(status == '02')) {
|
|
1578
|
-
_context6.next = 21;
|
|
1579
|
-
break;
|
|
1580
|
-
}
|
|
1581
|
-
|
|
1582
|
-
return _context6.abrupt('return', { type: true, data: dto, msg: Message, code: Code });
|
|
1583
|
-
|
|
1584
|
-
case 21:
|
|
1585
|
-
case 'end':
|
|
1586
|
-
return _context6.stop();
|
|
1587
|
-
}
|
|
1588
|
-
}
|
|
1589
|
-
}, _callee6, this);
|
|
1590
|
-
}));
|
|
1591
|
-
|
|
1592
|
-
function thirdPay(_x4, _x5) {
|
|
1593
|
-
return _ref15.apply(this, arguments);
|
|
1594
|
-
}
|
|
1595
|
-
|
|
1596
|
-
return thirdPay;
|
|
1597
|
-
}()
|
|
1598
|
-
|
|
1599
|
-
//二开支付强制退款情况
|
|
1600
|
-
|
|
1601
|
-
}, {
|
|
1602
|
-
key: 'thirdPayRefund',
|
|
1603
|
-
value: function () {
|
|
1604
|
-
var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
|
1605
|
-
var _this13 = this;
|
|
1606
|
-
|
|
1607
|
-
var dto, pay, _enumController$getEn17, TradeType;
|
|
1608
|
-
|
|
1609
|
-
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1610
|
-
while (1) {
|
|
1611
|
-
switch (_context8.prev = _context8.next) {
|
|
1612
|
-
case 0:
|
|
1613
|
-
dto = this.dtoParams;
|
|
1614
|
-
pay = dto && dto.RetailPaymentDetails.filter(function (v) {
|
|
1615
|
-
return v.ThirdPaymentInfo;
|
|
1616
|
-
});
|
|
1617
|
-
|
|
1618
|
-
if (pay && pay.length > 0) {
|
|
1619
|
-
setTimeout(function () {
|
|
1620
|
-
_message2.default.warn("支付出现异常,将发起刷卡退款。", { duration: 4.5 });
|
|
1621
|
-
}, 1000);
|
|
1622
|
-
_enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(), TradeType = _enumController$getEn17.TradeType;
|
|
1623
|
-
|
|
1624
|
-
setTimeout((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7() {
|
|
1625
|
-
var ret, _ref20, msg;
|
|
1626
|
-
|
|
1627
|
-
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1628
|
-
while (1) {
|
|
1629
|
-
switch (_context7.prev = _context7.next) {
|
|
1630
|
-
case 0:
|
|
1631
|
-
_context7.next = 2;
|
|
1632
|
-
return _this13.thirdPay(TradeType.REFUND, dto);
|
|
1633
|
-
|
|
1634
|
-
case 2:
|
|
1635
|
-
ret = _context7.sent;
|
|
1636
|
-
_ref20 = ret || {}, msg = _ref20.msg;
|
|
1637
|
-
|
|
1638
|
-
console.log('\u5237\u5361\u652F\u4ED8\u9000\u6B3E:' + msg);
|
|
1639
|
-
|
|
1640
|
-
case 5:
|
|
1641
|
-
case 'end':
|
|
1642
|
-
return _context7.stop();
|
|
1643
|
-
}
|
|
1644
|
-
}
|
|
1645
|
-
}, _callee7, _this13);
|
|
1646
|
-
})), 4500);
|
|
1647
|
-
}
|
|
1648
|
-
|
|
1649
|
-
case 3:
|
|
1650
|
-
case 'end':
|
|
1651
|
-
return _context8.stop();
|
|
1652
|
-
}
|
|
1653
|
-
}
|
|
1654
|
-
}, _callee8, this);
|
|
1655
|
-
}));
|
|
1656
|
-
|
|
1657
|
-
function thirdPayRefund() {
|
|
1658
|
-
return _ref18.apply(this, arguments);
|
|
1659
|
-
}
|
|
1660
|
-
|
|
1661
|
-
return thirdPayRefund;
|
|
1662
|
-
}()
|
|
1663
1389
|
}, {
|
|
1664
1390
|
key: 'setDtoID',
|
|
1665
1391
|
value: function setDtoID(id) {
|
|
@@ -1668,35 +1394,35 @@ var SettlementStore = (_class = function () {
|
|
|
1668
1394
|
}, {
|
|
1669
1395
|
key: 'querySettleResult',
|
|
1670
1396
|
value: function () {
|
|
1671
|
-
var
|
|
1672
|
-
return _regenerator2.default.wrap(function
|
|
1397
|
+
var _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1398
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1673
1399
|
while (1) {
|
|
1674
|
-
switch (
|
|
1400
|
+
switch (_context5.prev = _context5.next) {
|
|
1675
1401
|
case 0:
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1402
|
+
_context5.prev = 0;
|
|
1403
|
+
_context5.t0 = _promise2.default;
|
|
1404
|
+
_context5.next = 4;
|
|
1679
1405
|
return (0, _tplusApi.tApi)({ RetailCode: this.dto.Code }, 'chanjet.RE.newRetail.QuerySettleResult', false, false, { timeout_skip: true });
|
|
1680
1406
|
|
|
1681
1407
|
case 4:
|
|
1682
|
-
|
|
1683
|
-
return
|
|
1408
|
+
_context5.t1 = _context5.sent;
|
|
1409
|
+
return _context5.abrupt('return', _context5.t0.resolve.call(_context5.t0, _context5.t1));
|
|
1684
1410
|
|
|
1685
1411
|
case 8:
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
return
|
|
1412
|
+
_context5.prev = 8;
|
|
1413
|
+
_context5.t2 = _context5['catch'](0);
|
|
1414
|
+
return _context5.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
|
|
1689
1415
|
|
|
1690
1416
|
case 11:
|
|
1691
1417
|
case 'end':
|
|
1692
|
-
return
|
|
1418
|
+
return _context5.stop();
|
|
1693
1419
|
}
|
|
1694
1420
|
}
|
|
1695
|
-
},
|
|
1421
|
+
}, _callee5, this, [[0, 8]]);
|
|
1696
1422
|
}));
|
|
1697
1423
|
|
|
1698
1424
|
function querySettleResult() {
|
|
1699
|
-
return
|
|
1425
|
+
return _ref14.apply(this, arguments);
|
|
1700
1426
|
}
|
|
1701
1427
|
|
|
1702
1428
|
return querySettleResult;
|
|
@@ -1722,18 +1448,18 @@ var SettlementStore = (_class = function () {
|
|
|
1722
1448
|
}, {
|
|
1723
1449
|
key: 'validePwd',
|
|
1724
1450
|
value: function () {
|
|
1725
|
-
var
|
|
1726
|
-
var
|
|
1451
|
+
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(value) {
|
|
1452
|
+
var _ref16, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, cardStatusEnum, result, count, _result;
|
|
1727
1453
|
|
|
1728
|
-
return _regenerator2.default.wrap(function
|
|
1454
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1729
1455
|
while (1) {
|
|
1730
|
-
switch (
|
|
1456
|
+
switch (_context6.prev = _context6.next) {
|
|
1731
1457
|
case 0:
|
|
1732
|
-
|
|
1733
|
-
|
|
1458
|
+
_ref16 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref16.isNewRetailBCPos;
|
|
1459
|
+
_context6.prev = 1;
|
|
1734
1460
|
|
|
1735
1461
|
if (!isNewRetailBCPos) {
|
|
1736
|
-
|
|
1462
|
+
_context6.next = 33;
|
|
1737
1463
|
break;
|
|
1738
1464
|
}
|
|
1739
1465
|
|
|
@@ -1743,60 +1469,60 @@ var SettlementStore = (_class = function () {
|
|
|
1743
1469
|
memberStorageId = this.paymode.currentMode.meStorageCardId;
|
|
1744
1470
|
|
|
1745
1471
|
if (!cook2) {
|
|
1746
|
-
|
|
1472
|
+
_context6.next = 12;
|
|
1747
1473
|
break;
|
|
1748
1474
|
}
|
|
1749
1475
|
|
|
1750
1476
|
if (!cook2.hasOwnProperty(memberStorageId + "")) {
|
|
1751
|
-
|
|
1477
|
+
_context6.next = 12;
|
|
1752
1478
|
break;
|
|
1753
1479
|
}
|
|
1754
1480
|
|
|
1755
1481
|
if (!(cook2[memberStorageId] > 3)) {
|
|
1756
|
-
|
|
1482
|
+
_context6.next = 12;
|
|
1757
1483
|
break;
|
|
1758
1484
|
}
|
|
1759
1485
|
|
|
1760
1486
|
message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
|
|
1761
|
-
return
|
|
1487
|
+
return _context6.abrupt('return', _promise2.default.resolve(message));
|
|
1762
1488
|
|
|
1763
1489
|
case 12:
|
|
1764
1490
|
_paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId, cardStatusEnum = _paymode$currentMode.cardStatusEnum;
|
|
1765
1491
|
result = null;
|
|
1766
1492
|
|
|
1767
1493
|
if (!(cardTypeEnum === 'BALANCE_CARD')) {
|
|
1768
|
-
|
|
1494
|
+
_context6.next = 20;
|
|
1769
1495
|
break;
|
|
1770
1496
|
}
|
|
1771
1497
|
|
|
1772
|
-
|
|
1498
|
+
_context6.next = 17;
|
|
1773
1499
|
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
|
|
1774
1500
|
|
|
1775
1501
|
case 17:
|
|
1776
|
-
result =
|
|
1777
|
-
|
|
1502
|
+
result = _context6.sent;
|
|
1503
|
+
_context6.next = 29;
|
|
1778
1504
|
break;
|
|
1779
1505
|
|
|
1780
1506
|
case 20:
|
|
1781
1507
|
if (!(cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId)) {
|
|
1782
|
-
|
|
1508
|
+
_context6.next = 26;
|
|
1783
1509
|
break;
|
|
1784
1510
|
}
|
|
1785
1511
|
|
|
1786
|
-
|
|
1512
|
+
_context6.next = 23;
|
|
1787
1513
|
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1788
1514
|
|
|
1789
1515
|
case 23:
|
|
1790
|
-
result =
|
|
1791
|
-
|
|
1516
|
+
result = _context6.sent;
|
|
1517
|
+
_context6.next = 29;
|
|
1792
1518
|
break;
|
|
1793
1519
|
|
|
1794
1520
|
case 26:
|
|
1795
|
-
|
|
1521
|
+
_context6.next = 28;
|
|
1796
1522
|
return (0, _tplusApi.ccApi)({ password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1797
1523
|
|
|
1798
1524
|
case 28:
|
|
1799
|
-
result =
|
|
1525
|
+
result = _context6.sent;
|
|
1800
1526
|
|
|
1801
1527
|
case 29:
|
|
1802
1528
|
if (!result.data) {
|
|
@@ -1815,38 +1541,38 @@ var SettlementStore = (_class = function () {
|
|
|
1815
1541
|
this.setCookie('errorPwd', '', -1);
|
|
1816
1542
|
this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
|
|
1817
1543
|
}
|
|
1818
|
-
return
|
|
1544
|
+
return _context6.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
|
|
1819
1545
|
|
|
1820
1546
|
case 33:
|
|
1821
|
-
|
|
1547
|
+
_context6.next = 35;
|
|
1822
1548
|
return (0, _tplusApi.tApi)({ "CheckoutParams": {
|
|
1823
1549
|
"Idmember": value.id,
|
|
1824
1550
|
"Password": value.pwd
|
|
1825
1551
|
} }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
|
|
1826
1552
|
|
|
1827
1553
|
case 35:
|
|
1828
|
-
_result =
|
|
1829
|
-
return
|
|
1554
|
+
_result = _context6.sent;
|
|
1555
|
+
return _context6.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
|
|
1830
1556
|
|
|
1831
1557
|
case 37:
|
|
1832
|
-
|
|
1558
|
+
_context6.next = 42;
|
|
1833
1559
|
break;
|
|
1834
1560
|
|
|
1835
1561
|
case 39:
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
return
|
|
1562
|
+
_context6.prev = 39;
|
|
1563
|
+
_context6.t0 = _context6['catch'](1);
|
|
1564
|
+
return _context6.abrupt('return', "failed");
|
|
1839
1565
|
|
|
1840
1566
|
case 42:
|
|
1841
1567
|
case 'end':
|
|
1842
|
-
return
|
|
1568
|
+
return _context6.stop();
|
|
1843
1569
|
}
|
|
1844
1570
|
}
|
|
1845
|
-
},
|
|
1571
|
+
}, _callee6, this, [[1, 39]]);
|
|
1846
1572
|
}));
|
|
1847
1573
|
|
|
1848
|
-
function validePwd(
|
|
1849
|
-
return
|
|
1574
|
+
function validePwd(_x4) {
|
|
1575
|
+
return _ref15.apply(this, arguments);
|
|
1850
1576
|
}
|
|
1851
1577
|
|
|
1852
1578
|
return validePwd;
|
|
@@ -1856,7 +1582,7 @@ var SettlementStore = (_class = function () {
|
|
|
1856
1582
|
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'queryPwd', [_mobx.action], {
|
|
1857
1583
|
enumerable: true,
|
|
1858
1584
|
initializer: function initializer() {
|
|
1859
|
-
var
|
|
1585
|
+
var _this12 = this;
|
|
1860
1586
|
|
|
1861
1587
|
return function (newPass, newPassConfirm) {
|
|
1862
1588
|
if (!newPass || !newPassConfirm) {
|
|
@@ -1868,7 +1594,7 @@ var SettlementStore = (_class = function () {
|
|
|
1868
1594
|
var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
|
|
1869
1595
|
return (0, _tplusApi.ccApi)({
|
|
1870
1596
|
Idstore: idstore,
|
|
1871
|
-
meMemberId:
|
|
1597
|
+
meMemberId: _this12.paymode.currentMode.memberId,
|
|
1872
1598
|
oldPassword: null,
|
|
1873
1599
|
newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
|
|
1874
1600
|
dataSource: "POS"
|
|
@@ -1882,143 +1608,134 @@ var SettlementStore = (_class = function () {
|
|
|
1882
1608
|
}), _applyDecoratedDescriptor(_class.prototype, 'initByOriginReturn', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'initByOriginReturn'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'quickSettle', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'quickSettle'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeFocusAndAddPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeFocusAndAddPay'), _class.prototype), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'updateMemberInfo', [_mobx.action], {
|
|
1883
1609
|
enumerable: true,
|
|
1884
1610
|
initializer: function initializer() {
|
|
1885
|
-
var
|
|
1611
|
+
var _this13 = this;
|
|
1886
1612
|
|
|
1887
1613
|
return function () {
|
|
1888
|
-
var
|
|
1614
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(_this) {
|
|
1889
1615
|
var _getLoginInfo, IdStore, StoreCode, resp;
|
|
1890
1616
|
|
|
1891
|
-
return _regenerator2.default.wrap(function
|
|
1617
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1892
1618
|
while (1) {
|
|
1893
|
-
switch (
|
|
1619
|
+
switch (_context7.prev = _context7.next) {
|
|
1894
1620
|
case 0:
|
|
1895
|
-
_getLoginInfo =
|
|
1896
|
-
|
|
1897
|
-
return (0, _tplusApi.tApi)({ Idmember:
|
|
1621
|
+
_getLoginInfo = _this13.getLoginInfo(), IdStore = _getLoginInfo.IdStore, StoreCode = _getLoginInfo.StoreCode;
|
|
1622
|
+
_context7.next = 3;
|
|
1623
|
+
return (0, _tplusApi.tApi)({ Idmember: _this13.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
|
|
1898
1624
|
|
|
1899
1625
|
case 3:
|
|
1900
|
-
resp =
|
|
1626
|
+
resp = _context7.sent;
|
|
1901
1627
|
|
|
1902
1628
|
_this.member = resp;
|
|
1903
1629
|
_this.paymode.updateMemberStorageCardNo(resp.StorageCardNo, resp.WalletEnabled);
|
|
1904
|
-
return
|
|
1630
|
+
return _context7.abrupt('return', _promise2.default.resolve(resp));
|
|
1905
1631
|
|
|
1906
1632
|
case 7:
|
|
1907
1633
|
case 'end':
|
|
1908
|
-
return
|
|
1634
|
+
return _context7.stop();
|
|
1909
1635
|
}
|
|
1910
1636
|
}
|
|
1911
|
-
},
|
|
1637
|
+
}, _callee7, _this13);
|
|
1912
1638
|
}));
|
|
1913
1639
|
|
|
1914
|
-
return function (
|
|
1915
|
-
return
|
|
1640
|
+
return function (_x5) {
|
|
1641
|
+
return _ref17.apply(this, arguments);
|
|
1916
1642
|
};
|
|
1917
1643
|
}();
|
|
1918
1644
|
}
|
|
1919
1645
|
}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'updateCurrentMode', [_mobx.action], {
|
|
1920
1646
|
enumerable: true,
|
|
1921
1647
|
initializer: function initializer() {
|
|
1922
|
-
var
|
|
1648
|
+
var _this14 = this;
|
|
1923
1649
|
|
|
1924
1650
|
return function () {
|
|
1925
|
-
var
|
|
1651
|
+
var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(memberId) {
|
|
1926
1652
|
var result;
|
|
1927
|
-
return _regenerator2.default.wrap(function
|
|
1653
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1928
1654
|
while (1) {
|
|
1929
|
-
switch (
|
|
1655
|
+
switch (_context8.prev = _context8.next) {
|
|
1930
1656
|
case 0:
|
|
1931
|
-
|
|
1657
|
+
_context8.next = 2;
|
|
1932
1658
|
return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId + '/' + true, false, false, { method: 'get' });
|
|
1933
1659
|
|
|
1934
1660
|
case 2:
|
|
1935
|
-
result =
|
|
1661
|
+
result = _context8.sent;
|
|
1936
1662
|
|
|
1937
1663
|
if (!(result && result.data.length)) {
|
|
1938
|
-
|
|
1664
|
+
_context8.next = 20;
|
|
1939
1665
|
break;
|
|
1940
1666
|
}
|
|
1941
1667
|
|
|
1942
1668
|
if (!(result.data.length === 1)) {
|
|
1943
|
-
|
|
1669
|
+
_context8.next = 9;
|
|
1944
1670
|
break;
|
|
1945
1671
|
}
|
|
1946
1672
|
|
|
1947
|
-
|
|
1948
|
-
return
|
|
1673
|
+
_this14.paymode.updateCardInfo(result.data[0]);
|
|
1674
|
+
return _context8.abrupt('return', result.data);
|
|
1949
1675
|
|
|
1950
1676
|
case 9:
|
|
1951
1677
|
if (!(result.data && result.data.length === 1)) {
|
|
1952
|
-
|
|
1678
|
+
_context8.next = 14;
|
|
1953
1679
|
break;
|
|
1954
1680
|
}
|
|
1955
1681
|
|
|
1956
|
-
|
|
1957
|
-
return
|
|
1682
|
+
_this14.paymode.updateCardInfo(result.data[0]);
|
|
1683
|
+
return _context8.abrupt('return', result.data);
|
|
1958
1684
|
|
|
1959
1685
|
case 14:
|
|
1960
1686
|
if (!(result.data && result.data.length > 1)) {
|
|
1961
|
-
|
|
1687
|
+
_context8.next = 18;
|
|
1962
1688
|
break;
|
|
1963
1689
|
}
|
|
1964
1690
|
|
|
1965
|
-
return
|
|
1691
|
+
return _context8.abrupt('return', result.data);
|
|
1966
1692
|
|
|
1967
1693
|
case 18:
|
|
1968
1694
|
_message2.default.warn('没有可用储值卡!');
|
|
1969
|
-
return
|
|
1695
|
+
return _context8.abrupt('return', false);
|
|
1970
1696
|
|
|
1971
1697
|
case 20:
|
|
1972
1698
|
case 'end':
|
|
1973
|
-
return
|
|
1699
|
+
return _context8.stop();
|
|
1974
1700
|
}
|
|
1975
1701
|
}
|
|
1976
|
-
},
|
|
1702
|
+
}, _callee8, _this14);
|
|
1977
1703
|
}));
|
|
1978
1704
|
|
|
1979
|
-
return function (
|
|
1980
|
-
return
|
|
1705
|
+
return function (_x6) {
|
|
1706
|
+
return _ref18.apply(this, arguments);
|
|
1981
1707
|
};
|
|
1982
1708
|
}();
|
|
1983
1709
|
}
|
|
1984
1710
|
}), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'updateCardInfo', [_mobx.action], {
|
|
1985
1711
|
enumerable: true,
|
|
1986
1712
|
initializer: function initializer() {
|
|
1987
|
-
var
|
|
1713
|
+
var _this15 = this;
|
|
1988
1714
|
|
|
1989
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1715
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9() {
|
|
1990
1716
|
var address, result;
|
|
1991
|
-
return _regenerator2.default.wrap(function
|
|
1717
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
1992
1718
|
while (1) {
|
|
1993
|
-
switch (
|
|
1719
|
+
switch (_context9.prev = _context9.next) {
|
|
1994
1720
|
case 0:
|
|
1995
|
-
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' +
|
|
1996
|
-
|
|
1721
|
+
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + _this15.paymode.currentMode.storageCardNo;
|
|
1722
|
+
_context9.next = 3;
|
|
1997
1723
|
return (0, _tplusApi.ccApi)({}, address, false, false, { method: 'get', timeout_skip: true });
|
|
1998
1724
|
|
|
1999
1725
|
case 3:
|
|
2000
|
-
result =
|
|
1726
|
+
result = _context9.sent;
|
|
2001
1727
|
|
|
2002
|
-
|
|
1728
|
+
_this15.paymode.updateCardInfo(result.data);
|
|
2003
1729
|
|
|
2004
1730
|
case 5:
|
|
2005
1731
|
case 'end':
|
|
2006
|
-
return
|
|
1732
|
+
return _context9.stop();
|
|
2007
1733
|
}
|
|
2008
1734
|
}
|
|
2009
|
-
},
|
|
1735
|
+
}, _callee9, _this15);
|
|
2010
1736
|
}));
|
|
2011
1737
|
}
|
|
2012
|
-
}), _applyDecoratedDescriptor(_class.prototype, 'addDjq', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addDjq'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeFocusOnly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeFocusOnly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeClickFocusOnly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeClickFocusOnly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeValue'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'addPayDirectly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addPayDirectly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'addPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addPay'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'delPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'delPay'), _class.prototype),
|
|
2013
|
-
enumerable: true,
|
|
2014
|
-
initializer: function initializer() {
|
|
2015
|
-
var _this18 = this;
|
|
2016
|
-
|
|
2017
|
-
return function () {
|
|
2018
|
-
_this18.dto.VoucherDate = new Date();
|
|
2019
|
-
};
|
|
2020
|
-
}
|
|
2021
|
-
}), _applyDecoratedDescriptor(_class.prototype, 'setDtoID', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'setDtoID'), _class.prototype)), _class);
|
|
1738
|
+
}), _applyDecoratedDescriptor(_class.prototype, 'addDjq', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addDjq'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeFocusOnly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeFocusOnly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeClickFocusOnly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeClickFocusOnly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeValue'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'addPayDirectly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addPayDirectly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'addPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addPay'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'delPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'delPay'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'setDtoID', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'setDtoID'), _class.prototype)), _class);
|
|
2022
1739
|
exports.default = SettlementStore;
|
|
2023
1740
|
var PayMode = exports.PayMode = (_class3 = function () {
|
|
2024
1741
|
//应收
|
|
@@ -2032,19 +1749,19 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2032
1749
|
this.onlineamount = 0;
|
|
2033
1750
|
this.maxamount = 0;
|
|
2034
1751
|
|
|
2035
|
-
_initDefineProp(this, 'currentFocus',
|
|
1752
|
+
_initDefineProp(this, 'currentFocus', _descriptor5, this);
|
|
2036
1753
|
|
|
2037
|
-
_initDefineProp(this, 'received',
|
|
1754
|
+
_initDefineProp(this, 'received', _descriptor6, this);
|
|
2038
1755
|
|
|
2039
|
-
_initDefineProp(this, 'receivable',
|
|
1756
|
+
_initDefineProp(this, 'receivable', _descriptor7, this);
|
|
2040
1757
|
|
|
2041
|
-
_initDefineProp(this, 'paymodes',
|
|
1758
|
+
_initDefineProp(this, 'paymodes', _descriptor8, this);
|
|
2042
1759
|
|
|
2043
|
-
_initDefineProp(this, 'thePaymodes',
|
|
1760
|
+
_initDefineProp(this, 'thePaymodes', _descriptor9, this);
|
|
2044
1761
|
|
|
2045
|
-
_initDefineProp(this, 'storageCardNo',
|
|
1762
|
+
_initDefineProp(this, 'storageCardNo', _descriptor10, this);
|
|
2046
1763
|
|
|
2047
|
-
_initDefineProp(this, 'balance',
|
|
1764
|
+
_initDefineProp(this, 'balance', _descriptor11, this);
|
|
2048
1765
|
|
|
2049
1766
|
this.currentMode = null;
|
|
2050
1767
|
this.checkList = [];
|
|
@@ -2053,11 +1770,11 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2053
1770
|
hotKey: "Ctrl+M"
|
|
2054
1771
|
};
|
|
2055
1772
|
|
|
2056
|
-
_initDefineProp(this, 'calcCheckList',
|
|
1773
|
+
_initDefineProp(this, 'calcCheckList', _descriptor12, this);
|
|
2057
1774
|
|
|
2058
|
-
_initDefineProp(this, 'setCouponNum',
|
|
1775
|
+
_initDefineProp(this, 'setCouponNum', _descriptor13, this);
|
|
2059
1776
|
|
|
2060
|
-
_initDefineProp(this, 'addDjqs',
|
|
1777
|
+
_initDefineProp(this, 'addDjqs', _descriptor14, this);
|
|
2061
1778
|
}
|
|
2062
1779
|
// @observable store = null;
|
|
2063
1780
|
|
|
@@ -2116,7 +1833,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2116
1833
|
}, {
|
|
2117
1834
|
key: 'calcDjqCheckValue',
|
|
2118
1835
|
value: function calcDjqCheckValue(q1, dto, params) {
|
|
2119
|
-
var
|
|
1836
|
+
var _this16 = this;
|
|
2120
1837
|
|
|
2121
1838
|
var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
|
|
2122
1839
|
var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
|
|
@@ -2130,12 +1847,12 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2130
1847
|
this.checkList = [];
|
|
2131
1848
|
}
|
|
2132
1849
|
|
|
2133
|
-
var
|
|
2134
|
-
isNewRetailBCPos =
|
|
1850
|
+
var _ref20 = _mutantsUtil.platform || {},
|
|
1851
|
+
isNewRetailBCPos = _ref20.isNewRetailBCPos;
|
|
2135
1852
|
|
|
2136
|
-
var _enumController$
|
|
2137
|
-
PayStyle = _enumController$
|
|
2138
|
-
Differentiate = _enumController$
|
|
1853
|
+
var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
|
|
1854
|
+
PayStyle = _enumController$getEn16.PayStyle,
|
|
1855
|
+
Differentiate = _enumController$getEn16.Differentiate;
|
|
2139
1856
|
|
|
2140
1857
|
if (q1) {
|
|
2141
1858
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
@@ -2163,7 +1880,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2163
1880
|
if (!q1.checked) {
|
|
2164
1881
|
this.checkList.forEach(function (ele, i) {
|
|
2165
1882
|
if (ele.id === q1.id) {
|
|
2166
|
-
|
|
1883
|
+
_this16.checkList.splice(i, 1);
|
|
2167
1884
|
}
|
|
2168
1885
|
});
|
|
2169
1886
|
} else {
|
|
@@ -2235,24 +1952,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2235
1952
|
if (result && result.length != 0) {
|
|
2236
1953
|
result.forEach(function (element, index) {
|
|
2237
1954
|
var djq1 = false;
|
|
2238
|
-
|
|
1955
|
+
_this16.currentMode.djqs.forEach(function (djq) {
|
|
2239
1956
|
if (element.id === djq.id) {
|
|
2240
1957
|
djq1 = true;
|
|
2241
1958
|
}
|
|
2242
1959
|
});
|
|
2243
1960
|
|
|
2244
|
-
var
|
|
2245
|
-
couponCode =
|
|
2246
|
-
name =
|
|
2247
|
-
tieredAmountResult =
|
|
2248
|
-
fromDate =
|
|
2249
|
-
dateMount =
|
|
2250
|
-
promoMethodEnum =
|
|
2251
|
-
discountPct =
|
|
2252
|
-
nominalAmount =
|
|
2253
|
-
promoId =
|
|
2254
|
-
id =
|
|
2255
|
-
doorsill =
|
|
1961
|
+
var _ref21 = element || {},
|
|
1962
|
+
couponCode = _ref21.couponCode,
|
|
1963
|
+
name = _ref21.name,
|
|
1964
|
+
tieredAmountResult = _ref21.tieredAmountResult,
|
|
1965
|
+
fromDate = _ref21.fromDate,
|
|
1966
|
+
dateMount = _ref21.dateMount,
|
|
1967
|
+
promoMethodEnum = _ref21.promoMethodEnum,
|
|
1968
|
+
discountPct = _ref21.discountPct,
|
|
1969
|
+
nominalAmount = _ref21.nominalAmount,
|
|
1970
|
+
promoId = _ref21.promoId,
|
|
1971
|
+
id = _ref21.id,
|
|
1972
|
+
doorsill = _ref21.doorsill;
|
|
2256
1973
|
|
|
2257
1974
|
var condValue = tieredAmountResult.condValue,
|
|
2258
1975
|
promoDiscount = tieredAmountResult.promoDiscount,
|
|
@@ -2280,10 +1997,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2280
1997
|
// couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
|
|
2281
1998
|
// id
|
|
2282
1999
|
// })
|
|
2283
|
-
|
|
2000
|
+
_this16.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
|
|
2284
2001
|
djq1 = false;
|
|
2285
2002
|
} else {
|
|
2286
|
-
|
|
2003
|
+
_this16.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
|
|
2287
2004
|
// this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
|
|
2288
2005
|
// djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
|
|
2289
2006
|
}
|
|
@@ -2296,11 +2013,11 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2296
2013
|
}, {
|
|
2297
2014
|
key: 'calcDjqValue',
|
|
2298
2015
|
value: function calcDjqValue(q1) {
|
|
2299
|
-
var
|
|
2300
|
-
isNewRetailBCPos =
|
|
2016
|
+
var _ref22 = _mutantsUtil.platform || {},
|
|
2017
|
+
isNewRetailBCPos = _ref22.isNewRetailBCPos;
|
|
2301
2018
|
|
|
2302
|
-
var _enumController$
|
|
2303
|
-
Differentiate = _enumController$
|
|
2019
|
+
var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
|
|
2020
|
+
Differentiate = _enumController$getEn17.Differentiate;
|
|
2304
2021
|
|
|
2305
2022
|
if (q1) {
|
|
2306
2023
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
@@ -2362,8 +2079,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2362
2079
|
this.currentMode.errinfo = '';
|
|
2363
2080
|
var sum = this.amount;
|
|
2364
2081
|
|
|
2365
|
-
var _enumController$
|
|
2366
|
-
PayStyle = _enumController$
|
|
2082
|
+
var _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(),
|
|
2083
|
+
PayStyle = _enumController$getEn18.PayStyle;
|
|
2367
2084
|
|
|
2368
2085
|
this.thePaymodes && this.thePaymodes.forEach(function (mode) {
|
|
2369
2086
|
if (mode.paymentType === PayStyle.hyczk) {
|
|
@@ -2387,29 +2104,30 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2387
2104
|
}, {
|
|
2388
2105
|
key: 'setPaymodes',
|
|
2389
2106
|
value: function () {
|
|
2390
|
-
var
|
|
2391
|
-
var
|
|
2107
|
+
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(type, isIntegralExchange) {
|
|
2108
|
+
var _this17 = this;
|
|
2392
2109
|
|
|
2393
|
-
var _enumController$
|
|
2110
|
+
var _enumController$getEn19, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
|
|
2394
2111
|
|
|
2395
|
-
return _regenerator2.default.wrap(function
|
|
2112
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
2396
2113
|
while (1) {
|
|
2397
|
-
switch (
|
|
2114
|
+
switch (_context10.prev = _context10.next) {
|
|
2398
2115
|
case 0:
|
|
2399
|
-
_enumController$
|
|
2116
|
+
_enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn19.settleStyleType, PayStyle = _enumController$getEn19.PayStyle;
|
|
2400
2117
|
memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
|
|
2401
2118
|
param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
|
|
2402
|
-
|
|
2119
|
+
_context10.next = 5;
|
|
2403
2120
|
return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
|
|
2404
2121
|
|
|
2405
2122
|
case 5:
|
|
2406
|
-
modes =
|
|
2123
|
+
modes = _context10.sent;
|
|
2407
2124
|
|
|
2408
2125
|
if (modes) {
|
|
2409
2126
|
(0, _mobx.runInAction)(function () {
|
|
2410
2127
|
var paymodes = [];
|
|
2411
2128
|
(0, _each3.default)(modes.SettleStyles, function (mode, index) {
|
|
2412
2129
|
//产品需求确认会员储值卡结算方式前端展示统一调整为“储值卡" tuzha by 2020-07-08
|
|
2130
|
+
|
|
2413
2131
|
if (mode.Code == PayStyle.hyczk) {
|
|
2414
2132
|
mode.Name = '储值卡';
|
|
2415
2133
|
}
|
|
@@ -2424,24 +2142,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2424
2142
|
idBankAccount: mode.IdBankAccount,
|
|
2425
2143
|
exchangeRate: mode.Currency ? mode.Currency.ExchangeRate : 1,
|
|
2426
2144
|
idCurrency: mode.Currency ? mode.Currency.ID : -1,
|
|
2427
|
-
calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88"
|
|
2428
|
-
thridPayment: mode.ThirdPaymentInfo
|
|
2145
|
+
calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88"
|
|
2429
2146
|
});
|
|
2430
2147
|
});
|
|
2431
|
-
|
|
2148
|
+
_this17.paymodes = paymodes;
|
|
2149
|
+
//modes.QuickSettleStyles
|
|
2432
2150
|
});
|
|
2433
2151
|
}
|
|
2434
2152
|
|
|
2435
2153
|
case 7:
|
|
2436
2154
|
case 'end':
|
|
2437
|
-
return
|
|
2155
|
+
return _context10.stop();
|
|
2438
2156
|
}
|
|
2439
2157
|
}
|
|
2440
|
-
},
|
|
2158
|
+
}, _callee10, this);
|
|
2441
2159
|
}));
|
|
2442
2160
|
|
|
2443
|
-
function setPaymodes(
|
|
2444
|
-
return
|
|
2161
|
+
function setPaymodes(_x7, _x8) {
|
|
2162
|
+
return _ref23.apply(this, arguments);
|
|
2445
2163
|
}
|
|
2446
2164
|
|
|
2447
2165
|
return setPaymodes;
|
|
@@ -2458,57 +2176,57 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2458
2176
|
}
|
|
2459
2177
|
}]);
|
|
2460
2178
|
return PayMode;
|
|
2461
|
-
}(), (
|
|
2179
|
+
}(), (_descriptor5 = _applyDecoratedDescriptor(_class3.prototype, 'currentFocus', [_mobx.observable], {
|
|
2462
2180
|
enumerable: true,
|
|
2463
2181
|
initializer: function initializer() {
|
|
2464
2182
|
return "";
|
|
2465
2183
|
}
|
|
2466
|
-
}),
|
|
2184
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class3.prototype, 'received', [_mobx.observable], {
|
|
2467
2185
|
enumerable: true,
|
|
2468
2186
|
initializer: function initializer() {
|
|
2469
2187
|
return 0;
|
|
2470
2188
|
}
|
|
2471
|
-
}),
|
|
2189
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class3.prototype, 'receivable', [_mobx.observable], {
|
|
2472
2190
|
enumerable: true,
|
|
2473
2191
|
initializer: function initializer() {
|
|
2474
2192
|
return 0;
|
|
2475
2193
|
}
|
|
2476
|
-
}),
|
|
2194
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class3.prototype, 'paymodes', [_mobx.observable], {
|
|
2477
2195
|
enumerable: true,
|
|
2478
2196
|
initializer: function initializer() {
|
|
2479
2197
|
return [];
|
|
2480
2198
|
}
|
|
2481
|
-
}),
|
|
2199
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class3.prototype, 'thePaymodes', [_mobx.observable], {
|
|
2482
2200
|
enumerable: true,
|
|
2483
2201
|
initializer: function initializer() {
|
|
2484
2202
|
return [];
|
|
2485
2203
|
}
|
|
2486
|
-
}),
|
|
2204
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class3.prototype, 'storageCardNo', [_mobx.observable], {
|
|
2487
2205
|
enumerable: true,
|
|
2488
2206
|
initializer: function initializer() {
|
|
2489
2207
|
return null;
|
|
2490
2208
|
}
|
|
2491
|
-
}),
|
|
2209
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class3.prototype, 'balance', [_mobx.observable], {
|
|
2492
2210
|
enumerable: true,
|
|
2493
2211
|
initializer: function initializer() {
|
|
2494
2212
|
return null;
|
|
2495
2213
|
}
|
|
2496
|
-
}), _applyDecoratedDescriptor(_class3.prototype, 'clean', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clean'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'clear', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clear'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcReserved', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcReserved'), _class3.prototype),
|
|
2214
|
+
}), _applyDecoratedDescriptor(_class3.prototype, 'clean', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clean'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'clear', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clear'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcReserved', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcReserved'), _class3.prototype), _descriptor12 = _applyDecoratedDescriptor(_class3.prototype, 'calcCheckList', [_mobx.action], {
|
|
2497
2215
|
enumerable: true,
|
|
2498
2216
|
initializer: function initializer() {
|
|
2499
|
-
var
|
|
2217
|
+
var _this18 = this;
|
|
2500
2218
|
|
|
2501
2219
|
return function () {
|
|
2502
|
-
|
|
2220
|
+
_this18.checkList = [];
|
|
2503
2221
|
};
|
|
2504
2222
|
}
|
|
2505
|
-
}), _applyDecoratedDescriptor(_class3.prototype, 'updateMemberStorageCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'updateMemberStorageCardNo'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'updateCardInfo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'updateCardInfo'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype),
|
|
2223
|
+
}), _applyDecoratedDescriptor(_class3.prototype, 'updateMemberStorageCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'updateMemberStorageCardNo'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'updateCardInfo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'updateCardInfo'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype), _descriptor13 = _applyDecoratedDescriptor(_class3.prototype, 'setCouponNum', [_mobx.action], {
|
|
2506
2224
|
enumerable: true,
|
|
2507
2225
|
initializer: function initializer() {
|
|
2508
|
-
var
|
|
2226
|
+
var _this19 = this;
|
|
2509
2227
|
|
|
2510
2228
|
return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
|
|
2511
|
-
|
|
2229
|
+
_this19.currentMode.djqs.forEach(function (ele) {
|
|
2512
2230
|
if (ele.id === id) {
|
|
2513
2231
|
promoMethodEnum == "CASH_COUPON" ? ele.amount = nominalAmount : ele.amount = promoDiscount;
|
|
2514
2232
|
ele.couponCategoryEnum = couponNum;
|
|
@@ -2518,10 +2236,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2518
2236
|
});
|
|
2519
2237
|
};
|
|
2520
2238
|
}
|
|
2521
|
-
}),
|
|
2239
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
|
|
2522
2240
|
enumerable: true,
|
|
2523
2241
|
initializer: function initializer() {
|
|
2524
|
-
var
|
|
2242
|
+
var _this20 = this;
|
|
2525
2243
|
|
|
2526
2244
|
return function (promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
|
|
2527
2245
|
var djq = {
|
|
@@ -2543,25 +2261,25 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2543
2261
|
couponCategoryEnum: couponCategoryEnum,
|
|
2544
2262
|
id: id
|
|
2545
2263
|
};
|
|
2546
|
-
|
|
2264
|
+
_this20.currentMode.djqs.push(djq);
|
|
2547
2265
|
};
|
|
2548
2266
|
}
|
|
2549
2267
|
}), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqValue'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'reCalculationDjqs', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'reCalculationDjqs'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'clearDjqs', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clearDjqs'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'setCurrentModeValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'setCurrentModeValue'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcMemberBalance', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcMemberBalance'), _class3.prototype)), _class3);
|
|
2550
2268
|
var Member = exports.Member = (_class5 = function () {
|
|
2551
2269
|
function Member(m) {
|
|
2552
|
-
var
|
|
2270
|
+
var _this21 = this;
|
|
2553
2271
|
|
|
2554
2272
|
(0, _classCallCheck3.default)(this, Member);
|
|
2555
2273
|
|
|
2556
|
-
_initDefineProp(this, 'cardNo',
|
|
2274
|
+
_initDefineProp(this, 'cardNo', _descriptor15, this);
|
|
2557
2275
|
|
|
2558
|
-
_initDefineProp(this, 'balance',
|
|
2276
|
+
_initDefineProp(this, 'balance', _descriptor16, this);
|
|
2559
2277
|
|
|
2560
|
-
_initDefineProp(this, 'exchangable',
|
|
2278
|
+
_initDefineProp(this, 'exchangable', _descriptor17, this);
|
|
2561
2279
|
|
|
2562
|
-
_initDefineProp(this, 'meStorageCardId',
|
|
2280
|
+
_initDefineProp(this, 'meStorageCardId', _descriptor18, this);
|
|
2563
2281
|
|
|
2564
|
-
_initDefineProp(this, 'storageCardNo',
|
|
2282
|
+
_initDefineProp(this, 'storageCardNo', _descriptor19, this);
|
|
2565
2283
|
|
|
2566
2284
|
if (m) {
|
|
2567
2285
|
this.id = m.ID;
|
|
@@ -2572,15 +2290,15 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2572
2290
|
return key == 'canusedbalancestorage';
|
|
2573
2291
|
});
|
|
2574
2292
|
|
|
2575
|
-
var
|
|
2576
|
-
isNewRetailBCPos =
|
|
2293
|
+
var _ref24 = _mutantsUtil.platform || {},
|
|
2294
|
+
isNewRetailBCPos = _ref24.isNewRetailBCPos;
|
|
2577
2295
|
|
|
2578
2296
|
(0, _mobx.runInAction)(function () {
|
|
2579
|
-
|
|
2297
|
+
_this21.cardNo = m.CardCode;
|
|
2580
2298
|
if (index >= 0) {
|
|
2581
|
-
|
|
2299
|
+
_this21.balance = parseFloat(m.DynamicPropertyValues[index]);
|
|
2582
2300
|
} else {
|
|
2583
|
-
|
|
2301
|
+
_this21.balance = _this21.rawbalance;
|
|
2584
2302
|
}
|
|
2585
2303
|
});
|
|
2586
2304
|
this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;
|
|
@@ -2602,19 +2320,19 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2602
2320
|
}
|
|
2603
2321
|
}]);
|
|
2604
2322
|
return Member;
|
|
2605
|
-
}(), (
|
|
2323
|
+
}(), (_descriptor15 = _applyDecoratedDescriptor(_class5.prototype, 'cardNo', [_mobx.observable], {
|
|
2606
2324
|
enumerable: true,
|
|
2607
2325
|
initializer: null
|
|
2608
|
-
}),
|
|
2326
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class5.prototype, 'balance', [_mobx.observable], {
|
|
2609
2327
|
enumerable: true,
|
|
2610
2328
|
initializer: null
|
|
2611
|
-
}),
|
|
2329
|
+
}), _descriptor17 = _applyDecoratedDescriptor(_class5.prototype, 'exchangable', [_mobx.observable], {
|
|
2612
2330
|
enumerable: true,
|
|
2613
2331
|
initializer: null
|
|
2614
|
-
}),
|
|
2332
|
+
}), _descriptor18 = _applyDecoratedDescriptor(_class5.prototype, 'meStorageCardId', [_mobx.observable], {
|
|
2615
2333
|
enumerable: true,
|
|
2616
2334
|
initializer: null
|
|
2617
|
-
}),
|
|
2335
|
+
}), _descriptor19 = _applyDecoratedDescriptor(_class5.prototype, 'storageCardNo', [_mobx.observable], {
|
|
2618
2336
|
enumerable: true,
|
|
2619
2337
|
initializer: null
|
|
2620
2338
|
}), _applyDecoratedDescriptor(_class5.prototype, 'setExchangable', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setExchangable'), _class5.prototype), _applyDecoratedDescriptor(_class5.prototype, 'setCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setCardNo'), _class5.prototype)), _class5);
|