tplus-components-touch 3.39.7 → 3.39.10
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.
@@ -463,17 +463,18 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
463
463
|
} else {
|
464
464
|
item.badge = { text: '', position: '', className: '' };
|
465
465
|
}
|
466
|
-
if (!item.IsPresent) {
|
467
|
-
discountRetailTotalAount += item.RetailPrice * item.Quantity;
|
468
|
-
}
|
469
466
|
if (item.PromotionDetails && item.PromotionDetails.length > 0) {
|
470
467
|
count++;
|
471
468
|
}
|
472
469
|
item.InventoryName = item.Inventory.Name;
|
473
470
|
item.Discount = (0, _utils.getRoundValue)(item.RetailPrice - item.TaxPrice, pricePrecision);
|
474
|
-
|
471
|
+
if (!item.IsPresent) {
|
472
|
+
discountPrototypeTotalAmount += item.DetailDiscountAmount;
|
473
|
+
item.TotalDiscount = item.DetailDiscountAmount;
|
474
|
+
} else {
|
475
|
+
item.TotalDiscount = 0;
|
476
|
+
}
|
475
477
|
//item.TotalDiscount = getFixedNumber(item.Discount * item.Quantity);
|
476
|
-
item.TotalDiscount = item.DetailDiscountAmount;
|
477
478
|
item.nAmount = (0, _utils.getFixedNumber)(item.TaxAmount);
|
478
479
|
item.UnitName = item.Unit.Name;
|
479
480
|
item.nQuantity = (0, _utils.getRoundValue)(item.Quantity, quantityPrecision);
|
@@ -484,7 +485,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
484
485
|
dataSource: dataSource,
|
485
486
|
discountTotalAmount: (0, _utils.getFixedNumber)(_this2.props.amount),
|
486
487
|
discountPrototypeTotalAmount: (0, _utils.getFixedNumber)(discountPrototypeTotalAmount),
|
487
|
-
discountRetailTotalAount: (0, _utils.getFixedNumber)(_this2.props.amount + discountPrototypeTotalAmount)
|
488
|
+
discountRetailTotalAount: (0, _utils.getFixedNumber)(_this2.props.amount + parseFloat(discountPrototypeTotalAmount))
|
488
489
|
});
|
489
490
|
return count;
|
490
491
|
};
|
@@ -1216,10 +1217,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1216
1217
|
};
|
1217
1218
|
|
1218
1219
|
_this2.onTabsClick = function (key, bookType) {
|
1220
|
+
var _this2$store3 = _this2.store,
|
1221
|
+
paymode = _this2$store3.paymode,
|
1222
|
+
brefund = _this2$store3.brefund,
|
1223
|
+
boriginReturn = _this2$store3.boriginReturn;
|
1224
|
+
|
1219
1225
|
var _enumController$getEn9 = _mutantsUtil.enumController.getEnumOj(),
|
1220
1226
|
PayStyle = _enumController$getEn9.PayStyle,
|
1221
1227
|
Differentiate = _enumController$getEn9.Differentiate;
|
1222
1228
|
|
1229
|
+
if (key === PayStyle.djq && Math.Minus(paymode.received, paymode.amount) > 0) {
|
1230
|
+
_message2.default.warn('实收金额已大于应收金额,不允许使用优惠券');
|
1231
|
+
return;
|
1232
|
+
}
|
1223
1233
|
if (key === PayStyle.hyczk) {
|
1224
1234
|
var isProhibitMeStorageCard = _this2.props.isProhibitMeStorageCard;
|
1225
1235
|
|
@@ -1232,10 +1242,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1232
1242
|
var _enumController$getEn10 = _mutantsUtil.enumController.getEnumOj(),
|
1233
1243
|
MultiPay = _enumController$getEn10.MultiPay;
|
1234
1244
|
|
1235
|
-
var _this2$store3 = _this2.store,
|
1236
|
-
paymode = _this2$store3.paymode,
|
1237
|
-
brefund = _this2$store3.brefund,
|
1238
|
-
boriginReturn = _this2$store3.boriginReturn;
|
1239
1245
|
var noAlreadyWarn = _this2.state.noAlreadyWarn;
|
1240
1246
|
|
1241
1247
|
if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(key)) return false;
|