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

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