fix: 删除校验

This commit is contained in:
zhangds 2024-05-21 09:52:55 +08:00
parent b7053dfe54
commit cb729653f6
1 changed files with 9 additions and 10 deletions

View File

@ -493,18 +493,17 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
// //
// //
if (state.rank.length > 0) { if (state.rank.length > 0) {
let arr = state.tableData.filter((item) => item.checked) //let arr = state.tableData.filter((item) => item.checked)
// //
// //
let sum = 0 // let sum = 0
arr.map((item) => { // arr.map((item) => {
sum += parseInt(item.quantity) // sum += parseInt(item.quantity)
}) // })
if (sum < Number(form_rule_data.quantity)) { // if (sum < Number(form_rule_data.quantity)) {
Notify.error("所选商品库存总数小于发放量") // Notify.error("")
return false // return false
} // }
// //
if (couponType === 1) { if (couponType === 1) {
return true return true