<template>
  <div>
    <el-descriptions class="margin-top" border :column="4">
      <el-descriptions-item label="唛头">{{details.marks}}</el-descriptions-item>
      <el-descriptions-item label="已到箱数/总箱数">{{details.sumQuantity}}/{{details.sumNum}}</el-descriptions-item>
      <el-descriptions-item label="订单状态">
        <dict-tag :type="DICT_TYPE.ORDER_ABNORMAL_STATE" :value="details.status" />
      </el-descriptions-item>
      <el-descriptions-item label="送货日期">{{}}</el-descriptions-item>
      <el-descriptions-item label="运输方式">
        <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="details.transportId"></dict-tag>
      </el-descriptions-item>
      <el-descriptions-item label="出货渠道">
       <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="details.channelId"></dict-tag>
      </el-descriptions-item>
      <el-descriptions-item label="始发地">{{details.logisticsInfoDto.startWarehouseId}}</el-descriptions-item>
      <el-descriptions-item label="目的地">{{details.logisticsInfoDto.destWarehouseId}}</el-descriptions-item>
      <el-descriptions-item  label="发货人姓名">{{details.consignorVO.customerId}}</el-descriptions-item>
      <el-descriptions-item  label="发货人公司">{{details.consignorVO.company}}</el-descriptions-item>
      <el-descriptions-item  label="发货人电话">{{details.consignorVO.phone}}</el-descriptions-item>
      <el-descriptions-item></el-descriptions-item>
      <el-descriptions-item  label="收货人姓名">{{details.consigneeVO.customerId}}</el-descriptions-item>
      <el-descriptions-item  label="收货人公司">{{details.consigneeVO.company}}</el-descriptions-item>
      <el-descriptions-item  label="收货人电话">{{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:undefined,
          consignorVO:undefined,
          consigneeVO:undefined,
        }
      }
    },
  },
  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>

