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 5.7 KiB

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