search.vue 4.2 KB

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