Browse Source

YT-918采购收货任务,PDA扫描后点击移除扫描信息,移除后再次扫描报错

intex
zhang_li 2 weeks ago
parent
commit
f812cf71e1
  1. 12
      src/mycomponents/package/packageList.vue
  2. 10
      src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue
  3. 31
      src/pages/purchaseReceipt/job/receiptDetail.vue

12
src/mycomponents/package/packageList.vue

@ -131,13 +131,13 @@
this.edit(item)
} else if (e.content.text == "移除") {
if (type == 'parent') {
this.removeParent(item);
this.removeParent(item,type);
} else {
this.remove(item,index,ele)
this.remove(item,type,index,ele)
}
}
},
removeParent(item) {
removeParent(item,type) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
@ -148,7 +148,7 @@
subItem.handleQty = null;
})
this.$emit('updateData')
this.$emit('updateData',type,item)
this.$forceUpdate()
}
});
@ -156,14 +156,14 @@
remove(item,index,ele) {
remove(item,type,index,ele) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.handleQty = null;
this.collapseChange()
this.$emit('updateData',ele,index)
this.$emit('updateData',type,item,index,ele)
this.$forceUpdate()
}
});

10
src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue

@ -174,13 +174,11 @@
item.subList.forEach(lst => {
lst.scaned = false;
lst.handleQty = null;
lst.packList.forEach(pack => {
pack.scaned = false;
pack.handleQty = null;
})
lst.packList=[]
})
// this.$forceUpdate()
// this.$emit('remove', item)
this.updateData()
}
});
},
@ -200,8 +198,8 @@
this.editItem.handleQty = qty;
this.$emit('updateData')
},
updateData(index,packList) {
this.$emit('updateData',index,packList)
updateData(item,type,index,ele) {
this.$emit('updateData',item,type,index,ele)
}
}
}

31
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -575,19 +575,36 @@
}
},
updateData(ele,index) {
// if(this.managementType == 'BY_BATCH'){
// }else{
// calcTreeHandleQty(this.detailSource)
// }
if(ele){
updateData(type,item,index,ele) {
if(type == 'parent'){
item.packList=[]
item.scaned = false
}else if(type == 'child'){
console.log(ele)
ele.packList.splice(index,1)
if(ele.packList.length == 0){
ele.scaned = false
}
this.packingNumberList.splice(index,1)
}
this.packingNumberList = []
this.detailSource.forEach(item=>{
item.subList.forEach(cur=>{
if(cur.packList.length>0){
cur.packList.forEach(i=>{
this.packingNumberList.push(i)
})
}
})
})
setTimeout(()=>{
this.$refs.comReceiptDetailCardBacthRef.forEach(item=>{
item.resizeCollapse()
item.$refs.packageListRef.$refs.collapse2.forEach(cur=>{
cur.resize()
})
})
},500)
calcTreeHandleQty(this.detailSource);
},

Loading…
Cancel
Save