202507251746

This commit is contained in:
张潘 2025-08-13 22:45:57 +08:00
parent 90268bd97b
commit 64d1cd8fad
3 changed files with 312 additions and 123 deletions

View File

@ -54,6 +54,38 @@ public class UsersPayBeforController extends BaseController
@Autowired @Autowired
private RefundUtil refundUtil; private RefundUtil refundUtil;
/**
* 安全地解析BigDecimal参数
*/
private BigDecimal parseBigDecimalSafely(Object obj) {
if (obj == null) {
return BigDecimal.ZERO;
}
try {
if (obj instanceof BigDecimal) {
return (BigDecimal) obj;
} else if (obj instanceof Number) {
return new BigDecimal(obj.toString());
} else if (obj instanceof String) {
String str = ((String) obj).trim();
if (str.isEmpty() || "0".equals(str) || "0.00".equals(str)) {
return BigDecimal.ZERO;
}
return new BigDecimal(str);
} else {
String str = obj.toString().trim();
if (str.isEmpty() || "0".equals(str) || "0.00".equals(str)) {
return BigDecimal.ZERO;
}
return new BigDecimal(str);
}
} catch (NumberFormatException e) {
System.err.println("无法解析BigDecimal: " + obj + ", 错误: " + e.getMessage());
return BigDecimal.ZERO;
}
}
/** /**
* 查询预支付列表 * 查询预支付列表
*/ */
@ -238,25 +270,58 @@ public class UsersPayBeforController extends BaseController
// 添加调试日志 // 添加调试日志
System.out.println("=== 统一退款接口开始 ==="); System.out.println("=== 统一退款接口开始 ===");
System.out.println("接收到的参数: " + params); System.out.println("接收到的参数: " + params);
String orderId = params.get("orderId") == null ? null : params.get("orderId").toString(); String orderId = params.get("orderId") == null ? null : params.get("orderId").toString();
BigDecimal wechatRefund = params.get("wechatRefund") == null ? BigDecimal.ZERO : new BigDecimal(params.get("wechatRefund").toString());
BigDecimal balanceRefund = params.get("balanceRefund") == null ? BigDecimal.ZERO : new BigDecimal(params.get("balanceRefund").toString()); // 修复确保BigDecimal转换正确处理可能的null值和类型问题
BigDecimal shoppingGoldRefund = params.get("shoppingGoldRefund") == null ? BigDecimal.ZERO : new BigDecimal(params.get("shoppingGoldRefund").toString()); BigDecimal wechatRefund = BigDecimal.ZERO;
BigDecimal serviceGoldRefund = params.get("serviceGoldRefund") == null ? BigDecimal.ZERO : new BigDecimal(params.get("serviceGoldRefund").toString()); BigDecimal balanceRefund = BigDecimal.ZERO;
BigDecimal memberDiscountRefund = params.get("memberDiscountRefund") == null ? BigDecimal.ZERO : new BigDecimal(params.get("memberDiscountRefund").toString()); BigDecimal shoppingGoldRefund = BigDecimal.ZERO;
BigDecimal couponRefund = params.get("couponRefund") == null ? BigDecimal.ZERO : new BigDecimal(params.get("couponRefund").toString()); BigDecimal serviceGoldRefund = BigDecimal.ZERO;
BigDecimal memberDiscountRefund = BigDecimal.ZERO;
BigDecimal couponRefund = BigDecimal.ZERO;
try {
Object wxObj = params.get("wechatRefund");
Object balanceObj = params.get("balanceRefund");
Object shopObj = params.get("shoppingGoldRefund");
Object serviceObj = params.get("serviceGoldRefund");
Object memberObj = params.get("memberDiscountRefund");
Object couponObj = params.get("couponRefund");
System.out.println("=== 参数对象类型检查 ===");
System.out.println("wechatRefund对象: " + wxObj + " (类型: " + (wxObj != null ? wxObj.getClass().getName() : "null") + ")");
System.out.println("balanceRefund对象: " + balanceObj + " (类型: " + (balanceObj != null ? balanceObj.getClass().getName() : "null") + ")");
System.out.println("shoppingGoldRefund对象: " + shopObj + " (类型: " + (shopObj != null ? shopObj.getClass().getName() : "null") + ")");
System.out.println("serviceGoldRefund对象: " + serviceObj + " (类型: " + (serviceObj != null ? serviceObj.getClass().getName() : "null") + ")");
System.out.println("memberDiscountRefund对象: " + memberObj + " (类型: " + (memberObj != null ? memberObj.getClass().getName() : "null") + ")");
System.out.println("couponRefund对象: " + couponObj + " (类型: " + (couponObj != null ? couponObj.getClass().getName() : "null") + ")");
// 安全的BigDecimal转换
wechatRefund = parseBigDecimalSafely(wxObj);
balanceRefund = parseBigDecimalSafely(balanceObj);
shoppingGoldRefund = parseBigDecimalSafely(shopObj);
serviceGoldRefund = parseBigDecimalSafely(serviceObj);
memberDiscountRefund = parseBigDecimalSafely(memberObj);
couponRefund = parseBigDecimalSafely(couponObj);
} catch (Exception e) {
System.err.println("参数转换异常: " + e.getMessage());
e.printStackTrace();
return error("参数转换失败:" + e.getMessage());
}
String refundRemark = params.get("refundRemark") == null ? "" : params.get("refundRemark").toString(); String refundRemark = params.get("refundRemark") == null ? "" : params.get("refundRemark").toString();
// 添加参数解析后的调试日志 // 添加参数解析后的调试日志
System.out.println("解析后的参数:"); System.out.println("=== 解析后的参数 ===");
System.out.println(" orderId: " + orderId); System.out.println(" orderId: " + orderId);
System.out.println(" wechatRefund: " + wechatRefund); System.out.println(" wechatRefund: " + wechatRefund + " (类型: " + wechatRefund.getClass().getName() + ")");
System.out.println(" balanceRefund: " + balanceRefund); System.out.println(" balanceRefund: " + balanceRefund + " (类型: " + balanceRefund.getClass().getName() + ")");
System.out.println(" shoppingGoldRefund: " + shoppingGoldRefund); System.out.println(" shoppingGoldRefund: " + shoppingGoldRefund + " (类型: " + shoppingGoldRefund.getClass().getName() + ")");
System.out.println(" serviceGoldRefund: " + serviceGoldRefund); System.out.println(" serviceGoldRefund: " + serviceGoldRefund + " (类型: " + serviceGoldRefund.getClass().getName() + ")");
System.out.println(" memberDiscountRefund: " + memberDiscountRefund); System.out.println(" memberDiscountRefund: " + memberDiscountRefund + " (类型: " + memberDiscountRefund.getClass().getName() + ")");
System.out.println(" couponRefund: " + couponRefund); System.out.println(" couponRefund: " + couponRefund + " (类型: " + couponRefund.getClass().getName() + ")");
System.out.println(" refundRemark: " + refundRemark); System.out.println(" refundRemark: " + refundRemark);
if (orderId == null || orderId.trim().isEmpty()) { if (orderId == null || orderId.trim().isEmpty()) {
@ -301,6 +366,7 @@ public class UsersPayBeforController extends BaseController
// } // }
List<UsersPayBefor> payRecords = usersPayBeforService.selectPayDetailsByOrderId(orderId); List<UsersPayBefor> payRecords = usersPayBeforService.selectPayDetailsByOrderId(orderId);
System.out.println("000%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"+payRecords.size());
if (payRecords == null || payRecords.isEmpty()) { if (payRecords == null || payRecords.isEmpty()) {
return error("未找到支付记录"); return error("未找到支付记录");
} }
@ -308,11 +374,12 @@ public class UsersPayBeforController extends BaseController
// 计算已退款金额 // 计算已退款金额
BigDecimal totalRefunded = BigDecimal.ZERO; BigDecimal totalRefunded = BigDecimal.ZERO;
for (UsersPayBefor record : payRecords) { for (UsersPayBefor record : payRecords) {
System.out.println("111%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"+record.getReturnmoney());
if (record.getReturnmoney() != null) { if (record.getReturnmoney() != null) {
totalRefunded = totalRefunded.add(record.getReturnmoney()); totalRefunded = totalRefunded.add(record.getReturnmoney());
} }
} }
System.out.println("222%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"+totalRefunded);
// 计算总支付金额减去会员优惠因为会员优惠不参与退款 // 计算总支付金额减去会员优惠因为会员优惠不参与退款
BigDecimal totalPaid = BigDecimal.ZERO; BigDecimal totalPaid = BigDecimal.ZERO;
BigDecimal totalMemberDiscount = BigDecimal.ZERO; BigDecimal totalMemberDiscount = BigDecimal.ZERO;
@ -325,17 +392,56 @@ public class UsersPayBeforController extends BaseController
totalMemberDiscount = totalMemberDiscount.add(record.getMembermoney()); totalMemberDiscount = totalMemberDiscount.add(record.getMembermoney());
} }
} }
// 实际可退款金额 = 总支付金额 - 会员优惠金额 // 实际可退款金额 = 总支付金额 - 会员优惠金额
BigDecimal actualRefundableAmount = totalPaid.subtract(totalMemberDiscount); BigDecimal actualRefundableAmount = totalPaid.subtract(totalMemberDiscount);
//退款金额不能超过剩余可退款金额剩余可退款10.90总支付199.00会员优惠9.90已退款178.20
// 验证退款金额不能超过剩余可退款金额基于实际可退金额 // 验证退款金额不能超过剩余可退款金额基于实际可退金额
BigDecimal remainingRefundable = actualRefundableAmount.subtract(totalRefunded); BigDecimal remainingRefundable = actualRefundableAmount.subtract(totalRefunded);
if (totalRefund.compareTo(remainingRefundable) > 0) { if (totalRefund.compareTo(remainingRefundable) > 0) {
return error("退款金额不能超过剩余可退款金额,剩余可退款:¥" + remainingRefundable + return error("退款金额不能超过剩余可退款金额,剩余可退款:¥" + remainingRefundable +
"(总支付:¥" + totalPaid + ",会员优惠:¥" + totalMemberDiscount + ",已退款:¥" + totalRefunded + ""); "(总支付:¥" + totalPaid + ",会员优惠:¥" + totalMemberDiscount + ",已退款:¥" + totalRefunded + "");
} }
// 添加关键验证确保各项退款金额不超过对应的支付金额
System.out.println("=== 退款金额验证 ===");
System.out.println("微信退款: " + wechatRefund + " vs 微信支付: " + paymentInfo.getWxmoney());
System.out.println("余额退款: " + balanceRefund + " vs 余额支付: " + paymentInfo.getYemoney());
System.out.println("购物金退款: " + shoppingGoldRefund + " vs 购物金: " + paymentInfo.getShopmoney());
System.out.println("服务金退款: " + serviceGoldRefund + " vs 服务金: " + paymentInfo.getServicemoney());
System.out.println("优惠券退款: " + couponRefund + " vs 优惠券: " + paymentInfo.getCouponmoney());
// 验证各项退款金额不超过对应的支付金额
if (wechatRefund.compareTo(BigDecimal.ZERO) > 0 &&
paymentInfo.getWxmoney() != null &&
wechatRefund.compareTo(paymentInfo.getWxmoney()) > 0) {
return error("微信退款金额不能超过微信支付金额");
}
if (balanceRefund.compareTo(BigDecimal.ZERO) > 0 &&
paymentInfo.getYemoney() != null &&
balanceRefund.compareTo(paymentInfo.getYemoney()) > 0) {
return error("余额退款金额不能超过余额支付金额");
}
if (shoppingGoldRefund.compareTo(BigDecimal.ZERO) > 0 &&
paymentInfo.getShopmoney() != null &&
shoppingGoldRefund.compareTo(paymentInfo.getShopmoney()) > 0) {
return error("购物金退款金额不能超过购物金金额");
}
if (serviceGoldRefund.compareTo(BigDecimal.ZERO) > 0 &&
paymentInfo.getServicemoney() != null &&
serviceGoldRefund.compareTo(paymentInfo.getServicemoney()) > 0) {
return error("服务金退款金额不能超过服务金金额");
}
if (couponRefund.compareTo(BigDecimal.ZERO) > 0 &&
paymentInfo.getCouponmoney() != null &&
couponRefund.compareTo(paymentInfo.getCouponmoney()) > 0) {
return error("优惠券退款金额不能超过优惠券金额");
}
// 记录退款日志 // 记录退款日志
OrderLog orderLog = new OrderLog(); OrderLog orderLog = new OrderLog();
orderLog.setOrderId(orderId); orderLog.setOrderId(orderId);
@ -401,77 +507,111 @@ public class UsersPayBeforController extends BaseController
BigDecimal remainingShoppingGoldRefund = shoppingGoldRefund; BigDecimal remainingShoppingGoldRefund = shoppingGoldRefund;
BigDecimal remainingServiceGoldRefund = serviceGoldRefund; BigDecimal remainingServiceGoldRefund = serviceGoldRefund;
BigDecimal remainingCouponRefund = couponRefund; BigDecimal remainingCouponRefund = couponRefund;
// 修复正确计算各项支付方式的退款金额
for (UsersPayBefor record : payRecords) { for (UsersPayBefor record : payRecords) {
BigDecimal currentRefunded = record.getReturnmoney() != null ? record.getReturnmoney() : BigDecimal.ZERO; BigDecimal currentRefunded = record.getReturnmoney() != null ? record.getReturnmoney() : BigDecimal.ZERO;
// 计算本次退款中该记录应承担的退款金额 // 计算本次退款中该记录应承担的退款金额
BigDecimal recordRefundAmount = BigDecimal.ZERO; BigDecimal recordRefundAmount = BigDecimal.ZERO;
// 根据该记录的支付方式分配退款金额 // 根据该记录的支付方式分配退款金额
if (record.getWxmoney() != null && record.getWxmoney().compareTo(BigDecimal.ZERO) > 0) { if (record.getWxmoney() != null && record.getWxmoney().compareTo(BigDecimal.ZERO) > 0) {
BigDecimal wxRefund = remainingWechatRefund.min(record.getWxmoney().subtract(currentRefunded)); // 修复计算该记录微信支付的剩余可退款金额
if (wxRefund.compareTo(BigDecimal.ZERO) > 0) { BigDecimal wxRemaining = record.getWxmoney().subtract(currentRefunded);
if (wxRemaining.compareTo(BigDecimal.ZERO) > 0 && remainingWechatRefund.compareTo(BigDecimal.ZERO) > 0) {
BigDecimal wxRefund = remainingWechatRefund.min(wxRemaining);
recordRefundAmount = recordRefundAmount.add(wxRefund); recordRefundAmount = recordRefundAmount.add(wxRefund);
remainingWechatRefund = remainingWechatRefund.subtract(wxRefund); remainingWechatRefund = remainingWechatRefund.subtract(wxRefund);
} }
} }
if (record.getYemoney() != null && record.getYemoney().compareTo(BigDecimal.ZERO) > 0) { if (record.getYemoney() != null && record.getYemoney().compareTo(BigDecimal.ZERO) > 0) {
BigDecimal yeRefund = remainingBalanceRefund.min(record.getYemoney().subtract(currentRefunded)); // 修复计算该记录余额支付的剩余可退款金额
if (yeRefund.compareTo(BigDecimal.ZERO) > 0) { BigDecimal yeRemaining = record.getYemoney().subtract(currentRefunded);
if (yeRemaining.compareTo(BigDecimal.ZERO) > 0 && remainingBalanceRefund.compareTo(BigDecimal.ZERO) > 0) {
BigDecimal yeRefund = remainingBalanceRefund.min(yeRemaining);
recordRefundAmount = recordRefundAmount.add(yeRefund); recordRefundAmount = recordRefundAmount.add(yeRefund);
remainingBalanceRefund = remainingBalanceRefund.subtract(yeRefund); remainingBalanceRefund = remainingBalanceRefund.subtract(yeRefund);
} }
} }
if (record.getShopmoney() != null && record.getShopmoney().compareTo(BigDecimal.ZERO) > 0) { if (record.getShopmoney() != null && record.getShopmoney().compareTo(BigDecimal.ZERO) > 0) {
BigDecimal shopRefund = remainingShoppingGoldRefund.min(record.getShopmoney().subtract(currentRefunded)); // 修复计算该记录购物金的剩余可退款金额
if (shopRefund.compareTo(BigDecimal.ZERO) > 0) { BigDecimal shopRemaining = record.getShopmoney().subtract(currentRefunded);
if (shopRemaining.compareTo(BigDecimal.ZERO) > 0 && remainingShoppingGoldRefund.compareTo(BigDecimal.ZERO) > 0) {
BigDecimal shopRefund = remainingShoppingGoldRefund.min(shopRemaining);
recordRefundAmount = recordRefundAmount.add(shopRefund); recordRefundAmount = recordRefundAmount.add(shopRefund);
remainingShoppingGoldRefund = remainingShoppingGoldRefund.subtract(shopRefund); remainingShoppingGoldRefund = remainingShoppingGoldRefund.subtract(shopRefund);
} }
} }
if (record.getServicemoney() != null && record.getServicemoney().compareTo(BigDecimal.ZERO) > 0) { if (record.getServicemoney() != null && record.getServicemoney().compareTo(BigDecimal.ZERO) > 0) {
BigDecimal serviceRefund = remainingServiceGoldRefund.min(record.getServicemoney().subtract(currentRefunded)); // 修复计算该记录服务金的剩余可退款金额
if (serviceRefund.compareTo(BigDecimal.ZERO) > 0) { BigDecimal serviceRemaining = record.getServicemoney().subtract(currentRefunded);
if (serviceRemaining.compareTo(BigDecimal.ZERO) > 0 && remainingServiceGoldRefund.compareTo(BigDecimal.ZERO) > 0) {
BigDecimal serviceRefund = remainingServiceGoldRefund.min(serviceRemaining);
recordRefundAmount = recordRefundAmount.add(serviceRefund); recordRefundAmount = recordRefundAmount.add(serviceRefund);
remainingServiceGoldRefund = remainingServiceGoldRefund.subtract(serviceRefund); remainingServiceGoldRefund = remainingServiceGoldRefund.subtract(serviceRefund);
} }
} }
if (record.getCouponmoney() != null && record.getCouponmoney().compareTo(BigDecimal.ZERO) > 0) { if (record.getCouponmoney() != null && record.getCouponmoney().compareTo(BigDecimal.ZERO) > 0) {
BigDecimal couponRefundAmount = remainingCouponRefund.min(record.getCouponmoney().subtract(currentRefunded)); // 修复计算该记录优惠券的剩余可退款金额
if (couponRefundAmount.compareTo(BigDecimal.ZERO) > 0) { BigDecimal couponRemaining = record.getCouponmoney().subtract(currentRefunded);
if (couponRemaining.compareTo(BigDecimal.ZERO) > 0 && remainingCouponRefund.compareTo(BigDecimal.ZERO) > 0) {
BigDecimal couponRefundAmount = remainingCouponRefund.min(couponRemaining);
recordRefundAmount = recordRefundAmount.add(couponRefundAmount); recordRefundAmount = recordRefundAmount.add(couponRefundAmount);
remainingCouponRefund = remainingCouponRefund.subtract(couponRefundAmount); remainingCouponRefund = remainingCouponRefund.subtract(couponRefundAmount);
} }
} }
// 如果该记录有退款金额则更新 // 如果该记录有退款金额则更新
if (recordRefundAmount.compareTo(BigDecimal.ZERO) > 0) { if (recordRefundAmount.compareTo(BigDecimal.ZERO) > 0) {
BigDecimal newTotalRefunded = currentRefunded.add(recordRefundAmount); BigDecimal newTotalRefunded = currentRefunded.add(recordRefundAmount);
// 如果累计退款金额等于或超过支付金额设置为已退款状态 // 如果累计退款金额等于或超过支付金额设置为已退款状态
if (newTotalRefunded.compareTo(record.getAllmoney()) >= 0) { if (newTotalRefunded.compareTo(record.getAllmoney()) >= 0) {
record.setStatus(3L); // 完全退款 record.setStatus(3L); // 完全退款
} else { } else {
record.setStatus(2L); // 部分退款 record.setStatus(2L); // 部分退款
} }
record.setReturnmoney(newTotalRefunded); record.setReturnmoney(newTotalRefunded);
usersPayBeforService.updateUsersPayBefor(record); usersPayBeforService.updateUsersPayBefor(record);
System.out.println("更新支付记录: ID=" + record.getId() +
", 原退款金额=" + currentRefunded +
", 本次退款=" + recordRefundAmount +
", 新总退款=" + newTotalRefunded +
", 状态=" + record.getStatus());
} }
} }
// 调用退款工具方法实现真实的业务退款与金额变动 // 调用退款工具方法实现真实的业务退款与金额变动
// 使用原始参数而不是被修改的副本 // 使用原始参数而不是被修改的副本
System.out.println("=== 调用退款工具方法前的参数验证 ===");
System.out.println("原始退款参数:");
System.out.println(" orderId: " + orderId);
System.out.println(" wechatRefund: " + wechatRefund);
System.out.println(" balanceRefund: " + balanceRefund);
System.out.println(" shoppingGoldRefund: " + shoppingGoldRefund);
System.out.println(" serviceGoldRefund: " + serviceGoldRefund);
System.out.println(" memberDiscountRefund: " + memberDiscountRefund);
System.out.println(" couponRefund: " + couponRefund);
System.out.println(" refundRemark: " + refundRemark);
// 验证参数类型和值
System.out.println("参数类型检查:");
System.out.println(" balanceRefund类型: " + balanceRefund.getClass().getName());
System.out.println(" balanceRefund值: " + balanceRefund);
System.out.println(" balanceRefund比较0: " + balanceRefund.compareTo(BigDecimal.ZERO));
Map<String, Object> refundResult = refundUtil.processUnifiedRefund( Map<String, Object> refundResult = refundUtil.processUnifiedRefund(
orderId, wechatRefund, balanceRefund, shoppingGoldRefund, orderId, wechatRefund, balanceRefund, shoppingGoldRefund,
serviceGoldRefund, memberDiscountRefund, couponRefund, refundRemark serviceGoldRefund, memberDiscountRefund, couponRefund, refundRemark
); );
if (refundResult != null && (Boolean) refundResult.get("success")) { if (refundResult != null && (Boolean) refundResult.get("success")) {
return success("退款成功"); return success("退款成功");
} else { } else {

View File

@ -9,8 +9,17 @@
<div class="payment-info" v-if="actualPaymentData"> <div class="payment-info" v-if="actualPaymentData">
<h4>支付信息</h4> <h4>支付信息</h4>
<!-- 调试信息 --> <!-- &lt;!&ndash; 调试信息 &ndash;&gt;-->
<!-- <div class="debug-info" style="background: #f0f9ff; padding: 10px; margin-bottom: 15px; border-radius: 4px; font-size: 12px;">-->
<!-- <div>调试信息</div>-->
<!-- <div>allmoney: {{ actualPaymentData.allmoney }}</div>-->
<!-- <div>wxmoney: {{ actualPaymentData.wxmoney }}</div>-->
<!-- <div>yemoney: {{ actualPaymentData.yemoney }}</div>-->
<!-- <div>shopmoney: {{ actualPaymentData.shopmoney }}</div>-->
<!-- <div>servicemoney: {{ actualPaymentData.servicemoney }}</div>-->
<!-- <div>couponmoney: {{ actualPaymentData.couponmoney }}</div>-->
<!-- <div>membermoney: {{ actualPaymentData.membermoney }}</div>-->
<!-- </div>-->
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
@ -46,7 +55,7 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<!-- 会员优惠单独显示仅当不为0时 --> <!-- 会员优惠单独显示仅当不为0时 -->
<div v-if="actualPaymentData.membermoney && parseFloat(actualPaymentData.membermoney) > 0" class="member-discount-row"> <div v-if="actualPaymentData.membermoney && parseFloat(actualPaymentData.membermoney) > 0" class="member-discount-row">
<div class="member-discount-item"> <div class="member-discount-item">
@ -56,7 +65,7 @@
</div> </div>
<div class="total-amount"> <div class="total-amount">
<label>总支付金额</label> <label>总支付金额</label>
<span class="amount total">{{ formatAmount(totalPaymentAmount) }}</span> <span class="amount total">{{ formatAmount(actualPaymentData.allmoney) }}</span>
</div> </div>
<!-- 退款统计信息 --> <!-- 退款统计信息 -->
@ -76,7 +85,7 @@
</el-col> </el-col>
</el-row> </el-row>
<div class="summary-note"> <div class="summary-note">
<span class="note-text">💡 实际可退款金额{{ formatAmount(actualRefundableAmount) }}总支付{{ formatAmount(totalPaymentAmount) }} - 会员优惠{{ formatAmount(actualPaymentData.membermoney || 0) }}</span> <span class="note-text">💡 实际可退款金额{{ formatAmount(actualRefundableAmount) }}总支付{{ formatAmount(actualPaymentData.allmoney) }} - 会员优惠{{ formatAmount(actualPaymentData.membermoney || 0) }}</span>
</div> </div>
<!-- <div class="summary-extra">--> <!-- <div class="summary-extra">-->
<!-- <span class="refund-count">退款次数{{ refundHistory.length }}</span>--> <!-- <span class="refund-count">退款次数{{ refundHistory.length }}</span>-->
@ -274,7 +283,7 @@
<div class="timeline-header"> <div class="timeline-header">
<div class="header-title"> <div class="header-title">
<span class="title-text">退款记录 #{{ index + 1 }}</span> <span class="title-text">退款记录 #{{ index + 1 }}</span>
<span class="title-time">&nbsp;&nbsp;&nbsp;{{ formatTime(item.createdAt) }}</span> <span class="title-time">&nbsp;&nbsp;&nbsp;{{ formatTime(item.createTime) }}</span>
</div> </div>
<!-- <div class="header-actions">--> <!-- <div class="header-actions">-->
<!-- <el-button--> <!-- <el-button-->
@ -395,18 +404,17 @@ export default {
computed: { computed: {
totalPaymentAmount() { totalPaymentAmount() {
if (!this.actualPaymentData) return "0.00"; if (!this.actualPaymentData) return "0.00";
const total = (this.actualPaymentData.wxmoney || 0) + (this.actualPaymentData.yemoney || 0) + // allmoney
(this.actualPaymentData.shopmoney || 0) + (this.actualPaymentData.servicemoney || 0) + return this.formatAmount(this.actualPaymentData.allmoney);
(this.actualPaymentData.membermoney || 0) + (this.actualPaymentData.couponmoney || 0);
return total.toFixed(2);
}, },
// 退 // 退
actualRefundableAmount() { actualRefundableAmount() {
if (!this.actualPaymentData) return "0.00"; if (!this.actualPaymentData) return "0.00";
const allMoney = parseFloat(this.actualPaymentData.allmoney || 0);
const memberDiscount = parseFloat(this.actualPaymentData.membermoney || 0); const memberDiscount = parseFloat(this.actualPaymentData.membermoney || 0);
const total = parseFloat(this.totalPaymentAmount); // 退 = allmoney -
return (total - memberDiscount).toFixed(2); return (allMoney - memberDiscount).toFixed(2);
}, },
canRefund() { canRefund() {
@ -625,10 +633,24 @@ export default {
this.actualPaymentData = response.data; this.actualPaymentData = response.data;
console.log('支付数据加载成功:', this.actualPaymentData); console.log('支付数据加载成功:', this.actualPaymentData);
//
if (!this.actualPaymentData.allmoney) {
console.warn('警告支付数据缺少allmoney字段');
this.$message.warning("支付数据不完整,请检查数据源");
}
// 退 // 退
this.refundHistory = []; this.refundHistory = [];
this.totalRefundedAmount = "0.00"; this.totalRefundedAmount = "0.00";
this.remainingRefundableAmount = this.actualRefundableAmount; // 退 = allmoney - 退
const allMoney = parseFloat(this.actualPaymentData.allmoney || 0);
const memberDiscount = parseFloat(this.actualPaymentData.membermoney || 0);
this.remainingRefundableAmount = (allMoney - memberDiscount).toFixed(2);
console.log('初始计算:');
console.log(' allmoney:', allMoney);
console.log(' 会员优惠:', memberDiscount);
console.log(' 初始剩余可退款:', this.remainingRefundableAmount);
// 退 // 退
await this.loadRefundHistory(); await this.loadRefundHistory();
@ -710,9 +732,12 @@ export default {
console.warn('响应码:', response.code, '响应消息:', response.msg); console.warn('响应码:', response.code, '响应消息:', response.msg);
if (attempt === maxRetries) { // if (attempt === maxRetries) { //
this.refundHistory = []; this.refundHistory = [];
this.totalRefundedAmount = "0.00"; this.totalRefundedAmount = "0.00";
this.remainingRefundableAmount = this.totalPaymentAmount; // 使
const allMoney = parseFloat(this.actualPaymentData.allmoney || 0);
const memberDiscount = parseFloat(this.actualPaymentData.membermoney || 0);
this.remainingRefundableAmount = (allMoney - memberDiscount).toFixed(2);
this.refundHistoryError = response.msg || "加载退款历史失败"; this.refundHistoryError = response.msg || "加载退款历史失败";
this.errorDetails = { this.errorDetails = {
code: response.code, code: response.code,
@ -726,13 +751,16 @@ export default {
await new Promise(resolve => setTimeout(resolve, delay)); await new Promise(resolve => setTimeout(resolve, delay));
} }
} }
} catch (error) { } catch (error) {
console.error(`加载退款历史失败,第${attempt}次尝试:`, error); console.error(`加载退款历史失败,第${attempt}次尝试:`, error);
if (attempt === maxRetries) { // if (attempt === maxRetries) { //
this.refundHistory = []; this.refundHistory = [];
this.totalRefundedAmount = "0.00"; this.totalRefundedAmount = "0.00";
this.remainingRefundableAmount = this.totalPaymentAmount; // 使
const allMoney = parseFloat(this.actualPaymentData.allmoney || 0);
const memberDiscount = parseFloat(this.actualPaymentData.membermoney || 0);
this.remainingRefundableAmount = (allMoney - memberDiscount).toFixed(2);
this.refundHistoryError = "加载退款历史失败,请稍后再试"; this.refundHistoryError = "加载退款历史失败,请稍后再试";
this.errorDetails = { this.errorDetails = {
code: 'N/A', code: 'N/A',
@ -798,14 +826,22 @@ export default {
}); });
this.totalRefundedAmount = total.toFixed(2); this.totalRefundedAmount = total.toFixed(2);
// 退退 - 退 // 退 = allmoney - - returnmoney
const actualRefundable = parseFloat(this.actualRefundableAmount); const allMoney = parseFloat(this.actualPaymentData.allmoney || 0);
const memberDiscount = parseFloat(this.actualPaymentData.membermoney || 0);
const totalRefunded = parseFloat(this.totalRefundedAmount); const totalRefunded = parseFloat(this.totalRefundedAmount);
const remaining = Math.max(0, actualRefundable - totalRefunded);
// allmoney - - returnmoney
const remaining = Math.max(0, allMoney - memberDiscount - totalRefunded);
this.remainingRefundableAmount = remaining.toFixed(2); this.remainingRefundableAmount = remaining.toFixed(2);
console.log('累计退款金额:', this.totalRefundedAmount, '实际可退款金额:', this.actualRefundableAmount, '剩余可退款:', this.remainingRefundableAmount); console.log('计算详情:');
console.log(' allmoney:', allMoney);
console.log(' 会员优惠:', memberDiscount);
console.log(' 累计已退款:', totalRefunded);
console.log(' 剩余可退款:', this.remainingRefundableAmount);
console.log(' 计算公式: allmoney - 优惠金额 - returnmoney =', allMoney, '-', memberDiscount, '-', totalRefunded, '=', remaining);
}, },
initForm() { initForm() {
@ -821,38 +857,40 @@ export default {
this.refundForm.serviceGoldRefund = ""; this.refundForm.serviceGoldRefund = "";
this.refundForm.couponRefund = "0"; // 退 this.refundForm.couponRefund = "0"; // 退
this.refundForm.refundRemark = ""; this.refundForm.refundRemark = "";
// 退退 // 退退
if (this.refundHistory.length > 0) { if (this.refundHistory.length > 0) {
this.calculateTotalRefunded(); this.calculateTotalRefunded();
} else { } else {
// 退 // 退allmoney -
this.remainingRefundableAmount = this.actualRefundableAmount; const allMoney = parseFloat(this.actualPaymentData.allmoney || 0);
const memberDiscount = parseFloat(this.actualPaymentData.membermoney || 0);
this.remainingRefundableAmount = (allMoney - memberDiscount).toFixed(2);
} }
this.calculateTotalRefund(); this.calculateTotalRefund();
}, },
calculateTotalRefund() { calculateTotalRefund() {
console.log('=== 开始计算总退款金额 ==='); console.log('=== 开始计算总退款金额 ===');
console.log('refundForm:', this.refundForm); console.log('refundForm:', this.refundForm);
const wechatAmount = parseFloat(this.refundForm.wechatRefund) || 0; const wechatAmount = parseFloat(this.refundForm.wechatRefund) || 0;
const balanceAmount = parseFloat(this.refundForm.balanceRefund) || 0; const balanceAmount = parseFloat(this.refundForm.balanceRefund) || 0;
const shoppingAmount = parseFloat(this.refundForm.shoppingGoldRefund) || 0; const shoppingAmount = parseFloat(this.refundForm.shoppingGoldRefund) || 0;
const serviceAmount = parseFloat(this.refundForm.serviceGoldRefund) || 0; const serviceAmount = parseFloat(this.refundForm.serviceGoldRefund) || 0;
const couponAmount = parseFloat(this.refundForm.couponRefund === '1' ? this.actualPaymentData.couponmoney : 0) || 0; const couponAmount = parseFloat(this.refundForm.couponRefund === '1' ? this.actualPaymentData.couponmoney : 0) || 0;
console.log('各项金额:'); console.log('各项金额:');
console.log(' 微信退款:', wechatAmount); console.log(' 微信退款:', wechatAmount);
console.log(' 余额退款:', balanceAmount); console.log(' 余额退款:', balanceAmount);
console.log(' 购物金退款:', shoppingAmount); console.log(' 购物金退款:', shoppingAmount);
console.log(' 服务金退款:', serviceAmount); console.log(' 服务金退款:', serviceAmount);
console.log(' 优惠券退款:', couponAmount); console.log(' 优惠券退款:', couponAmount);
const total = wechatAmount + balanceAmount + shoppingAmount + serviceAmount + couponAmount; const total = wechatAmount + balanceAmount + shoppingAmount + serviceAmount + couponAmount;
this.totalRefundAmount = total.toFixed(2); this.totalRefundAmount = total.toFixed(2);
console.log('总退款金额:', this.totalRefundAmount); console.log('总退款金额:', this.totalRefundAmount);
}, },
@ -883,7 +921,7 @@ export default {
console.log('=== 开始确认退款 ==='); console.log('=== 开始确认退款 ===');
console.log('refundForm:', this.refundForm); console.log('refundForm:', this.refundForm);
console.log('actualPaymentData:', this.actualPaymentData); console.log('actualPaymentData:', this.actualPaymentData);
const params = { const params = {
orderId: this.orderId, orderId: this.orderId,
wechatRefund: this.refundForm.wechatRefund || "0", wechatRefund: this.refundForm.wechatRefund || "0",
@ -894,17 +932,28 @@ export default {
refundRemark: this.refundForm.refundRemark refundRemark: this.refundForm.refundRemark
}; };
console.log('构建的参数:', params); //
console.log('参数类型检查:'); console.log('=== 参数验证和转换 ===');
console.log(' orderId:', typeof params.orderId, params.orderId); console.log('原始表单数据:', this.refundForm);
console.log(' wechatRefund:', typeof params.wechatRefund, params.wechatRefund);
console.log(' balanceRefund:', typeof params.balanceRefund, params.balanceRefund);
console.log(' shoppingGoldRefund:', typeof params.shoppingGoldRefund, params.shoppingGoldRefund);
console.log(' serviceGoldRefund:', typeof params.serviceGoldRefund, params.serviceGoldRefund);
console.log(' couponRefund:', typeof params.couponRefund, params.couponRefund);
console.log(' refundRemark:', typeof params.refundRemark, params.refundRemark);
const response = await unifiedRefund(params); //
const validatedParams = {
orderId: this.orderId,
wechatRefund: parseFloat(this.refundForm.wechatRefund || "0").toFixed(2),
balanceRefund: parseFloat(this.refundForm.balanceRefund || "0").toFixed(2),
shoppingGoldRefund: parseFloat(this.refundForm.shoppingGoldRefund || "0").toFixed(2),
serviceGoldRefund: parseFloat(this.refundForm.serviceGoldRefund || "0").toFixed(2),
couponRefund: this.refundForm.couponRefund === '1' ? parseFloat(this.actualPaymentData.couponmoney || "0").toFixed(2) : "0.00",
refundRemark: this.refundForm.refundRemark
};
console.log('验证后的参数:', validatedParams);
console.log('参数类型检查:');
console.log(' balanceRefund:', typeof validatedParams.balanceRefund, validatedParams.balanceRefund);
console.log(' balanceRefund数值:', parseFloat(validatedParams.balanceRefund));
// 使
const response = await unifiedRefund(validatedParams);
console.log('退款接口响应:', response); console.log('退款接口响应:', response);
@ -912,8 +961,8 @@ export default {
this.$message.success("退款成功"); this.$message.success("退款成功");
this.$emit("success", response.data); this.$emit("success", response.data);
// 退 // 退
await this.loadRefundHistory(); await this.loadPaymentData();
this.handleClose(); this.handleClose();
} else { } else {
@ -1191,11 +1240,11 @@ export default {
.payment-info h4 { margin: 0 0 15px 0; color: #303133; font-size: 16px; font-weight: 600; } .payment-info h4 { margin: 0 0 15px 0; color: #303133; font-size: 16px; font-weight: 600; }
.info-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding: 8px 0; } .info-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding: 8px 0; }
.info-item label { font-weight: 500; color: #606266; min-width: 80px; } .info-item label { font-weight: 500; color: #606266; min-width: 80px; }
.info-item .member-discount-note { .info-item .member-discount-note {
font-size: 12px; font-size: 12px;
color: #909399; color: #909399;
margin-top: 5px; margin-top: 5px;
font-style: italic; font-style: italic;
text-align: center; text-align: center;
width: 100%; width: 100%;
} }

View File

@ -10,7 +10,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="支付单号" prop="transactionId"> <el-form-item label="支付单号" prop="transactionId">
<el-input <el-input
v-model="queryParams.transactionId" v-model="queryParams.transactionId"
@ -152,7 +152,7 @@
<!-- 操作按钮 --> <!-- 操作按钮 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
@ -163,7 +163,7 @@
v-hasPermi="['system:GoodsOrder:edit']" v-hasPermi="['system:GoodsOrder:edit']"
>Excel批量发货</el-button> >Excel批量发货</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
@ -186,16 +186,16 @@
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<!-- 订单基本信息 --> <!-- 订单基本信息 -->
<el-table-column label="主订单号" align="center" prop="mainOrderId" class-name="order-column" /> <el-table-column label="主订单号" align="center" prop="mainOrderId" class-name="order-column" />
<el-table-column label="订单状态" align="center" prop="status" class-name="order-column"> <el-table-column label="订单状态" align="center" prop="status" class-name="order-column">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.goods_order_status" :value="scope.row.status"/> <dict-tag :options="dict.type.goods_order_status" :value="scope.row.status"/>
</template> </template>
</el-table-column> </el-table-column>
<!-- 商品信息 --> <!-- 商品信息 -->
<el-table-column label="商品" align="center" prop="productName" class-name="product-column"> <el-table-column label="商品" align="center" prop="productName" class-name="product-column">
<template slot-scope="scope"> <template slot-scope="scope">
@ -213,7 +213,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数量" align="center" width="65" prop="num" class-name="product-column" /> <el-table-column label="数量" align="center" width="65" prop="num" class-name="product-column" />
<!-- 金额信息 --> <!-- 金额信息 -->
<el-table-column label="总价" width="100px" align="center" prop="totalPrice" class-name="amount-column"> <el-table-column label="总价" width="100px" align="center" prop="totalPrice" class-name="amount-column">
<template slot-scope="scope"> <template slot-scope="scope">
@ -234,11 +234,11 @@
<span class="amount-deduction">{{scope.row.deduction ? scope.row.deduction.toFixed(2) : '0.00'}}</span> <span class="amount-deduction">{{scope.row.deduction ? scope.row.deduction.toFixed(2) : '0.00'}}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- 用户信息 --> <!-- 用户信息 -->
<el-table-column label="姓名" align="center" width="75" prop="name" class-name="user-column" /> <el-table-column label="姓名" align="center" width="75" prop="name" class-name="user-column" />
<el-table-column label="电话" align="center" width="125" prop="phone" class-name="user-column" /> <el-table-column label="电话" align="center" width="125" prop="phone" class-name="user-column" />
<!-- 时间信息 --> <!-- 时间信息 -->
<el-table-column label="支付时间" align="center" prop="payTime" width="120" class-name="time-column"> <el-table-column label="支付时间" align="center" prop="payTime" width="120" class-name="time-column">
<template slot-scope="scope"> <template slot-scope="scope">
@ -257,7 +257,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 发货按钮 - 只有已支付待发货状态的订单才显示 --> <!-- 发货按钮 - 只有已支付待发货状态的订单才显示 -->
<el-button <el-button
v-if="scope.row.status === 2" v-if="scope.row.status === 2"
@ -276,10 +276,10 @@
@click="handleAfterSale(scope.row)" @click="handleAfterSale(scope.row)"
style="color: #E6A23C;" style="color: #E6A23C;"
>售后</el-button> >售后</el-button>
<!-- v-if="scope.row.status >= 15"-->
<!-- 统一退款按钮 --> <!-- 统一退款按钮 -->
<el-button <el-button
v-if="scope.row.status >= 15"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-money" icon="el-icon-money"
@ -289,7 +289,7 @@
<!-- 如果是主行显示查看详情按钮 --> <!-- 如果是主行显示查看详情按钮 -->
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-view" icon="el-icon-view"
@ -386,14 +386,14 @@
/> />
<!-- Excel导入结果对话框 --> <!-- Excel导入结果对话框 -->
<ImportResultDialog <ImportResultDialog
:visible.sync="importResultVisible" :visible.sync="importResultVisible"
:importResult="importResult" :importResult="importResult"
@close="importResultVisible = false" @close="importResultVisible = false"
@refresh="refreshOrderList" @refresh="refreshOrderList"
/> />
<!-- 订单详情组件 --> <!-- 订单详情组件 -->
<GoodsOrderDetails <GoodsOrderDetails
@ -416,9 +416,9 @@
:paymentData="currentRefundPaymentData" :paymentData="currentRefundPaymentData"
@success="handleRefundSuccess" @success="handleRefundSuccess"
/> />
</div> </div>
@ -676,7 +676,7 @@ export default {
if (!this.GoodsOrderList || this.GoodsOrderList.length === 0) { if (!this.GoodsOrderList || this.GoodsOrderList.length === 0) {
return; return;
} }
this.GoodsOrderList.forEach((item, index) => { this.GoodsOrderList.forEach((item, index) => {
if (item.mainOrderId) { if (item.mainOrderId) {
getGoodsOrderByMainOrderId(item.mainOrderId).then(response => { getGoodsOrderByMainOrderId(item.mainOrderId).then(response => {
@ -699,7 +699,7 @@ export default {
this.loading = false this.loading = false
this.groupedGoodsOrderList() this.groupedGoodsOrderList()
this.total = response.total this.total = response.total
}) })
}, },
@ -795,7 +795,7 @@ export default {
this.unifiedRefundDialogVisible = false; this.unifiedRefundDialogVisible = false;
this.currentRefundOrder = null; this.currentRefundOrder = null;
this.currentRefundPaymentData = null; this.currentRefundPaymentData = null;
// 使nextTick // 使nextTick
this.$nextTick(() => { this.$nextTick(() => {
// //
@ -803,10 +803,10 @@ export default {
this.currentDetailOrder = null; this.currentDetailOrder = null;
this.currentDetailOrderId = null; this.currentDetailOrderId = null;
this.currentShipOrder = null; this.currentShipOrder = null;
// //
this.prePaymentData = null; this.prePaymentData = null;
// //
this.shipmentOrders = []; this.shipmentOrders = [];
this.shipForm = { this.shipForm = {
@ -833,7 +833,7 @@ export default {
// //
this.currentAfterSaleOrder = null; this.currentAfterSaleOrder = null;
this.afterSaleDialogVisible = false; this.afterSaleDialogVisible = false;
// 使nextTickDOM // 使nextTickDOM
this.$nextTick(() => { this.$nextTick(() => {
this.currentAfterSaleOrder = row; this.currentAfterSaleOrder = row;
@ -863,10 +863,10 @@ export default {
if (response.code === 200) { if (response.code === 200) {
this.$modal.msgSuccess('操作成功'); this.$modal.msgSuccess('操作成功');
this.closeAllDialogs(); this.closeAllDialogs();
// //
this.currentAfterSaleOrder = null; this.currentAfterSaleOrder = null;
// //
this.getList(); this.getList();
} else { } else {
@ -987,7 +987,7 @@ export default {
this.currentShipOrder = null; this.currentShipOrder = null;
this.shipmentOrders = []; this.shipmentOrders = [];
this.shipDialogVisible = false; this.shipDialogVisible = false;
// 使nextTickDOM // 使nextTickDOM
this.$nextTick(() => { this.$nextTick(() => {
this.currentShipOrder = row; this.currentShipOrder = row;
@ -1039,7 +1039,7 @@ export default {
this.$modal.msgSuccess('发货成功') this.$modal.msgSuccess('发货成功')
this.shipDialogVisible = false this.shipDialogVisible = false
this.shipLoading = false; this.shipLoading = false;
// //
this.currentShipOrder = null; this.currentShipOrder = null;
this.shipmentOrders = []; this.shipmentOrders = [];
@ -1055,7 +1055,7 @@ export default {
sendTime: '', sendTime: '',
mark: '' mark: ''
}; };
this.getList() // this.getList() //
}).catch(error => { }).catch(error => {
this.$modal.msgError('发货失败:' + (error.message || '未知错误')) this.$modal.msgError('发货失败:' + (error.message || '未知错误'))
@ -1070,7 +1070,7 @@ export default {
// //
this.prePaymentData = null; this.prePaymentData = null;
this.prePaymentDialogVisible = false; this.prePaymentDialogVisible = false;
if (!row.orderId) { if (!row.orderId) {
this.$modal.msgWarning('该订单没有订单号'); this.$modal.msgWarning('该订单没有订单号');
return; return;
@ -1098,7 +1098,7 @@ export default {
// //
this.excelImportDialogVisible = false; this.excelImportDialogVisible = false;
this.excelImportForm.file = null; this.excelImportForm.file = null;
// 使nextTickDOM // 使nextTickDOM
this.$nextTick(() => { this.$nextTick(() => {
this.excelImportDialogVisible = true; this.excelImportDialogVisible = true;
@ -1196,7 +1196,7 @@ export default {
/** 查看订单详情 */ /** 查看订单详情 */
async handleViewDetails(row) { async handleViewDetails(row) {
this.currentDetailOrder = row; this.currentDetailOrder = row;
this.currentDetailOrderId = row.id; // ID this.currentDetailOrderId = row.id; // ID
this.detailDialogVisible = true; this.detailDialogVisible = true;
@ -1635,7 +1635,7 @@ export default {
.el-table .el-table__cell { .el-table .el-table__cell {
padding: 8px 4px; padding: 8px 4px;
} }
.el-table th { .el-table th {
padding: 10px 4px; padding: 10px 4px;
} }
@ -1645,11 +1645,11 @@ export default {
.el-table { .el-table {
font-size: 12px; font-size: 12px;
} }
.el-table .el-table__cell { .el-table .el-table__cell {
padding: 6px 2px; padding: 6px 2px;
} }
.el-table th { .el-table th {
padding: 8px 2px; padding: 8px 2px;
} }