tplus-member 3.26.17 → 3.26.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/member/ShopMember.less +9 -3
- package/dist/member/ShopMemberStorage.js +1 -1
- package/dist/member/ShopMemberStorage.js.map +1 -1
- package/dist/member/api.js +2 -2
- package/dist/member/api.js.map +1 -1
- package/dist/member/index.js +1 -1
- package/dist/member/index.js.map +1 -1
- package/dist/member/memberMenu/style.less +1 -1
- package/dist/member/memberMenuStorage/index.js +122 -85
- package/dist/member/memberMenuStorage/index.js.map +1 -1
- package/dist/member/memberMenuStorage/style.less +4 -2
- package/dist/stores/MemberStore.js +10 -5
- package/dist/stores/MemberStore.js.map +1 -1
- package/dist/views/MemberStoreNewView.js.map +1 -1
- package/package.json +1 -1
|
@@ -310,7 +310,7 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
310
310
|
key: 'storage',
|
|
311
311
|
value: function () {
|
|
312
312
|
var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
|
313
|
-
var _props5, _props5$cardList, cardList, _props5$selected, selected, cardInfo, _ref4, CardTypeEnum, WalletEnabled;
|
|
313
|
+
var _props5, _props5$cardList, cardList, _props5$selected, selected, cardInfo, _ref4, CardTypeEnum, WalletEnabled, FreePaymentPasswordStore;
|
|
314
314
|
|
|
315
315
|
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
316
316
|
while (1) {
|
|
@@ -320,10 +320,10 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
320
320
|
|
|
321
321
|
if (cardList && cardList.length) {
|
|
322
322
|
cardInfo = cardList[selected];
|
|
323
|
-
_ref4 = cardInfo || {}, CardTypeEnum = _ref4.CardTypeEnum, WalletEnabled = _ref4.WalletEnabled;
|
|
323
|
+
_ref4 = cardInfo || {}, CardTypeEnum = _ref4.CardTypeEnum, WalletEnabled = _ref4.WalletEnabled, FreePaymentPasswordStore = _ref4.FreePaymentPasswordStore;
|
|
324
324
|
|
|
325
325
|
if (CardTypeEnum === 'BALANCE_CARD') {
|
|
326
|
-
if (WalletEnabled) {
|
|
326
|
+
if (FreePaymentPasswordStore || WalletEnabled) {
|
|
327
327
|
this.storageInit();
|
|
328
328
|
} else {
|
|
329
329
|
this.setState({ modifyPass: true, passwordTitle: '设置密码', warnContent: '' });
|
|
@@ -487,10 +487,9 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
487
487
|
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
|
488
488
|
var cardInfo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
489
489
|
var storageAmount = arguments[1];
|
|
490
|
-
var
|
|
491
|
-
var isCash = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
490
|
+
var lastesStorageResult = arguments[2];
|
|
492
491
|
|
|
493
|
-
var store, _store$data, data, MeStorageCardId, StorageCardNo, ID, _cardInfo$PresentAmou, PresentAmount, _props9, getCardList, _props9$cardList, cardList, _ref10,
|
|
492
|
+
var store, _store$data, data, MeStorageCardId, StorageCardNo, ID, _cardInfo$PresentAmou, PresentAmount, _props9, getCardList, _props9$cardList, cardList, _ref10, _ref10$isCanRefund, isCanRefund, _ref10$storageInfos, storageInfos, params, _ref11, finAccountId, paymentTypeId, ret, _ref12, isSuccess, ex;
|
|
494
493
|
|
|
495
494
|
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
496
495
|
while (1) {
|
|
@@ -508,7 +507,7 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
508
507
|
_store$data = store.data, data = _store$data === undefined ? {} : _store$data;
|
|
509
508
|
MeStorageCardId = cardInfo.MeStorageCardId, StorageCardNo = cardInfo.StorageCardNo, ID = cardInfo.ID, _cardInfo$PresentAmou = cardInfo.PresentAmount, PresentAmount = _cardInfo$PresentAmou === undefined ? 0 : _cardInfo$PresentAmou;
|
|
510
509
|
_props9 = this.props, getCardList = _props9.getCardList, _props9$cardList = _props9.cardList, cardList = _props9$cardList === undefined ? [] : _props9$cardList;
|
|
511
|
-
_ref10 =
|
|
510
|
+
_ref10 = lastesStorageResult || {}, _ref10$isCanRefund = _ref10.isCanRefund, isCanRefund = _ref10$isCanRefund === undefined ? false : _ref10$isCanRefund, _ref10$storageInfos = _ref10.storageInfos, storageInfos = _ref10$storageInfos === undefined ? [] : _ref10$storageInfos;
|
|
512
511
|
params = (0, _extends3.default)({}, data, {
|
|
513
512
|
StorageDetails: [{
|
|
514
513
|
Idmember: ID,
|
|
@@ -520,8 +519,14 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
520
519
|
}],
|
|
521
520
|
redBlueFlagEnum: 'RED',
|
|
522
521
|
storageAmount: storageAmount,
|
|
523
|
-
tradeTypeEnum: 'REFUND_CARD'
|
|
524
|
-
|
|
522
|
+
tradeTypeEnum: 'REFUND_CARD'
|
|
523
|
+
|
|
524
|
+
// 如果isCanRefund是false的话,说明是需要退现金,入参的计算方式明细金额是需要退的总金额
|
|
525
|
+
});
|
|
526
|
+
if (!isCanRefund) {
|
|
527
|
+
_ref11 = storageInfos[0] || {}, finAccountId = _ref11.finAccountId, paymentTypeId = _ref11.paymentTypeId;
|
|
528
|
+
|
|
529
|
+
params.StorageMutiSettleDetails = [{
|
|
525
530
|
"StorageAmount": storageAmount,
|
|
526
531
|
"PaymentCode": "",
|
|
527
532
|
"DynamicPropertyValues": [],
|
|
@@ -530,53 +535,67 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
530
535
|
"IdsettleStyle": paymentTypeId,
|
|
531
536
|
"DynamicPropertyKeys": [],
|
|
532
537
|
"DataSource": {}
|
|
533
|
-
}]
|
|
534
|
-
}
|
|
535
|
-
|
|
538
|
+
}];
|
|
539
|
+
} else {
|
|
540
|
+
params.StorageMutiSettleDetails = storageInfos.map(function (item) {
|
|
541
|
+
return {
|
|
542
|
+
"StorageAmount": item.latestStorageAmount,
|
|
543
|
+
"PaymentCode": "",
|
|
544
|
+
"DynamicPropertyValues": [],
|
|
545
|
+
"IdbankAccount": item.finAccountId,
|
|
546
|
+
"Code": 1,
|
|
547
|
+
"IdsettleStyle": item.paymentTypeId,
|
|
548
|
+
"DynamicPropertyKeys": [],
|
|
549
|
+
"DataSource": {}
|
|
550
|
+
};
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
_context4.next = 11;
|
|
536
555
|
return this.setState({
|
|
537
556
|
refundBtnDisabled: true
|
|
538
557
|
});
|
|
539
558
|
|
|
540
|
-
case
|
|
541
|
-
_context4.prev =
|
|
542
|
-
_context4.next =
|
|
559
|
+
case 11:
|
|
560
|
+
_context4.prev = 11;
|
|
561
|
+
_context4.next = 14;
|
|
543
562
|
return this.api.ReturnedStorage(params);
|
|
544
563
|
|
|
545
|
-
case
|
|
564
|
+
case 14:
|
|
546
565
|
ret = _context4.sent;
|
|
547
|
-
|
|
566
|
+
_ref12 = ret.data || {}, isSuccess = _ref12.isSuccess, ex = _ref12.ex;
|
|
548
567
|
|
|
549
|
-
if (isSuccess
|
|
568
|
+
if (isSuccess === true || isSuccess === 'true') {
|
|
550
569
|
getCardList && getCardList(cardList && cardList.length > 1 ? cardList[0].MemberMobile : StorageCardNo);
|
|
551
570
|
_tplusComponentsTouch.Message.success('退储值成功!');
|
|
552
571
|
} else {
|
|
553
572
|
this.returnedCash('\u9000\u6B3E\u5931\u8D25\uFF0C\u53EA\u80FD\u9000\u73B0\u91D1\uFF0C\u662F\u5426\u7EE7\u7EED', storageAmount);
|
|
554
573
|
}
|
|
555
574
|
|
|
556
|
-
_context4.next =
|
|
575
|
+
_context4.next = 19;
|
|
557
576
|
return this.setState({
|
|
558
577
|
refundBtnDisabled: false,
|
|
559
578
|
refundShow: false
|
|
560
579
|
});
|
|
561
580
|
|
|
562
|
-
case
|
|
563
|
-
_context4.next =
|
|
581
|
+
case 19:
|
|
582
|
+
_context4.next = 25;
|
|
564
583
|
break;
|
|
565
584
|
|
|
566
|
-
case
|
|
567
|
-
_context4.prev =
|
|
568
|
-
_context4.t0 = _context4['catch'](
|
|
569
|
-
_context4.next =
|
|
585
|
+
case 21:
|
|
586
|
+
_context4.prev = 21;
|
|
587
|
+
_context4.t0 = _context4['catch'](11);
|
|
588
|
+
_context4.next = 25;
|
|
570
589
|
return this.setState({
|
|
571
590
|
refundBtnDisabled: false
|
|
572
591
|
});
|
|
573
592
|
|
|
574
|
-
case
|
|
593
|
+
case 25:
|
|
575
594
|
case 'end':
|
|
576
595
|
return _context4.stop();
|
|
577
596
|
}
|
|
578
597
|
}
|
|
579
|
-
}, _callee4, this, [[
|
|
598
|
+
}, _callee4, this, [[11, 21]]);
|
|
580
599
|
}));
|
|
581
600
|
|
|
582
601
|
function submitRefundStorage() {
|
|
@@ -631,8 +650,8 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
631
650
|
});
|
|
632
651
|
}
|
|
633
652
|
if (ret === true) {
|
|
634
|
-
var
|
|
635
|
-
isHorizontalSunMi =
|
|
653
|
+
var _ref13 = _mutantsUtil.platform || {},
|
|
654
|
+
isHorizontalSunMi = _ref13.isHorizontalSunMi;
|
|
636
655
|
|
|
637
656
|
switch (key) {
|
|
638
657
|
case 'storage':
|
|
@@ -683,16 +702,16 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
683
702
|
_props10$cardList = _props10.cardList,
|
|
684
703
|
cardList = _props10$cardList === undefined ? [] : _props10$cardList;
|
|
685
704
|
|
|
686
|
-
var
|
|
687
|
-
Id =
|
|
688
|
-
|
|
689
|
-
BalanceStorage =
|
|
690
|
-
|
|
691
|
-
PresentAmount =
|
|
692
|
-
WalletEnabled =
|
|
693
|
-
CardTypeEnum =
|
|
694
|
-
CardStatusEnum =
|
|
695
|
-
StorageCardNo =
|
|
705
|
+
var _ref14 = cardList.length && cardList[selected] || {},
|
|
706
|
+
Id = _ref14.Id,
|
|
707
|
+
_ref14$BalanceStorage = _ref14.BalanceStorage,
|
|
708
|
+
BalanceStorage = _ref14$BalanceStorage === undefined ? 0 : _ref14$BalanceStorage,
|
|
709
|
+
_ref14$PresentAmount = _ref14.PresentAmount,
|
|
710
|
+
PresentAmount = _ref14$PresentAmount === undefined ? 0 : _ref14$PresentAmount,
|
|
711
|
+
WalletEnabled = _ref14.WalletEnabled,
|
|
712
|
+
CardTypeEnum = _ref14.CardTypeEnum,
|
|
713
|
+
CardStatusEnum = _ref14.CardStatusEnum,
|
|
714
|
+
StorageCardNo = _ref14.StorageCardNo;
|
|
696
715
|
|
|
697
716
|
return _react2.default.createElement(
|
|
698
717
|
'div',
|
|
@@ -733,10 +752,10 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
733
752
|
cancel: this.changePasswordCancel,
|
|
734
753
|
btnDissabled: btnDissabled
|
|
735
754
|
},
|
|
736
|
-
passwordTitle === '换卡' ? _react2.default.createElement(_changeMemberCard2.default, { cardList: cardList && cardList.length && cardList[selected], modifyMember: modifyMember, member: member, ref: function ref(
|
|
737
|
-
return _this4.modifyPass = _ref14;
|
|
738
|
-
}, cancelModal: this.changePasswordCancel }) : _react2.default.createElement(_modifyPass2.default, { menuKey: menuKey, cardListCopy: cardList, cardList: cardList && cardList.length && cardList[selected], changeBtnDisabled: this.changeBtnDisabled, loadUserInfo: getCardList, selected: selected, storageInit: this.storageInit, passwordTitle: CardTypeEnum === 'BALANCE_CARD' && !WalletEnabled ? '设置密码' : passwordTitle, modifyMember: modifyMember, ref: function ref(_ref15) {
|
|
755
|
+
passwordTitle === '换卡' ? _react2.default.createElement(_changeMemberCard2.default, { cardList: cardList && cardList.length && cardList[selected], modifyMember: modifyMember, member: member, ref: function ref(_ref15) {
|
|
739
756
|
return _this4.modifyPass = _ref15;
|
|
757
|
+
}, cancelModal: this.changePasswordCancel }) : _react2.default.createElement(_modifyPass2.default, { menuKey: menuKey, cardListCopy: cardList, cardList: cardList && cardList.length && cardList[selected], changeBtnDisabled: this.changeBtnDisabled, loadUserInfo: getCardList, selected: selected, storageInit: this.storageInit, passwordTitle: CardTypeEnum === 'BALANCE_CARD' && !WalletEnabled ? '设置密码' : passwordTitle, modifyMember: modifyMember, ref: function ref(_ref16) {
|
|
758
|
+
return _this4.modifyPass = _ref16;
|
|
740
759
|
}, member: member, cancelModal: this.changePasswordCancel })
|
|
741
760
|
),
|
|
742
761
|
_react2.default.createElement(
|
|
@@ -751,8 +770,8 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
751
770
|
btnDissabled: bindCardBtnDisabled
|
|
752
771
|
},
|
|
753
772
|
_react2.default.createElement(_bindCard2.default, {
|
|
754
|
-
ref: function ref(
|
|
755
|
-
return _this4.bindCardRef =
|
|
773
|
+
ref: function ref(_ref17) {
|
|
774
|
+
return _this4.bindCardRef = _ref17;
|
|
756
775
|
},
|
|
757
776
|
bindCardClick: this.bindCardClick,
|
|
758
777
|
changeBindCardBtnDisabled: this.changeBindCardBtnDisabled
|
|
@@ -874,8 +893,8 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
874
893
|
_props12$selected = _props12.selected,
|
|
875
894
|
selected = _props12$selected === undefined ? 0 : _props12$selected;
|
|
876
895
|
|
|
877
|
-
var
|
|
878
|
-
StorageCardNo =
|
|
896
|
+
var _ref18 = cardList[selected] || {},
|
|
897
|
+
StorageCardNo = _ref18.StorageCardNo;
|
|
879
898
|
|
|
880
899
|
_mutantsMicrofx.stores.memberStore.init({
|
|
881
900
|
cardInfo: cardList[selected],
|
|
@@ -918,7 +937,7 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
918
937
|
title: '提示',
|
|
919
938
|
content: '确定要挂失该会员卡吗?',
|
|
920
939
|
onOk: function () {
|
|
921
|
-
var
|
|
940
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
922
941
|
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
923
942
|
while (1) {
|
|
924
943
|
switch (_context5.prev = _context5.next) {
|
|
@@ -950,7 +969,7 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
950
969
|
}));
|
|
951
970
|
|
|
952
971
|
return function onOk() {
|
|
953
|
-
return
|
|
972
|
+
return _ref19.apply(this, arguments);
|
|
954
973
|
};
|
|
955
974
|
}(),
|
|
956
975
|
onCancel: function onCancel() {},
|
|
@@ -970,7 +989,7 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
970
989
|
title: '提示',
|
|
971
990
|
content: '确定要取消挂失该会员卡吗?',
|
|
972
991
|
onOk: function () {
|
|
973
|
-
var
|
|
992
|
+
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
|
|
974
993
|
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
975
994
|
while (1) {
|
|
976
995
|
switch (_context6.prev = _context6.next) {
|
|
@@ -1002,7 +1021,7 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
1002
1021
|
}));
|
|
1003
1022
|
|
|
1004
1023
|
return function onOk() {
|
|
1005
|
-
return
|
|
1024
|
+
return _ref20.apply(this, arguments);
|
|
1006
1025
|
};
|
|
1007
1026
|
}(),
|
|
1008
1027
|
onCancel: function onCancel() {},
|
|
@@ -1019,12 +1038,12 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
1019
1038
|
selected = _props15$selected === undefined ? 0 : _props15$selected,
|
|
1020
1039
|
memberEnumState = _props15.memberEnumState;
|
|
1021
1040
|
|
|
1022
|
-
var
|
|
1023
|
-
ID =
|
|
1024
|
-
|
|
1041
|
+
var _ref21 = member || {},
|
|
1042
|
+
ID = _ref21.ID,
|
|
1043
|
+
_ref21$MemberType = _ref21.MemberType;
|
|
1025
1044
|
|
|
1026
|
-
|
|
1027
|
-
var IsStorage =
|
|
1045
|
+
_ref21$MemberType = _ref21$MemberType === undefined ? {} : _ref21$MemberType;
|
|
1046
|
+
var IsStorage = _ref21$MemberType.IsStorage;
|
|
1028
1047
|
|
|
1029
1048
|
memberStore.GetMemberDTO(ID, false).then(function (ret) {
|
|
1030
1049
|
_mutantsMicrofx.stores.selectMemberStore.setCurMemberInfo(ret);
|
|
@@ -1065,8 +1084,8 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
1065
1084
|
_props16$selected = _props16.selected,
|
|
1066
1085
|
selected = _props16$selected === undefined ? 0 : _props16$selected;
|
|
1067
1086
|
|
|
1068
|
-
var
|
|
1069
|
-
ID =
|
|
1087
|
+
var _ref22 = cardList[selected] || {},
|
|
1088
|
+
ID = _ref22.ID;
|
|
1070
1089
|
|
|
1071
1090
|
if (!!ID) {
|
|
1072
1091
|
_tplusComponentsTouch.Message.error('该储值卡已经绑定,不能再次进行绑定');
|
|
@@ -1103,45 +1122,63 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
1103
1122
|
};
|
|
1104
1123
|
|
|
1105
1124
|
this.changeRefundOk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7() {
|
|
1106
|
-
var _props17, _props17$cardList, cardList, _props17$selected, selected,
|
|
1125
|
+
var _props17, _props17$cardList, cardList, _props17$selected, selected, _ref24, MeStorageCardId, _ref24$BalanceStorage, BalanceStorage, _ref24$PresentAmount, PresentAmount, StorageCardNo, ID, refundable, storageAmount, lastesStorageResult, _ref25, _ref25$isCanRefund, isCanRefund, _ref25$storageInfos, storageInfos, latestStorageAmount;
|
|
1107
1126
|
|
|
1108
1127
|
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1109
1128
|
while (1) {
|
|
1110
1129
|
switch (_context7.prev = _context7.next) {
|
|
1111
1130
|
case 0:
|
|
1112
1131
|
_props17 = _this5.props, _props17$cardList = _props17.cardList, cardList = _props17$cardList === undefined ? [] : _props17$cardList, _props17$selected = _props17.selected, selected = _props17$selected === undefined ? 0 : _props17$selected;
|
|
1113
|
-
|
|
1114
|
-
_context7.next = 4;
|
|
1115
|
-
return _this5.api.getLatestStorageAmount(MeStorageCardId);
|
|
1116
|
-
|
|
1117
|
-
case 4:
|
|
1118
|
-
lastesStorageResult = _context7.sent;
|
|
1119
|
-
_ref24 = lastesStorageResult.data || {}, latestStorageAmount = _ref24.latestStorageAmount;
|
|
1132
|
+
_ref24 = cardList.length && cardList[selected] || {}, MeStorageCardId = _ref24.MeStorageCardId, _ref24$BalanceStorage = _ref24.BalanceStorage, BalanceStorage = _ref24$BalanceStorage === undefined ? 0 : _ref24$BalanceStorage, _ref24$PresentAmount = _ref24.PresentAmount, PresentAmount = _ref24$PresentAmount === undefined ? 0 : _ref24$PresentAmount, StorageCardNo = _ref24.StorageCardNo, ID = _ref24.ID;
|
|
1120
1133
|
refundable = parseFloat((0, _utils.getFixedNumber)(BalanceStorage - PresentAmount));
|
|
1121
1134
|
storageAmount = (0, _utils.getFixedNumber)(0 - (BalanceStorage - PresentAmount));
|
|
1122
|
-
|
|
1135
|
+
_context7.next = 6;
|
|
1136
|
+
return _this5.api.getLatestStorageAmount({ cardId: MeStorageCardId, inputRefundAmount: refundable });
|
|
1123
1137
|
|
|
1124
|
-
|
|
1138
|
+
case 6:
|
|
1139
|
+
lastesStorageResult = _context7.sent;
|
|
1140
|
+
_ref25 = lastesStorageResult.data || {}, _ref25$isCanRefund = _ref25.isCanRefund, isCanRefund = _ref25$isCanRefund === undefined ? false : _ref25$isCanRefund, _ref25$storageInfos = _ref25.storageInfos, storageInfos = _ref25$storageInfos === undefined ? [] : _ref25$storageInfos;
|
|
1141
|
+
|
|
1142
|
+
// 退款金额小于等于0,不允许退款
|
|
1143
|
+
|
|
1144
|
+
if (!(Number(refundable) <= 0)) {
|
|
1125
1145
|
_context7.next = 11;
|
|
1126
1146
|
break;
|
|
1127
1147
|
}
|
|
1128
1148
|
|
|
1129
|
-
|
|
1149
|
+
_tplusComponentsTouch.Message.error('无可退金额,不支持退款!');
|
|
1130
1150
|
return _context7.abrupt('return');
|
|
1131
1151
|
|
|
1132
1152
|
case 11:
|
|
1133
|
-
if (
|
|
1153
|
+
if (isCanRefund) {
|
|
1134
1154
|
_context7.next = 14;
|
|
1135
1155
|
break;
|
|
1136
1156
|
}
|
|
1137
1157
|
|
|
1138
|
-
|
|
1158
|
+
_this5.returnedCash('\u9000\u6B3E\u5931\u8D25\uFF0C\u53EA\u80FD\u9000\u73B0\u91D1\uFF0C\u662F\u5426\u7EE7\u7EED', storageAmount);
|
|
1139
1159
|
return _context7.abrupt('return');
|
|
1140
1160
|
|
|
1141
1161
|
case 14:
|
|
1162
|
+
|
|
1163
|
+
// 计算最后一次储值的总金额,
|
|
1164
|
+
latestStorageAmount = storageInfos.reduce(function (total, cur) {
|
|
1165
|
+
return total + cur.latestStorageAmount;
|
|
1166
|
+
}, 0);
|
|
1167
|
+
// 退款只支持退最后一次储值的金额,如果最后一次储值的金额小于可退金额,弹出提示。
|
|
1168
|
+
|
|
1169
|
+
if (!(latestStorageAmount && latestStorageAmount < refundable)) {
|
|
1170
|
+
_context7.next = 18;
|
|
1171
|
+
break;
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
_this5.returnedCash('\u9000\u6B3E\u5927\u4E8E\u6700\u540E\u4E00\u6B21\u50A8\u503C\u91D1\u989D\uFF0C\u65E0\u6CD5\u539F\u8DEF\u9000\u56DE\uFF0C\u53EA\u53EF\u9000\u73B0\u91D1\uFF01\u662F\u5426\u9000\u6B3E\uFF1F', storageAmount);
|
|
1175
|
+
return _context7.abrupt('return');
|
|
1176
|
+
|
|
1177
|
+
case 18:
|
|
1178
|
+
|
|
1142
1179
|
_this5.submitRefundStorage(cardList[selected], storageAmount, lastesStorageResult.data);
|
|
1143
1180
|
|
|
1144
|
-
case
|
|
1181
|
+
case 19:
|
|
1145
1182
|
case 'end':
|
|
1146
1183
|
return _context7.stop();
|
|
1147
1184
|
}
|
|
@@ -1156,8 +1193,8 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
1156
1193
|
_props18$selected = _props18.selected,
|
|
1157
1194
|
selected = _props18$selected === undefined ? 0 : _props18$selected;
|
|
1158
1195
|
|
|
1159
|
-
var
|
|
1160
|
-
Id =
|
|
1196
|
+
var _ref26 = cardList[selected] || {},
|
|
1197
|
+
Id = _ref26.Id;
|
|
1161
1198
|
|
|
1162
1199
|
cardList[selected].meMemberId = Id;
|
|
1163
1200
|
cardList[selected].isRefundStorage = 1; // 自己添加参数,用来判断是储值还是退储值
|
|
@@ -1179,11 +1216,11 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
1179
1216
|
_props19$selected = _props19.selected,
|
|
1180
1217
|
selected = _props19$selected === undefined ? 0 : _props19$selected;
|
|
1181
1218
|
|
|
1182
|
-
var
|
|
1183
|
-
StorageCardNo =
|
|
1184
|
-
MemberMobile =
|
|
1185
|
-
MemberName =
|
|
1186
|
-
ID =
|
|
1219
|
+
var _ref27 = cardList[selected] || {},
|
|
1220
|
+
StorageCardNo = _ref27.StorageCardNo,
|
|
1221
|
+
MemberMobile = _ref27.MemberMobile,
|
|
1222
|
+
MemberName = _ref27.MemberName,
|
|
1223
|
+
ID = _ref27.ID;
|
|
1187
1224
|
|
|
1188
1225
|
if (!ID) {
|
|
1189
1226
|
_tplusComponentsTouch.Message.error('该卡未绑定会员');
|
|
@@ -1194,7 +1231,7 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
1194
1231
|
content: '\u6B64\u5361\u5C5E\u4E8E' + (MemberName || MemberMobile) + '\u4F1A\u5458\uFF0C\u786E\u8BA4\u89E3\u7ED1\u5417\uFF1F',
|
|
1195
1232
|
confirmLoading: _this5.state.memberUnBindCardLoading,
|
|
1196
1233
|
onOk: function () {
|
|
1197
|
-
var
|
|
1234
|
+
var _ref28 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
|
1198
1235
|
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1199
1236
|
while (1) {
|
|
1200
1237
|
switch (_context8.prev = _context8.next) {
|
|
@@ -1225,7 +1262,7 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
1225
1262
|
}));
|
|
1226
1263
|
|
|
1227
1264
|
return function onOk() {
|
|
1228
|
-
return
|
|
1265
|
+
return _ref28.apply(this, arguments);
|
|
1229
1266
|
};
|
|
1230
1267
|
}()
|
|
1231
1268
|
});
|
|
@@ -1245,14 +1282,14 @@ var _default = (0, _mutantsMicrofx.observer)(_class = (_temp = _class2 = functio
|
|
|
1245
1282
|
_props20$selected = _props20.selected,
|
|
1246
1283
|
selected = _props20$selected === undefined ? 0 : _props20$selected;
|
|
1247
1284
|
|
|
1248
|
-
var
|
|
1249
|
-
setPwdShortKey =
|
|
1285
|
+
var _ref29 = _this5.state || {},
|
|
1286
|
+
setPwdShortKey = _ref29.setPwdShortKey;
|
|
1250
1287
|
|
|
1251
1288
|
var newStyle = _mutantsUtil.localStore && _mutantsUtil.localStore.get('voucherDefaultPosMode') == 'voucher';
|
|
1252
1289
|
|
|
1253
|
-
var
|
|
1254
|
-
WalletEnabled =
|
|
1255
|
-
CardTypeEnum =
|
|
1290
|
+
var _ref30 = cardList && cardList.length && cardList[selected] || {},
|
|
1291
|
+
WalletEnabled = _ref30.WalletEnabled,
|
|
1292
|
+
CardTypeEnum = _ref30.CardTypeEnum;
|
|
1256
1293
|
// 控制显示修改密码还是设置密码
|
|
1257
1294
|
|
|
1258
1295
|
|