選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

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