<template>
  <div>
    <el-descriptions class="margin-top" border :column="4">
      <el-descriptions-item :label="$t('唛头')">{{details.marks}}</el-descriptions-item>
      <el-descriptions-item :label="$t('已到箱数/总箱数')">{{details.sumNum || 0}}/{{details.costVO.totalNum || 0 }}</el-descriptions-item>
      <el-descriptions-item :label="$t('订单状态')">
        <dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="details.status" />
      </el-descriptions-item>
      <el-descriptions-item :label="$t('送货日期')">{{details.deliveryDate}}</el-descriptions-item>
      <el-descriptions-item :label="$t('运输方式')">
        <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="details.transportId"></dict-tag>
      </el-descriptions-item>
      <el-descriptions-item :label="$t('出货渠道')">
       {{details.channelName || '/'}}
      </el-descriptions-item>
      <el-descriptions-item :label="$t('始发地')">{{ details.logisticsInfoDto ? details.logisticsInfoDto.startTitleZh :''}}</el-descriptions-item>
      <el-descriptions-item :label="$t('目的地')">{{details.logisticsInfoDto ? details.logisticsInfoDto.destTitleZh : ''}}</el-descriptions-item>
      <el-descriptions-item  :label="$t('发货人姓名')">{{details.consignorVO ? details.consignorVO.name : ''}}</el-descriptions-item>
      <el-descriptions-item  :label="$t('发货人公司')">{{details.consignorVO ? details.consignorVO.company : ''}}</el-descriptions-item>
      <el-descriptions-item  :label="$t('发货人电话')">+{{details.consignorVO ? details.consignorVO.countryCode : ''}} {{details.consignorVO ? details.consignorVO.phone : ''}}</el-descriptions-item>
      <el-descriptions-item></el-descriptions-item>
      <el-descriptions-item  :label="$t('收货人姓名')">{{details.consigneeVO ? details.consigneeVO.name :''}}</el-descriptions-item>
      <el-descriptions-item  :label="$t('收货人公司')">{{details.consigneeVO ? details.consigneeVO.company :''}}</el-descriptions-item>
      <el-descriptions-item  :label="$t('收货人电话')"> +{{details.consigneeVO ? details.consigneeVO.countryCode :''}} {{details.consigneeVO ? details.consigneeVO.phone :''}}</el-descriptions-item>
      <el-descriptions-item></el-descriptions-item>
    </el-descriptions>
  </div>
</template>

<script>
import { DICT_TYPE } from '@/utils/dict';
import {getTradeCityList} from "@/api/ecw/region";
export default {
  props:{
    details:{
      type:Object,
      default:()=>{
        return  {
          logisticsInfoDto:{
            startTitleZh:'',
            destTitleZh:''
          },
          consignorVO:{},
          consigneeVO:{},


        }
      }
    },
  },
  name: "ordeDetailsForm",
  created() {
    getTradeCityList().then(res => {
      this.tradeCityList = res.data
    })
    },
  components:{
    //目的地
    importCityList(){
      return this.tradeCityList.filter(item => item.type == 1)
    },
    //始发地
    exportCityList(){
      return this.tradeCityList.filter(item => item.type == 2)
    },
  },
  data(){
    return {
      DICT_TYPE,
    }
  }
}
</script>

