From 4cfbfd1b425f7b22b876ae6cae95c4fc29ae6bfb Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期五, 23 二月 2024 09:25:33 +0800
Subject: [PATCH] 盘库修改

---
 src/views/warehouse/components/enterpriseStock.vue |   30 +++++++++++++++++++++++++++---
 1 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/src/views/warehouse/components/enterpriseStock.vue b/src/views/warehouse/components/enterpriseStock.vue
index fdd9e13..6972463 100644
--- a/src/views/warehouse/components/enterpriseStock.vue
+++ b/src/views/warehouse/components/enterpriseStock.vue
@@ -55,7 +55,7 @@
 
 <script>
     import {computePageCount} from "@/utils";
-    import {listStockDataByStorehouseId} from "../../../api/warehouse";
+    import {listStockDataByStorehouseId, listStockHzDataByStorehouseId} from "../../../api/warehouse";
 
     export default {
         name: "index",
@@ -70,8 +70,13 @@
         },
         components: {},
         methods:{
-            open(data){
-                this.getList(data.id || data.storehouseId)
+            open(data,type){
+                console.log(data,'data')
+                if(type == '监管' || type == '管理'){
+                    this.getList(data.id || data.storehouseId)
+                }else{
+                    this.getHzList(data)
+                }
                 this.dialogVisible = true
             },
             async getList(id){
@@ -87,6 +92,25 @@
                     })
                 }
                 this.listLoading = false
+            },
+            async getHzList(data){
+                this.listLoading = true
+                let res = await listStockHzDataByStorehouseId({sid: data.storehouseId,eid: data.gId})
+                if(res.data.code === "200"){
+                    if(res.data.result && res.data.result.stockDataInfos.length>0 && res.data.result.reserveName && res.data.result.storehouseName){
+                        this.listData = res.data.result.stockDataInfos
+                        this.title = '库区:'+res.data.result.reserveName +' 仓库:'+ res.data.result.storehouseName + '各企业库存情况'
+                    }else{
+                        this.listData = []
+                        this.title = '暂无企业库存情况'
+                    }
+                }else{
+                    this.$message({
+                        type:'warning',
+                        message:res.data.message
+                    })
+                }
+                this.listLoading = false
             }
         }
     }

--
Gitblit v1.9.2