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