Blame view

src/views/ywbl/components/search.vue 3.06 KB
任超 committed
1
<!--
yuanbo committed
2
 * @Description:
3 4
 * @Autor: renchao
 * @LastEditTime: 2023-07-19 14:08:17
任超 committed
5 6 7 8 9 10 11 12
-->
<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">
13
            <el-input v-model="ruleForm.sqywmc" placeholder="请输入申请业务名称"></el-input>
任超 committed
14 15 16 17
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="权利人" prop="qlrmc">
xiaomiao committed
18
            <el-input v-model="ruleForm.qlrmc" placeholder="请输入权利人"></el-input>
任超 committed
19 20 21 22
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="义务人" prop="ywrmc">
xiaomiao committed
23
            <el-input v-model="ruleForm.ywrmc" placeholder="请输入义务人"></el-input>
任超 committed
24 25
          </el-form-item>
        </el-col>
任超 committed
26 27
      </el-row>
      <el-row>
任超 committed
28 29
        <el-col :span="8">
          <el-form-item label="受理时间" prop="slsj">
任超 committed
30 31
            <el-date-picker v-model="ruleForm.slsj" value-format="yyyy-MM-dd" class="width100" type="date"
              placeholder="请选择日期" clearable>
任超 committed
32 33 34 35 36 37 38 39 40 41 42 43 44 45
            </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>

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

71 72

    methods: {
yuanbo committed
73 74 75 76
      /**
       * @description: closeDialog
       * @author: renchao
       */
77 78 79
      closeDialog () {
        this.$emit('input', false)
      },
yuanbo committed
80 81 82 83
      /**
       * @description: resetForm
       * @author: renchao
       */
84 85 86 87 88 89 90 91 92
      resetForm () {
        this.$refs['ruleForm'].resetFields()
        this.ruleForm = {
          sqywmc: '',
          qlrmc: '',
          ywrmc: '',
          slsj: ''
        }
      },
yuanbo committed
93 94 95 96
      /**
       * @description: submitForm
       * @author: renchao
       */
97 98 99 100 101 102
      submitForm () {
        this.$emit('getSearch', _.cloneDeep(this.ruleForm))
        this.$emit('input', false)
        this.$refs['ruleForm'].resetFields()

      }
任超 committed
103 104 105 106
    }
  }
</script>
<style scoped lang='scss'>
107
  @import "~@/styles/public.scss";
任超 committed
108

109 110 111 112
  .search-btn {
    padding: 0 20px 20px 20px;
    text-align: right;
  }
任超 committed
113

114 115 116
  /deep/.el-icon-date {
    display: none;
  }
xiaomiao committed
117
</style>