fix:支付宝支付按租户查询支付配置

This commit is contained in:
2026-06-24 20:25:06 +08:00
parent c7bf4639bb
commit 84146bee17
4 changed files with 35 additions and 3 deletions
@@ -25,6 +25,7 @@ const PAY_TYPE = {
WECHAT: 1, // 微信支付
COUPON: 2, // 优惠券支付
THIRD_PARTY: 3, // 第三方支付
ALIPAY: 4, // 支付宝支付
};
// 资源列表操作组件
@@ -43,8 +44,10 @@ const ResourcesActionCell: React.FC<{ record: OrderItem; onReload?: () => void;
const isThirdPartyPay = record.payType === PAY_TYPE.THIRD_PARTY;
// 判断是否为优惠券支付(携程不支持退款接口)
const isCouponPay = record.payType === PAY_TYPE.COUPON;
// 是否可以创建退款(任务完成 且 非第三方支付 且 非优惠券支付)
const canCreateRefund = isTaskComplete && !isThirdPartyPay && !isCouponPay;
// 判断是否为支付宝支付(暂不支持退款)
const isAlipayPay = record.payType === PAY_TYPE.ALIPAY;
// 是否可以创建退款(任务完成 且 非第三方支付 且 非优惠券支付 且 非支付宝支付)
const canCreateRefund = isTaskComplete && !isThirdPartyPay && !isCouponPay && !isAlipayPay;
return (
<>
@@ -60,6 +63,10 @@ const ResourcesActionCell: React.FC<{ record: OrderItem; onReload?: () => void;
<Tooltip title="优惠券支付订单不支持退款">
<span style={{ color: '#999', cursor: 'not-allowed' }}>创建退款</span>
</Tooltip>
) : isAlipayPay ? (
<Tooltip title="支付宝支付订单暂不支持退款">
<span style={{ color: '#999', cursor: 'not-allowed' }}>创建退款</span>
</Tooltip>
) : (
<Link onClick={() => setCreateRefundModalVisible(true)}>创建退款</Link>
)
@@ -5,6 +5,7 @@ export const PAY_TYPE_OPTIONS: { label: string; value: number; color?: string }[
{ label: '微信支付', value: 1, color: 'green' },
{ label: '优惠券支付', value: 2, color: 'blue' },
{ label: '第三方支付', value: 3, color: 'purple' },
{ label: '支付宝支付', value: 4, color: 'geekblue' },
];
export const ORDER_STATUS_OPTIONS: { label: string; value: number; color?: string }[] = [