tplus-components-touch 3.22.10 → 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.
- package/dist/components/settlement/settlement.js +221 -181
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +5 -1
- package/dist/components/settlement/settlementStore.js +32 -52
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/settlement/utils.js +1 -1
- package/dist/components/settlement/utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -224,7 +224,6 @@
|
|
|
224
224
|
}
|
|
225
225
|
span:last-child{
|
|
226
226
|
font-size: 18px;
|
|
227
|
-
color: white;
|
|
228
227
|
text-align: right;
|
|
229
228
|
line-height: 14px;
|
|
230
229
|
}
|
|
@@ -241,6 +240,11 @@
|
|
|
241
240
|
line-height: 14px;
|
|
242
241
|
}
|
|
243
242
|
}
|
|
243
|
+
.tipStyle4 {
|
|
244
|
+
span:last-child{
|
|
245
|
+
color: white;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
244
248
|
.tipStyle1{
|
|
245
249
|
padding-bottom: 16px;
|
|
246
250
|
}
|
|
@@ -269,11 +269,7 @@ var SettlementStore = (_class = function () {
|
|
|
269
269
|
promoRuleId = tieredAmountResult.promoRuleId,
|
|
270
270
|
couponCategoryEnum = tieredAmountResult.couponCategoryEnum;
|
|
271
271
|
|
|
272
|
-
if ((0, _find3.default)(_this2.paymode.
|
|
273
|
-
return djq.code == couponCode;
|
|
274
|
-
})) {
|
|
275
|
-
_message2.default.info(Differentiate.COUPON + '\u5DF2\u6DFB\u52A0');
|
|
276
|
-
} else if (result.IsRepelWithPoints && (0, _find3.default)(_this2.paymode.thePaymodes, function (themode) {
|
|
272
|
+
if (result.IsRepelWithPoints && (0, _find3.default)(_this2.paymode.thePaymodes, function (themode) {
|
|
277
273
|
return themode.paymentType == PayStyle.jfdx;
|
|
278
274
|
})) {
|
|
279
275
|
_message2.default.error(Differentiate.COUPON + '\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
|
|
@@ -283,7 +279,7 @@ var SettlementStore = (_class = function () {
|
|
|
283
279
|
var _ref2 = _mutantsUtil.platform || {},
|
|
284
280
|
isNewRetailBCPos = _ref2.isNewRetailBCPos;
|
|
285
281
|
|
|
286
|
-
_this2.addDjq(couponCode, name, IsEnable, promoMethodEnum == "CASH_COUPON" ? nominalAmount :
|
|
282
|
+
_this2.addDjq(couponCode, name, IsEnable, promoMethodEnum == "CASH_COUPON" ? nominalAmount : promoDiscount, condValue, null, false, !result.IsRepelWithPoints, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, true, 1);
|
|
287
283
|
}
|
|
288
284
|
});
|
|
289
285
|
if (promoVoucher.coupon_code) {
|
|
@@ -497,6 +493,7 @@ var SettlementStore = (_class = function () {
|
|
|
497
493
|
var _ref5 = _mutantsUtil.platform || {},
|
|
498
494
|
isNewRetailBCPos = _ref5.isNewRetailBCPos;
|
|
499
495
|
|
|
496
|
+
console.log(this.dto, 'dto==========');
|
|
500
497
|
(0, _each3.default)(this.dto.RetailPaymentDetails, function (detail) {
|
|
501
498
|
var themode = (0, _find3.default)(_this5.paymode.paymodes, { 'idSettleStyle': detail.IdsettleStyle });
|
|
502
499
|
if (detail.SettleStyle.Code === PayStyle.hyczk && !themode) {
|
|
@@ -671,7 +668,7 @@ var SettlementStore = (_class = function () {
|
|
|
671
668
|
} else {
|
|
672
669
|
// 查询成功后将焦点移入下一个输入框
|
|
673
670
|
var nextInput = document.querySelector('.czk .received .input');
|
|
674
|
-
nextInput && nextInput.
|
|
671
|
+
nextInput && nextInput.select();
|
|
675
672
|
}
|
|
676
673
|
});
|
|
677
674
|
}
|
|
@@ -1173,21 +1170,19 @@ var SettlementStore = (_class = function () {
|
|
|
1173
1170
|
DataSource: { Id: _this11.dataSource }
|
|
1174
1171
|
});
|
|
1175
1172
|
if (mode.paymentType == PayStyle.djq) {
|
|
1176
|
-
(0, _each3.default)(
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
});
|
|
1190
|
-
}
|
|
1173
|
+
(0, _each3.default)(_this11.paymode.checkList && _this11.paymode.checkList.length ? _this11.paymode.checkList : _this11.paymode.currentMode.djqs, function (djq) {
|
|
1174
|
+
_this11.dto.RetailCouponDetails.push({
|
|
1175
|
+
CouponCode: djq.promoCouponCode,
|
|
1176
|
+
ReductionAmount: djq.amount,
|
|
1177
|
+
EnableAmount: djq.doorsill,
|
|
1178
|
+
CouponTitle: djq.name,
|
|
1179
|
+
IdMember: djq.UMemberID ? mode.member.id : null,
|
|
1180
|
+
LastTS: djq.LastTS,
|
|
1181
|
+
PromotionId: djq.promoId,
|
|
1182
|
+
PromotionRuleId: djq.promoRuleId,
|
|
1183
|
+
PromoCouponAllocatedId: djq.id,
|
|
1184
|
+
DataSource: { Id: _this11.dataSource }
|
|
1185
|
+
});
|
|
1191
1186
|
});
|
|
1192
1187
|
}
|
|
1193
1188
|
}
|
|
@@ -1646,40 +1641,19 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1646
1641
|
if (!q1.checked) {
|
|
1647
1642
|
this.checkList.forEach(function (ele, i) {
|
|
1648
1643
|
if (ele.id === q1.id) {
|
|
1649
|
-
// this.checkList.forEach((ele1) => {
|
|
1650
|
-
// if(ele.discountPct > 0) {
|
|
1651
|
-
// this.currentMode.receivable = this.currentMode.receivable + ele.amount / (1 - discountPct);
|
|
1652
|
-
// } else {
|
|
1653
|
-
// this.currentMode.receivable = this.currentMode.receivable + ele.amount;
|
|
1654
|
-
// }
|
|
1655
|
-
// })
|
|
1656
|
-
// if(ele.discountPct > 0) {
|
|
1657
|
-
// this.currentMode.receivable = 100;
|
|
1658
|
-
// } else {
|
|
1659
|
-
// this.currentMode.receivable = this.currentMode.receivable + ele.amount;
|
|
1660
|
-
// }
|
|
1661
1644
|
_this14.checkList.splice(i, 1);
|
|
1662
1645
|
}
|
|
1663
1646
|
});
|
|
1664
1647
|
} else {
|
|
1665
|
-
if (q1.discountPct > 0) {
|
|
1666
|
-
q1.amount = 0;
|
|
1667
|
-
}
|
|
1668
1648
|
this.checkList.push(q1);
|
|
1669
1649
|
}
|
|
1670
1650
|
|
|
1671
|
-
|
|
1672
|
-
this.checkList.forEach(function (ele, i) {
|
|
1673
|
-
if (ele.discountPct > 0) {
|
|
1674
|
-
ele.amount = (1 - ele.discountPct) * copy1;
|
|
1675
|
-
copy1 -= ele.amount;
|
|
1676
|
-
} else {
|
|
1677
|
-
copy1 -= ele.amount;
|
|
1678
|
-
}
|
|
1651
|
+
this.checkList.forEach(function (ele) {
|
|
1679
1652
|
sum = Math.Add(sum, ele.amount);
|
|
1680
1653
|
});
|
|
1681
1654
|
this.currentMode.value = (0, _utils.getFixedNumber)(Math.min(this.receivable, sum, this.currentMode.maxamount));
|
|
1682
|
-
this.
|
|
1655
|
+
console.log(this.receivable, sum, Math.min(this.receivable, sum, this.currentMode.maxamount), 'sum---------');
|
|
1656
|
+
this.currentMode.receivable = (0, _utils.getFixedNumber)(this.receivable - Math.min(this.receivable, sum, this.currentMode.maxamount));
|
|
1683
1657
|
this.currentMode.overchargesAmount = (0, _utils.getFixedNumber)(sum - this.currentMode.value);
|
|
1684
1658
|
if (params === 'single') {
|
|
1685
1659
|
return;
|
|
@@ -1734,9 +1708,12 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1734
1708
|
promoVoucher.promoLinks = this.checkList;
|
|
1735
1709
|
return (0, _tplusApi.ccApi)((0, _extends3.default)({}, promoVoucher), 'promotion/PromoCalculate/findUsefulCouponPromoList', false, false, { method: 'post', timeout_skip: true }).then(function (result) {
|
|
1736
1710
|
if (result && result.length != 0) {
|
|
1737
|
-
result.forEach(function (element) {
|
|
1738
|
-
var djq1 =
|
|
1739
|
-
|
|
1711
|
+
result.forEach(function (element, index) {
|
|
1712
|
+
var djq1 = false;
|
|
1713
|
+
_this14.currentMode.djqs.forEach(function (djq) {
|
|
1714
|
+
if (element.id === djq.id) {
|
|
1715
|
+
djq1 = true;
|
|
1716
|
+
}
|
|
1740
1717
|
});
|
|
1741
1718
|
|
|
1742
1719
|
var _ref21 = element || {},
|
|
@@ -1758,7 +1735,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1758
1735
|
promoRuleId = tieredAmountResult.promoRuleId,
|
|
1759
1736
|
couponCategoryEnum = tieredAmountResult.couponCategoryEnum;
|
|
1760
1737
|
|
|
1761
|
-
if (!djq1
|
|
1738
|
+
if (!djq1) {
|
|
1762
1739
|
// this.currentMode.djqs.push({
|
|
1763
1740
|
// promoCouponCode: element.CouponCode,
|
|
1764
1741
|
// name: element.CouponTitle,
|
|
@@ -1779,13 +1756,15 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1779
1756
|
// id
|
|
1780
1757
|
// })
|
|
1781
1758
|
_this14.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
|
|
1759
|
+
djq1 = false;
|
|
1782
1760
|
} else {
|
|
1783
|
-
_this14.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum);
|
|
1761
|
+
_this14.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
|
|
1784
1762
|
// this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
|
|
1785
1763
|
// djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
|
|
1786
1764
|
}
|
|
1787
1765
|
});
|
|
1788
1766
|
}
|
|
1767
|
+
// 优惠券【6052098985043】与【6120822326451】不可叠加使用
|
|
1789
1768
|
});
|
|
1790
1769
|
//this.receivable = getFixedNumber(this.receivable - sum);
|
|
1791
1770
|
}
|
|
@@ -1994,9 +1973,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1994
1973
|
initializer: function initializer() {
|
|
1995
1974
|
var _this17 = this;
|
|
1996
1975
|
|
|
1997
|
-
return function (id, couponNum,
|
|
1976
|
+
return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
|
|
1998
1977
|
_this17.currentMode.djqs.forEach(function (ele) {
|
|
1999
1978
|
if (ele.id === id) {
|
|
1979
|
+
promoMethodEnum == "CASH_COUPON" ? ele.amount = nominalAmount : ele.amount = promoDiscount;
|
|
2000
1980
|
ele.couponCategoryEnum = couponNum;
|
|
2001
1981
|
var IsEnable = ele.couponCategoryEnum === 'RIGUP' || ele.couponCategoryEnum === 'UN_MATCH' || ele.couponCategoryEnum === "PREPARING" || ele.couponCategoryEnum === 'PROMO_LIMITED' || ele.couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
|
|
2002
1982
|
ele.IsEnable = IsEnable;
|