From 4b4438e7231bff0f260b0c17761072503e2af7b1 Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期六, 28 十月 2023 15:55:01 +0800
Subject: [PATCH] 上架规则,产品类别下拉框可编辑,出入库明细调整

---
 src/views/warehouseManage/listingRules/index.vue |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/src/views/warehouseManage/listingRules/index.vue b/src/views/warehouseManage/listingRules/index.vue
index 78e234e..ffb0523 100644
--- a/src/views/warehouseManage/listingRules/index.vue
+++ b/src/views/warehouseManage/listingRules/index.vue
@@ -21,6 +21,7 @@
           @tableRowClick="tableRowClick"
           @selLocationClick="selLocationClick"
           @selProductClick="selProductClick"
+          @selProductTypeClick="selProductTypeClick"
         >
           <template slot="tableButton">
             <el-table-column label="鎿嶄綔" width="90" align="center">
@@ -89,7 +90,8 @@
       areaId: 0,
       productId: 0,
       subLocationId: 0,
-      currentRowId: 0
+      currentRowId: 0,
+      rowIndex:0
     }
   },
   created() {
@@ -105,7 +107,7 @@
         tableColumn: [
           { label: "褰撲骇鍝佸埌杈�", prop: "areaName", location: true },
           { label: "浜у搧", prop: "productName", product: true },
-          { label: "浜у搧绫诲埆", prop: "productCategory" },
+          { label: "浜у搧绫诲埆", prop: "productCategory",productType: true },
           { label: "瀛樺偍鍒板瓙浣嶇疆", prop: "subLocation", location: true }
           // { label: "鍏徃", prop: "companyName", company: true }
         ]
@@ -147,6 +149,8 @@
     },
     // 鏂板
     addProductClick() {
+      this.tableList.tableColumn[1].product=true
+      this.tableList.tableColumn[2].productType=true
       console.log(this.tableData)
       this.isSel()
       if (this.isNoProduct && this.addTitle === "鏂板缓") {
@@ -222,6 +226,8 @@
     },
     // 鍙栨秷
     discardBtnClick() {
+      this.tableList.tableColumn[1].product=true
+      this.tableList.tableColumn[2].productType=true
       if (this.isRowClick) {
         this.tableData.map((item) => {
           item.isEdit = true
@@ -265,7 +271,10 @@
     },
     // 琛岀偣鍑�
     tableRowClick(row, rowIndex) {
-      console.log("11111")
+      // this.tableList.tableColumn[1].product=true
+      // this.tableList.tableColumn[2].productType=true
+      this.rowIndex=rowIndex
+      console.log("11111",row,rowIndex)
       this.isSel()
       if (!this.isNoProduct && this.currentRowId === 0) {
         this.$message.error("璇峰畬鎴愬綋鍓嶆柊寤烘垨鍙栨秷鏂板缓")
@@ -324,10 +333,16 @@
     },
     // 閫変腑浜у搧鏂规硶
     selProductClick(item) {
-      console.log(item)
+      this.tableList.tableColumn[2].productType=false
       this.productId = item.value
       this.productCategoryId = item.categoryId
     },
+    // 閫変腑浜у搧绫诲瀷鏂规硶
+    selProductTypeClick(item) {
+      console.log(item,"浜у搧绫诲瀷",this.tableList.tableData[this.rowIndex])
+      this.tableList.tableColumn[1].product=false
+      this.tableList.tableData[this.rowIndex].productName='--'
+    },
     // 鍒犻櫎
     async delClick(scope) {
       console.log(scope)

--
Gitblit v1.8.0