index.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <view>
  3. <u-navbar title="销售线索" :autoBack="true" :placeholder="true" v-hideNav></u-navbar>
  4. <view class="case_top_wrap">
  5. <ld-select :list="options" label-key="label" value-key="value" placeholder="选择搜索类型"
  6. v-model="queryParams.condition" class="conditionSelect" @change="handleConditionChange" :isShowIcon="true"></ld-select>
  7. <u-input shape="circle" clearable prefixIcon="search" v-model="queryParams.conditionContent"
  8. placeholder="整合搜索" @blur="handleKeyword" @clear="handleKeywordClear"></u-input>
  9. </view>
  10. <view class="queryParams_wrap">
  11. <view class="sort" @click="handleShowSort">
  12. <view style="margin-right: 10rpx;">排序</view>
  13. <u-icon name="arrow-down-fill" color="#aaa" size="10" ></u-icon>
  14. </view>
  15. <view class="sort" @click="handleShowTag">
  16. <view style="margin-right: 10rpx;">标签</view>
  17. <u-icon name="arrow-down-fill" color="#aaa" size="10" ></u-icon>
  18. </view>
  19. <view class="query" @click="handleshowFilter">
  20. <view style="margin-right: 10rpx;">筛选</view>
  21. <u-icon name="arrow-down-fill" color="#aaa" size="10" ></u-icon>
  22. </view>
  23. </view>
  24. <view class="clue_state_wrap">
  25. <scroll-view scroll-x="true">
  26. <view class="clue_state_list">
  27. <view @click="handleClueStateClick(item)" v-for="(item, index) in clueStateList " :key="index"
  28. class="clue_state_item" :class="{ active : queryParams.clueState === item.clueState }">
  29. <text>{{item.clueStateName}}</text>
  30. <text>({{item.count}})</text>
  31. </view>
  32. </view>
  33. </scroll-view>
  34. </view>
  35. <view class="case_wrap">
  36. <show-emtry v-if="listData.length === 0"></show-emtry>
  37. <view class="case_main_wrap" v-else>
  38. <post v-for="(item,index) in listData" :key="item.id + index" :item="item" :dicts="dicts"
  39. :type="queryParams.type" @click.native="handleToDetail(item)" @inquirySuccess="inquirySuccess">
  40. </post>
  41. <u-loadmore :status="finished ? 'nomore' : loadStatus" icon line />
  42. </view>
  43. </view>
  44. <sort ref="sort" v-model="queryParams" @getList="resetData" :mapHeight="mapHeight"></sort>
  45. <filter-query ref="filter" v-model="queryParams" @getList="resetData" :mapHeight="mapHeight"
  46. :dicts="dicts"></filter-query>
  47. <group-select class="clueTagsSelect" :list="clueTagGroupVoList" scrollHeight="720rpx" groupName="groupName"
  48. groupChild="clueTagDataList" label-key="name" value-key="id" placeholder="请选择线索标签"
  49. v-model="queryParams.allTagList" multiple clearable ref="clueTag"
  50. @confirm="handleClueTagConfirm"></group-select>
  51. <u-modal :show="trendModal" title="价格趋势" @confirm="handleTrendConfirm" confirmText="关闭弹窗">
  52. <view class="trend_modal">
  53. <u-search placeholder="请输入型号" v-model="model" @blur="searchTrend" @custom="searchTrend"></u-search>
  54. <view class="charts_box" v-if="chartShow">
  55. <u--text type="primary" :text="`最大价格:${Math.max(...maxPrice)}元`"></u--text>
  56. <u--text type="warning" :text="`最小价格:${Math.min(...minPrice)}元`"></u--text>
  57. <qiun-data-charts type="line" :chartData="chartData" canvasId="trendChart" :opts="opts" :ontouch="true" tooltipFormat="tooltipFormatPrice"
  58. width="700rpx" height="500rpx" backgroundColor="#ffffff" @getIndex="handleChartClick" />
  59. </view>
  60. <u--text v-if="tableData.length > 0" :text="'日期:' + date"></u--text>
  61. <Table ref="customTable" v-if="tableData.length > 0" :tableData="tableData" height="100px" :columns="columns" stripe></Table>
  62. </view>
  63. </u-modal>
  64. <view class="suspension_button trend" @click="handleTrend">
  65. 趋势
  66. </view>
  67. <view class="suspension_button" @click="handleAddClue">
  68. 新增
  69. </view>
  70. </view>
  71. </template>
  72. <script>
  73. import clue from "@/pages/clue/mixins/clue.js";
  74. import post from "@/pages/clue/post/index.vue";
  75. import sort from "@/pages/clue/components/sort.vue";
  76. import filterQuery from "@/pages/clue/components/filterQuery.vue";
  77. import Table from '@/components/custom-table/index.vue'
  78. export default {
  79. onPullDownRefresh() {
  80. uni.stopPullDownRefresh();
  81. this.resetData();
  82. },
  83. components: {
  84. post,
  85. sort,
  86. filterQuery,
  87. Table,
  88. },
  89. mixins: [clue],
  90. onLoad(option) {
  91. this.queryParams.type = 2;
  92. },
  93. }
  94. </script>
  95. <style lang="scss" scoped>
  96. @import "@/pages/clue/scss/clue.scss";
  97. </style>