<template>
  <div class="baseInfo">
  

    <el-form label-width="100px" ref="form" :model="dataInfo">
     
      
      <el-col :span="6" label-width="100px">
      <el-form-item label="类型" prop="type">

        {{ dataInfo.bomType == 1 ? "PBOM" :  dataInfo.bomType == 2 ? 'MBOM' :   dataInfo.bomType == 3 ? 'ABOM' :  dataInfo.bomType == 4 ? 'CBOM' : ''}}
          </el-form-item>
          </el-col>


      <el-row v-if="dataInfo.bomType == 2">
        <el-col :span="6" label-width="100px">
          <el-form-item label="BOM编码" prop="type">
            <el-input
              disabled
              placeholder="BOM编码"
              v-model="dataInfo.code"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6" label-width="100px">
          <el-form-item label="BOM名称" prop="type">
            <el-input
              disabled
              placeholder="BOM名称"
              v-model="dataInfo.name"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6" label-width="100px">
          <el-form-item label="版本号" prop="type">
            <el-input
              disabled
              placeholder="版本号"
              v-model="dataInfo.versions"
            ></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6" label-width="100px">
          <el-form-item label="状态" prop="type">
            <el-select
              style="width: 100%"
              disabled
              v-model="dataInfo.status"
              placeholder="请选择"
            >
              <el-option
                v-for="item in statusOptions"
                :label="item.label"
                :value="item.value"
                :key="item.value"
              >
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>


        <el-col :span="6" label-width="100px">
          <el-form-item label="所属工厂" prop="code">
            <el-input
              disabled
              placeholder="所属工厂"
              v-model="dataInfo.code"
            ></el-input>
          </el-form-item>
        </el-col>

      </el-row>

    
    </el-form>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        statusOptions: [
          {
            label: '默认',
            value: '0'
          },
          {
            label: '归档',
            value: '1'
          }
        ]
      };
    },
    props: {
      dataInfo: {
        type: Object,
        default() {
          return {};
        }
      }
    }
  };
</script>

<style lang="scss" scoped>
  .baseInfo {
    padding: 6px;
    box-sizing: border-box;
    border: 1px solid #f1f2f2;
    margin-bottom: 10px;
  }
</style>
