schangxiang@126.com
2024-11-21 60735779c303c2dd10feea45d7fd761103b225e0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<template>
    <!-- 详情弹框 -->
    <el-dialog v-model="dialogVisible" width="70%" @close="closeDialog">
        <template #header>
            <div style="color: #fff">
                <span>库位详情</span>
            </div>
        </template>
        <!-- <p >容器编号:{{ containerNo }}</p> -->
        <el-table ref="tableRefWmsStockQuan" :data="materialList" style="width: 100%" tooltip-effect="light" row-key="id"
            border="">
            <el-table-column type="index" fixed="left" label="序号" width="55" align="center" />
            <el-table-column prop="areaName" fixed="left" width="100" label="所在库区" show-overflow-tooltip="" />
            <el-table-column prop="placeName" width="100" label="所在库位" show-overflow-tooltip="" />
            <el-table-column prop="materialCode"  min-width="120" label="物料编号" show-overflow-tooltip="" />
            <el-table-column prop="materialName" min-width="120" label="物料名称" show-overflow-tooltip="" />
            <el-table-column prop="materialTypeName" label="物料类型" show-overflow-tooltip="" />
            <el-table-column prop="quantity" label="库存数" show-overflow-tooltip="" />
            <el-table-column prop="snCode" width="180" label="跟踪码" show-overflow-tooltip="" />
            <el-table-column prop="containerCode" width="100" label="容器编号" show-overflow-tooltip="" />
            <el-table-column prop="containerTypeName" label="容器类型" show-overflow-tooltip="" />
        
        </el-table>
        <!-- <el-descriptions title="" :column="1" border v-if="materialList.length>0">
            <el-descriptions-item v-for="(item,index) in  materialList" :key="index" :label="item.materialCode"
                label-align="center" align="center" label-class-name="my-label" class-name="my-content">
                {{Number(item.quantity).toFixed(3)  }} 
            </el-descriptions-item>
        </el-descriptions> -->
        <template #footer>
            <span class="dialog-footer">
                <el-button @click="dialogVisible = false">关闭</el-button>
                <!-- <el-button type="primary"
                   @click="confirm">确认</el-button> -->
            </span>
        </template>
    </el-dialog>
</template>
<script lang="ts" setup>
import { ref, defineExpose } from 'vue'
import { ElMessage } from 'element-plus';
import { pageWmsLocationViewDetail, pageWmsStockQuan } from '/@/api/main/ReportCenter/wmsStockQuan';
const dialogVisible = ref(false);
const materialList = ref<any>([]);
 
//库位编号
const containerNo = ref('');
//打开窗口
const openDialog = async (type: string) => {
    var res = await pageWmsLocationViewDetail({
        //containerCode: type,
        placeCode:type,//改为查询库位上全部的库存
        page: 1,
        pageSize: 10
    });
    if (res.data.code == 200) {
 
        materialList.value = res.data.result?.items;
        if (materialList.value.length > 0) {
            dialogVisible.value = true;
            containerNo.value = res.data.result?.items[0].containerCode;
        }
    }
};
//关闭窗口
const closeDialog = () => {
    dialogVisible.value = false;
};
// 暴露方法
defineExpose({ openDialog });
 
</script>
<style lang="less" scoped></style>