tplus-components-touch 3.36.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.
Files changed (51) hide show
  1. package/dist/components/billSearch/index.js +157 -19
  2. package/dist/components/billSearch/index.js.map +1 -1
  3. package/dist/components/billSearch/index.less +6 -3
  4. package/dist/components/cloudPrint/api.js +85 -43
  5. package/dist/components/cloudPrint/api.js.map +1 -1
  6. package/dist/components/cloudPrint/printDispatch.js +211 -108
  7. package/dist/components/cloudPrint/printDispatch.js.map +1 -1
  8. package/dist/components/deliverySearch/index.js +1 -1
  9. package/dist/components/deliverySearch/index.js.map +1 -1
  10. package/dist/components/hotKey/localConfig.js +133 -14
  11. package/dist/components/hotKey/localConfig.js.map +1 -1
  12. package/dist/components/inventorySearch/tab.js +77 -67
  13. package/dist/components/inventorySearch/tab.js.map +1 -1
  14. package/dist/components/keyboard/numberButton_input.js +4 -2
  15. package/dist/components/keyboard/numberButton_input.js.map +1 -1
  16. package/dist/components/keyboard/onlyLetterButton2.less +35 -40
  17. package/dist/components/loading/loadingContent.js +1 -1
  18. package/dist/components/loading/loadingContent.js.map +1 -1
  19. package/dist/components/loading/style.less +7 -7
  20. package/dist/components/modalWraper/index.js +1 -1
  21. package/dist/components/modalWraper/index.js.map +1 -1
  22. package/dist/components/progressState/EmptyAndErrorView.js +4 -3
  23. package/dist/components/progressState/EmptyAndErrorView.js.map +1 -1
  24. package/dist/components/progressState/ProgressState.js +2 -1
  25. package/dist/components/progressState/ProgressState.js.map +1 -1
  26. package/dist/components/settlement/index.js +9 -0
  27. package/dist/components/settlement/index.js.map +1 -1
  28. package/dist/components/settlement/moreCzkTable/index.js +156 -0
  29. package/dist/components/settlement/moreCzkTable/index.js.map +1 -0
  30. package/dist/components/settlement/moreCzkTable/style.less +7 -0
  31. package/dist/components/settlement/settlement.js +752 -505
  32. package/dist/components/settlement/settlement.js.map +1 -1
  33. package/dist/components/settlement/settlement.less +104 -14
  34. package/dist/components/settlement/settlementStore.js +1096 -464
  35. package/dist/components/settlement/settlementStore.js.map +1 -1
  36. package/dist/components/ticon/iconfont/demo_index.html +49 -3
  37. package/dist/components/ticon/iconfont/iconfont.css +11 -3
  38. package/dist/components/ticon/iconfont/iconfont.js +6 -6
  39. package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
  40. package/dist/components/ticon/iconfont/iconfont.json +14 -0
  41. package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
  42. package/dist/components/ticon/iconfont/iconfont.woff +0 -0
  43. package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
  44. package/dist/components/touchScroll/index.js +6 -2
  45. package/dist/components/touchScroll/index.js.map +1 -1
  46. package/dist/components/touchTable/index.js +5 -4
  47. package/dist/components/touchTable/index.js.map +1 -1
  48. package/dist/components/touchTable/index.less +20 -13
  49. package/dist/index.js +14 -2
  50. package/dist/index.js.map +1 -1
  51. package/package.json +35 -35
@@ -5,6 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Member = exports.PayMode = exports.default = undefined;
7
7
 
8
+ var _isInteger = require('babel-runtime/core-js/number/is-integer');
9
+
10
+ var _isInteger2 = _interopRequireDefault(_isInteger);
11
+
8
12
  var _defineProperty = require('babel-runtime/core-js/object/define-property');
9
13
 
10
14
  var _defineProperty2 = _interopRequireDefault(_defineProperty);
@@ -41,7 +45,7 @@ var _createClass2 = require('babel-runtime/helpers/createClass');
41
45
 
42
46
  var _createClass3 = _interopRequireDefault(_createClass2);
43
47
 
44
- var _desc, _value, _class, _descriptor, _descriptor2, _desc2, _value2, _class3, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _desc3, _value3, _class5, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15;
48
+ var _desc, _value, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _desc2, _value2, _class3, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _desc3, _value3, _class5, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19;
45
49
 
46
50
  var _mobx = require('mobx');
47
51
 
