<template>
  <div>
    <el-descriptions class="normal-margin" :column="2"  border labelClassName="my-label" contentClassName="my-content">
      <div slot="title" class="my-label__title">收货单信息</div>
      <el-descriptions-item label="发货单号">{{ mainData.billno?mainData.billno:"--" }}</el-descriptions-item>
      <el-descriptions-item label="订单号">{{ mainData.sonum?mainData.sonum:"--" }}</el-descriptions-item>
      <el-descriptions-item label="发货日期">{{ mainData.billdate?mainData.billdate:"--" }}</el-descriptions-item>
      <el-descriptions-item label="经销商编号">{{ mainData.agentnum?mainData.agentnum:"--" }}</el-descriptions-item>
      <el-descriptions-item label="经销商名称">{{ mainData.enterprisename?mainData.enterprisename:"--" }}</el-descriptions-item>
      <el-descriptions-item :style="style(mainData.STATUS)" label="状态">
        <span :style="colorStyle">{{ mainData.STATUS?mainData.STATUS:"--" }}</span>
      </el-descriptions-item>
      <el-descriptions-item label="备注">{{ mainData.remarks?mainData.remarks:"--" }}</el-descriptions-item>
    </el-descriptions>
    <el-descriptions class="normal-margin" :column="2"  border labelClassName="my-label" contentClassName="my-content">
      <div slot="title" class="my-label__title">收货信息</div>
      <el-descriptions-item label="联系人">{{ mainData.recvice?mainData.recvice.name:"--" }}</el-descriptions-item>
      <el-descriptions-item label="联系人电话">{{ mainData.recvice?mainData.recvice.phonenumber:"--" }}</el-descriptions-item>
      <el-descriptions-item label="省市县">{{mainData.recvice ? `${mainData.recvice.province}-${mainData.recvice.city}-${mainData.recvice.county}` : '' }}</el-descriptions-item>
      <el-descriptions-item label="地址">{{ mainData.recvice ? mainData.recvice.address : ''}}</el-descriptions-item>
    </el-descriptions>
    <el-descriptions class="normal-margin" :column="2"  border labelClassName="my-label" contentClassName="my-content">
      <div slot="title" class="my-label__title">系统信息</div>
      <el-descriptions-item label="创建人">{{ mainData.createby?mainData.createby:"--" }}</el-descriptions-item>
      <el-descriptions-item label="创建时间">{{ mainData.createdate?mainData.createdate:"--" }}</el-descriptions-item>
      <el-descriptions-item label="审核人">{{ mainData.checkby?mainData.checkby:"--" }}</el-descriptions-item>
      <el-descriptions-item label="审核时间">{{ mainData.checkdate?mainData.checkdate:"--" }}</el-descriptions-item>
      <el-descriptions-item label="复核人">{{ mainData.recheckby?mainData.recheckby:"--" }}</el-descriptions-item>
      <el-descriptions-item label="复核时间">{{ mainData.recheckdate?mainData.recheckdate:"--" }}</el-descriptions-item>
    </el-descriptions>
    <!-- <el-descriptions  border :column="2" labelClassName="my-label" contentClassName="my-content"> -->
      <!-- <div slot="title" class="my-label__title">物流信息</div> -->
      
      <!-- <el-descriptions-item label="物流公司">{{ mainData.logiscomp?mainData.logiscomp.enterprisename:"--" }}</el-descriptions-item>
      <el-descriptions-item label="快递100ID">{{ mainData.logiscomp?mainData.logiscomp.kd100id:"--" }}</el-descriptions-item> -->
    <!-- </el-descriptions> -->
  </div>
</template>

<script>
export default {
  props:["mainData"],
  data(){
    return {
      colorStyle:{
        color:''
      }
    }
  },
  mounted() {
  },
  methods:{
    style(val) {
      let style = {}
      switch (val) {
        case '新建':
          style = {color:"#000000"}
          break;
        case '提交':
          style = {color:"#d90a0a"}
          break;
        case '审核':
          style = {color:"#52C41A"}
          break;
        case '复核':
          style = {color:"#3874f6"}
          break;
        case '关闭':
          style = {color:"#b2c0ea"}
          break;
        default:
          break;
      }
      console.log(style)
      this.colorStyle.color = style.color
      console.log(this.colorStyle,"1111")
      return style

    }
  }
}
</script>

<style scoped>

</style>