tplus-components-touch 3.33.1 → 3.33.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/modalWraper/index.js +1 -1
- package/dist/components/modalWraper/index.js.map +1 -1
- package/dist/components/settlement/settlement.js +1 -1
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +22 -1
- package/dist/components/settlement/settlementStore.js +385 -271
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/package.json +35 -35
|
@@ -427,6 +427,45 @@ var SettlementStore = (_class = function () {
|
|
|
427
427
|
};
|
|
428
428
|
}();
|
|
429
429
|
|
|
430
|
+
this.repeatStorageModal = function (content) {
|
|
431
|
+
return new _promise2.default(function (resolve, reject) {
|
|
432
|
+
_tplusComponentsTouch.ModalWraper.confirm({
|
|
433
|
+
title: '',
|
|
434
|
+
okText: '继续储值',
|
|
435
|
+
className: 'repeat-modal',
|
|
436
|
+
zIndex: 1007,
|
|
437
|
+
content: content,
|
|
438
|
+
onOk: function () {
|
|
439
|
+
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
|
|
440
|
+
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
441
|
+
while (1) {
|
|
442
|
+
switch (_context2.prev = _context2.next) {
|
|
443
|
+
case 0:
|
|
444
|
+
_context2.next = 2;
|
|
445
|
+
return _this2.saveMember();
|
|
446
|
+
|
|
447
|
+
case 2:
|
|
448
|
+
resolve(true);
|
|
449
|
+
|
|
450
|
+
case 3:
|
|
451
|
+
case 'end':
|
|
452
|
+
return _context2.stop();
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}, _callee2, _this2);
|
|
456
|
+
}));
|
|
457
|
+
|
|
458
|
+
return function onOk() {
|
|
459
|
+
return _ref5.apply(this, arguments);
|
|
460
|
+
};
|
|
461
|
+
}(),
|
|
462
|
+
onCancel: function onCancel() {
|
|
463
|
+
resolve(false);
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
});
|
|
467
|
+
};
|
|
468
|
+
|
|
430
469
|
this.checkIntegralExchangeReturn = function (id) {
|
|
431
470
|
return new _promise2.default(function (resolve, reject) {
|
|
432
471
|
(0, _tplusApi.tApi)({ param: { refVoucherId: id } }, 'chanjet.RE.NewPos.GetNewIntegralExchange', false, false, { timeout_skip: true }).then(function (resp) {
|
|
@@ -542,8 +581,8 @@ var SettlementStore = (_class = function () {
|
|
|
542
581
|
var _enumController$getEn5 = _mutantsUtil.enumController.getEnumOj(),
|
|
543
582
|
PayStyle = _enumController$getEn5.PayStyle;
|
|
544
583
|
|
|
545
|
-
var
|
|
546
|
-
isNewRetailBCPos =
|
|
584
|
+
var _ref6 = _mutantsUtil.platform || {},
|
|
585
|
+
isNewRetailBCPos = _ref6.isNewRetailBCPos;
|
|
547
586
|
|
|
548
587
|
console.log(this.dto, 'dto==========');
|
|
549
588
|
this.paymode.checkList = [];
|
|
@@ -568,14 +607,14 @@ var SettlementStore = (_class = function () {
|
|
|
568
607
|
if (themode.paymentType == PayStyle.djq) {
|
|
569
608
|
(0, _each3.default)(_this5.dto.RetailCouponDetails, function (djq) {
|
|
570
609
|
if (isNewRetailBCPos) {
|
|
571
|
-
var
|
|
572
|
-
displayText =
|
|
573
|
-
promoRuleId =
|
|
574
|
-
dateMount =
|
|
575
|
-
promoMethodEnum =
|
|
576
|
-
discountPct =
|
|
577
|
-
promoId =
|
|
578
|
-
id =
|
|
610
|
+
var _ref7 = djq || {},
|
|
611
|
+
displayText = _ref7.displayText,
|
|
612
|
+
promoRuleId = _ref7.promoRuleId,
|
|
613
|
+
dateMount = _ref7.dateMount,
|
|
614
|
+
promoMethodEnum = _ref7.promoMethodEnum,
|
|
615
|
+
discountPct = _ref7.discountPct,
|
|
616
|
+
promoId = _ref7.promoId,
|
|
617
|
+
id = _ref7.id;
|
|
579
618
|
|
|
580
619
|
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false, _this5.dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, null, id, true);
|
|
581
620
|
return;
|
|
@@ -683,44 +722,44 @@ var SettlementStore = (_class = function () {
|
|
|
683
722
|
var IdStore = this.storeInfo.storeID;
|
|
684
723
|
var StoreCode = this.storeInfo.storeCode; //_find(this.storeInfo.storeInfos,(store)=>{return store.ID==IdStore;}).Code;
|
|
685
724
|
|
|
686
|
-
var
|
|
687
|
-
isNewRetailBCPos =
|
|
725
|
+
var _ref8 = _mutantsUtil.platform || {},
|
|
726
|
+
isNewRetailBCPos = _ref8.isNewRetailBCPos;
|
|
688
727
|
|
|
689
728
|
var address = '';
|
|
690
729
|
if (isNewRetailBCPos) {
|
|
691
730
|
// address = '/member/memberProfile/FindByStorageCode/'+v;
|
|
692
731
|
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + v + '/' + true;
|
|
693
732
|
return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function () {
|
|
694
|
-
var
|
|
733
|
+
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(result) {
|
|
695
734
|
var data, m;
|
|
696
|
-
return _regenerator2.default.wrap(function
|
|
735
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
697
736
|
while (1) {
|
|
698
|
-
switch (
|
|
737
|
+
switch (_context3.prev = _context3.next) {
|
|
699
738
|
case 0:
|
|
700
739
|
data = result.data;
|
|
701
740
|
m = data && data.length && data[0];
|
|
702
741
|
|
|
703
742
|
if (!(result && result.data.length)) {
|
|
704
|
-
|
|
743
|
+
_context3.next = 25;
|
|
705
744
|
break;
|
|
706
745
|
}
|
|
707
746
|
|
|
708
747
|
if (!(result.data.length === 1)) {
|
|
709
|
-
|
|
748
|
+
_context3.next = 14;
|
|
710
749
|
break;
|
|
711
750
|
}
|
|
712
751
|
|
|
713
752
|
if (!(m.CardTypeEnum === 'BALANCE_CARD')) {
|
|
714
|
-
|
|
753
|
+
_context3.next = 10;
|
|
715
754
|
break;
|
|
716
755
|
}
|
|
717
756
|
|
|
718
757
|
_this7.paymode.updateCardInfo(m);
|
|
719
758
|
_this7.handleCzkData(m);
|
|
720
|
-
return
|
|
759
|
+
return _context3.abrupt('return', result.data);
|
|
721
760
|
|
|
722
761
|
case 10:
|
|
723
|
-
|
|
762
|
+
_context3.next = 12;
|
|
724
763
|
return (0, _tplusApi.ccApi)({ dto: _this7.dto, meStorageCardId: m.MeStorageCardId }, '/retail/RetailPos/validateRetailStorageCard', false, false).then(function (result1) {
|
|
725
764
|
var data1 = result1.data ? JSON.parse(result1.data)[0] : {};
|
|
726
765
|
if (data1.enable) {
|
|
@@ -733,40 +772,40 @@ var SettlementStore = (_class = function () {
|
|
|
733
772
|
});
|
|
734
773
|
|
|
735
774
|
case 12:
|
|
736
|
-
|
|
775
|
+
_context3.next = 25;
|
|
737
776
|
break;
|
|
738
777
|
|
|
739
778
|
case 14:
|
|
740
779
|
if (!(result.data && result.data.length === 1)) {
|
|
741
|
-
|
|
780
|
+
_context3.next = 19;
|
|
742
781
|
break;
|
|
743
782
|
}
|
|
744
783
|
|
|
745
784
|
_this7.paymode.updateCardInfo(result.data[0]);
|
|
746
|
-
return
|
|
785
|
+
return _context3.abrupt('return', result.data);
|
|
747
786
|
|
|
748
787
|
case 19:
|
|
749
788
|
if (!(result.data && result.data.length > 1)) {
|
|
750
|
-
|
|
789
|
+
_context3.next = 23;
|
|
751
790
|
break;
|
|
752
791
|
}
|
|
753
792
|
|
|
754
|
-
return
|
|
793
|
+
return _context3.abrupt('return', result.data);
|
|
755
794
|
|
|
756
795
|
case 23:
|
|
757
796
|
_message2.default.warn('没有可用储值卡!');
|
|
758
|
-
return
|
|
797
|
+
return _context3.abrupt('return', false);
|
|
759
798
|
|
|
760
799
|
case 25:
|
|
761
800
|
case 'end':
|
|
762
|
-
return
|
|
801
|
+
return _context3.stop();
|
|
763
802
|
}
|
|
764
803
|
}
|
|
765
|
-
},
|
|
804
|
+
}, _callee3, _this7);
|
|
766
805
|
}));
|
|
767
806
|
|
|
768
807
|
return function (_x2) {
|
|
769
|
-
return
|
|
808
|
+
return _ref9.apply(this, arguments);
|
|
770
809
|
};
|
|
771
810
|
}()
|
|
772
811
|
// result.data.forEach((m) => {
|
|
@@ -1068,83 +1107,158 @@ var SettlementStore = (_class = function () {
|
|
|
1068
1107
|
this.paymode.currentFocus = -1;
|
|
1069
1108
|
this.paymode.calcReserved();
|
|
1070
1109
|
}
|
|
1110
|
+
|
|
1111
|
+
// 获取储值是否重复, 在commit方法中使用
|
|
1112
|
+
|
|
1113
|
+
}, {
|
|
1114
|
+
key: 'findStorageBillValidate',
|
|
1115
|
+
value: function findStorageBillValidate() {
|
|
1116
|
+
var _this10 = this;
|
|
1117
|
+
|
|
1118
|
+
var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
|
|
1119
|
+
PayStyle = _enumController$getEn14.PayStyle;
|
|
1120
|
+
|
|
1121
|
+
(0, _mobx.runInAction)(function () {
|
|
1122
|
+
_this10.dto.StorageMutiSettleDetails = [];
|
|
1123
|
+
var thePaymodes = _this10.newStyle ? (0, _filter3.default)(_this10.paymode.thePaymodes, function (mode) {
|
|
1124
|
+
return parseFloat(mode.value) != 0;
|
|
1125
|
+
}) : _this10.paymode.thePaymodes;
|
|
1126
|
+
(0, _each3.default)(thePaymodes, function (mode) {
|
|
1127
|
+
var themode = (0, _find3.default)(_this10.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1128
|
+
|
|
1129
|
+
var value = parseFloat(mode.value);
|
|
1130
|
+
var giveChange = null;
|
|
1131
|
+
if (mode.paymentType == PayStyle.xianjin && _this10.paymode.receivable < 0 && value > Math.abs(_this10.paymode.receivable)) {
|
|
1132
|
+
value = Math.Add(value, _this10.paymode.receivable);
|
|
1133
|
+
giveChange = Math.abs(_this10.paymode.receivable);
|
|
1134
|
+
}
|
|
1135
|
+
_this10.dto.StorageMutiSettleDetails.push({
|
|
1136
|
+
Code: mode.paymethodId,
|
|
1137
|
+
StorageAmount: value,
|
|
1138
|
+
GiveChange: giveChange,
|
|
1139
|
+
IdsettleStyle: themode.idSettleStyle,
|
|
1140
|
+
IdbankAccount: themode.idBankAccount,
|
|
1141
|
+
PaymentCode: mode.authCode,
|
|
1142
|
+
DynamicPropertyKeys: [],
|
|
1143
|
+
DynamicPropertyValues: [],
|
|
1144
|
+
DataSource: { Id: _this10.dataSource }
|
|
1145
|
+
});
|
|
1146
|
+
});
|
|
1147
|
+
});
|
|
1148
|
+
return (0, _tplusApi.ccApi)((0, _extends3.default)({}, this.dto), '/marketingtool/Storage/findStorageBillValidate', false, false);
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
//判断是否重复弹框
|
|
1152
|
+
|
|
1071
1153
|
}, {
|
|
1072
1154
|
key: 'commit',
|
|
1073
1155
|
value: function () {
|
|
1074
|
-
var
|
|
1075
|
-
var
|
|
1156
|
+
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(bTest) {
|
|
1157
|
+
var _ref11, isNewRetailBCPos, ret, _ref12, _ref12$data, code, returnMsg, state;
|
|
1076
1158
|
|
|
1077
|
-
return _regenerator2.default.wrap(function
|
|
1159
|
+
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
1078
1160
|
while (1) {
|
|
1079
|
-
switch (
|
|
1161
|
+
switch (_context4.prev = _context4.next) {
|
|
1080
1162
|
case 0:
|
|
1081
1163
|
console.log('settlementStore.commit开始,参数:' + bTest);
|
|
1082
1164
|
|
|
1083
1165
|
if (!bTest) {
|
|
1084
|
-
|
|
1166
|
+
_context4.next = 3;
|
|
1085
1167
|
break;
|
|
1086
1168
|
}
|
|
1087
1169
|
|
|
1088
|
-
return
|
|
1170
|
+
return _context4.abrupt('return', _promise2.default.resolve(true));
|
|
1089
1171
|
|
|
1090
1172
|
case 3:
|
|
1091
|
-
|
|
1092
|
-
|
|
1173
|
+
_ref11 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref11.isNewRetailBCPos;
|
|
1174
|
+
_context4.prev = 4;
|
|
1093
1175
|
|
|
1094
1176
|
if (!(this.type == 1)) {
|
|
1095
|
-
|
|
1177
|
+
_context4.next = 24;
|
|
1096
1178
|
break;
|
|
1097
1179
|
}
|
|
1098
1180
|
|
|
1099
|
-
|
|
1100
|
-
return this.
|
|
1181
|
+
_context4.next = 8;
|
|
1182
|
+
return this.findStorageBillValidate();
|
|
1101
1183
|
|
|
1102
1184
|
case 8:
|
|
1103
|
-
|
|
1185
|
+
ret = _context4.sent;
|
|
1186
|
+
_ref12 = ret || {}, _ref12$data = _ref12.data;
|
|
1187
|
+
_ref12$data = _ref12$data === undefined ? {} : _ref12$data;
|
|
1188
|
+
code = _ref12$data.code, returnMsg = _ref12$data.returnMsg;
|
|
1189
|
+
|
|
1190
|
+
if (!(code && code == 10001)) {
|
|
1191
|
+
_context4.next = 20;
|
|
1192
|
+
break;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
_context4.next = 15;
|
|
1196
|
+
return this.repeatStorageModal(returnMsg);
|
|
1197
|
+
|
|
1198
|
+
case 15:
|
|
1199
|
+
state = _context4.sent;
|
|
1200
|
+
|
|
1201
|
+
if (!(state === false)) {
|
|
1202
|
+
_context4.next = 18;
|
|
1203
|
+
break;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
return _context4.abrupt('return', _promise2.default.resolve(false));
|
|
1207
|
+
|
|
1208
|
+
case 18:
|
|
1209
|
+
_context4.next = 22;
|
|
1210
|
+
break;
|
|
1211
|
+
|
|
1212
|
+
case 20:
|
|
1213
|
+
_context4.next = 22;
|
|
1214
|
+
return this.saveMember();
|
|
1215
|
+
|
|
1216
|
+
case 22:
|
|
1217
|
+
_context4.next = 32;
|
|
1104
1218
|
break;
|
|
1105
1219
|
|
|
1106
|
-
case
|
|
1220
|
+
case 24:
|
|
1107
1221
|
if (!isNewRetailBCPos) {
|
|
1108
|
-
|
|
1222
|
+
_context4.next = 27;
|
|
1109
1223
|
break;
|
|
1110
1224
|
}
|
|
1111
1225
|
|
|
1112
|
-
|
|
1226
|
+
_context4.next = 27;
|
|
1113
1227
|
return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
|
|
1114
1228
|
|
|
1115
|
-
case
|
|
1116
|
-
|
|
1229
|
+
case 27:
|
|
1230
|
+
_context4.next = 29;
|
|
1117
1231
|
return this.save();
|
|
1118
1232
|
|
|
1119
|
-
case
|
|
1233
|
+
case 29:
|
|
1120
1234
|
if (!isNewRetailBCPos) {
|
|
1121
|
-
|
|
1235
|
+
_context4.next = 32;
|
|
1122
1236
|
break;
|
|
1123
1237
|
}
|
|
1124
1238
|
|
|
1125
|
-
|
|
1239
|
+
_context4.next = 32;
|
|
1126
1240
|
return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
|
|
1127
1241
|
|
|
1128
|
-
case
|
|
1129
|
-
return
|
|
1242
|
+
case 32:
|
|
1243
|
+
return _context4.abrupt('return', _promise2.default.resolve(true));
|
|
1130
1244
|
|
|
1131
|
-
case
|
|
1132
|
-
|
|
1133
|
-
|
|
1245
|
+
case 35:
|
|
1246
|
+
_context4.prev = 35;
|
|
1247
|
+
_context4.t0 = _context4['catch'](4);
|
|
1134
1248
|
|
|
1135
|
-
console.error('settlementStore.commit失败,错误信息:' +
|
|
1136
|
-
return
|
|
1249
|
+
console.error('settlementStore.commit失败,错误信息:' + _context4.t0);
|
|
1250
|
+
return _context4.abrupt('return', _promise2.default.resolve(_context4.t0));
|
|
1137
1251
|
|
|
1138
|
-
case
|
|
1252
|
+
case 39:
|
|
1139
1253
|
case 'end':
|
|
1140
|
-
return
|
|
1254
|
+
return _context4.stop();
|
|
1141
1255
|
}
|
|
1142
1256
|
}
|
|
1143
|
-
},
|
|
1257
|
+
}, _callee4, this, [[4, 35]]);
|
|
1144
1258
|
}));
|
|
1145
1259
|
|
|
1146
1260
|
function commit(_x3) {
|
|
1147
|
-
return
|
|
1261
|
+
return _ref10.apply(this, arguments);
|
|
1148
1262
|
}
|
|
1149
1263
|
|
|
1150
1264
|
return commit;
|
|
@@ -1158,26 +1272,26 @@ var SettlementStore = (_class = function () {
|
|
|
1158
1272
|
}, {
|
|
1159
1273
|
key: 'saveMember',
|
|
1160
1274
|
value: function saveMember() {
|
|
1161
|
-
var
|
|
1275
|
+
var _this11 = this;
|
|
1162
1276
|
|
|
1163
|
-
var _enumController$
|
|
1164
|
-
PayStyle = _enumController$
|
|
1277
|
+
var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
|
|
1278
|
+
PayStyle = _enumController$getEn15.PayStyle;
|
|
1165
1279
|
|
|
1166
1280
|
(0, _mobx.runInAction)(function () {
|
|
1167
|
-
|
|
1168
|
-
var thePaymodes =
|
|
1281
|
+
_this11.dto.StorageMutiSettleDetails = [];
|
|
1282
|
+
var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
|
|
1169
1283
|
return parseFloat(mode.value) != 0;
|
|
1170
|
-
}) :
|
|
1284
|
+
}) : _this11.paymode.thePaymodes;
|
|
1171
1285
|
(0, _each3.default)(thePaymodes, function (mode) {
|
|
1172
|
-
var themode = (0, _find3.default)(
|
|
1286
|
+
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1173
1287
|
|
|
1174
1288
|
var value = parseFloat(mode.value);
|
|
1175
1289
|
var giveChange = null;
|
|
1176
|
-
if (mode.paymentType == PayStyle.xianjin &&
|
|
1177
|
-
value = Math.Add(value,
|
|
1178
|
-
giveChange = Math.abs(
|
|
1290
|
+
if (mode.paymentType == PayStyle.xianjin && _this11.paymode.receivable < 0 && value > Math.abs(_this11.paymode.receivable)) {
|
|
1291
|
+
value = Math.Add(value, _this11.paymode.receivable);
|
|
1292
|
+
giveChange = Math.abs(_this11.paymode.receivable);
|
|
1179
1293
|
}
|
|
1180
|
-
|
|
1294
|
+
_this11.dto.StorageMutiSettleDetails.push({
|
|
1181
1295
|
Code: mode.paymethodId,
|
|
1182
1296
|
StorageAmount: value,
|
|
1183
1297
|
GiveChange: giveChange,
|
|
@@ -1186,7 +1300,7 @@ var SettlementStore = (_class = function () {
|
|
|
1186
1300
|
PaymentCode: mode.authCode,
|
|
1187
1301
|
DynamicPropertyKeys: [],
|
|
1188
1302
|
DynamicPropertyValues: [],
|
|
1189
|
-
DataSource: { Id:
|
|
1303
|
+
DataSource: { Id: _this11.dataSource }
|
|
1190
1304
|
});
|
|
1191
1305
|
});
|
|
1192
1306
|
});
|
|
@@ -1196,37 +1310,37 @@ var SettlementStore = (_class = function () {
|
|
|
1196
1310
|
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1197
1311
|
}
|
|
1198
1312
|
return (0, _tplusApi.tApi)({ dto: this.dto }, 'chanjet.ME.INewRetailMemberStorage.Save', false, false).then(function (resp) {
|
|
1199
|
-
|
|
1313
|
+
_this11.handlePrint(resp);
|
|
1200
1314
|
});
|
|
1201
1315
|
}
|
|
1202
1316
|
}, {
|
|
1203
1317
|
key: 'save',
|
|
1204
1318
|
value: function () {
|
|
1205
|
-
var
|
|
1206
|
-
var
|
|
1319
|
+
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
|
1320
|
+
var _this12 = this;
|
|
1207
1321
|
|
|
1208
|
-
var _enumController$
|
|
1322
|
+
var _enumController$getEn16, PayStyle, _ref15, isNewRetailBCPos, IPMSG, RetailTypeEnum;
|
|
1209
1323
|
|
|
1210
|
-
return _regenerator2.default.wrap(function
|
|
1324
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1211
1325
|
while (1) {
|
|
1212
|
-
switch (
|
|
1326
|
+
switch (_context5.prev = _context5.next) {
|
|
1213
1327
|
case 0:
|
|
1214
|
-
_enumController$
|
|
1328
|
+
_enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn16.PayStyle;
|
|
1215
1329
|
|
|
1216
1330
|
(0, _mobx.runInAction)(function () {
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1331
|
+
_this12.dto.RetailPaymentDetails = [];
|
|
1332
|
+
_this12.dto.RetailStorageDetails = [];
|
|
1333
|
+
_this12.dto.RetailCouponDetails = [];
|
|
1220
1334
|
var czkSum = 0;
|
|
1221
1335
|
var count = 0;
|
|
1222
|
-
var thePaymodes =
|
|
1336
|
+
var thePaymodes = _this12.newStyle ? (0, _filter3.default)(_this12.paymode.thePaymodes, function (mode) {
|
|
1223
1337
|
return parseFloat(mode.value) != 0;
|
|
1224
|
-
}) :
|
|
1338
|
+
}) : _this12.paymode.thePaymodes;
|
|
1225
1339
|
(0, _each3.default)(thePaymodes, function (mode, index) {
|
|
1226
|
-
var themode = (0, _find3.default)(
|
|
1340
|
+
var themode = (0, _find3.default)(_this12.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1227
1341
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
1228
1342
|
czkSum = Math.Add(czkSum, mode.value);
|
|
1229
|
-
|
|
1343
|
+
_this12.dto.RetailStorageDetails.push({
|
|
1230
1344
|
Code: mode.paymethodId,
|
|
1231
1345
|
MeStorageCardId: mode.meStorageCardId,
|
|
1232
1346
|
StoragePaymentAmount: mode.value,
|
|
@@ -1235,17 +1349,17 @@ var SettlementStore = (_class = function () {
|
|
|
1235
1349
|
Idmember: mode.memberId,
|
|
1236
1350
|
DynamicPropertyKeys: [],
|
|
1237
1351
|
DynamicPropertyValues: [],
|
|
1238
|
-
DataSource: { Id:
|
|
1352
|
+
DataSource: { Id: _this12.dataSource },
|
|
1239
1353
|
Password: mode.authCode
|
|
1240
1354
|
});
|
|
1241
1355
|
} else {
|
|
1242
1356
|
var value = parseFloat(mode.value);
|
|
1243
1357
|
var giveChange = null;
|
|
1244
|
-
if (mode.paymentType == PayStyle.xianjin &&
|
|
1245
|
-
value = Math.Add(value,
|
|
1246
|
-
giveChange = Math.abs(
|
|
1358
|
+
if (mode.paymentType == PayStyle.xianjin && _this12.paymode.receivable < 0 && value > Math.abs(_this12.paymode.receivable)) {
|
|
1359
|
+
value = Math.Add(value, _this12.paymode.receivable);
|
|
1360
|
+
giveChange = Math.abs(_this12.paymode.receivable);
|
|
1247
1361
|
}
|
|
1248
|
-
|
|
1362
|
+
_this12.dto.RetailPaymentDetails.push({
|
|
1249
1363
|
Code: mode.paymethodId,
|
|
1250
1364
|
OrigAmount: mode.exchangeRate != 1 ? mode.value2 : value,
|
|
1251
1365
|
Amount: value,
|
|
@@ -1259,11 +1373,11 @@ var SettlementStore = (_class = function () {
|
|
|
1259
1373
|
OverchargesAmount: mode.overchargesAmount,
|
|
1260
1374
|
DynamicPropertyKeys: [],
|
|
1261
1375
|
DynamicPropertyValues: [],
|
|
1262
|
-
DataSource: { Id:
|
|
1376
|
+
DataSource: { Id: _this12.dataSource }
|
|
1263
1377
|
});
|
|
1264
1378
|
if (mode.paymentType == PayStyle.djq) {
|
|
1265
|
-
(0, _each3.default)(
|
|
1266
|
-
|
|
1379
|
+
(0, _each3.default)(_this12.paymode.checkList && _this12.paymode.checkList.length ? _this12.paymode.checkList : mode.djqs, function (djq) {
|
|
1380
|
+
_this12.dto.RetailCouponDetails.push({
|
|
1267
1381
|
CouponCode: djq.promoCouponCode,
|
|
1268
1382
|
ReductionAmount: djq.amount,
|
|
1269
1383
|
EnableAmount: djq.doorsill,
|
|
@@ -1273,50 +1387,50 @@ var SettlementStore = (_class = function () {
|
|
|
1273
1387
|
PromotionId: djq.promoId,
|
|
1274
1388
|
PromotionRuleId: djq.promoRuleId,
|
|
1275
1389
|
PromoCouponAllocatedId: djq.id,
|
|
1276
|
-
DataSource: { Id:
|
|
1390
|
+
DataSource: { Id: _this12.dataSource }
|
|
1277
1391
|
});
|
|
1278
1392
|
});
|
|
1279
1393
|
}
|
|
1280
1394
|
}
|
|
1281
1395
|
});
|
|
1282
1396
|
|
|
1283
|
-
var
|
|
1284
|
-
isNewRetailBCPos =
|
|
1397
|
+
var _ref14 = _mutantsUtil.platform || {},
|
|
1398
|
+
isNewRetailBCPos = _ref14.isNewRetailBCPos;
|
|
1285
1399
|
|
|
1286
|
-
if (
|
|
1287
|
-
var themode = (0, _find3.default)(
|
|
1400
|
+
if (_this12.dto.RetailStorageDetails.length > 0) {
|
|
1401
|
+
var themode = (0, _find3.default)(_this12.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
|
|
1288
1402
|
if (isNewRetailBCPos) {
|
|
1289
|
-
|
|
1290
|
-
Code:
|
|
1403
|
+
_this12.dto.RetailPaymentDetails.push({
|
|
1404
|
+
Code: _this12.paymode.counter,
|
|
1291
1405
|
OrigAmount: czkSum,
|
|
1292
1406
|
Amount: czkSum,
|
|
1293
1407
|
IdsettleStyle: themode.idSettleStyle,
|
|
1294
1408
|
IdbankAccount: themode.idBankAccount,
|
|
1295
1409
|
DynamicPropertyKeys: [],
|
|
1296
1410
|
DynamicPropertyValues: [],
|
|
1297
|
-
DataSource: { Id:
|
|
1298
|
-
RetailStorageDetails:
|
|
1411
|
+
DataSource: { Id: _this12.dataSource },
|
|
1412
|
+
RetailStorageDetails: _this12.dto.RetailStorageDetails
|
|
1299
1413
|
});
|
|
1300
1414
|
} else {
|
|
1301
|
-
|
|
1302
|
-
Code:
|
|
1415
|
+
_this12.dto.RetailPaymentDetails.push({
|
|
1416
|
+
Code: _this12.paymode.counter,
|
|
1303
1417
|
OrigAmount: czkSum,
|
|
1304
1418
|
Amount: czkSum,
|
|
1305
1419
|
IdsettleStyle: themode.idSettleStyle,
|
|
1306
1420
|
IdbankAccount: themode.idBankAccount,
|
|
1307
1421
|
DynamicPropertyKeys: [],
|
|
1308
1422
|
DynamicPropertyValues: [],
|
|
1309
|
-
DataSource: { Id:
|
|
1423
|
+
DataSource: { Id: _this12.dataSource }
|
|
1310
1424
|
});
|
|
1311
1425
|
}
|
|
1312
1426
|
}
|
|
1313
1427
|
});
|
|
1314
|
-
|
|
1428
|
+
_ref15 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref15.isNewRetailBCPos;
|
|
1315
1429
|
|
|
1316
1430
|
console.log('bc_pos\u73AF\u5883:' + isNewRetailBCPos + ',\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
|
|
1317
1431
|
|
|
1318
1432
|
if (!isNewRetailBCPos) {
|
|
1319
|
-
|
|
1433
|
+
_context5.next = 20;
|
|
1320
1434
|
break;
|
|
1321
1435
|
}
|
|
1322
1436
|
|
|
@@ -1327,61 +1441,61 @@ var SettlementStore = (_class = function () {
|
|
|
1327
1441
|
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
|
1328
1442
|
}
|
|
1329
1443
|
RetailTypeEnum = this.dto.IdbusiType == 36 ? "INTEGRAL_EXCHANGE" : "NORMAL";
|
|
1330
|
-
|
|
1444
|
+
_context5.t1 = this.dto.IdbusiType == 37;
|
|
1331
1445
|
|
|
1332
|
-
if (!
|
|
1333
|
-
|
|
1446
|
+
if (!_context5.t1) {
|
|
1447
|
+
_context5.next = 13;
|
|
1334
1448
|
break;
|
|
1335
1449
|
}
|
|
1336
1450
|
|
|
1337
|
-
|
|
1451
|
+
_context5.next = 12;
|
|
1338
1452
|
return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
|
|
1339
1453
|
|
|
1340
1454
|
case 12:
|
|
1341
|
-
|
|
1455
|
+
_context5.t1 = _context5.sent;
|
|
1342
1456
|
|
|
1343
1457
|
case 13:
|
|
1344
|
-
|
|
1458
|
+
_context5.t0 = _context5.t1;
|
|
1345
1459
|
|
|
1346
|
-
if (
|
|
1347
|
-
|
|
1460
|
+
if (_context5.t0) {
|
|
1461
|
+
_context5.next = 16;
|
|
1348
1462
|
break;
|
|
1349
1463
|
}
|
|
1350
1464
|
|
|
1351
|
-
|
|
1465
|
+
_context5.t0 = this.dto.IdbusiType != 37;
|
|
1352
1466
|
|
|
1353
1467
|
case 16:
|
|
1354
|
-
if (!
|
|
1355
|
-
|
|
1468
|
+
if (!_context5.t0) {
|
|
1469
|
+
_context5.next = 18;
|
|
1356
1470
|
break;
|
|
1357
1471
|
}
|
|
1358
1472
|
|
|
1359
|
-
return
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1473
|
+
return _context5.abrupt('return', (0, _tplusApi.ccApi)({ dto: (0, _extends3.default)({}, this.dto.cut(), { RetailOms: { RetailTypeEnum: RetailTypeEnum } }), cip: IPMSG.query || "" }, '/retail/RetailPos/settle', false, false, { method: 'post', timeout_skip: true }).then(function (resp) {
|
|
1474
|
+
_this12.setDtoID(resp.ID);
|
|
1475
|
+
_this12.paymode.checkList = [];
|
|
1476
|
+
_this12.billID = resp.ID;
|
|
1363
1477
|
}));
|
|
1364
1478
|
|
|
1365
1479
|
case 18:
|
|
1366
|
-
|
|
1480
|
+
_context5.next = 21;
|
|
1367
1481
|
break;
|
|
1368
1482
|
|
|
1369
1483
|
case 20:
|
|
1370
|
-
return
|
|
1371
|
-
|
|
1372
|
-
|
|
1484
|
+
return _context5.abrupt('return', (0, _tplusApi.tApi)({ dto: this.dto.cut() }, 'chanjet.RE.newRetail.Settle', false, false, { timeout_skip: true }).then(function (resp) {
|
|
1485
|
+
_this12.setDtoID(resp.ID);
|
|
1486
|
+
_this12.billID = resp.ID;
|
|
1373
1487
|
}));
|
|
1374
1488
|
|
|
1375
1489
|
case 21:
|
|
1376
1490
|
case 'end':
|
|
1377
|
-
return
|
|
1491
|
+
return _context5.stop();
|
|
1378
1492
|
}
|
|
1379
1493
|
}
|
|
1380
|
-
},
|
|
1494
|
+
}, _callee5, this);
|
|
1381
1495
|
}));
|
|
1382
1496
|
|
|
1383
1497
|
function save() {
|
|
1384
|
-
return
|
|
1498
|
+
return _ref13.apply(this, arguments);
|
|
1385
1499
|
}
|
|
1386
1500
|
|
|
1387
1501
|
return save;
|
|
@@ -1399,35 +1513,35 @@ var SettlementStore = (_class = function () {
|
|
|
1399
1513
|
}, {
|
|
1400
1514
|
key: 'querySettleResult',
|
|
1401
1515
|
value: function () {
|
|
1402
|
-
var
|
|
1403
|
-
return _regenerator2.default.wrap(function
|
|
1516
|
+
var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
|
|
1517
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
1404
1518
|
while (1) {
|
|
1405
|
-
switch (
|
|
1519
|
+
switch (_context6.prev = _context6.next) {
|
|
1406
1520
|
case 0:
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1521
|
+
_context6.prev = 0;
|
|
1522
|
+
_context6.t0 = _promise2.default;
|
|
1523
|
+
_context6.next = 4;
|
|
1410
1524
|
return (0, _tplusApi.tApi)({ RetailCode: this.dto.Code }, 'chanjet.RE.newRetail.QuerySettleResult', false, false, { timeout_skip: true });
|
|
1411
1525
|
|
|
1412
1526
|
case 4:
|
|
1413
|
-
|
|
1414
|
-
return
|
|
1527
|
+
_context6.t1 = _context6.sent;
|
|
1528
|
+
return _context6.abrupt('return', _context6.t0.resolve.call(_context6.t0, _context6.t1));
|
|
1415
1529
|
|
|
1416
1530
|
case 8:
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
return
|
|
1531
|
+
_context6.prev = 8;
|
|
1532
|
+
_context6.t2 = _context6['catch'](0);
|
|
1533
|
+
return _context6.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
|
|
1420
1534
|
|
|
1421
1535
|
case 11:
|
|
1422
1536
|
case 'end':
|
|
1423
|
-
return
|
|
1537
|
+
return _context6.stop();
|
|
1424
1538
|
}
|
|
1425
1539
|
}
|
|
1426
|
-
},
|
|
1540
|
+
}, _callee6, this, [[0, 8]]);
|
|
1427
1541
|
}));
|
|
1428
1542
|
|
|
1429
1543
|
function querySettleResult() {
|
|
1430
|
-
return
|
|
1544
|
+
return _ref16.apply(this, arguments);
|
|
1431
1545
|
}
|
|
1432
1546
|
|
|
1433
1547
|
return querySettleResult;
|
|
@@ -1453,18 +1567,18 @@ var SettlementStore = (_class = function () {
|
|
|
1453
1567
|
}, {
|
|
1454
1568
|
key: 'validePwd',
|
|
1455
1569
|
value: function () {
|
|
1456
|
-
var
|
|
1457
|
-
var
|
|
1570
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(value) {
|
|
1571
|
+
var _ref18, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, cardStatusEnum, result, count, _result;
|
|
1458
1572
|
|
|
1459
|
-
return _regenerator2.default.wrap(function
|
|
1573
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1460
1574
|
while (1) {
|
|
1461
|
-
switch (
|
|
1575
|
+
switch (_context7.prev = _context7.next) {
|
|
1462
1576
|
case 0:
|
|
1463
|
-
|
|
1464
|
-
|
|
1577
|
+
_ref18 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref18.isNewRetailBCPos;
|
|
1578
|
+
_context7.prev = 1;
|
|
1465
1579
|
|
|
1466
1580
|
if (!isNewRetailBCPos) {
|
|
1467
|
-
|
|
1581
|
+
_context7.next = 33;
|
|
1468
1582
|
break;
|
|
1469
1583
|
}
|
|
1470
1584
|
|
|
@@ -1474,60 +1588,60 @@ var SettlementStore = (_class = function () {
|
|
|
1474
1588
|
memberStorageId = this.paymode.currentMode.meStorageCardId;
|
|
1475
1589
|
|
|
1476
1590
|
if (!cook2) {
|
|
1477
|
-
|
|
1591
|
+
_context7.next = 12;
|
|
1478
1592
|
break;
|
|
1479
1593
|
}
|
|
1480
1594
|
|
|
1481
1595
|
if (!cook2.hasOwnProperty(memberStorageId + "")) {
|
|
1482
|
-
|
|
1596
|
+
_context7.next = 12;
|
|
1483
1597
|
break;
|
|
1484
1598
|
}
|
|
1485
1599
|
|
|
1486
1600
|
if (!(cook2[memberStorageId] > 3)) {
|
|
1487
|
-
|
|
1601
|
+
_context7.next = 12;
|
|
1488
1602
|
break;
|
|
1489
1603
|
}
|
|
1490
1604
|
|
|
1491
1605
|
message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
|
|
1492
|
-
return
|
|
1606
|
+
return _context7.abrupt('return', _promise2.default.resolve(message));
|
|
1493
1607
|
|
|
1494
1608
|
case 12:
|
|
1495
1609
|
_paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId, cardStatusEnum = _paymode$currentMode.cardStatusEnum;
|
|
1496
1610
|
result = null;
|
|
1497
1611
|
|
|
1498
1612
|
if (!(cardTypeEnum === 'BALANCE_CARD')) {
|
|
1499
|
-
|
|
1613
|
+
_context7.next = 20;
|
|
1500
1614
|
break;
|
|
1501
1615
|
}
|
|
1502
1616
|
|
|
1503
|
-
|
|
1617
|
+
_context7.next = 17;
|
|
1504
1618
|
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
|
|
1505
1619
|
|
|
1506
1620
|
case 17:
|
|
1507
|
-
result =
|
|
1508
|
-
|
|
1621
|
+
result = _context7.sent;
|
|
1622
|
+
_context7.next = 29;
|
|
1509
1623
|
break;
|
|
1510
1624
|
|
|
1511
1625
|
case 20:
|
|
1512
1626
|
if (!(cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId)) {
|
|
1513
|
-
|
|
1627
|
+
_context7.next = 26;
|
|
1514
1628
|
break;
|
|
1515
1629
|
}
|
|
1516
1630
|
|
|
1517
|
-
|
|
1631
|
+
_context7.next = 23;
|
|
1518
1632
|
return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1519
1633
|
|
|
1520
1634
|
case 23:
|
|
1521
|
-
result =
|
|
1522
|
-
|
|
1635
|
+
result = _context7.sent;
|
|
1636
|
+
_context7.next = 29;
|
|
1523
1637
|
break;
|
|
1524
1638
|
|
|
1525
1639
|
case 26:
|
|
1526
|
-
|
|
1640
|
+
_context7.next = 28;
|
|
1527
1641
|
return (0, _tplusApi.ccApi)({ password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
|
|
1528
1642
|
|
|
1529
1643
|
case 28:
|
|
1530
|
-
result =
|
|
1644
|
+
result = _context7.sent;
|
|
1531
1645
|
|
|
1532
1646
|
case 29:
|
|
1533
1647
|
if (!result.data) {
|
|
@@ -1546,38 +1660,38 @@ var SettlementStore = (_class = function () {
|
|
|
1546
1660
|
this.setCookie('errorPwd', '', -1);
|
|
1547
1661
|
this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
|
|
1548
1662
|
}
|
|
1549
|
-
return
|
|
1663
|
+
return _context7.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
|
|
1550
1664
|
|
|
1551
1665
|
case 33:
|
|
1552
|
-
|
|
1666
|
+
_context7.next = 35;
|
|
1553
1667
|
return (0, _tplusApi.tApi)({ "CheckoutParams": {
|
|
1554
1668
|
"Idmember": value.id,
|
|
1555
1669
|
"Password": value.pwd
|
|
1556
1670
|
} }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
|
|
1557
1671
|
|
|
1558
1672
|
case 35:
|
|
1559
|
-
_result =
|
|
1560
|
-
return
|
|
1673
|
+
_result = _context7.sent;
|
|
1674
|
+
return _context7.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
|
|
1561
1675
|
|
|
1562
1676
|
case 37:
|
|
1563
|
-
|
|
1677
|
+
_context7.next = 42;
|
|
1564
1678
|
break;
|
|
1565
1679
|
|
|
1566
1680
|
case 39:
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
return
|
|
1681
|
+
_context7.prev = 39;
|
|
1682
|
+
_context7.t0 = _context7['catch'](1);
|
|
1683
|
+
return _context7.abrupt('return', "failed");
|
|
1570
1684
|
|
|
1571
1685
|
case 42:
|
|
1572
1686
|
case 'end':
|
|
1573
|
-
return
|
|
1687
|
+
return _context7.stop();
|
|
1574
1688
|
}
|
|
1575
1689
|
}
|
|
1576
|
-
},
|
|
1690
|
+
}, _callee7, this, [[1, 39]]);
|
|
1577
1691
|
}));
|
|
1578
1692
|
|
|
1579
1693
|
function validePwd(_x4) {
|
|
1580
|
-
return
|
|
1694
|
+
return _ref17.apply(this, arguments);
|
|
1581
1695
|
}
|
|
1582
1696
|
|
|
1583
1697
|
return validePwd;
|
|
@@ -1587,7 +1701,7 @@ var SettlementStore = (_class = function () {
|
|
|
1587
1701
|
}(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'queryPwd', [_mobx.action], {
|
|
1588
1702
|
enumerable: true,
|
|
1589
1703
|
initializer: function initializer() {
|
|
1590
|
-
var
|
|
1704
|
+
var _this13 = this;
|
|
1591
1705
|
|
|
1592
1706
|
return function (newPass, newPassConfirm) {
|
|
1593
1707
|
if (!newPass || !newPassConfirm) {
|
|
@@ -1599,7 +1713,7 @@ var SettlementStore = (_class = function () {
|
|
|
1599
1713
|
var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
|
|
1600
1714
|
return (0, _tplusApi.ccApi)({
|
|
1601
1715
|
Idstore: idstore,
|
|
1602
|
-
meMemberId:
|
|
1716
|
+
meMemberId: _this13.paymode.currentMode.memberId,
|
|
1603
1717
|
oldPassword: null,
|
|
1604
1718
|
newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
|
|
1605
1719
|
dataSource: "POS"
|
|
@@ -1613,131 +1727,131 @@ var SettlementStore = (_class = function () {
|
|
|
1613
1727
|
}), _applyDecoratedDescriptor(_class.prototype, 'initByOriginReturn', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'initByOriginReturn'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'quickSettle', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'quickSettle'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeFocusAndAddPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeFocusAndAddPay'), _class.prototype), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'updateMemberInfo', [_mobx.action], {
|
|
1614
1728
|
enumerable: true,
|
|
1615
1729
|
initializer: function initializer() {
|
|
1616
|
-
var
|
|
1730
|
+
var _this14 = this;
|
|
1617
1731
|
|
|
1618
1732
|
return function () {
|
|
1619
|
-
var
|
|
1733
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(_this) {
|
|
1620
1734
|
var _getLoginInfo, IdStore, StoreCode, resp;
|
|
1621
1735
|
|
|
1622
|
-
return _regenerator2.default.wrap(function
|
|
1736
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1623
1737
|
while (1) {
|
|
1624
|
-
switch (
|
|
1738
|
+
switch (_context8.prev = _context8.next) {
|
|
1625
1739
|
case 0:
|
|
1626
|
-
_getLoginInfo =
|
|
1627
|
-
|
|
1628
|
-
return (0, _tplusApi.tApi)({ Idmember:
|
|
1740
|
+
_getLoginInfo = _this14.getLoginInfo(), IdStore = _getLoginInfo.IdStore, StoreCode = _getLoginInfo.StoreCode;
|
|
1741
|
+
_context8.next = 3;
|
|
1742
|
+
return (0, _tplusApi.tApi)({ Idmember: _this14.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
|
|
1629
1743
|
|
|
1630
1744
|
case 3:
|
|
1631
|
-
resp =
|
|
1745
|
+
resp = _context8.sent;
|
|
1632
1746
|
|
|
1633
1747
|
_this.member = resp;
|
|
1634
1748
|
_this.paymode.updateMemberStorageCardNo(resp.StorageCardNo, resp.WalletEnabled);
|
|
1635
|
-
return
|
|
1749
|
+
return _context8.abrupt('return', _promise2.default.resolve(resp));
|
|
1636
1750
|
|
|
1637
1751
|
case 7:
|
|
1638
1752
|
case 'end':
|
|
1639
|
-
return
|
|
1753
|
+
return _context8.stop();
|
|
1640
1754
|
}
|
|
1641
1755
|
}
|
|
1642
|
-
},
|
|
1756
|
+
}, _callee8, _this14);
|
|
1643
1757
|
}));
|
|
1644
1758
|
|
|
1645
1759
|
return function (_x5) {
|
|
1646
|
-
return
|
|
1760
|
+
return _ref19.apply(this, arguments);
|
|
1647
1761
|
};
|
|
1648
1762
|
}();
|
|
1649
1763
|
}
|
|
1650
1764
|
}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'updateCurrentMode', [_mobx.action], {
|
|
1651
1765
|
enumerable: true,
|
|
1652
1766
|
initializer: function initializer() {
|
|
1653
|
-
var
|
|
1767
|
+
var _this15 = this;
|
|
1654
1768
|
|
|
1655
1769
|
return function () {
|
|
1656
|
-
var
|
|
1770
|
+
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(memberId) {
|
|
1657
1771
|
var result;
|
|
1658
|
-
return _regenerator2.default.wrap(function
|
|
1772
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
1659
1773
|
while (1) {
|
|
1660
|
-
switch (
|
|
1774
|
+
switch (_context9.prev = _context9.next) {
|
|
1661
1775
|
case 0:
|
|
1662
|
-
|
|
1776
|
+
_context9.next = 2;
|
|
1663
1777
|
return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId + '/' + true, false, false, { method: 'get' });
|
|
1664
1778
|
|
|
1665
1779
|
case 2:
|
|
1666
|
-
result =
|
|
1780
|
+
result = _context9.sent;
|
|
1667
1781
|
|
|
1668
1782
|
if (!(result && result.data.length)) {
|
|
1669
|
-
|
|
1783
|
+
_context9.next = 20;
|
|
1670
1784
|
break;
|
|
1671
1785
|
}
|
|
1672
1786
|
|
|
1673
1787
|
if (!(result.data.length === 1)) {
|
|
1674
|
-
|
|
1788
|
+
_context9.next = 9;
|
|
1675
1789
|
break;
|
|
1676
1790
|
}
|
|
1677
1791
|
|
|
1678
|
-
|
|
1679
|
-
return
|
|
1792
|
+
_this15.paymode.updateCardInfo(result.data[0]);
|
|
1793
|
+
return _context9.abrupt('return', result.data);
|
|
1680
1794
|
|
|
1681
1795
|
case 9:
|
|
1682
1796
|
if (!(result.data && result.data.length === 1)) {
|
|
1683
|
-
|
|
1797
|
+
_context9.next = 14;
|
|
1684
1798
|
break;
|
|
1685
1799
|
}
|
|
1686
1800
|
|
|
1687
|
-
|
|
1688
|
-
return
|
|
1801
|
+
_this15.paymode.updateCardInfo(result.data[0]);
|
|
1802
|
+
return _context9.abrupt('return', result.data);
|
|
1689
1803
|
|
|
1690
1804
|
case 14:
|
|
1691
1805
|
if (!(result.data && result.data.length > 1)) {
|
|
1692
|
-
|
|
1806
|
+
_context9.next = 18;
|
|
1693
1807
|
break;
|
|
1694
1808
|
}
|
|
1695
1809
|
|
|
1696
|
-
return
|
|
1810
|
+
return _context9.abrupt('return', result.data);
|
|
1697
1811
|
|
|
1698
1812
|
case 18:
|
|
1699
1813
|
_message2.default.warn('没有可用储值卡!');
|
|
1700
|
-
return
|
|
1814
|
+
return _context9.abrupt('return', false);
|
|
1701
1815
|
|
|
1702
1816
|
case 20:
|
|
1703
1817
|
case 'end':
|
|
1704
|
-
return
|
|
1818
|
+
return _context9.stop();
|
|
1705
1819
|
}
|
|
1706
1820
|
}
|
|
1707
|
-
},
|
|
1821
|
+
}, _callee9, _this15);
|
|
1708
1822
|
}));
|
|
1709
1823
|
|
|
1710
1824
|
return function (_x6) {
|
|
1711
|
-
return
|
|
1825
|
+
return _ref20.apply(this, arguments);
|
|
1712
1826
|
};
|
|
1713
1827
|
}();
|
|
1714
1828
|
}
|
|
1715
1829
|
}), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'updateCardInfo', [_mobx.action], {
|
|
1716
1830
|
enumerable: true,
|
|
1717
1831
|
initializer: function initializer() {
|
|
1718
|
-
var
|
|
1832
|
+
var _this16 = this;
|
|
1719
1833
|
|
|
1720
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1834
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10() {
|
|
1721
1835
|
var address, result;
|
|
1722
|
-
return _regenerator2.default.wrap(function
|
|
1836
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
1723
1837
|
while (1) {
|
|
1724
|
-
switch (
|
|
1838
|
+
switch (_context10.prev = _context10.next) {
|
|
1725
1839
|
case 0:
|
|
1726
|
-
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' +
|
|
1727
|
-
|
|
1840
|
+
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + _this16.paymode.currentMode.storageCardNo;
|
|
1841
|
+
_context10.next = 3;
|
|
1728
1842
|
return (0, _tplusApi.ccApi)({}, address, false, false, { method: 'get', timeout_skip: true });
|
|
1729
1843
|
|
|
1730
1844
|
case 3:
|
|
1731
|
-
result =
|
|
1845
|
+
result = _context10.sent;
|
|
1732
1846
|
|
|
1733
|
-
|
|
1847
|
+
_this16.paymode.updateCardInfo(result.data);
|
|
1734
1848
|
|
|
1735
1849
|
case 5:
|
|
1736
1850
|
case 'end':
|
|
1737
|
-
return
|
|
1851
|
+
return _context10.stop();
|
|
1738
1852
|
}
|
|
1739
1853
|
}
|
|
1740
|
-
},
|
|
1854
|
+
}, _callee10, _this16);
|
|
1741
1855
|
}));
|
|
1742
1856
|
}
|
|
1743
1857
|
}), _applyDecoratedDescriptor(_class.prototype, 'addDjq', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addDjq'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeFocusOnly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeFocusOnly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeClickFocusOnly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeClickFocusOnly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeValue'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'addPayDirectly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addPayDirectly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'addPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addPay'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'delPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'delPay'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'setVoucherDate', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'setVoucherDate'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'setDtoID', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'setDtoID'), _class.prototype)), _class);
|
|
@@ -1838,7 +1952,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1838
1952
|
}, {
|
|
1839
1953
|
key: 'calcDjqCheckValue',
|
|
1840
1954
|
value: function calcDjqCheckValue(q1, dto, params) {
|
|
1841
|
-
var
|
|
1955
|
+
var _this17 = this;
|
|
1842
1956
|
|
|
1843
1957
|
var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
|
|
1844
1958
|
var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
|
|
@@ -1852,12 +1966,12 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1852
1966
|
this.checkList = [];
|
|
1853
1967
|
}
|
|
1854
1968
|
|
|
1855
|
-
var
|
|
1856
|
-
isNewRetailBCPos =
|
|
1969
|
+
var _ref22 = _mutantsUtil.platform || {},
|
|
1970
|
+
isNewRetailBCPos = _ref22.isNewRetailBCPos;
|
|
1857
1971
|
|
|
1858
|
-
var _enumController$
|
|
1859
|
-
PayStyle = _enumController$
|
|
1860
|
-
Differentiate = _enumController$
|
|
1972
|
+
var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
|
|
1973
|
+
PayStyle = _enumController$getEn17.PayStyle,
|
|
1974
|
+
Differentiate = _enumController$getEn17.Differentiate;
|
|
1861
1975
|
|
|
1862
1976
|
if (q1) {
|
|
1863
1977
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
@@ -1885,7 +1999,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1885
1999
|
if (!q1.checked) {
|
|
1886
2000
|
this.checkList.forEach(function (ele, i) {
|
|
1887
2001
|
if (ele.id === q1.id) {
|
|
1888
|
-
|
|
2002
|
+
_this17.checkList.splice(i, 1);
|
|
1889
2003
|
}
|
|
1890
2004
|
});
|
|
1891
2005
|
} else {
|
|
@@ -1957,24 +2071,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1957
2071
|
if (result && result.length != 0) {
|
|
1958
2072
|
result.forEach(function (element, index) {
|
|
1959
2073
|
var djq1 = false;
|
|
1960
|
-
|
|
2074
|
+
_this17.currentMode.djqs.forEach(function (djq) {
|
|
1961
2075
|
if (element.id === djq.id) {
|
|
1962
2076
|
djq1 = true;
|
|
1963
2077
|
}
|
|
1964
2078
|
});
|
|
1965
2079
|
|
|
1966
|
-
var
|
|
1967
|
-
couponCode =
|
|
1968
|
-
name =
|
|
1969
|
-
tieredAmountResult =
|
|
1970
|
-
fromDate =
|
|
1971
|
-
dateMount =
|
|
1972
|
-
promoMethodEnum =
|
|
1973
|
-
discountPct =
|
|
1974
|
-
nominalAmount =
|
|
1975
|
-
promoId =
|
|
1976
|
-
id =
|
|
1977
|
-
doorsill =
|
|
2080
|
+
var _ref23 = element || {},
|
|
2081
|
+
couponCode = _ref23.couponCode,
|
|
2082
|
+
name = _ref23.name,
|
|
2083
|
+
tieredAmountResult = _ref23.tieredAmountResult,
|
|
2084
|
+
fromDate = _ref23.fromDate,
|
|
2085
|
+
dateMount = _ref23.dateMount,
|
|
2086
|
+
promoMethodEnum = _ref23.promoMethodEnum,
|
|
2087
|
+
discountPct = _ref23.discountPct,
|
|
2088
|
+
nominalAmount = _ref23.nominalAmount,
|
|
2089
|
+
promoId = _ref23.promoId,
|
|
2090
|
+
id = _ref23.id,
|
|
2091
|
+
doorsill = _ref23.doorsill;
|
|
1978
2092
|
|
|
1979
2093
|
var condValue = tieredAmountResult.condValue,
|
|
1980
2094
|
promoDiscount = tieredAmountResult.promoDiscount,
|
|
@@ -2002,10 +2116,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2002
2116
|
// couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
|
|
2003
2117
|
// id
|
|
2004
2118
|
// })
|
|
2005
|
-
|
|
2119
|
+
_this17.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
|
|
2006
2120
|
djq1 = false;
|
|
2007
2121
|
} else {
|
|
2008
|
-
|
|
2122
|
+
_this17.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
|
|
2009
2123
|
// this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
|
|
2010
2124
|
// djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
|
|
2011
2125
|
}
|
|
@@ -2018,11 +2132,11 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2018
2132
|
}, {
|
|
2019
2133
|
key: 'calcDjqValue',
|
|
2020
2134
|
value: function calcDjqValue(q1) {
|
|
2021
|
-
var
|
|
2022
|
-
isNewRetailBCPos =
|
|
2135
|
+
var _ref24 = _mutantsUtil.platform || {},
|
|
2136
|
+
isNewRetailBCPos = _ref24.isNewRetailBCPos;
|
|
2023
2137
|
|
|
2024
|
-
var _enumController$
|
|
2025
|
-
Differentiate = _enumController$
|
|
2138
|
+
var _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(),
|
|
2139
|
+
Differentiate = _enumController$getEn18.Differentiate;
|
|
2026
2140
|
|
|
2027
2141
|
if (q1) {
|
|
2028
2142
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
|
@@ -2084,8 +2198,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2084
2198
|
this.currentMode.errinfo = '';
|
|
2085
2199
|
var sum = this.amount;
|
|
2086
2200
|
|
|
2087
|
-
var _enumController$
|
|
2088
|
-
PayStyle = _enumController$
|
|
2201
|
+
var _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(),
|
|
2202
|
+
PayStyle = _enumController$getEn19.PayStyle;
|
|
2089
2203
|
|
|
2090
2204
|
this.thePaymodes && this.thePaymodes.forEach(function (mode) {
|
|
2091
2205
|
if (mode.paymentType === PayStyle.hyczk) {
|
|
@@ -2109,23 +2223,23 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2109
2223
|
}, {
|
|
2110
2224
|
key: 'setPaymodes',
|
|
2111
2225
|
value: function () {
|
|
2112
|
-
var
|
|
2113
|
-
var
|
|
2226
|
+
var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(type, isIntegralExchange) {
|
|
2227
|
+
var _this18 = this;
|
|
2114
2228
|
|
|
2115
|
-
var _enumController$
|
|
2229
|
+
var _enumController$getEn20, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
|
|
2116
2230
|
|
|
2117
|
-
return _regenerator2.default.wrap(function
|
|
2231
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
2118
2232
|
while (1) {
|
|
2119
|
-
switch (
|
|
2233
|
+
switch (_context11.prev = _context11.next) {
|
|
2120
2234
|
case 0:
|
|
2121
|
-
_enumController$
|
|
2235
|
+
_enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn20.settleStyleType, PayStyle = _enumController$getEn20.PayStyle;
|
|
2122
2236
|
memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
|
|
2123
2237
|
param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
|
|
2124
|
-
|
|
2238
|
+
_context11.next = 5;
|
|
2125
2239
|
return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
|
|
2126
2240
|
|
|
2127
2241
|
case 5:
|
|
2128
|
-
modes =
|
|
2242
|
+
modes = _context11.sent;
|
|
2129
2243
|
|
|
2130
2244
|
if (modes) {
|
|
2131
2245
|
(0, _mobx.runInAction)(function () {
|
|
@@ -2150,21 +2264,21 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2150
2264
|
calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88"
|
|
2151
2265
|
});
|
|
2152
2266
|
});
|
|
2153
|
-
|
|
2267
|
+
_this18.paymodes = paymodes;
|
|
2154
2268
|
//modes.QuickSettleStyles
|
|
2155
2269
|
});
|
|
2156
2270
|
}
|
|
2157
2271
|
|
|
2158
2272
|
case 7:
|
|
2159
2273
|
case 'end':
|
|
2160
|
-
return
|
|
2274
|
+
return _context11.stop();
|
|
2161
2275
|
}
|
|
2162
2276
|
}
|
|
2163
|
-
},
|
|
2277
|
+
}, _callee11, this);
|
|
2164
2278
|
}));
|
|
2165
2279
|
|
|
2166
2280
|
function setPaymodes(_x7, _x8) {
|
|
2167
|
-
return
|
|
2281
|
+
return _ref25.apply(this, arguments);
|
|
2168
2282
|
}
|
|
2169
2283
|
|
|
2170
2284
|
return setPaymodes;
|
|
@@ -2219,19 +2333,19 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2219
2333
|
}), _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], {
|
|
2220
2334
|
enumerable: true,
|
|
2221
2335
|
initializer: function initializer() {
|
|
2222
|
-
var
|
|
2336
|
+
var _this19 = this;
|
|
2223
2337
|
|
|
2224
2338
|
return function () {
|
|
2225
|
-
|
|
2339
|
+
_this19.checkList = [];
|
|
2226
2340
|
};
|
|
2227
2341
|
}
|
|
2228
2342
|
}), _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], {
|
|
2229
2343
|
enumerable: true,
|
|
2230
2344
|
initializer: function initializer() {
|
|
2231
|
-
var
|
|
2345
|
+
var _this20 = this;
|
|
2232
2346
|
|
|
2233
2347
|
return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
|
|
2234
|
-
|
|
2348
|
+
_this20.currentMode.djqs.forEach(function (ele) {
|
|
2235
2349
|
if (ele.id === id) {
|
|
2236
2350
|
promoMethodEnum == "CASH_COUPON" ? ele.amount = nominalAmount : ele.amount = promoDiscount;
|
|
2237
2351
|
ele.couponCategoryEnum = couponNum;
|
|
@@ -2244,7 +2358,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2244
2358
|
}), _descriptor14 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
|
|
2245
2359
|
enumerable: true,
|
|
2246
2360
|
initializer: function initializer() {
|
|
2247
|
-
var
|
|
2361
|
+
var _this21 = this;
|
|
2248
2362
|
|
|
2249
2363
|
return function (promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
|
|
2250
2364
|
var djq = {
|
|
@@ -2266,13 +2380,13 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2266
2380
|
couponCategoryEnum: couponCategoryEnum,
|
|
2267
2381
|
id: id
|
|
2268
2382
|
};
|
|
2269
|
-
|
|
2383
|
+
_this21.currentMode.djqs.push(djq);
|
|
2270
2384
|
};
|
|
2271
2385
|
}
|
|
2272
2386
|
}), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqValue'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'reCalculationDjqs', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'reCalculationDjqs'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'clearDjqs', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clearDjqs'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'setCurrentModeValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'setCurrentModeValue'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcMemberBalance', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcMemberBalance'), _class3.prototype)), _class3);
|
|
2273
2387
|
var Member = exports.Member = (_class5 = function () {
|
|
2274
2388
|
function Member(m) {
|
|
2275
|
-
var
|
|
2389
|
+
var _this22 = this;
|
|
2276
2390
|
|
|
2277
2391
|
(0, _classCallCheck3.default)(this, Member);
|
|
2278
2392
|
|
|
@@ -2295,15 +2409,15 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2295
2409
|
return key == 'canusedbalancestorage';
|
|
2296
2410
|
});
|
|
2297
2411
|
|
|
2298
|
-
var
|
|
2299
|
-
isNewRetailBCPos =
|
|
2412
|
+
var _ref26 = _mutantsUtil.platform || {},
|
|
2413
|
+
isNewRetailBCPos = _ref26.isNewRetailBCPos;
|
|
2300
2414
|
|
|
2301
2415
|
(0, _mobx.runInAction)(function () {
|
|
2302
|
-
|
|
2416
|
+
_this22.cardNo = m.CardCode;
|
|
2303
2417
|
if (index >= 0) {
|
|
2304
|
-
|
|
2418
|
+
_this22.balance = parseFloat(m.DynamicPropertyValues[index]);
|
|
2305
2419
|
} else {
|
|
2306
|
-
|
|
2420
|
+
_this22.balance = _this22.rawbalance;
|
|
2307
2421
|
}
|
|
2308
2422
|
});
|
|
2309
2423
|
this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;
|