You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

230 lines
5.3 KiB

  1. <template>
  2. <view class="box">
  3. <view style="width: 690rpx;margin: 0 auto;margin-top: 20rpx;">
  4. <u-search @search='searchinfo()' placeholder="请输入" v-model="keyword"></u-search>
  5. </view>
  6. <!-- <view @click="searchinfo()">搜索</view> -->
  7. <view class="content">
  8. <view class="content-tips" v-for="(item,index) in recordList" :key='index' @click="gotoDetail(item.id)">
  9. <view class="content-first">
  10. <view class="left">
  11. <view v-if="item.level.length==0"></view>
  12. <view class="img" v-else-if="item.level==1">A</view>
  13. <view class="img" v-else-if="item.level==2">B</view>
  14. <view class="img" v-else-if="item.level==3">C</view>
  15. <view class="img" v-else-if="item.level==4">D</view>
  16. <view class="test">{{item.name}}</view>
  17. </view>
  18. </view>
  19. <view class="content-sec">
  20. <view class="content-sec-lab">
  21. 手机号码:<view class="content-sec-lab1">{{item.phone || '--'}}</view>
  22. </view>
  23. <view class="content-sec-lab">
  24. 客户标签:
  25. <!-- <view class="content-sec-tips" v-for="(che,ind) in item.demand.cusSemanticWords" :key='ind'>{{che.name}}</view> -->
  26. </view>
  27. <view class="content-sec-lab">
  28. 顾问姓名:<view class="content-sec-lab1">{{item.agentName}}</view>
  29. </view>
  30. <view class="content-sec-lab">
  31. 添加时间:<view class="content-sec-lab1">{{item.createTime}}</view>
  32. </view>
  33. <view class="content-sec-num">
  34. <view class="">{{item.visitRecord || "0"}}次到访</view>
  35. <view class="">{{item.fraction || '0'}}% | {{item.fraction || '0'}}分</view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. </template>
  42. <script>
  43. export default{
  44. data(){
  45. return{
  46. keyword:'',
  47. stageList:['未知','到访','意向','定金','成交'],
  48. recordList:[],
  49. nextPage:1,
  50. totalRecord:'',
  51. buildingID:'',
  52. }
  53. },
  54. onShow() {
  55. this.buildingID = uni.getStorageSync('buildingID').id;
  56. },
  57. onReachBottom() {
  58. if(this.totalRecord==this.nextPage){
  59. uni.showToast({
  60. icon:'none',
  61. title: '到底了',
  62. duration: 2000
  63. });
  64. return
  65. }else{
  66. this.nextPage+=1;
  67. this.getMyCustom();
  68. }
  69. },
  70. methods:{
  71. // 客户详情
  72. gotoDetail(id) {
  73. uni.navigateTo({
  74. url: `/pages/center/consumer/consumerDetail?id=${id}`
  75. })
  76. },
  77. searchinfo(){
  78. this.nextPage=1;
  79. this.recordList=[];
  80. this.getMyCustom();
  81. },
  82. getMyCustom(){
  83. var parames = {
  84. pageNum: this.nextPage,
  85. pageSize: 10,
  86. query: {
  87. projectId:this.buildingID,
  88. nameOrPhone:this.keyword
  89. }
  90. };
  91. this.$u.post("/customer/customerManagement", parames).then(data => {
  92. var list = data.results || [];
  93. this.recordList = [...this.recordList, ...list];
  94. this.totalRecord=data.totalPage;
  95. })
  96. },
  97. }
  98. }
  99. </script>
  100. <style lang="scss" scoped>
  101. .box {
  102. width: 100%;
  103. height: 100%;
  104. background: #F8F8F8;
  105. }
  106. .content{
  107. // height: 1000rpx;/
  108. overflow: hidden;
  109. border-top: 1px solid #E0E0E0;
  110. .content-tips{
  111. background: #fff;
  112. // box-sizing: border-box;
  113. margin-bottom: 20rpx;
  114. overflow: hidden;
  115. .content-first{
  116. padding: 19rpx 30rpx;
  117. display: flex;
  118. justify-content: space-between;
  119. box-sizing: border-box;
  120. // border-top: 1px solid #E0E0E0;
  121. font-weight: 400;
  122. color: #292929;
  123. height: 90rpx;
  124. font-size: 30rpx;
  125. line-height: 30rpx;
  126. .left{
  127. display: flex;
  128. .img{
  129. // margin-top: 19rpx;
  130. width: 52rpx;
  131. height: 52rpx;
  132. border: 1px solid #E0E0E0;
  133. border-radius: 50%;
  134. text-align: center;
  135. line-height: 50rpx;
  136. margin-right: 20rpx;
  137. }
  138. .test{
  139. margin-top: 11rpx;
  140. // margin-left: 20rpx;
  141. font-weight: 500;
  142. color: #333333;
  143. }
  144. }
  145. .right{
  146. display: flex;
  147. .point{
  148. width: 12rpx;
  149. height: 12rpx;
  150. background: #2B6EFF;
  151. border-radius: 50%;
  152. margin-right: 9rpx;
  153. margin-top: 20rpx;
  154. }
  155. .test{
  156. margin-top: 11rpx;
  157. }
  158. }
  159. }
  160. .content-sec{
  161. border-top: 1px solid #E0E0E0;
  162. padding: 0 30rpx;
  163. padding-bottom: 30rpx;
  164. // height: 270rpx;
  165. position: relative;
  166. .content-sec-lab{
  167. margin-top: 30rpx;
  168. display: flex;
  169. font-size: 30rpx;
  170. font-weight: 400;
  171. color: #666666;
  172. line-height: 30rpx;
  173. .content-sec-lab1{
  174. color: #333333;
  175. }
  176. .content-sec-tips{
  177. max-width:174rpx ;
  178. height: 46rpx;
  179. background: #F2F2F2;
  180. border-radius: 6rpx;
  181. text-align: center;
  182. line-height: 26rpx;
  183. overflow: hidden;
  184. text-overflow:ellipsis;
  185. white-space: nowrap;
  186. font-size: 26rpx;
  187. font-weight: 400;
  188. color: #333333;
  189. margin-right: 24rpx;
  190. box-sizing: border-box;
  191. padding: 10rpx 24rpx;
  192. }
  193. }
  194. .content-sec-num{
  195. position: absolute;
  196. width: 190rpx;
  197. height: 90rpx;
  198. background: #F4F8FD;
  199. border-radius: 12rpx;
  200. font-weight: 400;
  201. color: #2671E2;
  202. line-height: 45rpx;
  203. bottom: 30rpx;
  204. right: 30rpx;
  205. text-align: center;
  206. }
  207. }
  208. .content-last{
  209. display: flex;
  210. border-top: 1px solid #E0E0E0;
  211. // padding: 0 30rpx;
  212. height: 78rpx;
  213. .content-last-tab{
  214. width: 33.4%;
  215. text-align: center;
  216. font-size: 30rpx;
  217. font-weight: 400;
  218. color: #333333;
  219. line-height: 78rpx;
  220. border-right: 1px solid #E0E0E0;
  221. }
  222. }
  223. }
  224. }
  225. </style>