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.
 
 
 

240 lines
5.2 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" style="background: #F8F8F8;">
  8. <view class="content-tips" v-for="(item,index) in recordList" :key='index' @click="tapThevisiting(item)">
  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" v-if="item.replaceReception==1">代接待</view>
  14. </view>
  15. <view class="right">
  16. <view v-if="item.markAdvisor==0" class="">未标记</view>
  17. <view v-if="item.markAdvisor==1" 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'}}%
  27. <!-- | {{item.fraction || '0'}}分 -->
  28. </view>
  29. </view>
  30. <view class="content-last">
  31. {{item.createTime}} | {{item.mm || '0'}}分钟
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. export default{
  39. data(){
  40. return{
  41. keyword:'',
  42. recordList:[],
  43. buildingID:'',
  44. nextPage:1,
  45. totalRecord:"",
  46. }
  47. },
  48. onShow() {
  49. this.buildingID = uni.getStorageSync('buildingID').id;
  50. this.nextPage=1;
  51. this.recordList=[];
  52. },
  53. onReachBottom() {
  54. if(this.totalRecord==this.nextPage){
  55. uni.showToast({
  56. icon:'none',
  57. title: '到底了',
  58. duration: 2000
  59. });
  60. return
  61. }else{
  62. this.nextPage+=1;
  63. this.getMyCustom();
  64. }
  65. },
  66. methods:{
  67. tapThevisiting(item) {
  68. if(item.status==0){
  69. uni.showToast({
  70. icon: "none",
  71. title: "排队中"
  72. })
  73. return
  74. }else{
  75. const parames = {
  76. pageNum: 1,
  77. pageSize: 100,
  78. query: {
  79. customerId: item.id,
  80. }
  81. }
  82. var item={
  83. bg:0,
  84. customerId:item.id,
  85. }
  86. this.$u.post("/corpus/findByPage", parames).then(res => {
  87. if(res==null){
  88. uni.showToast({
  89. icon: "none",
  90. title: "暂无音频"
  91. })
  92. return
  93. }else{
  94. let newobj = res[0];
  95. if(res[0].merge==0){
  96. uni.navigateTo({
  97. url: `/pages/mine/details2?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(item)}&stateisshow=${"2"}`
  98. })
  99. }else{
  100. uni.navigateTo({
  101. url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(item)}&stateisshow=${"1"}`
  102. })
  103. }
  104. }
  105. })
  106. }
  107. },
  108. searchinfo(){
  109. this.nextPage=1;
  110. this.recordList=[];
  111. this.getMyCustom();
  112. },
  113. getMyCustom(){
  114. var parames = {
  115. pageNum: this.nextPage,
  116. pageSize: 10,
  117. query: {
  118. projectId:this.buildingID,
  119. time:1,
  120. nameOrPhone:this.keyword
  121. }
  122. };
  123. this.$u.post("/customer/findbypage", parames).then(data => {
  124. var list = data.results || [];
  125. this.recordList = [...this.recordList, ...list];
  126. this.totalRecord=data.totalPage;
  127. })
  128. },
  129. }
  130. }
  131. </script>
  132. <style lang="scss" scoped>
  133. .box {
  134. width: 100%;
  135. height: 100vh;
  136. background: #FFFFFF;
  137. }
  138. .content{
  139. .content-tips{
  140. background: #fff;
  141. padding: 0 20rpx;
  142. box-sizing: border-box;
  143. overflow: hidden;
  144. margin-top: 20rpx;
  145. .content-first{
  146. margin-top: 19rpx;
  147. display: flex;
  148. justify-content: space-between;
  149. .left{
  150. display: flex;
  151. .img{
  152. width: 52rpx;
  153. height: 52rpx;
  154. background: #FFFFFF;
  155. border: 1px solid #C9C9C9;
  156. border-radius: 50%;
  157. text-align: center;
  158. line-height: 52rpx;
  159. }
  160. .name{
  161. font-weight: 600;
  162. color: #333333;
  163. // margin-left: 20rpx;
  164. margin-top: 11rpx;
  165. }
  166. .status{
  167. width: 110rpx;
  168. height: 42rpx;
  169. background: #FFF9F5;
  170. border-radius: 4rpx;
  171. font-size: 26rpx;
  172. font-weight: 400;
  173. color: #EC8D49;
  174. line-height: 42rpx;
  175. text-align: center;
  176. margin-left: 19rpx;
  177. margin-top: 11rpx;
  178. }
  179. }
  180. .right{
  181. display: flex;
  182. margin-top: 11rpx;
  183. .point{
  184. width: 12rpx;
  185. height: 12rpx;
  186. background: #2B6EFF;
  187. border-radius: 50%;
  188. margin-right: 9rpx;
  189. margin-top: 16rpx;
  190. }
  191. }
  192. }
  193. .content-sec{
  194. display: flex;
  195. justify-content: space-between;
  196. margin-top: 19rpx;
  197. .left{
  198. display: flex;
  199. .cus{
  200. font-size: 30rpx;
  201. font-weight: 400;
  202. color: #666666;
  203. line-height: 30rpx;
  204. }
  205. .arriveNum{
  206. font-size: 30rpx;
  207. font-weight: 400;
  208. line-height: 30rpx;
  209. margin-left: 10rpx;
  210. }
  211. }
  212. .right{
  213. width: 120rpx;
  214. height: 46rpx;
  215. background: #F4F8FD;
  216. border-radius: 6rpx;
  217. text-align: center;
  218. line-height: 46rpx;
  219. font-weight: 400;
  220. color: #2671E2;
  221. }
  222. }
  223. .content-last{
  224. margin: 30rpx 0;
  225. font-size: 30rpx;
  226. font-weight: 400;
  227. color: #666666;
  228. line-height: 30rpx;
  229. }
  230. }
  231. }
  232. </style>