From 051145654d6b1b5556c70f91ca29384a35aa5f7d Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期四, 16 十一月 2023 13:46:38 +0800
Subject: [PATCH] 公共组件选择产品改为下拉可搜索框、库存调整、补货、上架规则、重订货规则修改

---
 src/views/productManage/reorderRules/index.vue |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/views/productManage/reorderRules/index.vue b/src/views/productManage/reorderRules/index.vue
index 57d32fa..fad6b56 100644
--- a/src/views/productManage/reorderRules/index.vue
+++ b/src/views/productManage/reorderRules/index.vue
@@ -80,7 +80,8 @@
       unit: "",
       reorderId: 0,
       queryProductId: null,
-      searchTaskMap: []
+      searchTaskMap: [],
+      currentRowId: -1
     }
   },
   created() {
@@ -102,7 +103,7 @@
         selectBox: false,
         selectIndex: true,
         tableColumn: [
-          { label: "浜у搧", prop: "productName", product: true },
+          { label: "浜у搧", prop: "productName", product: true, width: "150px" },
           { label: "浣嶇疆", prop: "locationName", defaultLocation: true },
           { label: "鍦ㄥ簱鏁伴噺", prop: "amount" },
           { label: "棰勬祴鏁伴噺", prop: "prediction" },
@@ -216,7 +217,6 @@
         let params = this.saveParams()
         requestUrl(params)
           .then((res) => {
-            console.log(res)
             if (res.code === 200) {
               let tipStr = this.currentRowId === 0 ? "娣诲姞鎴愬姛" : "淇敼鎴愬姛"
               this.$message.success(tipStr)
@@ -224,10 +224,9 @@
             }
           })
           .catch((err) => {
-            console.log(err)
             this.getData()
+            console.log(err)
           })
-        // }
       }
     },
     saveParams() {
@@ -283,7 +282,7 @@
       if (!this.isNoProduct && this.currentRowId === 0) {
         this.$message.error("璇峰畬鎴愬綋鍓嶆柊寤烘垨鍙栨秷鏂板缓")
       } else {
-        this.currentRowId = row.id
+        this.currentRowId = row.id || 0
         this.addTitle = "淇濆瓨"
         this.showDiscard = true
         this.isRowClick = true
@@ -293,7 +292,7 @@
         this.tableData.map((item, index) => {
           if (index === rowIndex) {
             item.isEdit = false
-            item.editable = true
+            item.editable = false
             item.isOrder = true
           } else {
             item.isEdit = true
@@ -321,8 +320,10 @@
     },
     // 閫変腑浜у搧鏂规硶
     selProductClick(item) {
-      this.productId = item.value
+      this.productId = item.productId
       this.unit = item.unit
+      this.amount = item.amount
+      this.prediction = item.prediction
     },
     // 閫変腑璺嚎鏂规硶
     selRouteClick(item, prop) {

--
Gitblit v1.8.0