AI销管
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

347 linhas
7.6 KiB

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