liuying
2024-12-08 0e0ff265a99bae19dbf6194483704cfdb7223375
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<template>
    <!-- 详情弹框 -->
    <el-dialog v-model="dialogVisible" width="70%" @close="closeDialog">
        <template #header>
            <div style="color: #fff">
                <span>库位{{placeCode}}详情 </span>
            </div>
        </template>
        <el-table ref="tableRefWmsStockQuan" :data="materialList" style="width: 100%" tooltip-effect="light" row-key="id" border="">
            <el-table-column type="index" label="序号" width="55" align="center"/>
            <el-table-column prop="placeCode" label="库位编码" show-overflow-tooltip="" />
            <el-table-column prop="inTime" label="进入时间" width="80" show-overflow-tooltip="" />
            <el-table-column prop="upi" label="部件条码" show-overflow-tooltip="" />
            <el-table-column prop="detailName" label="部件名称" show-overflow-tooltip="" />
            <el-table-column prop="planNo" label="批次" show-overflow-tooltip="" />
            <el-table-column prop="orderId" label="订单号" show-overflow-tooltip="" />
            <el-table-column prop="packageCode" label="包装号" show-overflow-tooltip="" />
            <el-table-column prop="length" label="长" show-overflow-tooltip="" />
            <el-table-column prop="width" label="宽" show-overflow-tooltip="" />
            <el-table-column prop="thk" label="厚" show-overflow-tooltip="" />
            <el-table-column prop="stockStatus" label="库存状态" min-width="140"   show-overflow-tooltip="">
                <template #default="scope">
                    <el-tag>{{ getEnumDesc(scope.row.stockStatus, getEnumStockStatusData_Index) }}</el-tag>
                </template>
            </el-table-column>
            <!-- <el-table-column prop="stockStatusName" label="库存状态名称" min-width="140"  show-overflow-tooltip="" /> -->
            <el-table-column prop="operReason" label="操作原因" show-overflow-tooltip="" />
            <el-table-column prop="operUser" label="操作人" show-overflow-tooltip="" />
            <el-table-column prop="operTime" label="操作时间" width="80" show-overflow-tooltip="" />
            <el-table-column prop="lockStatus" label="锁定状态" show-overflow-tooltip="">
                <template #default="scope">
                    <el-tag>{{ getEnumDesc(scope.row.lockStatus, getEnumLockStatusData_Index) }}</el-tag>
                </template>
            </el-table-column>
            <el-table-column prop="lockReason" label="锁定原因" show-overflow-tooltip="" />
            <el-table-column prop="lockUser" label="锁定人" show-overflow-tooltip="" />
            <el-table-column prop="lockTime" label="锁定时间" width="80" show-overflow-tooltip="" />
            <el-table-column prop="remarks" label="备注" show-overflow-tooltip="" />
            <el-table-column prop="createTime" label="创建时间" width="130" show-overflow-tooltip="" />
            <el-table-column prop="updateTime" label="修改时间" width="130" show-overflow-tooltip="" />
            <el-table-column prop="createUserName" label="创建人" show-overflow-tooltip="" />
            <el-table-column prop="updateUserName" label="修改人" show-overflow-tooltip="" />
        </el-table>
 
        <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 { listWmsStockQuan, pageWmsLocationViewDetail, pageWmsStockQuan } from '/@/api/main/ReportCenter/wmsStockQuan_new';
import commonFunction from '/@/utils/commonFunction';
import { getTagUseable } from '/@/utils/formate';
const { getEnumDesc } = commonFunction();
import { getAPI } from '/@/utils/axios-utils';
import { SysEnumApi } from '/@/api-services/api';
const getEnumStockStatusData_Index = ref<any>([]);
 
//库位编号
const placeCode = ref('');
const dialogVisible = ref(false);
const materialList = ref<any>([]);
const getEnumLockStatusData_Index = ref<any>([]);
 
//打开窗口
const openDialog = async (type: string) => {
    getEnumStockStatusData_Index.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('StockStatusEnum')).data.result ?? [];
    getEnumLockStatusData_Index.value = (await getAPI(SysEnumApi).apiSysEnumEnumDataListGet('LockStatusEnum')).data.result ?? [];
debugger
placeCode.value =type.placeCode 
    var res = await listWmsStockQuan({
        placeCode: type.placeCode //改为查询库位上全部的库存
    });
    if (res.data.code == 200) {
        dialogVisible.value = true;
        materialList.value = res.data.result;
        // if (materialList.value.length > 0) {
        //     containerNo.value = res.data.result[0].containerCode;
        // }
    }
};
//关闭窗口
const closeDialog = () => {
    dialogVisible.value = false;
};
// 暴露方法
defineExpose({ openDialog });
</script>
<style lang="less" scoped></style>