From 72e10b283ba0732c6c57d8f20c4210710052298c Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期一, 30 十月 2023 15:50:38 +0800
Subject: [PATCH] 岗位职务产品和类别调整

---
 src/views/warehouseManage/listingRules/index.vue     |  109 ++++++++++--------------------------
 src/views/reportForm/inboundOutboundDetail/index.vue |   17 +++++
 src/components/makepager/CommonFormTableView.vue     |    2 
 3 files changed, 48 insertions(+), 80 deletions(-)

diff --git a/src/components/makepager/CommonFormTableView.vue b/src/components/makepager/CommonFormTableView.vue
index 4d58971..9d3349d 100644
--- a/src/components/makepager/CommonFormTableView.vue
+++ b/src/components/makepager/CommonFormTableView.vue
@@ -216,7 +216,7 @@
                       v-for="item in productTypeNameOptions"
                       :key="item.id"
                       :label="item.name"
-                      :value="item.id"
+                      :value="item.name"
                     >
                     </el-option>
                   </el-select>
diff --git a/src/views/reportForm/inboundOutboundDetail/index.vue b/src/views/reportForm/inboundOutboundDetail/index.vue
index 55058e2..a38bdc0 100644
--- a/src/views/reportForm/inboundOutboundDetail/index.vue
+++ b/src/views/reportForm/inboundOutboundDetail/index.vue
@@ -4,7 +4,7 @@
       <SearchCommonView
         :add-title="'鏂板缓'"
         :showAdd="false"
-        :placeholder="'璇疯緭鍏ュ弬鑰�'"
+        :placeholder="'璇锋牴鎹崟鍙枫�佷骇鍝併�佷笟鍔$被鍨嬭繘琛屾悳绱�'"
         :amount-view="false"
         @addCommonClick="addBtnClick"
         @searchClick="getList"
@@ -118,6 +118,12 @@
           default: true
         },
         {
+          label: "涓氬姟绫诲瀷",
+          prop: "baseOperationType",
+          isShowColumn: true,
+          default: true
+        },
+        {
           label: "浠�",
           prop: "fromLocation",
           isShowColumn: true,
@@ -215,6 +221,15 @@
     // 鎼滅储
     getList(val) {
       console.log(val)
+      // getHistory({
+      //     page: this.pagerOptions.currPage,
+      //     pageSize: this.pagerOptions.pageSize
+      // }).then((res) => {
+      //   if (res.code === 200) {
+      //     this.tableList.tableInfomation = res.data
+      //     this.pagerOptions.totalCount = res.total
+      //   }
+      // })
     },
     // 琛岀偣鍑�
     tableRowClick(row) {
diff --git a/src/views/warehouseManage/listingRules/index.vue b/src/views/warehouseManage/listingRules/index.vue
index 37e61a0..d4d8ba5 100644
--- a/src/views/warehouseManage/listingRules/index.vue
+++ b/src/views/warehouseManage/listingRules/index.vue
@@ -91,7 +91,8 @@
       productId: 0,
       subLocationId: 0,
       currentRowId: 0,
-      rowIndex:0
+      rowIndex:-1,
+      RuleType:0,
     }
   },
   created() {
@@ -197,14 +198,8 @@
             }
           })
           let requestUrl = this.currentRowId === 0 ? addListingRules : updateListingRules