@@ -168,6 +172,7 @@ var SettlementStore = (_class = function () {
168
172
  (0, _classCallCheck3.default)(this, SettlementStore);
169
173
  this.paymode = null;
170
174
  this.dto = null;
175
+ this.dtoParams = null;
171
176
  this.member = null;
172
177
  this.brefund = false;
173
178
  this.bquick = false;
@@ -178,6 +183,46 @@ var SettlementStore = (_class = function () {
178
183
 
179
184
  _initDefineProp(this, 'updateMemberInfo', _descriptor2, this);
180
185
 
186
+ _initDefineProp(this, 'updateCurrentMode', _descriptor3, this);
187
+
188
+ _initDefineProp(this, 'updateCardInfo', _descriptor4, this);
189
+
190
+ this.handleCzkData = function (m) {
191
+ if (!m || !m.StorageCardNo) {
192
+ (0, _mobx.runInAction)(function () {
193
+ _this2.paymode.currentMode.errinfo = "无效的会员卡号";
194
+ });
195
+ } else {
196
+ (0, _mobx.runInAction)(function () {
197
+ _this2.paymode.currentMode.errinfo = "";
198
+ _this2.paymode.currentMode.memberId = m.ID;
199
+ _this2.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this2.brefund ? _this2.paymode.receivable : Math.max(_this2.paymode.receivable, 0));
200
+ _this2.updateEvent();
201
+ var message = '';
202
+ var sum = (0, _reduce3.default)(_this2.paymode.thePaymodes, function (total, cur) {
203
+ return total + cur.value;
204
+ }, 0);
205
+ // 对于卡不用判断会员的一些信息
206
+ // if (global.CheckMemberStorageProcessorBlock ) {
207
+ // message= CheckMemberStorageProcessorBlock.execute(m);
208
+ // }
209
+ if (!String.isNullOrEmpty(message)) {
210
+ _this2.paymode.currentMode.errinfo = message;
211
+ } else if (_this2.checkReceived(_this2.paymode.currentMode, "balance")) {
212
+ _this2.paymode.currentMode.errinfo = "余额不足";
213
+ } else if (_this2.paymode.amount > 0 && parseFloat(_this2.paymode.amount) !== sum && _this2.paymode.currentMode.value == 0) {
214
+ _this2.paymode.currentMode.errinfo = "实收金额必须录入";
215
+ } else {
216
+ // 查询成功后将焦点移入下一个输入框
217
+ setTimeout(function () {
218
+ var nextInput = document.querySelector('.czk .received .input');
219
+ nextInput && nextInput.select();
220
+ }, 300);
221
+ }
222
+ });
223
+ }
224
+ };
225
+
181
226
  this.getCouponList = function (coupon_code) {
182
227
  var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
183
228
  PayStyle = _enumController$getEn.PayStyle,
@@ -193,8 +238,6 @@ var SettlementStore = (_class = function () {
193
238
  var promoVoucher = {};
194
239
  _this2.paymode.clearDjqs();
195
240
  _this2.paymode.reCalculationDjqs();
196
- // promoVoucher.bizDate = dto.VoucherDate;
197
- // promoVoucher.bizDate = new Date().getTime();
198
241
  promoVoucher.coupon_code = coupon_code || "";
199
242
  promoVoucher.boName = "Retail";
200
243
  promoVoucher.voucherId = dto.ID;
@@ -281,11 +324,7 @@ var SettlementStore = (_class = function () {
281
324
  _message2.default.error(Differentiate.COUPON + '\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
282
325
  } else {
283
326
  var IsEnable = couponCategoryEnum === 'RIGUP' || couponCategoryEnum === 'UN_MATCH' || couponCategoryEnum === "PREPARING" || couponCategoryEnum === 'PROMO_LIMITED' || couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
284
-
285
- var _ref2 = _mutantsUtil.platform || {},
286
- isNewRetailBCPos = _ref2.isNewRetailBCPos;
287
-
288
- _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);
289
328
  }
290
329
  });
291
330
  if (promoVoucher.coupon_code) {
@@ -308,14 +347,14 @@ var SettlementStore = (_class = function () {
308
347
  };
309
348
 
310
349
  this.checkCoupon = function () {
311
- var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(sn) {
312
- 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;
313
352
 
314
353
  return _regenerator2.default.wrap(function _callee$(_context) {
315
354
  while (1) {
316
355
  switch (_context.prev = _context.next) {
317
356
  case 0:
318
- _ref4 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref4.isNewRetailBCPos;
357
+ _ref3 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref3.isNewRetailBCPos;
319
358
 
320
359
  if (!isNewRetailBCPos) {
321
360
  _context.next = 7;
@@ -383,10 +422,56 @@ var SettlementStore = (_class = function () {
383
422
  }));
384
423
 
385
424
  return function (_x) {
386
- return _ref3.apply(this, arguments);
425
+ return _ref2.apply(this, arguments);
387
426
  };
388
427
  }();
389
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
+
390
475
  this.checkIntegralExchangeReturn = function (id) {
391
476
  return new _promise2.default(function (resolve, reject) {
392
477
  (0, _tplusApi.tApi)({ param: { refVoucherId: id } }, 'chanjet.RE.NewPos.GetNewIntegralExchange', false, false, { timeout_skip: true }).then(function (resp) {
@@ -425,7 +510,7 @@ var SettlementStore = (_class = function () {
425
510
  }
426
511
  }, {
427
512
  key: 'init',
428
- value: function init(context, amounthandler, datasource, storeinfo, bquick, amount, type, data) {
513
+ value: function init(context, amounthandler, datasource, storeinfo, bquick, amount, type, data, payModeKey) {
429
514
  var _this3 = this;
430
515
 
431
516
  this.newStyle = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('voucherDefaultPosMode') == 'voucher';
@@ -441,9 +526,15 @@ var SettlementStore = (_class = function () {
441
526
  if (global.DealSingleRowAmountSettingProcessorBlock) {
442
527
  global.DealSingleRowAmountSettingProcessorBlock.execute(_this3.dto);
443
528
  }
529
+
530
+ var _enumController$getEn4 = _mutantsUtil.enumController.getEnumOj(),
531
+ PayStyle = _enumController$getEn4.PayStyle;
532
+
533
+ var isQuickCash = bquick && payModeKey == PayStyle.xianjin;
534
+
444
535
  // 成交金额抹零
445
536
  if (global.DealAmountSettingProcessorBlock) {
446
- global.DealAmountSettingProcessorBlock.execute(_this3.dto);
537
+ global.DealAmountSettingProcessorBlock.execute(_this3.dto, isQuickCash);
447
538
  }
448
539
  });
449
540
  // this.member=context.stores && context.stores.memberStore && context.stores.memberStore.member;
@@ -493,8 +584,8 @@ var SettlementStore = (_class = function () {
493
584
  value: function initByOriginReturn() {
494
585
  var _this5 = this;
495
586
 
496
- var _enumController$getEn4 = _mutantsUtil.enumController.getEnumOj(),
497
- PayStyle = _enumController$getEn4.PayStyle;
587
+ var _enumController$getEn5 = _mutantsUtil.enumController.getEnumOj(),
588
+ PayStyle = _enumController$getEn5.PayStyle;
498
589
 
499
590
  var _ref5 = _mutantsUtil.platform || {},
500
591
  isNewRetailBCPos = _ref5.isNewRetailBCPos;
@@ -516,7 +607,8 @@ var SettlementStore = (_class = function () {
516
607
  authCode: detail.PaymentCode,
517
608
  steadCashIntegral: detail.SteadCashIntegral,
518
609
  overchargesAmount: detail.OverchargesAmount,
519
- boriginReturn: true
610
+ boriginReturn: true,
611
+ thirdPaymentReturnInfo: detail.ThirdPaymentReturnInfo
520
612
  });
521
613
  _this5.paymode.currentMode = newmode;
522
614
  if (themode.paymentType == PayStyle.djq) {
@@ -531,23 +623,33 @@ var SettlementStore = (_class = function () {
531
623
  promoId = _ref6.promoId,
532
624
  id = _ref6.id;
533
625
 
534
- _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);
535
627
  return;
536
628
  }
537
- _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);
538
630
  });
539
631
  }
540
632
  _this5.paymode.thePaymodes.push(newmode);
541
633
  }
542
634
  });
543
635
  (0, _each3.default)(this.dto.RetailStorageDetails, function (detail) {
544
- var balanceAmount = detail.Member.BalanceStorage;
545
- balanceAmount = balanceAmount - detail.StoragePaymentAmount;
636
+ var balanceAmount = null;
637
+ var storageCardNo = null;
638
+ var meStorageCardId = null;
639
+ detail.DynamicPropertyKeys.forEach(function (ele, index) {
640
+ if (ele === "mestoragecard") {
641
+ balanceAmount = detail.DynamicPropertyValues[index].BalanceStorage - detail.StoragePaymentAmount;
642
+ storageCardNo = detail.DynamicPropertyValues[index].StorageCardNo;
643
+ meStorageCardId = detail.DynamicPropertyValues[index].MeStorageCardId;
644
+ }
645
+ });
546
646
  var newmode = (0, _extends3.default)({}, _this5.genNewMode(PayStyle.hyczk, false, detail.StoragePaymentAmount), {
547
- member: new Member(detail.Member),
548
- authCode: detail.Password,
647
+ member: new Member(detail.Member ? detail.Member : null),
648
+ authCode: detail.Password ? detail.Password : null,
549
649
  balance: balanceAmount,
550
- boriginReturn: true
650
+ boriginReturn: true,
651
+ meStorageCardId: meStorageCardId ? meStorageCardId : detail.MeStorageCardId,
652
+ storageCardNo: storageCardNo ? storageCardNo : detail.StorageCardNo
551
653
  });
552
654
  _this5.paymode.thePaymodes.push(newmode);
553
655
  });
@@ -562,7 +664,7 @@ var SettlementStore = (_class = function () {
562
664
  }, {
563
665
  key: 'quickSettle',
564
666
  value: function quickSettle(key) {
565
- this.addPay(key);
667
+ this.addPay(key, true);
566
668
  }
567
669
 
568
670
  //outer call
@@ -573,8 +675,8 @@ var SettlementStore = (_class = function () {
573
675
  value: function changeFocusAndAddPay(type) {
574
676
  var _this6 = this;
575
677
 
576
- var _enumController$getEn5 = _mutantsUtil.enumController.getEnumOj(),
577
- PayStyle = _enumController$getEn5.PayStyle;
678
+ var _enumController$getEn6 = _mutantsUtil.enumController.getEnumOj(),
679
+ PayStyle = _enumController$getEn6.PayStyle;
578
680
 
579
681
  this.paymode.currentFocus = type;
580
682
  if (this.paymode.currentMode) {
@@ -591,11 +693,14 @@ var SettlementStore = (_class = function () {
591
693
 
592
694
  //抵现积分
593
695
  (0, _tplusApi.tApi)({ IntegralSteadCashParams: {
594
- Idmember: this.paymode.currentMode.member.id,
696
+ Idmember: this.paymode.currentMode.memberId,
595
697
  TotalTaxAmount: this.paymode.amount,
596
698
  BalanceTaxAmount: this.paymode.currentMode.value
597
699
  } }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
598
- _this6.paymode.currentMode.steadCashIntegral = result.Integral;
700
+ // this.paymode.currentMode.steadCashIntegral=result.Integral;
701
+ // this.paymode.currentMode.perIntegral=result.perIntegral;
702
+ // this.paymode.currentMode.cashAmount=result.cashAmount;
703
+ _this6.paymode.currentMode.integralCashOverOrderAmount = result.integralCashOverOrderAmount;
599
704
  _this6.paymode.currentMode.overchargesAmount = result.Amount - _this6.paymode.currentMode.value;
600
705
  });
601
706
  } else {
@@ -620,7 +725,6 @@ var SettlementStore = (_class = function () {
620
725
 
621
726
  if ((0, _trim3.default)(v) === "") {
622
727
  (0, _mobx.runInAction)(function () {
623
- _this7.paymode.currentMode.member = new Member(null);
624
728
  _this7.paymode.currentMode.errinfo = "请输入储值卡";
625
729
  });
626
730
  return;
@@ -634,66 +738,98 @@ var SettlementStore = (_class = function () {
634
738
  var address = '';
635
739
  if (isNewRetailBCPos) {
636
740
  // address = '/member/memberProfile/FindByStorageCode/'+v;
637
- address = '/member/MeMemberWallet/FindByStorageCode';
638
- return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function (result) {
639
- var data = result.data;
640
- var m = data;
641
-
642
- var _ref8 = _mutantsUtil.platform || {},
643
- isNewRetailBCPos = _ref8.isNewRetailBCPos;
644
-
645
- if (isNewRetailBCPos) {
646
- _this7.paymode && _this7.paymode.currentMode.member.setMeStorageCardId(m.MeStorageCardId);
647
- _this7.paymode && _this7.paymode.currentMode.member.setStorageCardNo(m.StorageCardNo);
648
- _this7.paymode && (_this7.paymode.currentMode.MeStorageCardId = m.MeStorageCardId);
649
- _this7.paymode && (_this7.paymode.currentMode.StorageCardNo = m.StorageCardNo);
650
- }
651
- if (!m || !m.ID) {
652
- (0, _mobx.runInAction)(function () {
653
- _this7.paymode.currentMode.errinfo = "无效的会员卡号";
654
- });
655
- } else {
656
- (0, _mobx.runInAction)(function () {
657
- _this7.paymode.currentMode.errinfo = "";
658
- _this7.paymode.currentMode.member = new Member(m);
659
- _this7.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this7.brefund ? _this7.paymode.receivable : Math.max(_this7.paymode.receivable, 0));
660
- _this7.updateEvent();
661
- var message = '';
662
- var sum = (0, _reduce3.default)(_this7.paymode.thePaymodes, function (total, cur) {
663
- return total + cur.value;
664
- }, 0);
665
- if (global.CheckMemberStorageProcessorBlock) {
666
- message = CheckMemberStorageProcessorBlock.execute(m);
667
- }
668
- if (!String.isNullOrEmpty(message)) {
669
- _this7.paymode.currentMode.errinfo = message;
670
- } else if (_this7.checkReceived(_this7.paymode.currentMode, "balance")) {
671
- _this7.paymode.currentMode.errinfo = "余额不足";
672
- } else if (_this7.paymode.amount > 0 && parseFloat(_this7.paymode.amount) !== sum && _this7.paymode.currentMode.value == 0) {
673
- _this7.paymode.currentMode.errinfo = "实收金额必须录入";
674
- } else {
675
- // 查询成功后将焦点移入下一个输入框
676
- var nextInput = document.querySelector('.czk .received .input');
677
- nextInput && nextInput.select();
741
+ address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + v + '/' + true;
742
+ return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function () {
743
+ var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(result) {
744
+ var data, m;
745
+ return _regenerator2.default.wrap(function _callee3$(_context3) {
746
+ while (1) {
747
+ switch (_context3.prev = _context3.next) {
748
+ case 0:
749
+ data = result.data;
750
+ m = data && data.length && data[0];
751
+
752
+ if (!(result && result.data.length)) {
753
+ _context3.next = 25;
754
+ break;
755
+ }
756
+
757
+ if (!(result.data.length === 1)) {
758
+ _context3.next = 14;
759
+ break;
760
+ }
761
+
762
+ if (!(m.CardTypeEnum === 'BALANCE_CARD')) {
763
+ _context3.next = 10;
764
+ break;
765
+ }
766
+
767
+ _this7.paymode.updateCardInfo(m);
768
+ _this7.handleCzkData(m);
769
+ return _context3.abrupt('return', result.data);
770
+
771
+ case 10:
772
+ _context3.next = 12;
773
+ return (0, _tplusApi.ccApi)({ dto: _this7.dto, meStorageCardId: m.MeStorageCardId }, '/retail/RetailPos/validateRetailStorageCard', false, false).then(function (result1) {
774
+ var data1 = result1.data ? JSON.parse(result1.data)[0] : {};
775
+ if (data1.enable) {
776
+ _this7.paymode.updateCardInfo(m);
777
+ _this7.handleCzkData(m);
778
+ return result1.data;
779
+ } else {
780
+ _message2.default.warn(data1.disableReason);
781
+ }
782
+ });
783
+
784
+ case 12:
785
+ _context3.next = 25;
786
+ break;
787
+
788
+ case 14:
789
+ if (!(result.data && result.data.length === 1)) {
790
+ _context3.next = 19;
791
+ break;
792
+ }
793
+
794
+ _this7.paymode.updateCardInfo(result.data[0]);
795
+ return _context3.abrupt('return', result.data);
796
+
797
+ case 19:
798
+ if (!(result.data && result.data.length > 1)) {
799
+ _context3.next = 23;
800
+ break;
801
+ }
802
+
803
+ return _context3.abrupt('return', result.data);
804
+
805
+ case 23:
806
+ _message2.default.warn('没有可用储值卡!');
807
+ return _context3.abrupt('return', false);
808
+
809
+ case 25:
810
+ case 'end':
811
+ return _context3.stop();
812
+ }
678
813
  }
679
- });
680
- }
681
- });
814
+ }, _callee3, _this7);
815
+ }));
816
+
817
+ return function (_x2) {
818
+ return _ref8.apply(this, arguments);
819
+ };
820
+ }()
821
+ // result.data.forEach((m) => {
822
+ // if (m.CardTypeEnum === 'BALANCE_CARD') {
823
+ // // 会员概念改为卡,把这些字段都放开
824
+ // this.paymode.updateCardInfo(m);
825
+ // }
826
+ // })
827
+ );
682
828
  } else {
683
829
  address = 'AA.DR.newRetailMember.SearchMember';
684
830
  return (0, _tplusApi.tApi)({ SearchParams: { Key: v, IsSingleMember: true, IdStore: IdStore, StoreCode: StoreCode } }, address, false, false).then(function (result) {
685
831
  var data = JSON.parse(result.Data);
686
832
  var m = data && data.length > 0 && data[0];
687
-
688
- var _ref9 = _mutantsUtil.platform || {},
689
- isNewRetailBCPos = _ref9.isNewRetailBCPos;
690
-
691
- if (isNewRetailBCPos) {
692
- _this7.paymode && _this7.paymode.currentMode.member.setMeStorageCardId(m.MeStorageCardId);
693
- _this7.paymode && _this7.paymode.currentMode.member.setStorageCardNo(m.StorageCardNo);
694
- _this7.paymode && (_this7.paymode.currentMode.MeStorageCardId = m.MeStorageCardId);
695
- _this7.paymode && (_this7.paymode.currentMode.StorageCardNo = m.StorageCardNo);
696
- }
697
833
  if (!m || !m.ID) {
698
834
  (0, _mobx.runInAction)(function () {
699
835
  _this7.paymode.currentMode.errinfo = "无效的会员卡号";
@@ -726,12 +862,13 @@ var SettlementStore = (_class = function () {
726
862
  }
727
863
  }, {
728
864
  key: 'addDjq',
729
- 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) {
730
866
  var djq = {
731
867
  code: promoCouponCode,
732
868
  promoCouponCode: promoCouponCode,
733
869
  name: name,
734
870
  IsEnable: IsEnable,
871
+ nominalAmount: nominalAmount,
735
872
  amount: amount,
736
873
  doorsill: doorsill, //:"无门槛"
737
874
  LastTS: LastTS,
@@ -755,8 +892,8 @@ var SettlementStore = (_class = function () {
755
892
  }, {
756
893
  key: 'setCurrentMode',
757
894
  value: function setCurrentMode(id, type, append) {
758
- var _enumController$getEn6 = _mutantsUtil.enumController.getEnumOj(),
759
- PayStyle = _enumController$getEn6.PayStyle;
895
+ var _enumController$getEn7 = _mutantsUtil.enumController.getEnumOj(),
896
+ PayStyle = _enumController$getEn7.PayStyle;
760
897
 
761
898
  var mode = (0, _find3.default)(this.paymode.thePaymodes, { paymethodId: id });
762
899
  if (mode) {
@@ -774,8 +911,8 @@ var SettlementStore = (_class = function () {
774
911
  value: function afterSetCurrentMode(type) {
775
912
  var _this8 = this;
776
913
 
777
- var _enumController$getEn7 = _mutantsUtil.enumController.getEnumOj(),
778
- PayStyle = _enumController$getEn7.PayStyle;
914
+ var _enumController$getEn8 = _mutantsUtil.enumController.getEnumOj(),
915
+ PayStyle = _enumController$getEn8.PayStyle;
779
916
 
780
917
  if (type == PayStyle.djq) {
781
918
  this.paymode.calcDjqValue();
@@ -789,11 +926,14 @@ var SettlementStore = (_class = function () {
789
926
  }
790
927
 
791
928
  (0, _tplusApi.tApi)({ IntegralSteadCashParams: {
792
- Idmember: this.paymode.currentMode.member.id,
929
+ Idmember: this.paymode.currentMode.memberId,
793
930
  TotalTaxAmount: this.paymode.amount,
794
931
  BalanceTaxAmount: this.paymode.amount
795
932
  } }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
796
933
  _this8.paymode.currentMode.member.setExchangable(result.MaxAmount);
934
+ _this8.paymode.currentMode.perIntegral = result.perIntegral;
935
+ _this8.paymode.currentMode.cashAmount = result.cashAmount;
936
+ _this8.paymode.currentMode.integralCashOverOrderAmount = result.integralCashOverOrderAmount;
797
937
  _this8.updateEvent();
798
938
  if (_this8.checkReceived(_this8.paymode.currentMode, "exchangable")) {
799
939
  (0, _mobx.runInAction)(function () {
@@ -810,23 +950,27 @@ var SettlementStore = (_class = function () {
810
950
  }
811
951
  }, {
812
952
  key: 'genNewMode',
813
- value: function genNewMode(type, notwithm, v) {
814
- var _enumController$getEn8 = _mutantsUtil.enumController.getEnumOj(),
815
- PayStyle = _enumController$getEn8.PayStyle;
953
+ value: function genNewMode(type, notwithm, v, isQuick) {
954
+ var _enumController$getEn9 = _mutantsUtil.enumController.getEnumOj(),
955
+ PayStyle = _enumController$getEn9.PayStyle;
816
956
 
817
957
  var value = (0, _utils.getFixedNumber)(v || (this.brefund ? this.paymode.receivable : Math.max(this.paymode.receivable, 0)));
818
958
  var themode = (0, _find3.default)(this.paymode.paymodes, { 'paymentType': type });
959
+ var memberId = this.member && this.member.ID ? this.member.ID : null;
819
960
  var mode = (0, _mobx.observable)({
820
961
  paymethodId: this.paymode.counter,
821
962
  name: themode.name,
822
963
  exchangeRate: themode.exchangeRate,
823
964
  calDirection: themode.calDirection,
965
+ thridPayment: themode.thridPayment,
824
966
  value: value,
825
967
  value2: (0, _utils.getFixedNumber)(themode.calDirection == "88" ? value / themode.exchangeRate : value * themode.exchangeRate),
826
968
  value3: value,
827
969
  order: this.paymode.thePaymodes.length + 1,
828
970
  paymentType: type,
829
971
  djqs: [],
972
+ card: null,
973
+ memberId: !notwithm ? memberId : null,
830
974
  member: new Member(!notwithm ? this.member : null),
831
975
  authCode: '',
832
976
  steadCashIntegral: null,
@@ -834,9 +978,9 @@ var SettlementStore = (_class = function () {
834
978
  maxamount: this.paymode.amount
835
979
  });
836
980
  if (type == PayStyle.hyczk) {
837
- if (!mode.member.id || !mode.member.StorageCardNo) {
981
+ if (!mode.storageCardNo) {
838
982
  (0, _mobx.runInAction)(function () {
839
- mode.errinfo = '未录入储值卡';
983
+ mode.errinfo = '未录入手机号或储值卡号';
840
984
  });
841
985
  } else if (this.checkReceived(mode, "balance")) {
842
986
  (0, _mobx.runInAction)(function () {
@@ -847,7 +991,7 @@ var SettlementStore = (_class = function () {
847
991
  if (type == PayStyle.hyczk || type == PayStyle.jfdx || type == PayStyle.djq) {
848
992
  this.setMaxAmount(type, mode);
849
993
  }
850
- console.log(mode);
994
+ console.log('\u5F53\u524D\u64CD\u4F5C\u7ED3\u7B97\u65B9\u5F0F\u4FE1\u606F:' + mode);
851
995
  return mode;
852
996
  }
853
997
  }, {
@@ -855,8 +999,8 @@ var SettlementStore = (_class = function () {
855
999
  value: function setMaxAmount(type, mode) {
856
1000
  var _this9 = this;
857
1001
 
858
- var _enumController$getEn9 = _mutantsUtil.enumController.getEnumOj(),
859
- PayStyle = _enumController$getEn9.PayStyle;
1002
+ var _enumController$getEn10 = _mutantsUtil.enumController.getEnumOj(),
1003
+ PayStyle = _enumController$getEn10.PayStyle;
860
1004
 
861
1005
  var sum = 0;
862
1006
  if (type == PayStyle.hyczk) {
@@ -884,15 +1028,6 @@ var SettlementStore = (_class = function () {
884
1028
  key: 'changeFocusOnly',
885
1029
  value: function changeFocusOnly(type) {
886
1030
  this.paymode.currentFocus = type;
887
- // 获取焦点时带入剩余的值
888
- // let mode=_find(this.paymode.thePaymodes,{'paymentType':type});
889
- // if(mode && this.isIntegralExchange){
890
- // const shouldSetValue =getFixedNumber(parseFloat(this.paymode.receivable) + parseFloat(mode.value));
891
- // mode.value = shouldSetValue;
892
- // mode.value2 = getFixedNumber(mode.calDirection=="88"?shouldSetValue / mode.exchangeRate:(shouldSetValue * mode.exchangeRate));
893
- // mode.value3 = shouldSetValue;
894
- // this.paymode.calcReserved();
895
- // }
896
1031
  }
897
1032
  }, {
898
1033
  key: 'changeClickFocusOnly',
@@ -932,8 +1067,8 @@ var SettlementStore = (_class = function () {
932
1067
  }, {
933
1068
  key: 'addPayDirectly',
934
1069
  value: function addPayDirectly(pay) {
935
- var _enumController$getEn10 = _mutantsUtil.enumController.getEnumOj(),
936
- PayStyle = _enumController$getEn10.PayStyle;
1070
+ var _enumController$getEn11 = _mutantsUtil.enumController.getEnumOj(),
1071
+ PayStyle = _enumController$getEn11.PayStyle;
937
1072
 
938
1073
  if (!(0, _find3.default)(this.paymode.thePaymodes, { paymethodId: pay.paymethodId })) {
939
1074
  var pos = this.paymode.thePaymodes.length;
@@ -950,9 +1085,9 @@ var SettlementStore = (_class = function () {
950
1085
  }
951
1086
  }, {
952
1087
  key: 'addPay',
953
- value: function addPay(type) {
954
- var _enumController$getEn11 = _mutantsUtil.enumController.getEnumOj(),
955
- PayStyle = _enumController$getEn11.PayStyle;
1088
+ value: function addPay(type, isQuick) {
1089
+ var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
1090
+ PayStyle = _enumController$getEn12.PayStyle;
956
1091
 
957
1092
  var pos = this.paymode.thePaymodes.length;
958
1093
  if (type == PayStyle.hyczk) {
@@ -961,15 +1096,14 @@ var SettlementStore = (_class = function () {
961
1096
  });
962
1097
  pos = index == -1 ? pos : index + 1;
963
1098
  }
964
- // this.paymode.thePaymodes.push(this.genNewMode(type) );
965
- this.paymode.thePaymodes.splice(pos, 0, this.genNewMode(type, this.newStyle && type == PayStyle.hyczk));
1099
+ this.paymode.thePaymodes.splice(pos, 0, this.genNewMode(type, this.newStyle && type == PayStyle.hyczk, undefined, isQuick));
966
1100
  this.paymode.calcReserved();
967
1101
  }
968
1102
  }, {
969
1103
  key: 'delPay',
970
1104
  value: function delPay(index) {
971
- var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
972
- PayStyle = _enumController$getEn12.PayStyle;
1105
+ var _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(),
1106
+ PayStyle = _enumController$getEn13.PayStyle;
973
1107
 
974
1108
  (0, _remove3.default)(this.paymode.thePaymodes, function (mode) {
975
1109
  return mode.paymethodId === index;
@@ -977,83 +1111,179 @@ var SettlementStore = (_class = function () {
977
1111
  this.paymode.currentFocus = -1;
978
1112
  this.paymode.calcReserved();
979
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
+
980
1157
  }, {
981
1158
  key: 'commit',
982
1159
  value: function () {
983
- var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(bTest) {
984
- var _ref11, 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;
985
1162
 
986
- return _regenerator2.default.wrap(function _callee2$(_context2) {
1163
+ return _regenerator2.default.wrap(function _callee4$(_context4) {
987
1164
  while (1) {
988
- switch (_context2.prev = _context2.next) {
1165
+ switch (_context4.prev = _context4.next) {
989
1166
  case 0:
990
1167
  console.log('settlementStore.commit开始,参数:' + bTest);
991
1168
 
992
1169
  if (!bTest) {
993
- _context2.next = 3;
1170
+ _context4.next = 3;
994
1171
  break;
995
1172
  }
996
1173
 
997
- return _context2.abrupt('return', _promise2.default.resolve(true));
1174
+ return _context4.abrupt('return', _promise2.default.resolve(true));
998
1175
 
999
1176
  case 3:
1000
- _ref11 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref11.isNewRetailBCPos;
1001
- _context2.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
+ }
1187
+
1188
+ _message2.default.warn('二开支付目前仅支持单一结算方式。');
1189
+ return _context4.abrupt('return', _promise2.default.resolve(false));
1002
1190
 
1003
- if (!(this.type == 1)) {
1004
- _context2.next = 10;
1191
+ case 9:
1192
+ if (!(status == 1)) {
1193
+ _context4.next = 30;
1005
1194
  break;
1006
1195
  }
1007
1196
 
1008
- _context2.next = 8;
1009
- return this.saveMember();
1197
+ _context4.next = 12;
1198
+ return this.findStorageBillValidate();
1010
1199
 
1011
- case 8:
1012
- _context2.next = 18;
1013
- 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;
1014
1205
 
1015
- case 10:
1016
- if (!isNewRetailBCPos) {
1017
- _context2.next = 13;
1206
+ if (!(code && code == 10001)) {
1207
+ _context4.next = 24;
1018
1208
  break;
1019
1209
  }
1020
1210
 
1021
- _context2.next = 13;
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;
1219
+ break;
1220
+ }
1221
+
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;
1022
1245
  return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
1023
1246
 
1024
- case 13:
1025
- _context2.next = 15;
1247
+ case 32:
1248
+ _context4.next = 34;
1026
1249
  return this.save();
1027
1250
 
1028
- case 15:
1029
- if (!isNewRetailBCPos) {
1030
- _context2.next = 18;
1251
+ case 34:
1252
+ ret2 = _context4.sent;
1253
+
1254
+ if (!(ret2 === false)) {
1255
+ _context4.next = 37;
1031
1256
  break;
1032
1257
  }
1033
1258
 
1034
- _context2.next = 18;
1259
+ return _context4.abrupt('return', _promise2.default.resolve(false));
1260
+
1261
+ case 37:
1262
+ _context4.next = 39;
1035
1263
  return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
1036
1264
 
1037
- case 18:
1038
- return _context2.abrupt('return', _promise2.default.resolve(true));
1265
+ case 39:
1266
+ return _context4.abrupt('return', _promise2.default.resolve(true));
1039
1267
 
1040
- case 21:
1041
- _context2.prev = 21;
1042
- _context2.t0 = _context2['catch'](4);
1268
+ case 42:
1269
+ _context4.prev = 42;
1270
+ _context4.t0 = _context4['catch'](4);
1043
1271
 
1044
- console.error('settlementStore.commit失败,错误信息:' + _context2.t0);
1045
- return _context2.abrupt('return', _promise2.default.resolve(_context2.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));
1046
1276
 
1047
- case 25:
1277
+ case 47:
1048
1278
  case 'end':
1049
- return _context2.stop();
1279
+ return _context4.stop();
1050
1280
  }
1051
1281
  }
1052
- }, _callee2, this, [[4, 21]]);
1282
+ }, _callee4, this, [[4, 42]]);
1053
1283
  }));
1054
1284
 
1055
- function commit(_x2) {
1056
- return _ref10.apply(this, arguments);
1285
+ function commit(_x3) {
1286
+ return _ref9.apply(this, arguments);
1057
1287
  }
1058
1288
 
1059
1289
  return commit;
@@ -1066,100 +1296,155 @@ var SettlementStore = (_class = function () {
1066
1296
  }
1067
1297
  }, {
1068
1298
  key: 'saveMember',
1069
- value: function saveMember() {
1070
- var _this10 = this;
1299
+ value: function () {
1300
+ var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
1301
+ var _this11 = this;
1071
1302
 
1072
- var _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(),
1073
- PayStyle = _enumController$getEn13.PayStyle;
1303
+ var _enumController$getEn15, PayStyle, TradeType, IPMSG, dtoParams, payList, payment, tradeType, ret, _ref12, type, data, msg, code;
1074
1304
 
1075
- (0, _mobx.runInAction)(function () {
1076
- _this10.dto.StorageMutiSettleDetails = [];
1077
- var thePaymodes = _this10.newStyle ? (0, _filter3.default)(_this10.paymode.thePaymodes, function (mode) {
1078
- return parseFloat(mode.value) != 0;
1079
- }) : _this10.paymode.thePaymodes;
1080
- (0, _each3.default)(thePaymodes, function (mode) {
1081
- 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;
1082
1310
 
1083
- var value = parseFloat(mode.value);
1084
- var giveChange = null;
1085
- if (mode.paymentType == PayStyle.xianjin && _this10.paymode.receivable < 0 && value > Math.abs(_this10.paymode.receivable)) {
1086
- value = Math.Add(value, _this10.paymode.receivable);
1087
- 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
+ }
1088
1391
  }
1089
- _this10.dto.StorageMutiSettleDetails.push({
1090
- Code: mode.paymethodId,
1091
- StorageAmount: value,
1092
- GiveChange: giveChange,
1093
- IdsettleStyle: themode.idSettleStyle,
1094
- IdbankAccount: themode.idBankAccount,
1095
- PaymentCode: mode.authCode,
1096
- DynamicPropertyKeys: [],
1097
- DynamicPropertyValues: [],
1098
- DataSource: { Id: _this10.dataSource }
1099
- });
1100
- });
1101
- });
1102
- // cc结算调用
1103
- var IPMSG = {};
1104
- if (!!window.localStorage.IPMSG) {
1105
- IPMSG = JSON.parse(window.localStorage.IPMSG);
1392
+ }, _callee5, this);
1393
+ }));
1394
+
1395
+ function saveMember() {
1396
+ return _ref11.apply(this, arguments);
1106
1397
  }
1107
- return (0, _tplusApi.tApi)({ dto: this.dto }, 'chanjet.ME.INewRetailMemberStorage.Save', false, false).then(function (resp) {
1108
- _this10.handlePrint(resp);
1109
- });
1110
- }
1398
+
1399
+ return saveMember;
1400
+ }()
1111
1401
  }, {
1112
1402
  key: 'save',
1113
1403
  value: function () {
1114
- var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
1115
- var _this11 = this;
1404
+ var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
1405
+ var _this12 = this;
1116
1406
 
1117
- var _enumController$getEn14, PayStyle, _ref14, isNewRetailBCPos, IPMSG, RetailTypeEnum;
1407
+ var _enumController$getEn16, PayStyle, TradeType, IPMSG, RetailTypeEnum, dtoParams, payList, payment, tradeType, ret, _ref14, type, data, msg, code;
1118
1408
 
1119
- return _regenerator2.default.wrap(function _callee3$(_context3) {
1409
+ return _regenerator2.default.wrap(function _callee6$(_context6) {
1120
1410
  while (1) {
1121
- switch (_context3.prev = _context3.next) {
1411
+ switch (_context6.prev = _context6.next) {
1122
1412
  case 0:
1123
- _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn14.PayStyle;
1413
+ _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn16.PayStyle, TradeType = _enumController$getEn16.TradeType;
1124
1414
 
1125
1415
  (0, _mobx.runInAction)(function () {
1126
- _this11.dto.RetailPaymentDetails = [];
1127
- _this11.dto.RetailStorageDetails = [];
1128
- _this11.dto.RetailCouponDetails = [];
1416
+ _this12.dto.RetailPaymentDetails = [];
1417
+ _this12.dto.RetailStorageDetails = [];
1418
+ _this12.dto.RetailCouponDetails = [];
1129
1419
  var czkSum = 0;
1130
- var Idmember = _this11.dto.Idmember;
1131
1420
  var count = 0;
1132
- 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) {
1133
1422
  return parseFloat(mode.value) != 0;
1134
- }) : _this11.paymode.thePaymodes;
1423
+ }) : _this12.paymode.thePaymodes;
1135
1424
  (0, _each3.default)(thePaymodes, function (mode, index) {
1136
- var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
1425
+ var themode = (0, _find3.default)(_this12.paymode.paymodes, { 'paymentType': mode.paymentType });
1137
1426
  if (mode.paymentType == PayStyle.hyczk) {
1138
- if (!Idmember) {
1139
- Idmember = mode.member.id;
1140
- }
1141
1427
  czkSum = Math.Add(czkSum, mode.value);
1142
- var MeStorageCardId = mode.member.MeStorageCardId ? mode.member.MeStorageCardId : _this11.member.MeStorageCardId;
1143
- _this11.dto.RetailStorageDetails.push({
1428
+ _this12.dto.RetailStorageDetails.push({
1144
1429
  Code: mode.paymethodId,
1145
- MeStorageCardId: MeStorageCardId,
1430
+ MeStorageCardId: mode.meStorageCardId,
1146
1431
  StoragePaymentAmount: mode.value,
1147
1432
  IsOrigReturn: false,
1148
1433
  BalanceStorage: mode.balance,
1149
- Idmember: mode.member.id,
1434
+ Idmember: mode.memberId,
1150
1435
  DynamicPropertyKeys: [],
1151
1436
  DynamicPropertyValues: [],
1152
- DataSource: { Id: _this11.dataSource },
1437
+ DataSource: { Id: _this12.dataSource },
1153
1438
  Password: mode.authCode
1154
1439
  });
1155
1440
  } else {
1156
1441
  var value = parseFloat(mode.value);
1157
1442
  var giveChange = null;
1158
- if (mode.paymentType == PayStyle.xianjin && _this11.paymode.receivable < 0 && value > Math.abs(_this11.paymode.receivable)) {
1159
- value = Math.Add(value, _this11.paymode.receivable);
1160
- 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);
1161
1446
  }
1162
- _this11.dto.RetailPaymentDetails.push({
1447
+ _this12.dto.RetailPaymentDetails.push({
1163
1448
  Code: mode.paymethodId,
1164
1449
  OrigAmount: mode.exchangeRate != 1 ? mode.value2 : value,
1165
1450
  Amount: value,
@@ -1173,71 +1458,44 @@ var SettlementStore = (_class = function () {
1173
1458
  OverchargesAmount: mode.overchargesAmount,
1174
1459
  DynamicPropertyKeys: [],
1175
1460
  DynamicPropertyValues: [],
1176
- DataSource: { Id: _this11.dataSource }
1461
+ DataSource: { Id: _this12.dataSource },
1462
+ ThirdPaymentInfo: themode.thridPayment || null,
1463
+ ThirdPaymentReturnInfo: mode.thirdPaymentReturnInfo || null
1177
1464
  });
1178
1465
  if (mode.paymentType == PayStyle.djq) {
1179
- (0, _each3.default)(_this11.paymode.checkList && _this11.paymode.checkList.length ? _this11.paymode.checkList : mode.djqs, function (djq) {
1180
- _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({
1181
1468
  CouponCode: djq.promoCouponCode,
1182
1469
  ReductionAmount: djq.amount,
1183
1470
  EnableAmount: djq.doorsill,
1184
1471
  CouponTitle: djq.name,
1185
- IdMember: djq.UMemberID ? mode.member.id : null,
1472
+ IdMember: djq.UMemberID ? mode.memberId : null,
1186
1473
  LastTS: djq.LastTS,
1187
1474
  PromotionId: djq.promoId,
1188
1475
  PromotionRuleId: djq.promoRuleId,
1189
1476
  PromoCouponAllocatedId: djq.id,
1190
- DataSource: { Id: _this11.dataSource }
1477
+ DataSource: { Id: _this12.dataSource }
1191
1478
  });
1192
1479
  });
1193
1480
  }
1194
1481
  }
1195
1482
  });
1196
-
1197
- var _ref13 = _mutantsUtil.platform || {},
1198
- isNewRetailBCPos = _ref13.isNewRetailBCPos;
1199
-
1200
- if (_this11.dto.RetailStorageDetails.length > 0) {
1201
- var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
1202
- if (isNewRetailBCPos) {
1203
- // this.dto.RetailStorageDetails && this.dto.RetailStorageDetails.forEach((value, index) => {
1204
- // value.MeStorageCardId = (mode.MeStorageCardId ? mode.MeStorageCardId : this.member.MeStorageCardId);
1205
- // })
1206
- _this11.dto.RetailPaymentDetails.push({
1207
- Code: _this11.paymode.counter,
1208
- OrigAmount: czkSum,
1209
- Amount: czkSum,
1210
- IdsettleStyle: themode.idSettleStyle,
1211
- IdbankAccount: themode.idBankAccount,
1212
- DynamicPropertyKeys: [],
1213
- DynamicPropertyValues: [],
1214
- DataSource: { Id: _this11.dataSource },
1215
- RetailStorageDetails: _this11.dto.RetailStorageDetails
1216
- });
1217
- } else {
1218
- _this11.dto.RetailPaymentDetails.push({
1219
- Code: _this11.paymode.counter,
1220
- OrigAmount: czkSum,
1221
- Amount: czkSum,
1222
- IdsettleStyle: themode.idSettleStyle,
1223
- IdbankAccount: themode.idBankAccount,
1224
- DynamicPropertyKeys: [],
1225
- DynamicPropertyValues: [],
1226
- DataSource: { Id: _this11.dataSource }
1227
- });
1228
- }
1229
- _this11.dto.Idmember = Idmember;
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
+ });
1230
1496
  }
1231
1497
  });
1232
- _ref14 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref14.isNewRetailBCPos;
1233
-
1234
- console.log('bc_pos\u73AF\u5883:' + isNewRetailBCPos + ',\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
1235
-
1236
- if (!isNewRetailBCPos) {
1237
- _context3.next = 20;
1238
- break;
1239
- }
1240
-
1498
+ console.log('\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
1241
1499
  // cc结算调用
1242
1500
  IPMSG = {};
1243
1501
 
@@ -1245,65 +1503,271 @@ var SettlementStore = (_class = function () {
1245
1503
  IPMSG = JSON.parse(window.localStorage.IPMSG);
1246
1504
  }
1247
1505
  RetailTypeEnum = this.dto.IdbusiType == 36 ? "INTEGRAL_EXCHANGE" : "NORMAL";
1248
- _context3.t1 = this.dto.IdbusiType == 37;
1506
+ _context6.t1 = this.dto.IdbusiType == 37;
1249
1507
 
1250
- if (!_context3.t1) {
1251
- _context3.next = 13;
1508
+ if (!_context6.t1) {
1509
+ _context6.next = 11;
1252
1510
  break;
1253
1511
  }
1254
1512
 
1255
- _context3.next = 12;
1513
+ _context6.next = 10;
1256
1514
  return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
1257
1515
 
1258
- case 12:
1259
- _context3.t1 = _context3.sent;
1516
+ case 10:
1517
+ _context6.t1 = _context6.sent;
1518
+
1519
+ case 11:
1520
+ _context6.t0 = _context6.t1;
1521
+
1522
+ if (_context6.t0) {
1523
+ _context6.next = 14;
1524
+ break;
1525
+ }
1260
1526
 
1261
- case 13:
1262
- _context3.t0 = _context3.t1;
1527
+ _context6.t0 = this.dto.IdbusiType != 37;
1263
1528
 
1264
- if (_context3.t0) {
1265
- _context3.next = 16;
1529
+ case 14:
1530
+ if (!_context6.t0) {
1531
+ _context6.next = 33;
1266
1532
  break;
1267
1533
  }
1268
1534
 
1269
- _context3.t0 = this.dto.IdbusiType != 37;
1535
+ dtoParams = (0, _extends3.default)({}, this.dto.cut(), { RetailOms: { RetailTypeEnum: RetailTypeEnum } });
1536
+ //处理存在二开支付情况
1537
+
1538
+ payList = dtoParams.RetailPaymentDetails.filter(function (v) {
1539
+ return v.ThirdPaymentInfo;
1540
+ });
1270
1541
 
1271
- case 16:
1272
- if (!_context3.t0) {
1273
- _context3.next = 18;
1542
+ if (!(payList && payList.length > 0)) {
1543
+ _context6.next = 30;
1274
1544
  break;
1275
1545
  }
1276
1546
 
1277
- return _context3.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) {
1278
- _this11.setDtoID(resp.ID);
1279
- _this11.paymode.checkList = [];
1280
- _this11.billID = resp.ID;
1281
- }));
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);
1282
1551
 
1283
- case 18:
1284
- _context3.next = 21;
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;
1285
1563
  break;
1286
1564
 
1287
- case 20:
1288
- return _context3.abrupt('return', (0, _tplusApi.tApi)({ dto: this.dto.cut() }, 'chanjet.RE.newRetail.Settle', false, false, { timeout_skip: true }).then(function (resp) {
1289
- _this11.setDtoID(resp.ID);
1290
- _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 = [];
1291
1579
  }));
1292
1580
 
1293
- case 21:
1581
+ case 33:
1294
1582
  case 'end':
1295
- return _context3.stop();
1583
+ return _context6.stop();
1296
1584
  }
1297
1585
  }
1298
- }, _callee3, this);
1586
+ }, _callee6, this);
1299
1587
  }));
1300
1588
 
1301
1589
  function save() {
1302
- return _ref12.apply(this, arguments);
1590
+ return _ref13.apply(this, arguments);
1303
1591
  }
1304
1592
 
1305
1593
  return save;
1306
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
+ }()
1307
1771
  }, {
1308
1772
  key: 'setDtoID',
1309
1773
  value: function setDtoID(id) {
@@ -1312,35 +1776,35 @@ var SettlementStore = (_class = function () {
1312
1776
  }, {
1313
1777
  key: 'querySettleResult',
1314
1778
  value: function () {
1315
- var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
1316
- return _regenerator2.default.wrap(function _callee4$(_context4) {
1779
+ var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10() {
1780
+ return _regenerator2.default.wrap(function _callee10$(_context10) {
1317
1781
  while (1) {
1318
- switch (_context4.prev = _context4.next) {
1782
+ switch (_context10.prev = _context10.next) {
1319
1783
  case 0:
1320
- _context4.prev = 0;
1321
- _context4.t0 = _promise2.default;
1322
- _context4.next = 4;
1784
+ _context10.prev = 0;
1785
+ _context10.t0 = _promise2.default;
1786
+ _context10.next = 4;
1323
1787
  return (0, _tplusApi.tApi)({ RetailCode: this.dto.Code }, 'chanjet.RE.newRetail.QuerySettleResult', false, false, { timeout_skip: true });
1324
1788
 
1325
1789
  case 4:
1326
- _context4.t1 = _context4.sent;
1327
- return _context4.abrupt('return', _context4.t0.resolve.call(_context4.t0, _context4.t1));
1790
+ _context10.t1 = _context10.sent;
1791
+ return _context10.abrupt('return', _context10.t0.resolve.call(_context10.t0, _context10.t1));
1328
1792
 
1329
1793
  case 8:
1330
- _context4.prev = 8;
1331
- _context4.t2 = _context4['catch'](0);
1332
- return _context4.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" }));
1333
1797
 
1334
1798
  case 11:
1335
1799
  case 'end':
1336
- return _context4.stop();
1800
+ return _context10.stop();
1337
1801
  }
1338
1802
  }
1339
- }, _callee4, this, [[0, 8]]);
1803
+ }, _callee10, this, [[0, 8]]);
1340
1804
  }));
1341
1805
 
1342
1806
  function querySettleResult() {
1343
- return _ref15.apply(this, arguments);
1807
+ return _ref22.apply(this, arguments);
1344
1808
  }
1345
1809
 
1346
1810
  return querySettleResult;
@@ -1366,99 +1830,131 @@ var SettlementStore = (_class = function () {
1366
1830
  }, {
1367
1831
  key: 'validePwd',
1368
1832
  value: function () {
1369
- var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(value) {
1370
- var _ref17, isNewRetailBCPos, cook1, cook2, message, memberId, 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;
1371
1835
 
1372
- return _regenerator2.default.wrap(function _callee5$(_context5) {
1836
+ return _regenerator2.default.wrap(function _callee11$(_context11) {
1373
1837
  while (1) {
1374
- switch (_context5.prev = _context5.next) {
1838
+ switch (_context11.prev = _context11.next) {
1375
1839
  case 0:
1376
- _ref17 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref17.isNewRetailBCPos;
1377
- _context5.prev = 1;
1840
+ _ref24 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref24.isNewRetailBCPos;
1841
+ _context11.prev = 1;
1378
1842
 
1379
1843
  if (!isNewRetailBCPos) {
1380
- _context5.next = 19;
1844
+ _context11.next = 33;
1381
1845
  break;
1382
1846
  }
1383
1847
 
1384
1848
  cook1 = this.getAllCookies()['errorPwd'];
1385
1849
  cook2 = cook1 && JSON.parse(cook1);
1386
1850
  message = '密码输入错误';
1387
- memberId = this.paymode.currentMode.member.MeStorageCardId;
1851
+ memberStorageId = this.paymode.currentMode.meStorageCardId;
1388
1852
 
1389
1853
  if (!cook2) {
1390
- _context5.next = 12;
1854
+ _context11.next = 12;
1391
1855
  break;
1392
1856
  }
1393
1857
 
1394
- if (!cook2.hasOwnProperty(memberId + "")) {
1395
- _context5.next = 12;
1858
+ if (!cook2.hasOwnProperty(memberStorageId + "")) {
1859
+ _context11.next = 12;
1396
1860
  break;
1397
1861
  }
1398
1862
 
1399
- if (!(cook2[memberId] > 3)) {
1400
- _context5.next = 12;
1863
+ if (!(cook2[memberStorageId] > 3)) {
1864
+ _context11.next = 12;
1401
1865
  break;
1402
1866
  }
1403
1867
 
1404
1868
  message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
1405
- return _context5.abrupt('return', _promise2.default.resolve(message));
1869
+ return _context11.abrupt('return', _promise2.default.resolve(message));
1406
1870
 
1407
1871
  case 12:
1408
- _context5.next = 14;
1409
- return (0, _tplusApi.ccApi)({ password: _tplusApi.User.pwdEncrypt(value.pwd) }, '/member/MeMemberWallet/checkPaymentPassword/' + value.id, false, false);
1872
+ _paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId, cardStatusEnum = _paymode$currentMode.cardStatusEnum;
1873
+ result = null;
1410
1874
 
1411
- case 14:
1412
- result = _context5.sent;
1875
+ if (!(cardTypeEnum === 'BALANCE_CARD')) {
1876
+ _context11.next = 20;
1877
+ break;
1878
+ }
1879
+
1880
+ _context11.next = 17;
1881
+ return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
1882
+
1883
+ case 17:
1884
+ result = _context11.sent;
1885
+ _context11.next = 29;
1886
+ break;
1887
+
1888
+ case 20:
1889
+ if (!(cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId)) {
1890
+ _context11.next = 26;
1891
+ break;
1892
+ }
1893
+
1894
+ _context11.next = 23;
1895
+ return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
1413
1896
 
1897
+ case 23:
1898
+ result = _context11.sent;
1899
+ _context11.next = 29;
1900
+ break;
1901
+
1902
+ case 26:
1903
+ _context11.next = 28;
1904
+ return (0, _tplusApi.ccApi)({ password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
1905
+
1906
+ case 28:
1907
+ result = _context11.sent;
1908
+
1909
+ case 29:
1414
1910
  if (!result.data) {
1415
1911
  if (cook2) {
1416
- if (cook2.hasOwnProperty(memberId + "")) {
1417
- count = cook2[memberId];
1912
+ if (cook2.hasOwnProperty(memberStorageId + "")) {
1913
+ count = cook2[memberStorageId];
1418
1914
 
1419
- cook2[memberId] = count + 1;
1915
+ cook2[memberStorageId] = count + 1;
1420
1916
  } else {
1421
- cook2[memberId] = 1;
1917
+ cook2[memberStorageId] = 1;
1422
1918
  }
1423
1919
  } else {
1424
1920
  cook2 = {};
1425
- cook2[memberId] = 1;
1921
+ cook2[memberStorageId] = 1;
1426
1922
  }
1427
1923
  this.setCookie('errorPwd', '', -1);
1428
1924
  this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
1429
1925
  }
1430
- return _context5.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
1926
+ return _context11.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
1431
1927
 
1432
- case 19:
1433
- _context5.next = 21;
1928
+ case 33:
1929
+ _context11.next = 35;
1434
1930
  return (0, _tplusApi.tApi)({ "CheckoutParams": {
1435
1931
  "Idmember": value.id,
1436
1932
  "Password": value.pwd
1437
1933
  } }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
1438
1934
 
1439
- case 21:
1440
- _result = _context5.sent;
1441
- return _context5.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
1935
+ case 35:
1936
+ _result = _context11.sent;
1937
+ return _context11.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
1442
1938
 
1443
- case 23:
1444
- _context5.next = 28;
1939
+ case 37:
1940
+ _context11.next = 42;
1445
1941
  break;
1446
1942
 
1447
- case 25:
1448
- _context5.prev = 25;
1449
- _context5.t0 = _context5['catch'](1);
1450
- return _context5.abrupt('return', "failed");
1943
+ case 39:
1944
+ _context11.prev = 39;
1945
+ _context11.t0 = _context11['catch'](1);
1946
+ return _context11.abrupt('return', "failed");
1451
1947
 
1452
- case 28:
1948
+ case 42:
1453
1949
  case 'end':
1454
- return _context5.stop();
1950
+ return _context11.stop();
1455
1951
  }
1456
1952
  }
1457
- }, _callee5, this, [[1, 25]]);
1953
+ }, _callee11, this, [[1, 39]]);
1458
1954
  }));
1459
1955
 
1460
- function validePwd(_x3) {
1461
- return _ref16.apply(this, arguments);
1956
+ function validePwd(_x9) {
1957
+ return _ref23.apply(this, arguments);
1462
1958
  }
1463
1959
 
1464
1960
  return validePwd;
@@ -1468,7 +1964,7 @@ var SettlementStore = (_class = function () {
1468
1964
  }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'queryPwd', [_mobx.action], {
1469
1965
  enumerable: true,
1470
1966
  initializer: function initializer() {
1471
- var _this12 = this;
1967
+ var _this14 = this;
1472
1968
 
1473
1969
  return function (newPass, newPassConfirm) {
1474
1970
  if (!newPass || !newPassConfirm) {
@@ -1480,7 +1976,7 @@ var SettlementStore = (_class = function () {
1480
1976
  var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
1481
1977
  return (0, _tplusApi.ccApi)({
1482
1978
  Idstore: idstore,
1483
- meMemberId: _this12.member.ID,
1979
+ meMemberId: _this14.paymode.currentMode.memberId,
1484
1980
  oldPassword: null,
1485
1981
  newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
1486
1982
  dataSource: "POS"
@@ -1494,40 +1990,133 @@ var SettlementStore = (_class = function () {
1494
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], {
1495
1991
  enumerable: true,
1496
1992
  initializer: function initializer() {
1497
- var _this13 = this;
1993
+ var _this15 = this;
1498
1994
 
1499
1995
  return function () {
1500
- var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(_this) {
1996
+ var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(_this) {
1501
1997
  var _getLoginInfo, IdStore, StoreCode, resp;
1502
1998
 
1503
- return _regenerator2.default.wrap(function _callee6$(_context6) {
1999
+ return _regenerator2.default.wrap(function _callee12$(_context12) {
1504
2000
  while (1) {
1505
- switch (_context6.prev = _context6.next) {
2001
+ switch (_context12.prev = _context12.next) {
1506
2002
  case 0:
1507
- _getLoginInfo = _this13.getLoginInfo(), IdStore = _getLoginInfo.IdStore, StoreCode = _getLoginInfo.StoreCode;
1508
- _context6.next = 3;
1509
- 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);
1510
2006
 
1511
2007
  case 3:
1512
- resp = _context6.sent;
2008
+ resp = _context12.sent;
1513
2009
 
1514
2010
  _this.member = resp;
1515
- _this.paymode.currentMode.member.setStorageCardNo(resp.StorageCardNo);
1516
- return _context6.abrupt('return', _promise2.default.resolve(resp));
2011
+ _this.paymode.updateMemberStorageCardNo(resp.StorageCardNo, resp.WalletEnabled);
2012
+ return _context12.abrupt('return', _promise2.default.resolve(resp));
1517
2013
 
1518
2014
  case 7:
1519
2015
  case 'end':
1520
- return _context6.stop();
2016
+ return _context12.stop();
2017
+ }
2018
+ }
2019
+ }, _callee12, _this15);
2020
+ }));
2021
+
2022
+ return function (_x10) {
2023
+ return _ref25.apply(this, arguments);
2024
+ };
2025
+ }();
2026
+ }
2027
+ }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'updateCurrentMode', [_mobx.action], {
2028
+ enumerable: true,
2029
+ initializer: function initializer() {
2030
+ var _this16 = this;
2031
+
2032
+ return function () {
2033
+ var _ref26 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(memberId) {
2034
+ var result;
2035
+ return _regenerator2.default.wrap(function _callee13$(_context13) {
2036
+ while (1) {
2037
+ switch (_context13.prev = _context13.next) {
2038
+ case 0:
2039
+ _context13.next = 2;
2040
+ return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId + '/' + true, false, false, { method: 'get' });
2041
+
2042
+ case 2:
2043
+ result = _context13.sent;
2044
+
2045
+ if (!(result && result.data.length)) {
2046
+ _context13.next = 20;
2047
+ break;
2048
+ }
2049
+
2050
+ if (!(result.data.length === 1)) {
2051
+ _context13.next = 9;
2052
+ break;
2053
+ }
2054
+
2055
+ _this16.paymode.updateCardInfo(result.data[0]);
2056
+ return _context13.abrupt('return', result.data);
2057
+
2058
+ case 9:
2059
+ if (!(result.data && result.data.length === 1)) {
2060
+ _context13.next = 14;
2061
+ break;
2062
+ }
2063
+
2064
+ _this16.paymode.updateCardInfo(result.data[0]);
2065
+ return _context13.abrupt('return', result.data);
2066
+
2067
+ case 14:
2068
+ if (!(result.data && result.data.length > 1)) {
2069
+ _context13.next = 18;
2070
+ break;
2071
+ }
2072
+
2073
+ return _context13.abrupt('return', result.data);
2074
+
2075
+ case 18:
2076
+ _message2.default.warn('没有可用储值卡!');
2077
+ return _context13.abrupt('return', false);
2078
+
2079
+ case 20:
2080
+ case 'end':
2081
+ return _context13.stop();
1521
2082
  }
1522
2083
  }
1523
- }, _callee6, _this13);
2084
+ }, _callee13, _this16);
1524
2085
  }));
1525
2086
 
1526
- return function (_x4) {
1527
- return _ref18.apply(this, arguments);
2087
+ return function (_x11) {
2088
+ return _ref26.apply(this, arguments);
1528
2089
  };
1529
2090
  }();
1530
2091
  }
2092
+ }), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'updateCardInfo', [_mobx.action], {
2093
+ enumerable: true,
2094
+ initializer: function initializer() {
2095
+ var _this17 = this;
2096
+
2097
+ return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
2098
+ var address, result;
2099
+ return _regenerator2.default.wrap(function _callee14$(_context14) {
2100
+ while (1) {
2101
+ switch (_context14.prev = _context14.next) {
2102
+ case 0:
2103
+ address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + _this17.paymode.currentMode.storageCardNo;
2104
+ _context14.next = 3;
2105
+ return (0, _tplusApi.ccApi)({}, address, false, false, { method: 'get', timeout_skip: true });
2106
+
2107
+ case 3:
2108
+ result = _context14.sent;
2109
+
2110
+ _this17.paymode.updateCardInfo(result.data);
2111
+
2112
+ case 5:
2113
+ case 'end':
2114
+ return _context14.stop();
2115
+ }
2116
+ }
2117
+ }, _callee14, _this17);
2118
+ }));
2119
+ }
1531
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);
1532
2121
  exports.default = SettlementStore;
1533
2122
  var PayMode = exports.PayMode = (_class3 = function () {
@@ -1542,15 +2131,19 @@ var PayMode = exports.PayMode = (_class3 = function () {
1542
2131
  this.onlineamount = 0;
1543
2132
  this.maxamount = 0;
1544
2133
 
1545
- _initDefineProp(this, 'currentFocus', _descriptor3, this);
2134
+ _initDefineProp(this, 'currentFocus', _descriptor5, this);
1546
2135
 
1547
- _initDefineProp(this, 'received', _descriptor4, this);
2136
+ _initDefineProp(this, 'received', _descriptor6, this);
1548
2137
 
1549
- _initDefineProp(this, 'receivable', _descriptor5, this);
2138
+ _initDefineProp(this, 'receivable', _descriptor7, this);
1550
2139
 
1551
- _initDefineProp(this, 'paymodes', _descriptor6, this);
2140
+ _initDefineProp(this, 'paymodes', _descriptor8, this);
1552
2141
 
1553
- _initDefineProp(this, 'thePaymodes', _descriptor7, this);
2142
+ _initDefineProp(this, 'thePaymodes', _descriptor9, this);
2143
+
2144
+ _initDefineProp(this, 'storageCardNo', _descriptor10, this);
2145
+
2146
+ _initDefineProp(this, 'balance', _descriptor11, this);
1554
2147
 
1555
2148
  this.currentMode = null;
1556
2149
  this.checkList = [];
@@ -1559,11 +2152,11 @@ var PayMode = exports.PayMode = (_class3 = function () {
1559
2152
  hotKey: "Ctrl+M"
1560
2153
  };
1561
2154
 
1562
- _initDefineProp(this, 'calcCheckList', _descriptor8, this);
2155
+ _initDefineProp(this, 'calcCheckList', _descriptor12, this);
1563
2156
 
1564
- _initDefineProp(this, 'setCouponNum', _descriptor9, this);
2157
+ _initDefineProp(this, 'setCouponNum', _descriptor13, this);
1565
2158
 
1566
- _initDefineProp(this, 'addDjqs', _descriptor10, this);
2159
+ _initDefineProp(this, 'addDjqs', _descriptor14, this);
1567
2160
  }
1568
2161
  // @observable store = null;
1569
2162
 
@@ -1599,10 +2192,30 @@ var PayMode = exports.PayMode = (_class3 = function () {
1599
2192
  this.received = (0, _utils.getFixedNumber)(sum);
1600
2193
  this.receivable = (0, _utils.getFixedNumber)(this.amount - sum);
1601
2194
  }
2195
+ }, {
2196
+ key: 'updateMemberStorageCardNo',
2197
+ value: function updateMemberStorageCardNo(storageCardNo, walletEnabled) {
2198
+ this.currentMode.storageCardNo = storageCardNo;
2199
+ this.currentMode.walletEnabled = walletEnabled;
2200
+ }
2201
+ }, {
2202
+ key: 'updateCardInfo',
2203
+ value: function updateCardInfo(m) {
2204
+ this.currentMode.cardStatusEnum = m.CardStatusEnum;
2205
+ this.currentMode.isNeedPassword = m.IsNeedPassword;
2206
+ this.currentMode.meStorageCardId = m.MeStorageCardId;
2207
+ this.currentMode.storageCardNo = m.StorageCardNo;
2208
+ this.currentMode.balance = m.BalanceStorage;
2209
+ this.currentMode.rawbalance = m.BalanceStorage;
2210
+ this.currentMode.cardTypeEnum = m.CardTypeEnum;
2211
+ this.currentMode.walletEnabled = m.WalletEnabled;
2212
+ this.currentMode.memberId = m.ID;
2213
+ this.currentMode.freePaymentPasswordStore = m.FreePaymentPasswordStore;
2214
+ }
1602
2215
  }, {
1603
2216
  key: 'calcDjqCheckValue',
1604
2217
  value: function calcDjqCheckValue(q1, dto, params) {
1605
- var _this14 = this;
2218
+ var _this18 = this;
1606
2219
 
1607
2220
  var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
1608
2221
  var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
@@ -1616,12 +2229,12 @@ var PayMode = exports.PayMode = (_class3 = function () {
1616
2229
  this.checkList = [];
1617
2230
  }
1618
2231
 
1619
- var _ref19 = _mutantsUtil.platform || {},
1620
- isNewRetailBCPos = _ref19.isNewRetailBCPos;
2232
+ var _ref28 = _mutantsUtil.platform || {},
2233
+ isNewRetailBCPos = _ref28.isNewRetailBCPos;
1621
2234
 
1622
- var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
1623
- PayStyle = _enumController$getEn15.PayStyle,
1624
- Differentiate = _enumController$getEn15.Differentiate;
2235
+ var _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(),
2236
+ PayStyle = _enumController$getEn18.PayStyle,
2237
+ Differentiate = _enumController$getEn18.Differentiate;
1625
2238
 
1626
2239
  if (q1) {
1627
2240
  if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
@@ -1649,7 +2262,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1649
2262
  if (!q1.checked) {
1650
2263
  this.checkList.forEach(function (ele, i) {
1651
2264
  if (ele.id === q1.id) {
1652
- _this14.checkList.splice(i, 1);
2265
+ _this18.checkList.splice(i, 1);
1653
2266
  }
1654
2267
  });
1655
2268
  } else {
@@ -1721,24 +2334,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
1721
2334
  if (result && result.length != 0) {
1722
2335
  result.forEach(function (element, index) {
1723
2336
  var djq1 = false;
1724
- _this14.currentMode.djqs.forEach(function (djq) {
2337
+ _this18.currentMode.djqs.forEach(function (djq) {
1725
2338
  if (element.id === djq.id) {
1726
2339
  djq1 = true;
1727
2340
  }
1728
2341
  });
1729
2342
 
1730
- var _ref20 = element || {},
1731
- couponCode = _ref20.couponCode,
1732
- name = _ref20.name,
1733
- tieredAmountResult = _ref20.tieredAmountResult,
1734
- fromDate = _ref20.fromDate,
1735
- dateMount = _ref20.dateMount,
1736
- promoMethodEnum = _ref20.promoMethodEnum,
1737
- discountPct = _ref20.discountPct,
1738
- nominalAmount = _ref20.nominalAmount,
1739
- promoId = _ref20.promoId,
1740
- id = _ref20.id,
1741
- doorsill = _ref20.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;
1742
2355
 
1743
2356
  var condValue = tieredAmountResult.condValue,
1744
2357
  promoDiscount = tieredAmountResult.promoDiscount,
@@ -1766,10 +2379,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
1766
2379
  // couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
1767
2380
  // id
1768
2381
  // })
1769
- _this14.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);
1770
2383
  djq1 = false;
1771
2384
  } else {
1772
- _this14.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
2385
+ _this18.setCouponNum(element.id, couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
1773
2386
  // this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
1774
2387
  // djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
1775
2388
  }
@@ -1782,11 +2395,11 @@ var PayMode = exports.PayMode = (_class3 = function () {
1782
2395
  }, {
1783
2396
  key: 'calcDjqValue',
1784
2397
  value: function calcDjqValue(q1) {
1785
- var _ref21 = _mutantsUtil.platform || {},
1786
- isNewRetailBCPos = _ref21.isNewRetailBCPos;
2398
+ var _ref30 = _mutantsUtil.platform || {},
2399
+ isNewRetailBCPos = _ref30.isNewRetailBCPos;
1787
2400
 
1788
- var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
1789
- Differentiate = _enumController$getEn16.Differentiate;
2401
+ var _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(),
2402
+ Differentiate = _enumController$getEn19.Differentiate;
1790
2403
 
1791
2404
  if (q1) {
1792
2405
  if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
@@ -1848,8 +2461,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
1848
2461
  this.currentMode.errinfo = '';
1849
2462
  var sum = this.amount;
1850
2463
 
1851
- var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
1852
- PayStyle = _enumController$getEn17.PayStyle;
2464
+ var _enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(),
2465
+ PayStyle = _enumController$getEn20.PayStyle;
1853
2466
 
1854
2467
  this.thePaymodes && this.thePaymodes.forEach(function (mode) {
1855
2468
  if (mode.paymentType === PayStyle.hyczk) {
@@ -1864,41 +2477,60 @@ var PayMode = exports.PayMode = (_class3 = function () {
1864
2477
  } else if (parseFloat(v) > 0 && parseFloat(v) > (max || 0)) {
1865
2478
  this.currentMode.errinfo = "余额不足";
1866
2479
  }
2480
+ // 如果是积分抵现的一些判断
2481
+ if (this.currentMode.paymentType === PayStyle.jfdx) {
2482
+ if (this.currentMode.integralCashOverOrderAmount === true) {
2483
+ this.currentMode.steadCashIntegral = Math.ceil(this.currentMode.value / this.currentMode.cashAmount) * this.currentMode.perIntegral;
2484
+ } else if (this.currentMode.integralCashOverOrderAmount === false) {
2485
+ var v1 = this.currentMode.value / this.currentMode.cashAmount;
2486
+ if ((0, _isInteger2.default)(v1)) {
2487
+ this.currentMode.steadCashIntegral = Math.floor(this.currentMode.value / this.currentMode.cashAmount) * this.currentMode.perIntegral;
2488
+ } else {
2489
+ this.currentMode.errinfo = '\u8BF7\u6309\u7167\u79EF\u5206\u62B5\u73B0\u89C4\u5219' + this.currentMode.perIntegral + '\u79EF\u5206\u62B5\u7528' + this.currentMode.cashAmount + '\u5143\u8F93\u5165\u91D1\u989D';
2490
+ }
2491
+ }
2492
+ }
1867
2493
  }
1868
2494
  }, {
1869
2495
  key: 'calcMemberBalance',
1870
2496
  value: function calcMemberBalance() {
1871
- this.currentMode.balance = this.currentMode.member.rawbalance - this.currentMode.value;
2497
+ this.currentMode.balance = this.currentMode.rawbalance - this.currentMode.value;
1872
2498
  }
1873
2499
  }, {
1874
2500
  key: 'setPaymodes',
1875
2501
  value: function () {
1876
- var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(type, isIntegralExchange) {
1877
- var _this15 = this;
2502
+ var _ref31 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(type, isIntegralExchange) {
2503
+ var _this19 = this;
1878
2504
 
1879
- var _enumController$getEn18, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
2505
+ var _ref32, isHorizontalPad, isHorizontalSunMi, isMobileEnvironment, _enumController$getEn21, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
1880
2506
 
1881
- return _regenerator2.default.wrap(function _callee7$(_context7) {
2507
+ return _regenerator2.default.wrap(function _callee15$(_context15) {
1882
2508
  while (1) {
1883
- switch (_context7.prev = _context7.next) {
2509
+ switch (_context15.prev = _context15.next) {
1884
2510
  case 0:
1885
- _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn18.settleStyleType, PayStyle = _enumController$getEn18.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;
1886
2515
  memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
1887
2516
  param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
1888
- _context7.next = 5;
2517
+ _context15.next = 7;
1889
2518
  return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
1890
2519
 
1891
- case 5:
1892
- modes = _context7.sent;
2520
+ case 7:
2521
+ modes = _context15.sent;
1893
2522
 
1894
2523
  if (modes) {
1895
2524
  (0, _mobx.runInAction)(function () {
1896
2525
  var paymodes = [];
1897
- (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) {
1898
2531
  //产品需求确认会员储值卡结算方式前端展示统一调整为“储值卡" tuzha by 2020-07-08
1899
-
1900
2532
  if (mode.Code == PayStyle.hyczk) {
1901
- mode.Name = '储值余额';
2533
+ mode.Name = '储值卡';
1902
2534
  }
1903
2535
  paymodes.push({
1904
2536
  name: mode.Name,
@@ -1911,24 +2543,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
1911
2543
  idBankAccount: mode.IdBankAccount,
1912
2544
  exchangeRate: mode.Currency ? mode.Currency.ExchangeRate : 1,
1913
2545
  idCurrency: mode.Currency ? mode.Currency.ID : -1,
1914
- calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88"
2546
+ calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88",
2547
+ thridPayment: mode.ThirdPaymentInfo
1915
2548
  });
1916
2549
  });
1917
- _this15.paymodes = paymodes;
1918
- //modes.QuickSettleStyles
2550
+ _this19.paymodes = paymodes;
1919
2551
  });
1920
2552
  }
1921
2553
 
1922
- case 7:
2554
+ case 9:
1923
2555
  case 'end':
1924
- return _context7.stop();
2556
+ return _context15.stop();
1925
2557
  }
1926
2558
  }
1927
- }, _callee7, this);
2559
+ }, _callee15, this);
1928
2560
  }));
1929
2561
 
1930
- function setPaymodes(_x5, _x6) {
1931
- return _ref22.apply(this, arguments);
2562
+ function setPaymodes(_x12, _x13) {
2563
+ return _ref31.apply(this, arguments);
1932
2564
  }
1933
2565
 
1934
2566
  return setPaymodes;
@@ -1945,49 +2577,60 @@ var PayMode = exports.PayMode = (_class3 = function () {
1945
2577
  }
1946
2578
  }]);
1947
2579
  return PayMode;
1948
- }(), (_descriptor3 = _applyDecoratedDescriptor(_class3.prototype, 'currentFocus', [_mobx.observable], {
2580
+ }(), (_descriptor5 = _applyDecoratedDescriptor(_class3.prototype, 'currentFocus', [_mobx.observable], {
1949
2581
  enumerable: true,
1950
2582
  initializer: function initializer() {
1951
2583
  return "";
1952
2584
  }
1953
- }), _descriptor4 = _applyDecoratedDescriptor(_class3.prototype, 'received', [_mobx.observable], {
2585
+ }), _descriptor6 = _applyDecoratedDescriptor(_class3.prototype, 'received', [_mobx.observable], {
1954
2586
  enumerable: true,
1955
2587
  initializer: function initializer() {
1956
2588
  return 0;
1957
2589
  }
1958
- }), _descriptor5 = _applyDecoratedDescriptor(_class3.prototype, 'receivable', [_mobx.observable], {
2590
+ }), _descriptor7 = _applyDecoratedDescriptor(_class3.prototype, 'receivable', [_mobx.observable], {
1959
2591
  enumerable: true,
1960
2592
  initializer: function initializer() {
1961
2593
  return 0;
1962
2594
  }
1963
- }), _descriptor6 = _applyDecoratedDescriptor(_class3.prototype, 'paymodes', [_mobx.observable], {
2595
+ }), _descriptor8 = _applyDecoratedDescriptor(_class3.prototype, 'paymodes', [_mobx.observable], {
1964
2596
  enumerable: true,
1965
2597
  initializer: function initializer() {
1966
2598
  return [];
1967
2599
  }
1968
- }), _descriptor7 = _applyDecoratedDescriptor(_class3.prototype, 'thePaymodes', [_mobx.observable], {
2600
+ }), _descriptor9 = _applyDecoratedDescriptor(_class3.prototype, 'thePaymodes', [_mobx.observable], {
1969
2601
  enumerable: true,
1970
2602
  initializer: function initializer() {
1971
2603
  return [];
1972
2604
  }
1973
- }), _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), _descriptor8 = _applyDecoratedDescriptor(_class3.prototype, 'calcCheckList', [_mobx.action], {
2605
+ }), _descriptor10 = _applyDecoratedDescriptor(_class3.prototype, 'storageCardNo', [_mobx.observable], {
1974
2606
  enumerable: true,
1975
2607
  initializer: function initializer() {
1976
- var _this16 = this;
2608
+ return null;
2609
+ }
2610
+ }), _descriptor11 = _applyDecoratedDescriptor(_class3.prototype, 'balance', [_mobx.observable], {
2611
+ enumerable: true,
2612
+ initializer: function initializer() {
2613
+ return null;
2614
+ }
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], {
2616
+ enumerable: true,
2617
+ initializer: function initializer() {
2618
+ var _this20 = this;
1977
2619
 
1978
2620
  return function () {
1979
- _this16.checkList = [];
2621
+ _this20.checkList = [];
1980
2622
  };
1981
2623
  }
1982
- }), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype), _descriptor9 = _applyDecoratedDescriptor(_class3.prototype, 'setCouponNum', [_mobx.action], {
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], {
1983
2625
  enumerable: true,
1984
2626
  initializer: function initializer() {
1985
- var _this17 = this;
2627
+ var _this21 = this;
1986
2628
 
1987
2629
  return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
1988
- _this17.currentMode.djqs.forEach(function (ele) {
2630
+ _this21.currentMode.djqs.forEach(function (ele) {
1989
2631
  if (ele.id === id) {
1990
- promoMethodEnum == "CASH_COUPON" ? ele.amount = nominalAmount : ele.amount = promoDiscount;
2632
+ ele.amount = promoDiscount;
2633
+ promoMethodEnum == "CASH_COUPON" && (ele.nominalAmount = nominalAmount);
1991
2634
  ele.couponCategoryEnum = couponNum;
1992
2635
  var IsEnable = ele.couponCategoryEnum === 'RIGUP' || ele.couponCategoryEnum === 'UN_MATCH' || ele.couponCategoryEnum === "PREPARING" || ele.couponCategoryEnum === 'PROMO_LIMITED' || ele.couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
1993
2636
  ele.IsEnable = IsEnable;
@@ -1995,16 +2638,17 @@ var PayMode = exports.PayMode = (_class3 = function () {
1995
2638
  });
1996
2639
  };
1997
2640
  }
1998
- }), _descriptor10 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
2641
+ }), _descriptor14 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
1999
2642
  enumerable: true,
2000
2643
  initializer: function initializer() {
2001
- var _this18 = this;
2644
+ var _this22 = this;
2002
2645
 
2003
- 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) {
2004
2647
  var djq = {
2005
2648
  promoCouponCode: promoCouponCode,
2006
2649
  name: name,
2007
2650
  IsEnable: IsEnable,
2651
+ nominalAmount: nominalAmount,
2008
2652
  amount: amount,
2009
2653
  doorsill: doorsill,
2010
2654
  LastTS: LastTS,
@@ -2020,25 +2664,25 @@ var PayMode = exports.PayMode = (_class3 = function () {
2020
2664
  couponCategoryEnum: couponCategoryEnum,
2021
2665
  id: id
2022
2666
  };
2023
- _this18.currentMode.djqs.push(djq);
2667
+ _this22.currentMode.djqs.push(djq);
2024
2668
  };
2025
2669
  }
2026
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);
2027
2671
  var Member = exports.Member = (_class5 = function () {
2028
2672
  function Member(m) {
2029
- var _this19 = this;
2673
+ var _this23 = this;
2030
2674
 
2031
2675
  (0, _classCallCheck3.default)(this, Member);
2032
2676
 
2033
- _initDefineProp(this, 'cardNo', _descriptor11, this);
2677
+ _initDefineProp(this, 'cardNo', _descriptor15, this);
2034
2678
 
2035
- _initDefineProp(this, 'balance', _descriptor12, this);
2679
+ _initDefineProp(this, 'balance', _descriptor16, this);
2036
2680
 
2037
- _initDefineProp(this, 'exchangable', _descriptor13, this);
2681
+ _initDefineProp(this, 'exchangable', _descriptor17, this);
2038
2682
 
2039
- _initDefineProp(this, 'MeStorageCardId', _descriptor14, this);
2683
+ _initDefineProp(this, 'meStorageCardId', _descriptor18, this);
2040
2684
 
2041
- _initDefineProp(this, 'StorageCardNo', _descriptor15, this);
2685
+ _initDefineProp(this, 'storageCardNo', _descriptor19, this);
2042
2686
 
2043
2687
  if (m) {
2044
2688
  this.id = m.ID;
@@ -2049,17 +2693,15 @@ var Member = exports.Member = (_class5 = function () {
2049
2693
  return key == 'canusedbalancestorage';
2050
2694
  });
2051
2695
 
2052
- var _ref23 = _mutantsUtil.platform || {},
2053
- isNewRetailBCPos = _ref23.isNewRetailBCPos;
2696
+ var _ref33 = _mutantsUtil.platform || {},
2697
+ isNewRetailBCPos = _ref33.isNewRetailBCPos;
2054
2698
 
2055
- m.StorageCardNo && (this.StorageCardNo = m.StorageCardNo);
2056
- m.MeStorageCardId && (this.MeStorageCardId = m.MeStorageCardId);
2057
2699
  (0, _mobx.runInAction)(function () {
2058
- _this19.cardNo = m.CardCode;
2700
+ _this23.cardNo = m.CardCode;
2059
2701
  if (index >= 0) {
2060
- _this19.balance = parseFloat(m.DynamicPropertyValues[index]);
2702
+ _this23.balance = parseFloat(m.DynamicPropertyValues[index]);
2061
2703
  } else {
2062
- _this19.balance = _this19.rawbalance;
2704
+ _this23.balance = _this23.rawbalance;
2063
2705
  }
2064
2706
  });
2065
2707
  this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;
@@ -2079,32 +2721,22 @@ var Member = exports.Member = (_class5 = function () {
2079
2721
  this.cardNo = v;
2080
2722
  this.id = null;
2081
2723
  }
2082
- }, {
2083
- key: 'setMeStorageCardId',
2084
- value: function setMeStorageCardId(v) {
2085
- this.MeStorageCardId = v;
2086
- }
2087
- }, {
2088
- key: 'setStorageCardNo',
2089
- value: function setStorageCardNo(v) {
2090
- this.StorageCardNo = v;
2091
- }
2092
2724
  }]);
2093
2725
  return Member;
2094
- }(), (_descriptor11 = _applyDecoratedDescriptor(_class5.prototype, 'cardNo', [_mobx.observable], {
2726
+ }(), (_descriptor15 = _applyDecoratedDescriptor(_class5.prototype, 'cardNo', [_mobx.observable], {
2095
2727
  enumerable: true,
2096
2728
  initializer: null
2097
- }), _descriptor12 = _applyDecoratedDescriptor(_class5.prototype, 'balance', [_mobx.observable], {
2729
+ }), _descriptor16 = _applyDecoratedDescriptor(_class5.prototype, 'balance', [_mobx.observable], {
2098
2730
  enumerable: true,
2099
2731
  initializer: null
2100
- }), _descriptor13 = _applyDecoratedDescriptor(_class5.prototype, 'exchangable', [_mobx.observable], {
2732
+ }), _descriptor17 = _applyDecoratedDescriptor(_class5.prototype, 'exchangable', [_mobx.observable], {
2101
2733
  enumerable: true,
2102
2734
  initializer: null
2103
- }), _descriptor14 = _applyDecoratedDescriptor(_class5.prototype, 'MeStorageCardId', [_mobx.observable], {
2735
+ }), _descriptor18 = _applyDecoratedDescriptor(_class5.prototype, 'meStorageCardId', [_mobx.observable], {
2104
2736
  enumerable: true,
2105
2737
  initializer: null
2106
- }), _descriptor15 = _applyDecoratedDescriptor(_class5.prototype, 'StorageCardNo', [_mobx.observable], {
2738
+ }), _descriptor19 = _applyDecoratedDescriptor(_class5.prototype, 'storageCardNo', [_mobx.observable], {
2107
2739
  enumerable: true,
2108
2740
  initializer: null
2109
- }), _applyDecoratedDescriptor(_class5.prototype, 'setExchangable', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setExchangable'), _class5.prototype), _applyDecoratedDescriptor(_class5.prototype, 'setCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setCardNo'), _class5.prototype), _applyDecoratedDescriptor(_class5.prototype, 'setMeStorageCardId', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setMeStorageCardId'), _class5.prototype), _applyDecoratedDescriptor(_class5.prototype, 'setStorageCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setStorageCardNo'), _class5.prototype)), _class5);
2741
+ }), _applyDecoratedDescriptor(_class5.prototype, 'setExchangable', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setExchangable'), _class5.prototype), _applyDecoratedDescriptor(_class5.prototype, 'setCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setCardNo'), _class5.prototype)), _class5);
2110
2742
  //# sourceMappingURL=settlementStore.js.map