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.
 
 
 

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