From cf6a4b874aed82592eea78294715c7c688f9b248 Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期五, 03 十一月 2023 14:50:31 +0800
Subject: [PATCH] Merge branch 'dev' into songshankun/add-token

---
 src/views/productManage/reorderRules/index.vue       |   20 +++++++++++++++++++-
 src/views/operate/orderPoint/index.vue               |   14 ++++++++++++--
 src/components/makepager/FormBtnsView.vue            |   10 +++++++++-
 src/views/productManage/product/AddProductDialog.vue |   15 +++++++++++++++
 4 files changed, 55 insertions(+), 4 deletions(-)

diff --git a/src/components/makepager/FormBtnsView.vue b/src/components/makepager/FormBtnsView.vue
index 37119ca..653231a 100644
--- a/src/components/makepager/FormBtnsView.vue
+++ b/src/components/makepager/FormBtnsView.vue
@@ -49,7 +49,11 @@
         <div class="right-label">BOM</div>
       </div>
     </div> -->
-    <div v-if="!showProduct && !showWarehouse && !showPosition" class="sub-number no-cursor">
+    <div
+      v-if="!showProduct && !showWarehouse && !showPosition"
+      class="sub-number yes-cursor"
+      @click="reorderRulesClick"
+    >
       <div class="left"><i class="el-icon-refresh"></i></div>
       <div class="right">
         <div class="right-label">{{ countObject?.reorderRule ?? 0 }}</div>
@@ -158,6 +162,10 @@
     // 涓婃灦瑙勫垯
     listingRulesClick() {
       this.$emit("listingRulesClick")
+    },
+    // 閲嶈璐ц鍒�
+    reorderRulesClick() {
+      this.$emit("reorderRulesClick")
     }
   }
 }
diff --git a/src/views/operate/orderPoint/index.vue b/src/views/operate/orderPoint/index.vue
index c401bc3..80c1401 100644
--- a/src/views/operate/orderPoint/index.vue
+++ b/src/views/operate/orderPoint/index.vue
@@ -7,9 +7,11 @@
         :show-apply="false"
         :placeholder="'璇疯緭鍏ヤ綅缃�/浜у搧'"
         :amount-view="false"
+        :search-task-map="searchTaskMap"
         @addCommonClick="addProductClick"
         @searchClick="getList"
         @discardBtnClick="discardBtnClick"
+        @delSelectClick="delSelectClick"
       />
     </div>
     <div class="content_wrap">
@@ -136,11 +138,14 @@
       maxInventory: 0,
       orderNumber: 0,
       unit: "",
-      reorderId: 0
+      reorderId: 0,
+      searchTaskMap: [],
+      type: "bh"
     }
   },
   created() {
     this.setTable()
+    this.searchTaskMap = [{ type: this.type, title: "閲嶆柊璁㈣喘" }]
     this.getData()
     this.getLocationList()
   },
@@ -167,7 +172,7 @@
     async getData(data) {
       await getReorderRuleList({
         locationId: data?.id,
-        type: "bh",
+        type: this.type,
         keyWord: data?.jointName,
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
@@ -401,6 +406,11 @@
         ]
         console.log(res, "res666")
       })
+    },
+    // 鍒犻櫎type
+    delSelectClick() {
+      this.type = ""
+      this.getData()
     }
   }
 }
diff --git a/src/views/productManage/product/AddProductDialog.vue b/src/views/productManage/product/AddProductDialog.vue
index 8be8160..5c63af6 100644
--- a/src/views/productManage/product/AddProductDialog.vue
+++ b/src/views/productManage/product/AddProductDialog.vue
@@ -44,6 +44,7 @@
             :countObject="statisticsMap"
             :show-sale="showSale"
             @listingRulesClick="listingRulesClick"
+            @reorderRulesClick="reorderRulesClick"
           />
           <div class="bottom">
             <el-tabs v-model="activeName" type="card">
@@ -796,6 +797,20 @@
         }
       })
     },
+    // 閲嶈璐鍒�
+    reorderRulesClick() {
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          this.$router.push({
+            path: "/productManage/reorderRules",
+            query: {
+              productName: this.editConfig.infomation.name,
+              productId: this.editConfig.title === "鏂板缓" ? "" : this.editConfig.infomation.id
+            }
+          })
+        }
+      })
+    },
     // 鍙攢鍞�/鍙噰璐�
     checkboxChange(val, param) {
       if (val === "閲囪喘") {
diff --git a/src/views/productManage/reorderRules/index.vue b/src/views/productManage/reorderRules/index.vue
index 9384663..57d32fa 100644
--- a/src/views/productManage/reorderRules/index.vue
+++ b/src/views/productManage/reorderRules/index.vue
@@ -7,9 +7,11 @@
         :show-apply="false"
         :placeholder="'璇疯緭鍏ヤ綅缃�/浜у搧'"
         :amount-view="false"
+        :search-task-map="searchTaskMap"
         @addCommonClick="addProductClick"
         @searchClick="getList"
         @discardBtnClick="discardBtnClick"
+        @delSelectClick="delSelectClick"
       />
     </div>
     <div class="list-view">
@@ -76,11 +78,21 @@
       maxInventory: 0,
       orderNumber: 0,
       unit: "",
-      reorderId: 0
+      reorderId: 0,
+      queryProductId: null,
+      searchTaskMap: []
     }
   },
   created() {
     this.setTable()
+    let query = this.$route.query
+    if (query) {
+      this.queryProductId = query.productId?.length ? query.productId : null
+      this.pagerOptions.currPage = 1
+      this.searchTaskMap =
+        query.productId?.length > 0 ? [{ productId: this.queryProductId, title: query.productName }] : []
+      console.log(this.searchTaskMap)
+    }
     this.getData()
   },
   methods: {
@@ -105,6 +117,7 @@
     // 璇锋眰鏁版嵁
     async getData() {
       await getReorderRuleList({
+        productId: this.queryProductId ? this.queryProductId : null,
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
       }).then((res) => {
@@ -319,6 +332,11 @@
     // 鑾峰彇褰撳墠鏃堕棿
     currentTime() {
       return currentTime()
+    },
+    // 鍒犻櫎浜у搧
+    delSelectClick() {
+      this.queryProductId = ""
+      this.getData()
     }
   }
 }

--
Gitblit v1.8.0