tplus-components-touch 3.33.6 → 3.33.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.
- package/dist/components/settlement/settlement.js +27 -36
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +2 -2
- package/dist/components/settlement/settlementStore.js +422 -262
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/package.json +1 -1
|
@@ -168,6 +168,7 @@ var SettlementStore = (_class = function () {
|
|
|
168
168
|
(0, _classCallCheck3.default)(this, SettlementStore);
|
|
169
169
|
this.paymode = null;
|
|
170
170
|
this.dto = null;
|
|
171
|
+
this.dtoParams = null;
|
|
171
172
|
this.member = null;
|
|
172
173
|
this.brefund = false;
|
|
173
174
|
this.bquick = false;
|
|
@@ -325,7 +326,7 @@ var SettlementStore = (_class = function () {
|
|
|
325
326
|
var _ref2 = _mutantsUtil.platform || {},
|
|
326
327
|
isNewRetailBCPos = _ref2.isNewRetailBCPos;
|
|
327
328
|
|
|
328
|
-
_this2.addDjq(couponCode, name, IsEnable, promoMethodEnum == "CASH_COUPON"
|
|
329
|
+
_this2.addDjq(couponCode, name, IsEnable, promoMethodEnum == "CASH_COUPON" && nominalAmount, promoDiscount, condValue, null, false, !result.IsRepelWithPoints, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, true, 1);
|
|
329
330
|
}
|
|
330
331
|
});
|
|
331
332
|
if (promoVoucher.coupon_code) {
|
|
@@ -603,7 +604,8 @@ var SettlementStore = (_class = function () {
|
|
|
603
604
|
authCode: detail.PaymentCode,
|
|
604
605
|
steadCashIntegral: detail.SteadCashIntegral,
|
|
605
606
|
overchargesAmount: detail.OverchargesAmount,
|
|
606
|
-
boriginReturn: true
|
|
607
|
+
boriginReturn: true,
|
|
608
|
+
thirdPaymentReturnInfo: detail.ThirdPaymentReturnInfo
|
|
607
609
|
});
|
|
608
610
|
_this5.paymode.currentMode = newmode;
|
|
609
611
|
if (themode.paymentType == PayStyle.djq) {
|
|
@@ -618,10 +620,10 @@ var SettlementStore = (_class = function () {
|
|
|
618
620
|
promoId = _ref7.promoId,
|
|
619
621
|
id = _ref7.id;
|
|
620
622
|
|
|
621
|
-
_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);
|
|
623
|
+
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true, null, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false, _this5.dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, null, id, true);
|
|
622
624
|
return;
|
|
623
625
|
}
|
|
624
|
-
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false);
|
|
626
|
+
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true, null, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false);
|
|
625
627
|
});
|
|
626
628
|
}
|
|
627
629
|
_this5.paymode.thePaymodes.push(newmode);
|
|
@@ -854,12 +856,13 @@ var SettlementStore = (_class = function () {
|
|
|
854
856
|
}
|
|
855
857
|
}, {
|
|
856
858
|
key: 'addDjq',
|
|
857
|
-
value: function addDjq(promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, unCheck, count) {
|
|
859
|
+
value: function addDjq(promoCouponCode, name, IsEnable, nominalAmount, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, unCheck, count) {
|
|
858
860
|
var djq = {
|
|
859
861
|
code: promoCouponCode,
|
|
860
862
|
promoCouponCode: promoCouponCode,
|
|
861
863
|
name: name,
|
|
862
864
|
IsEnable: IsEnable,
|
|
865
|
+
nominalAmount: nominalAmount,
|
|
863
866
|
amount: amount,
|
|
864
867
|
doorsill: doorsill, //:"无门槛"
|
|
865
868
|
LastTS: LastTS,
|
|
@@ -950,6 +953,7 @@ var SettlementStore = (_class = function () {
|
|
|
950
953
|
name: themode.name,
|
|
951
954
|
exchangeRate: themode.exchangeRate,
|
|
952
955
|
calDirection: themode.calDirection,
|
|
956
|
+
thridPayment: themode.thridPayment,
|
|
953
957
|
value: value,
|
|
954
958
|
value2: (0, _utils.getFixedNumber)(themode.calDirection == "88" ? value / themode.exchangeRate : value * themode.exchangeRate),
|
|
955
959
|
value3: value,
|
|
@@ -978,7 +982,7 @@ var SettlementStore = (_class = function () {
|
|
|
978
982
|
if (type == PayStyle.hyczk || type == PayStyle.jfdx || type == PayStyle.djq) {
|
|
979
983
|
this.setMaxAmount(type, mode);
|
|
980
984
|
}
|
|
981
|
-
console.log(mode);
|
|
985
|
+
console.log('\u5F53\u524D\u64CD\u4F5C\u7ED3\u7B97\u65B9\u5F0F\u4FE1\u606F:' + mode);
|
|
982
986
|
return mode;
|
|
983
987
|
}
|
|
984
988
|
}, {
|
|
@@ -1015,15 +1019,6 @@ var SettlementStore = (_class = function () {
|
|
|
1015
1019
|
key: 'changeFocusOnly',
|
|
1016
1020
|
value: function changeFocusOnly(type) {
|
|
1017
1021
|
this.paymode.currentFocus = type;
|
|
1018
|
-
// 获取焦点时带入剩余的值
|
|
1019
|
-
// let mode=_find(this.paymode.thePaymodes,{'paymentType':type});
|
|
1020
|
-
// if(mode && this.isIntegralExchange){
|
|
1021
|
-
// const shouldSetValue =getFixedNumber(parseFloat(this.paymode.receivable) + parseFloat(mode.value));
|
|
1022
|
-
// mode.value = shouldSetValue;
|
|
1023
|
-
// mode.value2 = getFixedNumber(mode.calDirection=="88"?shouldSetValue / mode.exchangeRate:(shouldSetValue * mode.exchangeRate));
|
|
1024
|
-
// mode.value3 = shouldSetValue;
|
|
1025
|
-
// this.paymode.calcReserved();
|
|
1026
|
-
// }
|
|
1027
1022
|
}
|
|
1028
1023
|
}, {
|
|
1029
1024
|
key: 'changeClickFocusOnly',
|
|
@@ -1085,6 +1080,13 @@ var SettlementStore = (_class = function () {
|
|
|
1085
1080
|
var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
|
|
1086
1081
|
PayStyle = _enumController$getEn12.PayStyle;
|
|
1087
1082
|
|
|
1083
|
+
var hasThirdPay = this.paymode.thePaymodes.findIndex(function (v) {
|
|
1084
|
+
return !!v.thridPayment;
|
|
1085
|
+
});
|
|
1086
|
+
if (hasThirdPay > -1) {
|
|
1087
|
+
_message2.default.warn('二开支付目前仅支持单一结算。');
|
|
1088
|
+
return;
|
|
1089
|
+
}
|
|
1088
1090
|
var pos = this.paymode.thePaymodes.length;
|
|
1089
1091
|
if (type == PayStyle.hyczk) {
|
|
1090
1092
|
var index = (0, _findLastIndex3.default)(this.paymode.thePaymodes, function (m) {
|
|
@@ -1092,8 +1094,6 @@ var SettlementStore = (_class = function () {
|
|
|
1092
1094
|
});
|
|
1093
1095
|
pos = index == -1 ? pos : index + 1;
|
|
1094
1096
|
}
|
|
1095
|
-
// this.paymode.thePaymodes.push(this.genNewMode(type) );
|
|
1096
|
-
|
|
1097
1097
|
this.paymode.thePaymodes.splice(pos, 0, this.genNewMode(type, this.newStyle && type == PayStyle.hyczk, undefined, isQuick));
|
|
1098
1098
|
this.paymode.calcReserved();
|
|
1099
1099
|
}
|
|
@@ -1156,7 +1156,7 @@ var SettlementStore = (_class = function () {
|
|
|
1156
1156
|
key: 'commit',
|
|
1157
1157
|
value: function () {
|
|
1158
1158
|
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(bTest) {
|
|
1159
|
-
var
|
|
1159
|
+
var ret, _ref11, _ref11$data, code, returnMsg, state, _ret;
|
|
1160
1160
|
|
|
1161
1161
|
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
1162
1162
|
while (1) {
|
|
@@ -1172,72 +1172,71 @@ var SettlementStore = (_class = function () {
|
|
|
1172
1172
|
return _context4.abrupt('return', _promise2.default.resolve(true));
|
|
1173
1173
|
|
|
1174
1174
|
case 3:
|
|
1175
|
-
|
|
1176
|
-
_context4.prev = 4;
|
|
1175
|
+
_context4.prev = 3;
|
|
1177
1176
|
|
|
1178
1177
|
if (!(this.type == 1)) {
|
|
1179
|
-
_context4.next =
|
|
1178
|
+
_context4.next = 23;
|
|
1180
1179
|
break;
|
|
1181
1180
|
}
|
|
1182
1181
|
|
|
1183
|
-
_context4.next =
|
|
1182
|
+
_context4.next = 7;
|
|
1184
1183
|
return this.findStorageBillValidate();
|
|
1185
1184
|
|
|
1186
|
-
case
|
|
1185
|
+
case 7:
|
|
1187
1186
|
ret = _context4.sent;
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
code =
|
|
1187
|
+
_ref11 = ret || {}, _ref11$data = _ref11.data;
|
|
1188
|
+
_ref11$data = _ref11$data === undefined ? {} : _ref11$data;
|
|
1189
|
+
code = _ref11$data.code, returnMsg = _ref11$data.returnMsg;
|
|
1191
1190
|
|
|
1192
1191
|
if (!(code && code == 10001)) {
|
|
1193
|
-
_context4.next =
|
|
1192
|
+
_context4.next = 19;
|
|
1194
1193
|
break;
|
|
1195
1194
|
}
|
|
1196
1195
|
|
|
1197
|
-
_context4.next =
|
|
1196
|
+
_context4.next = 14;
|
|
1198
1197
|
return this.repeatStorageModal(returnMsg);
|
|
1199
1198
|
|
|
1200
|
-
case
|
|
1199
|
+
case 14:
|
|
1201
1200
|
state = _context4.sent;
|
|
1202
1201
|
|
|
1203
1202
|
if (!(state === false)) {
|
|
1204
|
-
_context4.next =
|
|
1203
|
+
_context4.next = 17;
|
|
1205
1204
|
break;
|
|
1206
1205
|
}
|
|
1207
1206
|
|
|
1208
1207
|
return _context4.abrupt('return', _promise2.default.resolve(false));
|
|
1209
1208
|
|
|
1210
|
-
case
|
|
1211
|
-
_context4.next =
|
|
1209
|
+
case 17:
|
|
1210
|
+
_context4.next = 21;
|
|
1212
1211
|
break;
|
|
1213
1212
|
|
|
1214
|
-
case
|
|
1215
|
-
_context4.next =
|
|
1213
|
+
case 19:
|
|
1214
|
+
_context4.next = 21;
|
|
1216
1215
|
return this.saveMember();
|
|
1217
1216
|
|
|
1218
|
-
case
|
|
1217
|
+
case 21:
|
|
1219
1218
|
_context4.next = 32;
|
|
1220
1219
|
break;
|
|
1221
1220
|
|
|
1222
|
-
case
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
break;
|
|
1226
|
-
}
|
|
1221
|
+
case 23:
|
|
1222
|
+
_context4.next = 25;
|
|
1223
|
+
return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
|
|
1227
1224
|
|
|
1225
|
+
case 25:
|
|
1228
1226
|
_context4.next = 27;
|
|
1229
|
-
return
|
|
1227
|
+
return this.save();
|
|
1230
1228
|
|
|
1231
1229
|
case 27:
|
|
1232
|
-
|
|
1233
|
-
return this.save();
|
|
1230
|
+
_ret = _context4.sent;
|
|
1234
1231
|
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
_context4.next = 32;
|
|
1232
|
+
if (!(_ret === false)) {
|
|
1233
|
+
_context4.next = 30;
|
|
1238
1234
|
break;
|
|
1239
1235
|
}
|
|
1240
1236
|
|
|
1237
|
+
return _context4.abrupt('return', _promise2.default.resolve(false));
|
|
1238
|
+
|
|
1239
|
+
case 30:
|
|
1241
1240
|
_context4.next = 32;
|
|
1242
1241
|
return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
|
|
1243
1242
|
|
|
@@ -1246,17 +1245,19 @@ var SettlementStore = (_class = function () {
|
|
|
1246
1245
|
|
|
1247
1246
|
case 35:
|
|
1248
1247
|
_context4.prev = 35;
|
|
1249
|
-
_context4.t0 = _context4['catch'](
|
|
1248
|
+
_context4.t0 = _context4['catch'](3);
|
|
1250
1249
|
|
|
1251
1250
|
console.error('settlementStore.commit失败,错误信息:' + _context4.t0);
|
|
1251
|
+
//其他支付失败时,处理二开支付情况。
|
|
1252
|
+
this.thirdPayRefund();
|
|
1252
1253
|
return _context4.abrupt('return', _promise2.default.resolve(_context4.t0));
|
|
1253
1254
|
|
|
1254
|
-
case
|
|
1255
|
+
case 40:
|
|
1255
1256
|
case 'end':
|
|
1256
1257
|
return _context4.stop();
|
|
1257
1258
|
}
|
|
1258
1259
|
}
|
|
1259
|
-
}, _callee4, this, [[
|
|
1260
|
+
}, _callee4, this, [[3, 35]]);
|
|
1260
1261
|
}));
|
|
1261
1262
|
|
|
1262
1263
|
function commit(_x3) {
|
|
@@ -1318,16 +1319,16 @@ var SettlementStore = (_class = function () {
|
|
|
1318
1319
|
}, {
|
|
1319
1320
|
key: 'save',
|
|
1320
1321
|
value: function () {
|
|
1321
|
-
var
|
|
1322
|
+
var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1322
1323
|
var _this12 = this;
|
|
1323
1324
|
|
|
1324
|
-
var _enumController$getEn16, PayStyle,
|
|
1325
|
+
var _enumController$getEn16, PayStyle, TradeType, IPMSG, RetailTypeEnum, dtoParams, payList, amount, tradeType, ret, _ref13, type, data, msg, code;
|
|
1325
1326
|
|
|
1326
1327
|
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1327
1328
|
while (1) {
|
|
1328
1329
|
switch (_context5.prev = _context5.next) {
|
|
1329
1330
|
case 0:
|
|
1330
|
-
_enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn16.PayStyle;
|
|
1331
|
+
_enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn16.PayStyle, TradeType = _enumController$getEn16.TradeType;
|
|
1331
1332
|
|
|
1332
1333
|
(0, _mobx.runInAction)(function () {
|
|
1333
1334
|
_this12.dto.RetailPaymentDetails = [];
|
|
@@ -1375,7 +1376,9 @@ var SettlementStore = (_class = function () {
|
|
|
1375
1376
|
OverchargesAmount: mode.overchargesAmount,
|
|
1376
1377
|
DynamicPropertyKeys: [],
|
|
1377
1378
|
DynamicPropertyValues: [],
|
|
1378
|
-
DataSource: { Id: _this12.dataSource }
|
|
1379
|
+
DataSource: { Id: _this12.dataSource },
|
|
1380
|
+
ThirdPaymentInfo: themode.thridPayment || null,
|
|
1381
|
+
ThirdPaymentReturnInfo: mode.thirdPaymentReturnInfo || null
|
|
1379
1382
|
});
|
|
1380
1383
|
if (mode.paymentType == PayStyle.djq) {
|
|
1381
1384
|
(0, _each3.default)(_this12.paymode.checkList && _this12.paymode.checkList.length ? _this12.paymode.checkList : mode.djqs, function (djq) {
|
|
@@ -1395,47 +1398,22 @@ var SettlementStore = (_class = function () {
|
|
|
1395
1398
|
}
|
|
1396
1399
|
}
|
|
1397
1400
|
});
|
|
1398
|
-
|
|
1399
|
-
var _ref14 = _mutantsUtil.platform || {},
|
|
1400
|
-
isNewRetailBCPos = _ref14.isNewRetailBCPos;
|
|
1401
|
-
|
|
1402
1401
|
if (_this12.dto.RetailStorageDetails.length > 0) {
|
|
1403
1402
|
var themode = (0, _find3.default)(_this12.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
|
|
1404
|
-
|
|
1405
|
-
_this12.
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
});
|
|
1416
|
-
} else {
|
|
1417
|
-
_this12.dto.RetailPaymentDetails.push({
|
|
1418
|
-
Code: _this12.paymode.counter,
|
|
1419
|
-
OrigAmount: czkSum,
|
|
1420
|
-
Amount: czkSum,
|
|
1421
|
-
IdsettleStyle: themode.idSettleStyle,
|
|
1422
|
-
IdbankAccount: themode.idBankAccount,
|
|
1423
|
-
DynamicPropertyKeys: [],
|
|
1424
|
-
DynamicPropertyValues: [],
|
|
1425
|
-
DataSource: { Id: _this12.dataSource }
|
|
1426
|
-
});
|
|
1427
|
-
}
|
|
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
|
+
});
|
|
1428
1414
|
}
|
|
1429
1415
|
});
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
console.log('bc_pos\u73AF\u5883:' + isNewRetailBCPos + ',\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
|
|
1433
|
-
|
|
1434
|
-
if (!isNewRetailBCPos) {
|
|
1435
|
-
_context5.next = 20;
|
|
1436
|
-
break;
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1416
|
+
console.log('\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
|
|
1439
1417
|
// cc结算调用
|
|
1440
1418
|
IPMSG = {};
|
|
1441
1419
|
|
|
@@ -1446,49 +1424,79 @@ var SettlementStore = (_class = function () {
|
|
|
1446
1424
|
_context5.t1 = this.dto.IdbusiType == 37;
|
|
1447
1425
|
|
|
1448
1426
|
if (!_context5.t1) {
|
|
1449
|
-
_context5.next =
|
|
1427
|
+
_context5.next = 11;
|
|
1450
1428
|
break;
|
|
1451
1429
|
}
|
|
1452
1430
|
|
|
1453
|
-
_context5.next =
|
|
1431
|
+
_context5.next = 10;
|
|
1454
1432
|
return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
|
|
1455
1433
|
|
|
1456
|
-
case
|
|
1434
|
+
case 10:
|
|
1457
1435
|
_context5.t1 = _context5.sent;
|
|
1458
1436
|
|
|
1459
|
-
case
|
|
1437
|
+
case 11:
|
|
1460
1438
|
_context5.t0 = _context5.t1;
|
|
1461
1439
|
|
|
1462
1440
|
if (_context5.t0) {
|
|
1463
|
-
_context5.next =
|
|
1441
|
+
_context5.next = 14;
|
|
1464
1442
|
break;
|
|
1465
1443
|
}
|
|
1466
1444
|
|
|
1467
1445
|
_context5.t0 = this.dto.IdbusiType != 37;
|
|
1468
1446
|
|
|
1469
|
-
case
|
|
1447
|
+
case 14:
|
|
1470
1448
|
if (!_context5.t0) {
|
|
1471
|
-
_context5.next =
|
|
1449
|
+
_context5.next = 33;
|
|
1472
1450
|
break;
|
|
1473
1451
|
}
|
|
1474
1452
|
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
_this12.paymode.checkList = [];
|
|
1478
|
-
_this12.billID = resp.ID;
|
|
1479
|
-
}));
|
|
1453
|
+
dtoParams = (0, _extends3.default)({}, this.dto.cut(), { RetailOms: { RetailTypeEnum: RetailTypeEnum } });
|
|
1454
|
+
//处理存在二开支付情况
|
|
1480
1455
|
|
|
1481
|
-
|
|
1482
|
-
|
|
1456
|
+
payList = dtoParams.RetailPaymentDetails.filter(function (v) {
|
|
1457
|
+
return v.ThirdPaymentInfo;
|
|
1458
|
+
});
|
|
1459
|
+
|
|
1460
|
+
if (!(payList && payList.length > 0)) {
|
|
1461
|
+
_context5.next = 30;
|
|
1462
|
+
break;
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
amount = payList[0].Amount;
|
|
1466
|
+
tradeType = amount > 0 ? TradeType.PAY : TradeType.REFUND;
|
|
1467
|
+
_context5.next = 22;
|
|
1468
|
+
return this.thirdPay(tradeType, dtoParams);
|
|
1469
|
+
|
|
1470
|
+
case 22:
|
|
1471
|
+
ret = _context5.sent;
|
|
1472
|
+
_ref13 = ret || {}, type = _ref13.type, data = _ref13.data, msg = _ref13.msg, code = _ref13.code;
|
|
1473
|
+
|
|
1474
|
+
if (!(type === true)) {
|
|
1475
|
+
_context5.next = 28;
|
|
1476
|
+
break;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
dtoParams = data;
|
|
1480
|
+
_context5.next = 30;
|
|
1483
1481
|
break;
|
|
1484
1482
|
|
|
1485
|
-
case
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1483
|
+
case 28:
|
|
1484
|
+
_message2.default.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
|
|
1485
|
+
return _context5.abrupt('return', false);
|
|
1486
|
+
|
|
1487
|
+
case 30:
|
|
1488
|
+
this.dtoParams = dtoParams;
|
|
1489
|
+
console.log('结算信息:', dtoParams);
|
|
1490
|
+
return _context5.abrupt('return', (0, _tplusApi.ccApi)({ dto: dtoParams, cip: IPMSG.query || "" }, '/retail/RetailPos/settle', false, false, { method: 'post', timeout_skip: true }).then(function (resp) {
|
|
1491
|
+
var _ref14 = resp || {},
|
|
1492
|
+
ID = _ref14.ID;
|
|
1493
|
+
|
|
1494
|
+
_this12.setDtoID(ID);
|
|
1495
|
+
_this12.billID = ID;
|
|
1496
|
+
_this12.paymode.checkList = [];
|
|
1489
1497
|
}));
|
|
1490
1498
|
|
|
1491
|
-
case
|
|
1499
|
+
case 33:
|
|
1492
1500
|
case 'end':
|
|
1493
1501
|
return _context5.stop();
|
|
1494
1502
|
}
|
|
@@ -1497,11 +1505,162 @@ var SettlementStore = (_class = function () {
|
|
|
1497
1505
|
}));
|
|
1498
1506
|
|
|
1499
1507
|
function save() {
|
|
1500
|
-
return
|
|
1508
|
+
return _ref12.apply(this, arguments);
|
|
1501
1509
|
}
|
|
1502
1510
|
|
|
1503
1511
|
return save;
|
|
1504
1512
|
}()
|
|
1513
|
+
|
|
1514
|
+
//裁剪二开支付数据
|
|
1515
|
+
|
|
1516
|
+
}, {
|
|
1517
|
+
key: 'removeThirdPayDto',
|
|
1518
|
+
value: function removeThirdPayDto(dto) {
|
|
1519
|
+
var data = (0, _extends3.default)({}, dto);
|
|
1520
|
+
delete data['DynamicPropertyKeys'];
|
|
1521
|
+
delete data['DynamicPropertyValues'];
|
|
1522
|
+
return data;
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
//二开支付
|
|
1526
|
+
|
|
1527
|
+
}, {
|
|
1528
|
+
key: 'thirdPay',
|
|
1529
|
+
value: function () {
|
|
1530
|
+
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(status, dto) {
|
|
1531
|
+
var cto, params, ret, _ref16, Code, Message, Result, _ref17, ThirdPaymentReturnInfo;
|
|
1532
|
+
|
|
1533
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1534
|
+
while (1) {
|
|
1535
|
+
switch (_context6.prev = _context6.next) {
|
|
1536
|
+
case 0:
|
|
1537
|
+
cto = this.removeThirdPayDto(dto);
|
|
1538
|
+
params = { TradeType: status, dto: cto };
|
|
1539
|
+
|
|
1540
|
+
console.log('刷卡信息:', (0, _stringify2.default)(params));
|
|
1541
|
+
_context6.next = 5;
|
|
1542
|
+
return new _promise2.default(function (resolve, reject) {
|
|
1543
|
+
_mutantsMicrofx.nativeMs.setIpcRendererMethod('ThirdPayment', (0, _extends3.default)({}, params), function (res) {
|
|
1544
|
+
return resolve(res);
|
|
1545
|
+
});
|
|
1546
|
+
});
|
|
1547
|
+
|
|
1548
|
+
case 5:
|
|
1549
|
+
ret = _context6.sent;
|
|
1550
|
+
|
|
1551
|
+
console.log('刷卡返回信息:', ret);
|
|
1552
|
+
ret = JSON.parse(ret);
|
|
1553
|
+
_ref16 = ret || {}, Code = _ref16.Code, Message = _ref16.Message, Result = _ref16.Result;
|
|
1554
|
+
|
|
1555
|
+
if (!(Code > 0)) {
|
|
1556
|
+
_context6.next = 13;
|
|
1557
|
+
break;
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
return _context6.abrupt('return', { type: false, data: null, msg: Message, code: Code });
|
|
1561
|
+
|
|
1562
|
+
case 13:
|
|
1563
|
+
if (!(status == '00')) {
|
|
1564
|
+
_context6.next = 19;
|
|
1565
|
+
break;
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
_ref17 = Result || {}, ThirdPaymentReturnInfo = _ref17.ThirdPaymentReturnInfo;
|
|
1569
|
+
|
|
1570
|
+
dto.RetailPaymentDetails.forEach(function (v) {
|
|
1571
|
+
if (v.ThirdPaymentInfo != null) {
|
|
1572
|
+
v.ThirdPaymentReturnInfo = ThirdPaymentReturnInfo;
|
|
1573
|
+
}
|
|
1574
|
+
});
|
|
1575
|
+
return _context6.abrupt('return', { type: true, data: dto, msg: Message, code: Code });
|
|
1576
|
+
|
|
1577
|
+
case 19:
|
|
1578
|
+
if (!(status == '02')) {
|
|
1579
|
+
_context6.next = 21;
|
|
1580
|
+
break;
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
return _context6.abrupt('return', { type: true, data: dto, msg: Message, code: Code });
|
|
1584
|
+
|
|
1585
|
+
case 21:
|
|
1586
|
+
case 'end':
|
|
1587
|
+
return _context6.stop();
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
}, _callee6, this);
|
|
1591
|
+
}));
|
|
1592
|
+
|
|
1593
|
+
function thirdPay(_x4, _x5) {
|
|
1594
|
+
return _ref15.apply(this, arguments);
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
return thirdPay;
|
|
1598
|
+
}()
|
|
1599
|
+
|
|
1600
|
+
//二开支付强制退款情况
|
|
1601
|
+
|
|
1602
|
+
}, {
|
|
1603
|
+
key: 'thirdPayRefund',
|
|
1604
|
+
value: function () {
|
|
1605
|
+
var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
|
1606
|
+
var _this13 = this;
|
|
1607
|
+
|
|
1608
|
+
var dto, pay, _enumController$getEn17, TradeType;
|
|
1609
|
+
|
|
1610
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1611
|
+
while (1) {
|
|
1612
|
+
switch (_context8.prev = _context8.next) {
|
|
1613
|
+
case 0:
|
|
1614
|
+
dto = this.dtoParams;
|
|
1615
|
+
pay = dto && dto.RetailPaymentDetails.filter(function (v) {
|
|
1616
|
+
return v.ThirdPaymentInfo;
|
|
1617
|
+
});
|
|
1618
|
+
|
|
1619
|
+
if (pay && pay.length > 0) {
|
|
1620
|
+
setTimeout(function () {
|
|
1621
|
+
_message2.default.warn("支付出现异常,将发起刷卡退款。", { duration: 4.5 });
|
|
1622
|
+
}, 1000);
|
|
1623
|
+
_enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(), TradeType = _enumController$getEn17.TradeType;
|
|
1624
|
+
|
|
1625
|
+
setTimeout((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7() {
|
|
1626
|
+
var ret, _ref20, msg;
|
|
1627
|
+
|
|
1628
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1629
|
+
while (1) {
|
|
1630
|
+
switch (_context7.prev = _context7.next) {
|
|
1631
|
+
case 0:
|
|
1632
|
+
_context7.next = 2;
|
|
1633
|
+
return _this13.thirdPay(TradeType.REFUND, dto);
|
|
1634
|
+
|
|
1635
|
+
case 2:
|
|
1636
|
+
ret = _context7.sent;
|
|
1637
|
+
_ref20 = ret || {}, msg = _ref20.msg;
|
|
1638
|
+
|
|
1639
|
+
console.log('\u5237\u5361\u652F\u4ED8\u9000\u6B3E:' + msg);
|
|
1640
|
+
|
|
1641
|
+
case 5:
|
|
1642
|
+
case 'end':
|
|
1643
|
+
return _context7.stop();
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
}, _callee7, _this13);
|
|
1647
|
+
})), 4500);
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
case 3:
|
|
1651
|
+
case 'end':
|
|
1652
|
+
return _context8.stop();
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
}, _callee8, this);
|
|
1656
|
+
}));
|
|
1657
|
+
|
|
1658
|
+
function thirdPayRefund() {
|
|
1659
|
+
return _ref18.apply(this, arguments);
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
return thirdPayRefund;
|
|
1663
|
+
}()
|
|
1505
1664
|
}, {
|
|
1506
1665
|
key: 'setDtoID',
|
|
1507
1666
|
value: function setDtoID(id) {
|
|
@@ -1510,35 +1669,35 @@ var SettlementStore = (_class = function () {
|
|
|
1510
1669
|
}, {
|
|
1511
1670
|
key: 'querySettleResult',
|
|
1512
1671
|
value: function () {
|
|
1513
|
-
var
|
|
1514
|
-
return _regenerator2.default.wrap(function
|
|
1672
|
+
var _ref21 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9() {
|
|
1673
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
1515
1674
|
while (1) {
|
|
1516
|
-
switch (
|
|
1675
|
+
switch (_context9.prev = _context9.next) {
|
|
1517
1676
|
case 0:
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1677
|
+
_context9.prev = 0;
|
|
1678
|
+
_context9.t0 = _promise2.default;
|
|
1679
|
+
_context9.next = 4;
|
|
1521
1680
|
return (0, _tplusApi.tApi)({ RetailCode: this.dto.Code }, 'chanjet.RE.newRetail.QuerySettleResult', false, false, { timeout_skip: true });
|
|
1522
1681
|
|
|
1523
1682
|
case 4:
|
|
1524
|
-
|
|
1525
|
-
return
|
|
1683
|
+
_context9.t1 = _context9.sent;
|
|
1684
|
+
return _context9.abrupt('return', _context9.t0.resolve.call(_context9.t0, _context9.t1));
|
|
1526
1685
|
|
|
1527
1686
|
case 8:
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
return
|
|
1687
|
+
_context9.prev = 8;
|
|
1688
|
+
_context9.t2 = _context9['catch'](0);
|
|
1689
|
+
return _context9.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
|
|
1531
1690
|
|
|
1532
1691
|
case 11:
|
|
1533
1692
|
case 'end':
|
|
1534
|
-
return
|
|
1693
|
+
return _context9.stop();
|
|
1535
1694
|
}
|
|
1536
1695
|
}
|
|
1537
|
-
},
|
|
1696
|
+
}, _callee9, this, [[0, 8]]);
|
|
1538
1697
|
}));
|
|
1539
1698
|
|
|
1540
1699
|
function querySettleResult() {
|
|
1541
|
-
return
|
|
1700
|
+
return _ref21.apply(this, arguments);
|
|
1542
1701
|
}
|
|
1543
1702
|
|
|
1544
1703
|
return querySettleResult;
|
|
@@ -1564,18 +1723,18 @@ var SettlementStore = (_class = function () {
|
|
|
1564
1723
|
}, {
|
|
1565
1724
|
key: 'validePwd',
|
|
1566
1725
|
value: function () {
|
|
1567
|
-
var
|
|
1568
|
-
var
|
|
1726
|
+
var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(value) {
|
|
1727
|
+
var _ref23, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, cardStatusEnum, result, count, _result;
|
|
1569
1728
|
|
|
1570
|
-
return _regenerator2.default.wrap(function
|
|
1729
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
1571
1730
|
while (1) {
|
|
1572
|
-
switch (
|
|
1731
|
+
switch (_context10.prev = _context10.next) {
|
|
1573
1732
|
case 0:
|
|
1574
|
-
|
|
1575
|
-
|
|
1733
|
+
_ref23 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref23.isNewRetailBCPos;
|
|
1734
|
+
_context10.prev = 1;
|
|
1576
1735
|
|
|
1577
1736
|
if (!isNewRetailBCPos) {
|
|
1578
|
-
|
|
1737
|
+
_context10.next = 33;
|
|
1579
1738
|
break;
|
|
1580
1739
|
}
|
|
1581
1740
|
|
|
@@ -1585,60 +1744,60 @@ var SettlementStore = (_class = function () {
|
|
|
1585
1744
|
memberStorageId = this.paymode.currentMode.meStorageCardId;
|
|
1586
1745
|
|
|
1587
1746
|
if (!cook2) {
|
|
1588
|
-
|
|
1747
|
+
_context10.next = 12;
|
|
1589
1748
|
break;
|
|
1590
1749
|
}
|
|
1591
1750
|
|
|
1592
1751
|
if (!cook2.hasOwnProperty(memberStorageId + "")) {
|
|
1593
|
-
|
|
1752
|
+
_context10.next = 12;
|
|
1594
1753
|
break;
|
|
1595
1754
|
}
|
|
1596
1755
|
|
|
1597
1756
|
if (!(cook2[memberStorageId] > 3)) {
|
|
1598
|
-
|
|
1757
|
+
_context10.next = 12;
|
|
1599
1758
|
break;
|
|
1600
1759
|
}
|
|
1601
1760
|
|
|
1602
1761
|
message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
|
|
1603
|
-
return
|
|
1762
|
+
return _context10.abrupt('return', _promise2.default.resolve(message));
|
|
1604
1763
|
|
|
1605
1764
|
case 12:
|
|
1606
1765
|
_paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId, cardStatusEnum = _paymode$currentMode.cardStatusEnum;
|
|
1607
1766
|
result = null;
|
|
1608
1767
|
|
|
1609
1768
|
if (!(cardTypeEnum === 'BALANCE_CARD')) {
|
|
1610
|
-
|
|
1769
|
+
_context10.next = 20;
|
|
1611
1770
|
break;
|
|
1612
1771
|
}
|
|
1613
1772
|
|
|
1614
|
-
|
|
1773
|
+
_context10.next = 17;
|
|
1615
1774
|
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
|
|
1616
1775
|
|
|
1617
1776
|
case 17:
|
|
1618
|
-
result =
|
|
1619
|
-
|
|
1777
|
+
result = _context10.sent;
|
|
1778
|
+
_context10.next = 29;
|
|
1620
1779
|
break;
|
|
1621
1780
|
|
|
1622
1781
|
case 20:
|
|
1623
1782
|
if (!(cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId)) {
|
|
1624
|
-
|
|
1783
|
+
_context10.next = 26;
|
|
1625
1784
|
break;
|
|
1626
1785
|
}
|
|
1627
1786
|
|
|
1628
|
-
|
|
1787
|
+
_context10.next = 23;
|
|
1629
1788
|
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1630
1789
|
|
|
1631
1790
|
case 23:
|
|
1632
|
-
result =
|
|
1633
|
-
|
|
1791
|
+
result = _context10.sent;
|
|
1792
|
+
_context10.next = 29;
|
|
1634
1793
|
break;
|
|
1635
1794
|
|
|
1636
1795
|
case 26:
|
|
1637
|
-
|
|
1796
|
+
_context10.next = 28;
|
|
1638
1797
|
return (0, _tplusApi.ccApi)({ password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1639
1798
|
|
|
1640
1799
|
case 28:
|
|
1641
|
-
result =
|
|
1800
|
+
result = _context10.sent;
|
|
1642
1801
|
|
|
1643
1802
|
case 29:
|
|
1644
1803
|
if (!result.data) {
|
|
@@ -1657,38 +1816,38 @@ var SettlementStore = (_class = function () {
|
|
|
1657
1816
|
this.setCookie('errorPwd', '', -1);
|
|
1658
1817
|
this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
|
|
1659
1818
|
}
|
|
1660
|
-
return
|
|
1819
|
+
return _context10.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
|
|
1661
1820
|
|
|
1662
1821
|
case 33:
|
|
1663
|
-
|
|
1822
|
+
_context10.next = 35;
|
|
1664
1823
|
return (0, _tplusApi.tApi)({ "CheckoutParams": {
|
|
1665
1824
|
"Idmember": value.id,
|
|
1666
1825
|
"Password": value.pwd
|
|
1667
1826
|
} }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
|
|
1668
1827
|
|
|
1669
1828
|
case 35:
|
|
1670
|
-
_result =
|
|
1671
|
-
return
|
|
1829
|
+
_result = _context10.sent;
|
|
1830
|
+
return _context10.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
|
|
1672
1831
|
|
|
1673
1832
|
case 37:
|
|
1674
|
-
|
|
1833
|
+
_context10.next = 42;
|
|
1675
1834
|
break;
|
|
1676
1835
|
|
|
1677
1836
|
case 39:
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
return
|
|
1837
|
+
_context10.prev = 39;
|
|
1838
|
+
_context10.t0 = _context10['catch'](1);
|
|
1839
|
+
return _context10.abrupt('return', "failed");
|
|
1681
1840
|
|
|
1682
1841
|
case 42:
|
|
1683
1842
|
case 'end':
|
|
1684
|
-
return
|
|
1843
|
+
return _context10.stop();
|
|
1685
1844
|
}
|
|
1686
1845
|
}
|
|
1687
|
-
},
|
|
1846
|
+
}, _callee10, this, [[1, 39]]);
|
|
1688
1847
|
}));
|
|
1689
1848
|
|
|
1690
|
-
function validePwd(
|
|
1691
|
-
return
|
|
1849
|
+
function validePwd(_x6) {
|
|
1850
|
+
return _ref22.apply(this, arguments);
|
|
1692
1851
|
}
|
|
1693
1852
|
|
|
1694
1853
|
return validePwd;
|
|
@@ -1698,7 +1857,7 @@ var SettlementStore = (_class = function () {
|
|
|
1698
1857
|
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'queryPwd', [_mobx.action], {
|
|
1699
1858
|
enumerable: true,
|
|
1700
1859
|
initializer: function initializer() {
|
|
1701
|
-
var
|
|
1860
|
+
var _this14 = this;
|
|
1702
1861
|
|
|
1703
1862
|
return function (newPass, newPassConfirm) {
|
|
1704
1863
|
if (!newPass || !newPassConfirm) {
|
|
@@ -1710,7 +1869,7 @@ var SettlementStore = (_class = function () {
|
|
|
1710
1869
|
var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
|
|
1711
1870
|
return (0, _tplusApi.ccApi)({
|
|
1712
1871
|
Idstore: idstore,
|
|
1713
|
-
meMemberId:
|
|
1872
|
+
meMemberId: _this14.paymode.currentMode.memberId,
|
|
1714
1873
|
oldPassword: null,
|
|
1715
1874
|
newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
|
|
1716
1875
|
dataSource: "POS"
|
|
@@ -1724,140 +1883,140 @@ var SettlementStore = (_class = function () {
|
|
|
1724
1883
|
}), _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], {
|
|
1725
1884
|
enumerable: true,
|
|
1726
1885
|
initializer: function initializer() {
|
|
1727
|
-
var
|
|
1886
|
+
var _this15 = this;
|
|
1728
1887
|
|
|
1729
1888
|
return function () {
|
|
1730
|
-
var
|
|
1889
|
+
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(_this) {
|
|
1731
1890
|
var _getLoginInfo, IdStore, StoreCode, resp;
|
|
1732
1891
|
|
|
1733
|
-
return _regenerator2.default.wrap(function
|
|
1892
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
1734
1893
|
while (1) {
|
|
1735
|
-
switch (
|
|
1894
|
+
switch (_context11.prev = _context11.next) {
|
|
1736
1895
|
case 0:
|
|
1737
|
-
_getLoginInfo =
|
|
1738
|
-
|
|
1739
|
-
return (0, _tplusApi.tApi)({ Idmember:
|
|
1896
|
+
_getLoginInfo = _this15.getLoginInfo(), IdStore = _getLoginInfo.IdStore, StoreCode = _getLoginInfo.StoreCode;
|
|
1897
|
+
_context11.next = 3;
|
|
1898
|
+
return (0, _tplusApi.tApi)({ Idmember: _this15.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
|
|
1740
1899
|
|
|
1741
1900
|
case 3:
|
|
1742
|
-
resp =
|
|
1901
|
+
resp = _context11.sent;
|
|
1743
1902
|
|
|
1744
1903
|
_this.member = resp;
|
|
1745
1904
|
_this.paymode.updateMemberStorageCardNo(resp.StorageCardNo, resp.WalletEnabled);
|
|
1746
|
-
return
|
|
1905
|
+
return _context11.abrupt('return', _promise2.default.resolve(resp));
|
|
1747
1906
|
|
|
1748
1907
|
case 7:
|
|
1749
1908
|
case 'end':
|
|
1750
|
-
return
|
|
1909
|
+
return _context11.stop();
|
|
1751
1910
|
}
|
|
1752
1911
|
}
|
|
1753
|
-
},
|
|
1912
|
+
}, _callee11, _this15);
|
|
1754
1913
|
}));
|
|
1755
1914
|
|
|
1756
|
-
return function (
|
|
1757
|
-
return
|
|
1915
|
+
return function (_x7) {
|
|
1916
|
+
return _ref24.apply(this, arguments);
|
|
1758
1917
|
};
|
|
1759
1918
|
}();
|
|
1760
1919
|
}
|
|
1761
1920
|
}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'updateCurrentMode', [_mobx.action], {
|
|
1762
1921
|
enumerable: true,
|
|
1763
1922
|
initializer: function initializer() {
|
|
1764
|
-
var
|
|
1923
|
+
var _this16 = this;
|
|
1765
1924
|
|
|
1766
1925
|
return function () {
|
|
1767
|
-
var
|
|
1926
|
+
var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(memberId) {
|
|
1768
1927
|
var result;
|
|
1769
|
-
return _regenerator2.default.wrap(function
|
|
1928
|
+
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
|
1770
1929
|
while (1) {
|
|
1771
|
-
switch (
|
|
1930
|
+
switch (_context12.prev = _context12.next) {
|
|
1772
1931
|
case 0:
|
|
1773
|
-
|
|
1932
|
+
_context12.next = 2;
|
|
1774
1933
|
return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId + '/' + true, false, false, { method: 'get' });
|
|
1775
1934
|
|
|
1776
1935
|
case 2:
|
|
1777
|
-
result =
|
|
1936
|
+
result = _context12.sent;
|
|
1778
1937
|
|
|
1779
1938
|
if (!(result && result.data.length)) {
|
|
1780
|
-
|
|
1939
|
+
_context12.next = 20;
|
|
1781
1940
|
break;
|
|
1782
1941
|
}
|
|
1783
1942
|
|
|
1784
1943
|
if (!(result.data.length === 1)) {
|
|
1785
|
-
|
|
1944
|
+
_context12.next = 9;
|
|
1786
1945
|
break;
|
|
1787
1946
|
}
|
|
1788
1947
|
|
|
1789
|
-
|
|
1790
|
-
return
|
|
1948
|
+
_this16.paymode.updateCardInfo(result.data[0]);
|
|
1949
|
+
return _context12.abrupt('return', result.data);
|
|
1791
1950
|
|
|
1792
1951
|
case 9:
|
|
1793
1952
|
if (!(result.data && result.data.length === 1)) {
|
|
1794
|
-
|
|
1953
|
+
_context12.next = 14;
|
|
1795
1954
|
break;
|
|
1796
1955
|
}
|
|
1797
1956
|
|
|
1798
|
-
|
|
1799
|
-
return
|
|
1957
|
+
_this16.paymode.updateCardInfo(result.data[0]);
|
|
1958
|
+
return _context12.abrupt('return', result.data);
|
|
1800
1959
|
|
|
1801
1960
|
case 14:
|
|
1802
1961
|
if (!(result.data && result.data.length > 1)) {
|
|
1803
|
-
|
|
1962
|
+
_context12.next = 18;
|
|
1804
1963
|
break;
|
|
1805
1964
|
}
|
|
1806
1965
|
|
|
1807
|
-
return
|
|
1966
|
+
return _context12.abrupt('return', result.data);
|
|
1808
1967
|
|
|
1809
1968
|
case 18:
|
|
1810
1969
|
_message2.default.warn('没有可用储值卡!');
|
|
1811
|
-
return
|
|
1970
|
+
return _context12.abrupt('return', false);
|
|
1812
1971
|
|
|
1813
1972
|
case 20:
|
|
1814
1973
|
case 'end':
|
|
1815
|
-
return
|
|
1974
|
+
return _context12.stop();
|
|
1816
1975
|
}
|
|
1817
1976
|
}
|
|
1818
|
-
},
|
|
1977
|
+
}, _callee12, _this16);
|
|
1819
1978
|
}));
|
|
1820
1979
|
|
|
1821
|
-
return function (
|
|
1822
|
-
return
|
|
1980
|
+
return function (_x8) {
|
|
1981
|
+
return _ref25.apply(this, arguments);
|
|
1823
1982
|
};
|
|
1824
1983
|
}();
|
|
1825
1984
|
}
|
|
1826
1985
|
}), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'updateCardInfo', [_mobx.action], {
|
|
1827
1986
|
enumerable: true,
|
|
1828
1987
|
initializer: function initializer() {
|
|
1829
|
-
var
|
|
1988
|
+
var _this17 = this;
|
|
1830
1989
|
|
|
1831
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1990
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13() {
|
|
1832
1991
|
var address, result;
|
|
1833
|
-
return _regenerator2.default.wrap(function
|
|
1992
|
+
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
|
1834
1993
|
while (1) {
|
|
1835
|
-
switch (
|
|
1994
|
+
switch (_context13.prev = _context13.next) {
|
|
1836
1995
|
case 0:
|
|
1837
|
-
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' +
|
|
1838
|
-
|
|
1996
|
+
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + _this17.paymode.currentMode.storageCardNo;
|
|
1997
|
+
_context13.next = 3;
|
|
1839
1998
|
return (0, _tplusApi.ccApi)({}, address, false, false, { method: 'get', timeout_skip: true });
|
|
1840
1999
|
|
|
1841
2000
|
case 3:
|
|
1842
|
-
result =
|
|
2001
|
+
result = _context13.sent;
|
|
1843
2002
|
|
|
1844
|
-
|
|
2003
|
+
_this17.paymode.updateCardInfo(result.data);
|
|
1845
2004
|
|
|
1846
2005
|
case 5:
|
|
1847
2006
|
case 'end':
|
|
1848
|
-
return
|
|
2007
|
+
return _context13.stop();
|
|
1849
2008
|
}
|
|
1850
2009
|
}
|
|
1851
|
-
},
|
|
2010
|
+
}, _callee13, _this17);
|
|
1852
2011
|
}));
|
|
1853
2012
|
}
|
|
1854
2013
|
}), _applyDecoratedDescriptor(_class.prototype, 'addDjq', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addDjq'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeFocusOnly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeFocusOnly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeClickFocusOnly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeClickFocusOnly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeValue'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'addPayDirectly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addPayDirectly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'addPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addPay'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'delPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'delPay'), _class.prototype), _descriptor5 = _applyDecoratedDescriptor(_class.prototype, 'setVoucherDate', [_mobx.action], {
|
|
1855
2014
|
enumerable: true,
|
|
1856
2015
|
initializer: function initializer() {
|
|
1857
|
-
var
|
|
2016
|
+
var _this18 = this;
|
|
1858
2017
|
|
|
1859
2018
|
return function () {
|
|
1860
|
-
|
|
2019
|
+
_this18.dto.VoucherDate = new Date();
|
|
1861
2020
|
};
|
|
1862
2021
|
}
|
|
1863
2022
|
}), _applyDecoratedDescriptor(_class.prototype, 'setDtoID', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'setDtoID'), _class.prototype)), _class);
|
|
@@ -1958,7 +2117,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1958
2117
|
}, {
|
|
1959
2118
|
key: 'calcDjqCheckValue',
|
|
1960
2119
|
value: function calcDjqCheckValue(q1, dto, params) {
|
|
1961
|
-
var
|
|
2120
|
+
var _this19 = this;
|
|
1962
2121
|
|
|
1963
2122
|
var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
|
|
1964
2123
|
var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
|
|
@@ -1972,12 +2131,12 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1972
2131
|
this.checkList = [];
|
|
1973
2132
|
}
|
|
1974
2133
|
|
|
1975
|
-
var
|
|
1976
|
-
isNewRetailBCPos =
|
|
2134
|
+
var _ref27 = _mutantsUtil.platform || {},
|
|
2135
|
+
isNewRetailBCPos = _ref27.isNewRetailBCPos;
|
|
1977
2136
|
|
|
1978
|
-
var _enumController$
|
|
1979
|
-
PayStyle = _enumController$
|
|
1980
|
-
Differentiate = _enumController$
|
|
2137
|
+
var _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(),
|
|
2138
|
+
PayStyle = _enumController$getEn18.PayStyle,
|
|
2139
|
+
Differentiate = _enumController$getEn18.Differentiate;
|
|
1981
2140
|
|
|
1982
2141
|
if (q1) {
|
|
1983
2142
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
@@ -2005,7 +2164,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2005
2164
|
if (!q1.checked) {
|
|
2006
2165
|
this.checkList.forEach(function (ele, i) {
|
|
2007
2166
|
if (ele.id === q1.id) {
|
|
2008
|
-
|
|
2167
|
+
_this19.checkList.splice(i, 1);
|
|
2009
2168
|
}
|
|
2010
2169
|
});
|
|
2011
2170
|
} else {
|
|
@@ -2077,24 +2236,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2077
2236
|
if (result && result.length != 0) {
|
|
2078
2237
|
result.forEach(function (element, index) {
|
|
2079
2238
|
var djq1 = false;
|
|
2080
|
-
|
|
2239
|
+
_this19.currentMode.djqs.forEach(function (djq) {
|
|
2081
2240
|
if (element.id === djq.id) {
|
|
2082
2241
|
djq1 = true;
|
|
2083
2242
|
}
|
|
2084
2243
|
});
|
|
2085
2244
|
|
|
2086
|
-
var
|
|
2087
|
-
couponCode =
|
|
2088
|
-
name =
|
|
2089
|
-
tieredAmountResult =
|
|
2090
|
-
fromDate =
|
|
2091
|
-
dateMount =
|
|
2092
|
-
promoMethodEnum =
|
|
2093
|
-
discountPct =
|
|
2094
|
-
nominalAmount =
|
|
2095
|
-
promoId =
|
|
2096
|
-
id =
|
|
2097
|
-
doorsill =
|
|
2245
|
+
var _ref28 = element || {},
|
|
2246
|
+
couponCode = _ref28.couponCode,
|
|
2247
|
+
name = _ref28.name,
|
|
2248
|
+
tieredAmountResult = _ref28.tieredAmountResult,
|
|
2249
|
+
fromDate = _ref28.fromDate,
|
|
2250
|
+
dateMount = _ref28.dateMount,
|
|
2251
|
+
promoMethodEnum = _ref28.promoMethodEnum,
|
|
2252
|
+
discountPct = _ref28.discountPct,
|
|
2253
|
+
nominalAmount = _ref28.nominalAmount,
|
|
2254
|
+
promoId = _ref28.promoId,
|
|
2255
|
+
id = _ref28.id,
|
|
2256
|
+
doorsill = _ref28.doorsill;
|
|
2098
2257
|
|
|
2099
2258
|
var condValue = tieredAmountResult.condValue,
|
|
2100
2259
|
promoDiscount = tieredAmountResult.promoDiscount,
|
|
@@ -2122,10 +2281,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2122
2281
|
// couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
|
|
2123
2282
|
// id
|
|
2124
2283
|
// })
|
|
2125
|
-
|
|
2284
|
+
_this19.addDjqs(couponCode, name, true, nominalAmount, promoDiscount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
|
|
2126
2285
|
djq1 = false;
|
|
2127
2286
|
} else {
|
|
2128
|
-
|
|
2287
|
+
_this19.setCouponNum(element.id, couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
|
|
2129
2288
|
// this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
|
|
2130
2289
|
// djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
|
|
2131
2290
|
}
|
|
@@ -2138,11 +2297,11 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2138
2297
|
}, {
|
|
2139
2298
|
key: 'calcDjqValue',
|
|
2140
2299
|
value: function calcDjqValue(q1) {
|
|
2141
|
-
var
|
|
2142
|
-
isNewRetailBCPos =
|
|
2300
|
+
var _ref29 = _mutantsUtil.platform || {},
|
|
2301
|
+
isNewRetailBCPos = _ref29.isNewRetailBCPos;
|
|
2143
2302
|
|
|
2144
|
-
var _enumController$
|
|
2145
|
-
Differentiate = _enumController$
|
|
2303
|
+
var _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(),
|
|
2304
|
+
Differentiate = _enumController$getEn19.Differentiate;
|
|
2146
2305
|
|
|
2147
2306
|
if (q1) {
|
|
2148
2307
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
@@ -2204,8 +2363,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2204
2363
|
this.currentMode.errinfo = '';
|
|
2205
2364
|
var sum = this.amount;
|
|
2206
2365
|
|
|
2207
|
-
var _enumController$
|
|
2208
|
-
PayStyle = _enumController$
|
|
2366
|
+
var _enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(),
|
|
2367
|
+
PayStyle = _enumController$getEn20.PayStyle;
|
|
2209
2368
|
|
|
2210
2369
|
this.thePaymodes && this.thePaymodes.forEach(function (mode) {
|
|
2211
2370
|
if (mode.paymentType === PayStyle.hyczk) {
|
|
@@ -2229,30 +2388,29 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2229
2388
|
}, {
|
|
2230
2389
|
key: 'setPaymodes',
|
|
2231
2390
|
value: function () {
|
|
2232
|
-
var
|
|
2233
|
-
var
|
|
2391
|
+
var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14(type, isIntegralExchange) {
|
|
2392
|
+
var _this20 = this;
|
|
2234
2393
|
|
|
2235
|
-
var _enumController$
|
|
2394
|
+
var _enumController$getEn21, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
|
|
2236
2395
|
|
|
2237
|
-
return _regenerator2.default.wrap(function
|
|
2396
|
+
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
|
2238
2397
|
while (1) {
|
|
2239
|
-
switch (
|
|
2398
|
+
switch (_context14.prev = _context14.next) {
|
|
2240
2399
|
case 0:
|
|
2241
|
-
_enumController$
|
|
2400
|
+
_enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn21.settleStyleType, PayStyle = _enumController$getEn21.PayStyle;
|
|
2242
2401
|
memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
|
|
2243
2402
|
param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
|
|
2244
|
-
|
|
2403
|
+
_context14.next = 5;
|
|
2245
2404
|
return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
|
|
2246
2405
|
|
|
2247
2406
|
case 5:
|
|
2248
|
-
modes =
|
|
2407
|
+
modes = _context14.sent;
|
|
2249
2408
|
|
|
2250
2409
|
if (modes) {
|
|
2251
2410
|
(0, _mobx.runInAction)(function () {
|
|
2252
2411
|
var paymodes = [];
|
|
2253
2412
|
(0, _each3.default)(modes.SettleStyles, function (mode, index) {
|
|
2254
2413
|
//产品需求确认会员储值卡结算方式前端展示统一调整为“储值卡" tuzha by 2020-07-08
|
|
2255
|
-
|
|
2256
2414
|
if (mode.Code == PayStyle.hyczk) {
|
|
2257
2415
|
mode.Name = '储值卡';
|
|
2258
2416
|
}
|
|
@@ -2267,24 +2425,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2267
2425
|
idBankAccount: mode.IdBankAccount,
|
|
2268
2426
|
exchangeRate: mode.Currency ? mode.Currency.ExchangeRate : 1,
|
|
2269
2427
|
idCurrency: mode.Currency ? mode.Currency.ID : -1,
|
|
2270
|
-
calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88"
|
|
2428
|
+
calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88",
|
|
2429
|
+
thridPayment: mode.ThirdPaymentInfo
|
|
2271
2430
|
});
|
|
2272
2431
|
});
|
|
2273
|
-
|
|
2274
|
-
//modes.QuickSettleStyles
|
|
2432
|
+
_this20.paymodes = paymodes;
|
|
2275
2433
|
});
|
|
2276
2434
|
}
|
|
2277
2435
|
|
|
2278
2436
|
case 7:
|
|
2279
2437
|
case 'end':
|
|
2280
|
-
return
|
|
2438
|
+
return _context14.stop();
|
|
2281
2439
|
}
|
|
2282
2440
|
}
|
|
2283
|
-
},
|
|
2441
|
+
}, _callee14, this);
|
|
2284
2442
|
}));
|
|
2285
2443
|
|
|
2286
|
-
function setPaymodes(
|
|
2287
|
-
return
|
|
2444
|
+
function setPaymodes(_x9, _x10) {
|
|
2445
|
+
return _ref30.apply(this, arguments);
|
|
2288
2446
|
}
|
|
2289
2447
|
|
|
2290
2448
|
return setPaymodes;
|
|
@@ -2339,21 +2497,22 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2339
2497
|
}), _applyDecoratedDescriptor(_class3.prototype, 'clean', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clean'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'clear', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clear'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcReserved', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcReserved'), _class3.prototype), _descriptor13 = _applyDecoratedDescriptor(_class3.prototype, 'calcCheckList', [_mobx.action], {
|
|
2340
2498
|
enumerable: true,
|
|
2341
2499
|
initializer: function initializer() {
|
|
2342
|
-
var
|
|
2500
|
+
var _this21 = this;
|
|
2343
2501
|
|
|
2344
2502
|
return function () {
|
|
2345
|
-
|
|
2503
|
+
_this21.checkList = [];
|
|
2346
2504
|
};
|
|
2347
2505
|
}
|
|
2348
2506
|
}), _applyDecoratedDescriptor(_class3.prototype, 'updateMemberStorageCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'updateMemberStorageCardNo'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'updateCardInfo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'updateCardInfo'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype), _descriptor14 = _applyDecoratedDescriptor(_class3.prototype, 'setCouponNum', [_mobx.action], {
|
|
2349
2507
|
enumerable: true,
|
|
2350
2508
|
initializer: function initializer() {
|
|
2351
|
-
var
|
|
2509
|
+
var _this22 = this;
|
|
2352
2510
|
|
|
2353
2511
|
return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
|
|
2354
|
-
|
|
2512
|
+
_this22.currentMode.djqs.forEach(function (ele) {
|
|
2355
2513
|
if (ele.id === id) {
|
|
2356
|
-
|
|
2514
|
+
ele.amount = promoDiscount;
|
|
2515
|
+
promoMethodEnum == "CASH_COUPON" && (ele.nominalAmount = nominalAmount);
|
|
2357
2516
|
ele.couponCategoryEnum = couponNum;
|
|
2358
2517
|
var IsEnable = ele.couponCategoryEnum === 'RIGUP' || ele.couponCategoryEnum === 'UN_MATCH' || ele.couponCategoryEnum === "PREPARING" || ele.couponCategoryEnum === 'PROMO_LIMITED' || ele.couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
|
|
2359
2518
|
ele.IsEnable = IsEnable;
|
|
@@ -2364,13 +2523,14 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2364
2523
|
}), _descriptor15 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
|
|
2365
2524
|
enumerable: true,
|
|
2366
2525
|
initializer: function initializer() {
|
|
2367
|
-
var
|
|
2526
|
+
var _this23 = this;
|
|
2368
2527
|
|
|
2369
|
-
return function (promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
|
|
2528
|
+
return function (promoCouponCode, name, IsEnable, nominalAmount, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
|
|
2370
2529
|
var djq = {
|
|
2371
2530
|
promoCouponCode: promoCouponCode,
|
|
2372
2531
|
name: name,
|
|
2373
2532
|
IsEnable: IsEnable,
|
|
2533
|
+
nominalAmount: nominalAmount,
|
|
2374
2534
|
amount: amount,
|
|
2375
2535
|
doorsill: doorsill,
|
|
2376
2536
|
LastTS: LastTS,
|
|
@@ -2386,13 +2546,13 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2386
2546
|
couponCategoryEnum: couponCategoryEnum,
|
|
2387
2547
|
id: id
|
|
2388
2548
|
};
|
|
2389
|
-
|
|
2549
|
+
_this23.currentMode.djqs.push(djq);
|
|
2390
2550
|
};
|
|
2391
2551
|
}
|
|
2392
2552
|
}), _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);
|
|
2393
2553
|
var Member = exports.Member = (_class5 = function () {
|
|
2394
2554
|
function Member(m) {
|
|
2395
|
-
var
|
|
2555
|
+
var _this24 = this;
|
|
2396
2556
|
|
|
2397
2557
|
(0, _classCallCheck3.default)(this, Member);
|
|
2398
2558
|
|
|
@@ -2415,15 +2575,15 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2415
2575
|
return key == 'canusedbalancestorage';
|
|
2416
2576
|
});
|
|
2417
2577
|
|
|
2418
|
-
var
|
|
2419
|
-
isNewRetailBCPos =
|
|
2578
|
+
var _ref31 = _mutantsUtil.platform || {},
|
|
2579
|
+
isNewRetailBCPos = _ref31.isNewRetailBCPos;
|
|
2420
2580
|
|
|
2421
2581
|
(0, _mobx.runInAction)(function () {
|
|
2422
|
-
|
|
2582
|
+
_this24.cardNo = m.CardCode;
|
|
2423
2583
|
if (index >= 0) {
|
|
2424
|
-
|
|
2584
|
+
_this24.balance = parseFloat(m.DynamicPropertyValues[index]);
|
|
2425
2585
|
} else {
|
|
2426
|
-
|
|
2586
|
+
_this24.balance = _this24.rawbalance;
|
|
2427
2587
|
}
|
|
2428
2588
|
});
|
|
2429
2589
|
this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;
|