SplitDetail.vue 5.08 KB
Newer Older
dragondean@qq.com's avatar
dragondean@qq.com committed
1 2
<!--拆单审核中的申请信息部分-->
<template>
3 4
    <div v-if="detail">
        <el-descriptions :column="4" v-if="order">
5 6
            <el-descriptions-item :label="$t('订单号')">{{order.orderNo}}</el-descriptions-item>
            <el-descriptions-item :label="$t('运输方式')">
7 8
                <dict-tag class="mr-10" :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.transportId" />
            </el-descriptions-item>
9
            <el-descriptions-item :label="$t('出货方式')">
10 11
                {{channel ? channel.nameZh : ''}}
            </el-descriptions-item>
12
            <el-descriptions-item :label="$t('订单状态')">
13
                <el-tag size="small">
14
                    {{order.statusMsg}}
15 16
                </el-tag>
            </el-descriptions-item>
17 18
            <el-descriptions-item :label="$t('唛头')">{{order.marks}}</el-descriptions-item>
            <el-descriptions-item :label="$t('始发仓')">
19 20
                {{order.logisticsInfoDto.startTitleZh}}
            </el-descriptions-item>
21
            <el-descriptions-item :label="$t('目的仓')">
22
                {{order.logisticsInfoDto.destAddressZh}}
dragondean@qq.com's avatar
dragondean@qq.com committed
23 24 25
            </el-descriptions-item>
        </el-descriptions>

26
        <template v-for="item in orderSplitBackVOList">
27 28 29 30
            <div class="title mt-20" :key="item.orderNo">
                <span class="mr-10">{{item.orderNo}}</span>
                <dict-tag class="mr-10" :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="item.transportId" />
                <span class="mr-10" v-if="item.channelName">{{item.channelName}}</span>
31
                <span>{{$t('发往')}}{{item.dstWarehouseName}}</span>
32 33
            </div>
            <el-table :data="item.orderSplitItemBackVOList" :key="'items-' + item.orderNo">
34 35 36 37 38 39 40 41 42 43 44
                <el-table-column :label="$t('序号')">
                    <template slot-scope="scope">{{scope.$index+1}}</template>
                </el-table-column>
                <el-table-column :label="$t('中文品名')">
                    <template slot-scope="{row}">{{row.prodTitleZh}}</template>
                </el-table-column>
                <el-table-column :label="$t('英文品名')">
                    <template slot-scope="{row}">{{row.prodTitleEn}}</template>
                </el-table-column>
                <el-table-column :label="$t('品牌')">
                    <template slot-scope="{row}">
45
                        <template v-if="row.brandName">{{row.brandName}}</template>
46
                        <dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="row.feeType" />
47 48 49 50 51 52 53 54 55 56
                    </template>
                </el-table-column>
                <el-table-column :label="$t('体积')">
                    <template slot-scope="{row}">{{row.volume}}</template>
                </el-table-column>
                <el-table-column :label="$t('重量')">
                    <template slot-scope="{row}">{{row.weight}}kg</template>
                </el-table-column>
                <el-table-column :label="$t('箱数')">
                    <template slot-scope="{row}">{{row.num}}</template>
57 58 59 60
                </el-table-column>
                <el-table-column :label="$t('数量')">
                    <template slot-scope="{row}">{{row.quantity}}</template>
                </el-table-column> 
61 62 63
                <el-table-column :label="$t('备注')">
                    <template slot-scope="{row}">{{row.remark}}</template>
                </el-table-column>          
64
            </el-table>
dragondean@qq.com's avatar
dragondean@qq.com committed
65 66
        </template>
    </div>
dragondean@qq.com's avatar
dragondean@qq.com committed
67 68
</template>
<script>
69 70
import {getApproval, getOrder} from '@/api/ecw/order'
import {getChannel} from '@/api/ecw/channel'
71
import {getSplitList} from '@/api/ecw/orderHandle'
dragondean@qq.com's avatar
dragondean@qq.com committed
72 73 74 75 76 77
export default {
    props:{
        id: [String, Number]
    },
    data(){
        return {
78 79
            detail: null,
            order: null,
80 81
            channel: null,
            orderSplitBackVOList: []
dragondean@qq.com's avatar
dragondean@qq.com committed
82 83 84 85 86
        }
    },
    watch:{
        id(){
            this.getData()
87 88
        },
        detail(){
89
            this.getSplit()
90 91 92 93 94 95
            this.getOrder()
        },
        order(){
            if(this.order.channelId){
                this.getChannel()
            }
dragondean@qq.com's avatar
dragondean@qq.com committed
96 97 98
        }
    },
    created(){
dragondean@qq.com's avatar
dragondean@qq.com committed
99 100 101 102 103 104 105 106 107
        if(this.id){
            this.getData()
        }
    },
    methods:{
        getData(){
            getApproval(this.id).then(res => {
                this.detail = JSON.parse(res.data.details)
            })
108
        },
109 110 111 112 113 114
        getSplit(){
            getSplitList({orderId: this.detail.orderId, lang: this.$i18n.locale.toLowerCase().indexOf('zh') > -1 ? 0 : 1 }).then(res => {
                console.log('getSplitList', res)
                this.orderSplitBackVOList = res.data.orderSplitBackVOList
            })
        },
115 116 117 118 119 120 121 122 123
        getOrder(){
            getOrder(this.detail.orderId).then(res => {
                this.order = res.data
            })
        },
        getChannel(){
            getChannel(this.order.channelId).then(res => {
                this.channel = res.data
            })
dragondean@qq.com's avatar
dragondean@qq.com committed
124
        }
dragondean@qq.com's avatar
dragondean@qq.com committed
125 126
    }
}
127 128 129 130 131 132 133 134 135 136
</script>
<style scoped lang="scss">
.title{
    padding: 10px 0;
    span{
        font-size: 14px;
        font-weight: bold;
    }
}
</style>