<template>
  <div>
    <div class="basic-details-title border-none">
      <span class="border-span">生产信息</span>
    </div>
    <el-descriptions
      :label-style="labelStyle"
      :contentStyle="contentStyle"
      title=""
      :column="4"
      size="medium"
      border
    >
      <el-descriptions-item>
        <template slot="label"> 是否齐套件</template>
        {{ dictType[idata.isCompleteSet] }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">消耗波动</template>
        {{ idata.consumWave ? idata.consumWave + '%' : null }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">变动损耗率</template>
        {{ idata.changeLossRate ? idata.changeLossRate + '%' : null }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">固定损耗数</template>
        {{ idata.fixLossNum }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">排程类型</template>
        {{ idata.apsType }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">允许改型</template>
        {{ dictType[idata.isModify] }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">允许返工返修</template>
        {{ dictType[idata.isRework] }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">是否返回料</template>
        {{ dictType[idata.isRematerial] }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">是否副产品</template>
        {{ dictType[idata.isByProduct] }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">是否废品</template>
        {{ dictType[idata.isWaste] }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">是否不良品</template>
        {{ dictType[idata.isDefective] }}
      </el-descriptions-item>
    </el-descriptions>
  </div>
</template>
<script>
  import { getDetailInfo } from '@/api/material/list';
  import { getUserPage } from '@/api/system/organization';
  import { sysDict } from '@/utils/sys';
  export default {
    data() {
      return {
        labelStyle: {
          width: '200px'
        },
        contentStyle: {
          width: '400px'
        },
        dictType: {
          1: '是',
          0: '否'
        },
        dictPd: {
          1: '逐个盘点',
          2: '批量盘点'
        },
        depInfo: {},
        idata: {}
      };
    },
    methods: {
      async getDetailInfoAugr(data) {
        this.idata = {
          ...data,
          apsType: await sysDict('排程类型', data.apsType)
        };
      }
    }
  };
</script>
<style lang="scss" scoped>
  .baseinfo-container {
    background-color: #fff;
    padding: 0px 20px 20px;
    .content {
      padding: 0 20px;
    }
    .basic-details-title {
      font-size: 16px;
      margin: 15px 0;
    }
    .upload-container {
      display: flex;
      .img-box {
        width: 280px;
        height: 342px;
        border: 1px solid rgba(215, 215, 215, 1);
        display: flex;
        justify-content: center;
        align-items: center;
        img {
          max-width: 100%;
        }
      }
      .file-list {
        margin-left: 50px;
        flex: 1;
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        justify-items: baseline;
        align-content: flex-start;
        .file-box {
          width: 30%;
          margin-bottom: 20px;
          height: 57px;
          text-align: center;
          line-height: 55px;
          border: 1px solid #1890ff;
          color: #1890ff;
          cursor: pointer;
          &.disabled {
            cursor: not-allowed;
            border-color: rgba(215, 215, 215, 1);
            color: rgba(215, 215, 215, 1);
          }
        }
      }
    }
  }
</style>
