Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

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