<template>
    <div v-if="order">
        <el-descriptions :column="4" v-if="order" :colon="false">
            <el-descriptions-item :label="$t('订单号')">{{order.orderNo}}</el-descriptions-item>
            <el-descriptions-item :label="$t('运输方式')">
                <dict-tag class="mr-10" :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.transportId" />
            </el-descriptions-item>
            <el-descriptions-item :label="$t('出货渠道')">
                {{order.channelName}}
            </el-descriptions-item>
            <el-descriptions-item :label="$t('订单状态')">
                {{order.statusMsg}}
            </el-descriptions-item>
            <el-descriptions-item :label="$t('唛头')">{{order.marks}}</el-descriptions-item>
            <el-descriptions-item :label="$t('始发仓')">
                {{order.logisticsInfoDto.startTitleZh}}
            </el-descriptions-item>
            <el-descriptions-item :label="$t('目的仓')" :span="2">
                {{order.logisticsInfoDto.destAddressZh}}
            </el-descriptions-item>

            <!-- 优惠申请 -->
            <el-descriptions-item :label="$t('申请理由')" :span="4">
                <div class="bold">
                    {{applyReason}}
                </div>
            </el-descriptions-item>
        </el-descriptions>
    </div>
</template>
<script>
import {getOrder} from '@/api/ecw/order'
import {getBoxApproval} from "@/api/ecw/box";
/*
撤销清关审核
*/
export default {
    name: 'RevokeClear',
    props:{
        id: [String, Number]
    },
    data(){
        return {
            order: null,
          applyReason: null
        }
    },
    created(){
        if(this.id){
            // id是出货审核ID
            getBoxApproval({id: this.id}).then(res => {
              this.applyReason = res.data.applyReason
              getOrder(res.data.orderId).then(res => {
                this.order = res.data
              })
            })
        }
    }
}
</script>
<style scoped lang="scss">
.title{
    padding: 10px 0;
    span{
        font-size: 14px;
        font-weight: bold;
    }
}
.bold{
    font-weight: bold;
}
</style>
