tplus-components-touch 3.27.29 → 3.27.33

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 (47) hide show
  1. package/dist/components/billSearch/index.js +163 -20
  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/progressState/EmptyAndErrorView.js +4 -3
  21. package/dist/components/progressState/EmptyAndErrorView.js.map +1 -1
  22. package/dist/components/progressState/ProgressState.js +2 -1
  23. package/dist/components/progressState/ProgressState.js.map +1 -1
  24. package/dist/components/settlement/moreCzkTable/index.js +156 -0
  25. package/dist/components/settlement/moreCzkTable/index.js.map +1 -0
  26. package/dist/components/settlement/moreCzkTable/style.less +7 -0
  27. package/dist/components/settlement/settlement.js +764 -510
  28. package/dist/components/settlement/settlement.js.map +1 -1
  29. package/dist/components/settlement/settlement.less +77 -7
  30. package/dist/components/settlement/settlementStore.js +559 -318
  31. package/dist/components/settlement/settlementStore.js.map +1 -1
  32. package/dist/components/ticon/iconfont/demo_index.html +26 -3
  33. package/dist/components/ticon/iconfont/iconfont.css +7 -3
  34. package/dist/components/ticon/iconfont/iconfont.js +6 -6
  35. package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
  36. package/dist/components/ticon/iconfont/iconfont.json +7 -0
  37. package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
  38. package/dist/components/ticon/iconfont/iconfont.woff +0 -0
  39. package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
  40. package/dist/components/touchScroll/index.js +6 -2
  41. package/dist/components/touchScroll/index.js.map +1 -1
  42. package/dist/components/touchTable/index.js +7 -5
  43. package/dist/components/touchTable/index.js.map +1 -1
  44. package/dist/components/touchTable/index.less +20 -13
  45. package/dist/index.js +14 -2
  46. package/dist/index.js.map +1 -1
  47. package/package.json +1 -1
@@ -41,7 +41,7 @@ var _createClass2 = require('babel-runtime/helpers/createClass');
41
41
 
42
42
  var _createClass3 = _interopRequireDefault(_createClass2);
43
43
 
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;
44
+ 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
45
 
46
46
  var _mobx = require('mobx');
47
47
 
