tplus-components-touch 3.33.3 → 3.33.4

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.
@@ -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 _ref5 = _mutantsUtil.platform || {},
546
- isNewRetailBCPos = _ref5.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 _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;
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 _ref7 = _mutantsUtil.platform || {},
687
- isNewRetailBCPos = _ref7.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 _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(result) {
733
+ var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(result) {
695
734
  var data, m;
696
- return _regenerator2.default.wrap(function _callee2$(_context2) {
735
+ return _regenerator2.default.wrap(function _callee3$(_context3) {
697
736
  while (1) {
698
- switch (_context2.prev = _context2.next) {
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
- _context2.next = 25;
743
+ _context3.next = 25;
705
744
  break;
706
745
  }
707
746
 
708
747
  if (!(result.data.length === 1)) {
709
- _context2.next = 14;
748
+ _context3.next = 14;
710
749
  break;
711
750
  }
712
751
 
713
752
  if (!(m.CardTypeEnum === 'BALANCE_CARD')) {
714
- _context2.next = 10;
753
+ _context3.next = 10;
715
754
  break;
716
755
  }
717
756
 
718
757
  _this7.paymode.updateCardInfo(m);
719
758
  _this7.handleCzkData(m);
720
- return _context2.abrupt('return', result.data);
759
+ return _context3.abrupt('return', result.data);
721
760
 
722
761
  case 10:
723
- _context2.next = 12;
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
- _context2.next = 25;
775
+ _context3.next = 25;
737
776
  break;
738
777
 
739
778
  case 14:
740
779
  if (!(result.data && result.data.length === 1)) {
741
- _context2.next = 19;
780
+ _context3.next = 19;
742
781
  break;
743
782
  }
744
783
 
745
784
  _this7.paymode.updateCardInfo(result.data[0]);
746
- return _context2.abrupt('return', result.data);
785
+ return _context3.abrupt('return', result.data);
747
786
 
748
787
  case 19:
749
788
  if (!(result.data && result.data.length > 1)) {
750
- _context2.next = 23;
789
+ _context3.next = 23;
751
790
  break;
752
791
  }
753
792
 
754
- return _context2.abrupt('return', result.data);
793
+ return _context3.abrupt('return', result.data);
755
794
 
756
795
  case 23:
757
796
  _message2.default.warn('没有可用储值卡!');
758
- return _context2.abrupt('return', false);
797
+ return _context3.abrupt('return', false);
759
798
 
760
799
  case 25:
761
800
  case 'end':
762
- return _context2.stop();
801
+ return _context3.stop();
763
802
  }
764
803
  }
765
- }, _callee2, _this7);
804
+ }, _callee3, _this7);
766
805
  }));
767
806
 
