<!-- 资产管理详情组件 -->
<template>
  <div class="sui-slider" v-bind:id="id?id:'dataDetail'">
    <div class="sui-slider-main">
      <div class="sui-slider-title" style="z-index: 10086;">
        <h2>
          <span class="sui-slider-title-text">资产变更</span>
        </h2>
        <span class="sui-icons sui-icons-close sui-slider-title-x"></span>
      </div>
      <div class="sui-slider-content" style="position: absolute; top: 0; left: 0; padding-top: 80px; padding-bottom: 70px; width: 100%; height: 100%;">
        <!-- 这里添加slider内容 -->
        <table class="sui-table sui-table-bgg" v-show="!showType" style="margin-bottom: 16px;">
          <tbody>
          <tr>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">物品名称</td>
            <td style="width: 30%;">{{ row.object_name }}</td>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">批次号</td>
            <td style="width: 30%;">{{ row.batch_no }}</td>
          </tr>
          <tr>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">规格型号</td>
            <td style="width: 30%;">{{ row.spec }}</td>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">商品条码</td>
            <td style="width: 30%;">{{ row.sn_code }}</td>
          </tr>
          <tr>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">数量</td>
            <td style="width: 30%;">{{ row.numbers ? row.numbers : row.number1 }}</td>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">单位</td>
            <td style="width: 30%;">{{ row.measure_unit_name }}</td>
          </tr>
          <tr>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">单价</td>
            <td style="width: 30%;">{{ row.price }}</td>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">金额</td>
            <td style="width: 30%;">{{ row.amount ?  row.amount : (row.number1 * (10000 * row.price)) / 10000}}</td>
          </tr>
          <tr v-show="!ismaterialStorage && !isDetail">
            <td class="st-table-tdl oa-document-td" style="width: 20%;">余量</td>
            <td colspan="3">{{ row.number2 }}</td>
          </tr>
          </tbody>
        </table>
        <table class="sui-table sui-table-bgg" v-show="showType" style="margin-bottom: 16px;">
          <tbody>
          <tr>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">资产名称</td>
            <td style="width: 30%;">{{ row.assets_name }}</td>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">资产类别</td>
            <td style="width: 30%;">{{ row.assets_type_name }}</td>
          </tr>
          <tr>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">SN号</td>
            <td style="width: 30%;">{{ row.sn_code }}</td>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">单位</td>
            <td style="width: 30%;">{{ row.measure_unit_name }}</td>
          </tr>
          <tr>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">存放区域</td>
            <td style="width: 30%;">{{ row.area_name }}</td>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">规格型号</td>
            <td style="width: 30%;">{{ row.spec }}</td>
          </tr>
          <tr>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">存放地点</td>
            <td style="width: 30%;">{{ row.assets_address }}</td>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">单价</td>
            <td style="width: 30%;">{{ row.price }}</td>
          </tr>
          <tr>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">所属部门</td>
            <td style="width: 30%;">{{ row.owe_dept_name }}</td>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">使用期限(月)</td>
            <td style="width: 30%;">{{ row.limit_time }}</td>
          </tr>
          <tr>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">使用部门</td>
            <td style="width: 30%;">{{ row.use_dept_name }}</td>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">使用人</td>
            <td style="width: 30%;">{{ row.user_name }}</td>
          </tr>
          <tr>
            <td class="st-table-tdl oa-document-td" style="width: 20%;">状态</td>
            <td colspan="3">{{ row.valid_flag_name }}</td>
          </tr>
          <tr style="height: 50px;">
            <td class="st-table-tdl oa-document-td" style="width: 20%;">备注</td>
            <td colspan="3">{{ row.memo }}</td>
          </tr>
          </tbody>
        </table>
        <div is="fileList" :fileListData="row.annexList" :fileName="'annex_name'" :fileListFlag="'1'" :pathName="'save_path'" ></div>
      </div>
    </div>
    <div class="sui-slider-cover"></div>
  </div>
</template>
<script>
import fileList from '@/components/common/fileList.vue';
export default {
  components: {
    fileList
  },
  props: ['id', 'row', 'showType', 'ismaterialStorage', 'isDetail'],
  data () {
    return {

    }
  },
  computed: {
  },
  watch: {
    row: function () {
      if (this.row.valid_flag === '1') {
        this.row.valid_flag_name = '空闲';
      } else if (this.row.valid_flag === '2') {
        this.row.valid_flag_name = '使用';
      } else if (this.row.valid_flag === '4') {
        this.row.valid_flag_name = '借用';
      } else if (this.row.valid_flag === '5') {
        this.row.valid_flag_name = '维修';
      } else if (this.row.valid_flag === '3') {
        this.row.valid_flag_name = '报废';
      }
    }
  },
  methods: {

  },
  created () {
  }
}
</script>
<style>

</style>
