From 4708131e4e9e97ce280b9befbd57b7d405931a66 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期三, 17 四月 2024 09:48:47 +0800 Subject: [PATCH] 调拨模块 下面的产品显示 辅助单位和辅助数量 --- src/views/overview/OverviewListView.vue | 25 ++++++++++++++++++++----- 1 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/views/overview/OverviewListView.vue b/src/views/overview/OverviewListView.vue index cce7adf..49354f5 100644 --- a/src/views/overview/OverviewListView.vue +++ b/src/views/overview/OverviewListView.vue @@ -130,8 +130,8 @@ { label: "浜у搧鍨嬪彿", prop: "model" }, { label: "鏁伴噺", prop: "amount" }, { label: "璁¢噺鍗曚綅", prop: "unit" }, - { label: "杈呭姪鏁伴噺", prop: "unit" }, - { label: "杈呭姪鍗曚綅", prop: "amount" } + { label: "杈呭姪鏁伴噺", prop: "adjunctAmount" }, + { label: "杈呭姪鍗曚綅", prop: "adjunctUnit" } ], allotProductColumn: [ { label: "浜у搧缂栧彿", prop: "id", default: true }, @@ -142,8 +142,8 @@ { label: "璋冨嚭浣嶇疆", prop: "location" }, { label: "璋冨叆浣嶇疆", prop: "toLocation" }, { label: "鏁伴噺", prop: "amount" }, - { label: "杈呭姪鏁伴噺", prop: "unit" }, - { label: "杈呭姪鍗曚綅", prop: "amount" } + { label: "杈呭姪鏁伴噺", prop: "adjunctAmount" }, + { label: "杈呭姪鍗曚綅", prop: "adjunctUnit" } ] } }, @@ -350,12 +350,27 @@ // bottom浜у搧淇℃伅鏁版嵁澶勭悊 bottomProductData(arr) { const list = arr.details.map((item) => { + let adjunctUnit='' + let adjunctAmount='' + if(item.product.moreUnit&&item.product.moreUnitList){ + let moreUnitList=item.product.moreUnitList + if(moreUnitList.length>0){ + for(let j in moreUnitList){ + if(moreUnitList[j].floating){ + adjunctUnit=moreUnitList[j].unit + adjunctAmount=moreUnitList[j].amount + } + } + } + } return { ...item, productName: item.product.name, unit: item.product.unit, location: arr.location.name, - toLocation: arr.toLocation.name + toLocation: arr.toLocation.name, + adjunctUnit:adjunctUnit, + adjunctAmount:adjunctAmount } }) this.productTableList.tableInfomation = list -- Gitblit v1.8.0