fix: 修复部分失败

This commit is contained in:
zhangds 2024-04-10 23:39:40 +08:00
parent 9fa4a49ea0
commit 9402c600b9
4 changed files with 16 additions and 14 deletions

View File

@ -346,12 +346,9 @@
let all_product_voucher = []; let all_product_voucher = [];
new_data.product.forEach(item => { new_data.product.forEach(item => {
all_product_voucher.concat(item.voucher) all_product_voucher = all_product_voucher.concat(item.voucher)
}) })
let is_err_length = all_product_voucher.filter(item => item.status === 9).length;
console.log("all_product_voucher =>", all_product_voucher);
let is_err_length = all_product_voucher.filter(item => item.voucher.status === 9).length;
self.isOKLength = all_product_voucher.length - is_err_length; self.isOKLength = all_product_voucher.length - is_err_length;
self.isErrLength = is_err_length; self.isErrLength = is_err_length;
} }

View File

@ -343,9 +343,13 @@
// 部分失败 // 部分失败
if (self.goods.send_status === 4) { if (self.goods.send_status === 4) {
let all_product_length = res.data.product.length; let all_product_voucher = [];
let is_err_length = res.data.product.filter(item => item.voucher.status === 9).length;
self.isOKLength = all_product_length - is_err_length; new_data.product.forEach(item => {
all_product_voucher = all_product_voucher.concat(item.voucher)
})
let is_err_length = all_product_voucher.filter(item => item.status === 9).length;
self.isOKLength = all_product_voucher.length - is_err_length;
self.isErrLength = is_err_length; self.isErrLength = is_err_length;
} }

View File

@ -347,9 +347,6 @@
new_data.product.forEach(item => { new_data.product.forEach(item => {
all_product_voucher = all_product_voucher.concat(item.voucher) all_product_voucher = all_product_voucher.concat(item.voucher)
}) })
console.log("all_product_voucher =>", all_product_voucher);
let is_err_length = all_product_voucher.filter(item => item.status === 9).length; let is_err_length = all_product_voucher.filter(item => item.status === 9).length;
self.isOKLength = all_product_voucher.length - is_err_length; self.isOKLength = all_product_voucher.length - is_err_length;
self.isErrLength = is_err_length; self.isErrLength = is_err_length;

View File

@ -342,9 +342,13 @@
// 部分失败 // 部分失败
if (self.goods.send_status === 4) { if (self.goods.send_status === 4) {
let all_product_length = res.data.product.length; let all_product_voucher = [];
let is_err_length = res.data.product.filter(item => item.voucher.status === 9).length;
self.isOKLength = all_product_length - is_err_length; new_data.product.forEach(item => {
all_product_voucher = all_product_voucher.concat(item.voucher)
})
let is_err_length = all_product_voucher.filter(item => item.status === 9).length;
self.isOKLength = all_product_voucher.length - is_err_length;
self.isErrLength = is_err_length; self.isErrLength = is_err_length;
} }