tplus-components-touch 3.32.8 → 3.33.4
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 +309 -244
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +22 -1
- package/dist/components/settlement/settlementStore.js +410 -432
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/ticon/iconfont/demo.css +539 -539
- package/package.json +2 -2
|
@@ -168,7 +168,6 @@ var SettlementStore = (_class = function () {
|
|
|
168
168
|
(0, _classCallCheck3.default)(this, SettlementStore);
|
|
169
169
|
this.paymode = null;
|
|
170
170
|
this.dto = null;
|
|
171
|
-
this.dtoParams = null;
|
|
172
171
|
this.member = null;
|
|
173
172
|
this.brefund = false;
|
|
174
173
|
this.bquick = false;
|
|
@@ -428,6 +427,45 @@ var SettlementStore = (_class = function () {
|
|
|
428
427
|
};
|
|
429
428
|
}();
|
|
430
429
|
|
|
430
|
+
this.repeatStorageModal = function (content) {
|
|
431
|
+
return new _promise2.default(function (resolve, reject) {
|
|
432
|
+
_tplusComponentsTouch.ModalWraper.confirm({
|
|
433
|
+
title: '',
|
|
434
|
+
okText: '继续储值',
|
|
435
|
+
className: 'repeat-modal',
|
|
436
|
+
zIndex: 1007,
|
|
437
|
+
content: content,
|
|
438
|
+
onOk: function () {
|
|
439
|
+
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
|
440
|
+
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
441
|
+
while (1) {
|
|
442
|
+
switch (_context2.prev = _context2.next) {
|
|
443
|
+
case 0:
|
|
444
|
+
_context2.next = 2;
|
|
445
|
+
return _this2.saveMember();
|
|
446
|
+
|
|
447
|
+
case 2:
|
|
448
|
+
resolve(true);
|
|
449
|
+
|
|
450
|
+
case 3:
|
|
451
|
+
case 'end':
|
|
452
|
+
return _context2.stop();
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}, _callee2, _this2);
|
|
456
|
+
}));
|
|
457
|
+
|
|
458
|
+
return function onOk() {
|
|
459
|
+
return _ref5.apply(this, arguments);
|
|
460
|
+
};
|
|
461
|
+
}(),
|
|
462
|
+
onCancel: function onCancel() {
|
|
463
|
+
resolve(false);
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
});
|
|
467
|
+
};
|
|
468
|
+
|
|
431
469
|
this.checkIntegralExchangeReturn = function (id) {
|
|
432
470
|
return new _promise2.default(function (resolve, reject) {
|
|
433
471
|
(0, _tplusApi.tApi)({ param: { refVoucherId: id } }, 'chanjet.RE.NewPos.GetNewIntegralExchange', false, false, { timeout_skip: true }).then(function (resp) {
|
|
@@ -543,8 +581,8 @@ var SettlementStore = (_class = function () {
|
|
|
543
581
|
var _enumController$getEn5 = _mutantsUtil.enumController.getEnumOj(),
|
|
544
582
|
PayStyle = _enumController$getEn5.PayStyle;
|
|
545
583
|
|
|
546
|
-
var
|
|
547
|
-
isNewRetailBCPos =
|
|
584
|
+
var _ref6 = _mutantsUtil.platform || {},
|
|
585
|
+
isNewRetailBCPos = _ref6.isNewRetailBCPos;
|
|
548
586
|
|
|
549
587
|
console.log(this.dto, 'dto==========');
|
|
550
588
|
this.paymode.checkList = [];
|
|
@@ -569,14 +607,14 @@ var SettlementStore = (_class = function () {
|
|
|
569
607
|
if (themode.paymentType == PayStyle.djq) {
|
|
570
608
|
(0, _each3.default)(_this5.dto.RetailCouponDetails, function (djq) {
|
|
571
609
|
if (isNewRetailBCPos) {
|
|
572
|
-
var
|
|
573
|
-
displayText =
|
|
574
|
-
promoRuleId =
|
|
575
|
-
dateMount =
|
|
576
|
-
promoMethodEnum =
|
|
577
|
-
discountPct =
|
|
578
|
-
promoId =
|
|
579
|
-
id =
|
|
610
|
+
var _ref7 = djq || {},
|
|
611
|
+
displayText = _ref7.displayText,
|
|
612
|
+
promoRuleId = _ref7.promoRuleId,
|
|
613
|
+
dateMount = _ref7.dateMount,
|
|
614
|
+
promoMethodEnum = _ref7.promoMethodEnum,
|
|
615
|
+
discountPct = _ref7.discountPct,
|
|
616
|
+
promoId = _ref7.promoId,
|
|
617
|
+
id = _ref7.id;
|
|
580
618
|
|
|
581
619
|
_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);
|
|
582
620
|
return;
|
|
@@ -684,44 +722,44 @@ var SettlementStore = (_class = function () {
|
|
|
684
722
|
var IdStore = this.storeInfo.storeID;
|
|
685
723
|
var StoreCode = this.storeInfo.storeCode; //_find(this.storeInfo.storeInfos,(store)=>{return store.ID==IdStore;}).Code;
|
|
686
724
|
|
|
687
|
-
var
|
|
688
|
-
isNewRetailBCPos =
|
|
725
|
+
var _ref8 = _mutantsUtil.platform || {},
|
|
726
|
+
isNewRetailBCPos = _ref8.isNewRetailBCPos;
|
|
689
727
|
|
|
690
728
|
var address = '';
|
|
691
729
|
if (isNewRetailBCPos) {
|
|
692
730
|
// address = '/member/memberProfile/FindByStorageCode/'+v;
|
|
693
731
|
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + v + '/' + true;
|
|
694
732
|
return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function () {
|
|
695
|
-
var
|
|
733
|
+
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(result) {
|
|
696
734
|
var data, m;
|
|
697
|
-
return _regenerator2.default.wrap(function
|
|
735
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
698
736
|
while (1) {
|
|
699
|
-
switch (
|
|
737
|
+
switch (_context3.prev = _context3.next) {
|
|
700
738
|
case 0:
|
|
701
739
|
data = result.data;
|
|
702
740
|
m = data && data.length && data[0];
|
|
703
741
|
|
|
704
742
|
if (!(result && result.data.length)) {
|
|
705
|
-
|
|
743
|
+
_context3.next = 25;
|
|
706
744
|
break;
|
|
707
745
|
}
|
|
708
746
|
|
|
709
747
|
if (!(result.data.length === 1)) {
|
|
710
|
-
|
|
748
|
+
_context3.next = 14;
|
|
711
749
|
break;
|
|
712
750
|
}
|
|
713
751
|
|
|
714
752
|
if (!(m.CardTypeEnum === 'BALANCE_CARD')) {
|
|
715
|
-
|
|
753
|
+
_context3.next = 10;
|
|
716
754
|
break;
|
|
717
755
|
}
|
|
718
756
|
|
|
719
757
|
_this7.paymode.updateCardInfo(m);
|
|
720
758
|
_this7.handleCzkData(m);
|
|
721
|
-
return
|
|
759
|
+
return _context3.abrupt('return', result.data);
|
|
722
760
|
|
|
723
761
|
case 10:
|
|
724
|
-
|
|
762
|
+
_context3.next = 12;
|
|
725
763
|
return (0, _tplusApi.ccApi)({ dto: _this7.dto, meStorageCardId: m.MeStorageCardId }, '/retail/RetailPos/validateRetailStorageCard', false, false).then(function (result1) {
|
|
726
764
|
var data1 = result1.data ? JSON.parse(result1.data)[0] : {};
|
|
727
765
|
if (data1.enable) {
|
|
@@ -734,40 +772,40 @@ var SettlementStore = (_class = function () {
|
|
|
734
772
|
});
|
|
735
773
|
|
|
736
774
|
case 12:
|
|
737
|
-
|
|
775
|
+
_context3.next = 25;
|
|
738
776
|
break;
|
|
739
777
|
|
|
740
778
|
case 14:
|
|
741
779
|
if (!(result.data && result.data.length === 1)) {
|
|
742
|
-
|
|
780
|
+
_context3.next = 19;
|
|
743
781
|
break;
|
|
744
782
|
}
|
|
745
783
|
|
|
746
784
|
_this7.paymode.updateCardInfo(result.data[0]);
|
|
747
|
-
return
|
|
785
|
+
return _context3.abrupt('return', result.data);
|
|
748
786
|
|
|
749
787
|
case 19:
|
|
750
788
|
if (!(result.data && result.data.length > 1)) {
|
|
751
|
-
|
|
789
|
+
_context3.next = 23;
|
|
752
790
|
break;
|
|
753
791
|
}
|
|
754
792
|
|
|
755
|
-
return
|
|
793
|
+
return _context3.abrupt('return', result.data);
|
|
756
794
|
|
|
757
795
|
case 23:
|
|
758
796
|
_message2.default.warn('没有可用储值卡!');
|
|
759
|
-
return
|
|
797
|
+
return _context3.abrupt('return', false);
|
|
760
798
|
|
|
761
799
|
case 25:
|
|
762
800
|
case 'end':
|
|
763
|
-
return
|
|
801
|
+
return _context3.stop();
|
|
764
802
|
}
|
|
765
803
|
}
|
|
766
|
-
},
|
|
804
|
+
}, _callee3, _this7);
|
|
767
805
|
}));
|
|
768
806
|
|
|
769
807
|
return function (_x2) {
|
|
770
|
-
return
|
|
808
|
+
return _ref9.apply(this, arguments);
|
|
771
809
|
};
|
|
772
810
|
}()
|
|
773
811
|
// result.data.forEach((m) => {
|
|
@@ -910,7 +948,6 @@ var SettlementStore = (_class = function () {
|
|
|
910
948
|
name: themode.name,
|
|
911
949
|
exchangeRate: themode.exchangeRate,
|
|
912
950
|
calDirection: themode.calDirection,
|
|
913
|
-
thridPayment: themode.thridPayment,
|
|
914
951
|
value: value,
|
|
915
952
|
value2: (0, _utils.getFixedNumber)(themode.calDirection == "88" ? value / themode.exchangeRate : value * themode.exchangeRate),
|
|
916
953
|
value3: value,
|
|
@@ -939,7 +976,7 @@ var SettlementStore = (_class = function () {
|
|
|
939
976
|
if (type == PayStyle.hyczk || type == PayStyle.jfdx || type == PayStyle.djq) {
|
|
940
977
|
this.setMaxAmount(type, mode);
|
|
941
978
|
}
|
|
942
|
-
console.log(
|
|
979
|
+
console.log(mode);
|
|
943
980
|
return mode;
|
|
944
981
|
}
|
|
945
982
|
}, {
|
|
@@ -976,6 +1013,15 @@ var SettlementStore = (_class = function () {
|
|
|
976
1013
|
key: 'changeFocusOnly',
|
|
977
1014
|
value: function changeFocusOnly(type) {
|
|
978
1015
|
this.paymode.currentFocus = type;
|
|
1016
|
+
// 获取焦点时带入剩余的值
|
|
1017
|
+
// let mode=_find(this.paymode.thePaymodes,{'paymentType':type});
|
|
1018
|
+
// if(mode && this.isIntegralExchange){
|
|
1019
|
+
// const shouldSetValue =getFixedNumber(parseFloat(this.paymode.receivable) + parseFloat(mode.value));
|
|
1020
|
+
// mode.value = shouldSetValue;
|
|
1021
|
+
// mode.value2 = getFixedNumber(mode.calDirection=="88"?shouldSetValue / mode.exchangeRate:(shouldSetValue * mode.exchangeRate));
|
|
1022
|
+
// mode.value3 = shouldSetValue;
|
|
1023
|
+
// this.paymode.calcReserved();
|
|
1024
|
+
// }
|
|
979
1025
|
}
|
|
980
1026
|
}, {
|
|
981
1027
|
key: 'changeClickFocusOnly',
|
|
@@ -1037,13 +1083,6 @@ var SettlementStore = (_class = function () {
|
|
|
1037
1083
|
var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
|
|
1038
1084
|
PayStyle = _enumController$getEn12.PayStyle;
|
|
1039
1085
|
|
|
1040
|
-
var hasThirdPay = this.paymode.thePaymodes.findIndex(function (v) {
|
|
1041
|
-
return !!v.thridPayment;
|
|
1042
|
-
});
|
|
1043
|
-
if (hasThirdPay > -1 && curMode.thridPayment) {
|
|
1044
|
-
_message2.default.warn('二开支付目前仅支持单一结算。');
|
|
1045
|
-
return;
|
|
1046
|
-
}
|
|
1047
1086
|
var pos = this.paymode.thePaymodes.length;
|
|
1048
1087
|
if (type == PayStyle.hyczk) {
|
|
1049
1088
|
var index = (0, _findLastIndex3.default)(this.paymode.thePaymodes, function (m) {
|
|
@@ -1051,6 +1090,8 @@ var SettlementStore = (_class = function () {
|
|
|
1051
1090
|
});
|
|
1052
1091
|
pos = index == -1 ? pos : index + 1;
|
|
1053
1092
|
}
|
|
1093
|
+
// this.paymode.thePaymodes.push(this.genNewMode(type) );
|
|
1094
|
+
|
|
1054
1095
|
this.paymode.thePaymodes.splice(pos, 0, this.genNewMode(type, this.newStyle && type == PayStyle.hyczk, undefined, isQuick));
|
|
1055
1096
|
this.paymode.calcReserved();
|
|
1056
1097
|
}
|
|
@@ -1066,83 +1107,158 @@ var SettlementStore = (_class = function () {
|
|
|
1066
1107
|
this.paymode.currentFocus = -1;
|
|
1067
1108
|
this.paymode.calcReserved();
|
|
1068
1109
|
}
|
|
1110
|
+
|
|
1111
|
+
// 获取储值是否重复, 在commit方法中使用
|
|
1112
|
+
|
|
1113
|
+
}, {
|
|
1114
|
+
key: 'findStorageBillValidate',
|
|
1115
|
+
value: function findStorageBillValidate() {
|
|
1116
|
+
var _this10 = this;
|
|
1117
|
+
|
|
1118
|
+
var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
|
|
1119
|
+
PayStyle = _enumController$getEn14.PayStyle;
|
|
1120
|
+
|
|
1121
|
+
(0, _mobx.runInAction)(function () {
|
|
1122
|
+
_this10.dto.StorageMutiSettleDetails = [];
|
|
1123
|
+
var thePaymodes = _this10.newStyle ? (0, _filter3.default)(_this10.paymode.thePaymodes, function (mode) {
|
|
1124
|
+
return parseFloat(mode.value) != 0;
|
|
1125
|
+
}) : _this10.paymode.thePaymodes;
|
|
1126
|
+
(0, _each3.default)(thePaymodes, function (mode) {
|
|
1127
|
+
var themode = (0, _find3.default)(_this10.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1128
|
+
|
|
1129
|
+
var value = parseFloat(mode.value);
|
|
1130
|
+
var giveChange = null;
|
|
1131
|
+
if (mode.paymentType == PayStyle.xianjin && _this10.paymode.receivable < 0 && value > Math.abs(_this10.paymode.receivable)) {
|
|
1132
|
+
value = Math.Add(value, _this10.paymode.receivable);
|
|
1133
|
+
giveChange = Math.abs(_this10.paymode.receivable);
|
|
1134
|
+
}
|
|
1135
|
+
_this10.dto.StorageMutiSettleDetails.push({
|
|
1136
|
+
Code: mode.paymethodId,
|
|
1137
|
+
StorageAmount: value,
|
|
1138
|
+
GiveChange: giveChange,
|
|
1139
|
+
IdsettleStyle: themode.idSettleStyle,
|
|
1140
|
+
IdbankAccount: themode.idBankAccount,
|
|
1141
|
+
PaymentCode: mode.authCode,
|
|
1142
|
+
DynamicPropertyKeys: [],
|
|
1143
|
+
DynamicPropertyValues: [],
|
|
1144
|
+
DataSource: { Id: _this10.dataSource }
|
|
1145
|
+
});
|
|
1146
|
+
});
|
|
1147
|
+
});
|
|
1148
|
+
return (0, _tplusApi.ccApi)((0, _extends3.default)({}, this.dto), '/marketingtool/Storage/findStorageBillValidate', false, false);
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
//判断是否重复弹框
|
|
1152
|
+
|
|
1069
1153
|
}, {
|
|
1070
1154
|
key: 'commit',
|
|
1071
1155
|
value: function () {
|
|
1072
|
-
var
|
|
1073
|
-
var ret;
|
|
1074
|
-
|
|
1156
|
+
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(bTest) {
|
|
1157
|
+
var _ref11, isNewRetailBCPos, ret, _ref12, _ref12$data, code, returnMsg, state;
|
|
1158
|
+
|
|
1159
|
+
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
1075
1160
|
while (1) {
|
|
1076
|
-
switch (
|
|
1161
|
+
switch (_context4.prev = _context4.next) {
|
|
1077
1162
|
case 0:
|
|
1078
1163
|
console.log('settlementStore.commit开始,参数:' + bTest);
|
|
1079
1164
|
|
|
1080
1165
|
if (!bTest) {
|
|
1081
|
-
|
|
1166
|
+
_context4.next = 3;
|
|
1082
1167
|
break;
|
|
1083
1168
|
}
|
|
1084
1169
|
|
|
1085
|
-
return
|
|
1170
|
+
return _context4.abrupt('return', _promise2.default.resolve(true));
|
|
1086
1171
|
|
|
1087
1172
|
case 3:
|
|
1088
|
-
|
|
1173
|
+
_ref11 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref11.isNewRetailBCPos;
|
|
1174
|
+
_context4.prev = 4;
|
|
1089
1175
|
|
|
1090
1176
|
if (!(this.type == 1)) {
|
|
1091
|
-
|
|
1177
|
+
_context4.next = 24;
|
|
1092
1178
|
break;
|
|
1093
1179
|
}
|
|
1094
1180
|
|
|
1095
|
-
|
|
1181
|
+
_context4.next = 8;
|
|
1182
|
+
return this.findStorageBillValidate();
|
|
1183
|
+
|
|
1184
|
+
case 8:
|
|
1185
|
+
ret = _context4.sent;
|
|
1186
|
+
_ref12 = ret || {}, _ref12$data = _ref12.data;
|
|
1187
|
+
_ref12$data = _ref12$data === undefined ? {} : _ref12$data;
|
|
1188
|
+
code = _ref12$data.code, returnMsg = _ref12$data.returnMsg;
|
|
1189
|
+
|
|
1190
|
+
if (!(code && code == 10001)) {
|
|
1191
|
+
_context4.next = 20;
|
|
1192
|
+
break;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
_context4.next = 15;
|
|
1196
|
+
return this.repeatStorageModal(returnMsg);
|
|
1197
|
+
|
|
1198
|
+
case 15:
|
|
1199
|
+
state = _context4.sent;
|
|
1200
|
+
|
|
1201
|
+
if (!(state === false)) {
|
|
1202
|
+
_context4.next = 18;
|
|
1203
|
+
break;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
return _context4.abrupt('return', _promise2.default.resolve(false));
|
|
1207
|
+
|
|
1208
|
+
case 18:
|
|
1209
|
+
_context4.next = 22;
|
|
1210
|
+
break;
|
|
1211
|
+
|
|
1212
|
+
case 20:
|
|
1213
|
+
_context4.next = 22;
|
|
1096
1214
|
return this.saveMember();
|
|
1097
1215
|
|
|
1098
|
-
case
|
|
1099
|
-
|
|
1216
|
+
case 22:
|
|
1217
|
+
_context4.next = 32;
|
|
1100
1218
|
break;
|
|
1101
1219
|
|
|
1102
|
-
case
|
|
1103
|
-
|
|
1220
|
+
case 24:
|
|
1221
|
+
if (!isNewRetailBCPos) {
|
|
1222
|
+
_context4.next = 27;
|
|
1223
|
+
break;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
_context4.next = 27;
|
|
1104
1227
|
return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
|
|
1105
1228
|
|
|
1106
|
-
case
|
|
1107
|
-
|
|
1229
|
+
case 27:
|
|
1230
|
+
_context4.next = 29;
|
|
1108
1231
|
return this.save();
|
|
1109
1232
|
|
|
1110
|
-
case
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
if (!(ret === false)) {
|
|
1114
|
-
_context3.next = 16;
|
|
1233
|
+
case 29:
|
|
1234
|
+
if (!isNewRetailBCPos) {
|
|
1235
|
+
_context4.next = 32;
|
|
1115
1236
|
break;
|
|
1116
1237
|
}
|
|
1117
1238
|
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
case 16:
|
|
1121
|
-
_context3.next = 18;
|
|
1239
|
+
_context4.next = 32;
|
|
1122
1240
|
return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
|
|
1123
1241
|
|
|
1124
|
-
case
|
|
1125
|
-
return
|
|
1242
|
+
case 32:
|
|
1243
|
+
return _context4.abrupt('return', _promise2.default.resolve(true));
|
|
1126
1244
|
|
|
1127
|
-
case
|
|
1128
|
-
|
|
1129
|
-
|
|
1245
|
+
case 35:
|
|
1246
|
+
_context4.prev = 35;
|
|
1247
|
+
_context4.t0 = _context4['catch'](4);
|
|
1130
1248
|
|
|
1131
|
-
console.error('settlementStore.commit失败,错误信息:' +
|
|
1132
|
-
|
|
1133
|
-
this.thirdPayRefund();
|
|
1134
|
-
return _context3.abrupt('return', _promise2.default.resolve(_context3.t0));
|
|
1249
|
+
console.error('settlementStore.commit失败,错误信息:' + _context4.t0);
|
|
1250
|
+
return _context4.abrupt('return', _promise2.default.resolve(_context4.t0));
|
|
1135
1251
|
|
|
1136
|
-
case
|
|
1252
|
+
case 39:
|
|
1137
1253
|
case 'end':
|
|
1138
|
-
return
|
|
1254
|
+
return _context4.stop();
|
|
1139
1255
|
}
|
|
1140
1256
|
}
|
|
1141
|
-
},
|
|
1257
|
+
}, _callee4, this, [[4, 35]]);
|
|
1142
1258
|
}));
|
|
1143
1259
|
|
|
1144
1260
|
function commit(_x3) {
|
|
1145
|
-
return
|
|
1261
|
+
return _ref10.apply(this, arguments);
|
|
1146
1262
|
}
|
|
1147
1263
|
|
|
1148
1264
|
return commit;
|
|
@@ -1156,26 +1272,26 @@ var SettlementStore = (_class = function () {
|
|
|
1156
1272
|
}, {
|
|
1157
1273
|
key: 'saveMember',
|
|
1158
1274
|
value: function saveMember() {
|
|
1159
|
-
var
|
|
1275
|
+
var _this11 = this;
|
|
1160
1276
|
|
|
1161
|
-
var _enumController$
|
|
1162
|
-
PayStyle = _enumController$
|
|
1277
|
+
var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
|
|
1278
|
+
PayStyle = _enumController$getEn15.PayStyle;
|
|
1163
1279
|
|
|
1164
1280
|
(0, _mobx.runInAction)(function () {
|
|
1165
|
-
|
|
1166
|
-
var thePaymodes =
|
|
1281
|
+
_this11.dto.StorageMutiSettleDetails = [];
|
|
1282
|
+
var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
|
|
1167
1283
|
return parseFloat(mode.value) != 0;
|
|
1168
|
-
}) :
|
|
1284
|
+
}) : _this11.paymode.thePaymodes;
|
|
1169
1285
|
(0, _each3.default)(thePaymodes, function (mode) {
|
|
1170
|
-
var themode = (0, _find3.default)(
|
|
1286
|
+
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1171
1287
|
|
|
1172
1288
|
var value = parseFloat(mode.value);
|
|
1173
1289
|
var giveChange = null;
|
|
1174
|
-
if (mode.paymentType == PayStyle.xianjin &&
|
|
1175
|
-
value = Math.Add(value,
|
|
1176
|
-
giveChange = Math.abs(
|
|
1290
|
+
if (mode.paymentType == PayStyle.xianjin && _this11.paymode.receivable < 0 && value > Math.abs(_this11.paymode.receivable)) {
|
|
1291
|
+
value = Math.Add(value, _this11.paymode.receivable);
|
|
1292
|
+
giveChange = Math.abs(_this11.paymode.receivable);
|
|
1177
1293
|
}
|
|
1178
|
-
|
|
1294
|
+
_this11.dto.StorageMutiSettleDetails.push({
|
|
1179
1295
|
Code: mode.paymethodId,
|
|
1180
1296
|
StorageAmount: value,
|
|
1181
1297
|
GiveChange: giveChange,
|
|
@@ -1184,7 +1300,7 @@ var SettlementStore = (_class = function () {
|
|
|
1184
1300
|
PaymentCode: mode.authCode,
|
|
1185
1301
|
DynamicPropertyKeys: [],
|
|
1186
1302
|
DynamicPropertyValues: [],
|
|
1187
|
-
DataSource: { Id:
|
|
1303
|
+
DataSource: { Id: _this11.dataSource }
|
|
1188
1304
|
});
|
|
1189
1305
|
});
|
|
1190
1306
|
});
|
|
@@ -1194,37 +1310,37 @@ var SettlementStore = (_class = function () {
|
|
|
1194
1310
|
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1195
1311
|
}
|
|
1196
1312
|
return (0, _tplusApi.tApi)({ dto: this.dto }, 'chanjet.ME.INewRetailMemberStorage.Save', false, false).then(function (resp) {
|
|
1197
|
-
|
|
1313
|
+
_this11.handlePrint(resp);
|
|
1198
1314
|
});
|
|
1199
1315
|
}
|
|
1200
1316
|
}, {
|
|
1201
1317
|
key: 'save',
|
|
1202
1318
|
value: function () {
|
|
1203
|
-
var
|
|
1204
|
-
var
|
|
1319
|
+
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1320
|
+
var _this12 = this;
|
|
1205
1321
|
|
|
1206
|
-
var _enumController$
|
|
1322
|
+
var _enumController$getEn16, PayStyle, _ref15, isNewRetailBCPos, IPMSG, RetailTypeEnum;
|
|
1207
1323
|
|
|
1208
|
-
return _regenerator2.default.wrap(function
|
|
1324
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1209
1325
|
while (1) {
|
|
1210
|
-
switch (
|
|
1326
|
+
switch (_context5.prev = _context5.next) {
|
|
1211
1327
|
case 0:
|
|
1212
|
-
_enumController$
|
|
1328
|
+
_enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn16.PayStyle;
|
|
1213
1329
|
|
|
1214
1330
|
(0, _mobx.runInAction)(function () {
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1331
|
+
_this12.dto.RetailPaymentDetails = [];
|
|
1332
|
+
_this12.dto.RetailStorageDetails = [];
|
|
1333
|
+
_this12.dto.RetailCouponDetails = [];
|
|
1218
1334
|
var czkSum = 0;
|
|
1219
1335
|
var count = 0;
|
|
1220
|
-
var thePaymodes =
|
|
1336
|
+
var thePaymodes = _this12.newStyle ? (0, _filter3.default)(_this12.paymode.thePaymodes, function (mode) {
|
|
1221
1337
|
return parseFloat(mode.value) != 0;
|
|
1222
|
-
}) :
|
|
1338
|
+
}) : _this12.paymode.thePaymodes;
|
|
1223
1339
|
(0, _each3.default)(thePaymodes, function (mode, index) {
|
|
1224
|
-
var themode = (0, _find3.default)(
|
|
1340
|
+
var themode = (0, _find3.default)(_this12.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1225
1341
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
1226
1342
|
czkSum = Math.Add(czkSum, mode.value);
|
|
1227
|
-
|
|
1343
|
+
_this12.dto.RetailStorageDetails.push({
|
|
1228
1344
|
Code: mode.paymethodId,
|
|
1229
1345
|
MeStorageCardId: mode.meStorageCardId,
|
|
1230
1346
|
StoragePaymentAmount: mode.value,
|
|
@@ -1233,17 +1349,17 @@ var SettlementStore = (_class = function () {
|
|
|
1233
1349
|
Idmember: mode.memberId,
|
|
1234
1350
|
DynamicPropertyKeys: [],
|
|
1235
1351
|
DynamicPropertyValues: [],
|
|
1236
|
-
DataSource: { Id:
|
|
1352
|
+
DataSource: { Id: _this12.dataSource },
|
|
1237
1353
|
Password: mode.authCode
|
|
1238
1354
|
});
|
|
1239
1355
|
} else {
|
|
1240
1356
|
var value = parseFloat(mode.value);
|
|
1241
1357
|
var giveChange = null;
|
|
1242
|
-
if (mode.paymentType == PayStyle.xianjin &&
|
|
1243
|
-
value = Math.Add(value,
|
|
1244
|
-
giveChange = Math.abs(
|
|
1358
|
+
if (mode.paymentType == PayStyle.xianjin && _this12.paymode.receivable < 0 && value > Math.abs(_this12.paymode.receivable)) {
|
|
1359
|
+
value = Math.Add(value, _this12.paymode.receivable);
|
|
1360
|
+
giveChange = Math.abs(_this12.paymode.receivable);
|
|
1245
1361
|
}
|
|
1246
|
-
|
|
1362
|
+
_this12.dto.RetailPaymentDetails.push({
|
|
1247
1363
|
Code: mode.paymethodId,
|
|
1248
1364
|
OrigAmount: mode.exchangeRate != 1 ? mode.value2 : value,
|
|
1249
1365
|
Amount: value,
|
|
@@ -1257,12 +1373,11 @@ var SettlementStore = (_class = function () {
|
|
|
1257
1373
|
OverchargesAmount: mode.overchargesAmount,
|
|
1258
1374
|
DynamicPropertyKeys: [],
|
|
1259
1375
|
DynamicPropertyValues: [],
|
|
1260
|
-
DataSource: { Id:
|
|
1261
|
-
ThirdPaymentInfo: themode.thridPayment || null
|
|
1376
|
+
DataSource: { Id: _this12.dataSource }
|
|
1262
1377
|
});
|
|
1263
1378
|
if (mode.paymentType == PayStyle.djq) {
|
|
1264
|
-
(0, _each3.default)(
|
|
1265
|
-
|
|
1379
|
+
(0, _each3.default)(_this12.paymode.checkList && _this12.paymode.checkList.length ? _this12.paymode.checkList : mode.djqs, function (djq) {
|
|
1380
|
+
_this12.dto.RetailCouponDetails.push({
|
|
1266
1381
|
CouponCode: djq.promoCouponCode,
|
|
1267
1382
|
ReductionAmount: djq.amount,
|
|
1268
1383
|
EnableAmount: djq.doorsill,
|
|
@@ -1272,28 +1387,53 @@ var SettlementStore = (_class = function () {
|
|
|
1272
1387
|
PromotionId: djq.promoId,
|
|
1273
1388
|
PromotionRuleId: djq.promoRuleId,
|
|
1274
1389
|
PromoCouponAllocatedId: djq.id,
|
|
1275
|
-
DataSource: { Id:
|
|
1390
|
+
DataSource: { Id: _this12.dataSource }
|
|
1276
1391
|
});
|
|
1277
1392
|
});
|
|
1278
1393
|
}
|
|
1279
1394
|
}
|
|
1280
1395
|
});
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1396
|
+
|
|
1397
|
+
var _ref14 = _mutantsUtil.platform || {},
|
|
1398
|
+
isNewRetailBCPos = _ref14.isNewRetailBCPos;
|
|
1399
|
+
|
|
1400
|
+
if (_this12.dto.RetailStorageDetails.length > 0) {
|
|
1401
|
+
var themode = (0, _find3.default)(_this12.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
|
|
1402
|
+
if (isNewRetailBCPos) {
|
|
1403
|
+
_this12.dto.RetailPaymentDetails.push({
|
|
1404
|
+
Code: _this12.paymode.counter,
|
|
1405
|
+
OrigAmount: czkSum,
|
|
1406
|
+
Amount: czkSum,
|
|
1407
|
+
IdsettleStyle: themode.idSettleStyle,
|
|
1408
|
+
IdbankAccount: themode.idBankAccount,
|
|
1409
|
+
DynamicPropertyKeys: [],
|
|
1410
|
+
DynamicPropertyValues: [],
|
|
1411
|
+
DataSource: { Id: _this12.dataSource },
|
|
1412
|
+
RetailStorageDetails: _this12.dto.RetailStorageDetails
|
|
1413
|
+
});
|
|
1414
|
+
} else {
|
|
1415
|
+
_this12.dto.RetailPaymentDetails.push({
|
|
1416
|
+
Code: _this12.paymode.counter,
|
|
1417
|
+
OrigAmount: czkSum,
|
|
1418
|
+
Amount: czkSum,
|
|
1419
|
+
IdsettleStyle: themode.idSettleStyle,
|
|
1420
|
+
IdbankAccount: themode.idBankAccount,
|
|
1421
|
+
DynamicPropertyKeys: [],
|
|
1422
|
+
DynamicPropertyValues: [],
|
|
1423
|
+
DataSource: { Id: _this12.dataSource }
|
|
1424
|
+
});
|
|
1425
|
+
}
|
|
1294
1426
|
}
|
|
1295
1427
|
});
|
|
1296
|
-
|
|
1428
|
+
_ref15 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref15.isNewRetailBCPos;
|
|
1429
|
+
|
|
1430
|
+
console.log('bc_pos\u73AF\u5883:' + isNewRetailBCPos + ',\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
|
|
1431
|
+
|
|
1432
|
+
if (!isNewRetailBCPos) {
|
|
1433
|
+
_context5.next = 20;
|
|
1434
|
+
break;
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1297
1437
|
// cc结算调用
|
|
1298
1438
|
IPMSG = {};
|
|
1299
1439
|
|
|
@@ -1301,155 +1441,52 @@ var SettlementStore = (_class = function () {
|
|
|
1301
1441
|
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1302
1442
|
}
|
|
1303
1443
|
RetailTypeEnum = this.dto.IdbusiType == 36 ? "INTEGRAL_EXCHANGE" : "NORMAL";
|
|
1304
|
-
|
|
1444
|
+
_context5.t1 = this.dto.IdbusiType == 37;
|
|
1305
1445
|
|
|
1306
|
-
if (!
|
|
1307
|
-
|
|
1446
|
+
if (!_context5.t1) {
|
|
1447
|
+
_context5.next = 13;
|
|
1308
1448
|
break;
|
|
1309
1449
|
}
|
|
1310
1450
|
|
|
1311
|
-
|
|
1451
|
+
_context5.next = 12;
|
|
1312
1452
|
return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
|
|
1313
1453
|
|
|
1314
|
-
case
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
case 11:
|
|
1318
|
-
_context4.t0 = _context4.t1;
|
|
1319
|
-
|
|
1320
|
-
if (_context4.t0) {
|
|
1321
|
-
_context4.next = 14;
|
|
1322
|
-
break;
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
_context4.t0 = this.dto.IdbusiType != 37;
|
|
1326
|
-
|
|
1327
|
-
case 14:
|
|
1328
|
-
if (!_context4.t0) {
|
|
1329
|
-
_context4.next = 33;
|
|
1330
|
-
break;
|
|
1331
|
-
}
|
|
1332
|
-
|
|
1333
|
-
dtoParams = (0, _extends3.default)({}, this.dto.cut(), { RetailOms: { RetailTypeEnum: RetailTypeEnum } });
|
|
1334
|
-
//处理存在二开支付情况
|
|
1335
|
-
|
|
1336
|
-
payList = dtoParams.RetailPaymentDetails.filter(function (v) {
|
|
1337
|
-
return v.ThirdPaymentInfo;
|
|
1338
|
-
});
|
|
1339
|
-
|
|
1340
|
-
if (!(payList && payList.length > 0)) {
|
|
1341
|
-
_context4.next = 30;
|
|
1342
|
-
break;
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
amount = payList[0].Amount;
|
|
1346
|
-
tradeType = amount > 0 ? TradeType.PAY : TradeType.REFUND;
|
|
1347
|
-
_context4.next = 22;
|
|
1348
|
-
return this.thirdPay(tradeType, dtoParams);
|
|
1349
|
-
|
|
1350
|
-
case 22:
|
|
1351
|
-
ret = _context4.sent;
|
|
1352
|
-
_ref11 = ret || {}, type = _ref11.type, data = _ref11.data, msg = _ref11.msg, code = _ref11.code;
|
|
1353
|
-
|
|
1354
|
-
if (!(type === true)) {
|
|
1355
|
-
_context4.next = 28;
|
|
1356
|
-
break;
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
|
-
dtoParams = data;
|
|
1360
|
-
_context4.next = 30;
|
|
1361
|
-
break;
|
|
1362
|
-
|
|
1363
|
-
case 28:
|
|
1364
|
-
_message2.default.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
|
|
1365
|
-
return _context4.abrupt('return', false);
|
|
1366
|
-
|
|
1367
|
-
case 30:
|
|
1368
|
-
this.dtoParams = dtoParams;
|
|
1369
|
-
console.log('结算信息:', dtoParams);
|
|
1370
|
-
return _context4.abrupt('return', (0, _tplusApi.ccApi)({ dto: dtoParams, cip: IPMSG.query || "" }, '/retail/RetailPos/settle', false, false, { method: 'post', timeout_skip: true }).then(function (resp) {
|
|
1371
|
-
var _ref12 = resp || {},
|
|
1372
|
-
ID = _ref12.ID;
|
|
1373
|
-
|
|
1374
|
-
_this11.setDtoID(ID);
|
|
1375
|
-
_this11.billID = ID;
|
|
1376
|
-
_this11.paymode.checkList = [];
|
|
1377
|
-
}));
|
|
1378
|
-
|
|
1379
|
-
case 33:
|
|
1380
|
-
case 'end':
|
|
1381
|
-
return _context4.stop();
|
|
1382
|
-
}
|
|
1383
|
-
}
|
|
1384
|
-
}, _callee4, this);
|
|
1385
|
-
}));
|
|
1386
|
-
|
|
1387
|
-
function save() {
|
|
1388
|
-
return _ref10.apply(this, arguments);
|
|
1389
|
-
}
|
|
1390
|
-
|
|
1391
|
-
return save;
|
|
1392
|
-
}()
|
|
1393
|
-
//二开支付
|
|
1394
|
-
|
|
1395
|
-
}, {
|
|
1396
|
-
key: 'thirdPay',
|
|
1397
|
-
value: function () {
|
|
1398
|
-
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(status, dto) {
|
|
1399
|
-
var params, ret, _ref14, Code, Message, Result, _ref15, ThirdPaymentReturnInfo;
|
|
1400
|
-
|
|
1401
|
-
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1402
|
-
while (1) {
|
|
1403
|
-
switch (_context5.prev = _context5.next) {
|
|
1404
|
-
case 0:
|
|
1405
|
-
params = { TradeType: status, dto: dto };
|
|
1406
|
-
|
|
1407
|
-
console.log('刷卡信息:', (0, _stringify2.default)(params));
|
|
1408
|
-
_context5.next = 4;
|
|
1409
|
-
return new _promise2.default(function (resolve, reject) {
|
|
1410
|
-
_mutantsMicrofx.nativeMs.setIpcRendererMethod('ThirdPayment', (0, _extends3.default)({}, params), function (res) {
|
|
1411
|
-
return resolve(res);
|
|
1412
|
-
});
|
|
1413
|
-
});
|
|
1414
|
-
|
|
1415
|
-
case 4:
|
|
1416
|
-
ret = _context5.sent;
|
|
1454
|
+
case 12:
|
|
1455
|
+
_context5.t1 = _context5.sent;
|
|
1417
1456
|
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
_ref14 = ret || {}, Code = _ref14.Code, Message = _ref14.Message, Result = _ref14.Result;
|
|
1457
|
+
case 13:
|
|
1458
|
+
_context5.t0 = _context5.t1;
|
|
1421
1459
|
|
|
1422
|
-
if (
|
|
1423
|
-
_context5.next =
|
|
1460
|
+
if (_context5.t0) {
|
|
1461
|
+
_context5.next = 16;
|
|
1424
1462
|
break;
|
|
1425
1463
|
}
|
|
1426
1464
|
|
|
1427
|
-
|
|
1465
|
+
_context5.t0 = this.dto.IdbusiType != 37;
|
|
1428
1466
|
|
|
1429
|
-
case
|
|
1430
|
-
if (!
|
|
1467
|
+
case 16:
|
|
1468
|
+
if (!_context5.t0) {
|
|
1431
1469
|
_context5.next = 18;
|
|
1432
1470
|
break;
|
|
1433
1471
|
}
|
|
1434
1472
|
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
}
|
|
1441
|
-
});
|
|
1442
|
-
return _context5.abrupt('return', { type: true, data: dto, msg: Message, code: Code });
|
|
1473
|
+
return _context5.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) {
|
|
1474
|
+
_this12.setDtoID(resp.ID);
|
|
1475
|
+
_this12.paymode.checkList = [];
|
|
1476
|
+
_this12.billID = resp.ID;
|
|
1477
|
+
}));
|
|
1443
1478
|
|
|
1444
1479
|
case 18:
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
break;
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
|
-
return _context5.abrupt('return', { type: true, data: dto, msg: Message, code: Code });
|
|
1480
|
+
_context5.next = 21;
|
|
1481
|
+
break;
|
|
1451
1482
|
|
|
1452
1483
|
case 20:
|
|
1484
|
+
return _context5.abrupt('return', (0, _tplusApi.tApi)({ dto: this.dto.cut() }, 'chanjet.RE.newRetail.Settle', false, false, { timeout_skip: true }).then(function (resp) {
|
|
1485
|
+
_this12.setDtoID(resp.ID);
|
|
1486
|
+
_this12.billID = resp.ID;
|
|
1487
|
+
}));
|
|
1488
|
+
|
|
1489
|
+
case 21:
|
|
1453
1490
|
case 'end':
|
|
1454
1491
|
return _context5.stop();
|
|
1455
1492
|
}
|
|
@@ -1457,77 +1494,17 @@ var SettlementStore = (_class = function () {
|
|
|
1457
1494
|
}, _callee5, this);
|
|
1458
1495
|
}));
|
|
1459
1496
|
|
|
1460
|
-
function
|
|
1497
|
+
function save() {
|
|
1461
1498
|
return _ref13.apply(this, arguments);
|
|
1462
1499
|
}
|
|
1463
1500
|
|
|
1464
|
-
return
|
|
1501
|
+
return save;
|
|
1465
1502
|
}()
|
|
1466
|
-
|
|
1467
|
-
//二开支付强制退款情况
|
|
1468
|
-
|
|
1469
1503
|
}, {
|
|
1470
|
-
key: '
|
|
1471
|
-
value: function () {
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
var dto, pay, _enumController$getEn16, TradeType;
|
|
1476
|
-
|
|
1477
|
-
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1478
|
-
while (1) {
|
|
1479
|
-
switch (_context7.prev = _context7.next) {
|
|
1480
|
-
case 0:
|
|
1481
|
-
dto = this.dtoParams;
|
|
1482
|
-
pay = dto && dto.RetailPaymentDetails.filter(function (v) {
|
|
1483
|
-
return v.ThirdPaymentInfo;
|
|
1484
|
-
});
|
|
1485
|
-
|
|
1486
|
-
if (pay && pay.length > 0) {
|
|
1487
|
-
setTimeout(function () {
|
|
1488
|
-
_message2.default.warn("支付出现异常,将发起刷卡退款。", { duration: 4.5 });
|
|
1489
|
-
}, 1000);
|
|
1490
|
-
_enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(), TradeType = _enumController$getEn16.TradeType;
|
|
1491
|
-
|
|
1492
|
-
setTimeout((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
|
|
1493
|
-
var ret, _ref18, msg;
|
|
1494
|
-
|
|
1495
|
-
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1496
|
-
while (1) {
|
|
1497
|
-
switch (_context6.prev = _context6.next) {
|
|
1498
|
-
case 0:
|
|
1499
|
-
_context6.next = 2;
|
|
1500
|
-
return _this12.thirdPay(TradeType.REFUND, dto);
|
|
1501
|
-
|
|
1502
|
-
case 2:
|
|
1503
|
-
ret = _context6.sent;
|
|
1504
|
-
_ref18 = ret || {}, msg = _ref18.msg;
|
|
1505
|
-
|
|
1506
|
-
console.log('\u5237\u5361\u652F\u4ED8\u9000\u6B3E:' + msg);
|
|
1507
|
-
|
|
1508
|
-
case 5:
|
|
1509
|
-
case 'end':
|
|
1510
|
-
return _context6.stop();
|
|
1511
|
-
}
|
|
1512
|
-
}
|
|
1513
|
-
}, _callee6, _this12);
|
|
1514
|
-
})), 4500);
|
|
1515
|
-
}
|
|
1516
|
-
|
|
1517
|
-
case 3:
|
|
1518
|
-
case 'end':
|
|
1519
|
-
return _context7.stop();
|
|
1520
|
-
}
|
|
1521
|
-
}
|
|
1522
|
-
}, _callee7, this);
|
|
1523
|
-
}));
|
|
1524
|
-
|
|
1525
|
-
function thirdPayRefund() {
|
|
1526
|
-
return _ref16.apply(this, arguments);
|
|
1527
|
-
}
|
|
1528
|
-
|
|
1529
|
-
return thirdPayRefund;
|
|
1530
|
-
}()
|
|
1504
|
+
key: 'setVoucherDate',
|
|
1505
|
+
value: function setVoucherDate() {
|
|
1506
|
+
this.dto.VoucherDate = new Date();
|
|
1507
|
+
}
|
|
1531
1508
|
}, {
|
|
1532
1509
|
key: 'setDtoID',
|
|
1533
1510
|
value: function setDtoID(id) {
|
|
@@ -1536,35 +1513,35 @@ var SettlementStore = (_class = function () {
|
|
|
1536
1513
|
}, {
|
|
1537
1514
|
key: 'querySettleResult',
|
|
1538
1515
|
value: function () {
|
|
1539
|
-
var
|
|
1540
|
-
return _regenerator2.default.wrap(function
|
|
1516
|
+
var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
|
|
1517
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1541
1518
|
while (1) {
|
|
1542
|
-
switch (
|
|
1519
|
+
switch (_context6.prev = _context6.next) {
|
|
1543
1520
|
case 0:
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1521
|
+
_context6.prev = 0;
|
|
1522
|
+
_context6.t0 = _promise2.default;
|
|
1523
|
+
_context6.next = 4;
|
|
1547
1524
|
return (0, _tplusApi.tApi)({ RetailCode: this.dto.Code }, 'chanjet.RE.newRetail.QuerySettleResult', false, false, { timeout_skip: true });
|
|
1548
1525
|
|
|
1549
1526
|
case 4:
|
|
1550
|
-
|
|
1551
|
-
return
|
|
1527
|
+
_context6.t1 = _context6.sent;
|
|
1528
|
+
return _context6.abrupt('return', _context6.t0.resolve.call(_context6.t0, _context6.t1));
|
|
1552
1529
|
|
|
1553
1530
|
case 8:
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
return
|
|
1531
|
+
_context6.prev = 8;
|
|
1532
|
+
_context6.t2 = _context6['catch'](0);
|
|
1533
|
+
return _context6.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
|
|
1557
1534
|
|
|
1558
1535
|
case 11:
|
|
1559
1536
|
case 'end':
|
|
1560
|
-
return
|
|
1537
|
+
return _context6.stop();
|
|
1561
1538
|
}
|
|
1562
1539
|
}
|
|
1563
|
-
},
|
|
1540
|
+
}, _callee6, this, [[0, 8]]);
|
|
1564
1541
|
}));
|
|
1565
1542
|
|
|
1566
1543
|
function querySettleResult() {
|
|
1567
|
-
return
|
|
1544
|
+
return _ref16.apply(this, arguments);
|
|
1568
1545
|
}
|
|
1569
1546
|
|
|
1570
1547
|
return querySettleResult;
|
|
@@ -1590,18 +1567,18 @@ var SettlementStore = (_class = function () {
|
|
|
1590
1567
|
}, {
|
|
1591
1568
|
key: 'validePwd',
|
|
1592
1569
|
value: function () {
|
|
1593
|
-
var
|
|
1594
|
-
var
|
|
1570
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(value) {
|
|
1571
|
+
var _ref18, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, cardStatusEnum, result, count, _result;
|
|
1595
1572
|
|
|
1596
|
-
return _regenerator2.default.wrap(function
|
|
1573
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1597
1574
|
while (1) {
|
|
1598
|
-
switch (
|
|
1575
|
+
switch (_context7.prev = _context7.next) {
|
|
1599
1576
|
case 0:
|
|
1600
|
-
|
|
1601
|
-
|
|
1577
|
+
_ref18 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref18.isNewRetailBCPos;
|
|
1578
|
+
_context7.prev = 1;
|
|
1602
1579
|
|
|
1603
1580
|
if (!isNewRetailBCPos) {
|
|
1604
|
-
|
|
1581
|
+
_context7.next = 33;
|
|
1605
1582
|
break;
|
|
1606
1583
|
}
|
|
1607
1584
|
|
|
@@ -1611,60 +1588,60 @@ var SettlementStore = (_class = function () {
|
|
|
1611
1588
|
memberStorageId = this.paymode.currentMode.meStorageCardId;
|
|
1612
1589
|
|
|
1613
1590
|
if (!cook2) {
|
|
1614
|
-
|
|
1591
|
+
_context7.next = 12;
|
|
1615
1592
|
break;
|
|
1616
1593
|
}
|
|
1617
1594
|
|
|
1618
1595
|
if (!cook2.hasOwnProperty(memberStorageId + "")) {
|
|
1619
|
-
|
|
1596
|
+
_context7.next = 12;
|
|
1620
1597
|
break;
|
|
1621
1598
|
}
|
|
1622
1599
|
|
|
1623
1600
|
if (!(cook2[memberStorageId] > 3)) {
|
|
1624
|
-
|
|
1601
|
+
_context7.next = 12;
|
|
1625
1602
|
break;
|
|
1626
1603
|
}
|
|
1627
1604
|
|
|
1628
1605
|
message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
|
|
1629
|
-
return
|
|
1606
|
+
return _context7.abrupt('return', _promise2.default.resolve(message));
|
|
1630
1607
|
|
|
1631
1608
|
case 12:
|
|
1632
1609
|
_paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId, cardStatusEnum = _paymode$currentMode.cardStatusEnum;
|
|
1633
1610
|
result = null;
|
|
1634
1611
|
|
|
1635
1612
|
if (!(cardTypeEnum === 'BALANCE_CARD')) {
|
|
1636
|
-
|
|
1613
|
+
_context7.next = 20;
|
|
1637
1614
|
break;
|
|
1638
1615
|
}
|
|
1639
1616
|
|
|
1640
|
-
|
|
1617
|
+
_context7.next = 17;
|
|
1641
1618
|
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
|
|
1642
1619
|
|
|
1643
1620
|
case 17:
|
|
1644
|
-
result =
|
|
1645
|
-
|
|
1621
|
+
result = _context7.sent;
|
|
1622
|
+
_context7.next = 29;
|
|
1646
1623
|
break;
|
|
1647
1624
|
|
|
1648
1625
|
case 20:
|
|
1649
1626
|
if (!(cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId)) {
|
|
1650
|
-
|
|
1627
|
+
_context7.next = 26;
|
|
1651
1628
|
break;
|
|
1652
1629
|
}
|
|
1653
1630
|
|
|
1654
|
-
|
|
1631
|
+
_context7.next = 23;
|
|
1655
1632
|
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1656
1633
|
|
|
1657
1634
|
case 23:
|
|
1658
|
-
result =
|
|
1659
|
-
|
|
1635
|
+
result = _context7.sent;
|
|
1636
|
+
_context7.next = 29;
|
|
1660
1637
|
break;
|
|
1661
1638
|
|
|
1662
1639
|
case 26:
|
|
1663
|
-
|
|
1640
|
+
_context7.next = 28;
|
|
1664
1641
|
return (0, _tplusApi.ccApi)({ password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1665
1642
|
|
|
1666
1643
|
case 28:
|
|
1667
|
-
result =
|
|
1644
|
+
result = _context7.sent;
|
|
1668
1645
|
|
|
1669
1646
|
case 29:
|
|
1670
1647
|
if (!result.data) {
|
|
@@ -1683,38 +1660,38 @@ var SettlementStore = (_class = function () {
|
|
|
1683
1660
|
this.setCookie('errorPwd', '', -1);
|
|
1684
1661
|
this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
|
|
1685
1662
|
}
|
|
1686
|
-
return
|
|
1663
|
+
return _context7.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
|
|
1687
1664
|
|
|
1688
1665
|
case 33:
|
|
1689
|
-
|
|
1666
|
+
_context7.next = 35;
|
|
1690
1667
|
return (0, _tplusApi.tApi)({ "CheckoutParams": {
|
|
1691
1668
|
"Idmember": value.id,
|
|
1692
1669
|
"Password": value.pwd
|
|
1693
1670
|
} }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
|
|
1694
1671
|
|
|
1695
1672
|
case 35:
|
|
1696
|
-
_result =
|
|
1697
|
-
return
|
|
1673
|
+
_result = _context7.sent;
|
|
1674
|
+
return _context7.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
|
|
1698
1675
|
|
|
1699
1676
|
case 37:
|
|
1700
|
-
|
|
1677
|
+
_context7.next = 42;
|
|
1701
1678
|
break;
|
|
1702
1679
|
|
|
1703
1680
|
case 39:
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
return
|
|
1681
|
+
_context7.prev = 39;
|
|
1682
|
+
_context7.t0 = _context7['catch'](1);
|
|
1683
|
+
return _context7.abrupt('return', "failed");
|
|
1707
1684
|
|
|
1708
1685
|
case 42:
|
|
1709
1686
|
case 'end':
|
|
1710
|
-
return
|
|
1687
|
+
return _context7.stop();
|
|
1711
1688
|
}
|
|
1712
1689
|
}
|
|
1713
|
-
},
|
|
1690
|
+
}, _callee7, this, [[1, 39]]);
|
|
1714
1691
|
}));
|
|
1715
1692
|
|
|
1716
|
-
function validePwd(
|
|
1717
|
-
return
|
|
1693
|
+
function validePwd(_x4) {
|
|
1694
|
+
return _ref17.apply(this, arguments);
|
|
1718
1695
|
}
|
|
1719
1696
|
|
|
1720
1697
|
return validePwd;
|
|
@@ -1753,34 +1730,34 @@ var SettlementStore = (_class = function () {
|
|
|
1753
1730
|
var _this14 = this;
|
|
1754
1731
|
|
|
1755
1732
|
return function () {
|
|
1756
|
-
var
|
|
1733
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(_this) {
|
|
1757
1734
|
var _getLoginInfo, IdStore, StoreCode, resp;
|
|
1758
1735
|
|
|
1759
|
-
return _regenerator2.default.wrap(function
|
|
1736
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1760
1737
|
while (1) {
|
|
1761
|
-
switch (
|
|
1738
|
+
switch (_context8.prev = _context8.next) {
|
|
1762
1739
|
case 0:
|
|
1763
1740
|
_getLoginInfo = _this14.getLoginInfo(), IdStore = _getLoginInfo.IdStore, StoreCode = _getLoginInfo.StoreCode;
|
|
1764
|
-
|
|
1741
|
+
_context8.next = 3;
|
|
1765
1742
|
return (0, _tplusApi.tApi)({ Idmember: _this14.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
|
|
1766
1743
|
|
|
1767
1744
|
case 3:
|
|
1768
|
-
resp =
|
|
1745
|
+
resp = _context8.sent;
|
|
1769
1746
|
|
|
1770
1747
|
_this.member = resp;
|
|
1771
1748
|
_this.paymode.updateMemberStorageCardNo(resp.StorageCardNo, resp.WalletEnabled);
|
|
1772
|
-
return
|
|
1749
|
+
return _context8.abrupt('return', _promise2.default.resolve(resp));
|
|
1773
1750
|
|
|
1774
1751
|
case 7:
|
|
1775
1752
|
case 'end':
|
|
1776
|
-
return
|
|
1753
|
+
return _context8.stop();
|
|
1777
1754
|
}
|
|
1778
1755
|
}
|
|
1779
|
-
},
|
|
1756
|
+
}, _callee8, _this14);
|
|
1780
1757
|
}));
|
|
1781
1758
|
|
|
1782
|
-
return function (
|
|
1783
|
-
return
|
|
1759
|
+
return function (_x5) {
|
|
1760
|
+
return _ref19.apply(this, arguments);
|
|
1784
1761
|
};
|
|
1785
1762
|
}();
|
|
1786
1763
|
}
|
|
@@ -1790,62 +1767,62 @@ var SettlementStore = (_class = function () {
|
|
|
1790
1767
|
var _this15 = this;
|
|
1791
1768
|
|
|
1792
1769
|
return function () {
|
|
1793
|
-
var
|
|
1770
|
+
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(memberId) {
|
|
1794
1771
|
var result;
|
|
1795
|
-
return _regenerator2.default.wrap(function
|
|
1772
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
1796
1773
|
while (1) {
|
|
1797
|
-
switch (
|
|
1774
|
+
switch (_context9.prev = _context9.next) {
|
|
1798
1775
|
case 0:
|
|
1799
|
-
|
|
1776
|
+
_context9.next = 2;
|
|
1800
1777
|
return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId + '/' + true, false, false, { method: 'get' });
|
|
1801
1778
|
|
|
1802
1779
|
case 2:
|
|
1803
|
-
result =
|
|
1780
|
+
result = _context9.sent;
|
|
1804
1781
|
|
|
1805
1782
|
if (!(result && result.data.length)) {
|
|
1806
|
-
|
|
1783
|
+
_context9.next = 20;
|
|
1807
1784
|
break;
|
|
1808
1785
|
}
|
|
1809
1786
|
|
|
1810
1787
|
if (!(result.data.length === 1)) {
|
|
1811
|
-
|
|
1788
|
+
_context9.next = 9;
|
|
1812
1789
|
break;
|
|
1813
1790
|
}
|
|
1814
1791
|
|
|
1815
1792
|
_this15.paymode.updateCardInfo(result.data[0]);
|
|
1816
|
-
return
|
|
1793
|
+
return _context9.abrupt('return', result.data);
|
|
1817
1794
|
|
|
1818
1795
|
case 9:
|
|
1819
1796
|
if (!(result.data && result.data.length === 1)) {
|
|
1820
|
-
|
|
1797
|
+
_context9.next = 14;
|
|
1821
1798
|
break;
|
|
1822
1799
|
}
|
|
1823
1800
|
|
|
1824
1801
|
_this15.paymode.updateCardInfo(result.data[0]);
|
|
1825
|
-
return
|
|
1802
|
+
return _context9.abrupt('return', result.data);
|
|
1826
1803
|
|
|
1827
1804
|
case 14:
|
|
1828
1805
|
if (!(result.data && result.data.length > 1)) {
|
|
1829
|
-
|
|
1806
|
+
_context9.next = 18;
|
|
1830
1807
|
break;
|
|
1831
1808
|
}
|
|
1832
1809
|
|
|
1833
|
-
return
|
|
1810
|
+
return _context9.abrupt('return', result.data);
|
|
1834
1811
|
|
|
1835
1812
|
case 18:
|
|
1836
1813
|
_message2.default.warn('没有可用储值卡!');
|
|
1837
|
-
return
|
|
1814
|
+
return _context9.abrupt('return', false);
|
|
1838
1815
|
|
|
1839
1816
|
case 20:
|
|
1840
1817
|
case 'end':
|
|
1841
|
-
return
|
|
1818
|
+
return _context9.stop();
|
|
1842
1819
|
}
|
|
1843
1820
|
}
|
|
1844
|
-
},
|
|
1821
|
+
}, _callee9, _this15);
|
|
1845
1822
|
}));
|
|
1846
1823
|
|
|
1847
|
-
return function (
|
|
1848
|
-
return
|
|
1824
|
+
return function (_x6) {
|
|
1825
|
+
return _ref20.apply(this, arguments);
|
|
1849
1826
|
};
|
|
1850
1827
|
}();
|
|
1851
1828
|
}
|
|
@@ -1854,30 +1831,30 @@ var SettlementStore = (_class = function () {
|
|
|
1854
1831
|
initializer: function initializer() {
|
|
1855
1832
|
var _this16 = this;
|
|
1856
1833
|
|
|
1857
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1834
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10() {
|
|
1858
1835
|
var address, result;
|
|
1859
|
-
return _regenerator2.default.wrap(function
|
|
1836
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
1860
1837
|
while (1) {
|
|
1861
|
-
switch (
|
|
1838
|
+
switch (_context10.prev = _context10.next) {
|
|
1862
1839
|
case 0:
|
|
1863
1840
|
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + _this16.paymode.currentMode.storageCardNo;
|
|
1864
|
-
|
|
1841
|
+
_context10.next = 3;
|
|
1865
1842
|
return (0, _tplusApi.ccApi)({}, address, false, false, { method: 'get', timeout_skip: true });
|
|
1866
1843
|
|
|
1867
1844
|
case 3:
|
|
1868
|
-
result =
|
|
1845
|
+
result = _context10.sent;
|
|
1869
1846
|
|
|
1870
1847
|
_this16.paymode.updateCardInfo(result.data);
|
|
1871
1848
|
|
|
1872
1849
|
case 5:
|
|
1873
1850
|
case 'end':
|
|
1874
|
-
return
|
|
1851
|
+
return _context10.stop();
|
|
1875
1852
|
}
|
|
1876
1853
|
}
|
|
1877
|
-
},
|
|
1854
|
+
}, _callee10, _this16);
|
|
1878
1855
|
}));
|
|
1879
1856
|
}
|
|
1880
|
-
}), _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);
|
|
1857
|
+
}), _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, 'setVoucherDate', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'setVoucherDate'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'setDtoID', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'setDtoID'), _class.prototype)), _class);
|
|
1881
1858
|
exports.default = SettlementStore;
|
|
1882
1859
|
var PayMode = exports.PayMode = (_class3 = function () {
|
|
1883
1860
|
//应收
|
|
@@ -1989,8 +1966,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1989
1966
|
this.checkList = [];
|
|
1990
1967
|
}
|
|
1991
1968
|
|
|
1992
|
-
var
|
|
1993
|
-
isNewRetailBCPos =
|
|
1969
|
+
var _ref22 = _mutantsUtil.platform || {},
|
|
1970
|
+
isNewRetailBCPos = _ref22.isNewRetailBCPos;
|
|
1994
1971
|
|
|
1995
1972
|
var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
|
|
1996
1973
|
PayStyle = _enumController$getEn17.PayStyle,
|
|
@@ -2100,18 +2077,18 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2100
2077
|
}
|
|
2101
2078
|
});
|
|
2102
2079
|
|
|
2103
|
-
var
|
|
2104
|
-
couponCode =
|
|
2105
|
-
name =
|
|
2106
|
-
tieredAmountResult =
|
|
2107
|
-
fromDate =
|
|
2108
|
-
dateMount =
|
|
2109
|
-
promoMethodEnum =
|
|
2110
|
-
discountPct =
|
|
2111
|
-
nominalAmount =
|
|
2112
|
-
promoId =
|
|
2113
|
-
id =
|
|
2114
|
-
doorsill =
|
|
2080
|
+
var _ref23 = element || {},
|
|
2081
|
+
couponCode = _ref23.couponCode,
|
|
2082
|
+
name = _ref23.name,
|
|
2083
|
+
tieredAmountResult = _ref23.tieredAmountResult,
|
|
2084
|
+
fromDate = _ref23.fromDate,
|
|
2085
|
+
dateMount = _ref23.dateMount,
|
|
2086
|
+
promoMethodEnum = _ref23.promoMethodEnum,
|
|
2087
|
+
discountPct = _ref23.discountPct,
|
|
2088
|
+
nominalAmount = _ref23.nominalAmount,
|
|
2089
|
+
promoId = _ref23.promoId,
|
|
2090
|
+
id = _ref23.id,
|
|
2091
|
+
doorsill = _ref23.doorsill;
|
|
2115
2092
|
|
|
2116
2093
|
var condValue = tieredAmountResult.condValue,
|
|
2117
2094
|
promoDiscount = tieredAmountResult.promoDiscount,
|
|
@@ -2155,8 +2132,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2155
2132
|
}, {
|
|
2156
2133
|
key: 'calcDjqValue',
|
|
2157
2134
|
value: function calcDjqValue(q1) {
|
|
2158
|
-
var
|
|
2159
|
-
isNewRetailBCPos =
|
|
2135
|
+
var _ref24 = _mutantsUtil.platform || {},
|
|
2136
|
+
isNewRetailBCPos = _ref24.isNewRetailBCPos;
|
|
2160
2137
|
|
|
2161
2138
|
var _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(),
|
|
2162
2139
|
Differentiate = _enumController$getEn18.Differentiate;
|
|
@@ -2246,29 +2223,30 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2246
2223
|
}, {
|
|
2247
2224
|
key: 'setPaymodes',
|
|
2248
2225
|
value: function () {
|
|
2249
|
-
var
|
|
2226
|
+
var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(type, isIntegralExchange) {
|
|
2250
2227
|
var _this18 = this;
|
|
2251
2228
|
|
|
2252
2229
|
var _enumController$getEn20, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
|
|
2253
2230
|
|
|
2254
|
-
return _regenerator2.default.wrap(function
|
|
2231
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
2255
2232
|
while (1) {
|
|
2256
|
-
switch (
|
|
2233
|
+
switch (_context11.prev = _context11.next) {
|
|
2257
2234
|
case 0:
|
|
2258
2235
|
_enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn20.settleStyleType, PayStyle = _enumController$getEn20.PayStyle;
|
|
2259
2236
|
memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
|
|
2260
2237
|
param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
|
|
2261
|
-
|
|
2238
|
+
_context11.next = 5;
|
|
2262
2239
|
return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
|
|
2263
2240
|
|
|
2264
2241
|
case 5:
|
|
2265
|
-
modes =
|
|
2242
|
+
modes = _context11.sent;
|
|
2266
2243
|
|
|
2267
2244
|
if (modes) {
|
|
2268
2245
|
(0, _mobx.runInAction)(function () {
|
|
2269
2246
|
var paymodes = [];
|
|
2270
2247
|
(0, _each3.default)(modes.SettleStyles, function (mode, index) {
|
|
2271
2248
|
//产品需求确认会员储值卡结算方式前端展示统一调整为“储值卡" tuzha by 2020-07-08
|
|
2249
|
+
|
|
2272
2250
|
if (mode.Code == PayStyle.hyczk) {
|
|
2273
2251
|
mode.Name = '储值卡';
|
|
2274
2252
|
}
|
|
@@ -2283,24 +2261,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2283
2261
|
idBankAccount: mode.IdBankAccount,
|
|
2284
2262
|
exchangeRate: mode.Currency ? mode.Currency.ExchangeRate : 1,
|
|
2285
2263
|
idCurrency: mode.Currency ? mode.Currency.ID : -1,
|
|
2286
|
-
calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88"
|
|
2287
|
-
thridPayment: mode.ThirdPaymentInfo
|
|
2264
|
+
calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88"
|
|
2288
2265
|
});
|
|
2289
2266
|
});
|
|
2290
2267
|
_this18.paymodes = paymodes;
|
|
2268
|
+
//modes.QuickSettleStyles
|
|
2291
2269
|
});
|
|
2292
2270
|
}
|
|
2293
2271
|
|
|
2294
2272
|
case 7:
|
|
2295
2273
|
case 'end':
|
|
2296
|
-
return
|
|
2274
|
+
return _context11.stop();
|
|
2297
2275
|
}
|
|
2298
2276
|
}
|
|
2299
|
-
},
|
|
2277
|
+
}, _callee11, this);
|
|
2300
2278
|
}));
|
|
2301
2279
|
|
|
2302
|
-
function setPaymodes(
|
|
2303
|
-
return
|
|
2280
|
+
function setPaymodes(_x7, _x8) {
|
|
2281
|
+
return _ref25.apply(this, arguments);
|
|
2304
2282
|
}
|
|
2305
2283
|
|
|
2306
2284
|
return setPaymodes;
|
|
@@ -2431,8 +2409,8 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2431
2409
|
return key == 'canusedbalancestorage';
|
|
2432
2410
|
});
|
|
2433
2411
|
|
|
2434
|
-
var
|
|
2435
|
-
isNewRetailBCPos =
|
|
2412
|
+
var _ref26 = _mutantsUtil.platform || {},
|
|
2413
|
+
isNewRetailBCPos = _ref26.isNewRetailBCPos;
|
|
2436
2414
|
|
|
2437
2415
|
(0, _mobx.runInAction)(function () {
|
|
2438
2416
|
_this22.cardNo = m.CardCode;
|