tplus-components-touch 3.27.30 → 3.27.34

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 +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/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 +573 -324
  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 +5 -4
  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 = 24;
1281
1373
  break;
1282
1374
  }
1283
1375
 
@@ -1289,72 +1381,80 @@ 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
+ this.dto.RetailDetails.forEach(function (o) {
1396
+ if (o.BaseQuantity != o.Quantity && !o.Idunit2) {
1397
+ (0, _mobx.runInAction)(function () {
1398
+ o.BaseQuantity = o.Quantity;
1399
+ });
1400
+ _tplusComponentsTouch.ModalWraper.confirm({ content: '请回想该订单下单时的操作步骤,复现退货时提示"退货数量大于可退数量的问题",联系赵录方' });
1401
+ }
1402
+ });
1403
+ _context4.t1 = this.dto.IdbusiType == 37;
1304
1404
 
1305
- if (!_context3.t1) {
1306
- _context3.next = 16;
1405
+ if (!_context4.t1) {
1406
+ _context4.next = 17;
1307
1407
  break;
1308
1408
  }
1309
1409
 
1310
- _context3.next = 15;
1410
+ _context4.next = 16;
1311
1411
  return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
1312
1412
 
1313
- case 15:
1314
- _context3.t1 = _context3.sent;
1315
-
1316
1413
  case 16:
1317
- _context3.t0 = _context3.t1;
1414
+ _context4.t1 = _context4.sent;
1318
1415
 
1319
- if (_context3.t0) {
1320
- _context3.next = 19;
1416
+ case 17:
1417
+ _context4.t0 = _context4.t1;
1418
+
1419
+ if (_context4.t0) {
1420
+ _context4.next = 20;
1321
1421
  break;
1322
1422
  }
1323
1423
 
1324
- _context3.t0 = this.dto.IdbusiType != 37;
1424
+ _context4.t0 = this.dto.IdbusiType != 37;
1325
1425
 
1326
- case 19:
1327
- if (!_context3.t0) {
1328
- _context3.next = 21;
1426
+ case 20:
1427
+ if (!_context4.t0) {
1428
+ _context4.next = 22;
1329
1429
  break;
1330
1430
  }
1331
1431
 
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) {
1432
+ 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
1433
  _this11.setDtoID(resp.ID);
1334
1434
  _this11.paymode.checkList = [];
1335
1435
  _this11.billID = resp.ID;
1336
1436
  }));
1337
1437
 
1338
- case 21:
1339
- _context3.next = 24;
1438
+ case 22:
1439
+ _context4.next = 25;
1340
1440
  break;
1341
1441
 
1342
- 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) {
1442
+ case 24:
1443
+ return _context4.abrupt('return', (0, _tplusApi.tApi)({ dto: this.dto.cut() }, 'chanjet.RE.newRetail.Settle', false, false, { timeout_skip: true }).then(function (resp) {
1344
1444
  _this11.setDtoID(resp.ID);
1345
1445
  _this11.billID = resp.ID;
1346
1446
  }));
1347
1447
 
1348
- case 24:
1448
+ case 25:
1349
1449
  case 'end':
1350
- return _context3.stop();
1450
+ return _context4.stop();
1351
1451
  }
1352
1452
  }
1353
- }, _callee3, this);
1453
+ }, _callee4, this);
1354
1454
  }));
1355
1455
 
1356
1456
  function save() {
1357
- return _ref13.apply(this, arguments);
1457
+ return _ref12.apply(this, arguments);
1358
1458
  }
1359
1459
 
1360
1460
  return save;
