From d68b036a3b3c67273b8effa3c9925ef3869a91ba Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期三, 07 二月 2024 13:56:50 +0800
Subject: [PATCH] wms项目 wms系统参数设置的页面开发+路由+是否显示表头配置

---
 src/views/operate/orderPoint/index.vue |   41 ++++++++++++++++++++++++++++-------------
 1 files changed, 28 insertions(+), 13 deletions(-)

diff --git a/src/views/operate/orderPoint/index.vue b/src/views/operate/orderPoint/index.vue
index 0da0d1d..340eb0e 100644
--- a/src/views/operate/orderPoint/index.vue
+++ b/src/views/operate/orderPoint/index.vue
@@ -103,8 +103,8 @@
       amount: 0,
       operationId: 0,
       minInventory: 0,
-      maxInventory: 0,
-      orderNumber: 0,
+      maxInventory: 1,
+      orderNumber: 1,
       unit: "",
       reorderId: 0,
       searchTaskMap: [],
@@ -113,13 +113,22 @@
     }
   },
   created() {
-    if(this.$route.params.productId){
+    if (this.$route.params.productId) {
       this.getData({
-        productId:this.$route.params.productId,
-        pageSize:15,
-        page:1
+        productId: this.$route.params.productId,
+        pageSize: 15,
+        page: 1
       })
-    }else{
+    }else if(this.$route.params.locationId){
+      this.searchTaskMap=[]
+      this.getData({
+        id: this.$route.params.locationId,
+        jointName:this.$route.params.locationName,
+        // type:"",
+        pageSize: 15,
+        page: 1
+      })
+    }else {
       this.getData()
     }
     this.setTable()
@@ -153,7 +162,7 @@
         keyWord: data?.jointName,
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize,
-        productId:data?.productId
+        productId: data?.productId
       }).then((res) => {
         if (res.code === 200) {
           console.log(res)
@@ -190,7 +199,7 @@
     },
     // 鎿嶄綔杈撳叆
     inputContent(val, prop, row) {
-      console.log(val, prop, row)
+      console.log(row)
       if (prop === "minInventory") {
         this.minInventory = val
         if (parseFloat(this.minInventory) - parseFloat(this.prediction) > 0) {
@@ -215,7 +224,7 @@
     },
     // 鏂板
     addProductClick() {
-      console.log(this.addTitle)
+      console.log(this.addTitle, "qqqqqqqqqqqq")
       this.isSel()
       if (this.isNoProduct && this.addTitle === "鏂板缓") {
         this.$refs.tablelistRef.getProductList()
@@ -241,6 +250,7 @@
           editable: false,
           isOrder: true
         })
+        this.tableList.tableData = this.tableData
         this.locationId = 0
         this.productId = 0
       } else {
@@ -248,7 +258,10 @@
         this.showDiscard = false
         let requestUrl = this.currentRowId === 0 ? addReorderRule : updateReorderRule
         let params = this.saveParams()
-        requestUrl(params)
+        if(params.productId===0){
+          this.$message.warning("璇峰~鍐欎骇鍝佷俊鎭�!")
+        }else{
+          requestUrl(params)
           .then((res) => {
             console.log(res)
             if (res.code === 200) {
@@ -261,6 +274,7 @@
             console.log(err)
             this.getData()
           })
+        }
         // }
       }
     },
@@ -355,8 +369,10 @@
     },
     // 閫変腑浜у搧鏂规硶
     selProductClick(item) {
-      this.productId = item.value
+      this.productId = item.productId
       this.unit = item.unit
+      this.amount = item.amount
+      this.prediction = item.prediction
     },
     // 閫変腑璺嚎鏂规硶
     selRouteClick(item, prop) {
@@ -382,7 +398,6 @@
           },
           ...res.data
         ]
-        console.log(res, "res666")
       })
     },
     // 鍒犻櫎type

--
Gitblit v1.8.0