<template>
    <div>
        <el-dialog
          title="高级查询"
          :visible="moreQueryVisible"
          @close="close"
          width="66%">
          <el-form
            inline
            ref="queryForm"
            label-position="top"
            :model="formData">
            <el-form-item
              label="区域"
              prop="skuName">
              <PublicQuery
              title="区域"
              baseUrl="/rep_web/repweb"
              cfgKey="repWmsArea"
              :valueField.sync="formData.areaCode"
              :textField.sync="formData.areaName">
              </PublicQuery>
            </el-form-item>
            <el-form-item
              label="库区"
              prop="skuName">
              <PublicQuery
              title="库区"
              baseUrl="/rep_web/repweb"
              cfgKey="repWmsZone"
              :valueField.sync="formData.zoneCode"
              :textField.sync="formData.zoneName">
              </PublicQuery>
            </el-form-item>
          </el-form>
          <div class="more-query-btn">
            <el-button v-auth="50930020103" type="primary" @click="submitForm">查询</el-button>
            <el-button v-auth="50930020104" @click="resetForm('queryForm')">重置</el-button>
          </div>
        </el-dialog>
    </div>
</template>
<script>
export default {
  data () {
    return {
      formData: {}
    }
  },
  mounted () {
  },
  props: {
    moreQueryVisible: Boolean,
  },
  methods: {

    // 关闭弹窗
    close () {
      this.$emit('close')
    },

    // 提交表单
    submitForm () {
      this.$emit('toGetList', this.formData)
      this.$refs['queryForm'].resetFields()
    },

    // 重置表单
    resetForm () {
      this.$refs['queryForm'].resetFields()
    },

  }
}
</script>
