<template>
  <div>
    <div class="title_box rx-bc mt6">
      <div class="name">包装材料 </div>

      <div class="rx-bc"> </div>
    </div>

    <div class="material">
      <div class="content_table" v-for="(item, index) in arrList" :key="index">
        <div class="item rx-sc">
          <div class="rx ww33">
            <div class="lable rx-cc">编号</div>
            <div class="content">
              {{ item.code }}
            </div>
          </div>

          <div class="rx ww33">
            <div class="lable rx-cc">名称</div>
            <div class="content">
              {{ item.name }}
            </div>
          </div>

          <div class="rx ww33">
            <div class="lable rx-cc">规格</div>
            <div class="content">{{ item.specification }}</div>
          </div>
        </div>

        <div class="item rx-sc">
          <div class="rx ww33">
            <div class="lable rx-cc">型号</div>
            <div class="content content_num rx-sc">
              <el-input
                size="mini"
                v-model="item.feedQuantity"
                placeholder="数量"
              >
              </el-input>
              /{{ item.unit }}
            </div>
          </div>

          <div class="rx ww33">
            <div class="lable rx-cc">型号</div>
            <div class="content">
              <div>{{ item.modelType }}</div>
            </div>
          </div>

          <div class="rx ww33">
            <div class="lable rx-cc">领料仓库</div>
            <div class="content">
              <div>{{ item.pathName }}</div>
            </div>
          </div>
        </div>

        <div class="del_box">
          <el-link
            type="danger"
            icon="el-icon-delete"
            @click="getDelete(index)"
          ></el-link>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: 'deviceBom',
    props: {
      list: {
        type: Array,
        default: () => []
      },
      wordItem: {
        type: Object,
        default: () => {}
      },
      isType: {
        type: Boolean,
        default: false
      },

      remainingTime: {
        type: Number,
        default: 0
      }
    },

    watch: {
      list:{
        handler(val){
          if(val.length){
            this.arrList = val.filter(v=>v.rootCategoryLevelId==='13')
          }
        },
        immediate: true,
        deep: true
      }
    },

    computed: {},

    data() {
      return {
        arrList:[],
      };
    },

    methods: {
      getDelete(idx) {
        this.list.splice(idx, 1);
      }
    }
  };
</script>

<style scoped lang="scss"></style>
