<template>
    <div>
        <el-dialog
          title="生成上架任务"
          :visible="pickingVisible"
          @close="close"
          width="66%">
          <el-form
            inline
            ref="queryForm"
            label-position="top"
            :model="formData">
            <el-form-item>
              <el-checkbox v-model="formData.isTaskPa" true-label="Y" false-label="N">是否生成上架任务</el-checkbox>
              <el-radio v-model="formData.isAllocLoc" label="N" :disabled="formData.isTaskPa==='N'">推荐分配库位</el-radio>
              <el-radio v-model="formData.isAllocLoc" label="Y" :disabled="formData.isTaskPa==='N'">上架规则计算库位</el-radio>
            </el-form-item>
          </el-form>
          <div class="more-query-btn">
            <el-button v-auth="50300030101" type="primary" @click="submitForm">确认</el-button>
          </div>
        </el-dialog>
    </div>
</template>
<script>
export default {
  data () {
    return {
      formData: {
        isTaskPa: 'N',
        isAllocLoc: 'N'
      }
    }
  },
  props: {
    pickingVisible: Boolean
  },
  methods: {
    close () {
      this.$emit('close')
    },
    submitForm () {
      this.$emit('pickingCancel', this.formData)
    }
  }
}
</script>
