<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="分配ID"
              prop="allocId">
              <el-input v-model="formData.allocId"></el-input>
            </el-form-item>
            <el-form-item
              label="出库单号"
              prop="orderNo">
              <el-input v-model="formData.orderNo"></el-input>
            </el-form-item>
            <el-form-item
              label="出库单行号"
              prop="lineNo">
              <el-input v-model="formData.lineNo"></el-input>
            </el-form-item>
            <el-form-item
              label="订单波次单号"
              prop="waveNo">
              <el-input v-model="formData.waveNo"></el-input>
            </el-form-item>
            <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="status">
              <el-select v-model="formData.status">
                <el-option value="40" label="完全分配"></el-option>
                <el-option value="60" label="完全拣货"></el-option>
                <el-option value="80" label="完全发运"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item
              label="批次号"
              prop="lotNum">
              <el-input v-model="formData.lotNum"></el-input>
            </el-form-item>
            <el-form-item
              label="库位"
              prop="skuName">
              <PublicQuery
              title="库位"
              baseUrl="/rep_web/repweb"
              cfgKey="repWmsLoc"
              :valueField.sync="formData.locCode">
              </PublicQuery>
            </el-form-item>
            <el-form-item
              label="目标库位"
              prop="skuName">
              <PublicQuery
              title="目标库位"
              baseUrl="/rep_web/repweb"
              cfgKey="repWmsLoc"
              :valueField.sync="formData.toLoc">
              </PublicQuery>
            </el-form-item>
            <el-form-item
              label="跟踪号"
              prop="traceId">
              <el-input v-model="formData.traceId"></el-input>
            </el-form-item>
            <el-form-item
              label="目标跟踪号"
              prop="toId">
              <el-input v-model="formData.toId"></el-input>
            </el-form-item>
          </el-form>
          <div class="more-query-btn">
            <el-button v-auth="50910090103" type="primary" @click="submitForm">查询</el-button>
            <el-button v-auth="50910090104" @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>
