<template>
  <el-dialog title="详情" :visible.sync="detailOpen" width="800px" append-to-body destroy-on-close :close-on-click-modal="false">
    <el-form label-width="100px">
      <el-row class="el-row-table">
        <el-col :span="12">
          <el-form-item label="批次号" prop="inspectId">
            <span v-if="detailInfo.batchNo">{{ detailInfo.batchNo }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="快递公司" prop="express">
            <span v-if="detailInfo.express">{{ detailInfo.express }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="快递员" prop="username">
            <span v-if="detailInfo.username">{{ detailInfo.username }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="快递员电话" prop="tel">
            <span v-if="detailInfo.tel">{{ detailInfo.tel }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="运单号" prop="expressNo">
            <span v-if="detailInfo.expressNo">{{ detailInfo.expressNo }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="24">
          <el-form-item label="发货照片">
            <el-image
              v-if="detailInfo.imgUrl"
              :src="detailInfo.imgUrl"
              :preview-src-list="[detailInfo.imgUrl]"
              :z-index="9999"
              style="width: 200px;height: 200px;"
            ></el-image>
            <span v-else>-</span>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </el-dialog>
</template>

<script>
  import { getLogistics } from "@/api/project/info";
  export default {
    name: "detail-info",
    data(){
        return{
          detailOpen: false,
          detailInfo: {}
        }
    },
    methods:{
      getDetailInfo(id){
        getLogistics(id).then(res =>{
          if(res.code == 200){
              this.detailInfo = res.data;
              this.detailOpen = true;
          }
        })
      }
    }
  }
</script>

<style scoped>

</style>
