| | |
| | | |
| | | <script> |
| | | import {computePageCount} from "@/utils"; |
| | | import {listStockDataByStorehouseId} from "../../../api/warehouse"; |
| | | import {listStockDataByStorehouseId, listStockHzDataByStorehouseId} from "../../../api/warehouse"; |
| | | |
| | | export default { |
| | | name: "index", |
| | |
| | | }, |
| | | 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){ |
| | |
| | | }) |
| | | } |
| | | 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 |
| | | } |
| | | } |
| | | } |