<template>
  <div class="head-container">
    <el-row :gutter="20">
      <el-col :span="12">
        <el-form ref="form" :model="form" size="mini" label-width="100px">
          <el-form-item label="物品名称" prop="assetName">
            <div>{{ form.assetName }}</div>
          </el-form-item>
          <el-form-item label="唯一编码" prop="deptAssetNumber">
            <div>{{ form.deptAssetNumber }}</div>
          </el-form-item>
          <el-form-item label="公司资产编号" prop="assetNumber">
            <div>{{ form.assetNumber }}</div>
          </el-form-item>
          <el-form-item label="资产类型" prop="assetType">
            <el-tag v-if="form.assetType===1" size="mini" type="warning">耗材</el-tag>
            <el-tag v-else size="mini" type="success">固定资产</el-tag>
          </el-form-item>
          <el-form-item v-if="form.assetType==='1'" label="库存数">
            <div>{{ form.num }}</div>
          </el-form-item>
<!--          <el-form-item label="设备设施名称" prop="equipmentName">-->
<!--            <div>{{ form.equipmentName }}</div>-->
<!--          </el-form-item>-->
          <el-form-item label="设备型号" prop="equipmentType">
            <div>{{ form.equipmentType }}</div>
          </el-form-item>
<!--          <el-form-item label="设备编号" prop="equipmentNumber">-->
<!--            <div>{{ form.equipmentNumber }}</div>-->
<!--          </el-form-item>-->
<!--          <el-form-item label="原厂编号" prop="factoryNumber">-->
<!--            <div>{{ form.factoryNumber }}</div>-->
<!--          </el-form-item>-->
          <el-form-item label="生产厂家" prop="factoryName">
            <div>{{ form.factoryName }}</div>
          </el-form-item>
          <el-form-item label="入库来源" prop="source">
            <el-tag v-if="form.source==='1'" size="mini">采购</el-tag>
            <el-tag v-else-if="form.source==='2'" size="mini">租赁</el-tag>
            <el-tag v-else-if="form.source==='3'" size="mini">借用</el-tag>
            <el-tag v-else size="mini">赠送</el-tag>
          </el-form-item>
          <el-form-item label="购入日期" prop="buyDate">
            <div>{{ form.buyDate }}</div>
          </el-form-item>
          <el-form-item label="定位位置" prop="location">
            <div>{{ form.location }}</div>
          </el-form-item>
          <el-form-item label="备注" prop="remark">
            <div>{{ form.remark }}</div>
          </el-form-item>
        </el-form>
      </el-col>
      <el-col :span="12">
        <div style="font-size: 18px;margin-top:-10px;margin-bottom: 10px">
          配件信息
        </div>
        <el-table :data="form.accessoryList" size="mini">
          <el-table-column label="配件名称" prop="accessoryName"/>
          <el-table-column label="配件编号" prop="accessoryNumber"/>
        </el-table>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: "assetDetail",
  props: {
    form: {
      type: Object,
      default: {}
    }
  }
}
</script>

<style scoped lang="scss">
.el-form-item--mini.el-form-item, .el-form-item--small.el-form-item {
  margin-bottom: 10px;
}
</style>
