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.
 
 
 

196 lines
4.0 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'>
  9. <view class="content-first">
  10. <view class="left">
  11. <view class="img">{{item.agentName.slice(0,1)}}</view>
  12. <view class="name">{{item.agentName}}</view>
  13. <view class="status">代接待</view>
  14. </view>
  15. <!-- <view class="right">
  16. <view class="point"></view>
  17. <view class="">优秀案例</view>
  18. </view> -->
  19. </view>
  20. <view class="content-sec">
  21. <view class="left">
  22. <view class="cus">客户:{{item.name || '--'}} |</view>
  23. <view class="arriveNum">{{item.visitRecord || "0"}}次到访</view>
  24. </view>
  25. <view class="right">
  26. {{item.fraction || '0'}}% | {{item.fraction || '0'}}分
  27. </view>
  28. </view>
  29. <view class="content-last">
  30. {{item.createTime}} | {{item.mm || '0'}}分钟
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. export default{
  38. data(){
  39. return{
  40. keyword:'',
  41. recordList:[],
  42. buildingID:'',
  43. nextPage:1,
  44. totalRecord:"",
  45. }
  46. },
  47. onShow() {
  48. this.buildingID = uni.getStorageSync('buildingID').id;
  49. },
  50. onReachBottom() {
  51. if(this.totalRecord==this.nextPage){
  52. uni.showToast({
  53. icon:'none',
  54. title: '到底了',
  55. duration: 2000
  56. });
  57. return
  58. }else{
  59. this.nextPage+=1;
  60. this.getMyCustom();
  61. }
  62. },
  63. methods:{
  64. searchinfo(){
  65. this.nextPage=1;
  66. this.recordList=[];
  67. this.getMyCustom();
  68. },
  69. getMyCustom(){
  70. var parames = {
  71. pageNum: this.nextPage,
  72. pageSize: 10,
  73. query: {
  74. projectId:this.buildingID,
  75. time:1,
  76. nameOrPhone:this.keyword
  77. }
  78. };
  79. this.$u.post("/customer/findbypage", parames).then(data => {
  80. var list = data.results || [];
  81. this.recordList = [...this.recordList, ...list];
  82. this.totalRecord=data.totalPage;
  83. })
  84. },
  85. }
  86. }
  87. </script>
  88. <style lang="scss" scoped>
  89. .box {
  90. width: 100%;
  91. height: 100vh;
  92. background: #F8F8F8;
  93. }
  94. .content{
  95. .content-tips{
  96. background: #fff;
  97. padding: 0 20rpx;
  98. box-sizing: border-box;
  99. overflow: hidden;
  100. margin-top: 20rpx;
  101. .content-first{
  102. margin-top: 19rpx;
  103. display: flex;
  104. justify-content: space-between;
  105. .left{
  106. display: flex;
  107. .img{
  108. width: 52rpx;
  109. height: 52rpx;
  110. background: #FFFFFF;
  111. border: 1px solid #C9C9C9;
  112. border-radius: 50%;
  113. text-align: center;
  114. line-height: 52rpx;
  115. }
  116. .name{
  117. font-weight: 600;
  118. color: #333333;
  119. margin-left: 20rpx;
  120. margin-top: 11rpx;
  121. }
  122. .status{
  123. width: 110rpx;
  124. height: 42rpx;
  125. background: #FFF9F5;
  126. border-radius: 4rpx;
  127. font-size: 26rpx;
  128. font-weight: 400;
  129. color: #EC8D49;
  130. line-height: 42rpx;
  131. text-align: center;
  132. margin-left: 19rpx;
  133. margin-top: 11rpx;
  134. }
  135. }
  136. .right{
  137. display: flex;
  138. margin-top: 11rpx;
  139. .point{
  140. width: 12rpx;
  141. height: 12rpx;
  142. background: #2B6EFF;
  143. border-radius: 50%;
  144. margin-right: 9rpx;
  145. margin-top: 16rpx;
  146. }
  147. }
  148. }
  149. .content-sec{
  150. display: flex;
  151. justify-content: space-between;
  152. margin-top: 19rpx;
  153. .left{
  154. display: flex;
  155. .cus{
  156. font-size: 30rpx;
  157. font-weight: 400;
  158. color: #666666;
  159. line-height: 30rpx;
  160. }
  161. .arriveNum{
  162. font-size: 30rpx;
  163. font-weight: 400;
  164. line-height: 30rpx;
  165. margin-left: 10rpx;
  166. }
  167. }
  168. .right{
  169. width: 192rpx;
  170. height: 46rpx;
  171. background: #F4F8FD;
  172. border-radius: 6rpx;
  173. text-align: center;
  174. line-height: 46rpx;
  175. font-weight: 400;
  176. color: #2671E2;
  177. }
  178. }
  179. .content-last{
  180. margin: 30rpx 0;
  181. font-size: 30rpx;
  182. font-weight: 400;
  183. color: #666666;
  184. line-height: 30rpx;
  185. }
  186. }
  187. }
  188. </style>