search.vue 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <template>
  2. <fieldset>
  3. <legend>
  4. <el-tag type="info">条件筛选</el-tag>
  5. </legend>
  6. <el-form class="lv-form-inline" ref="searchForm" :model="searchKey" label-position="right" label-width="100px">
  7. <div class="search-form">
  8. <div class="form-left">
  9. <el-row :gutter="10">
  10. <el-col :xs="12" :sm="12" :md="12" :lg="6" :xl="6">
  11. <el-input v-model="searchKey.poi_name" placeholder="请选择商家" clearbale readonly :style="{width:'100%'}" @click="selectStore">
  12. <template #append>
  13. <el-tooltip effect="dark" content="点这里,清除选择" placement="top-start">
  14. <div class="remove-a" @click="clearStore">清除</div>
  15. </el-tooltip>
  16. </template>
  17. <template #prepend>所属商家</template>
  18. </el-input>
  19. </el-col>
  20. <el-col :xs="12" :sm="12" :md="12" :lg="6" :xl="4">
  21. <el-input v-model="searchKey.name" placeholder="达人昵称" clearable :style="{ width: '100%' }" @keyup.enter="searchForm()">
  22. <template #prepend>计划名称</template>
  23. </el-input>
  24. </el-col>
  25. <el-col :xs="12" :sm="12" :md="12" :lg="6" :xl="4">
  26. <el-select v-model="searchKey.status" clearable placeholder="请选择状态" @change="searchForm" :style="{width: '100%'}" class="diy-select">
  27. <el-option value="1" label="进行中"></el-option>
  28. <el-option value="2" label="已取消"></el-option>
  29. <template #prefix>状态</template>
  30. </el-select>
  31. </el-col>
  32. <el-col :xs="12" :sm="6" :md="6" :lg="6" :xl="4">
  33. <el-date-picker v-model="searchKey.create" :style="{width: '100%'}" placeholder="请选择创建时间" start-placeholder="开始时间" end-placeholder="结束时间" type="daterange" range-separator="至" @change="searchForm" />
  34. </el-col>
  35. </el-row>
  36. </div>
  37. <div class="form-line"></div>
  38. <div class="form-right">
  39. <el-button type="primary" icon="el-icon-search" @click="searchForm">搜索</el-button>
  40. </div>
  41. </div>
  42. </el-form>
  43. </fieldset>
  44. <storeData ref="storeData" :multiple="false" @success="handleStore"></storeData>
  45. </template>
  46. <script>
  47. import storeData from '@/views/manage/components/agent';
  48. export default {
  49. components: {
  50. storeData
  51. },
  52. data(){
  53. return {
  54. searchKey:{}
  55. }
  56. },
  57. methods: {
  58. selectStore(){
  59. this.$nextTick(()=>{
  60. this.$refs.storeData.open()
  61. })
  62. },
  63. handleStore(data){
  64. this.searchKey.poi_id = data.poi_id;
  65. this.searchKey.poi_name = data.poi_name;
  66. this.$emit("success",this.searchKey);
  67. },
  68. clearStore(){
  69. this.searchKey.poi_id = "";
  70. this.searchKey.poi_name = "";
  71. this.$emit("success",this.searchKey);
  72. },
  73. searchForm(){
  74. this.$emit("success",this.searchKey);
  75. }
  76. }
  77. }
  78. </script>