tplus-components-touch 3.29.2 → 3.31.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/hotKey/localConfig.js +133 -14
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/settlement/moreCzkTable/index.js +156 -0
- package/dist/components/settlement/moreCzkTable/index.js.map +1 -0
- package/dist/components/settlement/moreCzkTable/style.less +7 -0
- package/dist/components/settlement/settlement.js +733 -476
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +75 -5
- package/dist/components/settlement/settlementStore.js +499 -277
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +5248 -5202
- package/dist/components/ticon/iconfont/iconfont.css +895 -887
- package/dist/components/ticon/iconfont/iconfont.js +6 -6
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
- package/dist/components/ticon/iconfont/iconfont.json +1549 -1535
- package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
- package/dist/components/touchScroll/index.js +6 -2
- package/dist/components/touchScroll/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -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,
|
|
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
|
|
|
@@ -178,6 +178,46 @@ var SettlementStore = (_class = function () {
|
|
|
178
178
|
|
|
179
179
|
_initDefineProp(this, 'updateMemberInfo', _descriptor2, this);
|
|
180
180
|
|
|
181
|
+
_initDefineProp(this, 'updateCurrentMode', _descriptor3, this);
|
|
182
|
+
|
|
183
|
+
_initDefineProp(this, 'updateCardInfo', _descriptor4, this);
|
|
184
|
+
|
|
185
|
+
this.handleCzkData = function (m) {
|
|
186
|
+
if (!m || !m.StorageCardNo) {
|
|
187
|
+
(0, _mobx.runInAction)(function () {
|
|
188
|
+
_this2.paymode.currentMode.errinfo = "无效的会员卡号";
|
|
189
|
+
});
|
|
190
|
+
} else {
|
|
191
|
+
(0, _mobx.runInAction)(function () {
|
|
192
|
+
_this2.paymode.currentMode.errinfo = "";
|
|
193
|
+
_this2.paymode.currentMode.memberId = m.ID;
|
|
194
|
+
_this2.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this2.brefund ? _this2.paymode.receivable : Math.max(_this2.paymode.receivable, 0));
|
|
195
|
+
_this2.updateEvent();
|
|
196
|
+
var message = '';
|
|
197
|
+
var sum = (0, _reduce3.default)(_this2.paymode.thePaymodes, function (total, cur) {
|
|
198
|
+
return total + cur.value;
|
|
199
|
+
}, 0);
|
|
200
|
+
// 对于卡不用判断会员的一些信息
|
|
201
|
+
// if (global.CheckMemberStorageProcessorBlock ) {
|
|
202
|
+
// message= CheckMemberStorageProcessorBlock.execute(m);
|
|
203
|
+
// }
|
|
204
|
+
if (!String.isNullOrEmpty(message)) {
|
|
205
|
+
_this2.paymode.currentMode.errinfo = message;
|
|
206
|
+
} else if (_this2.checkReceived(_this2.paymode.currentMode, "balance")) {
|
|
207
|
+
_this2.paymode.currentMode.errinfo = "余额不足";
|
|
208
|
+
} else if (_this2.paymode.amount > 0 && parseFloat(_this2.paymode.amount) !== sum && _this2.paymode.currentMode.value == 0) {
|
|
209
|
+
_this2.paymode.currentMode.errinfo = "实收金额必须录入";
|
|
210
|
+
} else {
|
|
211
|
+
// 查询成功后将焦点移入下一个输入框
|
|
212
|
+
setTimeout(function () {
|
|
213
|
+
var nextInput = document.querySelector('.czk .received .input');
|
|
214
|
+
nextInput && nextInput.select();
|
|
215
|
+
}, 300);
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
|
|
181
221
|
this.getCouponList = function (coupon_code) {
|
|
182
222
|
var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
|
|
183
223
|
PayStyle = _enumController$getEn.PayStyle,
|
|
@@ -541,13 +581,23 @@ var SettlementStore = (_class = function () {
|
|
|
541
581
|
}
|
|
542
582
|
});
|
|
543
583
|
(0, _each3.default)(this.dto.RetailStorageDetails, function (detail) {
|
|
544
|
-
var balanceAmount =
|
|
545
|
-
|
|
584
|
+
var balanceAmount = null;
|
|
585
|
+
var storageCardNo = null;
|
|
586
|
+
var meStorageCardId = null;
|
|
587
|
+
detail.DynamicPropertyKeys.forEach(function (ele, index) {
|
|
588
|
+
if (ele === "mestoragecard") {
|
|
589
|
+
balanceAmount = detail.DynamicPropertyValues[index].BalanceStorage - detail.StoragePaymentAmount;
|
|
590
|
+
storageCardNo = detail.DynamicPropertyValues[index].StorageCardNo;
|
|
591
|
+
meStorageCardId = detail.DynamicPropertyValues[index].MeStorageCardId;
|
|
592
|
+
}
|
|
593
|
+
});
|
|
546
594
|
var newmode = (0, _extends3.default)({}, _this5.genNewMode(PayStyle.hyczk, false, detail.StoragePaymentAmount), {
|
|
547
|
-
member: new Member(detail.Member),
|
|
548
|
-
authCode: detail.Password,
|
|
595
|
+
member: new Member(detail.Member ? detail.Member : null),
|
|
596
|
+
authCode: detail.Password ? detail.Password : null,
|
|
549
597
|
balance: balanceAmount,
|
|
550
|
-
boriginReturn: true
|
|
598
|
+
boriginReturn: true,
|
|
599
|
+
meStorageCardId: meStorageCardId ? meStorageCardId : detail.MeStorageCardId,
|
|
600
|
+
storageCardNo: storageCardNo ? storageCardNo : detail.StorageCardNo
|
|
551
601
|
});
|
|
552
602
|
_this5.paymode.thePaymodes.push(newmode);
|
|
553
603
|
});
|
|
@@ -591,7 +641,7 @@ var SettlementStore = (_class = function () {
|
|
|
591
641
|
|
|
592
642
|
//抵现积分
|
|
593
643
|
(0, _tplusApi.tApi)({ IntegralSteadCashParams: {
|
|
594
|
-
Idmember: this.paymode.currentMode.
|
|
644
|
+
Idmember: this.paymode.currentMode.memberId,
|
|
595
645
|
TotalTaxAmount: this.paymode.amount,
|
|
596
646
|
BalanceTaxAmount: this.paymode.currentMode.value
|
|
597
647
|
} }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
|
|
@@ -620,7 +670,6 @@ var SettlementStore = (_class = function () {
|
|
|
620
670
|
|
|
621
671
|
if ((0, _trim3.default)(v) === "") {
|
|
622
672
|
(0, _mobx.runInAction)(function () {
|
|
623
|
-
_this7.paymode.currentMode.member = new Member(null);
|
|
624
673
|
_this7.paymode.currentMode.errinfo = "请输入储值卡";
|
|
625
674
|
});
|
|
626
675
|
return;
|
|
@@ -634,66 +683,98 @@ var SettlementStore = (_class = function () {
|
|
|
634
683
|
var address = '';
|
|
635
684
|
if (isNewRetailBCPos) {
|
|
636
685
|
// address = '/member/memberProfile/FindByStorageCode/'+v;
|
|
637
|
-
address = '/
|
|
638
|
-
return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function (
|
|
639
|
-
var
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
686
|
+
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + v + '/' + true;
|
|
687
|
+
return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function () {
|
|
688
|
+
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(result) {
|
|
689
|
+
var data, m;
|
|
690
|
+
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
691
|
+
while (1) {
|
|
692
|
+
switch (_context2.prev = _context2.next) {
|
|
693
|
+
case 0:
|
|
694
|
+
data = result.data;
|
|
695
|
+
m = data && data.length && data[0];
|
|
696
|
+
|
|
697
|
+
if (!(result && result.data.length)) {
|
|
698
|
+
_context2.next = 25;
|
|
699
|
+
break;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
if (!(result.data.length === 1)) {
|
|
703
|
+
_context2.next = 14;
|
|
704
|
+
break;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
if (!(m.CardTypeEnum === 'BALANCE_CARD')) {
|
|
708
|
+
_context2.next = 10;
|
|
709
|
+
break;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
_this7.paymode.updateCardInfo(m);
|
|
713
|
+
_this7.handleCzkData(m);
|
|
714
|
+
return _context2.abrupt('return', result.data);
|
|
715
|
+
|
|
716
|
+
case 10:
|
|
717
|
+
_context2.next = 12;
|
|
718
|
+
return (0, _tplusApi.ccApi)({ dto: _this7.dto, meStorageCardId: m.MeStorageCardId }, '/retail/RetailPos/validateRetailStorageCard', false, false).then(function (result1) {
|
|
719
|
+
var data1 = result1.data ? JSON.parse(result1.data)[0] : {};
|
|
720
|
+
if (data1.enable) {
|
|
721
|
+
_this7.paymode.updateCardInfo(m);
|
|
722
|
+
_this7.handleCzkData(m);
|
|
723
|
+
return result1.data;
|
|
724
|
+
} else {
|
|
725
|
+
_message2.default.warn(data1.disableReason);
|
|
726
|
+
}
|
|
727
|
+
});
|
|
728
|
+
|
|
729
|
+
case 12:
|
|
730
|
+
_context2.next = 25;
|
|
731
|
+
break;
|
|
732
|
+
|
|
733
|
+
case 14:
|
|
734
|
+
if (!(result.data && result.data.length === 1)) {
|
|
735
|
+
_context2.next = 19;
|
|
736
|
+
break;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
_this7.paymode.updateCardInfo(result.data[0]);
|
|
740
|
+
return _context2.abrupt('return', result.data);
|
|
741
|
+
|
|
742
|
+
case 19:
|
|
743
|
+
if (!(result.data && result.data.length > 1)) {
|
|
744
|
+
_context2.next = 23;
|
|
745
|
+
break;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
return _context2.abrupt('return', result.data);
|
|
749
|
+
|
|
750
|
+
case 23:
|
|
751
|
+
_message2.default.warn('没有可用储值卡!');
|
|
752
|
+
return _context2.abrupt('return', false);
|
|
753
|
+
|
|
754
|
+
case 25:
|
|
755
|
+
case 'end':
|
|
756
|
+
return _context2.stop();
|
|
757
|
+
}
|
|
678
758
|
}
|
|
679
|
-
});
|
|
680
|
-
}
|
|
681
|
-
|
|
759
|
+
}, _callee2, _this7);
|
|
760
|
+
}));
|
|
761
|
+
|
|
762
|
+
return function (_x2) {
|
|
763
|
+
return _ref8.apply(this, arguments);
|
|
764
|
+
};
|
|
765
|
+
}()
|
|
766
|
+
// result.data.forEach((m) => {
|
|
767
|
+
// if (m.CardTypeEnum === 'BALANCE_CARD') {
|
|
768
|
+
// // 会员概念改为卡,把这些字段都放开
|
|
769
|
+
// this.paymode.updateCardInfo(m);
|
|
770
|
+
// }
|
|
771
|
+
// })
|
|
772
|
+
);
|
|
682
773
|
} else {
|
|
683
774
|
address = 'AA.DR.newRetailMember.SearchMember';
|
|
684
775
|
return (0, _tplusApi.tApi)({ SearchParams: { Key: v, IsSingleMember: true, IdStore: IdStore, StoreCode: StoreCode } }, address, false, false).then(function (result) {
|
|
685
776
|
var data = JSON.parse(result.Data);
|
|
686
777
|
var m = data && data.length > 0 && data[0];
|
|
687
|
-
|
|
688
|
-
var _ref9 = _mutantsUtil.platform || {},
|
|
689
|
-
isNewRetailBCPos = _ref9.isNewRetailBCPos;
|
|
690
|
-
|
|
691
|
-
if (isNewRetailBCPos) {
|
|
692
|
-
_this7.paymode && _this7.paymode.currentMode.member.setMeStorageCardId(m.MeStorageCardId);
|
|
693
|
-
_this7.paymode && _this7.paymode.currentMode.member.setStorageCardNo(m.StorageCardNo);
|
|
694
|
-
_this7.paymode && (_this7.paymode.currentMode.MeStorageCardId = m.MeStorageCardId);
|
|
695
|
-
_this7.paymode && (_this7.paymode.currentMode.StorageCardNo = m.StorageCardNo);
|
|
696
|
-
}
|
|
697
778
|
if (!m || !m.ID) {
|
|
698
779
|
(0, _mobx.runInAction)(function () {
|
|
699
780
|
_this7.paymode.currentMode.errinfo = "无效的会员卡号";
|
|
@@ -789,7 +870,7 @@ var SettlementStore = (_class = function () {
|
|
|
789
870
|
}
|
|
790
871
|
|
|
791
872
|
(0, _tplusApi.tApi)({ IntegralSteadCashParams: {
|
|
792
|
-
Idmember: this.paymode.currentMode.
|
|
873
|
+
Idmember: this.paymode.currentMode.memberId,
|
|
793
874
|
TotalTaxAmount: this.paymode.amount,
|
|
794
875
|
BalanceTaxAmount: this.paymode.amount
|
|
795
876
|
} }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
|
|
@@ -816,6 +897,7 @@ var SettlementStore = (_class = function () {
|
|
|
816
897
|
|
|
817
898
|
var value = (0, _utils.getFixedNumber)(v || (this.brefund ? this.paymode.receivable : Math.max(this.paymode.receivable, 0)));
|
|
818
899
|
var themode = (0, _find3.default)(this.paymode.paymodes, { 'paymentType': type });
|
|
900
|
+
var memberId = this.member && this.member.ID ? this.member.ID : null;
|
|
819
901
|
var mode = (0, _mobx.observable)({
|
|
820
902
|
paymethodId: this.paymode.counter,
|
|
821
903
|
name: themode.name,
|
|
@@ -827,6 +909,8 @@ var SettlementStore = (_class = function () {
|
|
|
827
909
|
order: this.paymode.thePaymodes.length + 1,
|
|
828
910
|
paymentType: type,
|
|
829
911
|
djqs: [],
|
|
912
|
+
card: null,
|
|
913
|
+
memberId: !notwithm ? memberId : null,
|
|
830
914
|
member: new Member(!notwithm ? this.member : null),
|
|
831
915
|
authCode: '',
|
|
832
916
|
steadCashIntegral: null,
|
|
@@ -834,9 +918,9 @@ var SettlementStore = (_class = function () {
|
|
|
834
918
|
maxamount: this.paymode.amount
|
|
835
919
|
});
|
|
836
920
|
if (type == PayStyle.hyczk) {
|
|
837
|
-
if (!mode.
|
|
921
|
+
if (!mode.storageCardNo) {
|
|
838
922
|
(0, _mobx.runInAction)(function () {
|
|
839
|
-
mode.errinfo = '
|
|
923
|
+
mode.errinfo = '未录入手机号或储值卡号';
|
|
840
924
|
});
|
|
841
925
|
} else if (this.checkReceived(mode, "balance")) {
|
|
842
926
|
(0, _mobx.runInAction)(function () {
|
|
@@ -980,80 +1064,80 @@ var SettlementStore = (_class = function () {
|
|
|
980
1064
|
}, {
|
|
981
1065
|
key: 'commit',
|
|
982
1066
|
value: function () {
|
|
983
|
-
var
|
|
984
|
-
var
|
|
1067
|
+
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(bTest) {
|
|
1068
|
+
var _ref10, isNewRetailBCPos;
|
|
985
1069
|
|
|
986
|
-
return _regenerator2.default.wrap(function
|
|
1070
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
987
1071
|
while (1) {
|
|
988
|
-
switch (
|
|
1072
|
+
switch (_context3.prev = _context3.next) {
|
|
989
1073
|
case 0:
|
|
990
1074
|
console.log('settlementStore.commit开始,参数:' + bTest);
|
|
991
1075
|
|
|
992
1076
|
if (!bTest) {
|
|
993
|
-
|
|
1077
|
+
_context3.next = 3;
|
|
994
1078
|
break;
|
|
995
1079
|
}
|
|
996
1080
|
|
|
997
|
-
return
|
|
1081
|
+
return _context3.abrupt('return', _promise2.default.resolve(true));
|
|
998
1082
|
|
|
999
1083
|
case 3:
|
|
1000
|
-
|
|
1001
|
-
|
|
1084
|
+
_ref10 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref10.isNewRetailBCPos;
|
|
1085
|
+
_context3.prev = 4;
|
|
1002
1086
|
|
|
1003
1087
|
if (!(this.type == 1)) {
|
|
1004
|
-
|
|
1088
|
+
_context3.next = 10;
|
|
1005
1089
|
break;
|
|
1006
1090
|
}
|
|
1007
1091
|
|
|
1008
|
-
|
|
1092
|
+
_context3.next = 8;
|
|
1009
1093
|
return this.saveMember();
|
|
1010
1094
|
|
|
1011
1095
|
case 8:
|
|
1012
|
-
|
|
1096
|
+
_context3.next = 18;
|
|
1013
1097
|
break;
|
|
1014
1098
|
|
|
1015
1099
|
case 10:
|
|
1016
1100
|
if (!isNewRetailBCPos) {
|
|
1017
|
-
|
|
1101
|
+
_context3.next = 13;
|
|
1018
1102
|
break;
|
|
1019
1103
|
}
|
|
1020
1104
|
|
|
1021
|
-
|
|
1105
|
+
_context3.next = 13;
|
|
1022
1106
|
return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
|
|
1023
1107
|
|
|
1024
1108
|
case 13:
|
|
1025
|
-
|
|
1109
|
+
_context3.next = 15;
|
|
1026
1110
|
return this.save();
|
|
1027
1111
|
|
|
1028
1112
|
case 15:
|
|
1029
1113
|
if (!isNewRetailBCPos) {
|
|
1030
|
-
|
|
1114
|
+
_context3.next = 18;
|
|
1031
1115
|
break;
|
|
1032
1116
|
}
|
|
1033
1117
|
|
|
1034
|
-
|
|
1118
|
+
_context3.next = 18;
|
|
1035
1119
|
return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
|
|
1036
1120
|
|
|
1037
1121
|
case 18:
|
|
1038
|
-
return
|
|
1122
|
+
return _context3.abrupt('return', _promise2.default.resolve(true));
|
|
1039
1123
|
|
|
1040
1124
|
case 21:
|
|
1041
|
-
|
|
1042
|
-
|
|
1125
|
+
_context3.prev = 21;
|
|
1126
|
+
_context3.t0 = _context3['catch'](4);
|
|
1043
1127
|
|
|
1044
|
-
console.error('settlementStore.commit失败,错误信息:' +
|
|
1045
|
-
return
|
|
1128
|
+
console.error('settlementStore.commit失败,错误信息:' + _context3.t0);
|
|
1129
|
+
return _context3.abrupt('return', _promise2.default.resolve(_context3.t0));
|
|
1046
1130
|
|
|
1047
1131
|
case 25:
|
|
1048
1132
|
case 'end':
|
|
1049
|
-
return
|
|
1133
|
+
return _context3.stop();
|
|
1050
1134
|
}
|
|
1051
1135
|
}
|
|
1052
|
-
},
|
|
1136
|
+
}, _callee3, this, [[4, 21]]);
|
|
1053
1137
|
}));
|
|
1054
1138
|
|
|
1055
|
-
function commit(
|
|
1056
|
-
return
|
|
1139
|
+
function commit(_x3) {
|
|
1140
|
+
return _ref9.apply(this, arguments);
|
|
1057
1141
|
}
|
|
1058
1142
|
|
|
1059
1143
|
return commit;
|
|
@@ -1111,14 +1195,14 @@ var SettlementStore = (_class = function () {
|
|
|
1111
1195
|
}, {
|
|
1112
1196
|
key: 'save',
|
|
1113
1197
|
value: function () {
|
|
1114
|
-
var
|
|
1198
|
+
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
|
1115
1199
|
var _this11 = this;
|
|
1116
1200
|
|
|
1117
|
-
var _enumController$getEn14, PayStyle,
|
|
1201
|
+
var _enumController$getEn14, PayStyle, _ref13, isNewRetailBCPos, IPMSG, RetailTypeEnum;
|
|
1118
1202
|
|
|
1119
|
-
return _regenerator2.default.wrap(function
|
|
1203
|
+
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
1120
1204
|
while (1) {
|
|
1121
|
-
switch (
|
|
1205
|
+
switch (_context4.prev = _context4.next) {
|
|
1122
1206
|
case 0:
|
|
1123
1207
|
_enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn14.PayStyle;
|
|
1124
1208
|
|
|
@@ -1127,7 +1211,6 @@ var SettlementStore = (_class = function () {
|
|
|
1127
1211
|
_this11.dto.RetailStorageDetails = [];
|
|
1128
1212
|
_this11.dto.RetailCouponDetails = [];
|
|
1129
1213
|
var czkSum = 0;
|
|
1130
|
-
var Idmember = _this11.dto.Idmember;
|
|
1131
1214
|
var count = 0;
|
|
1132
1215
|
var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
|
|
1133
1216
|
return parseFloat(mode.value) != 0;
|
|
@@ -1135,18 +1218,14 @@ var SettlementStore = (_class = function () {
|
|
|
1135
1218
|
(0, _each3.default)(thePaymodes, function (mode, index) {
|
|
1136
1219
|
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1137
1220
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
1138
|
-
if (!Idmember) {
|
|
1139
|
-
Idmember = mode.member.id;
|
|
1140
|
-
}
|
|
1141
1221
|
czkSum = Math.Add(czkSum, mode.value);
|
|
1142
|
-
var MeStorageCardId = mode.member.MeStorageCardId ? mode.member.MeStorageCardId : _this11.member.MeStorageCardId;
|
|
1143
1222
|
_this11.dto.RetailStorageDetails.push({
|
|
1144
1223
|
Code: mode.paymethodId,
|
|
1145
|
-
MeStorageCardId:
|
|
1224
|
+
MeStorageCardId: mode.meStorageCardId,
|
|
1146
1225
|
StoragePaymentAmount: mode.value,
|
|
1147
1226
|
IsOrigReturn: false,
|
|
1148
1227
|
BalanceStorage: mode.balance,
|
|
1149
|
-
Idmember: mode.
|
|
1228
|
+
Idmember: mode.memberId,
|
|
1150
1229
|
DynamicPropertyKeys: [],
|
|
1151
1230
|
DynamicPropertyValues: [],
|
|
1152
1231
|
DataSource: { Id: _this11.dataSource },
|
|
@@ -1182,7 +1261,7 @@ var SettlementStore = (_class = function () {
|
|
|
1182
1261
|
ReductionAmount: djq.amount,
|
|
1183
1262
|
EnableAmount: djq.doorsill,
|
|
1184
1263
|
CouponTitle: djq.name,
|
|
1185
|
-
IdMember: djq.UMemberID ? mode.
|
|
1264
|
+
IdMember: djq.UMemberID ? mode.memberId : null,
|
|
1186
1265
|
LastTS: djq.LastTS,
|
|
1187
1266
|
PromotionId: djq.promoId,
|
|
1188
1267
|
PromotionRuleId: djq.promoRuleId,
|
|
@@ -1194,15 +1273,12 @@ var SettlementStore = (_class = function () {
|
|
|
1194
1273
|
}
|
|
1195
1274
|
});
|
|
1196
1275
|
|
|
1197
|
-
var
|
|
1198
|
-
isNewRetailBCPos =
|
|
1276
|
+
var _ref12 = _mutantsUtil.platform || {},
|
|
1277
|
+
isNewRetailBCPos = _ref12.isNewRetailBCPos;
|
|
1199
1278
|
|
|
1200
1279
|
if (_this11.dto.RetailStorageDetails.length > 0) {
|
|
1201
1280
|
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
|
|
1202
1281
|
if (isNewRetailBCPos) {
|
|
1203
|
-
// this.dto.RetailStorageDetails && this.dto.RetailStorageDetails.forEach((value, index) => {
|
|
1204
|
-
// value.MeStorageCardId = (mode.MeStorageCardId ? mode.MeStorageCardId : this.member.MeStorageCardId);
|
|
1205
|
-
// })
|
|
1206
1282
|
_this11.dto.RetailPaymentDetails.push({
|
|
1207
1283
|
Code: _this11.paymode.counter,
|
|
1208
1284
|
OrigAmount: czkSum,
|
|
@@ -1226,15 +1302,14 @@ var SettlementStore = (_class = function () {
|
|
|
1226
1302
|
DataSource: { Id: _this11.dataSource }
|
|
1227
1303
|
});
|
|
1228
1304
|
}
|
|
1229
|
-
_this11.dto.Idmember = Idmember;
|
|
1230
1305
|
}
|
|
1231
1306
|
});
|
|
1232
|
-
|
|
1307
|
+
_ref13 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref13.isNewRetailBCPos;
|
|
1233
1308
|
|
|
1234
1309
|
console.log('bc_pos\u73AF\u5883:' + isNewRetailBCPos + ',\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
|
|
1235
1310
|
|
|
1236
1311
|
if (!isNewRetailBCPos) {
|
|
1237
|
-
|
|
1312
|
+
_context4.next = 20;
|
|
1238
1313
|
break;
|
|
1239
1314
|
}
|
|
1240
1315
|
|
|
@@ -1245,61 +1320,61 @@ var SettlementStore = (_class = function () {
|
|
|
1245
1320
|
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1246
1321
|
}
|
|
1247
1322
|
RetailTypeEnum = this.dto.IdbusiType == 36 ? "INTEGRAL_EXCHANGE" : "NORMAL";
|
|
1248
|
-
|
|
1323
|
+
_context4.t1 = this.dto.IdbusiType == 37;
|
|
1249
1324
|
|
|
1250
|
-
if (!
|
|
1251
|
-
|
|
1325
|
+
if (!_context4.t1) {
|
|
1326
|
+
_context4.next = 13;
|
|
1252
1327
|
break;
|
|
1253
1328
|
}
|
|
1254
1329
|
|
|
1255
|
-
|
|
1330
|
+
_context4.next = 12;
|
|
1256
1331
|
return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
|
|
1257
1332
|
|
|
1258
1333
|
case 12:
|
|
1259
|
-
|
|
1334
|
+
_context4.t1 = _context4.sent;
|
|
1260
1335
|
|
|
1261
1336
|
case 13:
|
|
1262
|
-
|
|
1337
|
+
_context4.t0 = _context4.t1;
|
|
1263
1338
|
|
|
1264
|
-
if (
|
|
1265
|
-
|
|
1339
|
+
if (_context4.t0) {
|
|
1340
|
+
_context4.next = 16;
|
|
1266
1341
|
break;
|
|
1267
1342
|
}
|
|
1268
1343
|
|
|
1269
|
-
|
|
1344
|
+
_context4.t0 = this.dto.IdbusiType != 37;
|
|
1270
1345
|
|
|
1271
1346
|
case 16:
|
|
1272
|
-
if (!
|
|
1273
|
-
|
|
1347
|
+
if (!_context4.t0) {
|
|
1348
|
+
_context4.next = 18;
|
|
1274
1349
|
break;
|
|
1275
1350
|
}
|
|
1276
1351
|
|
|
1277
|
-
return
|
|
1352
|
+
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) {
|
|
1278
1353
|
_this11.setDtoID(resp.ID);
|
|
1279
1354
|
_this11.paymode.checkList = [];
|
|
1280
1355
|
_this11.billID = resp.ID;
|
|
1281
1356
|
}));
|
|
1282
1357
|
|
|
1283
1358
|
case 18:
|
|
1284
|
-
|
|
1359
|
+
_context4.next = 21;
|
|
1285
1360
|
break;
|
|
1286
1361
|
|
|
1287
1362
|
case 20:
|
|
1288
|
-
return
|
|
1363
|
+
return _context4.abrupt('return', (0, _tplusApi.tApi)({ dto: this.dto.cut() }, 'chanjet.RE.newRetail.Settle', false, false, { timeout_skip: true }).then(function (resp) {
|
|
1289
1364
|
_this11.setDtoID(resp.ID);
|
|
1290
1365
|
_this11.billID = resp.ID;
|
|
1291
1366
|
}));
|
|
1292
1367
|
|
|
1293
1368
|
case 21:
|
|
1294
1369
|
case 'end':
|
|
1295
|
-
return
|
|
1370
|
+
return _context4.stop();
|
|
1296
1371
|
}
|
|
1297
1372
|
}
|
|
1298
|
-
},
|
|
1373
|
+
}, _callee4, this);
|
|
1299
1374
|
}));
|
|
1300
1375
|
|
|
1301
1376
|
function save() {
|
|
1302
|
-
return
|
|
1377
|
+
return _ref11.apply(this, arguments);
|
|
1303
1378
|
}
|
|
1304
1379
|
|
|
1305
1380
|
return save;
|
|
@@ -1312,35 +1387,35 @@ var SettlementStore = (_class = function () {
|
|
|
1312
1387
|
}, {
|
|
1313
1388
|
key: 'querySettleResult',
|
|
1314
1389
|
value: function () {
|
|
1315
|
-
var
|
|
1316
|
-
return _regenerator2.default.wrap(function
|
|
1390
|
+
var _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1391
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1317
1392
|
while (1) {
|
|
1318
|
-
switch (
|
|
1393
|
+
switch (_context5.prev = _context5.next) {
|
|
1319
1394
|
case 0:
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1395
|
+
_context5.prev = 0;
|
|
1396
|
+
_context5.t0 = _promise2.default;
|
|
1397
|
+
_context5.next = 4;
|
|
1323
1398
|
return (0, _tplusApi.tApi)({ RetailCode: this.dto.Code }, 'chanjet.RE.newRetail.QuerySettleResult', false, false, { timeout_skip: true });
|
|
1324
1399
|
|
|
1325
1400
|
case 4:
|
|
1326
|
-
|
|
1327
|
-
return
|
|
1401
|
+
_context5.t1 = _context5.sent;
|
|
1402
|
+
return _context5.abrupt('return', _context5.t0.resolve.call(_context5.t0, _context5.t1));
|
|
1328
1403
|
|
|
1329
1404
|
case 8:
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
return
|
|
1405
|
+
_context5.prev = 8;
|
|
1406
|
+
_context5.t2 = _context5['catch'](0);
|
|
1407
|
+
return _context5.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
|
|
1333
1408
|
|
|
1334
1409
|
case 11:
|
|
1335
1410
|
case 'end':
|
|
1336
|
-
return
|
|
1411
|
+
return _context5.stop();
|
|
1337
1412
|
}
|
|
1338
1413
|
}
|
|
1339
|
-
},
|
|
1414
|
+
}, _callee5, this, [[0, 8]]);
|
|
1340
1415
|
}));
|
|
1341
1416
|
|
|
1342
1417
|
function querySettleResult() {
|
|
1343
|
-
return
|
|
1418
|
+
return _ref14.apply(this, arguments);
|
|
1344
1419
|
}
|
|
1345
1420
|
|
|
1346
1421
|
return querySettleResult;
|
|
@@ -1366,99 +1441,131 @@ var SettlementStore = (_class = function () {
|
|
|
1366
1441
|
}, {
|
|
1367
1442
|
key: 'validePwd',
|
|
1368
1443
|
value: function () {
|
|
1369
|
-
var
|
|
1370
|
-
var
|
|
1444
|
+
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(value) {
|
|
1445
|
+
var _ref16, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, cardStatusEnum, result, count, _result;
|
|
1371
1446
|
|
|
1372
|
-
return _regenerator2.default.wrap(function
|
|
1447
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1373
1448
|
while (1) {
|
|
1374
|
-
switch (
|
|
1449
|
+
switch (_context6.prev = _context6.next) {
|
|
1375
1450
|
case 0:
|
|
1376
|
-
|
|
1377
|
-
|
|
1451
|
+
_ref16 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref16.isNewRetailBCPos;
|
|
1452
|
+
_context6.prev = 1;
|
|
1378
1453
|
|
|
1379
1454
|
if (!isNewRetailBCPos) {
|
|
1380
|
-
|
|
1455
|
+
_context6.next = 33;
|
|
1381
1456
|
break;
|
|
1382
1457
|
}
|
|
1383
1458
|
|
|
1384
1459
|
cook1 = this.getAllCookies()['errorPwd'];
|
|
1385
1460
|
cook2 = cook1 && JSON.parse(cook1);
|
|
1386
1461
|
message = '密码输入错误';
|
|
1387
|
-
|
|
1462
|
+
memberStorageId = this.paymode.currentMode.meStorageCardId;
|
|
1388
1463
|
|
|
1389
1464
|
if (!cook2) {
|
|
1390
|
-
|
|
1465
|
+
_context6.next = 12;
|
|
1391
1466
|
break;
|
|
1392
1467
|
}
|
|
1393
1468
|
|
|
1394
|
-
if (!cook2.hasOwnProperty(
|
|
1395
|
-
|
|
1469
|
+
if (!cook2.hasOwnProperty(memberStorageId + "")) {
|
|
1470
|
+
_context6.next = 12;
|
|
1396
1471
|
break;
|
|
1397
1472
|
}
|
|
1398
1473
|
|
|
1399
|
-
if (!(cook2[
|
|
1400
|
-
|
|
1474
|
+
if (!(cook2[memberStorageId] > 3)) {
|
|
1475
|
+
_context6.next = 12;
|
|
1401
1476
|
break;
|
|
1402
1477
|
}
|
|
1403
1478
|
|
|
1404
1479
|
message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
|
|
1405
|
-
return
|
|
1480
|
+
return _context6.abrupt('return', _promise2.default.resolve(message));
|
|
1406
1481
|
|
|
1407
1482
|
case 12:
|
|
1408
|
-
|
|
1409
|
-
|
|
1483
|
+
_paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId, cardStatusEnum = _paymode$currentMode.cardStatusEnum;
|
|
1484
|
+
result = null;
|
|
1410
1485
|
|
|
1411
|
-
|
|
1412
|
-
|
|
1486
|
+
if (!(cardTypeEnum === 'BALANCE_CARD')) {
|
|
1487
|
+
_context6.next = 20;
|
|
1488
|
+
break;
|
|
1489
|
+
}
|
|
1413
1490
|
|
|
1491
|
+
_context6.next = 17;
|
|
1492
|
+
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
|
|
1493
|
+
|
|
1494
|
+
case 17:
|
|
1495
|
+
result = _context6.sent;
|
|
1496
|
+
_context6.next = 29;
|
|
1497
|
+
break;
|
|
1498
|
+
|
|
1499
|
+
case 20:
|
|
1500
|
+
if (!(cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId)) {
|
|
1501
|
+
_context6.next = 26;
|
|
1502
|
+
break;
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
_context6.next = 23;
|
|
1506
|
+
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1507
|
+
|
|
1508
|
+
case 23:
|
|
1509
|
+
result = _context6.sent;
|
|
1510
|
+
_context6.next = 29;
|
|
1511
|
+
break;
|
|
1512
|
+
|
|
1513
|
+
case 26:
|
|
1514
|
+
_context6.next = 28;
|
|
1515
|
+
return (0, _tplusApi.ccApi)({ password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1516
|
+
|
|
1517
|
+
case 28:
|
|
1518
|
+
result = _context6.sent;
|
|
1519
|
+
|
|
1520
|
+
case 29:
|
|
1414
1521
|
if (!result.data) {
|
|
1415
1522
|
if (cook2) {
|
|
1416
|
-
if (cook2.hasOwnProperty(
|
|
1417
|
-
count = cook2[
|
|
1523
|
+
if (cook2.hasOwnProperty(memberStorageId + "")) {
|
|
1524
|
+
count = cook2[memberStorageId];
|
|
1418
1525
|
|
|
1419
|
-
cook2[
|
|
1526
|
+
cook2[memberStorageId] = count + 1;
|
|
1420
1527
|
} else {
|
|
1421
|
-
cook2[
|
|
1528
|
+
cook2[memberStorageId] = 1;
|
|
1422
1529
|
}
|
|
1423
1530
|
} else {
|
|
1424
1531
|
cook2 = {};
|
|
1425
|
-
cook2[
|
|
1532
|
+
cook2[memberStorageId] = 1;
|
|
1426
1533
|
}
|
|
1427
1534
|
this.setCookie('errorPwd', '', -1);
|
|
1428
1535
|
this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
|
|
1429
1536
|
}
|
|
1430
|
-
return
|
|
1537
|
+
return _context6.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
|
|
1431
1538
|
|
|
1432
|
-
case
|
|
1433
|
-
|
|
1539
|
+
case 33:
|
|
1540
|
+
_context6.next = 35;
|
|
1434
1541
|
return (0, _tplusApi.tApi)({ "CheckoutParams": {
|
|
1435
1542
|
"Idmember": value.id,
|
|
1436
1543
|
"Password": value.pwd
|
|
1437
1544
|
} }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
|
|
1438
1545
|
|
|
1439
|
-
case
|
|
1440
|
-
_result =
|
|
1441
|
-
return
|
|
1546
|
+
case 35:
|
|
1547
|
+
_result = _context6.sent;
|
|
1548
|
+
return _context6.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
|
|
1442
1549
|
|
|
1443
|
-
case
|
|
1444
|
-
|
|
1550
|
+
case 37:
|
|
1551
|
+
_context6.next = 42;
|
|
1445
1552
|
break;
|
|
1446
1553
|
|
|
1447
|
-
case
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
return
|
|
1554
|
+
case 39:
|
|
1555
|
+
_context6.prev = 39;
|
|
1556
|
+
_context6.t0 = _context6['catch'](1);
|
|
1557
|
+
return _context6.abrupt('return', "failed");
|
|
1451
1558
|
|
|
1452
|
-
case
|
|
1559
|
+
case 42:
|
|
1453
1560
|
case 'end':
|
|
1454
|
-
return
|
|
1561
|
+
return _context6.stop();
|
|
1455
1562
|
}
|
|
1456
1563
|
}
|
|
1457
|
-
},
|
|
1564
|
+
}, _callee6, this, [[1, 39]]);
|
|
1458
1565
|
}));
|
|
1459
1566
|
|
|
1460
|
-
function validePwd(
|
|
1461
|
-
return
|
|
1567
|
+
function validePwd(_x4) {
|
|
1568
|
+
return _ref15.apply(this, arguments);
|
|
1462
1569
|
}
|
|
1463
1570
|
|
|
1464
1571
|
return validePwd;
|
|
@@ -1480,7 +1587,7 @@ var SettlementStore = (_class = function () {
|
|
|
1480
1587
|
var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
|
|
1481
1588
|
return (0, _tplusApi.ccApi)({
|
|
1482
1589
|
Idstore: idstore,
|
|
1483
|
-
meMemberId: _this12.
|
|
1590
|
+
meMemberId: _this12.paymode.currentMode.memberId,
|
|
1484
1591
|
oldPassword: null,
|
|
1485
1592
|
newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
|
|
1486
1593
|
dataSource: "POS"
|
|
@@ -1497,37 +1604,130 @@ var SettlementStore = (_class = function () {
|
|
|
1497
1604
|
var _this13 = this;
|
|
1498
1605
|
|
|
1499
1606
|
return function () {
|
|
1500
|
-
var
|
|
1607
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(_this) {
|
|
1501
1608
|
var _getLoginInfo, IdStore, StoreCode, resp;
|
|
1502
1609
|
|
|
1503
|
-
return _regenerator2.default.wrap(function
|
|
1610
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1504
1611
|
while (1) {
|
|
1505
|
-
switch (
|
|
1612
|
+
switch (_context7.prev = _context7.next) {
|
|
1506
1613
|
case 0:
|
|
1507
1614
|
_getLoginInfo = _this13.getLoginInfo(), IdStore = _getLoginInfo.IdStore, StoreCode = _getLoginInfo.StoreCode;
|
|
1508
|
-
|
|
1615
|
+
_context7.next = 3;
|
|
1509
1616
|
return (0, _tplusApi.tApi)({ Idmember: _this13.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
|
|
1510
1617
|
|
|
1511
1618
|
case 3:
|
|
1512
|
-
resp =
|
|
1619
|
+
resp = _context7.sent;
|
|
1513
1620
|
|
|
1514
1621
|
_this.member = resp;
|
|
1515
|
-
_this.paymode.
|
|
1516
|
-
return
|
|
1622
|
+
_this.paymode.updateMemberStorageCardNo(resp.StorageCardNo, resp.WalletEnabled);
|
|
1623
|
+
return _context7.abrupt('return', _promise2.default.resolve(resp));
|
|
1517
1624
|
|
|
1518
1625
|
case 7:
|
|
1519
1626
|
case 'end':
|
|
1520
|
-
return
|
|
1627
|
+
return _context7.stop();
|
|
1521
1628
|
}
|
|
1522
1629
|
}
|
|
1523
|
-
},
|
|
1630
|
+
}, _callee7, _this13);
|
|
1524
1631
|
}));
|
|
1525
1632
|
|
|
1526
|
-
return function (
|
|
1633
|
+
return function (_x5) {
|
|
1634
|
+
return _ref17.apply(this, arguments);
|
|
1635
|
+
};
|
|
1636
|
+
}();
|
|
1637
|
+
}
|
|
1638
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'updateCurrentMode', [_mobx.action], {
|
|
1639
|
+
enumerable: true,
|
|
1640
|
+
initializer: function initializer() {
|
|
1641
|
+
var _this14 = this;
|
|
1642
|
+
|
|
1643
|
+
return function () {
|
|
1644
|
+
var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(memberId) {
|
|
1645
|
+
var result;
|
|
1646
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1647
|
+
while (1) {
|
|
1648
|
+
switch (_context8.prev = _context8.next) {
|
|
1649
|
+
case 0:
|
|
1650
|
+
_context8.next = 2;
|
|
1651
|
+
return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId + '/' + true, false, false, { method: 'get' });
|
|
1652
|
+
|
|
1653
|
+
case 2:
|
|
1654
|
+
result = _context8.sent;
|
|
1655
|
+
|
|
1656
|
+
if (!(result && result.data.length)) {
|
|
1657
|
+
_context8.next = 20;
|
|
1658
|
+
break;
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
if (!(result.data.length === 1)) {
|
|
1662
|
+
_context8.next = 9;
|
|
1663
|
+
break;
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
_this14.paymode.updateCardInfo(result.data[0]);
|
|
1667
|
+
return _context8.abrupt('return', result.data);
|
|
1668
|
+
|
|
1669
|
+
case 9:
|
|
1670
|
+
if (!(result.data && result.data.length === 1)) {
|
|
1671
|
+
_context8.next = 14;
|
|
1672
|
+
break;
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
_this14.paymode.updateCardInfo(result.data[0]);
|
|
1676
|
+
return _context8.abrupt('return', result.data);
|
|
1677
|
+
|
|
1678
|
+
case 14:
|
|
1679
|
+
if (!(result.data && result.data.length > 1)) {
|
|
1680
|
+
_context8.next = 18;
|
|
1681
|
+
break;
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1684
|
+
return _context8.abrupt('return', result.data);
|
|
1685
|
+
|
|
1686
|
+
case 18:
|
|
1687
|
+
_message2.default.warn('没有可用储值卡!');
|
|
1688
|
+
return _context8.abrupt('return', false);
|
|
1689
|
+
|
|
1690
|
+
case 20:
|
|
1691
|
+
case 'end':
|
|
1692
|
+
return _context8.stop();
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
}, _callee8, _this14);
|
|
1696
|
+
}));
|
|
1697
|
+
|
|
1698
|
+
return function (_x6) {
|
|
1527
1699
|
return _ref18.apply(this, arguments);
|
|
1528
1700
|
};
|
|
1529
1701
|
}();
|
|
1530
1702
|
}
|
|
1703
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'updateCardInfo', [_mobx.action], {
|
|
1704
|
+
enumerable: true,
|
|
1705
|
+
initializer: function initializer() {
|
|
1706
|
+
var _this15 = this;
|
|
1707
|
+
|
|
1708
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9() {
|
|
1709
|
+
var address, result;
|
|
1710
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
1711
|
+
while (1) {
|
|
1712
|
+
switch (_context9.prev = _context9.next) {
|
|
1713
|
+
case 0:
|
|
1714
|
+
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + _this15.paymode.currentMode.storageCardNo;
|
|
1715
|
+
_context9.next = 3;
|
|
1716
|
+
return (0, _tplusApi.ccApi)({}, address, false, false, { method: 'get', timeout_skip: true });
|
|
1717
|
+
|
|
1718
|
+
case 3:
|
|
1719
|
+
result = _context9.sent;
|
|
1720
|
+
|
|
1721
|
+
_this15.paymode.updateCardInfo(result.data);
|
|
1722
|
+
|
|
1723
|
+
case 5:
|
|
1724
|
+
case 'end':
|
|
1725
|
+
return _context9.stop();
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
}, _callee9, _this15);
|
|
1729
|
+
}));
|
|
1730
|
+
}
|
|
1531
1731
|
}), _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);
|
|
1532
1732
|
exports.default = SettlementStore;
|
|
1533
1733
|
var PayMode = exports.PayMode = (_class3 = function () {
|
|
@@ -1542,15 +1742,19 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1542
1742
|
this.onlineamount = 0;
|
|
1543
1743
|
this.maxamount = 0;
|
|
1544
1744
|
|
|
1545
|
-
_initDefineProp(this, 'currentFocus',
|
|
1745
|
+
_initDefineProp(this, 'currentFocus', _descriptor5, this);
|
|
1746
|
+
|
|
1747
|
+
_initDefineProp(this, 'received', _descriptor6, this);
|
|
1546
1748
|
|
|
1547
|
-
_initDefineProp(this, '
|
|
1749
|
+
_initDefineProp(this, 'receivable', _descriptor7, this);
|
|
1548
1750
|
|
|
1549
|
-
_initDefineProp(this, '
|
|
1751
|
+
_initDefineProp(this, 'paymodes', _descriptor8, this);
|
|
1550
1752
|
|
|
1551
|
-
_initDefineProp(this, '
|
|
1753
|
+
_initDefineProp(this, 'thePaymodes', _descriptor9, this);
|
|
1552
1754
|
|
|
1553
|
-
_initDefineProp(this, '
|
|
1755
|
+
_initDefineProp(this, 'storageCardNo', _descriptor10, this);
|
|
1756
|
+
|
|
1757
|
+
_initDefineProp(this, 'balance', _descriptor11, this);
|
|
1554
1758
|
|
|
1555
1759
|
this.currentMode = null;
|
|
1556
1760
|
this.checkList = [];
|
|
@@ -1559,11 +1763,11 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1559
1763
|
hotKey: "Ctrl+M"
|
|
1560
1764
|
};
|
|
1561
1765
|
|
|
1562
|
-
_initDefineProp(this, 'calcCheckList',
|
|
1766
|
+
_initDefineProp(this, 'calcCheckList', _descriptor12, this);
|
|
1563
1767
|
|
|
1564
|
-
_initDefineProp(this, 'setCouponNum',
|
|
1768
|
+
_initDefineProp(this, 'setCouponNum', _descriptor13, this);
|
|
1565
1769
|
|
|
1566
|
-
_initDefineProp(this, 'addDjqs',
|
|
1770
|
+
_initDefineProp(this, 'addDjqs', _descriptor14, this);
|
|
1567
1771
|
}
|
|
1568
1772
|
// @observable store = null;
|
|
1569
1773
|
|
|
@@ -1599,10 +1803,30 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1599
1803
|
this.received = (0, _utils.getFixedNumber)(sum);
|
|
1600
1804
|
this.receivable = (0, _utils.getFixedNumber)(this.amount - sum);
|
|
1601
1805
|
}
|
|
1806
|
+
}, {
|
|
1807
|
+
key: 'updateMemberStorageCardNo',
|
|
1808
|
+
value: function updateMemberStorageCardNo(storageCardNo, walletEnabled) {
|
|
1809
|
+
this.currentMode.storageCardNo = storageCardNo;
|
|
1810
|
+
this.currentMode.walletEnabled = walletEnabled;
|
|
1811
|
+
}
|
|
1812
|
+
}, {
|
|
1813
|
+
key: 'updateCardInfo',
|
|
1814
|
+
value: function updateCardInfo(m) {
|
|
1815
|
+
this.currentMode.cardStatusEnum = m.CardStatusEnum;
|
|
1816
|
+
this.currentMode.isNeedPassword = m.IsNeedPassword;
|
|
1817
|
+
this.currentMode.meStorageCardId = m.MeStorageCardId;
|
|
1818
|
+
this.currentMode.storageCardNo = m.StorageCardNo;
|
|
1819
|
+
this.currentMode.balance = m.BalanceStorage;
|
|
1820
|
+
this.currentMode.rawbalance = m.BalanceStorage;
|
|
1821
|
+
this.currentMode.cardTypeEnum = m.CardTypeEnum;
|
|
1822
|
+
this.currentMode.walletEnabled = m.WalletEnabled;
|
|
1823
|
+
this.currentMode.memberId = m.ID;
|
|
1824
|
+
this.currentMode.freePaymentPasswordStore = m.freePaymentPasswordStore;
|
|
1825
|
+
}
|
|
1602
1826
|
}, {
|
|
1603
1827
|
key: 'calcDjqCheckValue',
|
|
1604
1828
|
value: function calcDjqCheckValue(q1, dto, params) {
|
|
1605
|
-
var
|
|
1829
|
+
var _this16 = this;
|
|
1606
1830
|
|
|
1607
1831
|
var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
|
|
1608
1832
|
var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
|
|
@@ -1616,8 +1840,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1616
1840
|
this.checkList = [];
|
|
1617
1841
|
}
|
|
1618
1842
|
|
|
1619
|
-
var
|
|
1620
|
-
isNewRetailBCPos =
|
|
1843
|
+
var _ref20 = _mutantsUtil.platform || {},
|
|
1844
|
+
isNewRetailBCPos = _ref20.isNewRetailBCPos;
|
|
1621
1845
|
|
|
1622
1846
|
var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
|
|
1623
1847
|
PayStyle = _enumController$getEn15.PayStyle,
|
|
@@ -1649,7 +1873,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1649
1873
|
if (!q1.checked) {
|
|
1650
1874
|
this.checkList.forEach(function (ele, i) {
|
|
1651
1875
|
if (ele.id === q1.id) {
|
|
1652
|
-
|
|
1876
|
+
_this16.checkList.splice(i, 1);
|
|
1653
1877
|
}
|
|
1654
1878
|
});
|
|
1655
1879
|
} else {
|
|
@@ -1721,24 +1945,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1721
1945
|
if (result && result.length != 0) {
|
|
1722
1946
|
result.forEach(function (element, index) {
|
|
1723
1947
|
var djq1 = false;
|
|
1724
|
-
|
|
1948
|
+
_this16.currentMode.djqs.forEach(function (djq) {
|
|
1725
1949
|
if (element.id === djq.id) {
|
|
1726
1950
|
djq1 = true;
|
|
1727
1951
|
}
|
|
1728
1952
|
});
|
|
1729
1953
|
|
|
1730
|
-
var
|
|
1731
|
-
couponCode =
|
|
1732
|
-
name =
|
|
1733
|
-
tieredAmountResult =
|
|
1734
|
-
fromDate =
|
|
1735
|
-
dateMount =
|
|
1736
|
-
promoMethodEnum =
|
|
1737
|
-
discountPct =
|
|
1738
|
-
nominalAmount =
|
|
1739
|
-
promoId =
|
|
1740
|
-
id =
|
|
1741
|
-
doorsill =
|
|
1954
|
+
var _ref21 = element || {},
|
|
1955
|
+
couponCode = _ref21.couponCode,
|
|
1956
|
+
name = _ref21.name,
|
|
1957
|
+
tieredAmountResult = _ref21.tieredAmountResult,
|
|
1958
|
+
fromDate = _ref21.fromDate,
|
|
1959
|
+
dateMount = _ref21.dateMount,
|
|
1960
|
+
promoMethodEnum = _ref21.promoMethodEnum,
|
|
1961
|
+
discountPct = _ref21.discountPct,
|
|
1962
|
+
nominalAmount = _ref21.nominalAmount,
|
|
1963
|
+
promoId = _ref21.promoId,
|
|
1964
|
+
id = _ref21.id,
|
|
1965
|
+
doorsill = _ref21.doorsill;
|
|
1742
1966
|
|
|
1743
1967
|
var condValue = tieredAmountResult.condValue,
|
|
1744
1968
|
promoDiscount = tieredAmountResult.promoDiscount,
|
|
@@ -1766,10 +1990,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1766
1990
|
// couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
|
|
1767
1991
|
// id
|
|
1768
1992
|
// })
|
|
1769
|
-
|
|
1993
|
+
_this16.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
|
|
1770
1994
|
djq1 = false;
|
|
1771
1995
|
} else {
|
|
1772
|
-
|
|
1996
|
+
_this16.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
|
|
1773
1997
|
// this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
|
|
1774
1998
|
// djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
|
|
1775
1999
|
}
|
|
@@ -1782,8 +2006,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1782
2006
|
}, {
|
|
1783
2007
|
key: 'calcDjqValue',
|
|
1784
2008
|
value: function calcDjqValue(q1) {
|
|
1785
|
-
var
|
|
1786
|
-
isNewRetailBCPos =
|
|
2009
|
+
var _ref22 = _mutantsUtil.platform || {},
|
|
2010
|
+
isNewRetailBCPos = _ref22.isNewRetailBCPos;
|
|
1787
2011
|
|
|
1788
2012
|
var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
|
|
1789
2013
|
Differentiate = _enumController$getEn16.Differentiate;
|
|
@@ -1868,28 +2092,28 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1868
2092
|
}, {
|
|
1869
2093
|
key: 'calcMemberBalance',
|
|
1870
2094
|
value: function calcMemberBalance() {
|
|
1871
|
-
this.currentMode.balance = this.currentMode.
|
|
2095
|
+
this.currentMode.balance = this.currentMode.rawbalance - this.currentMode.value;
|
|
1872
2096
|
}
|
|
1873
2097
|
}, {
|
|
1874
2098
|
key: 'setPaymodes',
|
|
1875
2099
|
value: function () {
|
|
1876
|
-
var
|
|
1877
|
-
var
|
|
2100
|
+
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(type, isIntegralExchange) {
|
|
2101
|
+
var _this17 = this;
|
|
1878
2102
|
|
|
1879
2103
|
var _enumController$getEn18, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
|
|
1880
2104
|
|
|
1881
|
-
return _regenerator2.default.wrap(function
|
|
2105
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
1882
2106
|
while (1) {
|
|
1883
|
-
switch (
|
|
2107
|
+
switch (_context10.prev = _context10.next) {
|
|
1884
2108
|
case 0:
|
|
1885
2109
|
_enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn18.settleStyleType, PayStyle = _enumController$getEn18.PayStyle;
|
|
1886
2110
|
memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
|
|
1887
2111
|
param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
|
|
1888
|
-
|
|
2112
|
+
_context10.next = 5;
|
|
1889
2113
|
return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
|
|
1890
2114
|
|
|
1891
2115
|
case 5:
|
|
1892
|
-
modes =
|
|
2116
|
+
modes = _context10.sent;
|
|
1893
2117
|
|
|
1894
2118
|
if (modes) {
|
|
1895
2119
|
(0, _mobx.runInAction)(function () {
|
|
@@ -1898,7 +2122,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1898
2122
|
//产品需求确认会员储值卡结算方式前端展示统一调整为“储值卡" tuzha by 2020-07-08
|
|
1899
2123
|
|
|
1900
2124
|
if (mode.Code == PayStyle.hyczk) {
|
|
1901
|
-
mode.Name = '
|
|
2125
|
+
mode.Name = '储值卡';
|
|
1902
2126
|
}
|
|
1903
2127
|
paymodes.push({
|
|
1904
2128
|
name: mode.Name,
|
|
@@ -1914,21 +2138,21 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1914
2138
|
calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88"
|
|
1915
2139
|
});
|
|
1916
2140
|
});
|
|
1917
|
-
|
|
2141
|
+
_this17.paymodes = paymodes;
|
|
1918
2142
|
//modes.QuickSettleStyles
|
|
1919
2143
|
});
|
|
1920
2144
|
}
|
|
1921
2145
|
|
|
1922
2146
|
case 7:
|
|
1923
2147
|
case 'end':
|
|
1924
|
-
return
|
|
2148
|
+
return _context10.stop();
|
|
1925
2149
|
}
|
|
1926
2150
|
}
|
|
1927
|
-
},
|
|
2151
|
+
}, _callee10, this);
|
|
1928
2152
|
}));
|
|
1929
2153
|
|
|
1930
|
-
function setPaymodes(
|
|
1931
|
-
return
|
|
2154
|
+
function setPaymodes(_x7, _x8) {
|
|
2155
|
+
return _ref23.apply(this, arguments);
|
|
1932
2156
|
}
|
|
1933
2157
|
|
|
1934
2158
|
return setPaymodes;
|
|
@@ -1945,47 +2169,57 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1945
2169
|
}
|
|
1946
2170
|
}]);
|
|
1947
2171
|
return PayMode;
|
|
1948
|
-
}(), (
|
|
2172
|
+
}(), (_descriptor5 = _applyDecoratedDescriptor(_class3.prototype, 'currentFocus', [_mobx.observable], {
|
|
1949
2173
|
enumerable: true,
|
|
1950
2174
|
initializer: function initializer() {
|
|
1951
2175
|
return "";
|
|
1952
2176
|
}
|
|
1953
|
-
}),
|
|
2177
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class3.prototype, 'received', [_mobx.observable], {
|
|
1954
2178
|
enumerable: true,
|
|
1955
2179
|
initializer: function initializer() {
|
|
1956
2180
|
return 0;
|
|
1957
2181
|
}
|
|
1958
|
-
}),
|
|
2182
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class3.prototype, 'receivable', [_mobx.observable], {
|
|
1959
2183
|
enumerable: true,
|
|
1960
2184
|
initializer: function initializer() {
|
|
1961
2185
|
return 0;
|
|
1962
2186
|
}
|
|
1963
|
-
}),
|
|
2187
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class3.prototype, 'paymodes', [_mobx.observable], {
|
|
1964
2188
|
enumerable: true,
|
|
1965
2189
|
initializer: function initializer() {
|
|
1966
2190
|
return [];
|
|
1967
2191
|
}
|
|
1968
|
-
}),
|
|
2192
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class3.prototype, 'thePaymodes', [_mobx.observable], {
|
|
1969
2193
|
enumerable: true,
|
|
1970
2194
|
initializer: function initializer() {
|
|
1971
2195
|
return [];
|
|
1972
2196
|
}
|
|
1973
|
-
}),
|
|
2197
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class3.prototype, 'storageCardNo', [_mobx.observable], {
|
|
2198
|
+
enumerable: true,
|
|
2199
|
+
initializer: function initializer() {
|
|
2200
|
+
return null;
|
|
2201
|
+
}
|
|
2202
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class3.prototype, 'balance', [_mobx.observable], {
|
|
1974
2203
|
enumerable: true,
|
|
1975
2204
|
initializer: function initializer() {
|
|
1976
|
-
|
|
2205
|
+
return null;
|
|
2206
|
+
}
|
|
2207
|
+
}), _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], {
|
|
2208
|
+
enumerable: true,
|
|
2209
|
+
initializer: function initializer() {
|
|
2210
|
+
var _this18 = this;
|
|
1977
2211
|
|
|
1978
2212
|
return function () {
|
|
1979
|
-
|
|
2213
|
+
_this18.checkList = [];
|
|
1980
2214
|
};
|
|
1981
2215
|
}
|
|
1982
|
-
}), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype),
|
|
2216
|
+
}), _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], {
|
|
1983
2217
|
enumerable: true,
|
|
1984
2218
|
initializer: function initializer() {
|
|
1985
|
-
var
|
|
2219
|
+
var _this19 = this;
|
|
1986
2220
|
|
|
1987
2221
|
return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
|
|
1988
|
-
|
|
2222
|
+
_this19.currentMode.djqs.forEach(function (ele) {
|
|
1989
2223
|
if (ele.id === id) {
|
|
1990
2224
|
promoMethodEnum == "CASH_COUPON" ? ele.amount = nominalAmount : ele.amount = promoDiscount;
|
|
1991
2225
|
ele.couponCategoryEnum = couponNum;
|
|
@@ -1995,10 +2229,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1995
2229
|
});
|
|
1996
2230
|
};
|
|
1997
2231
|
}
|
|
1998
|
-
}),
|
|
2232
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
|
|
1999
2233
|
enumerable: true,
|
|
2000
2234
|
initializer: function initializer() {
|
|
2001
|
-
var
|
|
2235
|
+
var _this20 = this;
|
|
2002
2236
|
|
|
2003
2237
|
return function (promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
|
|
2004
2238
|
var djq = {
|
|
@@ -2020,25 +2254,25 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2020
2254
|
couponCategoryEnum: couponCategoryEnum,
|
|
2021
2255
|
id: id
|
|
2022
2256
|
};
|
|
2023
|
-
|
|
2257
|
+
_this20.currentMode.djqs.push(djq);
|
|
2024
2258
|
};
|
|
2025
2259
|
}
|
|
2026
2260
|
}), _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);
|
|
2027
2261
|
var Member = exports.Member = (_class5 = function () {
|
|
2028
2262
|
function Member(m) {
|
|
2029
|
-
var
|
|
2263
|
+
var _this21 = this;
|
|
2030
2264
|
|
|
2031
2265
|
(0, _classCallCheck3.default)(this, Member);
|
|
2032
2266
|
|
|
2033
|
-
_initDefineProp(this, 'cardNo',
|
|
2267
|
+
_initDefineProp(this, 'cardNo', _descriptor15, this);
|
|
2034
2268
|
|
|
2035
|
-
_initDefineProp(this, 'balance',
|
|
2269
|
+
_initDefineProp(this, 'balance', _descriptor16, this);
|
|
2036
2270
|
|
|
2037
|
-
_initDefineProp(this, 'exchangable',
|
|
2271
|
+
_initDefineProp(this, 'exchangable', _descriptor17, this);
|
|
2038
2272
|
|
|
2039
|
-
_initDefineProp(this, '
|
|
2273
|
+
_initDefineProp(this, 'meStorageCardId', _descriptor18, this);
|
|
2040
2274
|
|
|
2041
|
-
_initDefineProp(this, '
|
|
2275
|
+
_initDefineProp(this, 'storageCardNo', _descriptor19, this);
|
|
2042
2276
|
|
|
2043
2277
|
if (m) {
|
|
2044
2278
|
this.id = m.ID;
|
|
@@ -2049,17 +2283,15 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2049
2283
|
return key == 'canusedbalancestorage';
|
|
2050
2284
|
});
|
|
2051
2285
|
|
|
2052
|
-
var
|
|
2053
|
-
isNewRetailBCPos =
|
|
2286
|
+
var _ref24 = _mutantsUtil.platform || {},
|
|
2287
|
+
isNewRetailBCPos = _ref24.isNewRetailBCPos;
|
|
2054
2288
|
|
|
2055
|
-
m.StorageCardNo && (this.StorageCardNo = m.StorageCardNo);
|
|
2056
|
-
m.MeStorageCardId && (this.MeStorageCardId = m.MeStorageCardId);
|
|
2057
2289
|
(0, _mobx.runInAction)(function () {
|
|
2058
|
-
|
|
2290
|
+
_this21.cardNo = m.CardCode;
|
|
2059
2291
|
if (index >= 0) {
|
|
2060
|
-
|
|
2292
|
+
_this21.balance = parseFloat(m.DynamicPropertyValues[index]);
|
|
2061
2293
|
} else {
|
|
2062
|
-
|
|
2294
|
+
_this21.balance = _this21.rawbalance;
|
|
2063
2295
|
}
|
|
2064
2296
|
});
|
|
2065
2297
|
this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;
|
|
@@ -2079,32 +2311,22 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2079
2311
|
this.cardNo = v;
|
|
2080
2312
|
this.id = null;
|
|
2081
2313
|
}
|
|
2082
|
-
}, {
|
|
2083
|
-
key: 'setMeStorageCardId',
|
|
2084
|
-
value: function setMeStorageCardId(v) {
|
|
2085
|
-
this.MeStorageCardId = v;
|
|
2086
|
-
}
|
|
2087
|
-
}, {
|
|
2088
|
-
key: 'setStorageCardNo',
|
|
2089
|
-
value: function setStorageCardNo(v) {
|
|
2090
|
-
this.StorageCardNo = v;
|
|
2091
|
-
}
|
|
2092
2314
|
}]);
|
|
2093
2315
|
return Member;
|
|
2094
|
-
}(), (
|
|
2316
|
+
}(), (_descriptor15 = _applyDecoratedDescriptor(_class5.prototype, 'cardNo', [_mobx.observable], {
|
|
2095
2317
|
enumerable: true,
|
|
2096
2318
|
initializer: null
|
|
2097
|
-
}),
|
|
2319
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class5.prototype, 'balance', [_mobx.observable], {
|
|
2098
2320
|
enumerable: true,
|
|
2099
2321
|
initializer: null
|
|
2100
|
-
}),
|
|
2322
|
+
}), _descriptor17 = _applyDecoratedDescriptor(_class5.prototype, 'exchangable', [_mobx.observable], {
|
|
2101
2323
|
enumerable: true,
|
|
2102
2324
|
initializer: null
|
|
2103
|
-
}),
|
|
2325
|
+
}), _descriptor18 = _applyDecoratedDescriptor(_class5.prototype, 'meStorageCardId', [_mobx.observable], {
|
|
2104
2326
|
enumerable: true,
|
|
2105
2327
|
initializer: null
|
|
2106
|
-
}),
|
|
2328
|
+
}), _descriptor19 = _applyDecoratedDescriptor(_class5.prototype, 'storageCardNo', [_mobx.observable], {
|
|
2107
2329
|
enumerable: true,
|
|
2108
2330
|
initializer: null
|
|
2109
|
-
}), _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)
|
|
2331
|
+
}), _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);
|
|
2110
2332
|
//# sourceMappingURL=settlementStore.js.map
|