Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

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