WithdrawalSearch.vue 2.86 KB
<template>
  <div style='margin: 16px'>
    <el-form
      size='small'
      inline
      ref='withdrawalForm'
      :model='withdrawalSearchForm'
      label-width='100px'
      class='demo-form-inline'
    >
      <el-form-item label='员工名称'>
        <el-input
          clearable
          v-model='withdrawalSearchForm.staffName'
          placeholder='请输入员工名称'
        ></el-input>
      </el-form-item>
      <el-form-item label='员工手机号'>
        <el-input
          clearable
          v-model='withdrawalSearchForm.staffPhone'
          placeholder='请输入员工手机号'
        ></el-input>
      </el-form-item>
      <el-form-item label='状态'>
        <el-select v-model='withdrawalSearchForm.status' placeholder='请选择状态'>
          <el-option label='全部' value=''></el-option>
          <el-option label='待审核' value='1'></el-option>
          <el-option label='到账中' value='2'></el-option>
          <el-option label='已到账' value='3'></el-option>
          <el-option label='到账失败' value='4'></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label='提现时间'>
        <el-date-picker
          value-format='yyyy-MM-dd'
          v-model='withdrawalSearchForm.withdrawalTime'
          type='daterange'
          range-separator='至'
          start-placeholder='开始日期'
          end-placeholder='结束日期'>
        </el-date-picker>
      </el-form-item>
      <el-form-item label='审核时间'>
        <el-date-picker
          value-format='yyyy-MM-dd'
          v-model='withdrawalSearchForm.reviewTime'
          type='daterange'
          range-separator='至'
          start-placeholder='开始日期'
          end-placeholder='结束日期'>
        </el-date-picker>
      </el-form-item>
      <el-form-item>
        <el-button type='primary'
                   @click='handleSearch'
        >查询
        </el-button
        >
        <el-button @click='reset'>重置</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import { nearlyAMonth } from '@/mixin/nearlyAMonth'

export default {
  name: 'WithdrawalSearch',
  mixins: [nearlyAMonth],
  data() {
    return {
      withdrawalSearchForm: {
        status:''
      }
    }
  },
  created() {
    this.$set(this.withdrawalSearchForm, 'withdrawalTime', [this.defalutStartTime, this.defalutEndTime])
  },
  mounted() {
      this.handleSearch()
  },
  methods: {
    handleSearch() {
      this.$emit('sendSearchForm', this.withdrawalSearchForm)
    },
    reset() {
      Object.keys(this.withdrawalSearchForm).forEach((key) => {
        this.withdrawalSearchForm[key] = ''
      })
      this.$set(this.withdrawalSearchForm, 'withdrawalTime', [this.defalutStartTime, this.defalutEndTime])
      this.$nextTick(() => {
        this.handleSearch()
      })
    }
  }
}
</script>

<style scoped>

</style>