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