diff --git a/src/mycomponents/package/packageList.vue b/src/mycomponents/package/packageList.vue index a4458dd7..445cf283 100644 --- a/src/mycomponents/package/packageList.vue +++ b/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() } }); diff --git a/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue b/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue index 2d37cfe3..7013495f 100644 --- a/src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue +++ b/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) } } } diff --git a/src/pages/purchaseReceipt/job/receiptDetail.vue b/src/pages/purchaseReceipt/job/receiptDetail.vue index 2e755ac3..7f684684 100644 --- a/src/pages/purchaseReceipt/job/receiptDetail.vue +++ b/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); },