您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

245 行
5.9 KiB

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