@pisell/private-materials 6.11.42 → 6.11.43
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/booking/components/footer/index.js +8 -3
- package/lib/components/booking/components/footer/index.js +14 -6
- package/package.json +1 -1
|
@@ -2122,7 +2122,6 @@ var Footer = function Footer(props) {
|
|
|
2122
2122
|
* @Date: 2024-01-30 17:00
|
|
2123
2123
|
*/
|
|
2124
2124
|
var totalText = useMemo(function () {
|
|
2125
|
-
var _state$bookingDetail15;
|
|
2126
2125
|
var str = '';
|
|
2127
2126
|
|
|
2128
2127
|
// 有退款金额时, 直接展示 退款:$8.00
|
|
@@ -2135,13 +2134,19 @@ var Footer = function Footer(props) {
|
|
|
2135
2134
|
return "".concat(locales.getText('pisell2.text.deposit-paid'), " ").concat(formatAmount(state === null || state === void 0 || (_state$bookingDetail14 = state.bookingDetail) === null || _state$bookingDetail14 === void 0 ? void 0 : _state$bookingDetail14.deposit_paid_amount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'), " ").concat(total.duration ? "(".concat(total.duration, ")") : '');
|
|
2136
2135
|
}
|
|
2137
2136
|
// 如果待支付金额小于0 则展示全额支付
|
|
2138
|
-
if (total.notPaidAmount <= 0 &&
|
|
2137
|
+
if (total.notPaidAmount <= 0 && state.bookingId) {
|
|
2139
2138
|
str = "".concat(locales.getText('pisell1.text.fully-paid'), ": ").concat(formatAmount(total.sumTotalAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'));
|
|
2140
2139
|
}
|
|
2141
2140
|
|
|
2142
2141
|
// 待支付金额大于0 并且是新增时, 展示 待支付金额
|
|
2143
2142
|
if (total.notPaidAmount > 0 || !state.bookingId) {
|
|
2144
|
-
|
|
2143
|
+
var _state$bookingDetail15;
|
|
2144
|
+
// 如果是在编辑订单里操作了删除商品,会导致进入退款逻辑,这里依旧展示 fully-paid 文案
|
|
2145
|
+
if (total.dueAmount < 0 && (_state$bookingDetail15 = state.bookingDetail) !== null && _state$bookingDetail15 !== void 0 && _state$bookingDetail15.id) {
|
|
2146
|
+
str = "".concat(locales.getText('pisell1.text.fully-paid'), ": ").concat(formatAmount(total.sumTotalAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'));
|
|
2147
|
+
} else {
|
|
2148
|
+
str = "".concat(locales.getText('pisell2.text.to-pay'), ": ").concat(formatAmount(total.notPaidAmount, 2, (state === null || state === void 0 ? void 0 : state.amountSymbol) || '$'));
|
|
2149
|
+
}
|
|
2145
2150
|
}
|
|
2146
2151
|
if (total.duration) {
|
|
2147
2152
|
str = str + " (".concat(total.duration, ")");
|
|
@@ -1501,7 +1501,7 @@ var Footer = (props) => {
|
|
|
1501
1501
|
(state == null ? void 0 : state.amountSymbol) || "$"
|
|
1502
1502
|
)} ${total.duration ? `(${total.duration})` : ""}`;
|
|
1503
1503
|
}
|
|
1504
|
-
if (total.notPaidAmount <= 0 &&
|
|
1504
|
+
if (total.notPaidAmount <= 0 && state.bookingId) {
|
|
1505
1505
|
str = `${import_utils.locales.getText("pisell1.text.fully-paid")}: ${(0, import_utils.formatAmount)(
|
|
1506
1506
|
total.sumTotalAmount,
|
|
1507
1507
|
2,
|
|
@@ -1509,11 +1509,19 @@ var Footer = (props) => {
|
|
|
1509
1509
|
)}`;
|
|
1510
1510
|
}
|
|
1511
1511
|
if (total.notPaidAmount > 0 || !state.bookingId) {
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1512
|
+
if (total.dueAmount < 0 && ((_b2 = state.bookingDetail) == null ? void 0 : _b2.id)) {
|
|
1513
|
+
str = `${import_utils.locales.getText("pisell1.text.fully-paid")}: ${(0, import_utils.formatAmount)(
|
|
1514
|
+
total.sumTotalAmount,
|
|
1515
|
+
2,
|
|
1516
|
+
(state == null ? void 0 : state.amountSymbol) || "$"
|
|
1517
|
+
)}`;
|
|
1518
|
+
} else {
|
|
1519
|
+
str = `${import_utils.locales.getText("pisell2.text.to-pay")}: ${(0, import_utils.formatAmount)(
|
|
1520
|
+
total.notPaidAmount,
|
|
1521
|
+
2,
|
|
1522
|
+
(state == null ? void 0 : state.amountSymbol) || "$"
|
|
1523
|
+
)}`;
|
|
1524
|
+
}
|
|
1517
1525
|
}
|
|
1518
1526
|
if (total.duration) {
|
|
1519
1527
|
str = str + ` (${total.duration})`;
|