修复确认订单余额支付,余额充足无法选择问题

This commit is contained in:
2025-09-30 18:04:12 +08:00
parent b2cb18b114
commit 36f92cc680
2 changed files with 14 additions and 30 deletions

View File

@@ -159,11 +159,14 @@
</text>
</template>
<template v-else>
<view v-if="maxPointDiscount>0" class="u-flex u-col-center">
<view class="round"></view>
<text class="color-333 font-12 no-wrap u-m-l-4">使用抵扣</text>
</view>
</template>
<view v-else class="u-flex u-col-center">
<view class="round"></view>
<text class="color-333 font-12 no-wrap u-m-l-4">使用抵扣</text>
</view>
</view>
<!-- <view class="favorable_right" v-if="item.type=='points'">
<text class="favorable_right_text" style="color: #666;margin-right: 16rpx;"
@@ -232,10 +235,6 @@
</view>
<IntegralInput :visible="calcUsablePointsData.showModal" :minValue="calcUsablePointsData.minIntegral"
:maxValue="calcUsablePointsData.maxIntegral" :instructions="calcUsablePointsData.instructionText"
@confirm="handleConfirm" @close="calcUsablePointsData.showModal = false"
@IntegralInputclose="IntegralInputclose" />
</view>
</template>
@@ -439,6 +438,9 @@
break;
case 'points':
if (maxPointDiscount.value <= 0) {
return
}
chnageIsUsePoints()
return
}
@@ -472,7 +474,7 @@
})
Object.assign(pointsRes, res)
maxPointDiscount.value = res.maxDeductionAmount
cartStore.setUserPoints(res.maxUsablePoints||0)
cartStore.setUserPoints(res.maxUsablePoints || 0)
console.log('getMaxPointsDiscount:cartStore.orderCostSummary.pointUsed', cartStore.orderCostSummary.pointUsed);
}
watch(() => maxMoney.value, (newval) => {
@@ -490,22 +492,6 @@
})
const handleConfirm = async (integral) => {
//积分可抵扣最大金额
const maxMoney = cartStore.orderCostSummary.goodsRealAmount - cartStore.orderCostSummary
.couponDeductionAmount
calcUsablePointsData.integral = integral
props.listinfo.pointsDiscountAmount = await APImemberPointscalcDeductionAmount({
points: integral,
shopUserId: props.orderVIP.id,
orderAmount: maxMoney
})
cartStore.setUserPoints(integral)
emits('clickPointsamount', {
pointsDiscountAmount: props.listinfo.pointsDiscountAmount,
pointsNum: calcUsablePointsData.integral
});
};
// * 获取积分相关信息
const getCalcUsablePoints = async (data) => {