tplus-components-touch 3.32.7 → 3.33.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/settlement/settlement.js +308 -243
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlementStore.js +247 -383
- 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;
|
|
@@ -910,7 +909,6 @@ var SettlementStore = (_class = function () {
|
|
|
910
909
|
name: themode.name,
|
|
911
910
|
exchangeRate: themode.exchangeRate,
|
|
912
911
|
calDirection: themode.calDirection,
|
|
913
|
-
thridPayment: themode.thridPayment,
|
|
914
912
|
value: value,
|
|
915
913
|
value2: (0, _utils.getFixedNumber)(themode.calDirection == "88" ? value / themode.exchangeRate : value * themode.exchangeRate),
|
|
916
914
|
value3: value,
|
|
@@ -939,7 +937,7 @@ var SettlementStore = (_class = function () {
|
|
|
939
937
|
if (type == PayStyle.hyczk || type == PayStyle.jfdx || type == PayStyle.djq) {
|
|
940
938
|
this.setMaxAmount(type, mode);
|
|
941
939
|
}
|
|
942
|
-
console.log(
|
|
940
|
+
console.log(mode);
|
|
943
941
|
return mode;
|
|
944
942
|
}
|
|
945
943
|
}, {
|
|
@@ -976,6 +974,15 @@ var SettlementStore = (_class = function () {
|
|
|
976
974
|
key: 'changeFocusOnly',
|
|
977
975
|
value: function changeFocusOnly(type) {
|
|
978
976
|
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
|
+
// }
|
|
979
986
|
}
|
|
980
987
|
}, {
|
|
981
988
|
key: 'changeClickFocusOnly',
|
|
@@ -1037,13 +1044,6 @@ var SettlementStore = (_class = function () {
|
|
|
1037
1044
|
var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
|
|
1038
1045
|
PayStyle = _enumController$getEn12.PayStyle;
|
|
1039
1046
|
|
|
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
1047
|
var pos = this.paymode.thePaymodes.length;
|
|
1048
1048
|
if (type == PayStyle.hyczk) {
|
|
1049
1049
|
var index = (0, _findLastIndex3.default)(this.paymode.thePaymodes, function (m) {
|
|
@@ -1051,6 +1051,8 @@ var SettlementStore = (_class = function () {
|
|
|
1051
1051
|
});
|
|
1052
1052
|
pos = index == -1 ? pos : index + 1;
|
|
1053
1053
|
}
|
|
1054
|
+
// this.paymode.thePaymodes.push(this.genNewMode(type) );
|
|
1055
|
+
|
|
1054
1056
|
this.paymode.thePaymodes.splice(pos, 0, this.genNewMode(type, this.newStyle && type == PayStyle.hyczk, undefined, isQuick));
|
|
1055
1057
|
this.paymode.calcReserved();
|
|
1056
1058
|
}
|
|
@@ -1070,7 +1072,8 @@ var SettlementStore = (_class = function () {
|
|
|
1070
1072
|
key: 'commit',
|
|
1071
1073
|
value: function () {
|
|
1072
1074
|
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(bTest) {
|
|
1073
|
-
var
|
|
1075
|
+
var _ref10, isNewRetailBCPos;
|
|
1076
|
+
|
|
1074
1077
|
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
1075
1078
|
while (1) {
|
|
1076
1079
|
switch (_context3.prev = _context3.next) {
|
|
@@ -1085,39 +1088,40 @@ var SettlementStore = (_class = function () {
|
|
|
1085
1088
|
return _context3.abrupt('return', _promise2.default.resolve(true));
|
|
1086
1089
|
|
|
1087
1090
|
case 3:
|
|
1088
|
-
|
|
1091
|
+
_ref10 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref10.isNewRetailBCPos;
|
|
1092
|
+
_context3.prev = 4;
|
|
1089
1093
|
|
|
1090
1094
|
if (!(this.type == 1)) {
|
|
1091
|
-
_context3.next =
|
|
1095
|
+
_context3.next = 10;
|
|
1092
1096
|
break;
|
|
1093
1097
|
}
|
|
1094
1098
|
|
|
1095
|
-
_context3.next =
|
|
1099
|
+
_context3.next = 8;
|
|
1096
1100
|
return this.saveMember();
|
|
1097
1101
|
|
|
1098
|
-
case
|
|
1102
|
+
case 8:
|
|
1099
1103
|
_context3.next = 18;
|
|
1100
1104
|
break;
|
|
1101
1105
|
|
|
1102
|
-
case
|
|
1103
|
-
|
|
1104
|
-
|
|
1106
|
+
case 10:
|
|
1107
|
+
if (!isNewRetailBCPos) {
|
|
1108
|
+
_context3.next = 13;
|
|
1109
|
+
break;
|
|
1110
|
+
}
|
|
1105
1111
|
|
|
1106
|
-
case 11:
|
|
1107
1112
|
_context3.next = 13;
|
|
1108
|
-
return this.
|
|
1113
|
+
return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
|
|
1109
1114
|
|
|
1110
1115
|
case 13:
|
|
1111
|
-
|
|
1116
|
+
_context3.next = 15;
|
|
1117
|
+
return this.save();
|
|
1112
1118
|
|
|
1113
|
-
|
|
1114
|
-
|
|
1119
|
+
case 15:
|
|
1120
|
+
if (!isNewRetailBCPos) {
|
|
1121
|
+
_context3.next = 18;
|
|
1115
1122
|
break;
|
|
1116
1123
|
}
|
|
1117
1124
|
|
|
1118
|
-
return _context3.abrupt('return', _promise2.default.resolve(false));
|
|
1119
|
-
|
|
1120
|
-
case 16:
|
|
1121
1125
|
_context3.next = 18;
|
|
1122
1126
|
return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
|
|
1123
1127
|
|
|
@@ -1126,19 +1130,17 @@ var SettlementStore = (_class = function () {
|
|
|
1126
1130
|
|
|
1127
1131
|
case 21:
|
|
1128
1132
|
_context3.prev = 21;
|
|
1129
|
-
_context3.t0 = _context3['catch'](
|
|
1133
|
+
_context3.t0 = _context3['catch'](4);
|
|
1130
1134
|
|
|
1131
1135
|
console.error('settlementStore.commit失败,错误信息:' + _context3.t0);
|
|
1132
|
-
//其他支付失败时,处理二开支付情况。
|
|
1133
|
-
this.thirdPayRefund();
|
|
1134
1136
|
return _context3.abrupt('return', _promise2.default.resolve(_context3.t0));
|
|
1135
1137
|
|
|
1136
|
-
case
|
|
1138
|
+
case 25:
|
|
1137
1139
|
case 'end':
|
|
1138
1140
|
return _context3.stop();
|
|
1139
1141
|
}
|
|
1140
1142
|
}
|
|
1141
|
-
}, _callee3, this, [[
|
|
1143
|
+
}, _callee3, this, [[4, 21]]);
|
|
1142
1144
|
}));
|
|
1143
1145
|
|
|
1144
1146
|
function commit(_x3) {
|
|
@@ -1200,16 +1202,16 @@ var SettlementStore = (_class = function () {
|
|
|
1200
1202
|
}, {
|
|
1201
1203
|
key: 'save',
|
|
1202
1204
|
value: function () {
|
|
1203
|
-
var
|
|
1205
|
+
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
|
1204
1206
|
var _this11 = this;
|
|
1205
1207
|
|
|
1206
|
-
var _enumController$getEn15, PayStyle,
|
|
1208
|
+
var _enumController$getEn15, PayStyle, _ref13, isNewRetailBCPos, IPMSG, RetailTypeEnum;
|
|
1207
1209
|
|
|
1208
1210
|
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
1209
1211
|
while (1) {
|
|
1210
1212
|
switch (_context4.prev = _context4.next) {
|
|
1211
1213
|
case 0:
|
|
1212
|
-
_enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn15.PayStyle
|
|
1214
|
+
_enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn15.PayStyle;
|
|
1213
1215
|
|
|
1214
1216
|
(0, _mobx.runInAction)(function () {
|
|
1215
1217
|
_this11.dto.RetailPaymentDetails = [];
|
|
@@ -1257,8 +1259,7 @@ var SettlementStore = (_class = function () {
|
|
|
1257
1259
|
OverchargesAmount: mode.overchargesAmount,
|
|
1258
1260
|
DynamicPropertyKeys: [],
|
|
1259
1261
|
DynamicPropertyValues: [],
|
|
1260
|
-
DataSource: { Id: _this11.dataSource }
|
|
1261
|
-
ThirdPaymentInfo: themode.thridPayment || null
|
|
1262
|
+
DataSource: { Id: _this11.dataSource }
|
|
1262
1263
|
});
|
|
1263
1264
|
if (mode.paymentType == PayStyle.djq) {
|
|
1264
1265
|
(0, _each3.default)(_this11.paymode.checkList && _this11.paymode.checkList.length ? _this11.paymode.checkList : mode.djqs, function (djq) {
|
|
@@ -1278,22 +1279,47 @@ var SettlementStore = (_class = function () {
|
|
|
1278
1279
|
}
|
|
1279
1280
|
}
|
|
1280
1281
|
});
|
|
1282
|
+
|
|
1283
|
+
var _ref12 = _mutantsUtil.platform || {},
|
|
1284
|
+
isNewRetailBCPos = _ref12.isNewRetailBCPos;
|
|
1285
|
+
|
|
1281
1286
|
if (_this11.dto.RetailStorageDetails.length > 0) {
|
|
1282
1287
|
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1288
|
+
if (isNewRetailBCPos) {
|
|
1289
|
+
_this11.dto.RetailPaymentDetails.push({
|
|
1290
|
+
Code: _this11.paymode.counter,
|
|
1291
|
+
OrigAmount: czkSum,
|
|
1292
|
+
Amount: czkSum,
|
|
1293
|
+
IdsettleStyle: themode.idSettleStyle,
|
|
1294
|
+
IdbankAccount: themode.idBankAccount,
|
|
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
|
+
}
|
|
1294
1312
|
}
|
|
1295
1313
|
});
|
|
1296
|
-
|
|
1314
|
+
_ref13 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref13.isNewRetailBCPos;
|
|
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
|
+
|
|
1297
1323
|
// cc结算调用
|
|
1298
1324
|
IPMSG = {};
|
|
1299
1325
|
|
|
@@ -1304,79 +1330,49 @@ var SettlementStore = (_class = function () {
|
|
|
1304
1330
|
_context4.t1 = this.dto.IdbusiType == 37;
|
|
1305
1331
|
|
|
1306
1332
|
if (!_context4.t1) {
|
|
1307
|
-
_context4.next =
|
|
1333
|
+
_context4.next = 13;
|
|
1308
1334
|
break;
|
|
1309
1335
|
}
|
|
1310
1336
|
|
|
1311
|
-
_context4.next =
|
|
1337
|
+
_context4.next = 12;
|
|
1312
1338
|
return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
|
|
1313
1339
|
|
|
1314
|
-
case
|
|
1340
|
+
case 12:
|
|
1315
1341
|
_context4.t1 = _context4.sent;
|
|
1316
1342
|
|
|
1317
|
-
case
|
|
1343
|
+
case 13:
|
|
1318
1344
|
_context4.t0 = _context4.t1;
|
|
1319
1345
|
|
|
1320
1346
|
if (_context4.t0) {
|
|
1321
|
-
_context4.next =
|
|
1347
|
+
_context4.next = 16;
|
|
1322
1348
|
break;
|
|
1323
1349
|
}
|
|
1324
1350
|
|
|
1325
1351
|
_context4.t0 = this.dto.IdbusiType != 37;
|
|
1326
1352
|
|
|
1327
|
-
case
|
|
1353
|
+
case 16:
|
|
1328
1354
|
if (!_context4.t0) {
|
|
1329
|
-
_context4.next =
|
|
1355
|
+
_context4.next = 18;
|
|
1330
1356
|
break;
|
|
1331
1357
|
}
|
|
1332
1358
|
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
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
|
-
}
|
|
1359
|
+
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) {
|
|
1360
|
+
_this11.setDtoID(resp.ID);
|
|
1361
|
+
_this11.paymode.checkList = [];
|
|
1362
|
+
_this11.billID = resp.ID;
|
|
1363
|
+
}));
|
|
1358
1364
|
|
|
1359
|
-
|
|
1360
|
-
_context4.next =
|
|
1365
|
+
case 18:
|
|
1366
|
+
_context4.next = 21;
|
|
1361
1367
|
break;
|
|
1362
1368
|
|
|
1363
|
-
case
|
|
1364
|
-
|
|
1365
|
-
|
|
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 = [];
|
|
1369
|
+
case 20:
|
|
1370
|
+
return _context4.abrupt('return', (0, _tplusApi.tApi)({ dto: this.dto.cut() }, 'chanjet.RE.newRetail.Settle', false, false, { timeout_skip: true }).then(function (resp) {
|
|
1371
|
+
_this11.setDtoID(resp.ID);
|
|
1372
|
+
_this11.billID = resp.ID;
|
|
1377
1373
|
}));
|
|
1378
1374
|
|
|
1379
|
-
case
|
|
1375
|
+
case 21:
|
|
1380
1376
|
case 'end':
|
|
1381
1377
|
return _context4.stop();
|
|
1382
1378
|
}
|
|
@@ -1385,149 +1381,16 @@ var SettlementStore = (_class = function () {
|
|
|
1385
1381
|
}));
|
|
1386
1382
|
|
|
1387
1383
|
function save() {
|
|
1388
|
-
return
|
|
1384
|
+
return _ref11.apply(this, arguments);
|
|
1389
1385
|
}
|
|
1390
1386
|
|
|
1391
1387
|
return save;
|
|
1392
1388
|
}()
|
|
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;
|
|
1417
|
-
|
|
1418
|
-
console.log('刷卡返回信息:', ret);
|
|
1419
|
-
ret = JSON.parse(ret);
|
|
1420
|
-
_ref14 = ret || {}, Code = _ref14.Code, Message = _ref14.Message, Result = _ref14.Result;
|
|
1421
|
-
|
|
1422
|
-
if (!(Code > 0)) {
|
|
1423
|
-
_context5.next = 12;
|
|
1424
|
-
break;
|
|
1425
|
-
}
|
|
1426
|
-
|
|
1427
|
-
return _context5.abrupt('return', { type: false, data: null, msg: Message, code: Code });
|
|
1428
|
-
|
|
1429
|
-
case 12:
|
|
1430
|
-
if (!(status == '00')) {
|
|
1431
|
-
_context5.next = 18;
|
|
1432
|
-
break;
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
|
-
_ref15 = Result || {}, ThirdPaymentReturnInfo = _ref15.ThirdPaymentReturnInfo;
|
|
1436
|
-
|
|
1437
|
-
dto.RetailPaymentDetails.forEach(function (v) {
|
|
1438
|
-
if (v.ThirdPaymentInfo != null) {
|
|
1439
|
-
v.ThirdPaymentReturnInfo = ThirdPaymentReturnInfo;
|
|
1440
|
-
}
|
|
1441
|
-
});
|
|
1442
|
-
return _context5.abrupt('return', { type: true, data: dto, msg: Message, code: Code });
|
|
1443
|
-
|
|
1444
|
-
case 18:
|
|
1445
|
-
if (!(status == '02')) {
|
|
1446
|
-
_context5.next = 20;
|
|
1447
|
-
break;
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
|
-
return _context5.abrupt('return', { type: true, data: dto, msg: Message, code: Code });
|
|
1451
|
-
|
|
1452
|
-
case 20:
|
|
1453
|
-
case 'end':
|
|
1454
|
-
return _context5.stop();
|
|
1455
|
-
}
|
|
1456
|
-
}
|
|
1457
|
-
}, _callee5, this);
|
|
1458
|
-
}));
|
|
1459
|
-
|
|
1460
|
-
function thirdPay(_x4, _x5) {
|
|
1461
|
-
return _ref13.apply(this, arguments);
|
|
1462
|
-
}
|
|
1463
|
-
|
|
1464
|
-
return thirdPay;
|
|
1465
|
-
}()
|
|
1466
|
-
|
|
1467
|
-
//二开支付强制退款情况
|
|
1468
|
-
|
|
1469
1389
|
}, {
|
|
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
|
-
}()
|
|
1390
|
+
key: 'setVoucherDate',
|
|
1391
|
+
value: function setVoucherDate() {
|
|
1392
|
+
this.dto.VoucherDate = new Date();
|
|
1393
|
+
}
|
|
1531
1394
|
}, {
|
|
1532
1395
|
key: 'setDtoID',
|
|
1533
1396
|
value: function setDtoID(id) {
|
|
@@ -1536,35 +1399,35 @@ var SettlementStore = (_class = function () {
|
|
|
1536
1399
|
}, {
|
|
1537
1400
|
key: 'querySettleResult',
|
|
1538
1401
|
value: function () {
|
|
1539
|
-
var
|
|
1540
|
-
return _regenerator2.default.wrap(function
|
|
1402
|
+
var _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1403
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1541
1404
|
while (1) {
|
|
1542
|
-
switch (
|
|
1405
|
+
switch (_context5.prev = _context5.next) {
|
|
1543
1406
|
case 0:
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1407
|
+
_context5.prev = 0;
|
|
1408
|
+
_context5.t0 = _promise2.default;
|
|
1409
|
+
_context5.next = 4;
|
|
1547
1410
|
return (0, _tplusApi.tApi)({ RetailCode: this.dto.Code }, 'chanjet.RE.newRetail.QuerySettleResult', false, false, { timeout_skip: true });
|
|
1548
1411
|
|
|
1549
1412
|
case 4:
|
|
1550
|
-
|
|
1551
|
-
return
|
|
1413
|
+
_context5.t1 = _context5.sent;
|
|
1414
|
+
return _context5.abrupt('return', _context5.t0.resolve.call(_context5.t0, _context5.t1));
|
|
1552
1415
|
|
|
1553
1416
|
case 8:
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
return
|
|
1417
|
+
_context5.prev = 8;
|
|
1418
|
+
_context5.t2 = _context5['catch'](0);
|
|
1419
|
+
return _context5.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
|
|
1557
1420
|
|
|
1558
1421
|
case 11:
|
|
1559
1422
|
case 'end':
|
|
1560
|
-
return
|
|
1423
|
+
return _context5.stop();
|
|
1561
1424
|
}
|
|
1562
1425
|
}
|
|
1563
|
-
},
|
|
1426
|
+
}, _callee5, this, [[0, 8]]);
|
|
1564
1427
|
}));
|
|
1565
1428
|
|
|
1566
1429
|
function querySettleResult() {
|
|
1567
|
-
return
|
|
1430
|
+
return _ref14.apply(this, arguments);
|
|
1568
1431
|
}
|
|
1569
1432
|
|
|
1570
1433
|
return querySettleResult;
|
|
@@ -1590,18 +1453,18 @@ var SettlementStore = (_class = function () {
|
|
|
1590
1453
|
}, {
|
|
1591
1454
|
key: 'validePwd',
|
|
1592
1455
|
value: function () {
|
|
1593
|
-
var
|
|
1594
|
-
var
|
|
1456
|
+
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(value) {
|
|
1457
|
+
var _ref16, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, cardStatusEnum, result, count, _result;
|
|
1595
1458
|
|
|
1596
|
-
return _regenerator2.default.wrap(function
|
|
1459
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1597
1460
|
while (1) {
|
|
1598
|
-
switch (
|
|
1461
|
+
switch (_context6.prev = _context6.next) {
|
|
1599
1462
|
case 0:
|
|
1600
|
-
|
|
1601
|
-
|
|
1463
|
+
_ref16 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref16.isNewRetailBCPos;
|
|
1464
|
+
_context6.prev = 1;
|
|
1602
1465
|
|
|
1603
1466
|
if (!isNewRetailBCPos) {
|
|
1604
|
-
|
|
1467
|
+
_context6.next = 33;
|
|
1605
1468
|
break;
|
|
1606
1469
|
}
|
|
1607
1470
|
|
|
@@ -1611,60 +1474,60 @@ var SettlementStore = (_class = function () {
|
|
|
1611
1474
|
memberStorageId = this.paymode.currentMode.meStorageCardId;
|
|
1612
1475
|
|
|
1613
1476
|
if (!cook2) {
|
|
1614
|
-
|
|
1477
|
+
_context6.next = 12;
|
|
1615
1478
|
break;
|
|
1616
1479
|
}
|
|
1617
1480
|
|
|
1618
1481
|
if (!cook2.hasOwnProperty(memberStorageId + "")) {
|
|
1619
|
-
|
|
1482
|
+
_context6.next = 12;
|
|
1620
1483
|
break;
|
|
1621
1484
|
}
|
|
1622
1485
|
|
|
1623
1486
|
if (!(cook2[memberStorageId] > 3)) {
|
|
1624
|
-
|
|
1487
|
+
_context6.next = 12;
|
|
1625
1488
|
break;
|
|
1626
1489
|
}
|
|
1627
1490
|
|
|
1628
1491
|
message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
|
|
1629
|
-
return
|
|
1492
|
+
return _context6.abrupt('return', _promise2.default.resolve(message));
|
|
1630
1493
|
|
|
1631
1494
|
case 12:
|
|
1632
1495
|
_paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId, cardStatusEnum = _paymode$currentMode.cardStatusEnum;
|
|
1633
1496
|
result = null;
|
|
1634
1497
|
|
|
1635
1498
|
if (!(cardTypeEnum === 'BALANCE_CARD')) {
|
|
1636
|
-
|
|
1499
|
+
_context6.next = 20;
|
|
1637
1500
|
break;
|
|
1638
1501
|
}
|
|
1639
1502
|
|
|
1640
|
-
|
|
1503
|
+
_context6.next = 17;
|
|
1641
1504
|
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
|
|
1642
1505
|
|
|
1643
1506
|
case 17:
|
|
1644
|
-
result =
|
|
1645
|
-
|
|
1507
|
+
result = _context6.sent;
|
|
1508
|
+
_context6.next = 29;
|
|
1646
1509
|
break;
|
|
1647
1510
|
|
|
1648
1511
|
case 20:
|
|
1649
1512
|
if (!(cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId)) {
|
|
1650
|
-
|
|
1513
|
+
_context6.next = 26;
|
|
1651
1514
|
break;
|
|
1652
1515
|
}
|
|
1653
1516
|
|
|
1654
|
-
|
|
1517
|
+
_context6.next = 23;
|
|
1655
1518
|
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1656
1519
|
|
|
1657
1520
|
case 23:
|
|
1658
|
-
result =
|
|
1659
|
-
|
|
1521
|
+
result = _context6.sent;
|
|
1522
|
+
_context6.next = 29;
|
|
1660
1523
|
break;
|
|
1661
1524
|
|
|
1662
1525
|
case 26:
|
|
1663
|
-
|
|
1526
|
+
_context6.next = 28;
|
|
1664
1527
|
return (0, _tplusApi.ccApi)({ password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1665
1528
|
|
|
1666
1529
|
case 28:
|
|
1667
|
-
result =
|
|
1530
|
+
result = _context6.sent;
|
|
1668
1531
|
|
|
1669
1532
|
case 29:
|
|
1670
1533
|
if (!result.data) {
|
|
@@ -1683,38 +1546,38 @@ var SettlementStore = (_class = function () {
|
|
|
1683
1546
|
this.setCookie('errorPwd', '', -1);
|
|
1684
1547
|
this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
|
|
1685
1548
|
}
|
|
1686
|
-
return
|
|
1549
|
+
return _context6.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
|
|
1687
1550
|
|
|
1688
1551
|
case 33:
|
|
1689
|
-
|
|
1552
|
+
_context6.next = 35;
|
|
1690
1553
|
return (0, _tplusApi.tApi)({ "CheckoutParams": {
|
|
1691
1554
|
"Idmember": value.id,
|
|
1692
1555
|
"Password": value.pwd
|
|
1693
1556
|
} }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
|
|
1694
1557
|
|
|
1695
1558
|
case 35:
|
|
1696
|
-
_result =
|
|
1697
|
-
return
|
|
1559
|
+
_result = _context6.sent;
|
|
1560
|
+
return _context6.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
|
|
1698
1561
|
|
|
1699
1562
|
case 37:
|
|
1700
|
-
|
|
1563
|
+
_context6.next = 42;
|
|
1701
1564
|
break;
|
|
1702
1565
|
|
|
1703
1566
|
case 39:
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
return
|
|
1567
|
+
_context6.prev = 39;
|
|
1568
|
+
_context6.t0 = _context6['catch'](1);
|
|
1569
|
+
return _context6.abrupt('return', "failed");
|
|
1707
1570
|
|
|
1708
1571
|
case 42:
|
|
1709
1572
|
case 'end':
|
|
1710
|
-
return
|
|
1573
|
+
return _context6.stop();
|
|
1711
1574
|
}
|
|
1712
1575
|
}
|
|
1713
|
-
},
|
|
1576
|
+
}, _callee6, this, [[1, 39]]);
|
|
1714
1577
|
}));
|
|
1715
1578
|
|
|
1716
|
-
function validePwd(
|
|
1717
|
-
return
|
|
1579
|
+
function validePwd(_x4) {
|
|
1580
|
+
return _ref15.apply(this, arguments);
|
|
1718
1581
|
}
|
|
1719
1582
|
|
|
1720
1583
|
return validePwd;
|
|
@@ -1724,7 +1587,7 @@ var SettlementStore = (_class = function () {
|
|
|
1724
1587
|
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'queryPwd', [_mobx.action], {
|
|
1725
1588
|
enumerable: true,
|
|
1726
1589
|
initializer: function initializer() {
|
|
1727
|
-
var
|
|
1590
|
+
var _this12 = this;
|
|
1728
1591
|
|
|
1729
1592
|
return function (newPass, newPassConfirm) {
|
|
1730
1593
|
if (!newPass || !newPassConfirm) {
|
|
@@ -1736,7 +1599,7 @@ var SettlementStore = (_class = function () {
|
|
|
1736
1599
|
var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
|
|
1737
1600
|
return (0, _tplusApi.ccApi)({
|
|
1738
1601
|
Idstore: idstore,
|
|
1739
|
-
meMemberId:
|
|
1602
|
+
meMemberId: _this12.paymode.currentMode.memberId,
|
|
1740
1603
|
oldPassword: null,
|
|
1741
1604
|
newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
|
|
1742
1605
|
dataSource: "POS"
|
|
@@ -1750,134 +1613,134 @@ var SettlementStore = (_class = function () {
|
|
|
1750
1613
|
}), _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], {
|
|
1751
1614
|
enumerable: true,
|
|
1752
1615
|
initializer: function initializer() {
|
|
1753
|
-
var
|
|
1616
|
+
var _this13 = this;
|
|
1754
1617
|
|
|
1755
1618
|
return function () {
|
|
1756
|
-
var
|
|
1619
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(_this) {
|
|
1757
1620
|
var _getLoginInfo, IdStore, StoreCode, resp;
|
|
1758
1621
|
|
|
1759
|
-
return _regenerator2.default.wrap(function
|
|
1622
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1760
1623
|
while (1) {
|
|
1761
|
-
switch (
|
|
1624
|
+
switch (_context7.prev = _context7.next) {
|
|
1762
1625
|
case 0:
|
|
1763
|
-
_getLoginInfo =
|
|
1764
|
-
|
|
1765
|
-
return (0, _tplusApi.tApi)({ Idmember:
|
|
1626
|
+
_getLoginInfo = _this13.getLoginInfo(), IdStore = _getLoginInfo.IdStore, StoreCode = _getLoginInfo.StoreCode;
|
|
1627
|
+
_context7.next = 3;
|
|
1628
|
+
return (0, _tplusApi.tApi)({ Idmember: _this13.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
|
|
1766
1629
|
|
|
1767
1630
|
case 3:
|
|
1768
|
-
resp =
|
|
1631
|
+
resp = _context7.sent;
|
|
1769
1632
|
|
|
1770
1633
|
_this.member = resp;
|
|
1771
1634
|
_this.paymode.updateMemberStorageCardNo(resp.StorageCardNo, resp.WalletEnabled);
|
|
1772
|
-
return
|
|
1635
|
+
return _context7.abrupt('return', _promise2.default.resolve(resp));
|
|
1773
1636
|
|
|
1774
1637
|
case 7:
|
|
1775
1638
|
case 'end':
|
|
1776
|
-
return
|
|
1639
|
+
return _context7.stop();
|
|
1777
1640
|
}
|
|
1778
1641
|
}
|
|
1779
|
-
},
|
|
1642
|
+
}, _callee7, _this13);
|
|
1780
1643
|
}));
|
|
1781
1644
|
|
|
1782
|
-
return function (
|
|
1783
|
-
return
|
|
1645
|
+
return function (_x5) {
|
|
1646
|
+
return _ref17.apply(this, arguments);
|
|
1784
1647
|
};
|
|
1785
1648
|
}();
|
|
1786
1649
|
}
|
|
1787
1650
|
}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'updateCurrentMode', [_mobx.action], {
|
|
1788
1651
|
enumerable: true,
|
|
1789
1652
|
initializer: function initializer() {
|
|
1790
|
-
var
|
|
1653
|
+
var _this14 = this;
|
|
1791
1654
|
|
|
1792
1655
|
return function () {
|
|
1793
|
-
var
|
|
1656
|
+
var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(memberId) {
|
|
1794
1657
|
var result;
|
|
1795
|
-
return _regenerator2.default.wrap(function
|
|
1658
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1796
1659
|
while (1) {
|
|
1797
|
-
switch (
|
|
1660
|
+
switch (_context8.prev = _context8.next) {
|
|
1798
1661
|
case 0:
|
|
1799
|
-
|
|
1662
|
+
_context8.next = 2;
|
|
1800
1663
|
return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId + '/' + true, false, false, { method: 'get' });
|
|
1801
1664
|
|
|
1802
1665
|
case 2:
|
|
1803
|
-
result =
|
|
1666
|
+
result = _context8.sent;
|
|
1804
1667
|
|
|
1805
1668
|
if (!(result && result.data.length)) {
|
|
1806
|
-
|
|
1669
|
+
_context8.next = 20;
|
|
1807
1670
|
break;
|
|
1808
1671
|
}
|
|
1809
1672
|
|
|
1810
1673
|
if (!(result.data.length === 1)) {
|
|
1811
|
-
|
|
1674
|
+
_context8.next = 9;
|
|
1812
1675
|
break;
|
|
1813
1676
|
}
|
|
1814
1677
|
|
|
1815
|
-
|
|
1816
|
-
return
|
|
1678
|
+
_this14.paymode.updateCardInfo(result.data[0]);
|
|
1679
|
+
return _context8.abrupt('return', result.data);
|
|
1817
1680
|
|
|
1818
1681
|
case 9:
|
|
1819
1682
|
if (!(result.data && result.data.length === 1)) {
|
|
1820
|
-
|
|
1683
|
+
_context8.next = 14;
|
|
1821
1684
|
break;
|
|
1822
1685
|
}
|
|
1823
1686
|
|
|
1824
|
-
|
|
1825
|
-
return
|
|
1687
|
+
_this14.paymode.updateCardInfo(result.data[0]);
|
|
1688
|
+
return _context8.abrupt('return', result.data);
|
|
1826
1689
|
|
|
1827
1690
|
case 14:
|
|
1828
1691
|
if (!(result.data && result.data.length > 1)) {
|
|
1829
|
-
|
|
1692
|
+
_context8.next = 18;
|
|
1830
1693
|
break;
|
|
1831
1694
|
}
|
|
1832
1695
|
|
|
1833
|
-
return
|
|
1696
|
+
return _context8.abrupt('return', result.data);
|
|
1834
1697
|
|
|
1835
1698
|
case 18:
|
|
1836
1699
|
_message2.default.warn('没有可用储值卡!');
|
|
1837
|
-
return
|
|
1700
|
+
return _context8.abrupt('return', false);
|
|
1838
1701
|
|
|
1839
1702
|
case 20:
|
|
1840
1703
|
case 'end':
|
|
1841
|
-
return
|
|
1704
|
+
return _context8.stop();
|
|
1842
1705
|
}
|
|
1843
1706
|
}
|
|
1844
|
-
},
|
|
1707
|
+
}, _callee8, _this14);
|
|
1845
1708
|
}));
|
|
1846
1709
|
|
|
1847
|
-
return function (
|
|
1848
|
-
return
|
|
1710
|
+
return function (_x6) {
|
|
1711
|
+
return _ref18.apply(this, arguments);
|
|
1849
1712
|
};
|
|
1850
1713
|
}();
|
|
1851
1714
|
}
|
|
1852
1715
|
}), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'updateCardInfo', [_mobx.action], {
|
|
1853
1716
|
enumerable: true,
|
|
1854
1717
|
initializer: function initializer() {
|
|
1855
|
-
var
|
|
1718
|
+
var _this15 = this;
|
|
1856
1719
|
|
|
1857
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1720
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9() {
|
|
1858
1721
|
var address, result;
|
|
1859
|
-
return _regenerator2.default.wrap(function
|
|
1722
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
1860
1723
|
while (1) {
|
|
1861
|
-
switch (
|
|
1724
|
+
switch (_context9.prev = _context9.next) {
|
|
1862
1725
|
case 0:
|
|
1863
|
-
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' +
|
|
1864
|
-
|
|
1726
|
+
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + _this15.paymode.currentMode.storageCardNo;
|
|
1727
|
+
_context9.next = 3;
|
|
1865
1728
|
return (0, _tplusApi.ccApi)({}, address, false, false, { method: 'get', timeout_skip: true });
|
|
1866
1729
|
|
|
1867
1730
|
case 3:
|
|
1868
|
-
result =
|
|
1731
|
+
result = _context9.sent;
|
|
1869
1732
|
|
|
1870
|
-
|
|
1733
|
+
_this15.paymode.updateCardInfo(result.data);
|
|
1871
1734
|
|
|
1872
1735
|
case 5:
|
|
1873
1736
|
case 'end':
|
|
1874
|
-
return
|
|
1737
|
+
return _context9.stop();
|
|
1875
1738
|
}
|
|
1876
1739
|
}
|
|
1877
|
-
},
|
|
1740
|
+
}, _callee9, _this15);
|
|
1878
1741
|
}));
|
|
1879
1742
|
}
|
|
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);
|
|
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), _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
1744
|
exports.default = SettlementStore;
|
|
1882
1745
|
var PayMode = exports.PayMode = (_class3 = function () {
|
|
1883
1746
|
//应收
|
|
@@ -1975,7 +1838,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1975
1838
|
}, {
|
|
1976
1839
|
key: 'calcDjqCheckValue',
|
|
1977
1840
|
value: function calcDjqCheckValue(q1, dto, params) {
|
|
1978
|
-
var
|
|
1841
|
+
var _this16 = this;
|
|
1979
1842
|
|
|
1980
1843
|
var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
|
|
1981
1844
|
var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
|
|
@@ -1989,12 +1852,12 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1989
1852
|
this.checkList = [];
|
|
1990
1853
|
}
|
|
1991
1854
|
|
|
1992
|
-
var
|
|
1993
|
-
isNewRetailBCPos =
|
|
1855
|
+
var _ref20 = _mutantsUtil.platform || {},
|
|
1856
|
+
isNewRetailBCPos = _ref20.isNewRetailBCPos;
|
|
1994
1857
|
|
|
1995
|
-
var _enumController$
|
|
1996
|
-
PayStyle = _enumController$
|
|
1997
|
-
Differentiate = _enumController$
|
|
1858
|
+
var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
|
|
1859
|
+
PayStyle = _enumController$getEn16.PayStyle,
|
|
1860
|
+
Differentiate = _enumController$getEn16.Differentiate;
|
|
1998
1861
|
|
|
1999
1862
|
if (q1) {
|
|
2000
1863
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
@@ -2022,7 +1885,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2022
1885
|
if (!q1.checked) {
|
|
2023
1886
|
this.checkList.forEach(function (ele, i) {
|
|
2024
1887
|
if (ele.id === q1.id) {
|
|
2025
|
-
|
|
1888
|
+
_this16.checkList.splice(i, 1);
|
|
2026
1889
|
}
|
|
2027
1890
|
});
|
|
2028
1891
|
} else {
|
|
@@ -2094,24 +1957,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2094
1957
|
if (result && result.length != 0) {
|
|
2095
1958
|
result.forEach(function (element, index) {
|
|
2096
1959
|
var djq1 = false;
|
|
2097
|
-
|
|
1960
|
+
_this16.currentMode.djqs.forEach(function (djq) {
|
|
2098
1961
|
if (element.id === djq.id) {
|
|
2099
1962
|
djq1 = true;
|
|
2100
1963
|
}
|
|
2101
1964
|
});
|
|
2102
1965
|
|
|
2103
|
-
var
|
|
2104
|
-
couponCode =
|
|
2105
|
-
name =
|
|
2106
|
-
tieredAmountResult =
|
|
2107
|
-
fromDate =
|
|
2108
|
-
dateMount =
|
|
2109
|
-
promoMethodEnum =
|
|
2110
|
-
discountPct =
|
|
2111
|
-
nominalAmount =
|
|
2112
|
-
promoId =
|
|
2113
|
-
id =
|
|
2114
|
-
doorsill =
|
|
1966
|
+
var _ref21 = element || {},
|
|
1967
|
+
couponCode = _ref21.couponCode,
|
|
1968
|
+
name = _ref21.name,
|
|
1969
|
+
tieredAmountResult = _ref21.tieredAmountResult,
|
|
1970
|
+
fromDate = _ref21.fromDate,
|
|
1971
|
+
dateMount = _ref21.dateMount,
|
|
1972
|
+
promoMethodEnum = _ref21.promoMethodEnum,
|
|
1973
|
+
discountPct = _ref21.discountPct,
|
|
1974
|
+
nominalAmount = _ref21.nominalAmount,
|
|
1975
|
+
promoId = _ref21.promoId,
|
|
1976
|
+
id = _ref21.id,
|
|
1977
|
+
doorsill = _ref21.doorsill;
|
|
2115
1978
|
|
|
2116
1979
|
var condValue = tieredAmountResult.condValue,
|
|
2117
1980
|
promoDiscount = tieredAmountResult.promoDiscount,
|
|
@@ -2139,10 +2002,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2139
2002
|
// couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
|
|
2140
2003
|
// id
|
|
2141
2004
|
// })
|
|
2142
|
-
|
|
2005
|
+
_this16.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
|
|
2143
2006
|
djq1 = false;
|
|
2144
2007
|
} else {
|
|
2145
|
-
|
|
2008
|
+
_this16.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
|
|
2146
2009
|
// this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
|
|
2147
2010
|
// djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
|
|
2148
2011
|
}
|
|
@@ -2155,11 +2018,11 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2155
2018
|
}, {
|
|
2156
2019
|
key: 'calcDjqValue',
|
|
2157
2020
|
value: function calcDjqValue(q1) {
|
|
2158
|
-
var
|
|
2159
|
-
isNewRetailBCPos =
|
|
2021
|
+
var _ref22 = _mutantsUtil.platform || {},
|
|
2022
|
+
isNewRetailBCPos = _ref22.isNewRetailBCPos;
|
|
2160
2023
|
|
|
2161
|
-
var _enumController$
|
|
2162
|
-
Differentiate = _enumController$
|
|
2024
|
+
var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
|
|
2025
|
+
Differentiate = _enumController$getEn17.Differentiate;
|
|
2163
2026
|
|
|
2164
2027
|
if (q1) {
|
|
2165
2028
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
@@ -2221,8 +2084,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2221
2084
|
this.currentMode.errinfo = '';
|
|
2222
2085
|
var sum = this.amount;
|
|
2223
2086
|
|
|
2224
|
-
var _enumController$
|
|
2225
|
-
PayStyle = _enumController$
|
|
2087
|
+
var _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(),
|
|
2088
|
+
PayStyle = _enumController$getEn18.PayStyle;
|
|
2226
2089
|
|
|
2227
2090
|
this.thePaymodes && this.thePaymodes.forEach(function (mode) {
|
|
2228
2091
|
if (mode.paymentType === PayStyle.hyczk) {
|
|
@@ -2246,29 +2109,30 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2246
2109
|
}, {
|
|
2247
2110
|
key: 'setPaymodes',
|
|
2248
2111
|
value: function () {
|
|
2249
|
-
var
|
|
2250
|
-
var
|
|
2112
|
+
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(type, isIntegralExchange) {
|
|
2113
|
+
var _this17 = this;
|
|
2251
2114
|
|
|
2252
|
-
var _enumController$
|
|
2115
|
+
var _enumController$getEn19, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
|
|
2253
2116
|
|
|
2254
|
-
return _regenerator2.default.wrap(function
|
|
2117
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
2255
2118
|
while (1) {
|
|
2256
|
-
switch (
|
|
2119
|
+
switch (_context10.prev = _context10.next) {
|
|
2257
2120
|
case 0:
|
|
2258
|
-
_enumController$
|
|
2121
|
+
_enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn19.settleStyleType, PayStyle = _enumController$getEn19.PayStyle;
|
|
2259
2122
|
memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
|
|
2260
2123
|
param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
|
|
2261
|
-
|
|
2124
|
+
_context10.next = 5;
|
|
2262
2125
|
return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
|
|
2263
2126
|
|
|
2264
2127
|
case 5:
|
|
2265
|
-
modes =
|
|
2128
|
+
modes = _context10.sent;
|
|
2266
2129
|
|
|
2267
2130
|
if (modes) {
|
|
2268
2131
|
(0, _mobx.runInAction)(function () {
|
|
2269
2132
|
var paymodes = [];
|
|
2270
2133
|
(0, _each3.default)(modes.SettleStyles, function (mode, index) {
|
|
2271
2134
|
//产品需求确认会员储值卡结算方式前端展示统一调整为“储值卡" tuzha by 2020-07-08
|
|
2135
|
+
|
|
2272
2136
|
if (mode.Code == PayStyle.hyczk) {
|
|
2273
2137
|
mode.Name = '储值卡';
|
|
2274
2138
|
}
|
|
@@ -2283,24 +2147,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2283
2147
|
idBankAccount: mode.IdBankAccount,
|
|
2284
2148
|
exchangeRate: mode.Currency ? mode.Currency.ExchangeRate : 1,
|
|
2285
2149
|
idCurrency: mode.Currency ? mode.Currency.ID : -1,
|
|
2286
|
-
calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88"
|
|
2287
|
-
thridPayment: mode.ThirdPaymentInfo
|
|
2150
|
+
calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88"
|
|
2288
2151
|
});
|
|
2289
2152
|
});
|
|
2290
|
-
|
|
2153
|
+
_this17.paymodes = paymodes;
|
|
2154
|
+
//modes.QuickSettleStyles
|
|
2291
2155
|
});
|
|
2292
2156
|
}
|
|
2293
2157
|
|
|
2294
2158
|
case 7:
|
|
2295
2159
|
case 'end':
|
|
2296
|
-
return
|
|
2160
|
+
return _context10.stop();
|
|
2297
2161
|
}
|
|
2298
2162
|
}
|
|
2299
|
-
},
|
|
2163
|
+
}, _callee10, this);
|
|
2300
2164
|
}));
|
|
2301
2165
|
|
|
2302
|
-
function setPaymodes(
|
|
2303
|
-
return
|
|
2166
|
+
function setPaymodes(_x7, _x8) {
|
|
2167
|
+
return _ref23.apply(this, arguments);
|
|
2304
2168
|
}
|
|
2305
2169
|
|
|
2306
2170
|
return setPaymodes;
|
|
@@ -2355,19 +2219,19 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2355
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), _descriptor12 = _applyDecoratedDescriptor(_class3.prototype, 'calcCheckList', [_mobx.action], {
|
|
2356
2220
|
enumerable: true,
|
|
2357
2221
|
initializer: function initializer() {
|
|
2358
|
-
var
|
|
2222
|
+
var _this18 = this;
|
|
2359
2223
|
|
|
2360
2224
|
return function () {
|
|
2361
|
-
|
|
2225
|
+
_this18.checkList = [];
|
|
2362
2226
|
};
|
|
2363
2227
|
}
|
|
2364
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), _descriptor13 = _applyDecoratedDescriptor(_class3.prototype, 'setCouponNum', [_mobx.action], {
|
|
2365
2229
|
enumerable: true,
|
|
2366
2230
|
initializer: function initializer() {
|
|
2367
|
-
var
|
|
2231
|
+
var _this19 = this;
|
|
2368
2232
|
|
|
2369
2233
|
return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
|
|
2370
|
-
|
|
2234
|
+
_this19.currentMode.djqs.forEach(function (ele) {
|
|
2371
2235
|
if (ele.id === id) {
|
|
2372
2236
|
promoMethodEnum == "CASH_COUPON" ? ele.amount = nominalAmount : ele.amount = promoDiscount;
|
|
2373
2237
|
ele.couponCategoryEnum = couponNum;
|
|
@@ -2380,7 +2244,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2380
2244
|
}), _descriptor14 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
|
|
2381
2245
|
enumerable: true,
|
|
2382
2246
|
initializer: function initializer() {
|
|
2383
|
-
var
|
|
2247
|
+
var _this20 = this;
|
|
2384
2248
|
|
|
2385
2249
|
return function (promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
|
|
2386
2250
|
var djq = {
|
|
@@ -2402,13 +2266,13 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2402
2266
|
couponCategoryEnum: couponCategoryEnum,
|
|
2403
2267
|
id: id
|
|
2404
2268
|
};
|
|
2405
|
-
|
|
2269
|
+
_this20.currentMode.djqs.push(djq);
|
|
2406
2270
|
};
|
|
2407
2271
|
}
|
|
2408
2272
|
}), _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);
|
|
2409
2273
|
var Member = exports.Member = (_class5 = function () {
|
|
2410
2274
|
function Member(m) {
|
|
2411
|
-
var
|
|
2275
|
+
var _this21 = this;
|
|
2412
2276
|
|
|
2413
2277
|
(0, _classCallCheck3.default)(this, Member);
|
|
2414
2278
|
|
|
@@ -2431,15 +2295,15 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2431
2295
|
return key == 'canusedbalancestorage';
|
|
2432
2296
|
});
|
|
2433
2297
|
|
|
2434
|
-
var
|
|
2435
|
-
isNewRetailBCPos =
|
|
2298
|
+
var _ref24 = _mutantsUtil.platform || {},
|
|
2299
|
+
isNewRetailBCPos = _ref24.isNewRetailBCPos;
|
|
2436
2300
|
|
|
2437
2301
|
(0, _mobx.runInAction)(function () {
|
|
2438
|
-
|
|
2302
|
+
_this21.cardNo = m.CardCode;
|
|
2439
2303
|
if (index >= 0) {
|
|
2440
|
-
|
|
2304
|
+
_this21.balance = parseFloat(m.DynamicPropertyValues[index]);
|
|
2441
2305
|
} else {
|
|
2442
|
-
|
|
2306
|
+
_this21.balance = _this21.rawbalance;
|
|
2443
2307
|
}
|
|
2444
2308
|
});
|
|
2445
2309
|
this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;
|