Commit 857fab61 authored by dragondean@qq.com's avatar dragondean@qq.com

修复备货箱明细没有内容的情况下选择商品明细报错https://zentao.test.jdshangmen.com/bug-view-5719.html

parent 2a16e9c6
......@@ -179,11 +179,15 @@ export default {
handleChooseOrderProducts(data){
this.showChooseDialog = false
if(!data?.length) return
// 如果第一条是空的,则删除先
let firstItem = this.dataList[0]
if(!firstItem.prodId && !firstItem.brand && !firstItem.prodAttrIds && !firstItem.material && !firstItem.quantityAll){
this.dataList.splice(0, 1)
// 如果最后一条是空的,则删除先
if(this.dataList?.length){
const index = this.dataList.length - 1
let lastItem = this.dataList[index]
if(!lastItem.prodId && !lastItem.brand && !lastItem.prodAttrIds && !lastItem.material && !lastItem.quantityAll){
this.dataList.splice(index, 1)
}
}
data.forEach(item => {
this.dataList.push({
"boxGauge": "",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment