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