768
807
  return function (_x2) {
769
- return _ref8.apply(this, arguments);
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 _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(bTest) {
1075
- var _ref10, isNewRetailBCPos;
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 _callee3$(_context3) {
1159
+ return _regenerator2.default.wrap(function _callee4$(_context4) {
1078
1160
  while (1) {
1079
- switch (_context3.prev = _context3.next) {
1161
+ switch (_context4.prev = _context4.next) {
1080
1162
  case 0:
1081
1163
  console.log('settlementStore.commit开始,参数:' + bTest);
1082
1164
 
1083
1165
  if (!bTest) {
1084
- _context3.next = 3;
1166
+ _context4.next = 3;
1085
1167
  break;
1086
1168
  }
1087
1169
 
1088
- return _context3.abrupt('return', _promise2.default.resolve(true));
1170
+ return _context4.abrupt('return', _promise2.default.resolve(true));
1089
1171
 
1090
1172
  case 3:
1091
- _ref10 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref10.isNewRetailBCPos;
1092
- _context3.prev = 4;
1173
+ _ref11 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref11.isNewRetailBCPos;
1174
+ _context4.prev = 4;
1093
1175
 
1094
1176
  if (!(this.type == 1)) {
1095
- _context3.next = 10;
1177
+ _context4.next = 24;
1096
1178
  break;
1097
1179
  }
1098
1180
 
1099
- _context3.next = 8;
1100
- return this.saveMember();
1181
+ _context4.next = 8;
1182
+ return this.findStorageBillValidate();
1101
1183
 
1102
1184
  case 8:
1103
- _context3.next = 18;
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 10:
1220
+ case 24:
1107
1221
  if (!isNewRetailBCPos) {
1108
- _context3.next = 13;
1222
+ _context4.next = 27;
1109
1223
  break;
1110
1224
  }
1111
1225
 
1112
- _context3.next = 13;
1226
+ _context4.next = 27;
1113
1227
  return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
1114
1228
 
1115
- case 13:
1116
- _context3.next = 15;
1229
+ case 27:
1230
+ _context4.next = 29;
1117
1231
  return this.save();
1118
1232
 
1119
- case 15:
1233
+ case 29:
1120
1234
  if (!isNewRetailBCPos) {
1121
- _context3.next = 18;
1235
+ _context4.next = 32;
1122
1236
  break;
1123
1237
  }
1124
1238
 
1125
- _context3.next = 18;
1239
+ _context4.next = 32;
1126
1240
  return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
1127
1241
 
1128
- case 18:
1129
- return _context3.abrupt('return', _promise2.default.resolve(true));
1242
+ case 32:
1243
+ return _context4.abrupt('return', _promise2.default.resolve(true));
1130
1244
 
1131
- case 21:
1132
- _context3.prev = 21;
1133
- _context3.t0 = _context3['catch'](4);
1245
+ case 35:
1246
+ _context4.prev = 35;
1247
+ _context4.t0 = _context4['catch'](4);
1134
1248
 
1135
- console.error('settlementStore.commit失败,错误信息:' + _context3.t0);
1136
- return _context3.abrupt('return', _promise2.default.resolve(_context3.t0));
1249
+ console.error('settlementStore.commit失败,错误信息:' + _context4.t0);
1250
+ return _context4.abrupt('return', _promise2.default.resolve(_context4.t0));
1137
1251
 
1138
- case 25:
1252
+ case 39:
1139
1253
  case 'end':
1140
- return _context3.stop();
1254
+ return _context4.stop();
1141
1255
  }
1142
1256
  }
1143
- }, _callee3, this, [[4, 21]]);
1257
+ }, _callee4, this, [[4, 35]]);
1144
1258
  }));
1145
1259
 
1146
1260
  function commit(_x3) {
1147
- return _ref9.apply(this, arguments);
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 _this10 = this;
1275
+ var _this11 = this;
1162
1276
 
1163
- var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
1164
- PayStyle = _enumController$getEn14.PayStyle;
1277
+ var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
1278
+ PayStyle = _enumController$getEn15.PayStyle;
1165
1279
 
1166
1280
  (0, _mobx.runInAction)(function () {
1167
- _this10.dto.StorageMutiSettleDetails = [];
1168
- var thePaymodes = _this10.newStyle ? (0, _filter3.default)(_this10.paymode.thePaymodes, function (mode) {
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
- }) : _this10.paymode.thePaymodes;
1284
+ }) : _this11.paymode.thePaymodes;
1171
1285
  (0, _each3.default)(thePaymodes, function (mode) {
1172
- var themode = (0, _find3.default)(_this10.paymode.paymodes, { 'paymentType': mode.paymentType });
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 && _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);
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
- _this10.dto.StorageMutiSettleDetails.push({
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: _this10.dataSource }
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
- _this10.handlePrint(resp);
1313
+ _this11.handlePrint(resp);
1200
1314
  });
1201
1315
  }
