search.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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.title" 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. <el-option value="3" label="已下架"></el-option>
  30. <el-option value="4" label="已删除"></el-option>
  31. <template #prefix>状态</template>
  32. </el-select>
  33. </el-col>
  34. <el-col :xs="12" :sm="6" :md="6" :lg="6" :xl="4">
  35. <el-date-picker v-model="searchKey.create" :style="{width: '100%'}" placeholder="请选择创建时间" start-placeholder="开始时间" end-placeholder="结束时间" type="daterange" range-separator="至" @change="searchForm" />
  36. </el-col>
  37. </el-row>
  38. </div>
  39. <div class="form-line"></div>
  40. <div class="form-right">
  41. <el-button type="primary" icon="el-icon-search" @click="searchForm">搜索</el-button>
  42. </div>
  43. </div>
  44. </el-form>
  45. </fieldset>
  46. <storeData ref="storeData" :multiple="false" @success="handleStore"></storeData>
  47. </template>
  48. <script>
  49. import storeData from '@/views/manage/components/agent';
  50. export default {
  51. components: {
  52. storeData
  53. },
  54. data(){
  55. return {
  56. searchKey:{}
  57. }
  58. },
  59. methods: {
  60. selectStore(){
  61. this.$nextTick(()=>{
  62. this.$refs.storeData.open()
  63. })
  64. },
  65. handleStore(data){
  66. this.searchKey.poi_id = data.poi_id;
  67. this.searchKey.poi_name = data.poi_name;
  68. this.$emit("success",this.searchKey);
  69. },
  70. clearStore(){
  71. this.searchKey.poi_id = "";
  72. this.searchKey.poi_name = "";
  73. this.$emit("success",this.searchKey);
  74. },
  75. searchForm(){
  76. this.$emit("success",this.searchKey);
  77. }
  78. }
  79. }
  80. </script>