Blame view

src/views/ywbl/components/search.vue 2.68 KB
任超 committed
1 2 3 4 5 6 7 8 9 10 11
<!--
  功能:高级搜索
  作者:calliope
-->
<template>
  <dialogBox :isButton="false" :isFullscreen="false" width="50%" @closeDialog="closeDialog" v-model="myValue"
    title="高级搜索">
    <el-form :model="ruleForm" ref="ruleForm" label-width="100px">
      <el-row>
        <el-col :span="8">
          <el-form-item label="申请业务名称" prop="sqywmc">
xiaomiao committed
12
            <el-input v-model="ruleForm.sqywmc"  placeholder="请输入申请业务名称"></el-input>
任超 committed
13 14 15 16
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="权利人" prop="qlrmc">
xiaomiao committed
17
            <el-input v-model="ruleForm.qlrmc" placeholder="请输入权利人"></el-input>
任超 committed
18 19 20 21
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="义务人" prop="ywrmc">
xiaomiao committed
22
            <el-input v-model="ruleForm.ywrmc" placeholder="请输入义务人"></el-input>
任超 committed
23 24
          </el-form-item>
        </el-col>
任超 committed
25 26
      </el-row>
      <el-row>
任超 committed
27 28
        <el-col :span="8">
          <el-form-item label="受理时间" prop="slsj">
任超 committed
29 30
            <el-date-picker v-model="ruleForm.slsj" value-format="yyyy-MM-dd" class="width100" type="date"
              placeholder="请选择日期" clearable>
任超 committed
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
            </el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row class="search-btn">
        <el-button type="text" @click.native="closeDialog">收起搜索</el-button>
        <el-button type="primary" icon="el-icon-search" @click="submitForm('ruleForm')">查询</el-button>
        <el-button icon="el-icon-refresh-left" @click="resetForm('ruleForm')">重置</el-button>
      </el-row>
    </el-form>
  </dialogBox>
</template>
<script>

export default {
  props: {
    value: { type: Boolean, default: false },
xiaomiao committed
48
    advancedForm:{type: Object, default: "" }
任超 committed
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
  },
  data () {
    return {
      myValue: this.value,
      ruleForm: {
        sqywmc: '',
        qlrmc: '',
        ywrmc: '',
        slsj: ''
      }
    }
  },
  watch: {
    value (val) {
      this.myValue = val
xiaomiao committed
64 65 66
    },
    advancedForm(){
      this.ruleForm={...this.advancedForm}
任超 committed
67 68
    }
  },
xiaomiao committed
69 70


任超 committed
71 72 73 74 75 76
  methods: {
    closeDialog () {
      this.$emit('input', false)
    },
    resetForm () {
      this.$refs['ruleForm'].resetFields()
xiaomiao committed
77 78 79 80 81 82
      this.ruleForm={
        sqywmc: '',
        qlrmc: '',
        ywrmc: '',
        slsj: ''
      }
任超 committed
83 84
    },
    submitForm () {
任超 committed
85
      this.$emit('getSearch', _.cloneDeep(this.ruleForm))
任超 committed
86
      this.$emit('input', false)
任超 committed
87
      this.$refs['ruleForm'].resetFields()
xiaomiao committed
88

任超 committed
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
    }
  }
}
</script>
<style scoped lang='scss'>
@import '~@/styles/public.scss';

.search-btn {
  padding: 0 20px 20px 20px;
  text-align: right;
}

/deep/.el-icon-date {
  display: none;
}
xiaomiao committed
104
</style>