tplus-components-touch 3.26.6 → 3.26.10
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.
|
@@ -182,6 +182,40 @@ var SettlementStore = (_class = function () {
|
|
|
182
182
|
|
|
183
183
|
_initDefineProp(this, 'updateCardInfo', _descriptor4, this);
|
|
184
184
|
|
|
185
|
+
this.handleCzkData = function (m) {
|
|
186
|
+
if (!m || !m.StorageCardNo) {
|
|
187
|
+
(0, _mobx.runInAction)(function () {
|
|
188
|
+
_this2.paymode.currentMode.errinfo = "无效的会员卡号";
|
|
189
|
+
});
|
|
190
|
+
} else {
|
|
191
|
+
(0, _mobx.runInAction)(function () {
|
|
192
|
+
_this2.paymode.currentMode.errinfo = "";
|
|
193
|
+
_this2.paymode.currentMode.memberId = m.ID;
|
|
194
|
+
_this2.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this2.brefund ? _this2.paymode.receivable : Math.max(_this2.paymode.receivable, 0));
|
|
195
|
+
_this2.updateEvent();
|
|
196
|
+
var message = '';
|
|
197
|
+
var sum = (0, _reduce3.default)(_this2.paymode.thePaymodes, function (total, cur) {
|
|
198
|
+
return total + cur.value;
|
|
199
|
+
}, 0);
|
|
200
|
+
// 对于卡不用判断会员的一些信息
|
|
201
|
+
// if (global.CheckMemberStorageProcessorBlock ) {
|
|
202
|
+
// message= CheckMemberStorageProcessorBlock.execute(m);
|
|
203
|
+
// }
|
|
204
|
+
if (!String.isNullOrEmpty(message)) {
|
|
205
|
+
_this2.paymode.currentMode.errinfo = message;
|
|
206
|
+
} else if (_this2.checkReceived(_this2.paymode.currentMode, "balance")) {
|
|
207
|
+
_this2.paymode.currentMode.errinfo = "余额不足";
|
|
208
|
+
} else if (_this2.paymode.amount > 0 && parseFloat(_this2.paymode.amount) !== sum && _this2.paymode.currentMode.value == 0) {
|
|
209
|
+
_this2.paymode.currentMode.errinfo = "实收金额必须录入";
|
|
210
|
+
} else {
|
|
211
|
+
// 查询成功后将焦点移入下一个输入框
|
|
212
|
+
var nextInput = document.querySelector('.czk .received .input');
|
|
213
|
+
nextInput && nextInput.select();
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
|
|
185
219
|
this.getCouponList = function (coupon_code) {
|
|
186
220
|
var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
|
|
187
221
|
PayStyle = _enumController$getEn.PayStyle,
|
|
@@ -552,7 +586,7 @@ var SettlementStore = (_class = function () {
|
|
|
552
586
|
if (ele === "mestoragecard") {
|
|
553
587
|
balanceAmount = detail.DynamicPropertyValues[index].BalanceStorage - detail.StoragePaymentAmount;
|
|
554
588
|
storageCardNo = detail.DynamicPropertyValues[index].StorageCardNo;
|
|
555
|
-
meStorageCardId = detail.DynamicPropertyValues[index].
|
|
589
|
+
meStorageCardId = detail.DynamicPropertyValues[index].MeStorageCardId;
|
|
556
590
|
}
|
|
557
591
|
});
|
|
558
592
|
var newmode = (0, _extends3.default)({}, _this5.genNewMode(PayStyle.hyczk, false, detail.StoragePaymentAmount), {
|
|
@@ -652,42 +686,50 @@ var SettlementStore = (_class = function () {
|
|
|
652
686
|
if (isNewRetailBCPos) {
|
|
653
687
|
// address = '/member/memberProfile/FindByStorageCode/'+v;
|
|
654
688
|
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + v + '/' + true;
|
|
655
|
-
return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function (
|
|
656
|
-
var
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
689
|
+
return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function () {
|
|
690
|
+
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(result) {
|
|
691
|
+
var data, m;
|
|
692
|
+
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
693
|
+
while (1) {
|
|
694
|
+
switch (_context2.prev = _context2.next) {
|
|
695
|
+
case 0:
|
|
696
|
+
data = result.data;
|
|
697
|
+
m = data && data.length && data[0];
|
|
698
|
+
|
|
699
|
+
if (!(m.CardTypeEnum === 'BALANCE_CARD')) {
|
|
700
|
+
_context2.next = 7;
|
|
701
|
+
break;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
_this7.paymode.updateCardInfo(m);
|
|
705
|
+
_this7.handleCzkData(m);
|
|
706
|
+
_context2.next = 9;
|
|
707
|
+
break;
|
|
708
|
+
|
|
709
|
+
case 7:
|
|
710
|
+
_context2.next = 9;
|
|
711
|
+
return (0, _tplusApi.ccApi)({ dto: _this7.dto, meStorageCardId: m.MeStorageCardId }, '/retail/RetailPos/validateRetailStorageCard', false, false).then(function (result1) {
|
|
712
|
+
var data1 = result1.data ? JSON.parse(result1.data)[0] : {};
|
|
713
|
+
if (data1.enable) {
|
|
714
|
+
_this7.paymode.updateCardInfo(m);
|
|
715
|
+
_this7.handleCzkData(m);
|
|
716
|
+
} else {
|
|
717
|
+
_message2.default.warn(data1.disableReason);
|
|
718
|
+
}
|
|
719
|
+
});
|
|
720
|
+
|
|
721
|
+
case 9:
|
|
722
|
+
case 'end':
|
|
723
|
+
return _context2.stop();
|
|
724
|
+
}
|
|
687
725
|
}
|
|
688
|
-
});
|
|
689
|
-
}
|
|
690
|
-
|
|
726
|
+
}, _callee2, _this7);
|
|
727
|
+
}));
|
|
728
|
+
|
|
729
|
+
return function (_x2) {
|
|
730
|
+
return _ref9.apply(this, arguments);
|
|
731
|
+
};
|
|
732
|
+
}());
|
|
691
733
|
} else {
|
|
692
734
|
address = 'AA.DR.newRetailMember.SearchMember';
|
|
693
735
|
return (0, _tplusApi.tApi)({ SearchParams: { Key: v, IsSingleMember: true, IdStore: IdStore, StoreCode: StoreCode } }, address, false, false).then(function (result) {
|
|
@@ -1003,80 +1045,80 @@ var SettlementStore = (_class = function () {
|
|
|
1003
1045
|
}, {
|
|
1004
1046
|
key: 'commit',
|
|
1005
1047
|
value: function () {
|
|
1006
|
-
var
|
|
1007
|
-
var
|
|
1048
|
+
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(bTest) {
|
|
1049
|
+
var _ref11, isNewRetailBCPos;
|
|
1008
1050
|
|
|
1009
|
-
return _regenerator2.default.wrap(function
|
|
1051
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
1010
1052
|
while (1) {
|
|
1011
|
-
switch (
|
|
1053
|
+
switch (_context3.prev = _context3.next) {
|
|
1012
1054
|
case 0:
|
|
1013
1055
|
console.log('settlementStore.commit开始,参数:' + bTest);
|
|
1014
1056
|
|
|
1015
1057
|
if (!bTest) {
|
|
1016
|
-
|
|
1058
|
+
_context3.next = 3;
|
|
1017
1059
|
break;
|
|
1018
1060
|
}
|
|
1019
1061
|
|
|
1020
|
-
return
|
|
1062
|
+
return _context3.abrupt('return', _promise2.default.resolve(true));
|
|
1021
1063
|
|
|
1022
1064
|
case 3:
|
|
1023
|
-
|
|
1024
|
-
|
|
1065
|
+
_ref11 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref11.isNewRetailBCPos;
|
|
1066
|
+
_context3.prev = 4;
|
|
1025
1067
|
|
|
1026
1068
|
if (!(this.type == 1)) {
|
|
1027
|
-
|
|
1069
|
+
_context3.next = 10;
|
|
1028
1070
|
break;
|
|
1029
1071
|
}
|
|
1030
1072
|
|
|
1031
|
-
|
|
1073
|
+
_context3.next = 8;
|
|
1032
1074
|
return this.saveMember();
|
|
1033
1075
|
|
|
1034
1076
|
case 8:
|
|
1035
|
-
|
|
1077
|
+
_context3.next = 18;
|
|
1036
1078
|
break;
|
|
1037
1079
|
|
|
1038
1080
|
case 10:
|
|
1039
1081
|
if (!isNewRetailBCPos) {
|
|
1040
|
-
|
|
1082
|
+
_context3.next = 13;
|
|
1041
1083
|
break;
|
|
1042
1084
|
}
|
|
1043
1085
|
|
|
1044
|
-
|
|
1086
|
+
_context3.next = 13;
|
|
1045
1087
|
return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
|
|
1046
1088
|
|
|
1047
1089
|
case 13:
|
|
1048
|
-
|
|
1090
|
+
_context3.next = 15;
|
|
1049
1091
|
return this.save();
|
|
1050
1092
|
|
|
1051
1093
|
case 15:
|
|
1052
1094
|
if (!isNewRetailBCPos) {
|
|
1053
|
-
|
|
1095
|
+
_context3.next = 18;
|
|
1054
1096
|
break;
|
|
1055
1097
|
}
|
|
1056
1098
|
|
|
1057
|
-
|
|
1099
|
+
_context3.next = 18;
|
|
1058
1100
|
return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
|
|
1059
1101
|
|
|
1060
1102
|
case 18:
|
|
1061
|
-
return
|
|
1103
|
+
return _context3.abrupt('return', _promise2.default.resolve(true));
|
|
1062
1104
|
|
|
1063
1105
|
case 21:
|
|
1064
|
-
|
|
1065
|
-
|
|
1106
|
+
_context3.prev = 21;
|
|
1107
|
+
_context3.t0 = _context3['catch'](4);
|
|
1066
1108
|
|
|
1067
|
-
console.error('settlementStore.commit失败,错误信息:' +
|
|
1068
|
-
return
|
|
1109
|
+
console.error('settlementStore.commit失败,错误信息:' + _context3.t0);
|
|
1110
|
+
return _context3.abrupt('return', _promise2.default.resolve(_context3.t0));
|
|
1069
1111
|
|
|
1070
1112
|
case 25:
|
|
1071
1113
|
case 'end':
|
|
1072
|
-
return
|
|
1114
|
+
return _context3.stop();
|
|
1073
1115
|
}
|
|
1074
1116
|
}
|
|
1075
|
-
},
|
|
1117
|
+
}, _callee3, this, [[4, 21]]);
|
|
1076
1118
|
}));
|
|
1077
1119
|
|
|
1078
|
-
function commit(
|
|
1079
|
-
return
|
|
1120
|
+
function commit(_x3) {
|
|
1121
|
+
return _ref10.apply(this, arguments);
|
|
1080
1122
|
}
|
|
1081
1123
|
|
|
1082
1124
|
return commit;
|
|
@@ -1134,14 +1176,14 @@ var SettlementStore = (_class = function () {
|
|
|
1134
1176
|
}, {
|
|
1135
1177
|
key: 'save',
|
|
1136
1178
|
value: function () {
|
|
1137
|
-
var
|
|
1179
|
+
var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
|
1138
1180
|
var _this11 = this;
|
|
1139
1181
|
|
|
1140
|
-
var _enumController$getEn14, PayStyle,
|
|
1182
|
+
var _enumController$getEn14, PayStyle, _ref14, isNewRetailBCPos, IPMSG, RetailTypeEnum;
|
|
1141
1183
|
|
|
1142
|
-
return _regenerator2.default.wrap(function
|
|
1184
|
+
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
1143
1185
|
while (1) {
|
|
1144
|
-
switch (
|
|
1186
|
+
switch (_context4.prev = _context4.next) {
|
|
1145
1187
|
case 0:
|
|
1146
1188
|
_enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn14.PayStyle;
|
|
1147
1189
|
|
|
@@ -1150,7 +1192,6 @@ var SettlementStore = (_class = function () {
|
|
|
1150
1192
|
_this11.dto.RetailStorageDetails = [];
|
|
1151
1193
|
_this11.dto.RetailCouponDetails = [];
|
|
1152
1194
|
var czkSum = 0;
|
|
1153
|
-
var Idmember = _this11.dto.Idmember;
|
|
1154
1195
|
var count = 0;
|
|
1155
1196
|
var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
|
|
1156
1197
|
return parseFloat(mode.value) != 0;
|
|
@@ -1158,9 +1199,6 @@ var SettlementStore = (_class = function () {
|
|
|
1158
1199
|
(0, _each3.default)(thePaymodes, function (mode, index) {
|
|
1159
1200
|
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1160
1201
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
1161
|
-
if (!Idmember) {
|
|
1162
|
-
Idmember = mode.memberId;
|
|
1163
|
-
}
|
|
1164
1202
|
czkSum = Math.Add(czkSum, mode.value);
|
|
1165
1203
|
_this11.dto.RetailStorageDetails.push({
|
|
1166
1204
|
Code: mode.paymethodId,
|
|
@@ -1216,8 +1254,8 @@ var SettlementStore = (_class = function () {
|
|
|
1216
1254
|
}
|
|
1217
1255
|
});
|
|
1218
1256
|
|
|
1219
|
-
var
|
|
1220
|
-
isNewRetailBCPos =
|
|
1257
|
+
var _ref13 = _mutantsUtil.platform || {},
|
|
1258
|
+
isNewRetailBCPos = _ref13.isNewRetailBCPos;
|
|
1221
1259
|
|
|
1222
1260
|
if (_this11.dto.RetailStorageDetails.length > 0) {
|
|
1223
1261
|
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
|
|
@@ -1245,15 +1283,14 @@ var SettlementStore = (_class = function () {
|
|
|
1245
1283
|
DataSource: { Id: _this11.dataSource }
|
|
1246
1284
|
});
|
|
1247
1285
|
}
|
|
1248
|
-
_this11.dto.Idmember = Idmember;
|
|
1249
1286
|
}
|
|
1250
1287
|
});
|
|
1251
|
-
|
|
1288
|
+
_ref14 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref14.isNewRetailBCPos;
|
|
1252
1289
|
|
|
1253
1290
|
console.log('bc_pos\u73AF\u5883:' + isNewRetailBCPos + ',\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
|
|
1254
1291
|
|
|
1255
1292
|
if (!isNewRetailBCPos) {
|
|
1256
|
-
|
|
1293
|
+
_context4.next = 20;
|
|
1257
1294
|
break;
|
|
1258
1295
|
}
|
|
1259
1296
|
|
|
@@ -1264,61 +1301,61 @@ var SettlementStore = (_class = function () {
|
|
|
1264
1301
|
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1265
1302
|
}
|
|
1266
1303
|
RetailTypeEnum = this.dto.IdbusiType == 36 ? "INTEGRAL_EXCHANGE" : "NORMAL";
|
|
1267
|
-
|
|
1304
|
+
_context4.t1 = this.dto.IdbusiType == 37;
|
|
1268
1305
|
|
|
1269
|
-
if (!
|
|
1270
|
-
|
|
1306
|
+
if (!_context4.t1) {
|
|
1307
|
+
_context4.next = 13;
|
|
1271
1308
|
break;
|
|
1272
1309
|
}
|
|
1273
1310
|
|
|
1274
|
-
|
|
1311
|
+
_context4.next = 12;
|
|
1275
1312
|
return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
|
|
1276
1313
|
|
|
1277
1314
|
case 12:
|
|
1278
|
-
|
|
1315
|
+
_context4.t1 = _context4.sent;
|
|
1279
1316
|
|
|
1280
1317
|
case 13:
|
|
1281
|
-
|
|
1318
|
+
_context4.t0 = _context4.t1;
|
|
1282
1319
|
|
|
1283
|
-
if (
|
|
1284
|
-
|
|
1320
|
+
if (_context4.t0) {
|
|
1321
|
+
_context4.next = 16;
|
|
1285
1322
|
break;
|
|
1286
1323
|
}
|
|
1287
1324
|
|
|
1288
|
-
|
|
1325
|
+
_context4.t0 = this.dto.IdbusiType != 37;
|
|
1289
1326
|
|
|
1290
1327
|
case 16:
|
|
1291
|
-
if (!
|
|
1292
|
-
|
|
1328
|
+
if (!_context4.t0) {
|
|
1329
|
+
_context4.next = 18;
|
|
1293
1330
|
break;
|
|
1294
1331
|
}
|
|
1295
1332
|
|
|
1296
|
-
return
|
|
1333
|
+
return _context4.abrupt('return', (0, _tplusApi.ccApi)({ dto: (0, _extends3.default)({}, this.dto.cut(), { RetailOms: { RetailTypeEnum: RetailTypeEnum } }), cip: IPMSG.query || "" }, '/retail/RetailPos/settle', false, false, { method: 'post', timeout_skip: true }).then(function (resp) {
|
|
1297
1334
|
_this11.setDtoID(resp.ID);
|
|
1298
1335
|
_this11.paymode.checkList = [];
|
|
1299
1336
|
_this11.billID = resp.ID;
|
|
1300
1337
|
}));
|
|
1301
1338
|
|
|
1302
1339
|
case 18:
|
|
1303
|
-
|
|
1340
|
+
_context4.next = 21;
|
|
1304
1341
|
break;
|
|
1305
1342
|
|
|
1306
1343
|
case 20:
|
|
1307
|
-
return
|
|
1344
|
+
return _context4.abrupt('return', (0, _tplusApi.tApi)({ dto: this.dto.cut() }, 'chanjet.RE.newRetail.Settle', false, false, { timeout_skip: true }).then(function (resp) {
|
|
1308
1345
|
_this11.setDtoID(resp.ID);
|
|
1309
1346
|
_this11.billID = resp.ID;
|
|
1310
1347
|
}));
|
|
1311
1348
|
|
|
1312
1349
|
case 21:
|
|
1313
1350
|
case 'end':
|
|
1314
|
-
return
|
|
1351
|
+
return _context4.stop();
|
|
1315
1352
|
}
|
|
1316
1353
|
}
|
|
1317
|
-
},
|
|
1354
|
+
}, _callee4, this);
|
|
1318
1355
|
}));
|
|
1319
1356
|
|
|
1320
1357
|
function save() {
|
|
1321
|
-
return
|
|
1358
|
+
return _ref12.apply(this, arguments);
|
|
1322
1359
|
}
|
|
1323
1360
|
|
|
1324
1361
|
return save;
|
|
@@ -1331,35 +1368,35 @@ var SettlementStore = (_class = function () {
|
|
|
1331
1368
|
}, {
|
|
1332
1369
|
key: 'querySettleResult',
|
|
1333
1370
|
value: function () {
|
|
1334
|
-
var
|
|
1335
|
-
return _regenerator2.default.wrap(function
|
|
1371
|
+
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1372
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1336
1373
|
while (1) {
|
|
1337
|
-
switch (
|
|
1374
|
+
switch (_context5.prev = _context5.next) {
|
|
1338
1375
|
case 0:
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1376
|
+
_context5.prev = 0;
|
|
1377
|
+
_context5.t0 = _promise2.default;
|
|
1378
|
+
_context5.next = 4;
|
|
1342
1379
|
return (0, _tplusApi.tApi)({ RetailCode: this.dto.Code }, 'chanjet.RE.newRetail.QuerySettleResult', false, false, { timeout_skip: true });
|
|
1343
1380
|
|
|
1344
1381
|
case 4:
|
|
1345
|
-
|
|
1346
|
-
return
|
|
1382
|
+
_context5.t1 = _context5.sent;
|
|
1383
|
+
return _context5.abrupt('return', _context5.t0.resolve.call(_context5.t0, _context5.t1));
|
|
1347
1384
|
|
|
1348
1385
|
case 8:
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
return
|
|
1386
|
+
_context5.prev = 8;
|
|
1387
|
+
_context5.t2 = _context5['catch'](0);
|
|
1388
|
+
return _context5.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
|
|
1352
1389
|
|
|
1353
1390
|
case 11:
|
|
1354
1391
|
case 'end':
|
|
1355
|
-
return
|
|
1392
|
+
return _context5.stop();
|
|
1356
1393
|
}
|
|
1357
1394
|
}
|
|
1358
|
-
},
|
|
1395
|
+
}, _callee5, this, [[0, 8]]);
|
|
1359
1396
|
}));
|
|
1360
1397
|
|
|
1361
1398
|
function querySettleResult() {
|
|
1362
|
-
return
|
|
1399
|
+
return _ref15.apply(this, arguments);
|
|
1363
1400
|
}
|
|
1364
1401
|
|
|
1365
1402
|
return querySettleResult;
|
|
@@ -1385,18 +1422,18 @@ var SettlementStore = (_class = function () {
|
|
|
1385
1422
|
}, {
|
|
1386
1423
|
key: 'validePwd',
|
|
1387
1424
|
value: function () {
|
|
1388
|
-
var
|
|
1389
|
-
var
|
|
1425
|
+
var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(value) {
|
|
1426
|
+
var _ref17, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, result, count, _result;
|
|
1390
1427
|
|
|
1391
|
-
return _regenerator2.default.wrap(function
|
|
1428
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1392
1429
|
while (1) {
|
|
1393
|
-
switch (
|
|
1430
|
+
switch (_context6.prev = _context6.next) {
|
|
1394
1431
|
case 0:
|
|
1395
|
-
|
|
1396
|
-
|
|
1432
|
+
_ref17 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref17.isNewRetailBCPos;
|
|
1433
|
+
_context6.prev = 1;
|
|
1397
1434
|
|
|
1398
1435
|
if (!isNewRetailBCPos) {
|
|
1399
|
-
|
|
1436
|
+
_context6.next = 27;
|
|
1400
1437
|
break;
|
|
1401
1438
|
}
|
|
1402
1439
|
|
|
@@ -1406,46 +1443,46 @@ var SettlementStore = (_class = function () {
|
|
|
1406
1443
|
memberStorageId = this.paymode.currentMode.meStorageCardId;
|
|
1407
1444
|
|
|
1408
1445
|
if (!cook2) {
|
|
1409
|
-
|
|
1446
|
+
_context6.next = 12;
|
|
1410
1447
|
break;
|
|
1411
1448
|
}
|
|
1412
1449
|
|
|
1413
1450
|
if (!cook2.hasOwnProperty(memberStorageId + "")) {
|
|
1414
|
-
|
|
1451
|
+
_context6.next = 12;
|
|
1415
1452
|
break;
|
|
1416
1453
|
}
|
|
1417
1454
|
|
|
1418
1455
|
if (!(cook2[memberStorageId] > 3)) {
|
|
1419
|
-
|
|
1456
|
+
_context6.next = 12;
|
|
1420
1457
|
break;
|
|
1421
1458
|
}
|
|
1422
1459
|
|
|
1423
1460
|
message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
|
|
1424
|
-
return
|
|
1461
|
+
return _context6.abrupt('return', _promise2.default.resolve(message));
|
|
1425
1462
|
|
|
1426
1463
|
case 12:
|
|
1427
1464
|
_paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId;
|
|
1428
1465
|
result = null;
|
|
1429
1466
|
|
|
1430
1467
|
if (!(cardTypeEnum === 'BALANCE_CARD')) {
|
|
1431
|
-
|
|
1468
|
+
_context6.next = 20;
|
|
1432
1469
|
break;
|
|
1433
1470
|
}
|
|
1434
1471
|
|
|
1435
|
-
|
|
1472
|
+
_context6.next = 17;
|
|
1436
1473
|
return (0, _tplusApi.ccApi)({ password: _tplusApi.User.pwdEncrypt(value.pwd), cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
|
|
1437
1474
|
|
|
1438
1475
|
case 17:
|
|
1439
|
-
result =
|
|
1440
|
-
|
|
1476
|
+
result = _context6.sent;
|
|
1477
|
+
_context6.next = 23;
|
|
1441
1478
|
break;
|
|
1442
1479
|
|
|
1443
1480
|
case 20:
|
|
1444
|
-
|
|
1481
|
+
_context6.next = 22;
|
|
1445
1482
|
return (0, _tplusApi.ccApi)({ password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1446
1483
|
|
|
1447
1484
|
case 22:
|
|
1448
|
-
result =
|
|
1485
|
+
result = _context6.sent;
|
|
1449
1486
|
|
|
1450
1487
|
case 23:
|
|
1451
1488
|
if (!result.data) {
|
|
@@ -1464,38 +1501,38 @@ var SettlementStore = (_class = function () {
|
|
|
1464
1501
|
this.setCookie('errorPwd', '', -1);
|
|
1465
1502
|
this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
|
|
1466
1503
|
}
|
|
1467
|
-
return
|
|
1504
|
+
return _context6.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
|
|
1468
1505
|
|
|
1469
1506
|
case 27:
|
|
1470
|
-
|
|
1507
|
+
_context6.next = 29;
|
|
1471
1508
|
return (0, _tplusApi.tApi)({ "CheckoutParams": {
|
|
1472
1509
|
"Idmember": value.id,
|
|
1473
1510
|
"Password": value.pwd
|
|
1474
1511
|
} }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
|
|
1475
1512
|
|
|
1476
1513
|
case 29:
|
|
1477
|
-
_result =
|
|
1478
|
-
return
|
|
1514
|
+
_result = _context6.sent;
|
|
1515
|
+
return _context6.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
|
|
1479
1516
|
|
|
1480
1517
|
case 31:
|
|
1481
|
-
|
|
1518
|
+
_context6.next = 36;
|
|
1482
1519
|
break;
|
|
1483
1520
|
|
|
1484
1521
|
case 33:
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
return
|
|
1522
|
+
_context6.prev = 33;
|
|
1523
|
+
_context6.t0 = _context6['catch'](1);
|
|
1524
|
+
return _context6.abrupt('return', "failed");
|
|
1488
1525
|
|
|
1489
1526
|
case 36:
|
|
1490
1527
|
case 'end':
|
|
1491
|
-
return
|
|
1528
|
+
return _context6.stop();
|
|
1492
1529
|
}
|
|
1493
1530
|
}
|
|
1494
|
-
},
|
|
1531
|
+
}, _callee6, this, [[1, 33]]);
|
|
1495
1532
|
}));
|
|
1496
1533
|
|
|
1497
|
-
function validePwd(
|
|
1498
|
-
return
|
|
1534
|
+
function validePwd(_x4) {
|
|
1535
|
+
return _ref16.apply(this, arguments);
|
|
1499
1536
|
}
|
|
1500
1537
|
|
|
1501
1538
|
return validePwd;
|
|
@@ -1534,34 +1571,34 @@ var SettlementStore = (_class = function () {
|
|
|
1534
1571
|
var _this13 = this;
|
|
1535
1572
|
|
|
1536
1573
|
return function () {
|
|
1537
|
-
var
|
|
1574
|
+
var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(_this) {
|
|
1538
1575
|
var _getLoginInfo, IdStore, StoreCode, resp;
|
|
1539
1576
|
|
|
1540
|
-
return _regenerator2.default.wrap(function
|
|
1577
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1541
1578
|
while (1) {
|
|
1542
|
-
switch (
|
|
1579
|
+
switch (_context7.prev = _context7.next) {
|
|
1543
1580
|
case 0:
|
|
1544
1581
|
_getLoginInfo = _this13.getLoginInfo(), IdStore = _getLoginInfo.IdStore, StoreCode = _getLoginInfo.StoreCode;
|
|
1545
|
-
|
|
1582
|
+
_context7.next = 3;
|
|
1546
1583
|
return (0, _tplusApi.tApi)({ Idmember: _this13.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
|
|
1547
1584
|
|
|
1548
1585
|
case 3:
|
|
1549
|
-
resp =
|
|
1586
|
+
resp = _context7.sent;
|
|
1550
1587
|
|
|
1551
1588
|
_this.member = resp;
|
|
1552
|
-
_this.paymode.
|
|
1553
|
-
return
|
|
1589
|
+
_this.paymode.updateMemberStorageCardNo(resp.StorageCardNo, resp.WalletEnabled);
|
|
1590
|
+
return _context7.abrupt('return', _promise2.default.resolve(resp));
|
|
1554
1591
|
|
|
1555
1592
|
case 7:
|
|
1556
1593
|
case 'end':
|
|
1557
|
-
return
|
|
1594
|
+
return _context7.stop();
|
|
1558
1595
|
}
|
|
1559
1596
|
}
|
|
1560
|
-
},
|
|
1597
|
+
}, _callee7, _this13);
|
|
1561
1598
|
}));
|
|
1562
1599
|
|
|
1563
|
-
return function (
|
|
1564
|
-
return
|
|
1600
|
+
return function (_x5) {
|
|
1601
|
+
return _ref18.apply(this, arguments);
|
|
1565
1602
|
};
|
|
1566
1603
|
}();
|
|
1567
1604
|
}
|
|
@@ -1571,17 +1608,17 @@ var SettlementStore = (_class = function () {
|
|
|
1571
1608
|
var _this14 = this;
|
|
1572
1609
|
|
|
1573
1610
|
return function () {
|
|
1574
|
-
var
|
|
1611
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(memberId) {
|
|
1575
1612
|
var result;
|
|
1576
|
-
return _regenerator2.default.wrap(function
|
|
1613
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1577
1614
|
while (1) {
|
|
1578
|
-
switch (
|
|
1615
|
+
switch (_context8.prev = _context8.next) {
|
|
1579
1616
|
case 0:
|
|
1580
|
-
|
|
1617
|
+
_context8.next = 2;
|
|
1581
1618
|
return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId, false, false, { method: 'get' });
|
|
1582
1619
|
|
|
1583
1620
|
case 2:
|
|
1584
|
-
result =
|
|
1621
|
+
result = _context8.sent;
|
|
1585
1622
|
|
|
1586
1623
|
if (result && result.data.length) {
|
|
1587
1624
|
result.data.forEach(function (m) {
|
|
@@ -1594,14 +1631,14 @@ var SettlementStore = (_class = function () {
|
|
|
1594
1631
|
|
|
1595
1632
|
case 4:
|
|
1596
1633
|
case 'end':
|
|
1597
|
-
return
|
|
1634
|
+
return _context8.stop();
|
|
1598
1635
|
}
|
|
1599
1636
|
}
|
|
1600
|
-
},
|
|
1637
|
+
}, _callee8, _this14);
|
|
1601
1638
|
}));
|
|
1602
1639
|
|
|
1603
|
-
return function (
|
|
1604
|
-
return
|
|
1640
|
+
return function (_x6) {
|
|
1641
|
+
return _ref19.apply(this, arguments);
|
|
1605
1642
|
};
|
|
1606
1643
|
}();
|
|
1607
1644
|
}
|
|
@@ -1610,27 +1647,27 @@ var SettlementStore = (_class = function () {
|
|
|
1610
1647
|
initializer: function initializer() {
|
|
1611
1648
|
var _this15 = this;
|
|
1612
1649
|
|
|
1613
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1650
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9() {
|
|
1614
1651
|
var address, result;
|
|
1615
|
-
return _regenerator2.default.wrap(function
|
|
1652
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
1616
1653
|
while (1) {
|
|
1617
|
-
switch (
|
|
1654
|
+
switch (_context9.prev = _context9.next) {
|
|
1618
1655
|
case 0:
|
|
1619
1656
|
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + _this15.paymode.currentMode.storageCardNo;
|
|
1620
|
-
|
|
1657
|
+
_context9.next = 3;
|
|
1621
1658
|
return (0, _tplusApi.ccApi)({}, address, false, false, { method: 'get', timeout_skip: true });
|
|
1622
1659
|
|
|
1623
1660
|
case 3:
|
|
1624
|
-
result =
|
|
1661
|
+
result = _context9.sent;
|
|
1625
1662
|
|
|
1626
1663
|
_this15.paymode.updateCardInfo(result.data);
|
|
1627
1664
|
|
|
1628
1665
|
case 5:
|
|
1629
1666
|
case 'end':
|
|
1630
|
-
return
|
|
1667
|
+
return _context9.stop();
|
|
1631
1668
|
}
|
|
1632
1669
|
}
|
|
1633
|
-
},
|
|
1670
|
+
}, _callee9, _this15);
|
|
1634
1671
|
}));
|
|
1635
1672
|
}
|
|
1636
1673
|
}), _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);
|
|
@@ -1708,6 +1745,12 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1708
1745
|
this.received = (0, _utils.getFixedNumber)(sum);
|
|
1709
1746
|
this.receivable = (0, _utils.getFixedNumber)(this.amount - sum);
|
|
1710
1747
|
}
|
|
1748
|
+
}, {
|
|
1749
|
+
key: 'updateMemberStorageCardNo',
|
|
1750
|
+
value: function updateMemberStorageCardNo(storageCardNo, walletEnabled) {
|
|
1751
|
+
this.currentMode.storageCardNo = storageCardNo;
|
|
1752
|
+
this.currentMode.walletEnabled = walletEnabled;
|
|
1753
|
+
}
|
|
1711
1754
|
}, {
|
|
1712
1755
|
key: 'updateCardInfo',
|
|
1713
1756
|
value: function updateCardInfo(m) {
|
|
@@ -1737,8 +1780,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1737
1780
|
this.checkList = [];
|
|
1738
1781
|
}
|
|
1739
1782
|
|
|
1740
|
-
var
|
|
1741
|
-
isNewRetailBCPos =
|
|
1783
|
+
var _ref21 = _mutantsUtil.platform || {},
|
|
1784
|
+
isNewRetailBCPos = _ref21.isNewRetailBCPos;
|
|
1742
1785
|
|
|
1743
1786
|
var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
|
|
1744
1787
|
PayStyle = _enumController$getEn15.PayStyle,
|
|
@@ -1848,18 +1891,18 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1848
1891
|
}
|
|
1849
1892
|
});
|
|
1850
1893
|
|
|
1851
|
-
var
|
|
1852
|
-
couponCode =
|
|
1853
|
-
name =
|
|
1854
|
-
tieredAmountResult =
|
|
1855
|
-
fromDate =
|
|
1856
|
-
dateMount =
|
|
1857
|
-
promoMethodEnum =
|
|
1858
|
-
discountPct =
|
|
1859
|
-
nominalAmount =
|
|
1860
|
-
promoId =
|
|
1861
|
-
id =
|
|
1862
|
-
doorsill =
|
|
1894
|
+
var _ref22 = element || {},
|
|
1895
|
+
couponCode = _ref22.couponCode,
|
|
1896
|
+
name = _ref22.name,
|
|
1897
|
+
tieredAmountResult = _ref22.tieredAmountResult,
|
|
1898
|
+
fromDate = _ref22.fromDate,
|
|
1899
|
+
dateMount = _ref22.dateMount,
|
|
1900
|
+
promoMethodEnum = _ref22.promoMethodEnum,
|
|
1901
|
+
discountPct = _ref22.discountPct,
|
|
1902
|
+
nominalAmount = _ref22.nominalAmount,
|
|
1903
|
+
promoId = _ref22.promoId,
|
|
1904
|
+
id = _ref22.id,
|
|
1905
|
+
doorsill = _ref22.doorsill;
|
|
1863
1906
|
|
|
1864
1907
|
var condValue = tieredAmountResult.condValue,
|
|
1865
1908
|
promoDiscount = tieredAmountResult.promoDiscount,
|
|
@@ -1903,8 +1946,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1903
1946
|
}, {
|
|
1904
1947
|
key: 'calcDjqValue',
|
|
1905
1948
|
value: function calcDjqValue(q1) {
|
|
1906
|
-
var
|
|
1907
|
-
isNewRetailBCPos =
|
|
1949
|
+
var _ref23 = _mutantsUtil.platform || {},
|
|
1950
|
+
isNewRetailBCPos = _ref23.isNewRetailBCPos;
|
|
1908
1951
|
|
|
1909
1952
|
var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
|
|
1910
1953
|
Differentiate = _enumController$getEn16.Differentiate;
|
|
@@ -1994,23 +2037,23 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1994
2037
|
}, {
|
|
1995
2038
|
key: 'setPaymodes',
|
|
1996
2039
|
value: function () {
|
|
1997
|
-
var
|
|
2040
|
+
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(type, isIntegralExchange) {
|
|
1998
2041
|
var _this17 = this;
|
|
1999
2042
|
|
|
2000
2043
|
var _enumController$getEn18, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
|
|
2001
2044
|
|
|
2002
|
-
return _regenerator2.default.wrap(function
|
|
2045
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
2003
2046
|
while (1) {
|
|
2004
|
-
switch (
|
|
2047
|
+
switch (_context10.prev = _context10.next) {
|
|
2005
2048
|
case 0:
|
|
2006
2049
|
_enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn18.settleStyleType, PayStyle = _enumController$getEn18.PayStyle;
|
|
2007
2050
|
memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
|
|
2008
2051
|
param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
|
|
2009
|
-
|
|
2052
|
+
_context10.next = 5;
|
|
2010
2053
|
return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
|
|
2011
2054
|
|
|
2012
2055
|
case 5:
|
|
2013
|
-
modes =
|
|
2056
|
+
modes = _context10.sent;
|
|
2014
2057
|
|
|
2015
2058
|
if (modes) {
|
|
2016
2059
|
(0, _mobx.runInAction)(function () {
|
|
@@ -2042,14 +2085,14 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2042
2085
|
|
|
2043
2086
|
case 7:
|
|
2044
2087
|
case 'end':
|
|
2045
|
-
return
|
|
2088
|
+
return _context10.stop();
|
|
2046
2089
|
}
|
|
2047
2090
|
}
|
|
2048
|
-
},
|
|
2091
|
+
}, _callee10, this);
|
|
2049
2092
|
}));
|
|
2050
2093
|
|
|
2051
|
-
function setPaymodes(
|
|
2052
|
-
return
|
|
2094
|
+
function setPaymodes(_x7, _x8) {
|
|
2095
|
+
return _ref24.apply(this, arguments);
|
|
2053
2096
|
}
|
|
2054
2097
|
|
|
2055
2098
|
return setPaymodes;
|
|
@@ -2110,7 +2153,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2110
2153
|
_this18.checkList = [];
|
|
2111
2154
|
};
|
|
2112
2155
|
}
|
|
2113
|
-
}), _applyDecoratedDescriptor(_class3.prototype, 'updateCardInfo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'updateCardInfo'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype), _descriptor13 = _applyDecoratedDescriptor(_class3.prototype, 'setCouponNum', [_mobx.action], {
|
|
2156
|
+
}), _applyDecoratedDescriptor(_class3.prototype, 'updateMemberStorageCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'updateMemberStorageCardNo'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'updateCardInfo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'updateCardInfo'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype), _descriptor13 = _applyDecoratedDescriptor(_class3.prototype, 'setCouponNum', [_mobx.action], {
|
|
2114
2157
|
enumerable: true,
|
|
2115
2158
|
initializer: function initializer() {
|
|
2116
2159
|
var _this19 = this;
|
|
@@ -2180,8 +2223,8 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2180
2223
|
return key == 'canusedbalancestorage';
|
|
2181
2224
|
});
|
|
2182
2225
|
|
|
2183
|
-
var
|
|
2184
|
-
isNewRetailBCPos =
|
|
2226
|
+
var _ref25 = _mutantsUtil.platform || {},
|
|
2227
|
+
isNewRetailBCPos = _ref25.isNewRetailBCPos;
|
|
2185
2228
|
|
|
2186
2229
|
(0, _mobx.runInAction)(function () {
|
|
2187
2230
|
_this21.cardNo = m.CardCode;
|