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.
 
 
 

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