tplus-components-touch 3.54.4 → 3.54.7

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,7 @@ function _initializerWarningHelper(descriptor, context) {
169
169
  var t = _mutantsMicrofx.i18n.getFixedT(null, 'newretail');
170
170
 
171
171
  var SettlementStore = (_class = (_temp = _class2 = function () {
172
- // 赊销-欠款单据
173
- //type==2
174
- //type 1:储值;2:赊销; 不传或0是普通开单
172
+ // 预售都是全款;预订是否全款,在点击确认支付时计算订金和商品金额计算得出
175
173
  function SettlementStore() {
176
174
  (0, _classCallCheck3.default)(this, SettlementStore);
177
175
 
@@ -184,8 +182,9 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
184
182
  this.SettlementApi = _settlementApi2.default;
185
183
  } //赊销-客户id
186
184
 
187
- //赊销-销售合计
188
- // 预售都是全款;预订是否全款,在点击确认支付时计算订金和商品金额计算得出
185
+ // 赊销-欠款单据
186
+ //type==2
187
+ //type 1:储值;2:赊销; 不传或0是普通开单
189
188
 
190
189
 
191
190
  (0, _createClass3.default)(SettlementStore, [{
@@ -210,7 +209,6 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
210
209
  data = _ref.data,
211
210
  payModeKey = _ref.payModeKey,
212
211
  creditSalesVoucher = _ref.creditSalesVoucher,
213
- saleTotalTaxAmount = _ref.saleTotalTaxAmount,
214
212
  custVendorId = _ref.custVendorId;
215
213
 
216
214
  this.setNewStyle();
@@ -223,7 +221,6 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
223
221
  this.brefund = this.paymode.setAmount(amount, 0);
224
222
  this.dto = context.viewModel.data;
225
223
  this.creditSalesVoucher = creditSalesVoucher;
226
- this.saleTotalTaxAmount = saleTotalTaxAmount;
227
224
  this.custVendorId = custVendorId;
228
225
  } else {
229
226
  this.context = context;
@@ -286,16 +283,9 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
286
283
  this.paymode.bookMaxValue = _mutantsMicrofx.stores.drawerStore.totalWaitPaidAmount;
287
284
  }
288
285
  }
289
- if (IdbusiType === 42) {
290
- var _dto = this.dto,
291
- TotalTaxAmount = _dto.TotalTaxAmount,
292
- ArrearsAmount = _dto.ArrearsAmount;
293
-
294
- var returnAmount = Math.abs(TotalTaxAmount) - ArrearsAmount;
286
+ //预订取货应补款金额
287
+ if (IdbusiType == 42) {
295
288
  value = amount;
296
- (0, _mobx.runInAction)(function () {
297
- _this2.dto.CreditUsageAmount = (0, _utils.getFixedNumber)(-(Math.abs(TotalTaxAmount) - returnAmount), 2);
298
- });
299
289
  }
300
290
  this.brefund = this.paymode.setAmount(value, this.dto.OnlinePaymentAmount);
301
291
  }
@@ -1111,8 +1101,8 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
1111
1101
  "latitude": IPMSG.latitude || "",
1112
1102
  "Retails": this.creditSalesVoucher,
1113
1103
  "IdCustVendor": this.custVendorId,
1114
- "TotalOwedAmount": this.paymode.amount,
1115
- "TotalTaxAmount": this.saleTotalTaxAmount,
1104
+ "TotalOwedAmount": this.paymode.amount, //TotalOwedAmount欠款金额
1105
+ "TotalTaxAmount": this.paymode.received, //TotalTaxAmount 本次结算付款金额
1116
1106
  "RetailPaymentDetails": retailPaymentDetails,
1117
1107
  UserCode: UserCode,
1118
1108
  UserId: UserId,
@@ -1290,7 +1280,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
1290
1280
  var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
1291
1281
  var _this12 = this;
1292
1282
 
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;
1283
+ var _enumController$getEn14, PayStyle, TradeType, IPMSG, RetailTypeEnum, _getLoginInfo3, PreSellOrBook, PercentageWhenBook, _ref14, IdbusiType, DistributionMode, TotalTaxAmount, _dto, _TotalTaxAmount, ArrearsAmount, returnAmount1, prepaidAmount, fullPayment, dtoParams, payList, payment, tradeType, ret, _ref15, type, data, msg, code;
1294
1284
 
1295
1285
  return _regenerator2.default.wrap(function _callee5$(_context5) {
1296
1286
  while (1) {
@@ -1398,6 +1388,14 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
1398
1388
  _this12.dto.CreditUsageAmount = (0, _utils.getFixedNumber)(TotalTaxAmount, 2);
1399
1389
  });
1400
1390
  }
1391
+ if (IdbusiType === 42) {
1392
+ _dto = this.dto, _TotalTaxAmount = _dto.TotalTaxAmount, ArrearsAmount = _dto.ArrearsAmount;
1393
+ returnAmount1 = Math.abs(_TotalTaxAmount) - ArrearsAmount;
1394
+
1395
+ (0, _mobx.runInAction)(function () {
1396
+ _this12.dto.CreditUsageAmount = returnAmount1 > 1 ? (0, _utils.getFixedNumber)(-(Math.abs(_TotalTaxAmount) - returnAmount1), 2) : Math.abs(_TotalTaxAmount, 2);
1397
+ });
1398
+ }
1401
1399
  if (IdbusiType == 38 && PreSellOrBook == 'BOOK' && PercentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
1402
1400
  prepaidAmount = (0, _utils.getFixedNumber)(this.dto.RetailPaymentDetails.reduce(function (c, item) {
1403
1401
  return c + (item.Amount || 0);
@@ -1414,36 +1412,36 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
1414
1412
  _context5.t1 = this.dto.IdbusiType == 37;
1415
1413
 
1416
1414
  if (!_context5.t1) {
1417
- _context5.next = 15;
1415
+ _context5.next = 16;
1418
1416
  break;
1419
1417
  }
1420
1418
 
1421
- _context5.next = 14;
1419
+ _context5.next = 15;
1422
1420
  return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
1423
1421
 
1424
- case 14:
1422
+ case 15:
1425
1423
  _context5.t1 = _context5.sent;
1426
1424
 
1427
- case 15:
1425
+ case 16:
1428
1426
  _context5.t0 = _context5.t1;
1429
1427
 
1430
1428
  if (_context5.t0) {
1431
- _context5.next = 18;
1429
+ _context5.next = 19;
1432
1430
  break;
1433
1431
  }
1434
1432
 
1435
1433
  _context5.t0 = this.dto.IdbusiType != 37;
1436
1434
 
1437
- case 18:
1435
+ case 19:
1438
1436
  if (!_context5.t0) {
1439
- _context5.next = 38;
1437
+ _context5.next = 39;
1440
1438
  break;
1441
1439
  }
1442
1440
 
1443
1441
  dtoParams = (0, _extends3.default)({}, this.dto.cut(), { RetailOms: { RetailTypeEnum: RetailTypeEnum } });
1444
1442
 
1445
1443
  if (!(IdbusiType !== 42)) {
1446
- _context5.next = 36;
1444
+ _context5.next = 37;
1447
1445
  break;
1448
1446
  }
1449
1447
 
@@ -1453,36 +1451,36 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
1453
1451
  });
1454
1452
 
1455
1453
  if (!(payList && payList.length > 0)) {
1456
- _context5.next = 35;
1454
+ _context5.next = 36;
1457
1455
  break;
1458
1456
  }
1459
1457
 
1460
1458
  payment = payList[0];
1461
1459
  tradeType = payment && payment.Amount > 0 ? TradeType.PAY : TradeType.REFUND;
1462
- _context5.next = 27;
1460
+ _context5.next = 28;
1463
1461
  return this.thirdPay(1, payment, tradeType, dtoParams);
1464
1462
 
1465
- case 27:
1463
+ case 28:
1466
1464
  ret = _context5.sent;
1467
1465
  _ref15 = ret || {}, type = _ref15.type, data = _ref15.data, msg = _ref15.msg, code = _ref15.code;
1468
1466
 
1469
1467
  if (!(type === true)) {
1470
- _context5.next = 33;
1468
+ _context5.next = 34;
1471
1469
  break;
1472
1470
  }
1473
1471
 
1474
1472
  dtoParams = data;
1475
- _context5.next = 35;
1473
+ _context5.next = 36;
1476
1474
  break;
1477
1475
 
1478
- case 33:
1476
+ case 34:
1479
1477
  _message2.default.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
1480
1478
  return _context5.abrupt('return', false);
1481
1479
 
1482
- case 35:
1480
+ case 36:
1483
1481
  this.dtoParams = dtoParams;
1484
1482
 
1485
- case 36:
1483
+ case 37:
1486
1484
  console.log('结算信息:', dtoParams);
1487
1485
  return _context5.abrupt('return', this.SettlementApi.retailPosSettle({
1488
1486
  dto: dtoParams,
@@ -1498,7 +1496,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
1498
1496
  _this12.paymode.checkList = [];
1499
1497
  }));
1500
1498
 
1501
- case 38:
1499
+ case 39:
1502
1500
  case 'end':
1503
1501
  return _context5.stop();
1504
1502
  }
@@ -1890,7 +1888,6 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
1890
1888
 
1891
1889
  this.isFull = true;
1892
1890
  this.creditSalesVoucher = [];
1893
- this.saleTotalTaxAmount = 0;
1894
1891
  this.isCanSettleOnQuickKey = true;
1895
1892
 
1896
1893
  this.setCanSettleOnQuickKey = function (value) {