tplus-components-touch 3.27.31 → 3.27.35

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.
@@ -917,10 +917,20 @@ var SettlementStore = (_class = function () {
917
917
  }
918
918
  }
919
919
 
920
+ //积分抵现不包含运费
921
+ var BuyerPayFreight = this.dto.BuyerPayFreight;
922
+ var DistributionMode = this.dto.DistributionMode;
923
+ var value = 0;
924
+ if ((DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && BuyerPayFreight && BuyerPayFreight > 0) {
925
+ value = (0, _utils.getFixedNumber)(Math.Minus(this.paymode.amount, BuyerPayFreight));
926
+ } else {
927
+ value = this.paymode.amount;
928
+ }
929
+
920
930
  (0, _tplusApi.tApi)({ IntegralSteadCashParams: {
921
931
  Idmember: this.paymode.currentMode.memberId,
922
- TotalTaxAmount: this.paymode.amount,
923
- BalanceTaxAmount: this.paymode.amount
932
+ TotalTaxAmount: value,
933
+ BalanceTaxAmount: value
924
934
  } }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
925
935
  _this8.paymode.currentMode.member.setExchangable(result.MaxAmount);
926
936
  _this8.updateEvent();
@@ -1008,7 +1018,17 @@ var SettlementStore = (_class = function () {
1008
1018
 
1009
1019
  this.amountHandler && this.amountHandler(type).then(function () {
1010
1020
  (0, _mobx.runInAction)(function () {
1011
- mode.maxamount = (0, _utils.getFixedNumber)(Math.Minus(_this9.context.viewModel.getViewItem('Voucher').availableAmount, sum));
1021
+
1022
+ //预售储值结算应包含运费
1023
+ var BuyerPayFreight = _this9.dto.BuyerPayFreight;
1024
+ var DistributionMode = _this9.dto.DistributionMode;
1025
+ var value = 0;
1026
+ if ((DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && BuyerPayFreight && BuyerPayFreight > 0 && type != PayStyle.jfdx) {
1027
+ value = (0, _utils.getFixedNumber)(parseFloat(_this9.context.viewModel.getViewItem('Voucher').availableAmount) + parseFloat(BuyerPayFreight));
1028
+ } else {
1029
+ value = _this9.context.viewModel.getViewItem('Voucher').availableAmount;
1030
+ }
1031
+ mode.maxamount = (0, _utils.getFixedNumber)(Math.Minus(value, sum));
1012
1032
  _this9.updateEvent();
1013
1033
  });
1014
1034
  });
@@ -1359,7 +1379,7 @@ var SettlementStore = (_class = function () {
1359
1379
  console.log('bc_pos\u73AF\u5883:' + isNewRetailBCPos + ',\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
1360
1380
 
1361
1381
  if (!isNewRetailBCPos) {
1362
- _context4.next = 23;
1382
+ _context4.next = 24;
1363
1383
  break;
1364
1384
  }
1365
1385
 
@@ -1374,40 +1394,48 @@ var SettlementStore = (_class = function () {
1374
1394
  _ref15 = this.dto || {}, IdbusiType = _ref15.IdbusiType, DistributionMode = _ref15.DistributionMode;
1375
1395
 
1376
1396
  if (IdbusiType == 38 && PreSellOrBook == 'BOOK' && PercentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
1377
- prepaidAmount = this.dto.RetailPaymentDetails.reduce(function (c, item) {
1397
+ prepaidAmount = (0, _utils.getFixedNumber)(this.dto.RetailPaymentDetails.reduce(function (c, item) {
1378
1398
  return c + (item.Amount || 0);
1379
- }, 0);
1399
+ }, 0));
1380
1400
 
1381
1401
  (0, _mobx.runInAction)(function () {
1382
1402
  _this11.dto.PrepaidAmount = prepaidAmount;
1383
1403
  });
1384
1404
  }
1405
+ this.dto.RetailDetails.forEach(function (o) {
1406
+ if (o.BaseQuantity != o.Quantity && !o.Idunit2) {
1407
+ (0, _mobx.runInAction)(function () {
1408
+ o.BaseQuantity = o.Quantity;
1409
+ });
1410
+ _tplusComponentsTouch.ModalWraper.confirm({ content: '请回想该订单下单时的操作步骤,复现退货时提示"退货数量大于可退数量的问题",联系赵录方' });
1411
+ }
1412
+ });
1385
1413
  _context4.t1 = this.dto.IdbusiType == 37;
1386
1414
 
1387
1415
  if (!_context4.t1) {
1388
- _context4.next = 16;
1416
+ _context4.next = 17;
1389
1417
  break;
1390
1418
  }
1391
1419
 
1392
- _context4.next = 15;
1420
+ _context4.next = 16;
1393
1421
  return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
1394
1422
 
1395
- case 15:
1423
+ case 16:
1396
1424
  _context4.t1 = _context4.sent;
1397
1425
 
1398
- case 16:
1426
+ case 17:
1399
1427
  _context4.t0 = _context4.t1;
1400
1428
 
1401
1429
  if (_context4.t0) {
1402
- _context4.next = 19;
1430
+ _context4.next = 20;
1403
1431
  break;
1404
1432
  }
1405
1433
 
1406
1434
  _context4.t0 = this.dto.IdbusiType != 37;
1407
1435
 
1408
- case 19:
1436
+ case 20:
1409
1437
  if (!_context4.t0) {
1410
- _context4.next = 21;
1438
+ _context4.next = 22;
1411
1439
  break;
1412
1440
  }
1413
1441
 
@@ -1417,17 +1445,17 @@ var SettlementStore = (_class = function () {
1417
1445
  _this11.billID = resp.ID;
1418
1446
  }));
1419
1447
 
1420
- case 21:
1421
- _context4.next = 24;
1448
+ case 22:
1449
+ _context4.next = 25;
1422
1450
  break;
1423
1451
 
1424
- case 23:
1452
+ case 24:
1425
1453
  return _context4.abrupt('return', (0, _tplusApi.tApi)({ dto: this.dto.cut() }, 'chanjet.RE.newRetail.Settle', false, false, { timeout_skip: true }).then(function (resp) {
1426
1454
  _this11.setDtoID(resp.ID);
1427
1455
  _this11.billID = resp.ID;
1428
1456
  }));
1429
1457
 
1430
- case 24:
1458
+ case 25:
1431
1459
  case 'end':
1432
1460
  return _context4.stop();
1433
1461
  }