tplus-components-touch 3.54.3 → 3.54.4

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.
@@ -169,9 +169,9 @@ function _initializerWarningHelper(descriptor, context) {
169
169
  var t = _mutantsMicrofx.i18n.getFixedT(null, 'newretail');
170
170
 
171
171
  var SettlementStore = (_class = (_temp = _class2 = function () {
172
- //赊销-客户id
173
- //赊销-销售合计
174
- // 预售都是全款;预订是否全款,在点击确认支付时计算订金和商品金额计算得出
172
+ // 赊销-欠款单据
173
+ //type==2
174
+ //type 1:储值;2:赊销; 不传或0是普通开单
175
175
  function SettlementStore() {
176
176
  (0, _classCallCheck3.default)(this, SettlementStore);
177
177
 
@@ -182,9 +182,10 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
182
182
  if (params) this.cloudPrintArguments = params;
183
183
  this.setNewStyle();
184
184
  this.SettlementApi = _settlementApi2.default;
185
- } // 赊销-欠款单据
186
- //type==2
187
- //type 1:储值;2:赊销; 不传或0是普通开单
185
+ } //赊销-客户id
186
+
187
+ //赊销-销售合计
188
+ // 预售都是全款;预订是否全款,在点击确认支付时计算订金和商品金额计算得出
188
189
 
189
190
 
190
191
  (0, _createClass3.default)(SettlementStore, [{
@@ -293,10 +294,9 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
293
294
  var returnAmount = Math.abs(TotalTaxAmount) - ArrearsAmount;
294
295
  value = amount;
295
296
  (0, _mobx.runInAction)(function () {
296
- _this2.dto.CreditUsageAmount = (0, _utils.getFixedNumber)(returnAmount > 0 ? -(Math.abs(TotalTaxAmount) - returnAmount) : TotalTaxAmount, 2);
297
+ _this2.dto.CreditUsageAmount = (0, _utils.getFixedNumber)(-(Math.abs(TotalTaxAmount) - returnAmount), 2);
297
298
  });
298
299
  }
299
-
300
300
  this.brefund = this.paymode.setAmount(value, this.dto.OnlinePaymentAmount);
301
301
  }
302
302
  this.paymode.clean();
@@ -1290,7 +1290,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
1290
1290
  var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
1291
1291
  var _this12 = this;
1292
1292
 
1293
- var _enumController$getEn14, PayStyle, TradeType, IPMSG, RetailTypeEnum, _getLoginInfo3, PreSellOrBook, PercentageWhenBook, _ref14, IdbusiType, DistributionMode, prepaidAmount, fullPayment, dtoParams, payList, payment, tradeType, ret, _ref15, type, data, msg, code;
1293
+ var _enumController$getEn14, PayStyle, TradeType, IPMSG, RetailTypeEnum, _getLoginInfo3, PreSellOrBook, PercentageWhenBook, _ref14, IdbusiType, DistributionMode, TotalTaxAmount, prepaidAmount, fullPayment, dtoParams, payList, payment, tradeType, ret, _ref15, type, data, msg, code;
1294
1294
 
1295
1295
  return _regenerator2.default.wrap(function _callee5$(_context5) {
1296
1296
  while (1) {
@@ -1391,8 +1391,13 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
1391
1391
  }
1392
1392
  RetailTypeEnum = this.dto.IdbusiType == 36 ? "INTEGRAL_EXCHANGE" : "NORMAL";
1393
1393
  _getLoginInfo3 = this.getLoginInfo(), PreSellOrBook = _getLoginInfo3.PreSellOrBook, PercentageWhenBook = _getLoginInfo3.PercentageWhenBook;
1394
- _ref14 = this.dto || {}, IdbusiType = _ref14.IdbusiType, DistributionMode = _ref14.DistributionMode;
1394
+ _ref14 = this.dto || {}, IdbusiType = _ref14.IdbusiType, DistributionMode = _ref14.DistributionMode, TotalTaxAmount = _ref14.TotalTaxAmount;
1395
1395
 
1396
+ if (IdbusiType === 42) {
1397
+ (0, _mobx.runInAction)(function () {
1398
+ _this12.dto.CreditUsageAmount = (0, _utils.getFixedNumber)(TotalTaxAmount, 2);
1399
+ });
1400
+ }
1396
1401
  if (IdbusiType == 38 && PreSellOrBook == 'BOOK' && PercentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
1397
1402
  prepaidAmount = (0, _utils.getFixedNumber)(this.dto.RetailPaymentDetails.reduce(function (c, item) {
1398
1403
  return c + (item.Amount || 0);
@@ -1409,68 +1414,75 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
1409
1414
  _context5.t1 = this.dto.IdbusiType == 37;
1410
1415
 
1411
1416
  if (!_context5.t1) {
1412
- _context5.next = 14;
1417
+ _context5.next = 15;
1413
1418
  break;
1414
1419
  }
1415
1420
 
1416
- _context5.next = 13;
1421
+ _context5.next = 14;
1417
1422
  return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
1418
1423
 
1419
- case 13:
1424
+ case 14:
1420
1425
  _context5.t1 = _context5.sent;
1421
1426
 
1422
- case 14:
1427
+ case 15:
1423
1428
  _context5.t0 = _context5.t1;
1424
1429
 
1425
1430
  if (_context5.t0) {
1426
- _context5.next = 17;
1431
+ _context5.next = 18;
1427
1432
  break;
1428
1433
  }
1429
1434
 
1430
1435
  _context5.t0 = this.dto.IdbusiType != 37;
1431
1436
 
1432
- case 17:
1437
+ case 18:
1433
1438
  if (!_context5.t0) {
1434
- _context5.next = 36;
1439
+ _context5.next = 38;
1435
1440
  break;
1436
1441
  }
1437
1442
 
1438
1443
  dtoParams = (0, _extends3.default)({}, this.dto.cut(), { RetailOms: { RetailTypeEnum: RetailTypeEnum } });
1439
- //处理存在二开支付情况
1440
1444
 
1445
+ if (!(IdbusiType !== 42)) {
1446
+ _context5.next = 36;
1447
+ break;
1448
+ }
1449
+
1450
+ //处理存在二开支付情况
1441
1451
  payList = dtoParams.RetailPaymentDetails.filter(function (v) {
1442
1452
  return v.ThirdPaymentInfo;
1443
1453
  });
1444
1454
 
1445
1455
  if (!(payList && payList.length > 0)) {
1446
- _context5.next = 33;
1456
+ _context5.next = 35;
1447
1457
  break;
1448
1458
  }
1449
1459
 
1450
1460
  payment = payList[0];
1451
1461
  tradeType = payment && payment.Amount > 0 ? TradeType.PAY : TradeType.REFUND;
1452
- _context5.next = 25;
1462
+ _context5.next = 27;
1453
1463
  return this.thirdPay(1, payment, tradeType, dtoParams);
1454
1464
 
1455
- case 25:
1465
+ case 27:
1456
1466
  ret = _context5.sent;
1457
1467
  _ref15 = ret || {}, type = _ref15.type, data = _ref15.data, msg = _ref15.msg, code = _ref15.code;
1458
1468
 
1459
1469
  if (!(type === true)) {
1460
- _context5.next = 31;
1470
+ _context5.next = 33;
1461
1471
  break;
1462
1472
  }
1463
1473
 
1464
1474
  dtoParams = data;
1465
- _context5.next = 33;
1475
+ _context5.next = 35;
1466
1476
  break;
1467
1477
 
1468
- case 31:
1478
+ case 33:
1469
1479
  _message2.default.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
1470
1480
  return _context5.abrupt('return', false);
1471
1481
 
1472
- case 33:
1482
+ case 35:
1473
1483
  this.dtoParams = dtoParams;
1484
+
1485
+ case 36:
1474
1486
  console.log('结算信息:', dtoParams);
1475
1487
  return _context5.abrupt('return', this.SettlementApi.retailPosSettle({
1476
1488
  dto: dtoParams,
@@ -1486,7 +1498,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
1486
1498
  _this12.paymode.checkList = [];
1487
1499
  }));
1488
1500
 
1489
- case 36:
1501
+ case 38:
1490
1502
  case 'end':
1491
1503
  return _context5.stop();
1492
1504
  }
@@ -1879,6 +1891,11 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
1879
1891
  this.isFull = true;
1880
1892
  this.creditSalesVoucher = [];
1881
1893
  this.saleTotalTaxAmount = 0;
1894
+ this.isCanSettleOnQuickKey = true;
1895
+
1896
+ this.setCanSettleOnQuickKey = function (value) {
1897
+ _this14.isCanSettleOnQuickKey = value;
1898
+ };
1882
1899
 
1883
1900
  _initDefineProp(this, 'setNewStyle', _descriptor2, this);
1884
1901
 
@@ -2381,9 +2398,6 @@ exports.default = SettlementStore;
2381
2398
  var PayMode = exports.PayMode = (_class3 = function () {
2382
2399
  //预订场景下,现场提货,且选项设置订金比例非100% or 取货最大补款数大于0时 为 true
2383
2400
  function PayMode() {
2384
- // this.amount=getFixedNumber(amount);
2385
- // this.calcReserved();
2386
-
2387
2401
  (0, _classCallCheck3.default)(this, PayMode);
2388
2402
  this._counter = 0;
2389
2403
  this.amount = 0;
@@ -2420,6 +2434,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
2420
2434
  _initDefineProp(this, 'setCouponNum', _descriptor15, this);
2421
2435
 
2422
2436
  _initDefineProp(this, 'addDjqs', _descriptor16, this);
2437
+
2438
+ // this.amount=getFixedNumber(amount);
2439
+ // this.calcReserved();
2440
+ this.SettlementApi = _settlementApi2.default;
2423
2441
  }
2424
2442
  // @observable store = null;
2425
2443
  //只是预订场景下,现场提货,且选项设置订金比例非100%时 为 true