tplus-components-touch 3.27.17 → 3.27.21

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.
@@ -453,6 +453,8 @@ var SettlementStore = (_class = function () {
453
453
  // this.member=context.stores && context.stores.memberStore && context.stores.memberStore.member;
454
454
  this.member = this.dto.Member; //stores.selectMemberStore.selectMemberInfo;
455
455
 
456
+ // this.paymode.bookMaxValue = 0;
457
+ this.paymode.isNotFullBook = false;
456
458
  //预订按比例收取订金处理
457
459
  var value = this.dto.TotalTaxAmount;
458
460
 
@@ -465,14 +467,18 @@ var SettlementStore = (_class = function () {
465
467
  DistributionMode = _ref5.DistributionMode;
466
468
 
467
469
  if (IdbusiType == 38 && PreSellOrBook == 'BOOK' && PercentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
470
+ this.paymode.bookMaxValue = value;
471
+ this.paymode.isNotFullBook = true;
468
472
  value = value * PercentageWhenBook / 100;
469
473
  (0, _mobx.runInAction)(function () {
470
474
  _this3.dto.PrepaidAmount = value;
471
475
  });
472
476
  }
477
+ //预订计算快递或同城配送运费
473
478
  if (IdbusiType == 38 && PreSellOrBook != 'DISABLED' && (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
474
479
  value += this.dto.BuyerPayFreight || 0;
475
480
  }
481
+ //预订取货应补款金额
476
482
  if (IdbusiType == 39) {
477
483
  value = _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount;
478
484
  }
@@ -939,7 +945,7 @@ var SettlementStore = (_class = function () {
939
945
  }
940
946
  }, {
941
947
  key: 'changeValue',
942
- value: function changeValue(index, value, blur) {
948
+ value: function changeValue(index, value, blur, bookBlur) {
943
949
  var mode = (0, _find3.default)(this.paymode.thePaymodes, { 'paymethodId': index });
944
950
  var v = blur ? (0, _utils.getFixedNumber)(value) : isNaN(value) && value != '-' ? 0.00 : value;
945
951
  if (mode) {
@@ -955,7 +961,7 @@ var SettlementStore = (_class = function () {
955
961
  mode.value2 = v;
956
962
  }
957
963
 
958
- this.paymode.calcReserved();
964
+ this.paymode.calcReserved(bookBlur);
959
965
  }
960
966
  }
961
967
  }, {
@@ -1581,6 +1587,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
1581
1587
 
1582
1588
  _initDefineProp(this, 'thePaymodes', _descriptor7, this);
1583
1589
 
1590
+ this.bookMaxValue = 0;
1591
+ this.isNotFullBook = false;
1584
1592
  this.currentMode = null;
1585
1593
  this.checkList = [];
1586
1594
  this.settle = {
@@ -1593,7 +1601,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1593
1601
  _initDefineProp(this, 'setCouponNum', _descriptor9, this);
1594
1602
 
1595
1603
  _initDefineProp(this, 'addDjqs', _descriptor10, this);
1596
- }
1604
+ } //非全款预订
1597
1605
  // @observable store = null;
1598
1606
 
1599
1607
 
@@ -1620,13 +1628,17 @@ var PayMode = exports.PayMode = (_class3 = function () {
1620
1628
  }
1621
1629
  }, {
1622
1630
  key: 'calcReserved',
1623
- value: function calcReserved() {
1631
+ value: function calcReserved(blur) {
1624
1632
  var sum = 0;
1625
1633
  (0, _each3.default)(this.thePaymodes, function (mode) {
1626
1634
  sum = Math.Add(sum, mode.value == "" ? 0 : mode.value);
1627
1635
  });
1628
1636
  this.received = (0, _utils.getFixedNumber)(sum);
1629
- this.receivable = (0, _utils.getFixedNumber)(this.amount - sum);
1637
+ if (blur && this.isNotFullBook) {
1638
+ this.receivable = (0, _utils.getFixedNumber)(this.bookMaxValue - sum);
1639
+ } else {
1640
+ this.receivable = (0, _utils.getFixedNumber)(this.amount - sum);
1641
+ }
1630
1642
  }
1631
1643
  }, {
1632
1644
  key: 'calcDjqCheckValue',