-          console.log({
-            id: this.currentRowId,
-            areaId: this.areaId,
-            locationId: this.subLocationId,
-            productCategoryId: this.productCategoryId,
-            productId: this.productId
-          },"鍙傛暟")
           requestUrl({
+            RuleType:this.RuleType,
             id: this.currentRowId,
             areaId: this.areaId,
             locationId: this.subLocationId,
@@ -279,16 +274,11 @@
     },
     // 琛岀偣鍑�
     tableRowClick(row, rowIndex) {
-      console.log("11111",row,rowIndex)
-      console.log(this.isNoProduct ,this.currentRowId,"xxx")
-      // this.tableList.tableColumn[1].product=true
-      // this.tableList.tableColumn[2].productType=false
       this.rowIndex=rowIndex
       this.isSel()
       if (!this.isNoProduct && this.currentRowId === 0) {
         this.$message.error("璇峰畬鎴愬綋鍓嶆柊寤烘垨鍙栨秷鏂板缓")
       } else {
-      if(row.productCategory!==""){
         this.tableList.tableColumn[2].productType=true
         this.currentRowId = row.id
         this.addTitle = "淇濆瓨"
@@ -309,70 +299,16 @@
         this.subLocationId = row.locationId
         this.productCategoryId = row.productCategoryId
         this.productId = row.productId
-      }else if(row.productCategory===""){
-        this.tableList.tableColumn[2].productType=false
-        this.currentRowId = row.id
-        this.addTitle = "淇濆瓨"
-        this.showDiscard = true
-        this.isRowClick = true
-        if (!this.isNoProduct) {
-          this.tableData.splice(this.tableData.length - 1, 1)
+        if(this.tableList.tableData[rowIndex].productCategory===""){
+          this.tableList.tableColumn[2].productType=false
+        }else{
+          this.tableList.tableColumn[2].productType=true
         }
-        this.tableData.map((item, index) => {
-          if (index === rowIndex) {
-            item.isEdit = false
-            item.isOrder = true
-          } else {
-            item.isEdit = true
-          }
-        })
-        this.areaId = row.areaId
-        this.subLocationId = row.locationId
-        this.productCategoryId = row.productCategoryId
-        this.productId = row.productId
-      }else if(row.productId!==""){
-        this.tableList.tableColumn[1].product=true
-        this.currentRowId = row.id
-        this.addTitle = "淇濆瓨"
-        this.showDiscard = true
-        this.isRowClick = true
-        if (!this.isNoProduct) {
-          this.tableData.splice(this.tableData.length - 1, 1)
+        if(this.tableList.tableData[rowIndex].productName===""||this.tableList.tableData[rowIndex].productName===" "){
+          this.tableList.tableColumn[1].product=false
+        }else{
+          this.tableList.tableColumn[1].product=true
         }
-        this.tableData.map((item, index) => {
-          if (index === rowIndex) {
-            item.isEdit = false
-            item.isOrder = true
-          } else {
-            item.isEdit = true
-          }
-        })
-        this.areaId = row.areaId
-        this.subLocationId = row.locationId
-        this.productCategoryId = row.productCategoryId
-        this.productId = row.productId
-      }else if(row.product===""){
-        this.tableList.tableColumn[1].product=false
-        this.currentRowId = row.id
-        this.addTitle = "淇濆瓨"
-        this.showDiscard = true
-        this.isRowClick = true
-        if (!this.isNoProduct) {
-          this.tableData.splice(this.tableData.length - 1, 1)
-        }
-        this.tableData.map((item, index) => {
-          if (index === rowIndex) {
-            item.isEdit = false
-            item.isOrder = true
-          } else {
-            item.isEdit = true
-          }
-        })
-        this.areaId = row.areaId
-        this.subLocationId = row.locationId
-        this.productCategoryId = row.productCategoryId
-        this.productId = row.productId
-      }
     }
     },
     // 鎼滅储
@@ -410,17 +346,19 @@
     // 閫変腑浜у搧鏂规硶
     selProductClick(item) {
       console.log(item,"浜у搧")
+      this.RuleType=1
       this.tableList.tableColumn[2].productType=false
       this.productId = item.value
       this.productCategoryId = item.categoryId
     },
     // 閫変腑浜у搧绫诲瀷鏂规硶
     selProductTypeClick(item) {
+      this.RuleType=2
       console.log(item,"浜у搧绫诲瀷",this.tableList.tableData[this.rowIndex])
-      this.tableList.tableColumn[1].product=false
-      this.tableList.tableData[this.rowIndex].productName='--'
+      // this.tableList.tableColumn[1].product=false
+      this.tableList.tableData[this.rowIndex].productName=' '
       this.productId=''
-      this.productCategoryId=item
+      this.productCategoryId=this.tableList.tableData[this.rowIndex].productCategoryId
     },
     // 鍒犻櫎
     async delClick(scope) {
@@ -432,6 +370,21 @@
         }
       })
     }
+  },
+  watch:{
+    rowIndex(newVal){
+      console.log(this.tableList.tableData[newVal].productName.length,"watch")
+      if(this.tableList.tableData[newVal].productCategory.length===0){
+        this.tableList.tableColumn[2].productType=false
+      }else{
+        this.tableList.tableColumn[2].productType=true
+      }
+      if(this.tableList.tableData[newVal].productName===" "){
+        this.tableList.tableColumn[1].product=false
+      }else{
+        this.tableList.tableColumn[1].product=true
+      }
+    }
   }
 }
 </script>

--
Gitblit v1.8.0