From 484274743426cd0a09a404a263c16fac990bad4d Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期一, 15 四月 2024 18:59:11 +0800
Subject: [PATCH] 库存调整模块 位置的接口

---
 src/components/makepager/CommonFormTableView.vue |   28 ++++++++++++++++++----------
 1 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/src/components/makepager/CommonFormTableView.vue b/src/components/makepager/CommonFormTableView.vue
index aae5424..3a8fc20 100644
--- a/src/components/makepager/CommonFormTableView.vue
+++ b/src/components/makepager/CommonFormTableView.vue
@@ -194,7 +194,7 @@
                     style="width: 80%"
                     @change="
                       (val) => {
-                        selLocationClick(val, item.prop)
+                        selLocationClick(val, item.prop,scope.row)
                       }
                     "
                   >
@@ -450,7 +450,7 @@
 import { getProductList } from "@/api/product/product"
 import { getLocationList } from "@/api/warehouseManage/warehouse"
 import { getCompanyList } from "@/api/common/other"
-import { getRuleList } from "@/api/operate/inventoryAdjustment"
+import { getRuleList} from "@/api/operate/inventoryAdjustment"
 import { getProductCategoryList } from "@/api/product/productCategory"
 import SimpleSearchInput from "@/components/makepager/SimpleSearchInput"
 import { getAmountAndPrediction } from "@/api/product/reorderRules"
@@ -772,6 +772,7 @@
     },
     // 閫夋嫨浜у搧
     selProductClick(item, row) {
+      console.log("閫夋嫨浜у搧",row,item)
       if (this.isReorder) {
         this.productId = item.id
         this.productName = item.name
@@ -794,13 +795,12 @@
             ite.productName = item.name
             ite.categoryId = item.categoryId
             ite.productCategory = item.categoryName
-            ite.amount = item.amount
+            // ite.amount = item.amount
             ite.unit = item.unit
           }
         })
         this.$emit("selProductClick", "product", this.tableList.tableData[selIndex])
       }
-
       if (this.isinventory) {
         getRuleList({
           locationId: 0,
@@ -813,6 +813,7 @@
           }
         })
       }
+
       // this.$emit("selProductClick", item)
     },
     // 閫夋嫨浜у搧绫诲瀷
@@ -844,6 +845,7 @@
     },
     // 閫夋嫨浣嶇疆
     selLocationClick(item, prop, row) {
+      console.log("浣嶇疆閫夋嫨",item,row)
       if (prop === "areaName") {
         getLocationList({
           jointName: item.label,
@@ -855,6 +857,8 @@
             this.selSonLocationOptions = list
           }
         })
+      }else if(prop==='locationName'){
+        console.log("locationName")
       }
       if (this.isReorder) {
         this.locacionId = item.value
@@ -1013,17 +1017,21 @@
     },
     commoInput() {},
     selClient(item) {
-      let list = this.tableList.tableData.map((item) => item.number)
-      if (list.findIndex((v) => v == item.number) == -1) {
+      let list = this.tableList.tableData.map((item) => item.id)
+      if (list.findIndex((v) => v == item.id) == -1) {
         this.isRecalculate = true
         // this.editConfig.infomation.client_name = row.name
         this.tableList.tableData.map((ite, index) => {
           if (index === this.productIndex) {
+            ite.productName = item.name
+            ite.productId = item.id
             ite.name = item.name
-            ite.amount = item.amount || 1
-            ite.number = item.number
-            ite.price = item.price
-            ite.total = item.amount ? item.amount * item.price : 1 * item.price
+            ite.amount = 1
+            ite.number = item.id
+            ite.specs = item.specs
+            ite.model = item.model
+            // ite.price = item.price
+            // ite.total = item.amount ? item.amount * item.price : 1 * item.price
             ite.unit = item.unit
           }
         })

--
Gitblit v1.8.0