From c40afc5b937b625a78cf884284458a3c8d80df1e Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期四, 19 十月 2023 11:14:07 +0800
Subject: [PATCH] "库存报表,位置报表,历史路由跳转参数调整"

---
 src/views/reportForm/inventoryReport/index.vue       |   20 +++++++++++++++-----
 src/views/reportForm/inboundOutboundDetail/index.vue |    8 ++++----
 src/views/reportForm/locationReport/index.vue        |   18 ++++++++++++++----
 3 files changed, 33 insertions(+), 13 deletions(-)

diff --git a/src/views/reportForm/inboundOutboundDetail/index.vue b/src/views/reportForm/inboundOutboundDetail/index.vue
index c31f520..594c6a6 100644
--- a/src/views/reportForm/inboundOutboundDetail/index.vue
+++ b/src/views/reportForm/inboundOutboundDetail/index.vue
@@ -168,10 +168,10 @@
     async getData() {
       if (this.params.name === "鎶ヨ〃") {
         await getHistory({
-          keyWord:this.params.row.productTypeName,
-          produceId:this.params.row.id,
-          productName:this.params.row.productName,
-          unit:this.params.row.unit,
+          keyWord:this.params.keyWord,
+          produceId:this.params.produceId,
+          unit:this.params.unit,
+          productName:this.params.productName,
           page: this.pagerOptions.currPage,
           pageSize: this.pagerOptions.pageSize
         }).then((res) => {
diff --git a/src/views/reportForm/inventoryReport/index.vue b/src/views/reportForm/inventoryReport/index.vue
index eace0e9..91e54a1 100644
--- a/src/views/reportForm/inventoryReport/index.vue
+++ b/src/views/reportForm/inventoryReport/index.vue
@@ -86,7 +86,7 @@
 import { getInventoryData, getProductCategoryList, getWarehouseList } from "@/api/reportForm/inventoryRwport"
 
 export default {
-  name: "InboundOutboundDetail",
+  name: "inventoryReport",
   props: {},
   components: { AddOverviewDialog },
   mixins: [pageMixin],
@@ -277,7 +277,7 @@
     getList(val) {
       this.searchStr=val
       this.getInventoryData({
-        page: this.pagerOptions.currPage,
+        page: 1,
         pageSize: this.pagerOptions.pageSize,
         keyWord:val,
       })
@@ -304,7 +304,10 @@
       this.$router.push({
         name: "inboundOutboundDetail",
         params: {
-          id: row.produceId,
+          keyWord:row.productType,
+          produceId:row.produceId,
+          unit:row.unit,
+          productName:row.productName,
           name: "鎶ヨ〃"
         }
       })
@@ -315,8 +318,15 @@
       console.log(row)
     },
     // 浣嶇疆
-    handleLocation() {
-      this.$router.push("/reportForm/locationReport")
+    handleLocation(row) {
+      console.log(row,"rowwww")
+      this.$router.push({
+        name:"locationReport",
+        params:{
+          keyWord:row.row.productName,
+          name:"搴撳瓨鎶ヨ〃"
+        }
+      })
     },
     // 棰勬祴
     handleForecast() {},
diff --git a/src/views/reportForm/locationReport/index.vue b/src/views/reportForm/locationReport/index.vue
index 68a953b..76af58e 100644
--- a/src/views/reportForm/locationReport/index.vue
+++ b/src/views/reportForm/locationReport/index.vue
@@ -207,16 +207,24 @@
       })
     },
     getData() {
-      this.getLocationData({
+      if(this.$route.params.name==="搴撳瓨鎶ヨ〃"){
+        this.getLocationData({
+        keyWord:this.$route.params.keyWord,
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
       })
+      }else{
+        this.getLocationData({
+          page: this.pagerOptions.currPage,
+          pageSize: this.pagerOptions.pageSize
+        })
+      }
     },
 
     // 鎼滅储
     getList(val) {
       this.getLocationData({
-        page: this.pagerOptions.currPage,
+        page: 1,
         pageSize: this.pagerOptions.pageSize,
         keyWord:val
       })
@@ -243,8 +251,10 @@
       this.$router.push({
         name: "inboundOutboundDetail",
         params: {
-          row:row,
-          // id: row.produceId,
+          keyWord:row.productTypeName,
+          produceId:row.id,
+          productName:row.productName,
+          unit:row.unit,
           name: "鎶ヨ〃"
         }
       })

--
Gitblit v1.8.0