diff --git a/src/pages/crm/coupon/coupon-Batch/components/sendCoupon.jsx b/src/pages/crm/coupon/coupon-Batch/components/sendCoupon.jsx index dc3e928..3fc5ab8 100644 --- a/src/pages/crm/coupon/coupon-Batch/components/sendCoupon.jsx +++ b/src/pages/crm/coupon/coupon-Batch/components/sendCoupon.jsx @@ -200,6 +200,10 @@ const sendCoupon = (props) => { message.error('请选择会员'); return; } + if(targetKeys.length>props.lastNum){ + message.error('优惠券数量不够'); + return; + } message.loading('正在发送...', key); try { await SendCouponByUser({ @@ -268,6 +272,7 @@ const sendCoupon = (props) => { { }} onClick={() => { sendCouponVisible(true); - setCurrentRow({ couponRangeId: record.id, couponId: record.couponId }); + setCurrentRow({ couponRangeId: record.id, couponId: record.couponId,lastNum:record.lastNum }); }} > 发放