审查视图

src/components/detailedDialog/index.vue 4.8 KB
小范 authored
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 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
<template>
    <div class="app-container">
        <el-dialog
                title="收发明细"
                :visible.sync="dialogVisible"
                width="75%"
        >
            <el-table :data="detailedList" border>
                <el-table-column label="操作人">
                    <template slot-scope="scope">
                        {{ scope.row.operator}}
                    </template>
                </el-table-column>
                <el-table-column label="件数">
                    <template slot-scope="scope">
                        {{ scope.row.pcs}}
                    </template>
                </el-table-column>
                <el-table-column label="重量">
                    <template slot-scope="scope">
                        {{ scope.row.wgt}}
                    </template>
                </el-table-column>
                <el-table-column label="海关回执时间" width="160">
                    <template slot-scope="scope">
                        {{ scope.row.procdate}}
                    </template>
                </el-table-column>
                <el-table-column label="回执接收时间" width="160">
                    <template slot-scope="scope">
                        {{ scope.row.responsedate}}
                    </template>
                </el-table-column>
                <el-table-column label="海关统一编号" width="160">
                    <template slot-scope="scope">
                        {{ scope.row.seqno}}
                    </template>
                </el-table-column>
                <el-table-column label="客户端导入回执状态码">
                    <template slot-scope="scope">
                        <el-tag type="success" v-if="scope.row.responsecode ==='0'">正常</el-tag>
                        <el-tag type="danger" v-if="scope.row.responsecode ==='1'">失败</el-tag>
                    </template>
                </el-table-column>
                <el-table-column label="客户端导入回执" show-overflow-tooltip>
                        <template slot-scope="scope">
                        <span :style="{'color':scope.row.responsecode=='0'?'rgb(103,194,58)'
                        :scope.row.responsecode=='1'?'rgb(245,110,110)':'rgb(60,62,66)'}">{{ scope.row.responsemessage }}</span>
                        </template>
                </el-table-column>
                <el-table-column label="海关回执代码">
                    <template slot-scope="scope">
                        <el-tag type="success" v-if="scope.row.procresult ==='S'">成功</el-tag>
                        <el-tag type="danger" v-if="scope.row.procresult ==='F'">失败</el-tag>
                    </template>
                </el-table-column>
                <el-table-column label="海关回执内容" show-overflow-tooltip>
                    <template slot-scope="scope">
                        <span :style="{'color':scope.row.procresult=='S'?'rgb(103,194,58)'
                        :scope.row.procresult=='F'?'rgb(245,110,110)':'rgb(60,62,66)'}">{{ scope.row.note }}</span>
                    </template>
                </el-table-column>
            </el-table>
        </el-dialog>
    </div>
</template>

<script>
    import {
        getList
    } from '../../api/detailed'

    export default {
        name: "DetailedLog",
        props: {
            visible: {
                type: Boolean,
                default: false
            },
            messageId: {
                type: String,
                default: false
            }
        },
        data() {
            return {
                detailedList: []
            }
        },
        computed: {
            dialogVisible: {
                get() {
                    return this.visible
                },
                set(val) {
                    // 当visible改变的时候,触发父组件的 updateVisible方法,在该方法中更改传入子组件的 centerDialogVisible的值
                    this.$emit('updateVisible', val)
                }
            }
        },
        created() {
        },
        methods: {
            check(id) {
                let _this = this
                const para = {
                    autoid: id
                }
                getList(para).then(res => {
                    let response = res.data
                    if (response.code === '200') {
                        _this.detailedList = response.data
                    }
                })
            },
            handleClose() {

            }
        }
    }
</script>

<style scoped>
    .filter-container {
        margin-bottom: 20px;
    }
    .el-tooltip_popper{
        max-width: 60%;
    }
    .table-p {
        font-size: 20px;
        text-align: center;
        background-color: #efefef;
        height: 45px;
        line-height: 45px;
        width: 100%;
        margin-top: 0px;
    }
</style>