diff --git a/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue b/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue index 9fe274f..c5c792a 100644 --- a/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue +++ b/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue @@ -205,11 +205,14 @@ export default class dnReceiptDom extends BasePage { //选择采购单后触发的回调事件 poListChoice(e: any) { this.poNo = e.pickerName.value; + // 过滤重复物料 this.materialList = JSON.parse(JSON.stringify(this.removeDuplicates(this.material, 'materialCode'))); - this.materialList.forEach((item: any) => { + // 返回物料中poNo为选中的项; + this.materialList = this.materialList.filter((item: any) => { if (item.poNo == e.pickerName.value) { item.label = item.materialCode; item.value = item.materialCode; + return true; } }); }