AI销管
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.
 
 
 
 

279 lines
6.4 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. let newmenulist= uni.getStorageSync('weapp_session_Menu_data');
  87. if(newmenulist.jdjl_ck!=true){
  88. return
  89. }
  90. uni.showLoading({
  91. title: '加载中',
  92. mask:true
  93. });
  94. if(item.status==0){
  95. setTimeout(function () {
  96. uni.hideLoading();
  97. }, 2000);
  98. uni.showToast({
  99. icon: "none",
  100. title: "排队中"
  101. })
  102. return
  103. }else{
  104. const parames = {
  105. pageNum: 1,
  106. pageSize: 100,
  107. query: {
  108. customerId: item.id,
  109. }
  110. }
  111. var item={
  112. bg:0,
  113. customerId:item.id,
  114. }
  115. uni.setStorageSync("entrance", 1); //写入缓存
  116. uni.setStorageSync("searchobj", item); //写入缓存
  117. this.$u.post("/corpus/findByPage", parames).then(res => {
  118. if(res==null){
  119. setTimeout(function () {
  120. uni.hideLoading();
  121. }, 2000);
  122. uni.showToast({
  123. icon: "none",
  124. title: "暂无音频"
  125. })
  126. return
  127. }else{
  128. setTimeout(function () {
  129. uni.hideLoading();
  130. }, 2000);
  131. let newobj = res[0];
  132. if(res[0].merge==0){
  133. uni.navigateTo({
  134. url: `/pages/mine/details2?customerId=${newobj.customerId}&status=${newobj.status}&stateisshow=${"2"}`
  135. })
  136. }else{
  137. uni.navigateTo({
  138. url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&stateisshow=${"1"}`
  139. })
  140. }
  141. }
  142. })
  143. }
  144. },
  145. searchinfo(){
  146. this.nextPage=1;
  147. this.recordList=[];
  148. this.getMyCustom();
  149. },
  150. getMyCustom(){
  151. var parames = {
  152. pageNum: this.nextPage,
  153. pageSize: 10,
  154. query: {
  155. projectId:this.buildingID,
  156. time:1,
  157. nameOrPhone:this.keyword
  158. }
  159. };
  160. this.$u.post("/customer/findbypage", parames).then(data => {
  161. var list = data.results || [];
  162. this.recordList = [...this.recordList, ...list];
  163. this.totalRecord=data.totalPage;
  164. })
  165. },
  166. }
  167. }
  168. </script>
  169. <style lang="scss" scoped>
  170. .box {
  171. width: 100%;
  172. height: 100vh;
  173. background: #FFFFFF;
  174. }
  175. .content{
  176. .content-tips{
  177. background: #fff;
  178. padding: 0 20rpx;
  179. box-sizing: border-box;
  180. overflow: hidden;
  181. margin-top: 20rpx;
  182. .content-first{
  183. margin-top: 19rpx;
  184. display: flex;
  185. justify-content: space-between;
  186. .left{
  187. display: flex;
  188. .img{
  189. width: 52rpx;
  190. height: 52rpx;
  191. background: #FFFFFF;
  192. border: 1px solid #C9C9C9;
  193. border-radius: 50%;
  194. text-align: center;
  195. line-height: 52rpx;
  196. }
  197. .name{
  198. font-weight: 600;
  199. color: #333333;
  200. // margin-left: 20rpx;
  201. margin-top: 11rpx;
  202. }
  203. .status{
  204. width: 110rpx;
  205. height: 42rpx;
  206. background: #FFF9F5;
  207. border-radius: 4rpx;
  208. font-size: 26rpx;
  209. font-weight: 400;
  210. color: #EC8D49;
  211. line-height: 42rpx;
  212. text-align: center;
  213. margin-left: 19rpx;
  214. margin-top: 11rpx;
  215. }
  216. }
  217. .right{
  218. display: flex;
  219. margin-top: 11rpx;
  220. .point{
  221. width: 12rpx;
  222. height: 12rpx;
  223. background: #2B6EFF;
  224. border-radius: 50%;
  225. margin-right: 9rpx;
  226. margin-top: 16rpx;
  227. }
  228. }
  229. }
  230. .content-sec{
  231. display: flex;
  232. justify-content: space-between;
  233. margin-top: 19rpx;
  234. .left{
  235. display: flex;
  236. .cus{
  237. font-size: 30rpx;
  238. font-weight: 400;
  239. color: #666666;
  240. line-height: 30rpx;
  241. }
  242. .arriveNum{
  243. font-size: 30rpx;
  244. font-weight: 400;
  245. line-height: 30rpx;
  246. margin-left: 10rpx;
  247. }
  248. }
  249. .right{
  250. width: 120rpx;
  251. height: 46rpx;
  252. background: #F4F8FD;
  253. border-radius: 6rpx;
  254. text-align: center;
  255. line-height: 46rpx;
  256. font-weight: 400;
  257. color: #2671E2;
  258. }
  259. }
  260. .content-last{
  261. margin: 30rpx 0;
  262. font-size: 30rpx;
  263. font-weight: 400;
  264. color: #666666;
  265. line-height: 30rpx;
  266. }
  267. }
  268. }
  269. </style>