<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="ASN单号"
              prop="asnNo">
              <el-input v-model="formData.asnNo"></el-input>
            </el-form-item>
            <el-form-item
              label="商品"
              prop="skuName">
              <PublicQuery
              title="商品"
              baseUrl="/rep_web/repweb"
              cfgKey="repWmsSku"
              :valueField.sync="formData.skuCode"
              :textField.sync="formData.skuName">
              </PublicQuery>
            </el-form-item>
            <el-form-item
              label="推荐库位"
              prop="suggestLoc">
              <el-input v-model="formData.suggestLoc"></el-input>
            </el-form-item>
            <el-form-item
              label="实际上架库位"
              prop="toLoc">
              <el-input v-model="formData.toLoc"></el-input>
            </el-form-item>
            <el-form-item
              label="上架人"
              prop="ownerName">
              <PublicQuery
              title="上架人"
              baseUrl="/rep_web/repweb"
              cfgKey="repWmsOperator"
              :valueField.sync="formData.papoName">
              </PublicQuery>
            </el-form-item>
            <el-form-item
              label="操作时间从"
              prop="paTimeFrom">
              <el-date-picker
                v-model="formData.paTimeFrom"
                format="yyyy-MM-dd HH:mm"
                value-format="yyyy-MM-dd HH:mm:ss"
                type="datetime"
                placeholder="选择日期时间">
              </el-date-picker>
            </el-form-item>
            <el-form-item
              label="操作时间到"
              prop="paTimeTo">
              <el-date-picker
                v-model="formData.paTimeTo"
                format="yyyy-MM-dd HH:mm"
                value-format="yyyy-MM-dd HH:mm:ss"
                type="datetime"
                placeholder="选择日期时间">
              </el-date-picker>
            </el-form-item>
          </el-form>
          <div class="more-query-btn">
            <el-button v-auth="50100020103" type="primary" @click="submitForm">查询</el-button>
            <el-button v-auth="50100020104" @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>