@@ -1367,35 +1467,35 @@ var SettlementStore = (_class = function () {
1367
1467
  }, {
1368
1468
  key: 'querySettleResult',
1369
1469
  value: function () {
1370
- var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
1371
- return _regenerator2.default.wrap(function _callee4$(_context4) {
1470
+ var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
1471
+ return _regenerator2.default.wrap(function _callee5$(_context5) {
1372
1472
  while (1) {
1373
- switch (_context4.prev = _context4.next) {
1473
+ switch (_context5.prev = _context5.next) {
1374
1474
  case 0:
1375
- _context4.prev = 0;
1376
- _context4.t0 = _promise2.default;
1377
- _context4.next = 4;
1475
+ _context5.prev = 0;
1476
+ _context5.t0 = _promise2.default;
1477
+ _context5.next = 4;
1378
1478
  return (0, _tplusApi.tApi)({ RetailCode: this.dto.Code }, 'chanjet.RE.newRetail.QuerySettleResult', false, false, { timeout_skip: true });
1379
1479
 
1380
1480
  case 4:
1381
- _context4.t1 = _context4.sent;
1382
- return _context4.abrupt('return', _context4.t0.resolve.call(_context4.t0, _context4.t1));
1481
+ _context5.t1 = _context5.sent;
1482
+ return _context5.abrupt('return', _context5.t0.resolve.call(_context5.t0, _context5.t1));
1383
1483
 
1384
1484
  case 8:
1385
- _context4.prev = 8;
1386
- _context4.t2 = _context4['catch'](0);
1387
- return _context4.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
1485
+ _context5.prev = 8;
1486
+ _context5.t2 = _context5['catch'](0);
1487
+ return _context5.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
1388
1488
 
1389
1489
  case 11:
1390
1490
  case 'end':
1391
- return _context4.stop();
1491
+ return _context5.stop();
1392
1492
  }
1393
1493
  }
1394
- }, _callee4, this, [[0, 8]]);
1494
+ }, _callee5, this, [[0, 8]]);
1395
1495
  }));
1396
1496
 
1397
1497
  function querySettleResult() {
1398
- return _ref17.apply(this, arguments);
1498
+ return _ref16.apply(this, arguments);
1399
1499
  }
1400
1500
 
1401
1501
  return querySettleResult;
@@ -1421,99 +1521,131 @@ var SettlementStore = (_class = function () {
1421
1521
  }, {
1422
1522
  key: 'validePwd',
1423
1523
  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;
1524
+ var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(value) {
1525
+ var _ref18, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, cardStatusEnum, result, count, _result;
1426
1526
 
1427
- return _regenerator2.default.wrap(function _callee5$(_context5) {
1527
+ return _regenerator2.default.wrap(function _callee6$(_context6) {
1428
1528
  while (1) {
1429
- switch (_context5.prev = _context5.next) {
1529
+ switch (_context6.prev = _context6.next) {
1430
1530
  case 0:
1431
- _ref19 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref19.isNewRetailBCPos;
1432
- _context5.prev = 1;
1531
+ _ref18 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref18.isNewRetailBCPos;
1532
+ _context6.prev = 1;
1433
1533
 
1434
1534
  if (!isNewRetailBCPos) {
1435
- _context5.next = 19;
1535
+ _context6.next = 33;
1436
1536
  break;
1437
1537
  }
1438
1538
 
1439
1539
  cook1 = this.getAllCookies()['errorPwd'];
1440
1540
  cook2 = cook1 && JSON.parse(cook1);
1441
1541
  message = '密码输入错误';
1442
- memberId = this.paymode.currentMode.member.MeStorageCardId;
1542
+ memberStorageId = this.paymode.currentMode.meStorageCardId;
1443
1543
 
1444
1544
  if (!cook2) {
1445
- _context5.next = 12;
1545
+ _context6.next = 12;
1446
1546
  break;
1447
1547
  }
1448
1548
 
1449
- if (!cook2.hasOwnProperty(memberId + "")) {
1450
- _context5.next = 12;
1549
+ if (!cook2.hasOwnProperty(memberStorageId + "")) {
1550
+ _context6.next = 12;
1451
1551
  break;
1452
1552
  }
1453
1553
 
1454
- if (!(cook2[memberId] > 3)) {
1455
- _context5.next = 12;
1554
+ if (!(cook2[memberStorageId] > 3)) {
1555
+ _context6.next = 12;
1456
1556
  break;
1457
1557
  }
1458
1558
 
1459
1559
  message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
1460
- return _context5.abrupt('return', _promise2.default.resolve(message));
1560
+ return _context6.abrupt('return', _promise2.default.resolve(message));
1461
1561
 
1462
1562
  case 12:
1463
- _context5.next = 14;
1464
- return (0, _tplusApi.ccApi)({ password: _tplusApi.User.pwdEncrypt(value.pwd) }, '/member/MeMemberWallet/checkPaymentPassword/' + value.id, false, false);
1563
+ _paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId, cardStatusEnum = _paymode$currentMode.cardStatusEnum;
1564
+ result = null;
1465
1565
 
1466
- case 14:
1467
- result = _context5.sent;
1566
+ if (!(cardTypeEnum === 'BALANCE_CARD')) {
1567
+ _context6.next = 20;
1568
+ break;
1569
+ }
1570
+
1571
+ _context6.next = 17;
1572
+ return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
1573
+
1574
+ case 17:
1575
+ result = _context6.sent;
1576
+ _context6.next = 29;
1577
+ break;
1578
+
1579
+ case 20:
1580
+ if (!(cardStatusEnum === 'BINDING' && this.member && this.member.ID === memberId)) {
1581
+ _context6.next = 26;
1582
+ break;
1583
+ }
1584
+
1585
+ _context6.next = 23;
1586
+ return (0, _tplusApi.ccApi)({ md5Password: _tplusApi.User.pwdEncrypt(value.pwd), password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
1468
1587
 
1588
+ case 23:
1589
+ result = _context6.sent;
1590
+ _context6.next = 29;
1591
+ break;
1592
+
1593
+ case 26:
1594
+ _context6.next = 28;
1595
+ return (0, _tplusApi.ccApi)({ password: value.pwd, cardType: cardTypeEnum }, '/member/MeMemberWallet/checkPaymentPassword/' + meStorageCardId, false, false);
1596
+
1597
+ case 28:
1598
+ result = _context6.sent;
1599
+
1600
+ case 29:
1469
1601
  if (!result.data) {
1470
1602
  if (cook2) {
1471
- if (cook2.hasOwnProperty(memberId + "")) {
1472
- count = cook2[memberId];
1603
+ if (cook2.hasOwnProperty(memberStorageId + "")) {
1604
+ count = cook2[memberStorageId];
1473
1605
 
1474
- cook2[memberId] = count + 1;
1606
+ cook2[memberStorageId] = count + 1;
1475
1607
  } else {
1476
- cook2[memberId] = 1;
1608
+ cook2[memberStorageId] = 1;
1477
1609
  }
1478
1610
  } else {
1479
1611
  cook2 = {};
1480
- cook2[memberId] = 1;
1612
+ cook2[memberStorageId] = 1;
1481
1613
  }
1482
1614
  this.setCookie('errorPwd', '', -1);
1483
1615
  this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
1484
1616
  }
1485
- return _context5.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
1617
+ return _context6.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
1486
1618
 
1487
- case 19:
1488
- _context5.next = 21;
1619
+ case 33:
1620
+ _context6.next = 35;
1489
1621
  return (0, _tplusApi.tApi)({ "CheckoutParams": {
1490
1622
  "Idmember": value.id,
1491
1623
  "Password": value.pwd
1492
1624
  } }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
1493
1625
 
1494
- case 21:
1495
- _result = _context5.sent;
1496
- return _context5.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
1626
+ case 35:
1627
+ _result = _context6.sent;
1628
+ return _context6.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
1497
1629
 
1498
- case 23:
1499
- _context5.next = 28;
1630
+ case 37:
1631
+ _context6.next = 42;
1500
1632
  break;
1501
1633
 
1502
- case 25:
1503
- _context5.prev = 25;
1504
- _context5.t0 = _context5['catch'](1);
1505
- return _context5.abrupt('return', "failed");
1634
+ case 39:
1635
+ _context6.prev = 39;
1636
+ _context6.t0 = _context6['catch'](1);
1637
+ return _context6.abrupt('return', "failed");
1506
1638
 
1507
- case 28:
1639
+ case 42:
1508
1640
  case 'end':
1509
- return _context5.stop();
1641
+ return _context6.stop();
1510
1642
  }
1511
1643
  }
1512
- }, _callee5, this, [[1, 25]]);
1644
+ }, _callee6, this, [[1, 39]]);
1513
1645
  }));
1514
1646
 
1515
- function validePwd(_x3) {
1516
- return _ref18.apply(this, arguments);
1647
+ function validePwd(_x4) {
1648
+ return _ref17.apply(this, arguments);
1517
1649
  }
1518
1650
 
1519
1651
  return validePwd;
@@ -1535,7 +1667,7 @@ var SettlementStore = (_class = function () {
1535
1667
  var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
1536
1668
  return (0, _tplusApi.ccApi)({
1537
1669
  Idstore: idstore,
1538
- meMemberId: _this12.member.ID,
1670
+ meMemberId: _this12.paymode.currentMode.memberId,
1539
1671
  oldPassword: null,
1540
1672
  newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
1541
1673
  dataSource: "POS"
@@ -1552,37 +1684,130 @@ var SettlementStore = (_class = function () {
1552
1684
  var _this13 = this;
1553
1685
 
1554
1686
  return function () {
1555
- var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(_this) {
1687
+ var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(_this) {
1556
1688
  var _getLoginInfo3, IdStore, StoreCode, resp;
1557
1689
 
1558
- return _regenerator2.default.wrap(function _callee6$(_context6) {
1690
+ return _regenerator2.default.wrap(function _callee7$(_context7) {
1559
1691
  while (1) {
1560
- switch (_context6.prev = _context6.next) {
1692
+ switch (_context7.prev = _context7.next) {
1561
1693
  case 0:
1562
1694
  _getLoginInfo3 = _this13.getLoginInfo(), IdStore = _getLoginInfo3.IdStore, StoreCode = _getLoginInfo3.StoreCode;
1563
- _context6.next = 3;
1695
+ _context7.next = 3;
1564
1696
  return (0, _tplusApi.tApi)({ Idmember: _this13.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
1565
1697
 
1566
1698
  case 3:
1567
- resp = _context6.sent;
1699
+ resp = _context7.sent;
1568
1700
 
1569
1701
  _this.member = resp;
1570
- _this.paymode.currentMode.member.setStorageCardNo(resp.StorageCardNo);
1571
- return _context6.abrupt('return', _promise2.default.resolve(resp));
1702
+ _this.paymode.updateMemberStorageCardNo(resp.StorageCardNo, resp.WalletEnabled);
1703
+ return _context7.abrupt('return', _promise2.default.resolve(resp));
1572
1704
 
1573
1705
  case 7:
1574
1706
  case 'end':
1575
- return _context6.stop();
1707
+ return _context7.stop();
1708
+ }
1709
+ }
1710
+ }, _callee7, _this13);
1711
+ }));
1712
+
1713
+ return function (_x5) {
1714
+ return _ref19.apply(this, arguments);
1715
+ };
1716
+ }();
1717
+ }
1718
+ }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'updateCurrentMode', [_mobx.action], {
1719
+ enumerable: true,
1720
+ initializer: function initializer() {
1721
+ var _this14 = this;
1722
+
1723
+ return function () {
1724
+ var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8(memberId) {
1725
+ var result;
1726
+ return _regenerator2.default.wrap(function _callee8$(_context8) {
1727
+ while (1) {
1728
+ switch (_context8.prev = _context8.next) {
1729
+ case 0:
1730
+ _context8.next = 2;
1731
+ return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId + '/' + true, false, false, { method: 'get' });
1732
+
1733
+ case 2:
1734
+ result = _context8.sent;
1735
+
1736
+ if (!(result && result.data.length)) {
1737
+ _context8.next = 20;
1738
+ break;
1739
+ }
1740
+
1741
+ if (!(result.data.length === 1)) {
1742
+ _context8.next = 9;
1743
+ break;
1744
+ }
1745
+
1746
+ _this14.paymode.updateCardInfo(result.data[0]);
1747
+ return _context8.abrupt('return', result.data);
1748
+
1749
+ case 9:
1750
+ if (!(result.data && result.data.length === 1)) {
1751
+ _context8.next = 14;
1752
+ break;
1753
+ }
1754
+
1755
+ _this14.paymode.updateCardInfo(result.data[0]);
1756
+ return _context8.abrupt('return', result.data);
1757
+
1758
+ case 14:
1759
+ if (!(result.data && result.data.length > 1)) {
1760
+ _context8.next = 18;
1761
+ break;
1762
+ }
1763
+
1764
+ return _context8.abrupt('return', result.data);
1765
+
1766
+ case 18:
1767
+ _message2.default.warn('没有可用储值卡!');
1768
+ return _context8.abrupt('return', false);
1769
+
1770
+ case 20:
1771
+ case 'end':
1772
+ return _context8.stop();
1576
1773
  }
1577
1774
  }
1578
- }, _callee6, _this13);
1775
+ }, _callee8, _this14);
1579
1776
  }));
1580
1777
 
1581
- return function (_x4) {
1778
+ return function (_x6) {
1582
1779
  return _ref20.apply(this, arguments);
1583
1780
  };
1584
1781
  }();
1585
1782
  }
1783
+ }), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'updateCardInfo', [_mobx.action], {
1784
+ enumerable: true,
1785
+ initializer: function initializer() {
1786
+ var _this15 = this;
1787
+
1788
+ return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9() {
1789
+ var address, result;
1790
+ return _regenerator2.default.wrap(function _callee9$(_context9) {
1791
+ while (1) {
1792
+ switch (_context9.prev = _context9.next) {
1793
+ case 0:
1794
+ address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + _this15.paymode.currentMode.storageCardNo;
1795
+ _context9.next = 3;
1796
+ return (0, _tplusApi.ccApi)({}, address, false, false, { method: 'get', timeout_skip: true });
1797
+
1798
+ case 3:
1799
+ result = _context9.sent;
1800
+
1801
+ _this15.paymode.updateCardInfo(result.data);
1802
+
1803
+ case 5:
1804
+ case 'end':
1805
+ return _context9.stop();
1806
+ }
1807
+ }
1808
+ }, _callee9, _this15);
1809
+ }));
1810
+ }
1586
1811
  }), _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
1812
  exports.default = SettlementStore;
1588
1813
  var PayMode = exports.PayMode = (_class3 = function () {
@@ -1597,19 +1822,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
1597
1822
  this.onlineamount = 0;
1598
1823
  this.maxamount = 0;
1599
1824
 
1600
- _initDefineProp(this, 'currentFocus', _descriptor3, this);
1825
+ _initDefineProp(this, 'currentFocus', _descriptor5, this);
1601
1826
 
1602
- _initDefineProp(this, 'received', _descriptor4, this);
1827
+ _initDefineProp(this, 'received', _descriptor6, this);
1603
1828
 
1604
- _initDefineProp(this, 'receivable', _descriptor5, this);
1829
+ _initDefineProp(this, 'receivable', _descriptor7, this);
1605
1830
 
1606
- _initDefineProp(this, 'paymodes', _descriptor6, this);
1831
+ _initDefineProp(this, 'paymodes', _descriptor8, this);
1607
1832
 
1608
- _initDefineProp(this, 'thePaymodes', _descriptor7, this);
1833
+ _initDefineProp(this, 'thePaymodes', _descriptor9, this);
1609
1834
 
1610
1835
  this.bookMaxValue = 0;
1611
1836
  this.isNotFullBook = false;
1612
1837
  this.isNotFullOnlyBook = false;
1838
+
1839
+ _initDefineProp(this, 'storageCardNo', _descriptor10, this);
1840
+
1841
+ _initDefineProp(this, 'balance', _descriptor11, this);
1842
+
1613
1843
  this.currentMode = null;
1614
1844
  this.checkList = [];
1615
1845
  this.settle = {
@@ -1617,13 +1847,14 @@ var PayMode = exports.PayMode = (_class3 = function () {
1617
1847
  hotKey: "Ctrl+M"
1618
1848
  };
1619
1849
 
1620
- _initDefineProp(this, 'calcCheckList', _descriptor8, this);
1850
+ _initDefineProp(this, 'calcCheckList', _descriptor12, this);
1621
1851
 
1622
- _initDefineProp(this, 'setCouponNum', _descriptor9, this);
1852
+ _initDefineProp(this, 'setCouponNum', _descriptor13, this);
1623
1853
 
1624
- _initDefineProp(this, 'addDjqs', _descriptor10, this);
1625
- } //只是预订非全款时为true
1854
+ _initDefineProp(this, 'addDjqs', _descriptor14, this);
1855
+ }
1626
1856
  // @observable store = null;
1857
+ //只是预订非全款时为true
1627
1858
  //应收
1628
1859
 
1629
1860
 
@@ -1670,10 +1901,30 @@ var PayMode = exports.PayMode = (_class3 = function () {
1670
1901
  this.receivable = (0, _utils.getFixedNumber)(this.amount - sum);
1671
1902
  }
1672
1903
  }
1904
+ }, {
1905
+ key: 'updateMemberStorageCardNo',
1906
+ value: function updateMemberStorageCardNo(storageCardNo, walletEnabled) {
1907
+ this.currentMode.storageCardNo = storageCardNo;
1908
+ this.currentMode.walletEnabled = walletEnabled;
1909
+ }
1910
+ }, {
1911
+ key: 'updateCardInfo',
1912
+ value: function updateCardInfo(m) {
1913
+ this.currentMode.cardStatusEnum = m.CardStatusEnum;
1914
+ this.currentMode.isNeedPassword = m.IsNeedPassword;
1915
+ this.currentMode.meStorageCardId = m.MeStorageCardId;
1916
+ this.currentMode.storageCardNo = m.StorageCardNo;
1917
+ this.currentMode.balance = m.BalanceStorage;
1918
+ this.currentMode.rawbalance = m.BalanceStorage;
1919
+ this.currentMode.cardTypeEnum = m.CardTypeEnum;
1920
+ this.currentMode.walletEnabled = m.WalletEnabled;
1921
+ this.currentMode.memberId = m.ID;
1922
+ this.currentMode.freePaymentPasswordStore = m.FreePaymentPasswordStore;
1923
+ }
1673
1924
  }, {
1674
1925
  key: 'calcDjqCheckValue',
1675
1926
  value: function calcDjqCheckValue(q1, dto, params) {
1676
- var _this14 = this;
1927
+ var _this16 = this;
1677
1928
 
1678
1929
  var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
1679
1930
  var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
@@ -1687,12 +1938,12 @@ var PayMode = exports.PayMode = (_class3 = function () {
1687
1938
  this.checkList = [];
1688
1939
  }
1689
1940
 
1690
- var _ref21 = _mutantsUtil.platform || {},
1691
- isNewRetailBCPos = _ref21.isNewRetailBCPos;
1941
+ var _ref22 = _mutantsUtil.platform || {},
1942
+ isNewRetailBCPos = _ref22.isNewRetailBCPos;
1692
1943
 
1693
- var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
1694
- PayStyle = _enumController$getEn15.PayStyle,
1695
- Differentiate = _enumController$getEn15.Differentiate;
1944
+ var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
1945
+ PayStyle = _enumController$getEn16.PayStyle,
1946
+ Differentiate = _enumController$getEn16.Differentiate;
1696
1947
 
1697
1948
  if (q1) {
1698
1949
  if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
@@ -1720,7 +1971,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1720
1971
  if (!q1.checked) {
1721
1972
  this.checkList.forEach(function (ele, i) {
1722
1973
  if (ele.id === q1.id) {
1723
- _this14.checkList.splice(i, 1);
1974
+ _this16.checkList.splice(i, 1);
1724
1975
  }
1725
1976
  });
1726
1977
  } else {
@@ -1792,24 +2043,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
1792
2043
  if (result && result.length != 0) {
1793
2044
  result.forEach(function (element, index) {
1794
2045
  var djq1 = false;
1795
- _this14.currentMode.djqs.forEach(function (djq) {
2046
+ _this16.currentMode.djqs.forEach(function (djq) {
1796
2047
  if (element.id === djq.id) {
1797
2048
  djq1 = true;
1798
2049
  }
1799
2050
  });
1800
2051
 
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;
2052
+ var _ref23 = element || {},
2053
+ couponCode = _ref23.couponCode,
2054
+ name = _ref23.name,
2055
+ tieredAmountResult = _ref23.tieredAmountResult,
2056
+ fromDate = _ref23.fromDate,
2057
+ dateMount = _ref23.dateMount,
2058
+ promoMethodEnum = _ref23.promoMethodEnum,
2059
+ discountPct = _ref23.discountPct,
2060
+ nominalAmount = _ref23.nominalAmount,
2061
+ promoId = _ref23.promoId,
2062
+ id = _ref23.id,
2063
+ doorsill = _ref23.doorsill;
1813
2064
 
1814
2065
  var condValue = tieredAmountResult.condValue,
1815
2066
  promoDiscount = tieredAmountResult.promoDiscount,
@@ -1837,10 +2088,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
1837
2088
  // couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
1838
2089
  // id
1839
2090
  // })
1840
- _this14.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
2091
+ _this16.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
1841
2092
  djq1 = false;
1842
2093
  } else {
1843
- _this14.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
2094
+ _this16.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
1844
2095
  // this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
1845
2096
  // djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
1846
2097
  }
@@ -1853,11 +2104,11 @@ var PayMode = exports.PayMode = (_class3 = function () {
1853
2104
  }, {
1854
2105
  key: 'calcDjqValue',
1855
2106
  value: function calcDjqValue(q1) {
1856
- var _ref23 = _mutantsUtil.platform || {},
1857
- isNewRetailBCPos = _ref23.isNewRetailBCPos;
2107
+ var _ref24 = _mutantsUtil.platform || {},
2108
+ isNewRetailBCPos = _ref24.isNewRetailBCPos;
1858
2109
 
1859
- var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
1860
- Differentiate = _enumController$getEn16.Differentiate;
2110
+ var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
2111
+ Differentiate = _enumController$getEn17.Differentiate;
1861
2112
 
1862
2113
  if (q1) {
1863
2114
  if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
@@ -1919,8 +2170,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
1919
2170
  this.currentMode.errinfo = '';
1920
2171
  var sum = this.amount;
1921
2172
 
1922
- var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
1923
- PayStyle = _enumController$getEn17.PayStyle;
2173
+ var _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(),
2174
+ PayStyle = _enumController$getEn18.PayStyle;
1924
2175
 
1925
2176
  this.thePaymodes && this.thePaymodes.forEach(function (mode) {
1926
2177
  if (mode.paymentType === PayStyle.hyczk) {
@@ -1939,28 +2190,28 @@ var PayMode = exports.PayMode = (_class3 = function () {
1939
2190
  }, {
1940
2191
  key: 'calcMemberBalance',
1941
2192
  value: function calcMemberBalance() {
1942
- this.currentMode.balance = this.currentMode.member.rawbalance - this.currentMode.value;
2193
+ this.currentMode.balance = this.currentMode.rawbalance - this.currentMode.value;
1943
2194
  }
1944
2195
  }, {
1945
2196
  key: 'setPaymodes',
1946
2197
  value: function () {
1947
- var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(type, isIntegralExchange) {
1948
- var _this15 = this;
2198
+ var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(type, isIntegralExchange) {
2199
+ var _this17 = this;
1949
2200
 
1950
- var _enumController$getEn18, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
2201
+ var _enumController$getEn19, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
1951
2202
 
1952
- return _regenerator2.default.wrap(function _callee7$(_context7) {
2203
+ return _regenerator2.default.wrap(function _callee10$(_context10) {
1953
2204
  while (1) {
1954
- switch (_context7.prev = _context7.next) {
2205
+ switch (_context10.prev = _context10.next) {
1955
2206
  case 0:
1956
- _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn18.settleStyleType, PayStyle = _enumController$getEn18.PayStyle;
2207
+ _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn19.settleStyleType, PayStyle = _enumController$getEn19.PayStyle;
1957
2208
  memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
1958
2209
  param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
1959
- _context7.next = 5;
2210
+ _context10.next = 5;
1960
2211
  return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
1961
2212
 
1962
2213
  case 5:
1963
- modes = _context7.sent;
2214
+ modes = _context10.sent;
1964
2215
 
1965
2216
  if (modes) {
1966
2217
  (0, _mobx.runInAction)(function () {
@@ -1969,7 +2220,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1969
2220
  //产品需求确认会员储值卡结算方式前端展示统一调整为“储值卡" tuzha by 2020-07-08
1970
2221
 
1971
2222
  if (mode.Code == PayStyle.hyczk) {
1972
- mode.Name = '储值余额';
2223
+ mode.Name = '储值卡';
1973
2224
  }
1974
2225
  paymodes.push({
1975
2226
  name: mode.Name,
@@ -1986,21 +2237,21 @@ var PayMode = exports.PayMode = (_class3 = function () {
1986
2237
  virtualPay: mode.VirtualPay
1987
2238
  });
1988
2239
  });
1989
- _this15.paymodes = paymodes;
2240
+ _this17.paymodes = paymodes;
1990
2241
  //modes.QuickSettleStyles
1991
2242
  });
1992
2243
  }
1993
2244
 
1994
2245
  case 7:
1995
2246
  case 'end':
1996
- return _context7.stop();
2247
+ return _context10.stop();
1997
2248
  }
1998
2249
  }
1999
- }, _callee7, this);
2250
+ }, _callee10, this);
2000
2251
  }));
2001
2252
 
2002
- function setPaymodes(_x5, _x6) {
2003
- return _ref24.apply(this, arguments);
2253
+ function setPaymodes(_x7, _x8) {
2254
+ return _ref25.apply(this, arguments);
2004
2255
  }
2005
2256
 
2006
2257
  return setPaymodes;
@@ -2017,47 +2268,57 @@ var PayMode = exports.PayMode = (_class3 = function () {
2017
2268
  }
2018
2269
  }]);
2019
2270
  return PayMode;
2020
- }(), (_descriptor3 = _applyDecoratedDescriptor(_class3.prototype, 'currentFocus', [_mobx.observable], {
2271
+ }(), (_descriptor5 = _applyDecoratedDescriptor(_class3.prototype, 'currentFocus', [_mobx.observable], {
2021
2272
  enumerable: true,
2022
2273
  initializer: function initializer() {
2023
2274
  return "";
2024
2275
  }
2025
- }), _descriptor4 = _applyDecoratedDescriptor(_class3.prototype, 'received', [_mobx.observable], {
2276
+ }), _descriptor6 = _applyDecoratedDescriptor(_class3.prototype, 'received', [_mobx.observable], {
2026
2277
  enumerable: true,
2027
2278
  initializer: function initializer() {
2028
2279
  return 0;
2029
2280
  }
2030
- }), _descriptor5 = _applyDecoratedDescriptor(_class3.prototype, 'receivable', [_mobx.observable], {
2281
+ }), _descriptor7 = _applyDecoratedDescriptor(_class3.prototype, 'receivable', [_mobx.observable], {
2031
2282
  enumerable: true,
2032
2283
  initializer: function initializer() {
2033
2284
  return 0;
2034
2285
  }
2035
- }), _descriptor6 = _applyDecoratedDescriptor(_class3.prototype, 'paymodes', [_mobx.observable], {
2286
+ }), _descriptor8 = _applyDecoratedDescriptor(_class3.prototype, 'paymodes', [_mobx.observable], {
2036
2287
  enumerable: true,
2037
2288
  initializer: function initializer() {
2038
2289
  return [];
2039
2290
  }
2040
- }), _descriptor7 = _applyDecoratedDescriptor(_class3.prototype, 'thePaymodes', [_mobx.observable], {
2291
+ }), _descriptor9 = _applyDecoratedDescriptor(_class3.prototype, 'thePaymodes', [_mobx.observable], {
2041
2292
  enumerable: true,
2042
2293
  initializer: function initializer() {
2043
2294
  return [];
2044
2295
  }
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], {
2296
+ }), _descriptor10 = _applyDecoratedDescriptor(_class3.prototype, 'storageCardNo', [_mobx.observable], {
2297
+ enumerable: true,
2298
+ initializer: function initializer() {
2299
+ return null;
2300
+ }
2301
+ }), _descriptor11 = _applyDecoratedDescriptor(_class3.prototype, 'balance', [_mobx.observable], {
2046
2302
  enumerable: true,
2047
2303
  initializer: function initializer() {
2048
- var _this16 = this;
2304
+ return null;
2305
+ }
2306
+ }), _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], {
2307
+ enumerable: true,
2308
+ initializer: function initializer() {
2309
+ var _this18 = this;
2049
2310
 
2050
2311
  return function () {
2051
- _this16.checkList = [];
2312
+ _this18.checkList = [];
2052
2313
  };
2053
2314
  }
2054
- }), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype), _descriptor9 = _applyDecoratedDescriptor(_class3.prototype, 'setCouponNum', [_mobx.action], {
2315
+ }), _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
2316
  enumerable: true,
2056
2317
  initializer: function initializer() {
2057
- var _this17 = this;
2318
+ var _this19 = this;
2058
2319
 
2059
2320
  return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
2060
- _this17.currentMode.djqs.forEach(function (ele) {
2321
+ _this19.currentMode.djqs.forEach(function (ele) {
2061
2322
  if (ele.id === id) {
2062
2323
  promoMethodEnum == "CASH_COUPON" ? ele.amount = nominalAmount : ele.amount = promoDiscount;
2063
2324
  ele.couponCategoryEnum = couponNum;
@@ -2067,10 +2328,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
2067
2328
  });
2068
2329
  };
2069
2330
  }
2070
- }), _descriptor10 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
2331
+ }), _descriptor14 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
2071
2332
  enumerable: true,
2072
2333
  initializer: function initializer() {
2073
- var _this18 = this;
2334
+ var _this20 = this;
2074
2335
 
2075
2336
  return function (promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
2076
2337
  var djq = {
@@ -2092,25 +2353,25 @@ var PayMode = exports.PayMode = (_class3 = function () {
2092
2353
  couponCategoryEnum: couponCategoryEnum,
2093
2354
  id: id
2094
2355
  };
2095
- _this18.currentMode.djqs.push(djq);
2356
+ _this20.currentMode.djqs.push(djq);
2096
2357
  };
2097
2358
  }
2098
2359
  }), _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
2360
  var Member = exports.Member = (_class5 = function () {
2100
2361
  function Member(m) {
2101
- var _this19 = this;
2362
+ var _this21 = this;
2102
2363
 
2103
2364
  (0, _classCallCheck3.default)(this, Member);
2104
2365
 
2105
- _initDefineProp(this, 'cardNo', _descriptor11, this);
2366
+ _initDefineProp(this, 'cardNo', _descriptor15, this);
2106
2367
 
2107
- _initDefineProp(this, 'balance', _descriptor12, this);
2368
+ _initDefineProp(this, 'balance', _descriptor16, this);
2108
2369
 
2109
- _initDefineProp(this, 'exchangable', _descriptor13, this);
2370
+ _initDefineProp(this, 'exchangable', _descriptor17, this);
2110
2371
 
2111
- _initDefineProp(this, 'MeStorageCardId', _descriptor14, this);
2372
+ _initDefineProp(this, 'meStorageCardId', _descriptor18, this);
2112
2373
 
2113
- _initDefineProp(this, 'StorageCardNo', _descriptor15, this);
2374
+ _initDefineProp(this, 'storageCardNo', _descriptor19, this);
2114
2375
 
2115
2376
  if (m) {
2116
2377
  this.id = m.ID;
@@ -2121,17 +2382,15 @@ var Member = exports.Member = (_class5 = function () {
2121
2382
  return key == 'canusedbalancestorage';
2122
2383
  });
2123
2384
 
2124
- var _ref25 = _mutantsUtil.platform || {},
2125
- isNewRetailBCPos = _ref25.isNewRetailBCPos;
2385
+ var _ref26 = _mutantsUtil.platform || {},
2386
+ isNewRetailBCPos = _ref26.isNewRetailBCPos;
2126
2387
 
2127
- m.StorageCardNo && (this.StorageCardNo = m.StorageCardNo);
2128
- m.MeStorageCardId && (this.MeStorageCardId = m.MeStorageCardId);
2129
2388
  (0, _mobx.runInAction)(function () {
2130
- _this19.cardNo = m.CardCode;
2389
+ _this21.cardNo = m.CardCode;
2131
2390
  if (index >= 0) {
2132
- _this19.balance = parseFloat(m.DynamicPropertyValues[index]);
2391
+ _this21.balance = parseFloat(m.DynamicPropertyValues[index]);
2133
2392
  } else {
2134
- _this19.balance = _this19.rawbalance;
2393
+ _this21.balance = _this21.rawbalance;
2135
2394
  }
2136
2395
  });
2137
2396
  this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;
@@ -2151,32 +2410,22 @@ var Member = exports.Member = (_class5 = function () {
2151
2410
  this.cardNo = v;
2152
2411
  this.id = null;
2153
2412
  }
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
2413
  }]);
2165
2414
  return Member;
2166
- }(), (_descriptor11 = _applyDecoratedDescriptor(_class5.prototype, 'cardNo', [_mobx.observable], {
2415
+ }(), (_descriptor15 = _applyDecoratedDescriptor(_class5.prototype, 'cardNo', [_mobx.observable], {
2167
2416
  enumerable: true,
2168
2417
  initializer: null
2169
- }), _descriptor12 = _applyDecoratedDescriptor(_class5.prototype, 'balance', [_mobx.observable], {
2418
+ }), _descriptor16 = _applyDecoratedDescriptor(_class5.prototype, 'balance', [_mobx.observable], {
2170
2419
  enumerable: true,
2171
2420
  initializer: null
2172
- }), _descriptor13 = _applyDecoratedDescriptor(_class5.prototype, 'exchangable', [_mobx.observable], {
2421
+ }), _descriptor17 = _applyDecoratedDescriptor(_class5.prototype, 'exchangable', [_mobx.observable], {
2173
2422
  enumerable: true,
2174
2423
  initializer: null
2175
- }), _descriptor14 = _applyDecoratedDescriptor(_class5.prototype, 'MeStorageCardId', [_mobx.observable], {
2424
+ }), _descriptor18 = _applyDecoratedDescriptor(_class5.prototype, 'meStorageCardId', [_mobx.observable], {
2176
2425
  enumerable: true,
2177
2426
  initializer: null
2178
- }), _descriptor15 = _applyDecoratedDescriptor(_class5.prototype, 'StorageCardNo', [_mobx.observable], {
2427
+ }), _descriptor19 = _applyDecoratedDescriptor(_class5.prototype, 'storageCardNo', [_mobx.observable], {
2179
2428
  enumerable: true,
2180
2429
  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);
2430
+ }), _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
2431
  //# sourceMappingURL=settlementStore.js.map