AI销管
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

před 1 rokem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. <template>
  2. <view class="box">
  3. <view class="search-box">
  4. <u-search class="search-boxs" placeholder="请输入" v-model="keyword" action-text="搜索" :show-action="true"
  5. @search="searchinfo" @custom="searchinfo"></u-search>
  6. </view>
  7. <!-- 搜索结果 -->
  8. <view class="search-result" v-if="recordList.length > 0">
  9. 筛选结果:<text class="result-num">{{ totalRecord }}</text>条
  10. </view>
  11. <view class="content">
  12. <view class="content-tips" v-for="(item,index) in recordList" :key='index' @click="gotoDetail(item.id)">
  13. <view class="content-first">
  14. <view class="left">
  15. <view v-if="item.level.length==0"></view>
  16. <view class="img" v-else-if="item.level==1">A</view>
  17. <view class="img" v-else-if="item.level==2">B</view>
  18. <view class="img" v-else-if="item.level==3">C</view>
  19. <view class="img" v-else-if="item.level==4">D</view>
  20. <view class="test">{{item.name}}</view>
  21. </view>
  22. </view>
  23. <view class="content-sec">
  24. <view class="content-sec-lab">
  25. 手机号码:<view class="content-sec-lab1">{{item.phone || '--'}}</view>
  26. </view>
  27. <view class="content-sec-lab">
  28. 客户标签:
  29. <text v-if="item.demand.cusSemanticWordsList.length==0">暂无</text>
  30. <view v-else style="display: flex;align-items: center;">
  31. <view v-if="ind<3" class="content-sec-tips"
  32. v-for="(che,ind) in item.demand.cusSemanticWordsList" :key='ind'>{{che.name}}</view>
  33. </view>
  34. </view>
  35. <view class="content-sec-lab">
  36. 顾问姓名:<view class="content-sec-lab1">{{item.agentName}}</view>
  37. </view>
  38. <view class="content-sec-lab">
  39. 添加时间:<view class="content-sec-lab1">{{item.createTime}}</view>
  40. </view>
  41. <view class="content-sec-num">
  42. <view class="">{{item.visitRecord || '--'}}次到访</view>
  43. <view class="">{{item.fraction || '0'}}% | {{item.mm || '0'}}<text
  44. style="font-size: 24rpx;">min</text></view>
  45. </view>
  46. </view>
  47. <view style="width: 100%;height: 20rpx;background: #F8F8F8;"></view>
  48. </view>
  49. <view v-if="recordList.length == 0" style="background:#fff;height: 100vh">
  50. <view style="width: 100%; height: 100%; display: flex; align-items: center">
  51. <view style="width: 100%; height: 100%; padding-top: 200rpx">
  52. <view style="width: 100%; text-align: center">
  53. <image style="width: 220rpx; height: 200rpx"
  54. src="https://static.quhouse.com/zhikong_xcx_img/nodatalist.png" mode=""></image>
  55. </view>
  56. <view style="
  57. text-align: center;
  58. width: 100%;
  59. margin-top: 20rpx;
  60. color: #999999;
  61. ">暂无数据</view>
  62. </view>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. </template>
  68. <script>
  69. export default {
  70. data() {
  71. return {
  72. keyword: "",
  73. recordList: [],
  74. nextPage: 1,
  75. totalRecord: "",
  76. buildingID: "",
  77. permissions: {
  78. commonly1: false,
  79. },
  80. };
  81. },
  82. onShow() {
  83. let newmenulist = uni.getStorageSync("weapp_session_Menu_data");
  84. this.permissions.commonly1 = newmenulist.khgl_ck;
  85. this.buildingID = uni.getStorageSync("buildingID").id;
  86. this.nextPage = 1;
  87. this.recordList = [];
  88. },
  89. onReachBottom() {
  90. if (this.totalRecord == this.nextPage) {
  91. uni.showToast({
  92. icon: "none",
  93. title: "到底了",
  94. duration: 2000,
  95. });
  96. return;
  97. } else {
  98. this.nextPage += 1;
  99. this.getMyCustom();
  100. }
  101. },
  102. methods: {
  103. // 客户详情
  104. gotoDetail(id) {
  105. if (this.permissions.commonly1 == true) {
  106. uni.navigateTo({
  107. url: `/pages/center/consumer/consumerDetail?id=${id}`,
  108. });
  109. }
  110. },
  111. searchinfo() {
  112. this.nextPage = 1;
  113. this.recordList = [];
  114. this.getMyCustom();
  115. },
  116. getMyCustom() {
  117. var parames = {
  118. pageNum: this.nextPage,
  119. pageSize: 10,
  120. query: {
  121. projectId: this.buildingID,
  122. nameOrPhone: this.keyword,
  123. },
  124. };
  125. this.$u.post("/customer/customerManagement", parames).then((data) => {
  126. var list = data.records || [];
  127. list.forEach((item) => {
  128. if (item.demand.cusSemanticWordsList != null) {
  129. item.demand.cusSemanticWordsList.forEach((che) => {
  130. if (che.isInterval == 0) {
  131. che.name = che.name + che.unit + "-" + che.endName + che.unit;
  132. }
  133. });
  134. }
  135. });
  136. this.recordList = [...this.recordList, ...list];
  137. this.totalRecord = data.total;
  138. });
  139. },
  140. },
  141. filters: {
  142. // 筛选等级展示文字
  143. levelText(level) {
  144. let str = "";
  145. switch (Number(level)) {
  146. case 1:
  147. str = "A";
  148. break;
  149. case 2:
  150. str = "A";
  151. break;
  152. case 3:
  153. str = "A";
  154. break;
  155. case 4:
  156. str = "A";
  157. break;
  158. default:
  159. str = "";
  160. break;
  161. }
  162. return str;
  163. },
  164. // 加密手机
  165. phoneText(mobile) {
  166. if (!mobile) return "--";
  167. return mobile.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2");
  168. },
  169. // 格式化时间
  170. formatTime(time) {
  171. if (!time) return;
  172. return time.substring(5, time.length);
  173. },
  174. },
  175. };
  176. </script>
  177. <style lang="scss" scoped>
  178. .box {
  179. width: 100%;
  180. min-height: calc(100vh - var(--window-top));
  181. background: #f8f8f8;
  182. .search-box {
  183. width: 100%;
  184. height: 102rpx;
  185. background: #fff;
  186. display: flex;
  187. align-items: center;
  188. justify-content: center;
  189. .search-boxs {
  190. width: 686rpx;
  191. }
  192. }
  193. .search-result {
  194. width: 100%;
  195. height: 78rpx;
  196. display: flex;
  197. align-items: center;
  198. justify-content: center;
  199. background: #f4f8fd;
  200. .result-num {
  201. font-size: 30rpx;
  202. color: #2671e2;
  203. }
  204. }
  205. }
  206. .content {
  207. padding: 0 0 20rpx 0;
  208. .content-tips {
  209. background: #fff;
  210. // box-sizing: border-box;
  211. // margin-bottom: 20rpx;
  212. overflow: hidden;
  213. .content-first {
  214. padding: 19rpx 30rpx;
  215. display: flex;
  216. justify-content: space-between;
  217. box-sizing: border-box;
  218. // border-top: 1px solid #E0E0E0;
  219. font-weight: 400;
  220. color: #292929;
  221. height: 90rpx;
  222. font-size: 30rpx;
  223. line-height: 30rpx;
  224. .left {
  225. display: flex;
  226. .img {
  227. // margin-top: 19rpx;
  228. width: 52rpx;
  229. height: 52rpx;
  230. border: 1px solid #E0E0E0;
  231. border-radius: 50%;
  232. text-align: center;
  233. line-height: 50rpx;
  234. margin-right: 20rpx;
  235. }
  236. .test {
  237. margin-top: 11rpx;
  238. // margin-left: 20rpx;
  239. font-weight: 500;
  240. color: #333333;
  241. }
  242. }
  243. .right {
  244. display: flex;
  245. .point {
  246. width: 12rpx;
  247. height: 12rpx;
  248. background: #2B6EFF;
  249. border-radius: 50%;
  250. margin-right: 9rpx;
  251. margin-top: 20rpx;
  252. }
  253. .test {
  254. margin-top: 11rpx;
  255. }
  256. }
  257. }
  258. .content-sec {
  259. border-top: 1px solid #E0E0E0;
  260. padding: 0 30rpx;
  261. padding-bottom: 30rpx;
  262. // height: 270rpx;
  263. position: relative;
  264. .content-sec-lab {
  265. margin-top: 30rpx;
  266. display: flex;
  267. font-size: 30rpx;
  268. font-weight: 400;
  269. color: #666666;
  270. line-height: 46rpx;
  271. .content-sec-lab1 {
  272. color: #333333;
  273. }
  274. .content-sec-tips {
  275. max-width: 160rpx;
  276. height: 46rpx;
  277. background: #F2F2F2;
  278. border-radius: 6rpx;
  279. text-align: center;
  280. line-height: 26rpx;
  281. overflow: hidden;
  282. text-overflow: ellipsis;
  283. white-space: nowrap;
  284. font-size: 26rpx;
  285. font-weight: 400;
  286. color: #333333;
  287. margin-right: 20rpx;
  288. box-sizing: border-box;
  289. padding: 10rpx 24rpx;
  290. }
  291. }
  292. .content-sec-num {
  293. position: absolute;
  294. width: 190rpx;
  295. height: 90rpx;
  296. background: #F4F8FD;
  297. border-radius: 12rpx;
  298. font-weight: 400;
  299. color: #2671E2;
  300. line-height: 45rpx;
  301. bottom: 30rpx;
  302. right: 30rpx;
  303. text-align: center;
  304. }
  305. }
  306. .content-last {
  307. display: flex;
  308. border-top: 1px solid #E0E0E0;
  309. // padding: 0 30rpx;
  310. height: 78rpx;
  311. .content-last-tab {
  312. width: 33.4%;
  313. text-align: center;
  314. font-size: 30rpx;
  315. font-weight: 400;
  316. color: #333333;
  317. line-height: 78rpx;
  318. border-right: 1px solid #E0E0E0;
  319. }
  320. }
  321. }
  322. }
  323. </style>