tplus-components-touch 3.22.13 → 3.22.14

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.
@@ -493,6 +493,7 @@ var SettlementStore = (_class = function () {
493
493
  var _ref5 = _mutantsUtil.platform || {},
494
494
  isNewRetailBCPos = _ref5.isNewRetailBCPos;
495
495
 
496
+ console.log(this.dto, 'dto==========');
496
497
  (0, _each3.default)(this.dto.RetailPaymentDetails, function (detail) {
497
498
  var themode = (0, _find3.default)(_this5.paymode.paymodes, { 'idSettleStyle': detail.IdsettleStyle });
498
499
  if (detail.SettleStyle.Code === PayStyle.hyczk && !themode) {
@@ -1169,7 +1170,7 @@ var SettlementStore = (_class = function () {
1169
1170
  DataSource: { Id: _this11.dataSource }
1170
1171
  });
1171
1172
  if (mode.paymentType == PayStyle.djq) {
1172
- (0, _each3.default)(_this11.paymode.checkList, function (djq) {
1173
+ (0, _each3.default)(_this11.paymode.checkList && _this11.paymode.checkList.length ? _this11.paymode.checkList : _this11.paymode.currentMode.djqs, function (djq) {
1173
1174
  _this11.dto.RetailCouponDetails.push({
1174
1175
  CouponCode: djq.promoCouponCode,
1175
1176
  ReductionAmount: djq.amount,
@@ -1651,6 +1652,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1651
1652
  sum = Math.Add(sum, ele.amount);
1652
1653
  });
1653
1654
  this.currentMode.value = (0, _utils.getFixedNumber)(Math.min(this.receivable, sum, this.currentMode.maxamount));
1655
+ console.log(this.receivable, sum, Math.min(this.receivable, sum, this.currentMode.maxamount), 'sum---------');
1654
1656
  this.currentMode.receivable = (0, _utils.getFixedNumber)(this.receivable - Math.min(this.receivable, sum, this.currentMode.maxamount));
1655
1657
  this.currentMode.overchargesAmount = (0, _utils.getFixedNumber)(sum - this.currentMode.value);
1656
1658
  if (params === 'single') {
@@ -1756,7 +1758,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1756
1758
  _this14.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
1757
1759
  djq1 = false;
1758
1760
  } else {
1759
- _this14.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum, promoDiscount);
1761
+ _this14.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
1760
1762
  // this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
1761
1763
  // djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
1762
1764
  }
@@ -1971,12 +1973,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
1971
1973
  initializer: function initializer() {
1972
1974
  var _this17 = this;
1973
1975
 
1974
- return function (id, couponNum, promoDiscount) {
1976
+ return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
1975
1977
  _this17.currentMode.djqs.forEach(function (ele) {
1976
1978
  if (ele.id === id) {
1977
- if (promoDiscount) {
1978
- ele.amount = promoDiscount;
1979
- }
1979
+ promoMethodEnum == "CASH_COUPON" ? ele.amount = nominalAmount : ele.amount = promoDiscount;
1980
1980
  ele.couponCategoryEnum = couponNum;
1981
1981
  var IsEnable = ele.couponCategoryEnum === 'RIGUP' || ele.couponCategoryEnum === 'UN_MATCH' || ele.couponCategoryEnum === "PREPARING" || ele.couponCategoryEnum === 'PROMO_LIMITED' || ele.couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
1982
1982
  ele.IsEnable = IsEnable;