@@ -178,6 +178,46 @@ var SettlementStore = (_class = function () {
178
178
 
179
179
  _initDefineProp(this, 'updateMemberInfo', _descriptor2, this);
180
180
 
181
+ _initDefineProp(this, 'updateCurrentMode', _descriptor3, this);
182
+
183
+ _initDefineProp(this, 'updateCardInfo', _descriptor4, this);
184
+
185
+ this.handleCzkData = function (m) {
186
+ if (!m || !m.StorageCardNo) {
187
+ (0, _mobx.runInAction)(function () {
188
+ _this2.paymode.currentMode.errinfo = "无效的会员卡号";
189
+ });
190
+ } else {
191
+ (0, _mobx.runInAction)(function () {
192
+ _this2.paymode.currentMode.errinfo = "";
193
+ _this2.paymode.currentMode.memberId = m.ID;
194
+ _this2.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this2.brefund ? _this2.paymode.receivable : Math.max(_this2.paymode.receivable, 0));
195
+ _this2.updateEvent();
196
+ var message = '';
197
+ var sum = (0, _reduce3.default)(_this2.paymode.thePaymodes, function (total, cur) {
198
+ return total + cur.value;
199
+ }, 0);
200
+ // 对于卡不用判断会员的一些信息
201
+ // if (global.CheckMemberStorageProcessorBlock ) {
202
+ // message= CheckMemberStorageProcessorBlock.execute(m);
203
+ // }
204
+ if (!String.isNullOrEmpty(message)) {
205
+ _this2.paymode.currentMode.errinfo = message;
206
+ } else if (_this2.checkReceived(_this2.paymode.currentMode, "balance")) {
207
+ _this2.paymode.currentMode.errinfo = "余额不足";
208
+ } else if (_this2.paymode.amount > 0 && parseFloat(_this2.paymode.amount) !== sum && _this2.paymode.currentMode.value == 0) {
209
+ _this2.paymode.currentMode.errinfo = "实收金额必须录入";
210
+ } else {
211
+ // 查询成功后将焦点移入下一个输入框
212
+ setTimeout(function () {
213
+ var nextInput = document.querySelector('.czk .received .input');
214
+ nextInput && nextInput.select();
215
+ }, 300);
216
+ }
217
+ });
218
+ }
219
+ };
220
+
181
221
  this.getCouponList = function (coupon_code) {
182
222
  var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
183
223
  PayStyle = _enumController$getEn.PayStyle,
@@ -429,7 +469,7 @@ var SettlementStore = (_class = function () {
429
469
  }
430
470
  }, {
431
471
  key: 'init',
432
- value: function init(context, amounthandler, datasource, storeinfo, bquick, amount, type, data) {
472
+ value: function init(context, amounthandler, datasource, storeinfo, bquick, amount, type, data, payModeKey) {
433
473
  var _this3 = this;
434
474
 
435
475
  this.newStyle = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('voucherDefaultPosMode') == 'voucher';
@@ -445,9 +485,15 @@ var SettlementStore = (_class = function () {
445
485
  if (global.DealSingleRowAmountSettingProcessorBlock) {
446
486
  global.DealSingleRowAmountSettingProcessorBlock.execute(_this3.dto);
447
487
  }
488
+
489
+ var _enumController$getEn4 = _mutantsUtil.enumController.getEnumOj(),
490
+ PayStyle = _enumController$getEn4.PayStyle;
491
+
492
+ var isQuickCash = bquick && payModeKey == PayStyle.xianjin;
493
+
448
494
  // 成交金额抹零
449
495
  if (global.DealAmountSettingProcessorBlock) {
450
- global.DealAmountSettingProcessorBlock.execute(_this3.dto);
496
+ global.DealAmountSettingProcessorBlock.execute(_this3.dto, isQuickCash);
451
497
  }
452
498
  });
453
499
  // this.member=context.stores && context.stores.memberStore && context.stores.memberStore.member;
@@ -535,8 +581,8 @@ var SettlementStore = (_class = function () {
535
581
  value: function initByOriginReturn() {
536
582
  var _this5 = this;
537
583
 
538
- var _enumController$getEn4 = _mutantsUtil.enumController.getEnumOj(),
539
- PayStyle = _enumController$getEn4.PayStyle;
584
+ var _enumController$getEn5 = _mutantsUtil.enumController.getEnumOj(),
585
+ PayStyle = _enumController$getEn5.PayStyle;
540
586
 
541
587
  var _ref6 = _mutantsUtil.platform || {},
542
588
  isNewRetailBCPos = _ref6.isNewRetailBCPos;
@@ -583,13 +629,23 @@ var SettlementStore = (_class = function () {
583
629
  }
584
630
  });
585
631
  (0, _each3.default)(this.dto.RetailStorageDetails, function (detail) {
586
- var balanceAmount = detail.Member.BalanceStorage;
587
- balanceAmount = balanceAmount - detail.StoragePaymentAmount;
632
+ var balanceAmount = null;
633
+ var storageCardNo = null;
634
+ var meStorageCardId = null;
635
+ detail.DynamicPropertyKeys.forEach(function (ele, index) {
636
+ if (ele === "mestoragecard") {
637
+ balanceAmount = detail.DynamicPropertyValues[index].BalanceStorage - detail.StoragePaymentAmount;
638
+ storageCardNo = detail.DynamicPropertyValues[index].StorageCardNo;
639
+ meStorageCardId = detail.DynamicPropertyValues[index].MeStorageCardId;
640
+ }
641
+ });
588
642
  var newmode = (0, _extends3.default)({}, _this5.genNewMode(PayStyle.hyczk, false, detail.StoragePaymentAmount), {
589
- member: new Member(detail.Member),
590
- authCode: detail.Password,
643
+ member: new Member(detail.Member ? detail.Member : null),
644
+ authCode: detail.Password ? detail.Password : null,
591
645
  balance: balanceAmount,
592
- boriginReturn: true
646
+ boriginReturn: true,
647
+ meStorageCardId: meStorageCardId ? meStorageCardId : detail.MeStorageCardId,
648
+ storageCardNo: storageCardNo ? storageCardNo : detail.StorageCardNo
593
649
  });
594
650
  _this5.paymode.thePaymodes.push(newmode);
595
651
  });
@@ -604,7 +660,7 @@ var SettlementStore = (_class = function () {
604
660
  }, {
605
661
  key: 'quickSettle',
606
662
  value: function quickSettle(key) {
607
- this.addPay(key);
663
+ this.addPay(key, null, true);
608
664
  }
609
665
 
610
666
  //outer call
@@ -615,8 +671,8 @@ var SettlementStore = (_class = function () {
615
671
  value: function changeFocusAndAddPay(type, bookType) {
616
672
  var _this6 = this;
617
673
 
618
- var _enumController$getEn5 = _mutantsUtil.enumController.getEnumOj(),
619
- PayStyle = _enumController$getEn5.PayStyle;
674
+ var _enumController$getEn6 = _mutantsUtil.enumController.getEnumOj(),
675
+ PayStyle = _enumController$getEn6.PayStyle;
620
676
 
621
677
  this.paymode.currentFocus = type;
622
678
  if (this.paymode.currentMode) {
@@ -633,7 +689,7 @@ var SettlementStore = (_class = function () {
633
689
 
634
690
  //抵现积分
635
691
  (0, _tplusApi.tApi)({ IntegralSteadCashParams: {
636
- Idmember: this.paymode.currentMode.member.id,
692
+ Idmember: this.paymode.currentMode.memberId,
637
693
  TotalTaxAmount: this.paymode.amount,
638
694
  BalanceTaxAmount: this.paymode.currentMode.value
639
695
  } }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
@@ -662,7 +718,6 @@ var SettlementStore = (_class = function () {
662
718
 
663
719
  if ((0, _trim3.default)(v) === "") {
664
720
  (0, _mobx.runInAction)(function () {
665
- _this7.paymode.currentMode.member = new Member(null);
666
721
  _this7.paymode.currentMode.errinfo = "请输入储值卡";
667
722
  });
668
723
  return;
@@ -676,66 +731,98 @@ var SettlementStore = (_class = function () {
676
731
  var address = '';
677
732
  if (isNewRetailBCPos) {
678
733
  // address = '/member/memberProfile/FindByStorageCode/'+v;
679
- address = '/member/MeMemberWallet/FindByStorageCode';
680
- return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function (result) {
681
- var data = result.data;
682
- var m = data;
683
-
684
- var _ref9 = _mutantsUtil.platform || {},
685
- isNewRetailBCPos = _ref9.isNewRetailBCPos;
686
-
687
- if (isNewRetailBCPos) {
688
- _this7.paymode && _this7.paymode.currentMode.member.setMeStorageCardId(m.MeStorageCardId);
689
- _this7.paymode && _this7.paymode.currentMode.member.setStorageCardNo(m.StorageCardNo);
690
- _this7.paymode && (_this7.paymode.currentMode.MeStorageCardId = m.MeStorageCardId);
691
- _this7.paymode && (_this7.paymode.currentMode.StorageCardNo = m.StorageCardNo);
692
- }
693
- if (!m || !m.ID) {
694
- (0, _mobx.runInAction)(function () {
695
- _this7.paymode.currentMode.errinfo = "无效的会员卡号";
696
- });
697
- } else {
698
- (0, _mobx.runInAction)(function () {
699
- _this7.paymode.currentMode.errinfo = "";
700
- _this7.paymode.currentMode.member = new Member(m);
701
- _this7.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this7.brefund ? _this7.paymode.receivable : Math.max(_this7.paymode.receivable, 0));
702
- _this7.updateEvent();
703
- var message = '';
704
- var sum = (0, _reduce3.default)(_this7.paymode.thePaymodes, function (total, cur) {
705
- return total + cur.value;
706
- }, 0);
707
- if (global.CheckMemberStorageProcessorBlock) {
708
- message = CheckMemberStorageProcessorBlock.execute(m);
709
- }
710
- if (!String.isNullOrEmpty(message)) {
711
- _this7.paymode.currentMode.errinfo = message;
712
- } else if (_this7.checkReceived(_this7.paymode.currentMode, "balance")) {
713
- _this7.paymode.currentMode.errinfo = "余额不足";
714
- } else if (_this7.paymode.amount > 0 && parseFloat(_this7.paymode.amount) !== sum && _this7.paymode.currentMode.value == 0) {
715
- _this7.paymode.currentMode.errinfo = "实收金额必须录入";
716
- } else {
717
- // 查询成功后将焦点移入下一个输入框
718
- var nextInput = document.querySelector('.czk .received .input');
719
- nextInput && nextInput.select();
734
+ address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + v + '/' + true;
735
+ return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function () {
736
+ var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(result) {
737
+ var data, m;
738
+ return _regenerator2.default.wrap(function _callee2$(_context2) {
739
+ while (1) {
740
+ switch (_context2.prev = _context2.next) {
741
+ case 0:
742
+ data = result.data;
743
+ m = data && data.length && data[0];
744
+
745
+ if (!(result && result.data.length)) {
746
+ _context2.next = 25;
747
+ break;
748
+ }
749
+
750
+ if (!(result.data.length === 1)) {
751
+ _context2.next = 14;
752
+ break;
753
+ }
754
+
755
+ if (!(m.CardTypeEnum === 'BALANCE_CARD')) {
756
+ _context2.next = 10;
757
+ break;
758
+ }
759
+
760
+ _this7.paymode.updateCardInfo(m);
761
+ _this7.handleCzkData(m);
762
+ return _context2.abrupt('return', result.data);
763
+
764
+ case 10:
765
+ _context2.next = 12;
766
+ return (0, _tplusApi.ccApi)({ dto: _this7.dto, meStorageCardId: m.MeStorageCardId }, '/retail/RetailPos/validateRetailStorageCard', false, false).then(function (result1) {
767
+ var data1 = result1.data ? JSON.parse(result1.data)[0] : {};
768
+ if (data1.enable) {
769
+ _this7.paymode.updateCardInfo(m);
770
+ _this7.handleCzkData(m);
771
+ return result1.data;
772
+ } else {
773
+ _message2.default.warn(data1.disableReason);
774
+ }
775
+ });
776
+
777
+ case 12:
778
+ _context2.next = 25;
779
+ break;
780
+
781
+ case 14:
782
+ if (!(result.data && result.data.length === 1)) {
783
+ _context2.next = 19;
784
+ break;
785
+ }
786
+
787
+ _this7.paymode.updateCardInfo(result.data[0]);
788
+ return _context2.abrupt('return', result.data);
789
+
790
+ case 19:
791
+ if (!(result.data && result.data.length > 1)) {
792
+ _context2.next = 23;
793
+ break;
794
+ }
795
+
796
+ return _context2.abrupt('return', result.data);
797
+
798
+ case 23:
799
+ _message2.default.warn('没有可用储值卡!');
800
+ return _context2.abrupt('return', false);
801
+
802
+ case 25:
803
+ case 'end':
804
+ return _context2.stop();
805
+ }
720
806
  }
721
- });
722
- }
723
- });
807
+ }, _callee2, _this7);
808
+ }));
809
+
810
+ return function (_x2) {
811
+ return _ref9.apply(this, arguments);
812
+ };
813
+ }()
814
+ // result.data.forEach((m) => {
815
+ // if (m.CardTypeEnum === 'BALANCE_CARD') {
816
+ // // 会员概念改为卡,把这些字段都放开
817
+ // this.paymode.updateCardInfo(m);
818
+ // }
819
+ // })
820
+ );
724
821
  } else {
725
822
  address = 'AA.DR.newRetailMember.SearchMember';
726
823
  return (0, _tplusApi.tApi)({ SearchParams: { Key: v, IsSingleMember: true, IdStore: IdStore, StoreCode: StoreCode } }, address, false, false).then(function (result) {
727
824
  var data = JSON.parse(result.Data);
728
825
  var m = data && data.length > 0 && data[0];
729
-
730
- var _ref10 = _mutantsUtil.platform || {},
731
- isNewRetailBCPos = _ref10.isNewRetailBCPos;
732
-
733
- if (isNewRetailBCPos) {
734
- _this7.paymode && _this7.paymode.currentMode.member.setMeStorageCardId(m.MeStorageCardId);
735
- _this7.paymode && _this7.paymode.currentMode.member.setStorageCardNo(m.StorageCardNo);
736
- _this7.paymode && (_this7.paymode.currentMode.MeStorageCardId = m.MeStorageCardId);
737
- _this7.paymode && (_this7.paymode.currentMode.StorageCardNo = m.StorageCardNo);
738
- }
739
826
  if (!m || !m.ID) {
740
827
  (0, _mobx.runInAction)(function () {
741
828
  _this7.paymode.currentMode.errinfo = "无效的会员卡号";
@@ -797,8 +884,8 @@ var SettlementStore = (_class = function () {
797
884
  }, {
798
885
  key: 'setCurrentMode',
799
886
  value: function setCurrentMode(id, type, append) {
800
- var _enumController$getEn6 = _mutantsUtil.enumController.getEnumOj(),
801
- PayStyle = _enumController$getEn6.PayStyle;
887
+ var _enumController$getEn7 = _mutantsUtil.enumController.getEnumOj(),
888
+ PayStyle = _enumController$getEn7.PayStyle;
802
889
 
803
890
  var mode = (0, _find3.default)(this.paymode.thePaymodes, { paymethodId: id });
804
891
  if (mode) {
@@ -816,8 +903,8 @@ var SettlementStore = (_class = function () {
816
903
  value: function afterSetCurrentMode(type) {
817
904
  var _this8 = this;
818
905
 
819
- var _enumController$getEn7 = _mutantsUtil.enumController.getEnumOj(),
820
- PayStyle = _enumController$getEn7.PayStyle;
906
+ var _enumController$getEn8 = _mutantsUtil.enumController.getEnumOj(),
907
+ PayStyle = _enumController$getEn8.PayStyle;
821
908
 
822
909
  if (type == PayStyle.djq) {
823
910
  this.paymode.calcDjqValue();
@@ -831,7 +918,7 @@ var SettlementStore = (_class = function () {
831
918
  }
832
919
 
833
920
  (0, _tplusApi.tApi)({ IntegralSteadCashParams: {
834
- Idmember: this.paymode.currentMode.member.id,
921
+ Idmember: this.paymode.currentMode.memberId,
835
922
  TotalTaxAmount: this.paymode.amount,
836
923
  BalanceTaxAmount: this.paymode.amount
837
924
  } }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
@@ -852,12 +939,13 @@ var SettlementStore = (_class = function () {
852
939
  }
853
940
  }, {
854
941
  key: 'genNewMode',
855
- value: function genNewMode(type, notwithm, v) {
856
- var _enumController$getEn8 = _mutantsUtil.enumController.getEnumOj(),
857
- PayStyle = _enumController$getEn8.PayStyle;
942
+ value: function genNewMode(type, notwithm, v, isQuick) {
943
+ var _enumController$getEn9 = _mutantsUtil.enumController.getEnumOj(),
944
+ PayStyle = _enumController$getEn9.PayStyle;
858
945
 
859
946
  var value = (0, _utils.getFixedNumber)(v || (this.brefund ? this.paymode.receivable : Math.max(this.paymode.receivable, 0)));
860
947
  var themode = (0, _find3.default)(this.paymode.paymodes, { 'paymentType': type });
948
+ var memberId = this.member && this.member.ID ? this.member.ID : null;
861
949
  var mode = (0, _mobx.observable)({
862
950
  paymethodId: this.paymode.counter,
863
951
  name: themode.name,
@@ -869,6 +957,8 @@ var SettlementStore = (_class = function () {
869
957
  order: this.paymode.thePaymodes.length + 1,
870
958
  paymentType: type,
871
959
  djqs: [],
960
+ card: null,
961
+ memberId: !notwithm ? memberId : null,
872
962
  member: new Member(!notwithm ? this.member : null),
873
963
  authCode: '',
874
964
  steadCashIntegral: null,
@@ -877,9 +967,9 @@ var SettlementStore = (_class = function () {
877
967
  virtualPay: themode.virtualPay
878
968
  });
879
969
  if (type == PayStyle.hyczk) {
880
- if (!mode.member.id || !mode.member.StorageCardNo) {
970
+ if (!mode.storageCardNo) {
881
971
  (0, _mobx.runInAction)(function () {
882
- mode.errinfo = '未录入储值卡';
972
+ mode.errinfo = '未录入手机号或储值卡号';
883
973
  });
884
974
  } else if (this.checkReceived(mode, "balance")) {
885
975
  (0, _mobx.runInAction)(function () {
@@ -898,8 +988,8 @@ var SettlementStore = (_class = function () {
898
988
  value: function setMaxAmount(type, mode) {
899
989
  var _this9 = this;
900
990
 
901
- var _enumController$getEn9 = _mutantsUtil.enumController.getEnumOj(),
902
- PayStyle = _enumController$getEn9.PayStyle;
991
+ var _enumController$getEn10 = _mutantsUtil.enumController.getEnumOj(),
992
+ PayStyle = _enumController$getEn10.PayStyle;
903
993
 
904
994
  var sum = 0;
905
995
  if (type == PayStyle.hyczk) {
@@ -918,7 +1008,17 @@ var SettlementStore = (_class = function () {
918
1008
 
919
1009
  this.amountHandler && this.amountHandler(type).then(function () {
920
1010
  (0, _mobx.runInAction)(function () {
921
- mode.maxamount = (0, _utils.getFixedNumber)(Math.Minus(_this9.context.viewModel.getViewItem('Voucher').availableAmount, sum));
1011
+
1012
+ //预售储值结算应包含运费
1013
+ var BuyerPayFreight = _this9.dto.BuyerPayFreight;
1014
+ var DistributionMode = _this9.dto.DistributionMode;
1015
+ var value = 0;
1016
+ if ((DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && BuyerPayFreight && BuyerPayFreight > 0) {
1017
+ value = (0, _utils.getFixedNumber)(parseFloat(_this9.context.viewModel.getViewItem('Voucher').availableAmount) + parseFloat(BuyerPayFreight));
1018
+ } else {
1019
+ value = _this9.context.viewModel.getViewItem('Voucher').availableAmount;
1020
+ }
1021
+ mode.maxamount = (0, _utils.getFixedNumber)(Math.Minus(value, sum));
922
1022
  _this9.updateEvent();
923
1023
  });
924
1024
  });
@@ -975,8 +1075,8 @@ var SettlementStore = (_class = function () {
975
1075
  }, {
976
1076
  key: 'addPayDirectly',
977
1077
  value: function addPayDirectly(pay) {
978
- var _enumController$getEn10 = _mutantsUtil.enumController.getEnumOj(),
979
- PayStyle = _enumController$getEn10.PayStyle;
1078
+ var _enumController$getEn11 = _mutantsUtil.enumController.getEnumOj(),
1079
+ PayStyle = _enumController$getEn11.PayStyle;
980
1080
 
981
1081
  if (!(0, _find3.default)(this.paymode.thePaymodes, { paymethodId: pay.paymethodId })) {
982
1082
  var pos = this.paymode.thePaymodes.length;
@@ -993,9 +1093,9 @@ var SettlementStore = (_class = function () {
993
1093
  }
994
1094
  }, {
995
1095
  key: 'addPay',
996
- value: function addPay(type, bookType) {
997
- var _enumController$getEn11 = _mutantsUtil.enumController.getEnumOj(),
998
- PayStyle = _enumController$getEn11.PayStyle;
1096
+ value: function addPay(type, bookType, isQuick) {
1097
+ var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
1098
+ PayStyle = _enumController$getEn12.PayStyle;
999
1099
 
1000
1100
  var pos = this.paymode.thePaymodes.length;
1001
1101
  if (type == PayStyle.hyczk) {
@@ -1005,14 +1105,15 @@ var SettlementStore = (_class = function () {
1005
1105
  pos = index == -1 ? pos : index + 1;
1006
1106
  }
1007
1107
  // this.paymode.thePaymodes.push(this.genNewMode(type) );
1008
- this.paymode.thePaymodes.splice(pos, 0, this.genNewMode(type, this.newStyle && type == PayStyle.hyczk));
1108
+
1109
+ this.paymode.thePaymodes.splice(pos, 0, this.genNewMode(type, this.newStyle && type == PayStyle.hyczk, undefined, isQuick));
1009
1110
  this.paymode.calcReserved(bookType);
1010
1111
  }
1011
1112
  }, {
1012
1113
  key: 'delPay',
1013
1114
  value: function delPay(index, bookType) {
1014
- var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
1015
- PayStyle = _enumController$getEn12.PayStyle;
1115
+ var _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(),
1116
+ PayStyle = _enumController$getEn13.PayStyle;
1016
1117
 
1017
1118
  (0, _remove3.default)(this.paymode.thePaymodes, function (mode) {
1018
1119
  return mode.paymethodId === index;
@@ -1023,80 +1124,80 @@ var SettlementStore = (_class = function () {
1023
1124
  }, {
1024
1125
  key: 'commit',
1025
1126
  value: function () {
1026
- var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(bTest) {
1027
- var _ref12, isNewRetailBCPos;
1127
+ var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(bTest) {
1128
+ var _ref11, isNewRetailBCPos;
1028
1129
 
1029
- return _regenerator2.default.wrap(function _callee2$(_context2) {
1130
+ return _regenerator2.default.wrap(function _callee3$(_context3) {
1030
1131
  while (1) {
1031
- switch (_context2.prev = _context2.next) {
1132
+ switch (_context3.prev = _context3.next) {
1032
1133
  case 0:
1033
1134
  console.log('settlementStore.commit开始,参数:' + bTest);
1034
1135
 
1035
1136
  if (!bTest) {
1036
- _context2.next = 3;
1137
+ _context3.next = 3;
1037
1138
  break;
1038
1139
  }
1039
1140
 
1040
- return _context2.abrupt('return', _promise2.default.resolve(true));
1141
+ return _context3.abrupt('return', _promise2.default.resolve(true));
1041
1142
 
1042
1143
  case 3:
1043
- _ref12 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref12.isNewRetailBCPos;
1044
- _context2.prev = 4;
1144
+ _ref11 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref11.isNewRetailBCPos;
1145
+ _context3.prev = 4;
1045
1146
 
1046
1147
  if (!(this.type == 1)) {
1047
- _context2.next = 10;
1148
+ _context3.next = 10;
1048
1149
  break;
1049
1150
  }
1050
1151
 
1051
- _context2.next = 8;
1152
+ _context3.next = 8;
1052
1153
  return this.saveMember();
1053
1154
 
1054
1155
  case 8:
1055
- _context2.next = 18;
1156
+ _context3.next = 18;
1056
1157
  break;
1057
1158
 
1058
1159
  case 10:
1059
1160
  if (!isNewRetailBCPos) {
1060
- _context2.next = 13;
1161
+ _context3.next = 13;
1061
1162
  break;
1062
1163
  }
1063
1164
 
1064
- _context2.next = 13;
1165
+ _context3.next = 13;
1065
1166
  return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
1066
1167
 
1067
1168
  case 13:
1068
- _context2.next = 15;
1169
+ _context3.next = 15;
1069
1170
  return this.save();
1070
1171
 
1071
1172
  case 15:
1072
1173
  if (!isNewRetailBCPos) {
1073
- _context2.next = 18;
1174
+ _context3.next = 18;
1074
1175
  break;
1075
1176
  }
1076
1177
 
1077
- _context2.next = 18;
1178
+ _context3.next = 18;
1078
1179
  return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
1079
1180
 
1080
1181
  case 18:
1081
- return _context2.abrupt('return', _promise2.default.resolve(true));
1182
+ return _context3.abrupt('return', _promise2.default.resolve(true));
1082
1183
 
1083
1184
  case 21:
1084
- _context2.prev = 21;
1085
- _context2.t0 = _context2['catch'](4);
1185
+ _context3.prev = 21;
1186
+ _context3.t0 = _context3['catch'](4);
1086
1187
 
1087
- console.error('settlementStore.commit失败,错误信息:' + _context2.t0);
1088
- return _context2.abrupt('return', _promise2.default.resolve(_context2.t0));
1188
+ console.error('settlementStore.commit失败,错误信息:' + _context3.t0);
1189
+ return _context3.abrupt('return', _promise2.default.resolve(_context3.t0));
1089
1190
 
1090
1191
  case 25:
1091
1192
  case 'end':
1092
- return _context2.stop();
1193
+ return _context3.stop();
1093
1194
  }
1094
1195
  }
1095
- }, _callee2, this, [[4, 21]]);
1196
+ }, _callee3, this, [[4, 21]]);
1096
1197
  }));
1097
1198
 
1098
- function commit(_x2) {
1099
- return _ref11.apply(this, arguments);
1199
+ function commit(_x3) {
1200
+ return _ref10.apply(this, arguments);
1100
1201
  }
1101
1202
 
1102
1203
  return commit;
@@ -1112,8 +1213,8 @@ var SettlementStore = (_class = function () {
1112
1213
  value: function saveMember() {
1113
1214
  var _this10 = this;
1114
1215
 
1115
- var _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(),
1116
- PayStyle = _enumController$getEn13.PayStyle;
1216
+ var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
1217
+ PayStyle = _enumController$getEn14.PayStyle;
1117
1218
 
1118
1219
  (0, _mobx.runInAction)(function () {
1119
1220
  _this10.dto.StorageMutiSettleDetails = [];
@@ -1154,23 +1255,22 @@ var SettlementStore = (_class = function () {
1154
1255
  }, {
1155
1256
  key: 'save',
1156
1257
  value: function () {
1157
- var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
1258
+ var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
1158
1259
  var _this11 = this;
1159
1260
 
1160
- var _enumController$getEn14, PayStyle, _ref15, isNewRetailBCPos, IPMSG, RetailTypeEnum, _getLoginInfo2, PreSellOrBook, PercentageWhenBook, _ref16, IdbusiType, DistributionMode, prepaidAmount;
1261
+ var _enumController$getEn15, PayStyle, _ref14, isNewRetailBCPos, IPMSG, RetailTypeEnum, _getLoginInfo2, PreSellOrBook, PercentageWhenBook, _ref15, IdbusiType, DistributionMode, prepaidAmount;
1161
1262
 
1162
- return _regenerator2.default.wrap(function _callee3$(_context3) {
1263
+ return _regenerator2.default.wrap(function _callee4$(_context4) {
1163
1264
  while (1) {
1164
- switch (_context3.prev = _context3.next) {
1265
+ switch (_context4.prev = _context4.next) {
1165
1266
  case 0:
1166
- _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn14.PayStyle;
1267
+ _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn15.PayStyle;
1167
1268
 
1168
1269
  (0, _mobx.runInAction)(function () {
1169
1270
  _this11.dto.RetailPaymentDetails = [];
1170
1271
  _this11.dto.RetailStorageDetails = [];
1171
1272
  _this11.dto.RetailCouponDetails = [];
1172
1273
  var czkSum = 0;
1173
- var Idmember = _this11.dto.Idmember;
1174
1274
  var count = 0;
1175
1275
  var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
1176
1276
  return parseFloat(mode.value) != 0;
@@ -1178,18 +1278,14 @@ var SettlementStore = (_class = function () {
1178
1278
  (0, _each3.default)(thePaymodes, function (mode, index) {
1179
1279
  var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
1180
1280
  if (mode.paymentType == PayStyle.hyczk) {
1181
- if (!Idmember) {
1182
- Idmember = mode.member.id;
1183
- }
1184
1281
  czkSum = Math.Add(czkSum, mode.value);
1185
- var MeStorageCardId = mode.member.MeStorageCardId ? mode.member.MeStorageCardId : _this11.member.MeStorageCardId;
1186
1282
  _this11.dto.RetailStorageDetails.push({
1187
1283
  Code: mode.paymethodId,
1188
- MeStorageCardId: MeStorageCardId,
1284
+ MeStorageCardId: mode.meStorageCardId,
1189
1285
  StoragePaymentAmount: mode.value,
1190
1286
  IsOrigReturn: false,
1191
1287
  BalanceStorage: mode.balance,
1192
- Idmember: mode.member.id,
1288
+ Idmember: mode.memberId,
1193
1289
  DynamicPropertyKeys: [],
1194
1290
  DynamicPropertyValues: [],
1195
1291
  DataSource: { Id: _this11.dataSource },
@@ -1225,7 +1321,7 @@ var SettlementStore = (_class = function () {
1225
1321
  ReductionAmount: djq.amount,
1226
1322
  EnableAmount: djq.doorsill,
1227
1323
  CouponTitle: djq.name,
1228
- IdMember: djq.UMemberID ? mode.member.id : null,
1324
+ IdMember: djq.UMemberID ? mode.memberId : null,
1229
1325
  LastTS: djq.LastTS,
1230
1326
  PromotionId: djq.promoId,
1231
1327
  PromotionRuleId: djq.promoRuleId,
@@ -1237,15 +1333,12 @@ var SettlementStore = (_class = function () {
1237
1333
  }
1238
1334
  });
1239
1335
 
1240
- var _ref14 = _mutantsUtil.platform || {},
1241
- isNewRetailBCPos = _ref14.isNewRetailBCPos;
1336
+ var _ref13 = _mutantsUtil.platform || {},
1337
+ isNewRetailBCPos = _ref13.isNewRetailBCPos;
1242
1338
 
1243
1339
  if (_this11.dto.RetailStorageDetails.length > 0) {
1244
1340
  var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
1245
1341
  if (isNewRetailBCPos) {
1246
- // this.dto.RetailStorageDetails && this.dto.RetailStorageDetails.forEach((value, index) => {
1247
- // value.MeStorageCardId = (mode.MeStorageCardId ? mode.MeStorageCardId : this.member.MeStorageCardId);
1248
- // })
1249
1342
  _this11.dto.RetailPaymentDetails.push({
1250
1343
  Code: _this11.paymode.counter,
1251
1344
  OrigAmount: czkSum,
@@ -1269,15 +1362,14 @@ var SettlementStore = (_class = function () {
1269
1362
  DataSource: { Id: _this11.dataSource }
1270
1363
  });
1271
1364
  }
1272
- _this11.dto.Idmember = Idmember;
1273
1365
  }
1274
1366
  });
1275
- _ref15 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref15.isNewRetailBCPos;
1367
+ _ref14 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref14.isNewRetailBCPos;
1276
1368
 
1277
1369
  console.log('bc_pos\u73AF\u5883:' + isNewRetailBCPos + ',\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
1278
1370
 
1279
1371
  if (!isNewRetailBCPos) {
1280
- _context3.next = 23;
1372
+ _context4.next = 23;
1281
1373
  break;
1282
1374
  }
1283
1375
 
@@ -1289,72 +1381,72 @@ var SettlementStore = (_class = function () {
1289
1381
  }
1290
1382
  RetailTypeEnum = this.dto.IdbusiType == 36 ? "INTEGRAL_EXCHANGE" : "NORMAL";
1291
1383
  _getLoginInfo2 = this.getLoginInfo(), PreSellOrBook = _getLoginInfo2.PreSellOrBook, PercentageWhenBook = _getLoginInfo2.PercentageWhenBook;
1292
- _ref16 = this.dto || {}, IdbusiType = _ref16.IdbusiType, DistributionMode = _ref16.DistributionMode;
1384
+ _ref15 = this.dto || {}, IdbusiType = _ref15.IdbusiType, DistributionMode = _ref15.DistributionMode;
1293
1385
 
1294
1386
  if (IdbusiType == 38 && PreSellOrBook == 'BOOK' && PercentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
1295
- prepaidAmount = this.dto.RetailPaymentDetails.reduce(function (c, item) {
1387
+ prepaidAmount = (0, _utils.getFixedNumber)(this.dto.RetailPaymentDetails.reduce(function (c, item) {
1296
1388
  return c + (item.Amount || 0);
1297
- }, 0);
1389
+ }, 0));
1298
1390
 
1299
1391
  (0, _mobx.runInAction)(function () {
1300
1392
  _this11.dto.PrepaidAmount = prepaidAmount;
1301
1393
  });
1302
1394
  }
1303
- _context3.t1 = this.dto.IdbusiType == 37;
1395
+ _context4.t1 = this.dto.IdbusiType == 37;
1304
1396
 
1305
- if (!_context3.t1) {
1306
- _context3.next = 16;
1397
+ if (!_context4.t1) {
1398
+ _context4.next = 16;
1307
1399
  break;
1308
1400
  }
1309
1401
 
1310
- _context3.next = 15;
1402
+ _context4.next = 15;
1311
1403
  return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
1312
1404
 
1313
1405
  case 15:
1314
- _context3.t1 = _context3.sent;
1406
+ _context4.t1 = _context4.sent;
1315
1407
 
1316
1408
  case 16:
1317
- _context3.t0 = _context3.t1;
1409
+ _context4.t0 = _context4.t1;
1318
1410
 
1319
- if (_context3.t0) {
1320
- _context3.next = 19;
1411
+ if (_context4.t0) {
1412
+ _context4.next = 19;
1321
1413
  break;
1322
1414
  }
1323
1415
 
1324
- _context3.t0 = this.dto.IdbusiType != 37;
1416
+ _context4.t0 = this.dto.IdbusiType != 37;
1325
1417
 
1326
1418
  case 19:
1327
- if (!_context3.t0) {
1328
- _context3.next = 21;
1419
+ if (!_context4.t0) {
1420
+ _context4.next = 21;
1329
1421
  break;
1330
1422
  }
1331
1423
 
1332
- 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) {
1424
+ return _context4.abrupt('return', (0, _tplusApi.ccApi)({ dto: (0, _extends3.default)({}, this.dto.cut(), { RetailOms: { RetailTypeEnum: RetailTypeEnum } }), cip: IPMSG.query || "" }, '/retail/RetailPos/settle', false, false, { method: 'post', timeout_skip: true }).then(function (resp) {
1333
1425
  _this11.setDtoID(resp.ID);
1334
1426
  _this11.paymode.checkList = [];
1335
1427
  _this11.billID = resp.ID;
1336
1428
  }));
1337
1429
 
1338
1430
  case 21:
1339
- _context3.next = 24;
1431
+ _context4.next = 24;
1340
1432
  break;
1341
1433
 
1342
1434
  case 23:
1343
- return _context3.abrupt('return', (0, _tplusApi.tApi)({ dto: this.dto.cut() }, 'chanjet.RE.newRetail.Settle', false, false, { timeout_skip: true }).then(function (resp) {
1435
+ return _context4.abrupt('return', (0, _tplusApi.tApi)({ dto: this.dto.cut() }, 'chanjet.RE.newRetail.Settle', false, false, { timeout_skip: true }).then(function (resp) {
1344
1436
  _this11.setDtoID(resp.ID);
1345
1437
  _this11.billID = resp.ID;
1346
1438
  }));
1347
1439
 
1348
1440
  case 24:
1349
1441
  case 'end':
1350
- return _context3.stop();
1442
+ return _context4.stop();
1351
1443
  }
1352
1444
  }
1353
- }, _callee3, this);
1445
+ }, _callee4, this);
1354
1446
  }));
1355
1447
 
1356
1448
  function save() {
1357
- return _ref13.apply(this, arguments);
1449
+ return _ref12.apply(this, arguments);
1358
1450
  }
1359
1451
 
1360
1452
  return save;
@@ -1367,35 +1459,35 @@ var SettlementStore = (_class = function () {
1367
1459
  }, {
1368
1460
  key: 'querySettleResult',
1369
1461
  value: function () {
1370
- var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
1371
- return _regenerator2.default.wrap(function _callee4$(_context4) {
1462
+ var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
1463
+ return _regenerator2.default.wrap(function _callee5$(_context5) {
1372
1464
  while (1) {
1373
- switch (_context4.prev = _context4.next) {
1465
+ switch (_context5.prev = _context5.next) {
1374
1466
  case 0:
1375
- _context4.prev = 0;
1376
- _context4.t0 = _promise2.default;
1377
- _context4.next = 4;
1467
+ _context5.prev = 0;
1468
+ _context5.t0 = _promise2.default;
1469
+ _context5.next = 4;
1378
1470
  return (0, _tplusApi.tApi)({ RetailCode: this.dto.Code }, 'chanjet.RE.newRetail.QuerySettleResult', false, false, { timeout_skip: true });
1379
1471
 
1380
1472
  case 4:
1381
- _context4.t1 = _context4.sent;
1382
- return _context4.abrupt('return', _context4.t0.resolve.call(_context4.t0, _context4.t1));
1473
+ _context5.t1 = _context5.sent;
1474
+ return _context5.abrupt('return', _context5.t0.resolve.call(_context5.t0, _context5.t1));
1383
1475
 
1384
1476
  case 8:
1385
- _context4.prev = 8;
1386
- _context4.t2 = _context4['catch'](0);
1387
- return _context4.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
1477
+ _context5.prev = 8;
1478
+ _context5.t2 = _context5['catch'](0);
1479
+ return _context5.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
1388
1480
 
1389
1481
  case 11:
1390
1482
  case 'end':
1391
- return _context4.stop();
1483
+ return _context5.stop();
1392
1484
  }
1393
1485
  }
1394
- }, _callee4, this, [[0, 8]]);
1486
+ }, _callee5, this, [[0, 8]]);
1395
1487
  }));
1396
1488
 
1397
1489
  function querySettleResult() {
1398
- return _ref17.apply(this, arguments);
1490
+ return _ref16.apply(this, arguments);
1399
1491
  }
1400
1492
 
1401
1493
  return querySettleResult;
@@ -1421,99 +1513,131 @@ var SettlementStore = (_class = function () {
1421
1513
  }, {
1422
1514
  key: 'validePwd',
1423
1515
  value: function () {
1424
- var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(value) {
1425
- var _ref19, isNewRetailBCPos, cook1, cook2, message, memberId, result, count, _result;
1516
+ var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(value) {
1517
+ var _ref18, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, cardStatusEnum, result, count, _result;
1426
1518
 
1427
- return _regenerator2.default.wrap(function _callee5$(_context5) {
1519
+ return _regenerator2.default.wrap(function _callee6$(_context6) {
1428
1520
  while (1) {
1429
- switch (_context5.prev = _context5.next) {
1521
+ switch (_context6.prev = _context6.next) {
1430
1522
  case 0:
1431
- _ref19 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref19.isNewRetailBCPos;
1432
- _context5.prev = 1;
1523
+ _ref18 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref18.isNewRetailBCPos;
1524
+ _context6.prev = 1;
1433
1525
 
1434
1526
  if (!isNewRetailBCPos) {
1435
- _context5.next = 19;
1527
+ _context6.next = 33;
1436
1528
  break;
1437
1529
  }
1438
1530
 
1439
1531
  cook1 = this.getAllCookies()['errorPwd'];
1440
1532
  cook2 = cook1 && JSON.parse(cook1);
1441
1533
  message = '密码输入错误';
1442
- memberId = this.paymode.currentMode.member.MeStorageCardId;
1534
+ memberStorageId = this.paymode.currentMode.meStorageCardId;
1443
1535
 
1444
1536
  if (!cook2) {
1445
- _context5.next = 12;
1537
+ _context6.next = 12;
1446
1538
  break;
1447
1539
  }
1448
1540
 
1449
- if (!cook2.hasOwnProperty(memberId + "")) {
1450
- _context5.next = 12;
1541
+ if (!cook2.hasOwnProperty(memberStorageId + "")) {
1542
+ _context6.next = 12;
1451
1543
  break;
1452
1544
  }
1453
1545
 
1454
- if (!(cook2[memberId] > 3)) {
1455
- _context5.next = 12;
1546
+ if (!(cook2[memberStorageId] > 3)) {
1547
+ _context6.next = 12;
1456
1548
  break;
1457
1549
  }
1458
1550
 
1459
1551
  message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
1460
- return _context5.abrupt('return', _promise2.default.resolve(message));
1552
+ return _context6.abrupt('return', _promise2.default.resolve(message));
1461
1553
 
1462
1554
  case 12:
1463
- _context5.next = 14;
1464
- return (0, _tplusApi.ccApi)({ password: _tplusApi.User.pwdEncrypt(value.pwd) }, '/member/MeMemberWallet/checkPaymentPassword/' + value.id, false, false);
1555
+ _paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId, cardStatusEnum = _paymode$currentMode.cardStatusEnum;
1556
+ result = null;
1465
1557
 
1466
- case 14:
1467
- result = _context5.sent;
1558
+ if (!(cardTypeEnum === 'BALANCE_CARD')) {
1559
+ _context6.next = 20;
1560
+ break;
1561
+ }
1562
+
1563
+ _context6.next = 17;
1564
+ return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
1565
+
1566
+ case 17:
1567
+ result = _context6.sent;
1568
+ _context6.next = 29;
1569
+ break;
1570
+
1571
+ case 20:
1572
+ if (!(cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId)) {
1573
+ _context6.next = 26;
1574
+ break;
1575
+ }
1576
+
1577
+ _context6.next = 23;
1578
+ return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
1579
+
1580
+ case 23:
1581
+ result = _context6.sent;
1582
+ _context6.next = 29;
1583
+ break;
1584
+
1585
+ case 26:
1586
+ _context6.next = 28;
1587
+ return (0, _tplusApi.ccApi)({ password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
1588
+
1589
+ case 28:
1590
+ result = _context6.sent;
1468
1591
 
1592
+ case 29:
1469
1593
  if (!result.data) {
1470
1594
  if (cook2) {
1471
- if (cook2.hasOwnProperty(memberId + "")) {
1472
- count = cook2[memberId];
1595
+ if (cook2.hasOwnProperty(memberStorageId + "")) {
1596
+ count = cook2[memberStorageId];
1473
1597
 
1474
- cook2[memberId] = count + 1;
1598
+ cook2[memberStorageId] = count + 1;
1475
1599
  } else {
1476
- cook2[memberId] = 1;
1600
+ cook2[memberStorageId] = 1;
1477
1601
  }
1478
1602
  } else {
1479
1603
  cook2 = {};
1480
- cook2[memberId] = 1;
1604
+ cook2[memberStorageId] = 1;
1481
1605
  }
1482
1606
  this.setCookie('errorPwd', '', -1);
1483
1607
  this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
1484
1608
  }
1485
- return _context5.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
1609
+ return _context6.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
1486
1610
 
1487
- case 19:
1488
- _context5.next = 21;
1611
+ case 33:
1612
+ _context6.next = 35;
1489
1613
  return (0, _tplusApi.tApi)({ "CheckoutParams": {
1490
1614
  "Idmember": value.id,
1491
1615
  "Password": value.pwd
1492
1616
  } }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
1493
1617
 
1494
- case 21:
1495
- _result = _context5.sent;
1496
- return _context5.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
1618
+ case 35:
1619
+ _result = _context6.sent;
1620
+ return _context6.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
1497
1621
 
1498
- case 23:
1499
- _context5.next = 28;
1622
+ case 37:
1623
+ _context6.next = 42;
1500
1624
  break;
1501
1625
 
1502
- case 25:
1503
- _context5.prev = 25;
1504
- _context5.t0 = _context5['catch'](1);
1505
- return _context5.abrupt('return', "failed");
1626
+ case 39:
1627
+ _context6.prev = 39;
1628
+ _context6.t0 = _context6['catch'](1);
1629
+ return _context6.abrupt('return', "failed");
1506
1630
 
1507
- case 28:
1631
+ case 42:
1508
1632
  case 'end':
1509
- return _context5.stop();
1633
+ return _context6.stop();
1510
1634
  }
1511
1635
  }
1512
- }, _callee5, this, [[1, 25]]);
1636
+ }, _callee6, this, [[1, 39]]);
1513
1637
  }));
1514
1638
 
1515
- function validePwd(_x3) {
1516
- return _ref18.apply(this, arguments);
1639
+ function validePwd(_x4) {
1640
+ return _ref17.apply(this, arguments);
1517
1641
  }
1518
1642
 
1519
1643
  return validePwd;
@@ -1535,7 +1659,7 @@ var SettlementStore = (_class = function () {
1535
1659
  var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
1536
1660
  return (0, _tplusApi.ccApi)({
1537
1661
  Idstore: idstore,
1538
- meMemberId: _this12.member.ID,
1662
+ meMemberId: _this12.paymode.currentMode.memberId,
1539
1663
  oldPassword: null,
1540
1664
  newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
1541
1665
  dataSource: "POS"
@@ -1552,37 +1676,130 @@ var SettlementStore = (_class = function () {
1552
1676
  var _this13 = this;
1553
1677
 
1554
1678
  return function () {
1555
- var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(_this) {
1679
+ var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(_this) {
1556
1680
  var _getLoginInfo3, IdStore, StoreCode, resp;
1557
1681
 
1558
- return _regenerator2.default.wrap(function _callee6$(_context6) {
1682
+ return _regenerator2.default.wrap(function _callee7$(_context7) {
1559
1683
  while (1) {
1560
- switch (_context6.prev = _context6.next) {
1684
+ switch (_context7.prev = _context7.next) {
1561
1685
  case 0:
1562
1686
  _getLoginInfo3 = _this13.getLoginInfo(), IdStore = _getLoginInfo3.IdStore, StoreCode = _getLoginInfo3.StoreCode;
1563
- _context6.next = 3;
1687
+ _context7.next = 3;
1564
1688
  return (0, _tplusApi.tApi)({ Idmember: _this13.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
1565
1689
 
1566
1690
  case 3:
1567
- resp = _context6.sent;
1691
+ resp = _context7.sent;
1568
1692
 
1569
1693
  _this.member = resp;
1570
- _this.paymode.currentMode.member.setStorageCardNo(resp.StorageCardNo);
1571
- return _context6.abrupt('return', _promise2.default.resolve(resp));
1694
+ _this.paymode.updateMemberStorageCardNo(resp.StorageCardNo, resp.WalletEnabled);
1695
+ return _context7.abrupt('return', _promise2.default.resolve(resp));
1572
1696
 
1573
1697
  case 7:
1574
1698
  case 'end':
1575
- return _context6.stop();
1699
+ return _context7.stop();
1576
1700
  }
1577
1701
  }
1578
- }, _callee6, _this13);
1702
+ }, _callee7, _this13);
1579
1703
  }));
1580
1704
 
1581
- return function (_x4) {
1705
+ return function (_x5) {
1706
+ return _ref19.apply(this, arguments);
1707
+ };
1708
+ }();
1709
+ }
1710
+ }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'updateCurrentMode', [_mobx.action], {
1711
+ enumerable: true,
1712
+ initializer: function initializer() {
1713
+ var _this14 = this;
1714
+
1715
+ return function () {
1716
+ var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(memberId) {
1717
+ var result;
1718
+ return _regenerator2.default.wrap(function _callee8$(_context8) {
1719
+ while (1) {
1720
+ switch (_context8.prev = _context8.next) {
1721
+ case 0:
1722
+ _context8.next = 2;
1723
+ return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId + '/' + true, false, false, { method: 'get' });
1724
+
1725
+ case 2:
1726
+ result = _context8.sent;
1727
+
1728
+ if (!(result && result.data.length)) {
1729
+ _context8.next = 20;
1730
+ break;
1731
+ }
1732
+
1733
+ if (!(result.data.length === 1)) {
1734
+ _context8.next = 9;
1735
+ break;
1736
+ }
1737
+
1738
+ _this14.paymode.updateCardInfo(result.data[0]);
1739
+ return _context8.abrupt('return', result.data);
1740
+
1741
+ case 9:
1742
+ if (!(result.data && result.data.length === 1)) {
1743
+ _context8.next = 14;
1744
+ break;
1745
+ }
1746
+
1747
+ _this14.paymode.updateCardInfo(result.data[0]);
1748
+ return _context8.abrupt('return', result.data);
1749
+
1750
+ case 14:
1751
+ if (!(result.data && result.data.length > 1)) {
1752
+ _context8.next = 18;
1753
+ break;
1754
+ }
1755
+
1756
+ return _context8.abrupt('return', result.data);
1757
+
1758
+ case 18:
1759
+ _message2.default.warn('没有可用储值卡!');
1760
+ return _context8.abrupt('return', false);
1761
+
1762
+ case 20:
1763
+ case 'end':
1764
+ return _context8.stop();
1765
+ }
1766
+ }
1767
+ }, _callee8, _this14);
1768
+ }));
1769
+
1770
+ return function (_x6) {
1582
1771
  return _ref20.apply(this, arguments);
1583
1772
  };
1584
1773
  }();
1585
1774
  }
1775
+ }), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'updateCardInfo', [_mobx.action], {
1776
+ enumerable: true,
1777
+ initializer: function initializer() {
1778
+ var _this15 = this;
1779
+
1780
+ return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9() {
1781
+ var address, result;
1782
+ return _regenerator2.default.wrap(function _callee9$(_context9) {
1783
+ while (1) {
1784
+ switch (_context9.prev = _context9.next) {
1785
+ case 0:
1786
+ address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + _this15.paymode.currentMode.storageCardNo;
1787
+ _context9.next = 3;
1788
+ return (0, _tplusApi.ccApi)({}, address, false, false, { method: 'get', timeout_skip: true });
1789
+
1790
+ case 3:
1791
+ result = _context9.sent;
1792
+
1793
+ _this15.paymode.updateCardInfo(result.data);
1794
+
1795
+ case 5:
1796
+ case 'end':
1797
+ return _context9.stop();
1798
+ }
1799
+ }
1800
+ }, _callee9, _this15);
1801
+ }));
1802
+ }
1586
1803
  }), _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);
1587
1804
  exports.default = SettlementStore;
1588
1805
  var PayMode = exports.PayMode = (_class3 = function () {
@@ -1597,19 +1814,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
1597
1814
  this.onlineamount = 0;
1598
1815
  this.maxamount = 0;
1599
1816
 
1600
- _initDefineProp(this, 'currentFocus', _descriptor3, this);
1817
+ _initDefineProp(this, 'currentFocus', _descriptor5, this);
1601
1818
 
1602
- _initDefineProp(this, 'received', _descriptor4, this);
1819
+ _initDefineProp(this, 'received', _descriptor6, this);
1603
1820
 
1604
- _initDefineProp(this, 'receivable', _descriptor5, this);
1821
+ _initDefineProp(this, 'receivable', _descriptor7, this);
1605
1822
 
1606
- _initDefineProp(this, 'paymodes', _descriptor6, this);
1823
+ _initDefineProp(this, 'paymodes', _descriptor8, this);
1607
1824
 
1608
- _initDefineProp(this, 'thePaymodes', _descriptor7, this);
1825
+ _initDefineProp(this, 'thePaymodes', _descriptor9, this);
1609
1826
 
1610
1827
  this.bookMaxValue = 0;
1611
1828
  this.isNotFullBook = false;
1612
1829
  this.isNotFullOnlyBook = false;
1830
+
1831
+ _initDefineProp(this, 'storageCardNo', _descriptor10, this);
1832
+
1833
+ _initDefineProp(this, 'balance', _descriptor11, this);
1834
+
1613
1835
  this.currentMode = null;
1614
1836
  this.checkList = [];
1615
1837
  this.settle = {
@@ -1617,13 +1839,14 @@ var PayMode = exports.PayMode = (_class3 = function () {
1617
1839
  hotKey: "Ctrl+M"
1618
1840
  };
1619
1841
 
1620
- _initDefineProp(this, 'calcCheckList', _descriptor8, this);
1842
+ _initDefineProp(this, 'calcCheckList', _descriptor12, this);
1621
1843
 
1622
- _initDefineProp(this, 'setCouponNum', _descriptor9, this);
1844
+ _initDefineProp(this, 'setCouponNum', _descriptor13, this);
1623
1845
 
1624
- _initDefineProp(this, 'addDjqs', _descriptor10, this);
1625
- } //只是预订非全款时为true
1846
+ _initDefineProp(this, 'addDjqs', _descriptor14, this);
1847
+ }
1626
1848
  // @observable store = null;
1849
+ //只是预订非全款时为true
1627
1850
  //应收
1628
1851
 
1629
1852
 
@@ -1670,10 +1893,30 @@ var PayMode = exports.PayMode = (_class3 = function () {
1670
1893
  this.receivable = (0, _utils.getFixedNumber)(this.amount - sum);
1671
1894
  }
1672
1895
  }
1896
+ }, {
1897
+ key: 'updateMemberStorageCardNo',
1898
+ value: function updateMemberStorageCardNo(storageCardNo, walletEnabled) {
1899
+ this.currentMode.storageCardNo = storageCardNo;
1900
+ this.currentMode.walletEnabled = walletEnabled;
1901
+ }
1902
+ }, {
1903
+ key: 'updateCardInfo',
1904
+ value: function updateCardInfo(m) {
1905
+ this.currentMode.cardStatusEnum = m.CardStatusEnum;
1906
+ this.currentMode.isNeedPassword = m.IsNeedPassword;
1907
+ this.currentMode.meStorageCardId = m.MeStorageCardId;
1908
+ this.currentMode.storageCardNo = m.StorageCardNo;
1909
+ this.currentMode.balance = m.BalanceStorage;
1910
+ this.currentMode.rawbalance = m.BalanceStorage;
1911
+ this.currentMode.cardTypeEnum = m.CardTypeEnum;
1912
+ this.currentMode.walletEnabled = m.WalletEnabled;
1913
+ this.currentMode.memberId = m.ID;
1914
+ this.currentMode.freePaymentPasswordStore = m.FreePaymentPasswordStore;
1915
+ }
1673
1916
  }, {
1674
1917
  key: 'calcDjqCheckValue',
1675
1918
  value: function calcDjqCheckValue(q1, dto, params) {
1676
- var _this14 = this;
1919
+ var _this16 = this;
1677
1920
 
1678
1921
  var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
1679
1922
  var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
@@ -1687,12 +1930,12 @@ var PayMode = exports.PayMode = (_class3 = function () {
1687
1930
  this.checkList = [];
1688
1931
  }
1689
1932
 
1690
- var _ref21 = _mutantsUtil.platform || {},
1691
- isNewRetailBCPos = _ref21.isNewRetailBCPos;
1933
+ var _ref22 = _mutantsUtil.platform || {},
1934
+ isNewRetailBCPos = _ref22.isNewRetailBCPos;
1692
1935
 
1693
- var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
1694
- PayStyle = _enumController$getEn15.PayStyle,
1695
- Differentiate = _enumController$getEn15.Differentiate;
1936
+ var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
1937
+ PayStyle = _enumController$getEn16.PayStyle,
1938
+ Differentiate = _enumController$getEn16.Differentiate;
1696
1939
 
1697
1940
  if (q1) {
1698
1941
  if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
@@ -1720,7 +1963,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1720
1963
  if (!q1.checked) {
1721
1964
  this.checkList.forEach(function (ele, i) {
1722
1965
  if (ele.id === q1.id) {
1723
- _this14.checkList.splice(i, 1);
1966
+ _this16.checkList.splice(i, 1);
1724
1967
  }
1725
1968
  });
1726
1969
  } else {
@@ -1792,24 +2035,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
1792
2035
  if (result && result.length != 0) {
1793
2036
  result.forEach(function (element, index) {
1794
2037
  var djq1 = false;
1795
- _this14.currentMode.djqs.forEach(function (djq) {
2038
+ _this16.currentMode.djqs.forEach(function (djq) {
1796
2039
  if (element.id === djq.id) {
1797
2040
  djq1 = true;
1798
2041
  }
1799
2042
  });
1800
2043
 
1801
- var _ref22 = element || {},
1802
- couponCode = _ref22.couponCode,
1803
- name = _ref22.name,
1804
- tieredAmountResult = _ref22.tieredAmountResult,
1805
- fromDate = _ref22.fromDate,
1806
- dateMount = _ref22.dateMount,
1807
- promoMethodEnum = _ref22.promoMethodEnum,
1808
- discountPct = _ref22.discountPct,
1809
- nominalAmount = _ref22.nominalAmount,
1810
- promoId = _ref22.promoId,
1811
- id = _ref22.id,
1812
- doorsill = _ref22.doorsill;
2044
+ var _ref23 = element || {},
2045
+ couponCode = _ref23.couponCode,
2046
+ name = _ref23.name,
2047
+ tieredAmountResult = _ref23.tieredAmountResult,
2048
+ fromDate = _ref23.fromDate,
2049
+ dateMount = _ref23.dateMount,
2050
+ promoMethodEnum = _ref23.promoMethodEnum,
2051
+ discountPct = _ref23.discountPct,
2052
+ nominalAmount = _ref23.nominalAmount,
2053
+ promoId = _ref23.promoId,
2054
+ id = _ref23.id,
2055
+ doorsill = _ref23.doorsill;
1813
2056
 
1814
2057
  var condValue = tieredAmountResult.condValue,
1815
2058
  promoDiscount = tieredAmountResult.promoDiscount,
@@ -1837,10 +2080,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
1837
2080
  // couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
1838
2081
  // id
1839
2082
  // })
1840
- _this14.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
2083
+ _this16.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
1841
2084
  djq1 = false;
1842
2085
  } else {
1843
- _this14.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
2086
+ _this16.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
1844
2087
  // this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
1845
2088
  // djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
1846
2089
  }
@@ -1853,11 +2096,11 @@ var PayMode = exports.PayMode = (_class3 = function () {
1853
2096
  }, {
1854
2097
  key: 'calcDjqValue',
1855
2098
  value: function calcDjqValue(q1) {
1856
- var _ref23 = _mutantsUtil.platform || {},
1857
- isNewRetailBCPos = _ref23.isNewRetailBCPos;
2099
+ var _ref24 = _mutantsUtil.platform || {},
2100
+ isNewRetailBCPos = _ref24.isNewRetailBCPos;
1858
2101
 
1859
- var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
1860
- Differentiate = _enumController$getEn16.Differentiate;
2102
+ var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
2103
+ Differentiate = _enumController$getEn17.Differentiate;
1861
2104
 
1862
2105
  if (q1) {
1863
2106
  if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
@@ -1919,8 +2162,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
1919
2162
  this.currentMode.errinfo = '';
1920
2163
  var sum = this.amount;
1921
2164
 
1922
- var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
1923
- PayStyle = _enumController$getEn17.PayStyle;
2165
+ var _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(),
2166
+ PayStyle = _enumController$getEn18.PayStyle;
1924
2167
 
1925
2168
  this.thePaymodes && this.thePaymodes.forEach(function (mode) {
1926
2169
  if (mode.paymentType === PayStyle.hyczk) {
@@ -1939,28 +2182,28 @@ var PayMode = exports.PayMode = (_class3 = function () {
1939
2182
  }, {
1940
2183
  key: 'calcMemberBalance',
1941
2184
  value: function calcMemberBalance() {
1942
- this.currentMode.balance = this.currentMode.member.rawbalance - this.currentMode.value;
2185
+ this.currentMode.balance = this.currentMode.rawbalance - this.currentMode.value;
1943
2186
  }
1944
2187
  }, {
1945
2188
  key: 'setPaymodes',
1946
2189
  value: function () {
1947
- var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(type, isIntegralExchange) {
1948
- var _this15 = this;
2190
+ var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(type, isIntegralExchange) {
2191
+ var _this17 = this;
1949
2192
 
1950
- var _enumController$getEn18, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
2193
+ var _enumController$getEn19, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
1951
2194
 
1952
- return _regenerator2.default.wrap(function _callee7$(_context7) {
2195
+ return _regenerator2.default.wrap(function _callee10$(_context10) {
1953
2196
  while (1) {
1954
- switch (_context7.prev = _context7.next) {
2197
+ switch (_context10.prev = _context10.next) {
1955
2198
  case 0:
1956
- _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn18.settleStyleType, PayStyle = _enumController$getEn18.PayStyle;
2199
+ _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn19.settleStyleType, PayStyle = _enumController$getEn19.PayStyle;
1957
2200
  memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
1958
2201
  param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
1959
- _context7.next = 5;
2202
+ _context10.next = 5;
1960
2203
  return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
1961
2204
 
1962
2205
  case 5:
1963
- modes = _context7.sent;
2206
+ modes = _context10.sent;
1964
2207
 
1965
2208
  if (modes) {
1966
2209
  (0, _mobx.runInAction)(function () {
@@ -1969,7 +2212,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1969
2212
  //产品需求确认会员储值卡结算方式前端展示统一调整为“储值卡" tuzha by 2020-07-08
1970
2213
 
1971
2214
  if (mode.Code == PayStyle.hyczk) {
1972
- mode.Name = '储值余额';
2215
+ mode.Name = '储值卡';
1973
2216
  }
1974
2217
  paymodes.push({
1975
2218
  name: mode.Name,
@@ -1986,21 +2229,21 @@ var PayMode = exports.PayMode = (_class3 = function () {
1986
2229
  virtualPay: mode.VirtualPay
1987
2230
  });
1988
2231
  });
1989
- _this15.paymodes = paymodes;
2232
+ _this17.paymodes = paymodes;
1990
2233
  //modes.QuickSettleStyles
1991
2234
  });
1992
2235
  }
1993
2236
 
1994
2237
  case 7:
1995
2238
  case 'end':
1996
- return _context7.stop();
2239
+ return _context10.stop();
1997
2240
  }
1998
2241
  }
1999
- }, _callee7, this);
2242
+ }, _callee10, this);
2000
2243
  }));
2001
2244
 
2002
- function setPaymodes(_x5, _x6) {
2003
- return _ref24.apply(this, arguments);
2245
+ function setPaymodes(_x7, _x8) {
2246
+ return _ref25.apply(this, arguments);
2004
2247
  }
2005
2248
 
2006
2249
  return setPaymodes;
@@ -2017,47 +2260,57 @@ var PayMode = exports.PayMode = (_class3 = function () {
2017
2260
  }
2018
2261
  }]);
2019
2262
  return PayMode;
2020
- }(), (_descriptor3 = _applyDecoratedDescriptor(_class3.prototype, 'currentFocus', [_mobx.observable], {
2263
+ }(), (_descriptor5 = _applyDecoratedDescriptor(_class3.prototype, 'currentFocus', [_mobx.observable], {
2021
2264
  enumerable: true,
2022
2265
  initializer: function initializer() {
2023
2266
  return "";
2024
2267
  }
2025
- }), _descriptor4 = _applyDecoratedDescriptor(_class3.prototype, 'received', [_mobx.observable], {
2268
+ }), _descriptor6 = _applyDecoratedDescriptor(_class3.prototype, 'received', [_mobx.observable], {
2026
2269
  enumerable: true,
2027
2270
  initializer: function initializer() {
2028
2271
  return 0;
2029
2272
  }
2030
- }), _descriptor5 = _applyDecoratedDescriptor(_class3.prototype, 'receivable', [_mobx.observable], {
2273
+ }), _descriptor7 = _applyDecoratedDescriptor(_class3.prototype, 'receivable', [_mobx.observable], {
2031
2274
  enumerable: true,
2032
2275
  initializer: function initializer() {
2033
2276
  return 0;
2034
2277
  }
2035
- }), _descriptor6 = _applyDecoratedDescriptor(_class3.prototype, 'paymodes', [_mobx.observable], {
2278
+ }), _descriptor8 = _applyDecoratedDescriptor(_class3.prototype, 'paymodes', [_mobx.observable], {
2036
2279
  enumerable: true,
2037
2280
  initializer: function initializer() {
2038
2281
  return [];
2039
2282
  }
2040
- }), _descriptor7 = _applyDecoratedDescriptor(_class3.prototype, 'thePaymodes', [_mobx.observable], {
2283
+ }), _descriptor9 = _applyDecoratedDescriptor(_class3.prototype, 'thePaymodes', [_mobx.observable], {
2041
2284
  enumerable: true,
2042
2285
  initializer: function initializer() {
2043
2286
  return [];
2044
2287
  }
2045
- }), _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], {
2288
+ }), _descriptor10 = _applyDecoratedDescriptor(_class3.prototype, 'storageCardNo', [_mobx.observable], {
2046
2289
  enumerable: true,
2047
2290
  initializer: function initializer() {
2048
- var _this16 = this;
2291
+ return null;
2292
+ }
2293
+ }), _descriptor11 = _applyDecoratedDescriptor(_class3.prototype, 'balance', [_mobx.observable], {
2294
+ enumerable: true,
2295
+ initializer: function initializer() {
2296
+ return null;
2297
+ }
2298
+ }), _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], {
2299
+ enumerable: true,
2300
+ initializer: function initializer() {
2301
+ var _this18 = this;
2049
2302
 
2050
2303
  return function () {
2051
- _this16.checkList = [];
2304
+ _this18.checkList = [];
2052
2305
  };
2053
2306
  }
2054
- }), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype), _descriptor9 = _applyDecoratedDescriptor(_class3.prototype, 'setCouponNum', [_mobx.action], {
2307
+ }), _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], {
2055
2308
  enumerable: true,
2056
2309
  initializer: function initializer() {
2057
- var _this17 = this;
2310
+ var _this19 = this;
2058
2311
 
2059
2312
  return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
2060
- _this17.currentMode.djqs.forEach(function (ele) {
2313
+ _this19.currentMode.djqs.forEach(function (ele) {
2061
2314
  if (ele.id === id) {
2062
2315
  promoMethodEnum == "CASH_COUPON" ? ele.amount = nominalAmount : ele.amount = promoDiscount;
2063
2316
  ele.couponCategoryEnum = couponNum;
@@ -2067,10 +2320,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
2067
2320
  });
2068
2321
  };
2069
2322
  }
2070
- }), _descriptor10 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
2323
+ }), _descriptor14 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
2071
2324
  enumerable: true,
2072
2325
  initializer: function initializer() {
2073
- var _this18 = this;
2326
+ var _this20 = this;
2074
2327
 
2075
2328
  return function (promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
2076
2329
  var djq = {
@@ -2092,25 +2345,25 @@ var PayMode = exports.PayMode = (_class3 = function () {
2092
2345
  couponCategoryEnum: couponCategoryEnum,
2093
2346
  id: id
2094
2347
  };
2095
- _this18.currentMode.djqs.push(djq);
2348
+ _this20.currentMode.djqs.push(djq);
2096
2349
  };
2097
2350
  }
2098
2351
  }), _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);
2099
2352
  var Member = exports.Member = (_class5 = function () {
2100
2353
  function Member(m) {
2101
- var _this19 = this;
2354
+ var _this21 = this;
2102
2355
 
2103
2356
  (0, _classCallCheck3.default)(this, Member);
2104
2357
 
2105
- _initDefineProp(this, 'cardNo', _descriptor11, this);
2358
+ _initDefineProp(this, 'cardNo', _descriptor15, this);
2106
2359
 
2107
- _initDefineProp(this, 'balance', _descriptor12, this);
2360
+ _initDefineProp(this, 'balance', _descriptor16, this);
2108
2361
 
2109
- _initDefineProp(this, 'exchangable', _descriptor13, this);
2362
+ _initDefineProp(this, 'exchangable', _descriptor17, this);
2110
2363
 
2111
- _initDefineProp(this, 'MeStorageCardId', _descriptor14, this);
2364
+ _initDefineProp(this, 'meStorageCardId', _descriptor18, this);
2112
2365
 
2113
- _initDefineProp(this, 'StorageCardNo', _descriptor15, this);
2366
+ _initDefineProp(this, 'storageCardNo', _descriptor19, this);
2114
2367
 
2115
2368
  if (m) {
2116
2369
  this.id = m.ID;
@@ -2121,17 +2374,15 @@ var Member = exports.Member = (_class5 = function () {
2121
2374
  return key == 'canusedbalancestorage';
2122
2375
  });
2123
2376
 
2124
- var _ref25 = _mutantsUtil.platform || {},
2125
- isNewRetailBCPos = _ref25.isNewRetailBCPos;
2377
+ var _ref26 = _mutantsUtil.platform || {},
2378
+ isNewRetailBCPos = _ref26.isNewRetailBCPos;
2126
2379
 
2127
- m.StorageCardNo && (this.StorageCardNo = m.StorageCardNo);
2128
- m.MeStorageCardId && (this.MeStorageCardId = m.MeStorageCardId);
2129
2380
  (0, _mobx.runInAction)(function () {
2130
- _this19.cardNo = m.CardCode;
2381
+ _this21.cardNo = m.CardCode;
2131
2382
  if (index >= 0) {
2132
- _this19.balance = parseFloat(m.DynamicPropertyValues[index]);
2383
+ _this21.balance = parseFloat(m.DynamicPropertyValues[index]);
2133
2384
  } else {
2134
- _this19.balance = _this19.rawbalance;
2385
+ _this21.balance = _this21.rawbalance;
2135
2386
  }
2136
2387
  });
2137
2388
  this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;
@@ -2151,32 +2402,22 @@ var Member = exports.Member = (_class5 = function () {
2151
2402
  this.cardNo = v;
2152
2403
  this.id = null;
2153
2404
  }
2154
- }, {
2155
- key: 'setMeStorageCardId',
2156
- value: function setMeStorageCardId(v) {
2157
- this.MeStorageCardId = v;
2158
- }
2159
- }, {
2160
- key: 'setStorageCardNo',
2161
- value: function setStorageCardNo(v) {
2162
- this.StorageCardNo = v;
2163
- }
2164
2405
  }]);
2165
2406
  return Member;
2166
- }(), (_descriptor11 = _applyDecoratedDescriptor(_class5.prototype, 'cardNo', [_mobx.observable], {
2407
+ }(), (_descriptor15 = _applyDecoratedDescriptor(_class5.prototype, 'cardNo', [_mobx.observable], {
2167
2408
  enumerable: true,
2168
2409
  initializer: null
2169
- }), _descriptor12 = _applyDecoratedDescriptor(_class5.prototype, 'balance', [_mobx.observable], {
2410
+ }), _descriptor16 = _applyDecoratedDescriptor(_class5.prototype, 'balance', [_mobx.observable], {
2170
2411
  enumerable: true,
2171
2412
  initializer: null
2172
- }), _descriptor13 = _applyDecoratedDescriptor(_class5.prototype, 'exchangable', [_mobx.observable], {
2413
+ }), _descriptor17 = _applyDecoratedDescriptor(_class5.prototype, 'exchangable', [_mobx.observable], {
2173
2414
  enumerable: true,
2174
2415
  initializer: null
2175
- }), _descriptor14 = _applyDecoratedDescriptor(_class5.prototype, 'MeStorageCardId', [_mobx.observable], {
2416
+ }), _descriptor18 = _applyDecoratedDescriptor(_class5.prototype, 'meStorageCardId', [_mobx.observable], {
2176
2417
  enumerable: true,
2177
2418
  initializer: null
2178
- }), _descriptor15 = _applyDecoratedDescriptor(_class5.prototype, 'StorageCardNo', [_mobx.observable], {
2419
+ }), _descriptor19 = _applyDecoratedDescriptor(_class5.prototype, 'storageCardNo', [_mobx.observable], {
2179
2420
  enumerable: true,
2180
2421
  initializer: null
2181
- }), _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);
2422
+ }), _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);
2182
2423
  //# sourceMappingURL=settlementStore.js.map