From 482c8fcf03bfbeddc843e4ea7fbb53c74485e2e5 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期三, 27 九月 2023 19:54:22 +0800
Subject: [PATCH] 出入库搜索去掉sourceNumber及bug修复

---
 src/views/operate/allot/index.vue                    |    3 -
 src/views/overview/OverviewListView.vue              |   23 +++++++++--
 src/api/operate/inventoryAdjustment.js               |    8 ++++
 src/views/reportForm/inboundOutboundDetail/index.vue |   18 +++++++--
 src/views/operate/scrap/index.vue                    |    1 
 src/components/makepager/FormBtnsView.vue            |    6 ---
 src/router/index.js                                  |    4 +-
 7 files changed, 43 insertions(+), 20 deletions(-)

diff --git a/src/api/operate/inventoryAdjustment.js b/src/api/operate/inventoryAdjustment.js
index a541cb0..a30d00b 100644
--- a/src/api/operate/inventoryAdjustment.js
+++ b/src/api/operate/inventoryAdjustment.js
@@ -25,3 +25,11 @@
     data
   })
 }
+// 涓婃灦瑙勫垯鑾峰彇浣嶇疆鍜屼骇鍝�
+export function getRuleList(data) {
+  return request({
+    url: "/api-wms/v1/locationProductAmount/getRuleList",
+    method: "post",
+    data
+  })
+}
diff --git a/src/components/makepager/FormBtnsView.vue b/src/components/makepager/FormBtnsView.vue
index fc703da..1a31735 100644
--- a/src/components/makepager/FormBtnsView.vue
+++ b/src/components/makepager/FormBtnsView.vue
@@ -173,11 +173,5 @@
   .left_border {
     border-left: 1px solid #e9e9e9;
   }
-  .no-cursor {
-    cursor: no-drop;
-  }
-  .yes-cursor {
-    cursor: pointer;
-  }
 }
 </style>
diff --git a/src/router/index.js b/src/router/index.js
index 0802d27..badfb9b 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -113,8 +113,8 @@
     console.log(from, next)
     to.meta.title = to.params.name
     document.title = to.meta.title
-  } else if (to.name === "inOutboundDetail") {
-    to.meta.title = to.params.name + "/鍑哄叆搴撴槑缁�"
+  } else if (to.path === "/reportForm/inOutboundDetail" && to.params.name) {
+    to.meta.title = "鍑哄叆搴撴槑缁�"
     document.title = to.meta.title
   }
 })
diff --git a/src/views/operate/allot/index.vue b/src/views/operate/allot/index.vue
index b5f3c53..fead6d5 100644
--- a/src/views/operate/allot/index.vue
+++ b/src/views/operate/allot/index.vue
@@ -213,8 +213,7 @@
       await getAllList({
         number: this.keyword,
         page: this.pagerOptions.currPage,
-        pageSize: this.pagerOptions.pageSize,
-        sourceNumber: this.keyword
+        pageSize: this.pagerOptions.pageSize
       }).then((res) => {
         if (res.code === 200) {
           const list = res.data.map((item) => {
diff --git a/src/views/operate/scrap/index.vue b/src/views/operate/scrap/index.vue
index dbdeef6..daa4b7f 100644
--- a/src/views/operate/scrap/index.vue
+++ b/src/views/operate/scrap/index.vue
@@ -139,7 +139,6 @@
     async getData() {
       await getDisuseList({
         number: this.keyword,
-        sourceNumber: this.keyword,
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
       }).then((res) => {
diff --git a/src/views/overview/OverviewListView.vue b/src/views/overview/OverviewListView.vue
index 555dab7..98c0581 100644
--- a/src/views/overview/OverviewListView.vue
+++ b/src/views/overview/OverviewListView.vue
@@ -60,13 +60,27 @@
         infomation: {}
       },
       workType: this.$route.params.workType,
-      keyword: ""
+      keyword: "",
+      params: {}
     }
   },
   created() {
     this.setTable()
+    var paramsData = sessionStorage.getItem("paramsData")
+    let params = {}
+    if (paramsData) {
+      params = JSON.parse(sessionStorage.getItem("paramsData"))
+    } else {
+      params = this.$route.params
+      sessionStorage.setItem("paramsData", JSON.stringify(params))
+    }
+    this.params = params
     this.getData()
-    console.log(this.$route.params.workType)
+    // console.log(this.$route.params.workType)
+  },
+  // 椤甸潰閿�姣佷箣鍓�
+  beforeDestroy() {
+    sessionStorage.removeItem("paramsData")
   },
   methods: {
     setTable() {
@@ -182,10 +196,9 @@
     async getData() {
       await getOperation({
         number: this.keyword,
-        operationTypeId: this.$route.params.id,
+        operationTypeId: this.params.id,
         page: this.pagerOptions.currPage,
-        pageSize: this.pagerOptions.pageSize,
-        sourceNumber: this.keyword
+        pageSize: this.pagerOptions.pageSize
       }).then((res) => {
         console.log(res.data)
         if (res.code === 200) {
diff --git a/src/views/reportForm/inboundOutboundDetail/index.vue b/src/views/reportForm/inboundOutboundDetail/index.vue
index d65260c..31bd7f2 100644
--- a/src/views/reportForm/inboundOutboundDetail/index.vue
+++ b/src/views/reportForm/inboundOutboundDetail/index.vue
@@ -52,12 +52,22 @@
         title: "鏂板缓",
         infomation: {}
       },
-      productId: this.$route.params.id,
-      productName: this.$route.params.name
+      params: {}
     }
   },
   created() {
     this.setTable()
+    console.log(this.$route.params)
+    var paramsData = sessionStorage.getItem("paramsList")
+    let params = {}
+    if (paramsData) {
+      params = JSON.parse(sessionStorage.getItem("paramsList"))
+    } else {
+      params = this.$route.params
+      sessionStorage.setItem("paramsList", JSON.stringify(params))
+    }
+    this.params = params
+    console.log(this.params)
     this.getData()
   },
   methods: {
@@ -149,7 +159,7 @@
     // 璇锋眰鏁版嵁
     async getData() {
       await getProductOperatonList({
-        productId: this.productId,
+        productId: this.params.id,
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
       }).then((res) => {
@@ -159,7 +169,7 @@
               ...item,
               from: item.fromLocation.name,
               to: item.toLocation.name,
-              productName: this.productName
+              productName: this.params.name
             }
           })
           this.tableList.tableInfomation = list || []

--
Gitblit v1.8.0