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.
 
 
 

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