1202
1316
  }, {
1203
1317
  key: 'save',
1204
1318
  value: function () {
1205
- var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
1206
- var _this11 = this;
1319
+ var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
1320
+ var _this12 = this;
1207
1321
 
1208
- var _enumController$getEn15, PayStyle, _ref13, isNewRetailBCPos, IPMSG, RetailTypeEnum;
1322
+ var _enumController$getEn16, PayStyle, _ref15, isNewRetailBCPos, IPMSG, RetailTypeEnum;
1209
1323
 
1210
- return _regenerator2.default.wrap(function _callee4$(_context4) {
1324
+ return _regenerator2.default.wrap(function _callee5$(_context5) {
1211
1325
  while (1) {
1212
- switch (_context4.prev = _context4.next) {
1326
+ switch (_context5.prev = _context5.next) {
1213
1327
  case 0:
1214
- _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn15.PayStyle;
1328
+ _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn16.PayStyle;
1215
1329
 
1216
1330
  (0, _mobx.runInAction)(function () {
1217
- _this11.dto.RetailPaymentDetails = [];
1218
- _this11.dto.RetailStorageDetails = [];
1219
- _this11.dto.RetailCouponDetails = [];
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 = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
1336
+ var thePaymodes = _this12.newStyle ? (0, _filter3.default)(_this12.paymode.thePaymodes, function (mode) {
1223
1337
  return parseFloat(mode.value) != 0;
1224
- }) : _this11.paymode.thePaymodes;
1338
+ }) : _this12.paymode.thePaymodes;
1225
1339
  (0, _each3.default)(thePaymodes, function (mode, index) {
1226
- var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
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
- _this11.dto.RetailStorageDetails.push({
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: _this11.dataSource },
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 && _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);
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
- _this11.dto.RetailPaymentDetails.push({
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: _this11.dataSource }
1376
+ DataSource: { Id: _this12.dataSource }
1263
1377
  });
1264
1378
  if (mode.paymentType == PayStyle.djq) {
1265
- (0, _each3.default)(_this11.paymode.checkList && _this11.paymode.checkList.length ? _this11.paymode.checkList : mode.djqs, function (djq) {
1266
- _this11.dto.RetailCouponDetails.push({
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: _this11.dataSource }
1390
+ DataSource: { Id: _this12.dataSource }
1277
1391
  });
1278
1392
  });
1279
1393
  }
1280
1394
  }
1281
1395
  });
1282
1396
 
1283
- var _ref12 = _mutantsUtil.platform || {},
1284
- isNewRetailBCPos = _ref12.isNewRetailBCPos;
1397
+ var _ref14 = _mutantsUtil.platform || {},
1398
+ isNewRetailBCPos = _ref14.isNewRetailBCPos;
1285
1399
 
1286
- if (_this11.dto.RetailStorageDetails.length > 0) {
1287
- var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
1400
+ if (_this12.dto.RetailStorageDetails.length > 0) {
1401
+ var themode = (0, _find3.default)(_this12.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
1288
1402
  if (isNewRetailBCPos) {
1289
- _this11.dto.RetailPaymentDetails.push({
1290
- Code: _this11.paymode.counter,
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: _this11.dataSource },
1298
- RetailStorageDetails: _this11.dto.RetailStorageDetails
1411
+ DataSource: { Id: _this12.dataSource },
1412
+ RetailStorageDetails: _this12.dto.RetailStorageDetails
1299
1413
  });
1300
1414
  } else {
1301
- _this11.dto.RetailPaymentDetails.push({
1302
- Code: _this11.paymode.counter,
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: _this11.dataSource }
1423
+ DataSource: { Id: _this12.dataSource }
1310
1424
  });
1311
1425
  }
1312
1426
  }
1313
1427
  });
1314
- _ref13 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref13.isNewRetailBCPos;
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
- _context4.next = 20;
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
- _context4.t1 = this.dto.IdbusiType == 37;
1444
+ _context5.t1 = this.dto.IdbusiType == 37;
1331
1445
 
1332
- if (!_context4.t1) {
1333
- _context4.next = 13;
1446
+ if (!_context5.t1) {
1447
+ _context5.next = 13;
1334
1448
  break;
1335
1449
  }
1336
1450
 
1337
- _context4.next = 12;
1451
+ _context5.next = 12;
1338
1452
  return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
1339
1453
 
1340
1454
  case 12:
1341
- _context4.t1 = _context4.sent;
1455
+ _context5.t1 = _context5.sent;
1342
1456
 
1343
1457
  case 13:
1344
- _context4.t0 = _context4.t1;
1458
+ _context5.t0 = _context5.t1;
1345
1459
 
1346
- if (_context4.t0) {
1347
- _context4.next = 16;
1460
+ if (_context5.t0) {
1461
+ _context5.next = 16;
1348
1462
  break;
1349
1463
  }
1350
1464
 
1351
- _context4.t0 = this.dto.IdbusiType != 37;
1465
+ _context5.t0 = this.dto.IdbusiType != 37;
1352
1466
 
1353
1467
  case 16:
1354
- if (!_context4.t0) {
1355
- _context4.next = 18;
1468
+ if (!_context5.t0) {
1469
+ _context5.next = 18;
1356
1470
  break;
1357
1471
  }
1358
1472
 
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;
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
- _context4.next = 21;
1480
+ _context5.next = 21;
1367
1481
  break;
1368
1482
 
1369
1483
  case 20:
1370
- return _context4.abrupt('return', (0, _tplusApi.tApi)({ dto: this.dto.cut() }, 'chanjet.RE.newRetail.Settle', false, false, { timeout_skip: true }).then(function (resp) {
1371
- _this11.setDtoID(resp.ID);
1372
- _this11.billID = resp.ID;
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 _context4.stop();
1491
+ return _context5.stop();
1378
1492
  }
1379
1493
  }
1380
- }, _callee4, this);
1494
+ }, _callee5, this);
1381
1495
  }));
1382
1496
 
1383
1497
  function save() {
1384
- return _ref11.apply(this, arguments);
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 _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
1403
- return _regenerator2.default.wrap(function _callee5$(_context5) {
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 (_context5.prev = _context5.next) {
1519
+ switch (_context6.prev = _context6.next) {
1406
1520
  case 0:
1407
- _context5.prev = 0;
1408
- _context5.t0 = _promise2.default;
1409
- _context5.next = 4;
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
- _context5.t1 = _context5.sent;
1414
- return _context5.abrupt('return', _context5.t0.resolve.call(_context5.t0, _context5.t1));
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
- _context5.prev = 8;
1418
- _context5.t2 = _context5['catch'](0);
1419
- return _context5.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
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 _context5.stop();
1537
+ return _context6.stop();
1424
1538
  }
1425
1539
  }
1426
- }, _callee5, this, [[0, 8]]);
1540
+ }, _callee6, this, [[0, 8]]);
1427
1541
  }));
