From dfcf1c54fe3cbfcd237f2baab8b4997225a232d3 Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期三, 18 十月 2023 16:37:48 +0800
Subject: [PATCH] feat:  产品详情页,在库数量跳转到库存报表中,并且把商品带过去

---
 src/views/productManage/product/AddProductDialog.vue |   26 ++++++++++++++++++++++----
 1 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/src/views/productManage/product/AddProductDialog.vue b/src/views/productManage/product/AddProductDialog.vue
index 94df055..27f441a 100644
--- a/src/views/productManage/product/AddProductDialog.vue
+++ b/src/views/productManage/product/AddProductDialog.vue
@@ -29,7 +29,6 @@
         label-position="right"
         label-width="110px"
         size="mini"
-        style="height: 53vh; overflow-x: hidden"
       >
         <!-- <div class="content-btn">
           <el-button plain size="mini" disabled>鏍囩鎵撳嵃</el-button>
@@ -40,7 +39,9 @@
           <FormBtnsView
             :add-product="addProduct"
             @inOutBoundClick="inOutBoundClick"
+            @inLibraryClick="inLibraryClick"
             :show-procure="showProcure"
+            :countObject="statisticsMap"
             :show-sale="showSale"
           />
           <div class="bottom">
@@ -450,8 +451,8 @@
         </div>
       </el-form>
       <!-- 灏� -->
-      <div v-if="showFooter" slot="footer" class="dialog-footer">
-        <el-button type="primary" size="small" @click="saveClick('form')">淇濆瓨</el-button>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" size="small" @click="saveClick('form')" :disabled="!showFooter">淇濆瓨</el-button>
         <el-button size="small" @click="editConfig.visible = false">鍙栨秷</el-button>
       </div>
     </el-dialog>
@@ -525,7 +526,10 @@
         { name: "杈呮枡", id: "杈呮枡" },
         { name: "鑰楁潗", id: "鑰楁潗" },
         { name: "鍏朵粬", id: "鍏朵粬" }
-      ]
+      ],
+      statisticsMap: {
+        inLibrary: 0 // 鍦ㄥ簱
+      }
     }
   },
   created() {
@@ -533,6 +537,7 @@
     this.getProductList()
     this.setTableForm()
     this.setBottonView()
+    this.statisticsMap.inLibrary = this.editConfig?.infomation?.amount ?? 0
   },
   methods: {
     // 鑾峰彇浜у搧绫诲埆
@@ -725,6 +730,19 @@
         })
       }
     },
+    // 鍦ㄥ簱鐐瑰嚮
+    inLibraryClick(){
+      if (this.editConfig.title !== "鏂板缓") {
+        console.log(this.editConfig.infomation)
+        this.$router.push({
+          name: "inventoryReport",
+          params: {
+            name: this.editConfig.infomation.name,
+            id: this.editConfig.infomation.id
+          }
+        })
+      }
+    },
     // 鍙攢鍞�/鍙噰璐�
     checkboxChange(val, param) {
       if (val === "閲囪喘") {

--
Gitblit v1.8.0