<template>
  <el-dialog title="详情" :visible.sync="detailOpen" width="800px" append-to-body destroy-on-close :close-on-click-modal="false">
    <el-form label-width="90px">
      <el-row class="el-row-table">
        <el-col :span="12">
          <el-form-item label="配件名称">
            <span v-if="detailInfo.title">{{ detailInfo.title }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="配件编号">
            <span v-if="detailInfo.planNo">{{ detailInfo.planNo }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="规格参数">
            <span v-if="detailInfo.specs">{{ detailInfo.specs }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="库存数量">
            <span v-if="detailInfo.total">{{ detailInfo.total }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="配件描述">
            <span v-if="detailInfo.content">{{ detailInfo.content }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="供货商">
            <span v-if="detailInfo.supplier">{{ detailInfo.supplier }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="联系人">
            <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="联系电话">
            <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="详细地址">
            <span v-if="detailInfo.address">{{ detailInfo.address }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="创建时间">
            <span v-if="detailInfo.createTime">{{ detailInfo.createTime }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="创建人">
            <span v-if="detailInfo.createBy">{{ detailInfo.createBy }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </el-dialog>
</template>

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

<style scoped>

</style>