1428
1542
 
1429
1543
  function querySettleResult() {
1430
- return _ref14.apply(this, arguments);
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 _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(value) {
1457
- var _ref16, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, cardStatusEnum, result, count, _result;
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 _callee6$(_context6) {
1573
+ return _regenerator2.default.wrap(function _callee7$(_context7) {
1460
1574
  while (1) {
1461
- switch (_context6.prev = _context6.next) {
1575
+ switch (_context7.prev = _context7.next) {
1462
1576
  case 0:
1463
- _ref16 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref16.isNewRetailBCPos;
1464
- _context6.prev = 1;
1577
+ _ref18 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref18.isNewRetailBCPos;
1578
+ _context7.prev = 1;
1465
1579
 
1466
1580
  if (!isNewRetailBCPos) {
1467
- _context6.next = 33;
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
- _context6.next = 12;
1591
+ _context7.next = 12;
1478
1592
  break;
1479
1593
  }
1480
1594
 
1481
1595
  if (!cook2.hasOwnProperty(memberStorageId + "")) {
1482
- _context6.next = 12;
1596
+ _context7.next = 12;
1483
1597
  break;
1484
1598
  }
1485
1599
 
1486
1600
  if (!(cook2[memberStorageId] > 3)) {
1487
- _context6.next = 12;
1601
+ _context7.next = 12;
1488
1602
  break;
1489
1603
  }
1490
1604
 
1491
1605
  message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
1492
- return _context6.abrupt('return', _promise2.default.resolve(message));
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
- _context6.next = 20;
1613
+ _context7.next = 20;
1500
1614
  break;
1501
1615
  }
1502
1616
 
1503
- _context6.next = 17;
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 = _context6.sent;
1508
- _context6.next = 29;
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
- _context6.next = 26;
1627
+ _context7.next = 26;
1514
1628
  break;
1515
1629
  }
1516
1630
 
1517
- _context6.next = 23;
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 = _context6.sent;
1522
- _context6.next = 29;
1635
+ result = _context7.sent;
1636
+ _context7.next = 29;
1523
1637
  break;
1524
1638
 
1525
1639
  case 26:
1526
- _context6.next = 28;
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 = _context6.sent;
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 _context6.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
1663
+ return _context7.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
1550
1664
 
1551
1665
  case 33:
1552
- _context6.next = 35;
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 = _context6.sent;
1560
- return _context6.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
1673
+ _result = _context7.sent;
1674
+ return _context7.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
1561
1675
 
1562
1676
  case 37:
1563
- _context6.next = 42;
1677
+ _context7.next = 42;
1564
1678
  break;
1565
1679
 
1566
1680
  case 39:
1567
- _context6.prev = 39;
1568
- _context6.t0 = _context6['catch'](1);
1569
- return _context6.abrupt('return', "failed");
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 _context6.stop();
1687
+ return _context7.stop();
1574
1688
  }
1575
1689
  }
1576
- }, _callee6, this, [[1, 39]]);
1690
+ }, _callee7, this, [[1, 39]]);
1577
1691
  }));
