tplus-components-touch 3.37.1 → 3.37.2

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.
@@ -172,6 +172,7 @@ var SettlementStore = (_class = function () {
172
172
  (0, _classCallCheck3.default)(this, SettlementStore);
173
173
  this.paymode = null;
174
174
  this.dto = null;
175
+ this.dtoParams = null;
175
176
  this.member = null;
176
177
  this.brefund = false;
177
178
  this.bquick = false;
@@ -237,8 +238,6 @@ var SettlementStore = (_class = function () {
237
238
  var promoVoucher = {};
238
239
  _this2.paymode.clearDjqs();
239
240
  _this2.paymode.reCalculationDjqs();
240
- // promoVoucher.bizDate = dto.VoucherDate;
241
- // promoVoucher.bizDate = new Date().getTime();
242
241
  promoVoucher.coupon_code = coupon_code || "";
243
242
  promoVoucher.boName = "Retail";
244
243
  promoVoucher.voucherId = dto.ID;
@@ -325,11 +324,7 @@ var SettlementStore = (_class = function () {
325
324
  _message2.default.error(Differentiate.COUPON + '\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
326
325
  } else {
327
326
  var IsEnable = couponCategoryEnum === 'RIGUP' || couponCategoryEnum === 'UN_MATCH' || couponCategoryEnum === "PREPARING" || couponCategoryEnum === 'PROMO_LIMITED' || couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
328
-
329
- var _ref2 = _mutantsUtil.platform || {},
330
- isNewRetailBCPos = _ref2.isNewRetailBCPos;
331
-
332
- _this2.addDjq(couponCode, name, IsEnable, promoMethodEnum == "CASH_COUPON" ? nominalAmount : promoDiscount, condValue, null, false, !result.IsRepelWithPoints, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, true, 1);
327
+ _this2.addDjq(couponCode, name, IsEnable, promoMethodEnum == "CASH_COUPON" && nominalAmount, promoDiscount, condValue, null, false, !result.IsRepelWithPoints, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, true, 1);
333
328
  }
334
329
  });
335
330
  if (promoVoucher.coupon_code) {
@@ -352,14 +347,14 @@ var SettlementStore = (_class = function () {
352
347
  };
353
348
 
354
349
  this.checkCoupon = function () {
355
- var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(sn) {
356
- var _ref4, isNewRetailBCPos, _enumController$getEn3, PayStyle, Differentiate;
350
+ var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(sn) {
351
+ var _ref3, isNewRetailBCPos, _enumController$getEn3, PayStyle, Differentiate;
357
352
 
358
353
  return _regenerator2.default.wrap(function _callee$(_context) {
359
354
  while (1) {
360
355
  switch (_context.prev = _context.next) {
361
356
  case 0:
362
- _ref4 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref4.isNewRetailBCPos;
357
+ _ref3 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref3.isNewRetailBCPos;
363
358
 
364
359
  if (!isNewRetailBCPos) {
365
360
  _context.next = 7;
@@ -427,10 +422,56 @@ var SettlementStore = (_class = function () {
427
422
  }));
428
423
 
429
424
  return function (_x) {
430
- return _ref3.apply(this, arguments);
425
+ return _ref2.apply(this, arguments);
431
426
  };
432
427
  }();
433
428
 
429
+ this.repeatStorageModal = function (content) {
430
+ return new _promise2.default(function (resolve, reject) {
431
+ _tplusComponentsTouch.ModalWraper.confirm({
432
+ title: '',
433
+ okText: '继续储值',
434
+ className: 'repeat-modal',
435
+ zIndex: 1007,
436
+ content: content,
437
+ onOk: function () {
438
+ var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2() {
439
+ var ret;
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
+ ret = _context2.sent;
449
+
450
+ if (ret === false) {
451
+ resolve(false);
452
+ } else {
453
+ resolve(true);
454
+ }
455
+
456
+ case 4:
457
+ case 'end':
458
+ return _context2.stop();
459
+ }
460
+ }
461
+ }, _callee2, _this2);
462
+ }));
463
+
464
+ return function onOk() {
465
+ return _ref4.apply(this, arguments);
466
+ };
467
+ }(),
468
+ onCancel: function onCancel() {
469
+ resolve(false);
470
+ }
471
+ });
472
+ });
473
+ };
474
+
434
475
  this.checkIntegralExchangeReturn = function (id) {
435
476
  return new _promise2.default(function (resolve, reject) {
436
477
  (0, _tplusApi.tApi)({ param: { refVoucherId: id } }, 'chanjet.RE.NewPos.GetNewIntegralExchange', false, false, { timeout_skip: true }).then(function (resp) {
@@ -566,7 +607,8 @@ var SettlementStore = (_class = function () {
566
607
  authCode: detail.PaymentCode,
567
608
  steadCashIntegral: detail.SteadCashIntegral,
568
609
  overchargesAmount: detail.OverchargesAmount,
569
- boriginReturn: true
610
+ boriginReturn: true,
611
+ thirdPaymentReturnInfo: detail.ThirdPaymentReturnInfo
570
612
  });
571
613
  _this5.paymode.currentMode = newmode;
572
614
  if (themode.paymentType == PayStyle.djq) {
@@ -581,10 +623,10 @@ var SettlementStore = (_class = function () {
581
623
  promoId = _ref6.promoId,
582
624
  id = _ref6.id;
583
625
 
584
- _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);
626
+ _this5.addDjq(djq.CouponCode, djq.CouponTitle, true, null, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false, _this5.dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, null, id, true);
585
627
  return;
586
628
  }
587
- _this5.addDjq(djq.CouponCode, djq.CouponTitle, true, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false);
629
+ _this5.addDjq(djq.CouponCode, djq.CouponTitle, true, null, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false);
588
630
  });
589
631
  }
590
632
  _this5.paymode.thePaymodes.push(newmode);
@@ -698,36 +740,36 @@ var SettlementStore = (_class = function () {
698
740
  // address = '/member/memberProfile/FindByStorageCode/'+v;
699
741
  address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + v + '/' + true;
700
742
  return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function () {
701
- var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(result) {
743
+ var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(result) {
702
744
  var data, m;
703
- return _regenerator2.default.wrap(function _callee2$(_context2) {
745
+ return _regenerator2.default.wrap(function _callee3$(_context3) {
704
746
  while (1) {
705
- switch (_context2.prev = _context2.next) {
747
+ switch (_context3.prev = _context3.next) {
706
748
  case 0:
707
749
  data = result.data;
708
750
  m = data && data.length && data[0];
709
751
 
710
752
  if (!(result && result.data.length)) {
711
- _context2.next = 25;
753
+ _context3.next = 25;
712
754
  break;
713
755
  }
714
756
 
715
757
  if (!(result.data.length === 1)) {
716
- _context2.next = 14;
758
+ _context3.next = 14;
717
759
  break;
718
760
  }
719
761
 
720
762
  if (!(m.CardTypeEnum === 'BALANCE_CARD')) {
721
- _context2.next = 10;
763
+ _context3.next = 10;
722
764
  break;
723
765
  }
724
766
 
725
767
  _this7.paymode.updateCardInfo(m);
726
768
  _this7.handleCzkData(m);
727
- return _context2.abrupt('return', result.data);
769
+ return _context3.abrupt('return', result.data);
728
770
 
729
771
  case 10:
730
- _context2.next = 12;
772
+ _context3.next = 12;
731
773
  return (0, _tplusApi.ccApi)({ dto: _this7.dto, meStorageCardId: m.MeStorageCardId }, '/retail/RetailPos/validateRetailStorageCard', false, false).then(function (result1) {
732
774
  var data1 = result1.data ? JSON.parse(result1.data)[0] : {};
733
775
  if (data1.enable) {
@@ -740,36 +782,36 @@ var SettlementStore = (_class = function () {
740
782
  });
741
783
 
742
784
  case 12:
743
- _context2.next = 25;
785
+ _context3.next = 25;
744
786
  break;
745
787
 
746
788
  case 14:
747
789
  if (!(result.data && result.data.length === 1)) {
748
- _context2.next = 19;
790
+ _context3.next = 19;
749
791
  break;
750
792
  }
751
793
 
752
794
  _this7.paymode.updateCardInfo(result.data[0]);
753
- return _context2.abrupt('return', result.data);
795
+ return _context3.abrupt('return', result.data);
754
796
 
755
797
  case 19:
756
798
  if (!(result.data && result.data.length > 1)) {
757
- _context2.next = 23;
799
+ _context3.next = 23;
758
800
  break;
759
801
  }
760
802
 
761
- return _context2.abrupt('return', result.data);
803
+ return _context3.abrupt('return', result.data);
762
804
 
763
805
  case 23:
764
806
  _message2.default.warn('没有可用储值卡!');
765
- return _context2.abrupt('return', false);
807
+ return _context3.abrupt('return', false);
766
808
 
767
809
  case 25:
768
810
  case 'end':
769
- return _context2.stop();
811
+ return _context3.stop();
770
812
  }
771
813
  }
772
- }, _callee2, _this7);
814
+ }, _callee3, _this7);
773
815
  }));
774
816
 
775
817
  return function (_x2) {
@@ -820,12 +862,13 @@ var SettlementStore = (_class = function () {
820
862
  }
821
863
  }, {
822
864
  key: 'addDjq',
823
- value: function addDjq(promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, unCheck, count) {
865
+ value: function addDjq(promoCouponCode, name, IsEnable, nominalAmount, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, unCheck, count) {
824
866
  var djq = {
825
867
  code: promoCouponCode,
826
868
  promoCouponCode: promoCouponCode,
827
869
  name: name,
828
870
  IsEnable: IsEnable,
871
+ nominalAmount: nominalAmount,
829
872
  amount: amount,
830
873
  doorsill: doorsill, //:"无门槛"
831
874
  LastTS: LastTS,
@@ -919,6 +962,7 @@ var SettlementStore = (_class = function () {
919
962
  name: themode.name,
920
963
  exchangeRate: themode.exchangeRate,
921
964
  calDirection: themode.calDirection,
965
+ thridPayment: themode.thridPayment,
922
966
  value: value,
923
967
  value2: (0, _utils.getFixedNumber)(themode.calDirection == "88" ? value / themode.exchangeRate : value * themode.exchangeRate),
924
968
  value3: value,
@@ -947,7 +991,7 @@ var SettlementStore = (_class = function () {
947
991
  if (type == PayStyle.hyczk || type == PayStyle.jfdx || type == PayStyle.djq) {
948
992
  this.setMaxAmount(type, mode);
949
993
  }
950
- console.log(mode);
994
+ console.log('\u5F53\u524D\u64CD\u4F5C\u7ED3\u7B97\u65B9\u5F0F\u4FE1\u606F:' + mode);
951
995
  return mode;
952
996
  }
953
997
  }, {
@@ -984,15 +1028,6 @@ var SettlementStore = (_class = function () {
984
1028
  key: 'changeFocusOnly',
985
1029
  value: function changeFocusOnly(type) {
986
1030
  this.paymode.currentFocus = type;
987
- // 获取焦点时带入剩余的值
988
- // let mode=_find(this.paymode.thePaymodes,{'paymentType':type});
989
- // if(mode && this.isIntegralExchange){
990
- // const shouldSetValue =getFixedNumber(parseFloat(this.paymode.receivable) + parseFloat(mode.value));
991
- // mode.value = shouldSetValue;
992
- // mode.value2 = getFixedNumber(mode.calDirection=="88"?shouldSetValue / mode.exchangeRate:(shouldSetValue * mode.exchangeRate));
993
- // mode.value3 = shouldSetValue;
994
- // this.paymode.calcReserved();
995
- // }
996
1031
  }
997
1032
  }, {
998
1033
  key: 'changeClickFocusOnly',
@@ -1061,8 +1096,6 @@ var SettlementStore = (_class = function () {
1061
1096
  });
1062
1097
  pos = index == -1 ? pos : index + 1;
1063
1098
  }
1064
- // this.paymode.thePaymodes.push(this.genNewMode(type) );
1065
-
1066
1099
  this.paymode.thePaymodes.splice(pos, 0, this.genNewMode(type, this.newStyle && type == PayStyle.hyczk, undefined, isQuick));
1067
1100
  this.paymode.calcReserved();
1068
1101
  }
@@ -1078,79 +1111,175 @@ var SettlementStore = (_class = function () {
1078
1111
  this.paymode.currentFocus = -1;
1079
1112
  this.paymode.calcReserved();
1080
1113
  }
1114
+
1115
+ // 获取储值是否重复, 在commit方法中使用
1116
+
1117
+ }, {
1118
+ key: 'findStorageBillValidate',
1119
+ value: function findStorageBillValidate() {
1120
+ var _this10 = this;
1121
+
1122
+ var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
1123
+ PayStyle = _enumController$getEn14.PayStyle;
1124
+
1125
+ (0, _mobx.runInAction)(function () {
1126
+ _this10.dto.StorageMutiSettleDetails = [];
1127
+ var thePaymodes = _this10.newStyle ? (0, _filter3.default)(_this10.paymode.thePaymodes, function (mode) {
1128
+ return parseFloat(mode.value) != 0;
1129
+ }) : _this10.paymode.thePaymodes;
1130
+ (0, _each3.default)(thePaymodes, function (mode) {
1131
+ var themode = (0, _find3.default)(_this10.paymode.paymodes, { 'paymentType': mode.paymentType });
1132
+
1133
+ var value = parseFloat(mode.value);
1134
+ var giveChange = null;
1135
+ if (mode.paymentType == PayStyle.xianjin && _this10.paymode.receivable < 0 && value > Math.abs(_this10.paymode.receivable)) {
1136
+ value = Math.Add(value, _this10.paymode.receivable);
1137
+ giveChange = Math.abs(_this10.paymode.receivable);
1138
+ }
1139
+ _this10.dto.StorageMutiSettleDetails.push({
1140
+ Code: mode.paymethodId,
1141
+ StorageAmount: value,
1142
+ GiveChange: giveChange,
1143
+ IdsettleStyle: themode.idSettleStyle,
1144
+ IdbankAccount: themode.idBankAccount,
1145
+ PaymentCode: mode.authCode,
1146
+ DynamicPropertyKeys: [],
1147
+ DynamicPropertyValues: [],
1148
+ DataSource: { Id: _this10.dataSource }
1149
+ });
1150
+ });
1151
+ });
1152
+ return (0, _tplusApi.ccApi)((0, _extends3.default)({}, this.dto), '/marketingtool/Storage/findStorageBillValidate', false, false);
1153
+ }
1154
+
1155
+ //判断是否重复弹框
1156
+
1081
1157
  }, {
1082
1158
  key: 'commit',
1083
1159
  value: function () {
1084
- var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(bTest) {
1085
- var _ref10, isNewRetailBCPos;
1160
+ var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(bTest) {
1161
+ var status, paylist, ret, _ref10, _ref10$data, code, returnMsg, state, ret1, ret2;
1086
1162
 
1087
- return _regenerator2.default.wrap(function _callee3$(_context3) {
1163
+ return _regenerator2.default.wrap(function _callee4$(_context4) {
1088
1164
  while (1) {
1089
- switch (_context3.prev = _context3.next) {
1165
+ switch (_context4.prev = _context4.next) {
1090
1166
  case 0:
1091
1167
  console.log('settlementStore.commit开始,参数:' + bTest);
1092
1168
 
1093
1169
  if (!bTest) {
1094
- _context3.next = 3;
1170
+ _context4.next = 3;
1095
1171
  break;
1096
1172
  }
1097
1173
 
1098
- return _context3.abrupt('return', _promise2.default.resolve(true));
1174
+ return _context4.abrupt('return', _promise2.default.resolve(true));
1099
1175
 
1100
1176
  case 3:
1101
- _ref10 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref10.isNewRetailBCPos;
1102
- _context3.prev = 4;
1177
+ status = this.type;
1178
+ _context4.prev = 4;
1179
+ paylist = this.paymode.thePaymodes.filter(function (v) {
1180
+ return !!v.thridPayment && Math.abs(v.value) > 0;
1181
+ }) || [];
1182
+
1183
+ if (!(paylist && paylist.length > 1)) {
1184
+ _context4.next = 9;
1185
+ break;
1186
+ }
1103
1187
 
1104
- if (!(this.type == 1)) {
1105
- _context3.next = 10;
1188
+ _message2.default.warn('二开支付目前仅支持单一结算方式。');
1189
+ return _context4.abrupt('return', _promise2.default.resolve(false));
1190
+
1191
+ case 9:
1192
+ if (!(status == 1)) {
1193
+ _context4.next = 30;
1106
1194
  break;
1107
1195
  }
1108
1196
 
1109
- _context3.next = 8;
1110
- return this.saveMember();
1197
+ _context4.next = 12;
1198
+ return this.findStorageBillValidate();
1111
1199
 
1112
- case 8:
1113
- _context3.next = 18;
1114
- break;
1200
+ case 12:
1201
+ ret = _context4.sent;
1202
+ _ref10 = ret || {}, _ref10$data = _ref10.data;
1203
+ _ref10$data = _ref10$data === undefined ? {} : _ref10$data;
1204
+ code = _ref10$data.code, returnMsg = _ref10$data.returnMsg;
1115
1205
 
1116
- case 10:
1117
- if (!isNewRetailBCPos) {
1118
- _context3.next = 13;
1206
+ if (!(code && code == 10001)) {
1207
+ _context4.next = 24;
1208
+ break;
1209
+ }
1210
+
1211
+ _context4.next = 19;
1212
+ return this.repeatStorageModal(returnMsg);
1213
+
1214
+ case 19:
1215
+ state = _context4.sent;
1216
+
1217
+ if (!(state === false)) {
1218
+ _context4.next = 22;
1119
1219
  break;
1120
1220
  }
1121
1221
 
1122
- _context3.next = 13;
1222
+ return _context4.abrupt('return', _promise2.default.resolve(false));
1223
+
1224
+ case 22:
1225
+ _context4.next = 28;
1226
+ break;
1227
+
1228
+ case 24:
1229
+ _context4.next = 26;
1230
+ return this.saveMember();
1231
+
1232
+ case 26:
1233
+ ret1 = _context4.sent;
1234
+
1235
+ if (ret1 === false) {
1236
+ _promise2.default.resolve(false);
1237
+ }
1238
+
1239
+ case 28:
1240
+ _context4.next = 39;
1241
+ break;
1242
+
1243
+ case 30:
1244
+ _context4.next = 32;
1123
1245
  return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
1124
1246
 
1125
- case 13:
1126
- _context3.next = 15;
1247
+ case 32:
1248
+ _context4.next = 34;
1127
1249
  return this.save();
1128
1250
 
1129
- case 15:
1130
- if (!isNewRetailBCPos) {
1131
- _context3.next = 18;
1251
+ case 34:
1252
+ ret2 = _context4.sent;
1253
+
1254
+ if (!(ret2 === false)) {
1255
+ _context4.next = 37;
1132
1256
  break;
1133
1257
  }
1134
1258
 
1135
- _context3.next = 18;
1259
+ return _context4.abrupt('return', _promise2.default.resolve(false));
1260
+
1261
+ case 37:
1262
+ _context4.next = 39;
1136
1263
  return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
1137
1264
 
1138
- case 18:
1139
- return _context3.abrupt('return', _promise2.default.resolve(true));
1265
+ case 39:
1266
+ return _context4.abrupt('return', _promise2.default.resolve(true));
1140
1267
 
1141
- case 21:
1142
- _context3.prev = 21;
1143
- _context3.t0 = _context3['catch'](4);
1268
+ case 42:
1269
+ _context4.prev = 42;
1270
+ _context4.t0 = _context4['catch'](4);
1144
1271
 
1145
- console.error('settlementStore.commit失败,错误信息:' + _context3.t0);
1146
- return _context3.abrupt('return', _promise2.default.resolve(_context3.t0));
1272
+ console.error('settlementStore.commit失败,错误信息:' + _context4.t0);
1273
+ //其他支付失败时,处理二开支付情况。
1274
+ this.thirdPayRefund(status == 1 ? 2 : 1);
1275
+ return _context4.abrupt('return', _promise2.default.resolve(_context4.t0));
1147
1276
 
1148
- case 25:
1277
+ case 47:
1149
1278
  case 'end':
1150
- return _context3.stop();
1279
+ return _context4.stop();
1151
1280
  }
1152
1281
  }
1153
- }, _callee3, this, [[4, 21]]);
1282
+ }, _callee4, this, [[4, 42]]);
1154
1283
  }));
1155
1284
 
1156
1285
  function commit(_x3) {
@@ -1167,76 +1296,136 @@ var SettlementStore = (_class = function () {
1167
1296
  }
1168
1297
  }, {
1169
1298
  key: 'saveMember',
1170
- value: function saveMember() {
1171
- var _this10 = this;
1299
+ value: function () {
1300
+ var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
1301
+ var _this11 = this;
1172
1302
 
1173
- var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
1174
- PayStyle = _enumController$getEn14.PayStyle;
1303
+ var _enumController$getEn15, PayStyle, TradeType, IPMSG, dtoParams, payList, payment, tradeType, ret, _ref12, type, data, msg, code;
1175
1304
 
1176
- (0, _mobx.runInAction)(function () {
1177
- _this10.dto.StorageMutiSettleDetails = [];
1178
- var thePaymodes = _this10.newStyle ? (0, _filter3.default)(_this10.paymode.thePaymodes, function (mode) {
1179
- return parseFloat(mode.value) != 0;
1180
- }) : _this10.paymode.thePaymodes;
1181
- (0, _each3.default)(thePaymodes, function (mode) {
1182
- var themode = (0, _find3.default)(_this10.paymode.paymodes, { 'paymentType': mode.paymentType });
1305
+ return _regenerator2.default.wrap(function _callee5$(_context5) {
1306
+ while (1) {
1307
+ switch (_context5.prev = _context5.next) {
1308
+ case 0:
1309
+ _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn15.PayStyle, TradeType = _enumController$getEn15.TradeType;
1183
1310
 
1184
- var value = parseFloat(mode.value);
1185
- var giveChange = null;
1186
- if (mode.paymentType == PayStyle.xianjin && _this10.paymode.receivable < 0 && value > Math.abs(_this10.paymode.receivable)) {
1187
- value = Math.Add(value, _this10.paymode.receivable);
1188
- giveChange = Math.abs(_this10.paymode.receivable);
1311
+ (0, _mobx.runInAction)(function () {
1312
+ _this11.dto.StorageMutiSettleDetails = [];
1313
+ var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
1314
+ return parseFloat(mode.value) != 0;
1315
+ }) : _this11.paymode.thePaymodes;
1316
+ (0, _each3.default)(thePaymodes, function (mode) {
1317
+ var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
1318
+
1319
+ var value = parseFloat(mode.value);
1320
+ var giveChange = null;
1321
+ if (mode.paymentType == PayStyle.xianjin && _this11.paymode.receivable < 0 && value > Math.abs(_this11.paymode.receivable)) {
1322
+ value = Math.Add(value, _this11.paymode.receivable);
1323
+ giveChange = Math.abs(_this11.paymode.receivable);
1324
+ }
1325
+ _this11.dto.StorageMutiSettleDetails.push({
1326
+ Code: mode.paymethodId,
1327
+ StorageAmount: value,
1328
+ GiveChange: giveChange,
1329
+ IdsettleStyle: themode.idSettleStyle,
1330
+ IdbankAccount: themode.idBankAccount,
1331
+ PaymentCode: mode.authCode,
1332
+ DynamicPropertyKeys: [],
1333
+ DynamicPropertyValues: [],
1334
+ DataSource: { Id: _this11.dataSource },
1335
+ ThirdPaymentInfo: themode.thridPayment || null,
1336
+ ThirdPaymentReturnInfo: mode.thirdPaymentReturnInfo || null
1337
+ });
1338
+ });
1339
+ });
1340
+ // cc结算调用
1341
+ IPMSG = {};
1342
+
1343
+ if (!!window.localStorage.IPMSG) {
1344
+ IPMSG = JSON.parse(window.localStorage.IPMSG);
1345
+ }
1346
+ dtoParams = this.dto;
1347
+ //处理存在二开支付情况
1348
+
1349
+ payList = dtoParams.StorageMutiSettleDetails.filter(function (v) {
1350
+ return v.ThirdPaymentInfo;
1351
+ });
1352
+
1353
+ if (!(payList && payList.length > 0)) {
1354
+ _context5.next = 19;
1355
+ break;
1356
+ }
1357
+
1358
+ payment = payList[0];
1359
+ tradeType = payment && payment.StorageAmount > 0 ? TradeType.PAY : TradeType.REFUND;
1360
+ _context5.next = 11;
1361
+ return this.thirdPay(2, payment, tradeType, dtoParams);
1362
+
1363
+ case 11:
1364
+ ret = _context5.sent;
1365
+ _ref12 = ret || {}, type = _ref12.type, data = _ref12.data, msg = _ref12.msg, code = _ref12.code;
1366
+
1367
+ if (!(type === true)) {
1368
+ _context5.next = 17;
1369
+ break;
1370
+ }
1371
+
1372
+ dtoParams = data;
1373
+ _context5.next = 19;
1374
+ break;
1375
+
1376
+ case 17:
1377
+ _message2.default.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
1378
+ return _context5.abrupt('return', false);
1379
+
1380
+ case 19:
1381
+ this.dtoParams = dtoParams;
1382
+ console.log('储值结算信息:', dtoParams);
1383
+ return _context5.abrupt('return', (0, _tplusApi.tApi)({ dto: dtoParams }, 'chanjet.ME.INewRetailMemberStorage.Save', false, false).then(function (resp) {
1384
+ _this11.handlePrint(resp);
1385
+ }));
1386
+
1387
+ case 22:
1388
+ case 'end':
1389
+ return _context5.stop();
1390
+ }
1189
1391
  }
1190
- _this10.dto.StorageMutiSettleDetails.push({
1191
- Code: mode.paymethodId,
1192
- StorageAmount: value,
1193
- GiveChange: giveChange,
1194
- IdsettleStyle: themode.idSettleStyle,
1195
- IdbankAccount: themode.idBankAccount,
1196
- PaymentCode: mode.authCode,
1197
- DynamicPropertyKeys: [],
1198
- DynamicPropertyValues: [],
1199
- DataSource: { Id: _this10.dataSource }
1200
- });
1201
- });
1202
- });
1203
- // cc结算调用
1204
- var IPMSG = {};
1205
- if (!!window.localStorage.IPMSG) {
1206
- IPMSG = JSON.parse(window.localStorage.IPMSG);
1392
+ }, _callee5, this);
1393
+ }));
1394
+
1395
+ function saveMember() {
1396
+ return _ref11.apply(this, arguments);
1207
1397
  }
1208
- return (0, _tplusApi.tApi)({ dto: this.dto }, 'chanjet.ME.INewRetailMemberStorage.Save', false, false).then(function (resp) {
1209
- _this10.handlePrint(resp);
1210
- });
1211
- }
1398
+
1399
+ return saveMember;
1400
+ }()
1212
1401
  }, {
1213
1402
  key: 'save',
1214
1403
  value: function () {
1215
- var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
1216
- var _this11 = this;
1404
+ var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
1405
+ var _this12 = this;
1217
1406
 
1218
- var _enumController$getEn15, PayStyle, _ref13, isNewRetailBCPos, IPMSG, RetailTypeEnum;
1407
+ var _enumController$getEn16, PayStyle, TradeType, IPMSG, RetailTypeEnum, dtoParams, payList, payment, tradeType, ret, _ref14, type, data, msg, code;
1219
1408
 
1220
- return _regenerator2.default.wrap(function _callee4$(_context4) {
1409
+ return _regenerator2.default.wrap(function _callee6$(_context6) {
1221
1410
  while (1) {
1222
- switch (_context4.prev = _context4.next) {
1411
+ switch (_context6.prev = _context6.next) {
1223
1412
  case 0:
1224
- _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn15.PayStyle;
1413
+ _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn16.PayStyle, TradeType = _enumController$getEn16.TradeType;
1225
1414
 
1226
1415
  (0, _mobx.runInAction)(function () {
1227
- _this11.dto.RetailPaymentDetails = [];
1228
- _this11.dto.RetailStorageDetails = [];
1229
- _this11.dto.RetailCouponDetails = [];
1416
+ _this12.dto.RetailPaymentDetails = [];
1417
+ _this12.dto.RetailStorageDetails = [];
1418
+ _this12.dto.RetailCouponDetails = [];
1230
1419
  var czkSum = 0;
1231
1420
  var count = 0;
1232
- var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
1421
+ var thePaymodes = _this12.newStyle ? (0, _filter3.default)(_this12.paymode.thePaymodes, function (mode) {
1233
1422
  return parseFloat(mode.value) != 0;
1234
- }) : _this11.paymode.thePaymodes;
1423
+ }) : _this12.paymode.thePaymodes;
1235
1424
  (0, _each3.default)(thePaymodes, function (mode, index) {
1236
- var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
1425
+ var themode = (0, _find3.default)(_this12.paymode.paymodes, { 'paymentType': mode.paymentType });
1237
1426
  if (mode.paymentType == PayStyle.hyczk) {
1238
1427
  czkSum = Math.Add(czkSum, mode.value);
1239
- _this11.dto.RetailStorageDetails.push({
1428
+ _this12.dto.RetailStorageDetails.push({
1240
1429
  Code: mode.paymethodId,
1241
1430
  MeStorageCardId: mode.meStorageCardId,
1242
1431
  StoragePaymentAmount: mode.value,
@@ -1245,17 +1434,17 @@ var SettlementStore = (_class = function () {
1245
1434
  Idmember: mode.memberId,
1246
1435
  DynamicPropertyKeys: [],
1247
1436
  DynamicPropertyValues: [],
1248
- DataSource: { Id: _this11.dataSource },
1437
+ DataSource: { Id: _this12.dataSource },
1249
1438
  Password: mode.authCode
1250
1439
  });
1251
1440
  } else {
1252
1441
  var value = parseFloat(mode.value);
1253
1442
  var giveChange = null;
1254
- if (mode.paymentType == PayStyle.xianjin && _this11.paymode.receivable < 0 && value > Math.abs(_this11.paymode.receivable)) {
1255
- value = Math.Add(value, _this11.paymode.receivable);
1256
- giveChange = Math.abs(_this11.paymode.receivable);
1443
+ if (mode.paymentType == PayStyle.xianjin && _this12.paymode.receivable < 0 && value > Math.abs(_this12.paymode.receivable)) {
1444
+ value = Math.Add(value, _this12.paymode.receivable);
1445
+ giveChange = Math.abs(_this12.paymode.receivable);
1257
1446
  }
1258
- _this11.dto.RetailPaymentDetails.push({
1447
+ _this12.dto.RetailPaymentDetails.push({
1259
1448
  Code: mode.paymethodId,
1260
1449
  OrigAmount: mode.exchangeRate != 1 ? mode.value2 : value,
1261
1450
  Amount: value,
@@ -1269,11 +1458,13 @@ var SettlementStore = (_class = function () {
1269
1458
  OverchargesAmount: mode.overchargesAmount,
1270
1459
  DynamicPropertyKeys: [],
1271
1460
  DynamicPropertyValues: [],
1272
- DataSource: { Id: _this11.dataSource }
1461
+ DataSource: { Id: _this12.dataSource },
1462
+ ThirdPaymentInfo: themode.thridPayment || null,
1463
+ ThirdPaymentReturnInfo: mode.thirdPaymentReturnInfo || null
1273
1464
  });
1274
1465
  if (mode.paymentType == PayStyle.djq) {
1275
- (0, _each3.default)(_this11.paymode.checkList && _this11.paymode.checkList.length ? _this11.paymode.checkList : mode.djqs, function (djq) {
1276
- _this11.dto.RetailCouponDetails.push({
1466
+ (0, _each3.default)(_this12.paymode.checkList && _this12.paymode.checkList.length ? _this12.paymode.checkList : mode.djqs, function (djq) {
1467
+ _this12.dto.RetailCouponDetails.push({
1277
1468
  CouponCode: djq.promoCouponCode,
1278
1469
  ReductionAmount: djq.amount,
1279
1470
  EnableAmount: djq.doorsill,
@@ -1283,53 +1474,28 @@ var SettlementStore = (_class = function () {
1283
1474
  PromotionId: djq.promoId,
1284
1475
  PromotionRuleId: djq.promoRuleId,
1285
1476
  PromoCouponAllocatedId: djq.id,
1286
- DataSource: { Id: _this11.dataSource }
1477
+ DataSource: { Id: _this12.dataSource }
1287
1478
  });
1288
1479
  });
1289
1480
  }
1290
1481
  }
1291
1482
  });
1292
-
1293
- var _ref12 = _mutantsUtil.platform || {},
1294
- isNewRetailBCPos = _ref12.isNewRetailBCPos;
1295
-
1296
- if (_this11.dto.RetailStorageDetails.length > 0) {
1297
- var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
1298
- if (isNewRetailBCPos) {
1299
- _this11.dto.RetailPaymentDetails.push({
1300
- Code: _this11.paymode.counter,
1301
- OrigAmount: czkSum,
1302
- Amount: czkSum,
1303
- IdsettleStyle: themode.idSettleStyle,
1304
- IdbankAccount: themode.idBankAccount,
1305
- DynamicPropertyKeys: [],
1306
- DynamicPropertyValues: [],
1307
- DataSource: { Id: _this11.dataSource },
1308
- RetailStorageDetails: _this11.dto.RetailStorageDetails
1309
- });
1310
- } else {
1311
- _this11.dto.RetailPaymentDetails.push({
1312
- Code: _this11.paymode.counter,
1313
- OrigAmount: czkSum,
1314
- Amount: czkSum,
1315
- IdsettleStyle: themode.idSettleStyle,
1316
- IdbankAccount: themode.idBankAccount,
1317
- DynamicPropertyKeys: [],
1318
- DynamicPropertyValues: [],
1319
- DataSource: { Id: _this11.dataSource }
1320
- });
1321
- }
1483
+ if (_this12.dto.RetailStorageDetails.length > 0) {
1484
+ var themode = (0, _find3.default)(_this12.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
1485
+ _this12.dto.RetailPaymentDetails.push({
1486
+ Code: _this12.paymode.counter,
1487
+ OrigAmount: czkSum,
1488
+ Amount: czkSum,
1489
+ IdsettleStyle: themode.idSettleStyle,
1490
+ IdbankAccount: themode.idBankAccount,
1491
+ DynamicPropertyKeys: [],
1492
+ DynamicPropertyValues: [],
1493
+ DataSource: { Id: _this12.dataSource },
1494
+ RetailStorageDetails: _this12.dto.RetailStorageDetails
1495
+ });
1322
1496
  }
1323
1497
  });
1324
- _ref13 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref13.isNewRetailBCPos;
1325
-
1326
- console.log('bc_pos\u73AF\u5883:' + isNewRetailBCPos + ',\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
1327
-
1328
- if (!isNewRetailBCPos) {
1329
- _context4.next = 20;
1330
- break;
1331
- }
1332
-
1498
+ console.log('\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
1333
1499
  // cc结算调用
1334
1500
  IPMSG = {};
1335
1501
 
@@ -1337,65 +1503,271 @@ var SettlementStore = (_class = function () {
1337
1503
  IPMSG = JSON.parse(window.localStorage.IPMSG);
1338
1504
  }
1339
1505
  RetailTypeEnum = this.dto.IdbusiType == 36 ? "INTEGRAL_EXCHANGE" : "NORMAL";
1340
- _context4.t1 = this.dto.IdbusiType == 37;
1506
+ _context6.t1 = this.dto.IdbusiType == 37;
1341
1507
 
1342
- if (!_context4.t1) {
1343
- _context4.next = 13;
1508
+ if (!_context6.t1) {
1509
+ _context6.next = 11;
1344
1510
  break;
1345
1511
  }
1346
1512
 
1347
- _context4.next = 12;
1513
+ _context6.next = 10;
1348
1514
  return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
1349
1515
 
1350
- case 12:
1351
- _context4.t1 = _context4.sent;
1516
+ case 10:
1517
+ _context6.t1 = _context6.sent;
1352
1518
 
1353
- case 13:
1354
- _context4.t0 = _context4.t1;
1519
+ case 11:
1520
+ _context6.t0 = _context6.t1;
1355
1521
 
1356
- if (_context4.t0) {
1357
- _context4.next = 16;
1522
+ if (_context6.t0) {
1523
+ _context6.next = 14;
1358
1524
  break;
1359
1525
  }
1360
1526
 
1361
- _context4.t0 = this.dto.IdbusiType != 37;
1527
+ _context6.t0 = this.dto.IdbusiType != 37;
1362
1528
 
1363
- case 16:
1364
- if (!_context4.t0) {
1365
- _context4.next = 18;
1529
+ case 14:
1530
+ if (!_context6.t0) {
1531
+ _context6.next = 33;
1366
1532
  break;
1367
1533
  }
1368
1534
 
1369
- 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) {
1370
- _this11.setDtoID(resp.ID);
1371
- _this11.paymode.checkList = [];
1372
- _this11.billID = resp.ID;
1373
- }));
1535
+ dtoParams = (0, _extends3.default)({}, this.dto.cut(), { RetailOms: { RetailTypeEnum: RetailTypeEnum } });
1536
+ //处理存在二开支付情况
1374
1537
 
1375
- case 18:
1376
- _context4.next = 21;
1538
+ payList = dtoParams.RetailPaymentDetails.filter(function (v) {
1539
+ return v.ThirdPaymentInfo;
1540
+ });
1541
+
1542
+ if (!(payList && payList.length > 0)) {
1543
+ _context6.next = 30;
1544
+ break;
1545
+ }
1546
+
1547
+ payment = payList[0];
1548
+ tradeType = payment && payment.Amount > 0 ? TradeType.PAY : TradeType.REFUND;
1549
+ _context6.next = 22;
1550
+ return this.thirdPay(1, payment, tradeType, dtoParams);
1551
+
1552
+ case 22:
1553
+ ret = _context6.sent;
1554
+ _ref14 = ret || {}, type = _ref14.type, data = _ref14.data, msg = _ref14.msg, code = _ref14.code;
1555
+
1556
+ if (!(type === true)) {
1557
+ _context6.next = 28;
1558
+ break;
1559
+ }
1560
+
1561
+ dtoParams = data;
1562
+ _context6.next = 30;
1377
1563
  break;
1378
1564
 
1379
- case 20:
1380
- return _context4.abrupt('return', (0, _tplusApi.tApi)({ dto: this.dto.cut() }, 'chanjet.RE.newRetail.Settle', false, false, { timeout_skip: true }).then(function (resp) {
1381
- _this11.setDtoID(resp.ID);
1382
- _this11.billID = resp.ID;
1565
+ case 28:
1566
+ _message2.default.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
1567
+ return _context6.abrupt('return', false);
1568
+
1569
+ case 30:
1570
+ this.dtoParams = dtoParams;
1571
+ console.log('结算信息:', dtoParams);
1572
+ return _context6.abrupt('return', (0, _tplusApi.ccApi)({ dto: dtoParams, cip: IPMSG.query || "" }, '/retail/RetailPos/settle', false, false, { method: 'post', timeout_skip: true }).then(function (resp) {
1573
+ var _ref15 = resp || {},
1574
+ ID = _ref15.ID;
1575
+
1576
+ _this12.setDtoID(ID);
1577
+ _this12.billID = ID;
1578
+ _this12.paymode.checkList = [];
1383
1579
  }));
1384
1580
 
1385
- case 21:
1581
+ case 33:
1386
1582
  case 'end':
1387
- return _context4.stop();
1583
+ return _context6.stop();
1388
1584
  }
1389
1585
  }
1390
- }, _callee4, this);
1586
+ }, _callee6, this);
1391
1587
  }));
1392
1588
 
1393
1589
  function save() {
1394
- return _ref11.apply(this, arguments);
1590
+ return _ref13.apply(this, arguments);
1395
1591
  }
1396
1592
 
1397
1593
  return save;
1398
1594
  }()
1595
+
1596
+ //裁剪二开支付数据
1597
+
1598
+ }, {
1599
+ key: 'removeThirdPayDto',
1600
+ value: function removeThirdPayDto(dto) {
1601
+ var data = (0, _extends3.default)({}, dto);
1602
+ delete data['DynamicPropertyKeys'];
1603
+ delete data['DynamicPropertyValues'];
1604
+ return data;
1605
+ }
1606
+
1607
+ /**
1608
+ * 二开支付
1609
+ * vType:1零售单、2储值单
1610
+ * payment:结算方式
1611
+ * trade:00表示结算、02表示退款
1612
+ * dto:结算数据集合
1613
+ */
1614
+
1615
+ }, {
1616
+ key: 'thirdPay',
1617
+ value: function () {
1618
+ var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(vType, payment, trade, dto) {
1619
+ var cto, params, ret, _ref17, Code, _Message, Result, _ref18, ThirdPaymentReturnInfo;
1620
+
1621
+ return _regenerator2.default.wrap(function _callee7$(_context7) {
1622
+ while (1) {
1623
+ switch (_context7.prev = _context7.next) {
1624
+ case 0:
1625
+ _context7.prev = 0;
1626
+ cto = this.removeThirdPayDto(dto);
1627
+ params = { VoucherType: vType, Payment: payment, TradeType: trade, dto: cto };
1628
+
1629
+ console.log('刷卡信息:', (0, _stringify2.default)(params));
1630
+ _context7.next = 6;
1631
+ return new _promise2.default(function (resolve, reject) {
1632
+ _mutantsMicrofx.nativeMs.setIpcRendererMethod('ThirdPayment', (0, _extends3.default)({}, params), function (res) {
1633
+ return resolve(res);
1634
+ });
1635
+ });
1636
+
1637
+ case 6:
1638
+ ret = _context7.sent;
1639
+
1640
+ console.log('刷卡返回信息:', ret);
1641
+ ret = JSON.parse(ret);
1642
+ _ref17 = ret || {}, Code = _ref17.Code, _Message = _ref17.Message, Result = _ref17.Result;
1643
+
1644
+ if (!(Code > 0)) {
1645
+ _context7.next = 14;
1646
+ break;
1647
+ }
1648
+
1649
+ return _context7.abrupt('return', { type: false, data: null, msg: _Message, code: Code });
1650
+
1651
+ case 14:
1652
+ if (!(trade == '00')) {
1653
+ _context7.next = 20;
1654
+ break;
1655
+ }
1656
+
1657
+ _ref18 = Result || {}, ThirdPaymentReturnInfo = _ref18.ThirdPaymentReturnInfo;
1658
+
1659
+ if (vType == 1) {
1660
+ dto.RetailPaymentDetails.forEach(function (v) {
1661
+ if (v.ThirdPaymentInfo != null && Math.abs(v.Amount) > 0) {
1662
+ v.ThirdPaymentReturnInfo = ThirdPaymentReturnInfo;
1663
+ }
1664
+ });
1665
+ } else if (vType == 2) {
1666
+ dto.StorageMutiSettleDetails.forEach(function (v) {
1667
+ if (v.ThirdPaymentInfo != null && Math.abs(v.StorageAmount) > 0) {
1668
+ v.ThirdPaymentReturnInfo = ThirdPaymentReturnInfo;
1669
+ }
1670
+ });
1671
+ }
1672
+ return _context7.abrupt('return', { type: true, data: dto, msg: _Message, code: Code });
1673
+
1674
+ case 20:
1675
+ if (!(trade == '02')) {
1676
+ _context7.next = 22;
1677
+ break;
1678
+ }
1679
+
1680
+ return _context7.abrupt('return', { type: true, data: dto, msg: _Message, code: Code });
1681
+
1682
+ case 22:
1683
+ _context7.next = 27;
1684
+ break;
1685
+
1686
+ case 24:
1687
+ _context7.prev = 24;
1688
+ _context7.t0 = _context7['catch'](0);
1689
+ return _context7.abrupt('return', { type: false, data: null, msg: _context7.t0, code: '9999' });
1690
+
1691
+ case 27:
1692
+ case 'end':
1693
+ return _context7.stop();
1694
+ }
1695
+ }
1696
+ }, _callee7, this, [[0, 24]]);
1697
+ }));
1698
+
1699
+ function thirdPay(_x4, _x5, _x6, _x7) {
1700
+ return _ref16.apply(this, arguments);
1701
+ }
1702
+
1703
+ return thirdPay;
1704
+ }()
1705
+
1706
+ //二开支付强制退款情况
1707
+
1708
+ }, {
1709
+ key: 'thirdPayRefund',
1710
+ value: function () {
1711
+ var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(type) {
1712
+ var _this13 = this;
1713
+
1714
+ var dto, pay, payment, _enumController$getEn17, TradeType;
1715
+
1716
+ return _regenerator2.default.wrap(function _callee9$(_context9) {
1717
+ while (1) {
1718
+ switch (_context9.prev = _context9.next) {
1719
+ case 0:
1720
+ dto = type == 1 ? this.dtoParams.RetailPaymentDetails : this.dtoParams.StorageMutiSettleDetails;
1721
+ pay = dto && dto.filter(function (v) {
1722
+ return v.ThirdPaymentInfo;
1723
+ });
1724
+
1725
+ if (pay && pay.length > 0) {
1726
+ setTimeout(function () {
1727
+ _message2.default.warn("支付出现异常,将发起刷卡退款。", { duration: 4.5 });
1728
+ }, 1000);
1729
+ payment = pay[0];
1730
+ _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(), TradeType = _enumController$getEn17.TradeType;
1731
+
1732
+ setTimeout((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
1733
+ var ret, _ref21, msg;
1734
+
1735
+ return _regenerator2.default.wrap(function _callee8$(_context8) {
1736
+ while (1) {
1737
+ switch (_context8.prev = _context8.next) {
1738
+ case 0:
1739
+ _context8.next = 2;
1740
+ return _this13.thirdPay(type, payment, TradeType.REFUND, dto);
1741
+
1742
+ case 2:
1743
+ ret = _context8.sent;
1744
+ _ref21 = ret || {}, msg = _ref21.msg;
1745
+
1746
+ console.log('\u5237\u5361\u652F\u4ED8\u9000\u6B3E:' + msg);
1747
+
1748
+ case 5:
1749
+ case 'end':
1750
+ return _context8.stop();
1751
+ }
1752
+ }
1753
+ }, _callee8, _this13);
1754
+ })), 4500);
1755
+ }
1756
+
1757
+ case 3:
1758
+ case 'end':
1759
+ return _context9.stop();
1760
+ }
1761
+ }
1762
+ }, _callee9, this);
1763
+ }));
1764
+
1765
+ function thirdPayRefund(_x8) {
1766
+ return _ref19.apply(this, arguments);
1767
+ }
1768
+
1769
+ return thirdPayRefund;
1770
+ }()
1399
1771
  }, {
1400
1772
  key: 'setDtoID',
1401
1773
  value: function setDtoID(id) {
@@ -1404,35 +1776,35 @@ var SettlementStore = (_class = function () {
1404
1776
  }, {
1405
1777
  key: 'querySettleResult',
1406
1778
  value: function () {
1407
- var _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
1408
- return _regenerator2.default.wrap(function _callee5$(_context5) {
1779
+ var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10() {
1780
+ return _regenerator2.default.wrap(function _callee10$(_context10) {
1409
1781
  while (1) {
1410
- switch (_context5.prev = _context5.next) {
1782
+ switch (_context10.prev = _context10.next) {
1411
1783
  case 0:
1412
- _context5.prev = 0;
1413
- _context5.t0 = _promise2.default;
1414
- _context5.next = 4;
1784
+ _context10.prev = 0;
1785
+ _context10.t0 = _promise2.default;
1786
+ _context10.next = 4;
1415
1787
  return (0, _tplusApi.tApi)({ RetailCode: this.dto.Code }, 'chanjet.RE.newRetail.QuerySettleResult', false, false, { timeout_skip: true });
1416
1788
 
1417
1789
  case 4:
1418
- _context5.t1 = _context5.sent;
1419
- return _context5.abrupt('return', _context5.t0.resolve.call(_context5.t0, _context5.t1));
1790
+ _context10.t1 = _context10.sent;
1791
+ return _context10.abrupt('return', _context10.t0.resolve.call(_context10.t0, _context10.t1));
1420
1792
 
1421
1793
  case 8:
1422
- _context5.prev = 8;
1423
- _context5.t2 = _context5['catch'](0);
1424
- return _context5.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
1794
+ _context10.prev = 8;
1795
+ _context10.t2 = _context10['catch'](0);
1796
+ return _context10.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
1425
1797
 
1426
1798
  case 11:
1427
1799
  case 'end':
1428
- return _context5.stop();
1800
+ return _context10.stop();
1429
1801
  }
1430
1802
  }
1431
- }, _callee5, this, [[0, 8]]);
1803
+ }, _callee10, this, [[0, 8]]);
1432
1804
  }));
1433
1805
 
1434
1806
  function querySettleResult() {
1435
- return _ref14.apply(this, arguments);
1807
+ return _ref22.apply(this, arguments);
1436
1808
  }
1437
1809
 
1438
1810
  return querySettleResult;
@@ -1458,18 +1830,18 @@ var SettlementStore = (_class = function () {
1458
1830
  }, {
1459
1831
  key: 'validePwd',
1460
1832
  value: function () {
1461
- var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(value) {
1462
- var _ref16, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, cardStatusEnum, result, count, _result;
1833
+ var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(value) {
1834
+ var _ref24, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, cardStatusEnum, result, count, _result;
1463
1835
 
1464
- return _regenerator2.default.wrap(function _callee6$(_context6) {
1836
+ return _regenerator2.default.wrap(function _callee11$(_context11) {
1465
1837
  while (1) {
1466
- switch (_context6.prev = _context6.next) {
1838
+ switch (_context11.prev = _context11.next) {
1467
1839
  case 0:
1468
- _ref16 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref16.isNewRetailBCPos;
1469
- _context6.prev = 1;
1840
+ _ref24 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref24.isNewRetailBCPos;
1841
+ _context11.prev = 1;
1470
1842
 
1471
1843
  if (!isNewRetailBCPos) {
1472
- _context6.next = 33;
1844
+ _context11.next = 33;
1473
1845
  break;
1474
1846
  }
1475
1847
 
@@ -1479,60 +1851,60 @@ var SettlementStore = (_class = function () {
1479
1851
  memberStorageId = this.paymode.currentMode.meStorageCardId;
1480
1852
 
1481
1853
  if (!cook2) {
1482
- _context6.next = 12;
1854
+ _context11.next = 12;
1483
1855
  break;
1484
1856
  }
1485
1857
 
1486
1858
  if (!cook2.hasOwnProperty(memberStorageId + "")) {
1487
- _context6.next = 12;
1859
+ _context11.next = 12;
1488
1860
  break;
1489
1861
  }
1490
1862
 
1491
1863
  if (!(cook2[memberStorageId] > 3)) {
1492
- _context6.next = 12;
1864
+ _context11.next = 12;
1493
1865
  break;
1494
1866
  }
1495
1867
 
1496
1868
  message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
1497
- return _context6.abrupt('return', _promise2.default.resolve(message));
1869
+ return _context11.abrupt('return', _promise2.default.resolve(message));
1498
1870
 
1499
1871
  case 12:
1500
1872
  _paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId, cardStatusEnum = _paymode$currentMode.cardStatusEnum;
1501
1873
  result = null;
1502
1874
 
1503
1875
  if (!(cardTypeEnum === 'BALANCE_CARD')) {
1504
- _context6.next = 20;
1876
+ _context11.next = 20;
1505
1877
  break;
1506
1878
  }
1507
1879
 
1508
- _context6.next = 17;
1880
+ _context11.next = 17;
1509
1881
  return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
1510
1882
 
1511
1883
  case 17:
1512
- result = _context6.sent;
1513
- _context6.next = 29;
1884
+ result = _context11.sent;
1885
+ _context11.next = 29;
1514
1886
  break;
1515
1887
 
1516
1888
  case 20:
1517
1889
  if (!(cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId)) {
1518
- _context6.next = 26;
1890
+ _context11.next = 26;
1519
1891
  break;
1520
1892
  }
1521
1893
 
1522
- _context6.next = 23;
1894
+ _context11.next = 23;
1523
1895
  return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
1524
1896
 
1525
1897
  case 23:
1526
- result = _context6.sent;
1527
- _context6.next = 29;
1898
+ result = _context11.sent;
1899
+ _context11.next = 29;
1528
1900
  break;
1529
1901
 
1530
1902
  case 26:
1531
- _context6.next = 28;
1903
+ _context11.next = 28;
1532
1904
  return (0, _tplusApi.ccApi)({ password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
1533
1905
 
1534
1906
  case 28:
1535
- result = _context6.sent;
1907
+ result = _context11.sent;
1536
1908
 
1537
1909
  case 29:
1538
1910
  if (!result.data) {
@@ -1551,38 +1923,38 @@ var SettlementStore = (_class = function () {
1551
1923
  this.setCookie('errorPwd', '', -1);
1552
1924
  this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
1553
1925
  }
1554
- return _context6.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
1926
+ return _context11.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
1555
1927
 
1556
1928
  case 33:
1557
- _context6.next = 35;
1929
+ _context11.next = 35;
1558
1930
  return (0, _tplusApi.tApi)({ "CheckoutParams": {
1559
1931
  "Idmember": value.id,
1560
1932
  "Password": value.pwd
1561
1933
  } }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
1562
1934
 
1563
1935
  case 35:
1564
- _result = _context6.sent;
1565
- return _context6.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
1936
+ _result = _context11.sent;
1937
+ return _context11.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
1566
1938
 
1567
1939
  case 37:
1568
- _context6.next = 42;
1940
+ _context11.next = 42;
1569
1941
  break;
1570
1942
 
1571
1943
  case 39:
1572
- _context6.prev = 39;
1573
- _context6.t0 = _context6['catch'](1);
1574
- return _context6.abrupt('return', "failed");
1944
+ _context11.prev = 39;
1945
+ _context11.t0 = _context11['catch'](1);
1946
+ return _context11.abrupt('return', "failed");
1575
1947
 
1576
1948
  case 42:
1577
1949
  case 'end':
1578
- return _context6.stop();
1950
+ return _context11.stop();
1579
1951
  }
1580
1952
  }
1581
- }, _callee6, this, [[1, 39]]);
1953
+ }, _callee11, this, [[1, 39]]);
1582
1954
  }));
1583
1955
 
1584
- function validePwd(_x4) {
1585
- return _ref15.apply(this, arguments);
1956
+ function validePwd(_x9) {
1957
+ return _ref23.apply(this, arguments);
1586
1958
  }
1587
1959
 
1588
1960
  return validePwd;
@@ -1592,7 +1964,7 @@ var SettlementStore = (_class = function () {
1592
1964
  }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'queryPwd', [_mobx.action], {
1593
1965
  enumerable: true,
1594
1966
  initializer: function initializer() {
1595
- var _this12 = this;
1967
+ var _this14 = this;
1596
1968
 
1597
1969
  return function (newPass, newPassConfirm) {
1598
1970
  if (!newPass || !newPassConfirm) {
@@ -1604,7 +1976,7 @@ var SettlementStore = (_class = function () {
1604
1976
  var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
1605
1977
  return (0, _tplusApi.ccApi)({
1606
1978
  Idstore: idstore,
1607
- meMemberId: _this12.paymode.currentMode.memberId,
1979
+ meMemberId: _this14.paymode.currentMode.memberId,
1608
1980
  oldPassword: null,
1609
1981
  newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
1610
1982
  dataSource: "POS"
@@ -1618,131 +1990,131 @@ var SettlementStore = (_class = function () {
1618
1990
  }), _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], {
1619
1991
  enumerable: true,
1620
1992
  initializer: function initializer() {
1621
- var _this13 = this;
1993
+ var _this15 = this;
1622
1994
 
1623
1995
  return function () {
1624
- var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(_this) {
1996
+ var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(_this) {
1625
1997
  var _getLoginInfo, IdStore, StoreCode, resp;
1626
1998
 
1627
- return _regenerator2.default.wrap(function _callee7$(_context7) {
1999
+ return _regenerator2.default.wrap(function _callee12$(_context12) {
1628
2000
  while (1) {
1629
- switch (_context7.prev = _context7.next) {
2001
+ switch (_context12.prev = _context12.next) {
1630
2002
  case 0:
1631
- _getLoginInfo = _this13.getLoginInfo(), IdStore = _getLoginInfo.IdStore, StoreCode = _getLoginInfo.StoreCode;
1632
- _context7.next = 3;
1633
- return (0, _tplusApi.tApi)({ Idmember: _this13.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
2003
+ _getLoginInfo = _this15.getLoginInfo(), IdStore = _getLoginInfo.IdStore, StoreCode = _getLoginInfo.StoreCode;
2004
+ _context12.next = 3;
2005
+ return (0, _tplusApi.tApi)({ Idmember: _this15.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
1634
2006
 
1635
2007
  case 3:
1636
- resp = _context7.sent;
2008
+ resp = _context12.sent;
1637
2009
 
1638
2010
  _this.member = resp;
1639
2011
  _this.paymode.updateMemberStorageCardNo(resp.StorageCardNo, resp.WalletEnabled);
1640
- return _context7.abrupt('return', _promise2.default.resolve(resp));
2012
+ return _context12.abrupt('return', _promise2.default.resolve(resp));
1641
2013
 
1642
2014
  case 7:
1643
2015
  case 'end':
1644
- return _context7.stop();
2016
+ return _context12.stop();
1645
2017
  }
1646
2018
  }
1647
- }, _callee7, _this13);
2019
+ }, _callee12, _this15);
1648
2020
  }));
1649
2021
 
1650
- return function (_x5) {
1651
- return _ref17.apply(this, arguments);
2022
+ return function (_x10) {
2023
+ return _ref25.apply(this, arguments);
1652
2024
  };
1653
2025
  }();
1654
2026
  }
1655
2027
  }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'updateCurrentMode', [_mobx.action], {
1656
2028
  enumerable: true,
1657
2029
  initializer: function initializer() {
1658
- var _this14 = this;
2030
+ var _this16 = this;
1659
2031
 
1660
2032
  return function () {
1661
- var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(memberId) {
2033
+ var _ref26 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(memberId) {
1662
2034
  var result;
1663
- return _regenerator2.default.wrap(function _callee8$(_context8) {
2035
+ return _regenerator2.default.wrap(function _callee13$(_context13) {
1664
2036
  while (1) {
1665
- switch (_context8.prev = _context8.next) {
2037
+ switch (_context13.prev = _context13.next) {
1666
2038
  case 0:
1667
- _context8.next = 2;
2039
+ _context13.next = 2;
1668
2040
  return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId + '/' + true, false, false, { method: 'get' });
1669
2041
 
1670
2042
  case 2:
1671
- result = _context8.sent;
2043
+ result = _context13.sent;
1672
2044
 
1673
2045
  if (!(result && result.data.length)) {
1674
- _context8.next = 20;
2046
+ _context13.next = 20;
1675
2047
  break;
1676
2048
  }
1677
2049
 
1678
2050
  if (!(result.data.length === 1)) {
1679
- _context8.next = 9;
2051
+ _context13.next = 9;
1680
2052
  break;
1681
2053
  }
1682
2054
 
1683
- _this14.paymode.updateCardInfo(result.data[0]);
1684
- return _context8.abrupt('return', result.data);
2055
+ _this16.paymode.updateCardInfo(result.data[0]);
2056
+ return _context13.abrupt('return', result.data);
1685
2057
 
1686
2058
  case 9:
1687
2059
  if (!(result.data && result.data.length === 1)) {
1688
- _context8.next = 14;
2060
+ _context13.next = 14;
1689
2061
  break;
1690
2062
  }
1691
2063
 
1692
- _this14.paymode.updateCardInfo(result.data[0]);
1693
- return _context8.abrupt('return', result.data);
2064
+ _this16.paymode.updateCardInfo(result.data[0]);
2065
+ return _context13.abrupt('return', result.data);
1694
2066
 
1695
2067
  case 14:
1696
2068
  if (!(result.data && result.data.length > 1)) {
1697
- _context8.next = 18;
2069
+ _context13.next = 18;
1698
2070
  break;
1699
2071
  }
1700
2072
 
1701
- return _context8.abrupt('return', result.data);
2073
+ return _context13.abrupt('return', result.data);
1702
2074
 
1703
2075
  case 18:
1704
2076
  _message2.default.warn('没有可用储值卡!');
1705
- return _context8.abrupt('return', false);
2077
+ return _context13.abrupt('return', false);
1706
2078
 
1707
2079
  case 20:
1708
2080
  case 'end':
1709
- return _context8.stop();
2081
+ return _context13.stop();
1710
2082
  }
1711
2083
  }
1712
- }, _callee8, _this14);
2084
+ }, _callee13, _this16);
1713
2085
  }));
1714
2086
 
1715
- return function (_x6) {
1716
- return _ref18.apply(this, arguments);
2087
+ return function (_x11) {
2088
+ return _ref26.apply(this, arguments);
1717
2089
  };
1718
2090
  }();
1719
2091
  }
1720
2092
  }), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'updateCardInfo', [_mobx.action], {
1721
2093
  enumerable: true,
1722
2094
  initializer: function initializer() {
1723
- var _this15 = this;
2095
+ var _this17 = this;
1724
2096
 
1725
- return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9() {
2097
+ return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
1726
2098
  var address, result;
1727
- return _regenerator2.default.wrap(function _callee9$(_context9) {
2099
+ return _regenerator2.default.wrap(function _callee14$(_context14) {
1728
2100
  while (1) {
1729
- switch (_context9.prev = _context9.next) {
2101
+ switch (_context14.prev = _context14.next) {
1730
2102
  case 0:
1731
- address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + _this15.paymode.currentMode.storageCardNo;
1732
- _context9.next = 3;
2103
+ address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + _this17.paymode.currentMode.storageCardNo;
2104
+ _context14.next = 3;
1733
2105
  return (0, _tplusApi.ccApi)({}, address, false, false, { method: 'get', timeout_skip: true });
1734
2106
 
1735
2107
  case 3:
1736
- result = _context9.sent;
2108
+ result = _context14.sent;
1737
2109
 
1738
- _this15.paymode.updateCardInfo(result.data);
2110
+ _this17.paymode.updateCardInfo(result.data);
1739
2111
 
1740
2112
  case 5:
1741
2113
  case 'end':
1742
- return _context9.stop();
2114
+ return _context14.stop();
1743
2115
  }
1744
2116
  }
1745
- }, _callee9, _this15);
2117
+ }, _callee14, _this17);
1746
2118
  }));
1747
2119
  }
1748
2120
  }), _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);
@@ -1843,7 +2215,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1843
2215
  }, {
1844
2216
  key: 'calcDjqCheckValue',
1845
2217
  value: function calcDjqCheckValue(q1, dto, params) {
1846
- var _this16 = this;
2218
+ var _this18 = this;
1847
2219
 
1848
2220
  var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
1849
2221
  var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
@@ -1857,12 +2229,12 @@ var PayMode = exports.PayMode = (_class3 = function () {
1857
2229
  this.checkList = [];
1858
2230
  }
1859
2231
 
1860
- var _ref20 = _mutantsUtil.platform || {},
1861
- isNewRetailBCPos = _ref20.isNewRetailBCPos;
2232
+ var _ref28 = _mutantsUtil.platform || {},
2233
+ isNewRetailBCPos = _ref28.isNewRetailBCPos;
1862
2234
 
1863
- var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
1864
- PayStyle = _enumController$getEn16.PayStyle,
1865
- Differentiate = _enumController$getEn16.Differentiate;
2235
+ var _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(),
2236
+ PayStyle = _enumController$getEn18.PayStyle,
2237
+ Differentiate = _enumController$getEn18.Differentiate;
1866
2238
 
1867
2239
  if (q1) {
1868
2240
  if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
@@ -1890,7 +2262,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1890
2262
  if (!q1.checked) {
1891
2263
  this.checkList.forEach(function (ele, i) {
1892
2264
  if (ele.id === q1.id) {
1893
- _this16.checkList.splice(i, 1);
2265
+ _this18.checkList.splice(i, 1);
1894
2266
  }
1895
2267
  });
1896
2268
  } else {
@@ -1962,24 +2334,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
1962
2334
  if (result && result.length != 0) {
1963
2335
  result.forEach(function (element, index) {
1964
2336
  var djq1 = false;
1965
- _this16.currentMode.djqs.forEach(function (djq) {
2337
+ _this18.currentMode.djqs.forEach(function (djq) {
1966
2338
  if (element.id === djq.id) {
1967
2339
  djq1 = true;
1968
2340
  }
1969
2341
  });
1970
2342
 
1971
- var _ref21 = element || {},
1972
- couponCode = _ref21.couponCode,
1973
- name = _ref21.name,
1974
- tieredAmountResult = _ref21.tieredAmountResult,
1975
- fromDate = _ref21.fromDate,
1976
- dateMount = _ref21.dateMount,
1977
- promoMethodEnum = _ref21.promoMethodEnum,
1978
- discountPct = _ref21.discountPct,
1979
- nominalAmount = _ref21.nominalAmount,
1980
- promoId = _ref21.promoId,
1981
- id = _ref21.id,
1982
- doorsill = _ref21.doorsill;
2343
+ var _ref29 = element || {},
2344
+ couponCode = _ref29.couponCode,
2345
+ name = _ref29.name,
2346
+ tieredAmountResult = _ref29.tieredAmountResult,
2347
+ fromDate = _ref29.fromDate,
2348
+ dateMount = _ref29.dateMount,
2349
+ promoMethodEnum = _ref29.promoMethodEnum,
2350
+ discountPct = _ref29.discountPct,
2351
+ nominalAmount = _ref29.nominalAmount,
2352
+ promoId = _ref29.promoId,
2353
+ id = _ref29.id,
2354
+ doorsill = _ref29.doorsill;
1983
2355
 
1984
2356
  var condValue = tieredAmountResult.condValue,
1985
2357
  promoDiscount = tieredAmountResult.promoDiscount,
@@ -2007,10 +2379,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
2007
2379
  // couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
2008
2380
  // id
2009
2381
  // })
2010
- _this16.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
2382
+ _this18.addDjqs(couponCode, name, true, nominalAmount, promoDiscount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
2011
2383
  djq1 = false;
2012
2384
  } else {
2013
- _this16.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
2385
+ _this18.setCouponNum(element.id, couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
2014
2386
  // this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
2015
2387
  // djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
2016
2388
  }
@@ -2023,11 +2395,11 @@ var PayMode = exports.PayMode = (_class3 = function () {
2023
2395
  }, {
2024
2396
  key: 'calcDjqValue',
2025
2397
  value: function calcDjqValue(q1) {
2026
- var _ref22 = _mutantsUtil.platform || {},
2027
- isNewRetailBCPos = _ref22.isNewRetailBCPos;
2398
+ var _ref30 = _mutantsUtil.platform || {},
2399
+ isNewRetailBCPos = _ref30.isNewRetailBCPos;
2028
2400
 
2029
- var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
2030
- Differentiate = _enumController$getEn17.Differentiate;
2401
+ var _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(),
2402
+ Differentiate = _enumController$getEn19.Differentiate;
2031
2403
 
2032
2404
  if (q1) {
2033
2405
  if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
@@ -2089,8 +2461,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
2089
2461
  this.currentMode.errinfo = '';
2090
2462
  var sum = this.amount;
2091
2463
 
2092
- var _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(),
2093
- PayStyle = _enumController$getEn18.PayStyle;
2464
+ var _enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(),
2465
+ PayStyle = _enumController$getEn20.PayStyle;
2094
2466
 
2095
2467
  this.thePaymodes && this.thePaymodes.forEach(function (mode) {
2096
2468
  if (mode.paymentType === PayStyle.hyczk) {
@@ -2127,30 +2499,36 @@ var PayMode = exports.PayMode = (_class3 = function () {
2127
2499
  }, {
2128
2500
  key: 'setPaymodes',
2129
2501
  value: function () {
2130
- var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(type, isIntegralExchange) {
2131
- var _this17 = this;
2502
+ var _ref31 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(type, isIntegralExchange) {
2503
+ var _this19 = this;
2132
2504
 
2133
- var _enumController$getEn19, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
2505
+ var _ref32, isHorizontalPad, isHorizontalSunMi, isMobileEnvironment, _enumController$getEn21, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
2134
2506
 
2135
- return _regenerator2.default.wrap(function _callee10$(_context10) {
2507
+ return _regenerator2.default.wrap(function _callee15$(_context15) {
2136
2508
  while (1) {
2137
- switch (_context10.prev = _context10.next) {
2509
+ switch (_context15.prev = _context15.next) {
2138
2510
  case 0:
2139
- _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn19.settleStyleType, PayStyle = _enumController$getEn19.PayStyle;
2511
+ // 是否移动端判断
2512
+ _ref32 = _mutantsUtil.platform || {}, isHorizontalPad = _ref32.isHorizontalPad, isHorizontalSunMi = _ref32.isHorizontalSunMi;
2513
+ isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;
2514
+ _enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn21.settleStyleType, PayStyle = _enumController$getEn21.PayStyle;
2140
2515
  memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
2141
2516
  param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
2142
- _context10.next = 5;
2517
+ _context15.next = 7;
2143
2518
  return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
2144
2519
 
2145
- case 5:
2146
- modes = _context10.sent;
2520
+ case 7:
2521
+ modes = _context15.sent;
2147
2522
 
2148
2523
  if (modes) {
2149
2524
  (0, _mobx.runInAction)(function () {
2150
2525
  var paymodes = [];
2151
- (0, _each3.default)(modes.SettleStyles, function (mode, index) {
2526
+ var settleLists = modes.SettleStyles;
2527
+ settleLists = isMobileEnvironment ? settleLists.filter(function (v) {
2528
+ return !v.ThirdPaymentInfo;
2529
+ }) : settleLists;
2530
+ (0, _each3.default)(settleLists, function (mode, index) {
2152
2531
  //产品需求确认会员储值卡结算方式前端展示统一调整为“储值卡" tuzha by 2020-07-08
2153
-
2154
2532
  if (mode.Code == PayStyle.hyczk) {
2155
2533
  mode.Name = '储值卡';
2156
2534
  }
@@ -2165,24 +2543,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
2165
2543
  idBankAccount: mode.IdBankAccount,
2166
2544
  exchangeRate: mode.Currency ? mode.Currency.ExchangeRate : 1,
2167
2545
  idCurrency: mode.Currency ? mode.Currency.ID : -1,
2168
- calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88"
2546
+ calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88",
2547
+ thridPayment: mode.ThirdPaymentInfo
2169
2548
  });
2170
2549
  });
2171
- _this17.paymodes = paymodes;
2172
- //modes.QuickSettleStyles
2550
+ _this19.paymodes = paymodes;
2173
2551
  });
2174
2552
  }
2175
2553
 
2176
- case 7:
2554
+ case 9:
2177
2555
  case 'end':
2178
- return _context10.stop();
2556
+ return _context15.stop();
2179
2557
  }
2180
2558
  }
2181
- }, _callee10, this);
2559
+ }, _callee15, this);
2182
2560
  }));
2183
2561
 
2184
- function setPaymodes(_x7, _x8) {
2185
- return _ref23.apply(this, arguments);
2562
+ function setPaymodes(_x12, _x13) {
2563
+ return _ref31.apply(this, arguments);
2186
2564
  }
2187
2565
 
2188
2566
  return setPaymodes;
@@ -2237,21 +2615,22 @@ var PayMode = exports.PayMode = (_class3 = function () {
2237
2615
  }), _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], {
2238
2616
  enumerable: true,
2239
2617
  initializer: function initializer() {
2240
- var _this18 = this;
2618
+ var _this20 = this;
2241
2619
 
2242
2620
  return function () {
2243
- _this18.checkList = [];
2621
+ _this20.checkList = [];
2244
2622
  };
2245
2623
  }
2246
2624
  }), _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], {
2247
2625
  enumerable: true,
2248
2626
  initializer: function initializer() {
2249
- var _this19 = this;
2627
+ var _this21 = this;
2250
2628
 
2251
2629
  return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
2252
- _this19.currentMode.djqs.forEach(function (ele) {
2630
+ _this21.currentMode.djqs.forEach(function (ele) {
2253
2631
  if (ele.id === id) {
2254
- promoMethodEnum == "CASH_COUPON" ? ele.amount = nominalAmount : ele.amount = promoDiscount;
2632
+ ele.amount = promoDiscount;
2633
+ promoMethodEnum == "CASH_COUPON" && (ele.nominalAmount = nominalAmount);
2255
2634
  ele.couponCategoryEnum = couponNum;
2256
2635
  var IsEnable = ele.couponCategoryEnum === 'RIGUP' || ele.couponCategoryEnum === 'UN_MATCH' || ele.couponCategoryEnum === "PREPARING" || ele.couponCategoryEnum === 'PROMO_LIMITED' || ele.couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
2257
2636
  ele.IsEnable = IsEnable;
@@ -2262,13 +2641,14 @@ var PayMode = exports.PayMode = (_class3 = function () {
2262
2641
  }), _descriptor14 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
2263
2642
  enumerable: true,
2264
2643
  initializer: function initializer() {
2265
- var _this20 = this;
2644
+ var _this22 = this;
2266
2645
 
2267
- return function (promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
2646
+ return function (promoCouponCode, name, IsEnable, nominalAmount, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
2268
2647
  var djq = {
2269
2648
  promoCouponCode: promoCouponCode,
2270
2649
  name: name,
2271
2650
  IsEnable: IsEnable,
2651
+ nominalAmount: nominalAmount,
2272
2652
  amount: amount,
2273
2653
  doorsill: doorsill,
2274
2654
  LastTS: LastTS,
@@ -2284,13 +2664,13 @@ var PayMode = exports.PayMode = (_class3 = function () {
2284
2664
  couponCategoryEnum: couponCategoryEnum,
2285
2665
  id: id
2286
2666
  };
2287
- _this20.currentMode.djqs.push(djq);
2667
+ _this22.currentMode.djqs.push(djq);
2288
2668
  };
2289
2669
  }
2290
2670
  }), _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);
2291
2671
  var Member = exports.Member = (_class5 = function () {
2292
2672
  function Member(m) {
2293
- var _this21 = this;
2673
+ var _this23 = this;
2294
2674
 
2295
2675
  (0, _classCallCheck3.default)(this, Member);
2296
2676
 
@@ -2313,15 +2693,15 @@ var Member = exports.Member = (_class5 = function () {
2313
2693
  return key == 'canusedbalancestorage';
2314
2694
  });
2315
2695
 
2316
- var _ref24 = _mutantsUtil.platform || {},
2317
- isNewRetailBCPos = _ref24.isNewRetailBCPos;
2696
+ var _ref33 = _mutantsUtil.platform || {},
2697
+ isNewRetailBCPos = _ref33.isNewRetailBCPos;
2318
2698
 
2319
2699
  (0, _mobx.runInAction)(function () {
2320
- _this21.cardNo = m.CardCode;
2700
+ _this23.cardNo = m.CardCode;
2321
2701
  if (index >= 0) {
2322
- _this21.balance = parseFloat(m.DynamicPropertyValues[index]);
2702
+ _this23.balance = parseFloat(m.DynamicPropertyValues[index]);
2323
2703
  } else {
2324
- _this21.balance = _this21.rawbalance;
2704
+ _this23.balance = _this23.rawbalance;
2325
2705
  }
2326
2706
  });
2327
2707
  this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;