From 9f2460bad24053ab368886407a3a47b34421fd70 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期四, 18 四月 2024 19:03:52 +0800
Subject: [PATCH] 入库出库调拨出入库明细 4个模块添加和编辑产品的时候增加辅助数量的计算逻辑,浮动值和数量相乘所得

---
 src/views/overview/OverviewListView.vue |   54 +++++++++++++++++++++++++++---------------------------
 1 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/src/views/overview/OverviewListView.vue b/src/views/overview/OverviewListView.vue
index 177b5e5..d8d2f0a 100644
--- a/src/views/overview/OverviewListView.vue
+++ b/src/views/overview/OverviewListView.vue
@@ -358,31 +358,31 @@
     // 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){
-        //     let isValue=false
-        //     for(let j in moreUnitList){
-        //       if(moreUnitList[j].floating){
-        //         isValue=true;
-        //         adjunctUnit=moreUnitList[j].unit
-        //         adjunctAmount=moreUnitList[j].amount
-        //         break;
-        //       }
-        //     }
-        //     if(!isValue){
-        //       for(let j in moreUnitList){
-        //          if(moreUnitList[j].unit){
-        //           adjunctUnit=moreUnitList[j].unit
-        //           adjunctAmount=moreUnitList[j].amount
-        //           break;
-        //         }
-        //       }
-        //     }
-        //   }
-        // }
+        let adjunctUnit=''
+        let adjunctAmount=''
+        if(item.product.moreUnit&&item.product.moreUnitList){
+          let moreUnitList=item.product.moreUnitList
+          if(moreUnitList.length>0){
+            let isValue=false
+            for(let j in moreUnitList){
+              if(moreUnitList[j].floating){
+                isValue=true;
+                adjunctUnit=moreUnitList[j].unit
+                adjunctAmount=moreUnitList[j].amount
+                break;
+              }
+            }
+            if(!isValue){
+              for(let j in moreUnitList){
+                 if(moreUnitList[j].unit){
+                  adjunctUnit=moreUnitList[j].unit
+                  adjunctAmount=moreUnitList[j].amount
+                  break;
+                }
+              }
+            }
+          }
+        }
         return {
           ...item,
           productName: item.product.name,
@@ -391,8 +391,8 @@
           specs:item.product.specs,
           location: arr.location.name,
           toLocation: arr.toLocation.name,
-          adjunctUnit:item.auxiliaryUnit,
-          adjunctAmount:item.auxiliaryAmount,
+          adjunctUnit:adjunctUnit,
+          adjunctAmount:adjunctAmount&&item.amount?adjunctAmount:'',
           grossWeight:item.product.grossWeight,
           totalGrossWeight:item.totalGrossWeight,
           netWeight:item.product.netWeight, 

--
Gitblit v1.8.0