1578
1692
 
1579
1693
  function validePwd(_x4) {
1580
- return _ref15.apply(this, arguments);
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 _this12 = this;
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: _this12.paymode.currentMode.memberId,
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 _this13 = this;
1730
+ var _this14 = this;
1617
1731
 
1618
1732
  return function () {
1619
- var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(_this) {
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 _callee7$(_context7) {
1736
+ return _regenerator2.default.wrap(function _callee8$(_context8) {
1623
1737
  while (1) {
1624
- switch (_context7.prev = _context7.next) {
1738
+ switch (_context8.prev = _context8.next) {
1625
1739
  case 0:
1626
- _getLoginInfo = _this13.getLoginInfo(), IdStore = _getLoginInfo.IdStore, StoreCode = _getLoginInfo.StoreCode;
1627
- _context7.next = 3;
1628
- return (0, _tplusApi.tApi)({ Idmember: _this13.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
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 = _context7.sent;
1745
+ resp = _context8.sent;
1632
1746
 
1633
1747
  _this.member = resp;
1634
1748
  _this.paymode.updateMemberStorageCardNo(resp.StorageCardNo, resp.WalletEnabled);
1635
- return _context7.abrupt('return', _promise2.default.resolve(resp));
1749
+ return _context8.abrupt('return', _promise2.default.resolve(resp));
1636
1750
 
1637
1751
  case 7:
1638
1752
  case 'end':
1639
- return _context7.stop();
1753
+ return _context8.stop();
1640
1754
  }
1641
1755
  }
1642
- }, _callee7, _this13);
1756
+ }, _callee8, _this14);
1643
1757
  }));
1644
1758
 
1645
1759
  return function (_x5) {
1646
- return _ref17.apply(this, arguments);
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 _this14 = this;
1767
+ var _this15 = this;
1654
1768
 
1655
1769
  return function () {
1656
- var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(memberId) {
1770
+ var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(memberId) {
1657
1771
  var result;
1658
- return _regenerator2.default.wrap(function _callee8$(_context8) {
1772
+ return _regenerator2.default.wrap(function _callee9$(_context9) {
1659
1773
  while (1) {
1660
- switch (_context8.prev = _context8.next) {
1774
+ switch (_context9.prev = _context9.next) {
1661
1775
  case 0:
1662
- _context8.next = 2;
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 = _context8.sent;
1780
+ result = _context9.sent;
1667
1781
 
1668
1782
  if (!(result && result.data.length)) {
1669
- _context8.next = 20;
1783
+ _context9.next = 20;
1670
1784
  break;
1671
1785
  }
1672
1786
 
1673
1787
  if (!(result.data.length === 1)) {
1674
- _context8.next = 9;
1788
+ _context9.next = 9;
1675
1789
  break;
1676
1790
  }
1677
1791
 
1678
- _this14.paymode.updateCardInfo(result.data[0]);
1679
- return _context8.abrupt('return', result.data);
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
- _context8.next = 14;
1797
+ _context9.next = 14;
1684
1798
  break;
1685
1799
  }
1686
1800
 
1687
- _this14.paymode.updateCardInfo(result.data[0]);
1688
- return _context8.abrupt('return', result.data);
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
- _context8.next = 18;
1806
+ _context9.next = 18;
1693
1807
  break;
1694
1808
  }
1695
1809
 
1696
- return _context8.abrupt('return', result.data);
1810
+ return _context9.abrupt('return', result.data);
1697
1811
 
1698
1812
  case 18:
1699
1813
  _message2.default.warn('没有可用储值卡!');
1700
- return _context8.abrupt('return', false);
1814
+ return _context9.abrupt('return', false);
1701
1815
 
1702
1816
  case 20:
1703
1817
  case 'end':
1704
- return _context8.stop();
1818
+ return _context9.stop();
1705
1819
  }
1706
1820
  }
1707
- }, _callee8, _this14);
1821
+ }, _callee9, _this15);
1708
1822
  }));
1709
1823
 
1710
1824
  return function (_x6) {
1711
- return _ref18.apply(this, arguments);
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 _this15 = this;
1832
+ var _this16 = this;
1719
1833
 
1720
- return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9() {
1834
+ return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10() {
1721
1835
  var address, result;
1722
- return _regenerator2.default.wrap(function _callee9$(_context9) {
1836
+ return _regenerator2.default.wrap(function _callee10$(_context10) {
1723
1837
  while (1) {
1724
- switch (_context9.prev = _context9.next) {
1838
+ switch (_context10.prev = _context10.next) {
1725
1839
  case 0:
1726
- address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + _this15.paymode.currentMode.storageCardNo;
1727
- _context9.next = 3;
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 = _context9.sent;
1845
+ result = _context10.sent;
1732
1846
 
1733
- _this15.paymode.updateCardInfo(result.data);
1847
+ _this16.paymode.updateCardInfo(result.data);
1734
1848
 
1735
1849
  case 5:
1736
1850
  case 'end':
1737
- return _context9.stop();
1851
+ return _context10.stop();
1738
1852
  }
1739
1853
  }
1740
- }, _callee9, _this15);
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 _this16 = this;
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 _ref20 = _mutantsUtil.platform || {},
1856
- isNewRetailBCPos = _ref20.isNewRetailBCPos;
1969
+ var _ref22 = _mutantsUtil.platform || {},
1970
+ isNewRetailBCPos = _ref22.isNewRetailBCPos;
1857
1971
 
1858
- var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
1859
- PayStyle = _enumController$getEn16.PayStyle,
1860
- Differentiate = _enumController$getEn16.Differentiate;
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
- _this16.checkList.splice(i, 1);
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
- _this16.currentMode.djqs.forEach(function (djq) {
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 _ref21 = element || {},
1967
- couponCode = _ref21.couponCode,
1968
- name = _ref21.name,
1969
- tieredAmountResult = _ref21.tieredAmountResult,
1970
- fromDate = _ref21.fromDate,
1971
- dateMount = _ref21.dateMount,
1972
- promoMethodEnum = _ref21.promoMethodEnum,
1973
- discountPct = _ref21.discountPct,
1974
- nominalAmount = _ref21.nominalAmount,
1975
- promoId = _ref21.promoId,
1976
- id = _ref21.id,
1977
- doorsill = _ref21.doorsill;
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
- _this16.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
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
- _this16.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
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 _ref22 = _mutantsUtil.platform || {},
2022
- isNewRetailBCPos = _ref22.isNewRetailBCPos;
2135
+ var _ref24 = _mutantsUtil.platform || {},
2136
+ isNewRetailBCPos = _ref24.isNewRetailBCPos;
2023
2137
 
2024
- var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
2025
- Differentiate = _enumController$getEn17.Differentiate;
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$getEn18 = _mutantsUtil.enumController.getEnumOj(),
2088
- PayStyle = _enumController$getEn18.PayStyle;
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 _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(type, isIntegralExchange) {
2113
- var _this17 = this;
2226
+ var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(type, isIntegralExchange) {
2227
+ var _this18 = this;
2114
2228
 
2115
- var _enumController$getEn19, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
2229
+ var _enumController$getEn20, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
2116
2230
 
2117
- return _regenerator2.default.wrap(function _callee10$(_context10) {
2231
+ return _regenerator2.default.wrap(function _callee11$(_context11) {
2118
2232
  while (1) {
2119
- switch (_context10.prev = _context10.next) {
2233
+ switch (_context11.prev = _context11.next) {
2120
2234
  case 0:
2121
- _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn19.settleStyleType, PayStyle = _enumController$getEn19.PayStyle;
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
- _context10.next = 5;
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 = _context10.sent;
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
- _this17.paymodes = paymodes;
2267
+ _this18.paymodes = paymodes;
2154
2268
  //modes.QuickSettleStyles
2155
2269
  });
2156
2270
  }
2157
2271
 
2158
2272
  case 7:
2159
2273
  case 'end':
2160
- return _context10.stop();
2274
+ return _context11.stop();
2161
2275
  }
2162
2276
  }
2163
- }, _callee10, this);
2277
+ }, _callee11, this);
2164
2278
  }));
2165
2279
 
2166
2280
  function setPaymodes(_x7, _x8) {
2167
- return _ref23.apply(this, arguments);
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 _this18 = this;
2336
+ var _this19 = this;
2223
2337
 
2224
2338
  return function () {
2225
- _this18.checkList = [];
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 _this19 = this;
2345
+ var _this20 = this;
2232
2346
 
2233
2347
  return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
2234
- _this19.currentMode.djqs.forEach(function (ele) {
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 _this20 = this;
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
- _this20.currentMode.djqs.push(djq);
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 _this21 = this;
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 _ref24 = _mutantsUtil.platform || {},
2299
- isNewRetailBCPos = _ref24.isNewRetailBCPos;
2412
+ var _ref26 = _mutantsUtil.platform || {},
2413
+ isNewRetailBCPos = _ref26.isNewRetailBCPos;
2300
2414
 
2301
2415
  (0, _mobx.runInAction)(function () {
2302
- _this21.cardNo = m.CardCode;
2416
+ _this22.cardNo = m.CardCode;
2303
2417
  if (index >= 0) {
2304
- _this21.balance = parseFloat(m.DynamicPropertyValues[index]);
2418
+ _this22.balance = parseFloat(m.DynamicPropertyValues[index]);
2305
2419
  } else {
2306
- _this21.balance = _this21.rawbalance;
2420
+ _this22.balance = _this22.rawbalance;
2307
2421
  }
2308
2422
  });
2309
2423
  this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;