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

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

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

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

@ -575,19 +575,36 @@
} }
}, },
updateData(ele,index) { updateData(type,item,index,ele) {
// if(this.managementType == 'BY_BATCH'){ if(type == 'parent'){
// }else{ item.packList=[]
// calcTreeHandleQty(this.detailSource) item.scaned = false
// } }else if(type == 'child'){
if(ele){ console.log(ele)
ele.packList.splice(index,1) ele.packList.splice(index,1)
if(ele.packList.length == 0){ if(ele.packList.length == 0){
ele.scaned = false 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); calcTreeHandleQty(this.detailSource);
}, },

Loading…
Cancel
Save