<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="ownerName">
              <PublicQuery
              title="货主"
              baseUrl="/rep_web/repweb"
              cfgKey="repWmsCustomer"
              :valueField.sync="formData.ownerCode"
              :textField.sync="formData.ownerName">
              </PublicQuery>
            </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="lot">
              <el-input v-model="formData.lot"></el-input>
            </el-form-item>
            <el-form-item
              label="库存从"
              prop="locFrom">
              <PublicQuery
              title="库存从"
              baseUrl="/rep_web/repweb"
              cfgKey="repWmsLoc"
              :valueField.sync="formData.locFrom"
              :textField.sync="formData.locNameFrom">
              </PublicQuery>
            </el-form-item>
            <el-form-item
              label="库存到"
              prop="locTo">
              <PublicQuery
              title="库存到"
              baseUrl="/rep_web/repweb"
              cfgKey="repWmsLoc"
              :valueField.sync="formData.locTo"
              :textField.sync="formData.locNameTo">
              </PublicQuery>
            </el-form-item>
            <el-form-item
              label="跟踪号"
              prop="fmid">
              <el-input v-model="formData.fmid"></el-input>
            </el-form-item>
            <el-form-item
              label="历史时间">
              <el-date-picker
                v-model="formData.tranTime"
                type="datetime"
                format="yyyy-MM-dd HH:mm"
                value-format="yyyy-MM-dd HH:mm:ss"
                placeholder="选择日期时间">
              </el-date-picker>
            </el-form-item>
          </el-form>
          <div class="more-query-btn">
            <el-button v-auth="50910040103" type="primary" @click="submitForm">查询</el-button>
            <el-button v-auth="50910040104" @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>
