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.

recordSearch.vue 6.0 KiB

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