<template>
  <div class="warehouseConfig">
    <HeaderTitle
      title="仓储配置"
      size="16px"
      style="margin-top: 20px"
    ></HeaderTitle>
    <el-descriptions title="" :column="4" size="medium" border>
      <el-descriptions-item>
        <template slot="label"> 启用库存预警</template>
        {{ dictType[idata.isWarn] }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">允许拆包</template>
        {{ dictType[idata.isUnpack] }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">安全库存</template>
        {{ idata.secureInventory }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">最小库存</template>
        {{ idata.minInventory }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 最大库存</template>
        {{ idata.maxInventory }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">盘点模式</template>
        {{ dictPd[idata.inventoryMode] }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">质保预警参考</template>
        <!-- <DictSelection
                dictName="质保预警参考"
                clearable
                v-model="idata.warrantyWarnRefer"
              >
              </DictSelection> -->
        {{ idata.warrantyWarnRefer }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label">保质期</template>
        {{ idata.warrantyPeriod ? idata.warrantyPeriod + '/' : null
        }}{{ idata.warrantyPeriodUnit }}
      </el-descriptions-item>
    </el-descriptions>
  </div>
</template>
<script>
  import { sysDict } from '@/utils/sys';
  export default {
    data() {
      return {
        dictType: {
          1: '是',
          0: '否'
        },
        dictPd: {
          1: '逐个盘点',
          2: '批量盘点'
        },
        depInfo: {},
        idata: {}
      };
    },
    methods: {
      async getDetailInfoAugr(data) {
        this.idata = {
          ...data,
          warrantyPeriodUnit: await sysDict(
            '保质期单位',
            data.warrantyPeriodUnit
          ),
          warrantyWarnRefer: await sysDict(
            '质保预警参考',
            data.warrantyWarnRefer
          )
        };
      }
    }
  };
</script>

<style lang="scss" scoped>
  .warehouseConfig {
    background-color: #fff;
    padding: 20px 0;
    .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>
