<template>
  <div class="other">
      <el-form label-width="120px"  ref="form" :model="form">
         <div class="divider">
           <div class="title">
             <div class="ele-bg-primary"></div>
             <span>仓储配置</span>
           </div>
           <div class="ele-bg-primary ele-width"></div>
         </div>
         <el-row :gutter="24">
           <el-col :span="8">
             <el-form-item label="启用库存预警">
                <el-radio v-model="form.isWarn" :label="1">是</el-radio>
                <el-radio v-model="form.isWarn" :label="0">否</el-radio>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="允许拆包" prop="isUnpack">
                <el-switch v-model="form.isUnpack" :active-value="1" :inactive-value="0"> </el-switch>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="安全库存" prop="secureInventory">
                <el-input  v-model="form.secureInventory"/>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="最小库存" prop="minInventory">
                <el-input  v-model="form.minInventory"/>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="最大库存" prop="maxInventory">
                <el-input  v-model="form.maxInventory"/>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="盘点模式" prop="inventoryMode">
               <el-radio v-model="form.inventoryMode" :label="1">逐个盘点</el-radio>
               <el-radio v-model="form.inventoryMode" :label="2">批量盘点</el-radio>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="质保预警参考" prop="warrantyWarnRefer">
                <DictSelection dictName="质保预警参考" clearable v-model="form.warrantyWarnRefer">
                </DictSelection>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="保质期">
                <div class="form-line">
                  <el-input  v-model="form.warrantyPeriod"/>
                  <DictSelection class="line-select" dictName="保质期单位" clearable v-model="form.warrantyPeriodUnit">
                  </DictSelection>
                </div>
             </el-form-item>
           </el-col>
         </el-row>
      </el-form>
  </div>
</template>

<script>
  import deptSelect from '@/components/CommomSelect/dept-select.vue'
  import personSelect from '@/components/CommomSelect/person-select.vue';
  export default {
    props: {
      form: {
        type: Object,
        default: {}
      }
    },
    components: { deptSelect , personSelect },
    data() {
      return {


      };
    },

    methods: {
      // 选择所属部门
      searchDeptNodeClick (id, info) {
        // 根据部门获取人员
        const params = { executeGroupId: id };
        this.$nextTick(() => {
          this.$refs.directorRef.getList(params);
        });
      },
      //选择负责人
      handleDirectorChange (id, info) {
      },


    }
  };
</script>

<style lang="scss" scoped>
  .other{
    background: #fff;
    padding: 1px 17px;
  }
  .divider {
    margin: 0px 0 20px;
    .title {
      display: flex;
      align-items: center;
      margin-bottom: 10px;
      div {
        width: 8px;
        height: 20px;
        margin-right: 10px;
      }
      span {
        font-size: 20px;
      }
    }
    .ele-width{
      width: 100%;
      height: 2px;
    }
  }
  .form-line{
    display: flex;
    align-items: center;
    justify-content: space-between;
    .line-select{
      margin-left:15px;
    }
  }
</style>
