ke_junjie
2025-06-04 84620534eb627e95811b971a4b552b6a177829bf
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
96
97
<template>
    <el-dialog
        custom-class="sy-modal"
        
        title="订货号修改历史记录"
        width="80%"
        :before-close="onClose"
    >
        <div class="order-number-management-history-modal-conatinter" v-loading="loading">
            <el-table :data="list" border stripe height="300">
                <el-table-column width="50" label="序号" fixed>
                    <template #default="scope">{{scope.$index+1}}</template>
                </el-table-column>
                <el-table-column prop="CreateTime" label="修改时间" width="160" />
                <el-table-column prop="NewOrderNo" label="修改后新订货号" />
                <el-table-column prop="OldOrderNo" label="修改前订货号" />
                <el-table-column prop="CreateBy" label="修改者" />
            </el-table>
        </div >
        <template #footer>
            <span class="dialog-footer">
                <el-button @click="onClose">关&nbsp;闭</el-button>
            </span>
        </template>
    </el-dialog>
</template>
 
<script>
export default {
    name:'orderNumberManagemenHistoryModalCompontent',
    props:{
        visible:{
            type:Boolean,
            default:false
        },
        row:{
            type:Object,
            default:function(){
                return {}
            }
        }
    },
    data(){
        return {
            loading:false,
            list:[]
        }
    },
    watch:{
        visible(newVal,oldVal){
            if (newVal!==oldVal) {
                if (newVal) {
                    this.initShow();
                } else {
                    
                }
            }
        }
    },
    methods:{
        initShow(){
            this.getList();
        },
        /* 更新数据表 */
        getList(){
            this.loading = true;
            let params = {orderNoRecordId:this.row.OrderNoRecordId}
            this.$api.get('Get',params,{block:'orderNo'}).then((d)=>{
                if (d && d instanceof Array) {
                    this.list = d.map((currentItem)=>{
                        currentItem.CreateTime = this.$utils.project.parseTimeStr(currentItem.CreateTime)
                        return currentItem
                    })
                } else {
                    this.list = d;
                }
                this.loading = false;
            }).catch((err)=>{
                this.loading = false;
            })
        },
        close(){
            this.$emit('update:visible',false)
        },
        onClose(){
            this.close();
        }
    }
}
</script>
 
<style scoped lang="scss">
.order-number-management-history-modal-conatinter{
    box-sizing: border-box;
    padding: 12px;
}
</style>