MergeDetail.vue 4.28 KB
Newer Older
lanbaoming's avatar
lanbaoming committed
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
<!--拆单审核中的申请信息部分-->
<template>
    <div v-if="orders">
        <el-table :data="orders">
            <el-table-column :label="$t('订单编号')">
                <template slot-scope="scope">{{scope.row.orderNo}}</template>
            </el-table-column>
            <el-table-column :label="$t('唛头')">
                <template slot-scope="{row}">{{row.marks}}</template>
            </el-table-column>
            <!-- <el-table-column label="已到箱数/总箱数">
                <template slot-scope="{row}">/{{row.sumNum}}/{{row.sumNum}}</template>
            </el-table-column> -->
            <el-table-column :label="$t('填单统计')">
                <template slot-scope="{row}">
                    {{row.costVO.totalNum}}{{$t('')}}<br/>{{row.costVO.totalVolume}}<br/>{{row.costVO.totalWeight}}kg
                </template>
            </el-table-column>
            <el-table-column :label="$t('入仓统计')">
                <template slot-scope="{row}">
                    {{row.sumNum}}{{$t('')}}<br/>{{row.sumVolume}}<br/>{{row.sumWeight}}kg
                </template>
            </el-table-column>
            <el-table-column :label="$t('入仓时间')">
                <template slot-scope="{row}">
                    {{row.rucangTime|parseTime}}
                </template>
            </el-table-column>
            <el-table-column :label="$t('运输方式')">
                <template slot-scope="{row}">
                    <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId" />
                </template>
            </el-table-column>
            <el-table-column :label="$t('出货渠道')">
                <template slot-scope="{row}">
                    {{getChannelName(row.channelId)}}
                </template>
            </el-table-column>
            <el-table-column :label="$t('始发仓')">
                <template slot-scope="{row}">{{jsonParse(row.departureVO.departure).titleZh}}</template>
            </el-table-column>
            <el-table-column :label="$t('目的仓')">
                <template slot-scope="{row}">
                    {{jsonParse(row.objectiveVO.objective).titleZh}}
                </template>
            </el-table-column>
            <el-table-column :label="$t('发货人')">
                <template slot-scope="{row}">
                    {{row.consignorVO.name}}
                </template>
            </el-table-column>
            <el-table-column :label="$t('收货人')">
                <template slot-scope="{row}">
                    {{row.consigneeVO.name}}
                </template>
            </el-table-column>        
        </el-table>
    </div>
</template>
<script>
import {getApproval, getOrder} from '@/api/ecw/order'
import {getMergeListByMergeId} from '@/api/ecw/orderHandle'
import {getChannelListByIds} from '@/api/ecw/channel'
import {parseTime} from '@/utils/ruoyi'
export default {
    name: 'MergeDetail',
    filters: {parseTime},
    props:{
        id: [String, Number]
    },
    data(){
        return {
            orders: null,
            channels: []
        }
    },
    watch:{
        id(){
            this.getData()
        }
    },
    computed:{
        jsonParse(){
            return d => {
                return JSON.parse(d)
            }
        },
        getChannelName(){
            return id => {
                let channel = this.channels.find(item => item.channelId == id)
                return channel ? channel.nameZh : '/'
            }
        }
    },
    created(){
        if(this.id){
            this.getData()
        }
    },
    methods:{
        getData(){
            getMergeListByMergeId({id: this.id}).then(res => {
                this.orders = res.data
                this.getChannels()
            })
        },
        getChannels(){
            let ids = []
            this.orders.forEach(order => {
                if(order.channelId){
                    ids.push(order.channelId)
                }
            })
            if(!ids.length) return false
            getChannelListByIds({ids: ids.join(',')}).then(res => {
                this.channels = res.data
            })
        }
    }
}
</script>
<style scoped lang="scss">
.title{
    padding: 10px 0;
    span{
        font-size: 14px;
        font-weight: bold;
    }
}
</style>