AI销管
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

index.vue 29 KiB

2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227
  1. <template>
  2. <view class="box">
  3. <view style="flex-shrink: 0;">
  4. <view class="search-box">
  5. <view class="search" @click="goSearch">
  6. <view class="search-img">
  7. <image class="search-img1" src="../../../static/images/search.png" mode=""></image>
  8. </view>
  9. <view class="search-text">输入客户姓名/手机号</view>
  10. </view>
  11. <!-- <image @click="filterFun" class="filter" src="../../../static/images/filter.png" mode="" /> -->
  12. </view>
  13. </view>
  14. <!-- 选择器 -->
  15. <view class="boxtittab">
  16. <view class="tabbox" :class="{activeColor: sortFilter!=='排序'}" @click="tapsoltishow">
  17. {{ sortFilter }}
  18. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
  19. </view>
  20. <view class="tabbox" :class="{activeColor: arriveFilter!=='到访时间'}" @click="taptimeisshow">
  21. {{ arriveFilter }}
  22. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
  23. </view>
  24. <view class="tabbox" :class="{activeColor: receptionDuration!=='接待时长'}" @click="taptimetuisshow">
  25. {{ receptionDuration }}
  26. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
  27. </view>
  28. <view class="tabbox" @click="screenshow">
  29. 更多筛选<u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
  30. </view>
  31. </view>
  32. <!-- 筛选后的数量 -->
  33. <view class="count" v-if="recordList.length > 0">
  34. 筛选结果:<text>{{totalRecords}} </text>条
  35. </view>
  36. <view class="content">
  37. <view v-if="recordList.length==0" style="width: 100%;height: 100%;display: flex;align-items: center;">
  38. <view style="width: 100%;height: 100%;padding-top: 200rpx;">
  39. <view style="width: 100%;text-align: center;">
  40. <image style="width: 220rpx;height: 200rpx;"
  41. src="https://static.quhouse.com/zhikong_xcx_img/nodatalist.png" mode=""></image>
  42. </view>
  43. <view style="text-align: center;width: 100%;margin-top: 20rpx;color: #999999;">暂无数据</view>
  44. </view>
  45. </view>
  46. <view v-if="recordList.length" class="content-tips" v-for="(item,index) in recordList" :key='index'
  47. @click="gotoDetail(item.id)">
  48. <view class="content-first">
  49. <view class="left">
  50. <view class="test">{{item.name}}</view>
  51. <template v-if="item.level > 0">
  52. <view class="img" :class="colorName[item.level]">{{ item.level | levelText }}</view>
  53. </template>
  54. <view v-if="item.clientStageName" class="clientStageName">{{ item.clientStageName }}</view>
  55. </view>
  56. <view class="right">
  57. <image class="right-img" src="../../../static/images/arrow-right.png" mode=""></image>
  58. </view>
  59. </view>
  60. <view class="content-sec">
  61. <view class="content-sec-lab">
  62. 客户手机:<view class="content-sec-lab1">{{item.phone | phoneText}}</view>
  63. </view>
  64. <view class="content-sec-lab">
  65. 负责顾问:<view class="content-sec-lab1">{{item.agentName || ''}}</view>
  66. </view>
  67. <view class="content-sec-lab" style="line-height: 46rpx;">
  68. 客户意向:
  69. <text v-if="item.demand.cusSemanticWordsList==null">暂无</text>
  70. <template v-else>
  71. <block v-for="(che,ind) in item.demand.cusSemanticWordsList" :key='ind'>
  72. <view class="content-sec-tips" v-if="ind<=3">{{che.name}}</view>
  73. </block>
  74. </template>
  75. </view>
  76. <view class="content-sec-lab">
  77. 添加时间:<view class="content-sec-lab1">{{item.createTime | formatTime}}</view>
  78. </view>
  79. <view class="content-sec-num">
  80. <view>到访{{item.visitRecord || '--'}}次</view>
  81. <view>
  82. {{item.mm || '0'}}min/{{item.fraction || '0'}}%
  83. </view>
  84. </view>
  85. </view>
  86. <template v-if="permissions.commonly2">
  87. <view class="content-last">
  88. <!-- <view class="content-last-tab">
  89. <image src="/static/images/genjin-icon.png" mode="" />添加提醒</view>
  90. <view class="content-last-tab">
  91. <image src="/static/images/genjin-icon.png" mode="" />
  92. 打电话</view> -->
  93. <view class="content-last-tab" @click.stop="gotoFollowUp(item)">
  94. <image src="/static/images/genjin-icon.png" mode="" />
  95. 写跟进</view>
  96. </view>
  97. </template>
  98. </view>
  99. </view>
  100. <u-popup v-model="screenShow" mode="top">
  101. <view class="screen">
  102. <!-- 顾问选择 -->
  103. <view class="screen-counselor">
  104. <view class="screen-text">
  105. 所属顾问
  106. </view>
  107. <view class="screen-sel" @tap="selectshow = true">
  108. <input v-model="screen.agentIdtext" type="text" placeholder="请选择" class="screen-inp" disabled />
  109. <image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image>
  110. </view>
  111. </view>
  112. <view class="screen-counselor">
  113. <view class="screen-text">
  114. 客户标签
  115. </view>
  116. <view class="screen-sel" @tap="selectTipshow = true">
  117. <input v-model="screen.cunsumerTips" type="text" placeholder="请选择" class="screen-inp"
  118. disabled />
  119. <image class="screen-sel-img" src="../../../static/images/right.png" mode=""></image>
  120. </view>
  121. </view>
  122. <!-- 录音标示 -->
  123. <view class="screen-record">
  124. <view class="screen-record-text">
  125. 客户等级
  126. </view>
  127. <view class="screen-record-tab">
  128. <block v-for="(item,index) in levelList" :key="index">
  129. <view :class="[item.isShow?'screen-record-chose':'screen-record-nochose']"
  130. @click="choiceLevel(index,item.value)">
  131. {{item.label}}
  132. </view>
  133. </block>
  134. </view>
  135. </view>
  136. <!-- 客户来源 -->
  137. <template v-if="list.length > 0">
  138. <view class="screen-record">
  139. <view class="screen-record-text">
  140. 客户来源
  141. </view>
  142. <view class="screen-record-tab">
  143. <block v-for="(item, index) in list" :key="index">
  144. <view @tap="sourceId = item.id; sourceIndex = index "
  145. :class="[sourceIndex == index ? 'screen-record-chose':'screen-record-nochose']">
  146. {{ item.sourceName }}
  147. </view>
  148. </block>
  149. </view>
  150. </view>
  151. </template>
  152. <view class="screen-record">
  153. <view class="screen-record-text">
  154. 到访次数
  155. </view>
  156. <view class="screen-record-tab">
  157. <block v-for="(item,index) in visitList" :key="index">
  158. <view :class="[item.isShow?'screen-record-chose':'screen-record-nochose']"
  159. @click="choice(index, item.value)">
  160. {{item.label}}
  161. </view>
  162. </block>
  163. <!-- <view :class="[screen.visitRecord==1?'screen-record-chose':'screen-record-nochose']"
  164. @click="screenvisitRecord(1)">
  165. 首次到访
  166. </view>
  167. <view :class="[screen.visitRecord==2?'screen-record-chose':'screen-record-nochose']"
  168. @click="screenvisitRecord(2)">
  169. 2次到访
  170. </view>
  171. <view :class="[screen.visitRecord==3?'screen-record-chose':'screen-record-nochose']"
  172. @click="screenvisitRecord(3)">
  173. 3次到访
  174. </view>
  175. <view :class="[screen.visitRecord==4?'screen-record-chose':'screen-record-nochose']"
  176. @click="screenvisitRecord(4)">
  177. 3次以上
  178. </view> -->
  179. </view>
  180. </view>
  181. <view class="screen-foot">
  182. <view class="screen-foot-reset" @click="reset">
  183. 重置
  184. </view>
  185. <view class="screen-foot-sure" @click="screensure">
  186. 确定
  187. </view>
  188. </view>
  189. </view>
  190. </u-popup>
  191. <!-- 选择顾问的选择框 -->
  192. <u-select v-model="selectshow" :list="freeList" @confirm="actionSelectCallback"></u-select>
  193. <!-- 客户标签 -->
  194. <u-select v-model="selectTipshow" :list="findKeywordsList" @confirm="selectCallback"></u-select>
  195. <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
  196. <u-popup v-model="timeshow" mode="bottom">
  197. <view class="timeview" :style="{ color: activeTotal == 5 ? '#2B6EFF' : '#333333' }"
  198. @click="tabtimetap(5, '到访时间')">
  199. 全部</view>
  200. <view class="timeview" :style="{ color: activeTotal == 0 ? '#2B6EFF' : '#333333' }"
  201. @click="tabtimetap(0, '今天')">
  202. 今天</view>
  203. <view class="timeview" :style="{ color: activeTotal == 1 ? '#2B6EFF' : '#333333' }"
  204. @click="tabtimetap(1, '昨天')">
  205. 昨天</view>
  206. <view class="timeview" :style="{ color: activeTotal == 2 ? '#2B6EFF' : '#333333' }"
  207. @click="tabtimetap(2, '近7天')">
  208. 近7天</view>
  209. <view class="timeview" :style="{ color: activeTotal == 3 ? '#2B6EFF' : '#333333' }"
  210. @click="tabtimetap(3, '近30天')">
  211. 近30天</view>
  212. <view class="timeview" :style="{ color: activeTotal == 4 ? '#2B6EFF' : '#333333' }" @click="tabtimetap(4)">
  213. 自定义</view>
  214. </u-popup>
  215. <u-popup v-model="timetushow" mode="bottom">
  216. <view class="timeview" :style="{ color: activeTotal2 == 0 ? '#2B6EFF' : '#333333' }"
  217. @click="timetap(0, '接待时长')">全部
  218. </view>
  219. <view class="timeview" :style="{ color: activeTotal2 == 1 ? '#2B6EFF' : '#333333' }"
  220. @click="timetap(1, '0~15min')">
  221. 0~15min</view>
  222. <view class="timeview" :style="{ color: activeTotal2 == 2 ? '#2B6EFF' : '#333333' }"
  223. @click="timetap(2, '15~30min')">
  224. 15~30min</view>
  225. <view class="timeview" :style="{ color: activeTotal2 == 3 ? '#2B6EFF' : '#333333' }"
  226. @click="timetap(3, '30~60min')">
  227. 30~60min</view>
  228. <view class="timeview" :style="{ color: activeTotal2 == 4 ? '#2B6EFF' : '#333333' }"
  229. @click="timetap(4, '60~90min')">
  230. 60~90min</view>
  231. <view class="timeview" :style="{ color: activeTotal2 == 5 ? '#2B6EFF' : '#333333' }"
  232. @click="timetap(5, '90min以上')">
  233. 90min以上</view>
  234. </u-popup>
  235. <u-popup v-model="soltishow" mode="bottom">
  236. <view class="soltishow" @tap.stop @touchmove.stop>
  237. <block v-for="(item, index) in orderBylist" :key="index">
  238. <view class="soltishow-item"
  239. :style="orderBy==item.value?'color: #2B6EFF':''" @click="selectCallback2(item)">
  240. {{ item.label }}
  241. </view>
  242. </block>
  243. </view>
  244. </u-popup>
  245. <!-- <u-select v-model="soltishow" :list="orderBylist" @confirm="selectCallback2"></u-select> -->
  246. <!-- 底部导航栏 -->
  247. <!-- <u-tabbar :mid-button="true" activeColor="#1296db" inactiveColor="#999999" v-model="current" :list="tabbarList">
  248. </u-tabbar> -->
  249. </view>
  250. </template>
  251. <script>
  252. import tabbarList from '@/utils/tabbar.js'
  253. let _this
  254. export default {
  255. data() {
  256. return {
  257. // tabbar配置项
  258. current: 1,
  259. tabbarList: tabbarList,
  260. //--- end --- tabbar配置项
  261. orderBylist: [{
  262. label: '创建时间倒序',
  263. value: '1'
  264. },
  265. {
  266. label: '创建时间正序',
  267. value: '2'
  268. },
  269. {
  270. label: '接待时间倒序',
  271. value: '3'
  272. },
  273. {
  274. label: '接待时间正序',
  275. value: '4'
  276. },
  277. {
  278. label: '执行率正序',
  279. value: '5'
  280. },
  281. {
  282. label: '执行率倒序',
  283. value: '6'
  284. },
  285. {
  286. label: '接访次数正序',
  287. value: '7'
  288. },
  289. {
  290. label: '接访次数倒序',
  291. value: '8'
  292. },
  293. ],
  294. value: '',
  295. screenShow: false,
  296. selectshow: false,
  297. selectTipshow: false,
  298. buildingID: '',
  299. screen: {
  300. agentId: '',
  301. agentIdtext: '',
  302. visitRecord: [],
  303. record: [],
  304. cunsumerTips: '',
  305. cunsumerTipsid: '',
  306. },
  307. stageList: ['未知', '到访', '意向', '定金', '成交'],
  308. recordList: [],
  309. nextPage: 1,
  310. totalRecord: '',
  311. totalRecords: '', // 总条数
  312. freeList: [],
  313. userInfo: {},
  314. findKeywordsList: [],
  315. isnorefresh: '',
  316. activeTotal: 5,
  317. activeTotal2: 0,
  318. totalTimeShow: false,
  319. timeshow: false,
  320. timetushow: false,
  321. soltishow: false,
  322. staTime: '',
  323. endtime: '',
  324. orderBy: '', // 排序的id
  325. permissions: {
  326. commonly1: false,
  327. commonly2: false
  328. },
  329. list: [], // 客户来源列表
  330. sourceId: '', // 选中的客户来源id
  331. sourceIndex: -1, // 选中项的下标
  332. // 不同等级之间的颜色
  333. colorName: [
  334. '', "A", "B", "C", "D"
  335. ],
  336. // 筛选文字展示
  337. sortFilter: '排序',
  338. arriveFilter: '到访时间',
  339. receptionDuration: '接待时长',
  340. visitList: [{
  341. label: '首次到访',
  342. value: 1,
  343. isShow: false,
  344. }, {
  345. label: '2次到访',
  346. value: 2,
  347. isShow: false,
  348. }, {
  349. label: '3次到访',
  350. value: 3,
  351. isShow: false,
  352. }, {
  353. label: '3次以上',
  354. value: 4,
  355. isShow: false,
  356. }, ],
  357. levelList: [{
  358. label: 'A',
  359. value: 1,
  360. isShow: false,
  361. }, {
  362. label: 'B',
  363. value: 2,
  364. isShow: false,
  365. }, {
  366. label: 'C',
  367. value: 3,
  368. isShow: false,
  369. }, {
  370. label: 'D',
  371. value: 4,
  372. isShow: false,
  373. }, ],
  374. isRefresh: false
  375. }
  376. },
  377. onLoad(options) {
  378. // _this = this
  379. // this.isnorefresh = 'refresh';
  380. // this.userInfo = uni.getStorageSync("weapp_session_userInfo_data")
  381. // console.log(this.userInfo.showPhoneStatus)
  382. // if (this.isnorefresh == 'refresh') {
  383. // this.buildingID = uni.getStorageSync('buildingID').id;
  384. // this.nextPage = 1;
  385. // this.recordList = []
  386. // this.getFreeList()
  387. // this.getfindKeywordsList()
  388. // this.getFromSource();
  389. // this.isRefresh = false;
  390. // this.getMyCustom()
  391. // }
  392. },
  393. onPullDownRefresh() {
  394. this.nextPage = 1;
  395. this.isRefresh = true;
  396. this.resetFilter()
  397. this.reset()
  398. this.getFreeList()
  399. this.getfindKeywordsList()
  400. this.getFromSource();
  401. this.getMyCustom();
  402. setTimeout(() => {
  403. uni.stopPullDownRefresh()
  404. }, 2000)
  405. },
  406. onShow() {
  407. let newmenulist = uni.getStorageSync('weapp_session_Menu_data');
  408. this.permissions.commonly1 = newmenulist.khgl_ck;
  409. this.permissions.commonly2 = newmenulist.khgl_gj;
  410. _this = this
  411. this.isnorefresh = 'refresh';
  412. this.userInfo = uni.getStorageSync("weapp_session_userInfo_data")
  413. console.log(this.userInfo.showPhoneStatus)
  414. if (this.isnorefresh == 'refresh') {
  415. this.buildingID = uni.getStorageSync('buildingID').id;
  416. this.nextPage = 1;
  417. this.recordList = []
  418. this.getFreeList()
  419. this.getfindKeywordsList()
  420. this.getFromSource();
  421. this.isRefresh = false;
  422. this.getMyCustom()
  423. }
  424. },
  425. onReachBottom() {
  426. if (this.totalRecord == this.nextPage) {
  427. uni.showToast({
  428. icon: 'none',
  429. title: '到底了',
  430. duration: 2000
  431. });
  432. return
  433. } else {
  434. this.isRefresh = false;
  435. this.nextPage += 1;
  436. this.getMyCustom();
  437. }
  438. },
  439. methods: {
  440. filterFun(){
  441. },
  442. // 过滤
  443. resetFilter() {
  444. this.sortFilter = '排序';
  445. this.orderBy = null;
  446. this.arriveFilter = '到访时间';
  447. this.staTime = '';
  448. this.endtime = '';
  449. this.nextPage = 1;
  450. this.activeTotal = 5;
  451. this.recordList = [];
  452. this.receptionDuration = '接待时长';
  453. this.activeTotal2 = 0;
  454. },
  455. // 获取客户来源
  456. getFromSource() {
  457. this.$u.get('customer/findCustomerSourceList', {
  458. houseId: this.buildingID
  459. }).then(res => {
  460. console.log('我进来了')
  461. this.list = res
  462. })
  463. },
  464. tapsoltishow() {
  465. this.soltishow = true;
  466. },
  467. taptimetuisshow() {
  468. this.timetushow = true;
  469. },
  470. taptimeisshow() {
  471. this.timeshow = true;
  472. },
  473. //选择标签
  474. selectCallback2(e) {
  475. this.sortFilter = e.label;
  476. this.orderBy = e.value;
  477. this.nextPage = 1;
  478. this.recordList = [];
  479. this.soltishow = false
  480. this.isRefresh = false;
  481. this.getMyCustom();
  482. },
  483. //选择录音时长
  484. timetap(index, text) {
  485. if (text) this.receptionDuration = text
  486. this.timetushow = false;
  487. this.activeTotal2 = index;
  488. this.nextPage = 1;
  489. this.recordList = [];
  490. this.isRefresh = false;
  491. this.getMyCustom();
  492. },
  493. //时间选择
  494. tabtimetap(index, text) {
  495. this.timeshow = false;
  496. if (text) this.arriveFilter = text
  497. if (index == 4) {
  498. this.totalTimeShow = true;
  499. } else {
  500. this.activeTotal = index;
  501. this.staTime = '';
  502. this.endtime = '';
  503. this.nextPage = 1;
  504. this.isRefresh = false;
  505. this.recordList = [];
  506. this.getMyCustom();
  507. }
  508. },
  509. //自定义时间
  510. totalTimeChange(e) {
  511. this.staTime = e.startDate;
  512. this.endtime = e.endDate;
  513. this.activeTotal = 4;
  514. this.nextPage = 1;
  515. this.recordList = [];
  516. this.isRefresh = false;
  517. this.arriveFilter = this.staTime + '-' + this.endtime
  518. this.getMyCustom();
  519. },
  520. recordclick(i) {
  521. if (this.screen.record == i) {
  522. this.screen.record = null
  523. } else {
  524. this.screen.record = i
  525. }
  526. },
  527. choice(index, e) {
  528. if (this.visitList[index].isShow == true) {
  529. this.visitList[index].isShow = false;
  530. for (var i = 0; i < this.screen.visitRecord.length; i++) {
  531. if (this.screen.visitRecord[i] === e) {
  532. this.screen.visitRecord.splice(i, 1);
  533. }
  534. }
  535. } else {
  536. this.visitList[index].isShow = true;
  537. console.log(this.screen)
  538. this.screen.visitRecord.push(e)
  539. }
  540. },
  541. choiceLevel(index, e) {
  542. if (this.levelList[index].isShow == true) {
  543. this.levelList[index].isShow = false;
  544. for (var i = 0; i < this.screen.record.length; i++) {
  545. if (this.screen.record[i] === e) {
  546. this.screen.record.splice(i, 1);
  547. }
  548. }
  549. } else {
  550. this.levelList[index].isShow = true;
  551. this.screen.record.push(e)
  552. }
  553. },
  554. screenvisitRecord(i) {
  555. if (this.screen.visitRecord == i) {
  556. this.screen.visitRecord = ''
  557. } else {
  558. this.screen.visitRecord = i
  559. }
  560. },
  561. // 客户详情
  562. gotoDetail(id) {
  563. if (this.permissions.commonly1 == true) {
  564. uni.navigateTo({
  565. url: `/pages/center/consumer/consumerDetail?id=${id}`
  566. })
  567. }
  568. },
  569. getMyCustom() {
  570. let dateType = 0;
  571. let recDurationInterval = 0;
  572. let orderBy = 0;
  573. if (this.activeTotal == 5) {
  574. dateType = null;
  575. } else if (this.activeTotal == 4) {
  576. dateType = null;
  577. } else {
  578. dateType = this.activeTotal;
  579. }
  580. if (this.activeTotal2 == 0) {
  581. recDurationInterval = null
  582. } else {
  583. recDurationInterval = this.activeTotal2
  584. }
  585. if (this.orderBy == 0) {
  586. orderBy = null;
  587. } else {
  588. orderBy = this.orderBy;
  589. }
  590. var parames = {
  591. pageNum: this.nextPage,
  592. pageSize: 10,
  593. query: {
  594. projectId: this.buildingID,
  595. keywordsId: this.screen.cunsumerTipsid,
  596. agentId: this.screen.agentId,
  597. dateType: dateType,
  598. staDate: this.staTime,
  599. endDate: this.endtime,
  600. recDurationInterval: recDurationInterval,
  601. orderBy: orderBy,
  602. sourceId: this.sourceId
  603. }
  604. };
  605. console.log(this.screen.visitRecord)
  606. if (this.screen.visitRecord.length > 0) {
  607. parames.query.visitRecords = this.screen.visitRecord.join(',');
  608. }
  609. if (this.screen.record.length > 0) {
  610. parames.query.level = this.screen.record.join(',');
  611. }
  612. this.$u.post("/customer/customerManagement", parames).then(data => {
  613. // if (this.staTime && this.endtime) {
  614. // this.receptionDuration = `${this.staTime}-${this.endtime}`
  615. // }
  616. var list = data.results || [];
  617. console.log(list)
  618. list.forEach(item => {
  619. if (item.demand.cusSemanticWordsList != null) {
  620. item.demand.cusSemanticWordsList.forEach(che => {
  621. if (che.isInterval == 0) {
  622. che.name = che.name + che.unit + '-' + che.endName + che.unit;
  623. }
  624. })
  625. }
  626. })
  627. if (this.isRefresh) {
  628. this.recordList = list;
  629. } else {
  630. this.recordList = [...this.recordList, ...list];
  631. }
  632. this.totalRecord = data.totalPage;
  633. this.totalRecords = data.totalRecord;
  634. })
  635. },
  636. //获取顾问列表
  637. getFreeList() {
  638. this.freeList = []
  639. this.$u.post("/cusLvStatistics/selectAllAccountIdByHouseId", {
  640. houseId: this.buildingID
  641. }).then(res => {
  642. this.freeList = res;
  643. this.freeList.forEach(item => {
  644. item.label = item.name;
  645. item.value = item.accountId
  646. })
  647. })
  648. },
  649. //获取客户标签
  650. getfindKeywordsList() {
  651. this.findKeywordsList = []
  652. this.$u.post("/customer/findKeywords", {
  653. houseId: this.buildingID
  654. }).then(res => {
  655. res.forEach(item => {
  656. if (item.isInterval == 0) {
  657. item.label = item.name + item.unit + '-' + item.endName + item.unit;
  658. } else {
  659. item.label = item.name
  660. }
  661. item.value = item.id;
  662. })
  663. this.findKeywordsList = res;
  664. })
  665. },
  666. // 筛选
  667. screenshow() {
  668. this.screenShow = true
  669. },
  670. //选择顾问
  671. actionSelectCallback(e) {
  672. this.screen.agentId = e[0].value;
  673. this.screen.agentIdtext = e[0].label;
  674. },
  675. //选择标签
  676. selectCallback(e) {
  677. this.screen.cunsumerTips = e[0].label;
  678. this.screen.cunsumerTipsid = e[0].value;
  679. },
  680. //重置
  681. reset() {
  682. this.screen = {
  683. agentId: '',
  684. agentIdtext: '',
  685. visitRecord: [],
  686. record: [],
  687. cunsumerTips: '',
  688. cunsumerTipsid: '',
  689. level: ''
  690. }
  691. this.visitList.map(i => {
  692. i.isShow = false
  693. })
  694. this.levelList.map(i => {
  695. i.isShow = false
  696. })
  697. this.nextPage = 1;
  698. this.recordList = [];
  699. this.sourceId = '';
  700. this.sourceIndex = -1;
  701. this.isRefresh = false;
  702. this.getMyCustom();
  703. },
  704. //筛选确认
  705. screensure() {
  706. this.nextPage = 1;
  707. this.recordList = [];
  708. this.screenShow = false;
  709. this.isRefresh = false;
  710. this.getMyCustom();
  711. },
  712. goSearch() {
  713. uni.navigateTo({
  714. url: '/pages/center/consumer/consumerSearch'
  715. });
  716. },
  717. gotoFollowUp(item) {
  718. uni.navigateTo({
  719. url: `/pages/center/consumer/newFollowup/newFollowup?id=${item.id}&level=${item.level}&clientStageName=${item.clientStageName}`
  720. })
  721. },
  722. },
  723. filters: {
  724. // 筛选等级展示文字
  725. levelText(level) {
  726. let str = '';
  727. switch (Number(level)) {
  728. case 1:
  729. str = "A"
  730. break;
  731. case 2:
  732. str = "B"
  733. break;
  734. case 3:
  735. str = "C"
  736. break;
  737. case 4:
  738. str = "D"
  739. break;
  740. default:
  741. str = ''
  742. break;
  743. }
  744. return str
  745. },
  746. // 加密手机
  747. phoneText(mobile) {
  748. if (!mobile) return '--'
  749. if (_this.userInfo.showPhoneStatus == 1) return mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
  750. else return mobile
  751. },
  752. // 格式化时间
  753. formatTime(time) {
  754. if (!time) return
  755. return time.substring(5, time.length)
  756. }
  757. }
  758. }
  759. </script>
  760. <style lang="scss" scoped>
  761. .box {
  762. width: 100vw;
  763. min-height: calc(100vh - var(--window-top));
  764. background: #F8F8F8;
  765. display: flex;
  766. flex-direction: column;
  767. .content {
  768. flex-grow: 1;
  769. }
  770. }
  771. .timeview {
  772. height: 90rpx;
  773. line-height: 90rpx;
  774. width: 100%;
  775. text-align: center;
  776. border-bottom: 1rpx solid #F8F8F8;
  777. }
  778. //时间切换的样式
  779. .boxtittab {
  780. position: sticky;
  781. top: var(--window-top);
  782. z-index: 999;
  783. width: 100;
  784. height: 72rpx;
  785. background: #FFFFFF;
  786. flex-shrink: 0;
  787. display: flex;
  788. align-items: center;
  789. .tabbox {
  790. flex: 1;
  791. height: 100%;
  792. text-align: center;
  793. line-height: 72rpx;
  794. color: #666666;
  795. font-size: 28rpx;
  796. overflow: hidden;
  797. text-overflow: ellipsis;
  798. display: -webkit-box;
  799. /* 将对象作为弹性伸缩盒子模型显示 */
  800. -webkit-line-clamp: 1;
  801. /* 控制最多显示几行 */
  802. -webkit-box-orient: vertical;
  803. /* 设置或检索伸缩盒对象的子元素的排列方式 */
  804. }
  805. .activeColor{
  806. color: #2671E2;
  807. }
  808. }
  809. .soltishow {
  810. width: 100%;
  811. min-height: 40vh;
  812. .soltishow-item {
  813. width: 100%;
  814. height: 80rpx;
  815. display: flex;
  816. align-items: center;
  817. justify-content: center;
  818. }
  819. }
  820. .search-box {
  821. width: 100%;
  822. height: 102rpx;
  823. background: #FFFFFF;
  824. display: flex;
  825. align-items: center;
  826. justify-content: center;
  827. .filter{
  828. width: 40rpx;
  829. height: 40rpx;
  830. margin-left: 30rpx;
  831. }
  832. .search {
  833. width: 620rpx;
  834. height: 70rpx;
  835. display: flex;
  836. align-items: center;
  837. background: #F8F8F8;
  838. border-radius: 33rpx;
  839. .search-img {
  840. width: 26rpx;
  841. height: 30rpx;
  842. margin-left: 20rpx;
  843. .search-img1 {
  844. width: 100%;
  845. height: 100%;
  846. margin-top: 2rpx;
  847. }
  848. }
  849. .search-text {
  850. font-size: 28rpx;
  851. font-weight: 400;
  852. color: #999999;
  853. margin-left: 10rpx;
  854. }
  855. }
  856. .search-screen {
  857. width: 40rpx;
  858. height: 40rpx;
  859. margin-left: 30rpx;
  860. .search-screen1 {
  861. width: 100%;
  862. height: 100%;
  863. }
  864. }
  865. }
  866. .count {
  867. width: 100%;
  868. height: 82rpx;
  869. line-height: 82rpx;
  870. display: flex;
  871. align-items: center;
  872. justify-content: center;
  873. background-color: #f8f8f8;
  874. font-size: 30rpx;
  875. font-family: PingFangSC-Regular, PingFang SC;
  876. font-weight: 400;
  877. color: #333333;
  878. text {
  879. color: #E7483C;
  880. }
  881. }
  882. .content {
  883. .content-tips {
  884. background: #fff;
  885. margin-bottom: 20rpx;
  886. .content-first {
  887. padding: 19rpx 30rpx;
  888. display: flex;
  889. justify-content: space-between;
  890. align-items: center;
  891. box-sizing: border-box;
  892. color: #292929;
  893. height: 90rpx;
  894. font-size: 30rpx;
  895. .left {
  896. display: flex;
  897. align-items: center;
  898. .img {
  899. width: 48rpx;
  900. height: 48rpx;
  901. line-height: 48rpx;
  902. text-align: center;
  903. margin-right: 16rpx;
  904. background: #E6625B;
  905. border-radius: 6rpx;
  906. font-size: 28rpx;
  907. font-family: PingFangSC-Regular, PingFang SC;
  908. font-weight: 400;
  909. color: #FFFFFF;
  910. }
  911. .clientStageName {
  912. margin-right: 20rpx;
  913. padding: 0 16rpx;
  914. font-size: 28rpx;
  915. font-family: PingFangSC-Regular, PingFang SC;
  916. font-weight: 400;
  917. color: #FF981E;
  918. height: 48rpx;
  919. line-height: 48rpx;
  920. background: #FFFFFF;
  921. border-radius: 4rpx;
  922. border: 1rpx solid #FF981E;
  923. box-sizing: border-box;
  924. }
  925. .A {
  926. background: #E6625B;
  927. }
  928. .B {
  929. background: #FF981E;
  930. }
  931. .C {
  932. background: #F6BD16;
  933. }
  934. .D {
  935. background: #E6625B;
  936. }
  937. .test {
  938. height: 42rpx;
  939. font-size: 30rpx;
  940. font-family: PingFangSC-Medium, PingFang SC;
  941. font-weight: 500;
  942. color: #333333;
  943. line-height: 42rpx;
  944. margin-right: 16rpx;
  945. }
  946. }
  947. .right {
  948. display: flex;
  949. align-items: center;
  950. color: #2671E2;
  951. font-size: 30rpx;
  952. .right-img {
  953. margin: 5rpx 0 0 10rpx;
  954. width: 14rpx;
  955. height: 30rpx;
  956. }
  957. }
  958. }
  959. .content-sec {
  960. border-top: 1px solid #E0E0E0;
  961. padding: 0 30rpx;
  962. padding-bottom: 30rpx;
  963. position: relative;
  964. .content-sec-lab {
  965. margin-top: 28rpx;
  966. display: flex;
  967. font-size: 30rpx;
  968. font-weight: 400;
  969. color: #333;
  970. line-height: 42rpx;
  971. .content-sec-lab1 {
  972. color: #333333;
  973. }
  974. .content-sec-tips {
  975. padding: 0 20rpx;
  976. height: 48rpx;
  977. background: #F4F8FD;
  978. border-radius: 6rpx;
  979. max-width: 160rpx;
  980. text-align: center;
  981. line-height: 48rpx;
  982. overflow: hidden;
  983. text-overflow: ellipsis;
  984. white-space: nowrap;
  985. font-weight: 400;
  986. margin-right: 12rpx;
  987. box-sizing: border-box;
  988. font-size: 28rpx;
  989. font-family: PingFangSC-Regular, PingFang SC;
  990. color: #2671E2;
  991. }
  992. }
  993. .content-sec-num {
  994. position: absolute;
  995. width: 196rpx;
  996. height: 112rpx;
  997. border-radius: 8rpx;
  998. top: 28rpx;
  999. right: 30rpx;
  1000. padding: 16rpx 20rpx;
  1001. background: #F4F8FD;
  1002. color: #2671E2;
  1003. line-height: 40rpx;
  1004. text-align: center;
  1005. }
  1006. }
  1007. .content-last {
  1008. height: 108rpx;
  1009. display: flex;
  1010. justify-content: flex-end;
  1011. align-items: center;
  1012. .content-last-tab {
  1013. width: 214rpx;
  1014. height: 70rpx;
  1015. line-height: 70rpx;
  1016. background: #FFFFFF;
  1017. border-radius: 8rpx;
  1018. border: 1rpx solid #2671E2;
  1019. box-sizing: border-box;
  1020. font-family: PingFangSC-Regular, PingFang SC;
  1021. font-weight: 400;
  1022. color: #2671E2;
  1023. font-size: 30rpx;
  1024. margin-right: 30rpx;
  1025. display: flex;
  1026. align-items: center;
  1027. justify-content: center;
  1028. image{
  1029. width: 40rpx;
  1030. height: 40rpx;
  1031. margin-right: 12rpx;
  1032. }
  1033. }
  1034. }
  1035. }
  1036. }
  1037. // 这是弹出层
  1038. .screen {
  1039. // box-sizing: border-box;
  1040. // padding: 0 30rpx;
  1041. .screen-counselor {
  1042. display: flex;
  1043. height: 106rpx;
  1044. // padding: 40rpx 30rpx 36rpx 30rpx;
  1045. padding: 0 30rpx;
  1046. box-sizing: border-box;
  1047. border-bottom: 1px solid #E0E0E0;
  1048. .screen-text {
  1049. flex-shrink: 0;
  1050. margin: 40rpx 0 36rpx 0;
  1051. font-size: 30rpx;
  1052. font-weight: 400;
  1053. color: #333333;
  1054. line-height: 30rpx;
  1055. }
  1056. .screen-sel {
  1057. flex-grow: 1;
  1058. display: flex;
  1059. justify-content: flex-end;
  1060. align-items: center;
  1061. margin-left: 60rpx;
  1062. .screen-sel-img {
  1063. flex-shrink: 0;
  1064. margin: 40rpx 0 36rpx 0;
  1065. width: 14rpx;
  1066. height: 30rpx;
  1067. }
  1068. .screen-inp {
  1069. padding: 0 20rpx;
  1070. text-align: right;
  1071. }
  1072. }
  1073. }
  1074. .screen-record {
  1075. height: 192rpx;
  1076. // width: 100%;
  1077. overflow: hidden;
  1078. padding: 0 30rpx;
  1079. box-sizing: border-box;
  1080. border-bottom: 1px solid #E0E0E0;
  1081. .screen-record-text {
  1082. margin-top: 36rpx;
  1083. font-size: 30rpx;
  1084. font-weight: 400;
  1085. color: #333333;
  1086. line-height: 30rpx;
  1087. }
  1088. .screen-record-tab {
  1089. margin-top: 30rpx;
  1090. display: flex;
  1091. // justify-content: space-around;
  1092. .screen-record-chose {
  1093. width: 156rpx;
  1094. height: 60rpx;
  1095. background: #2671E2;
  1096. border-radius: 4rpx;
  1097. border: 1px solid #2671E2;
  1098. text-align: center;
  1099. line-height: 60rpx;
  1100. margin-right: 22rpx;
  1101. color: #FFFFFF;
  1102. }
  1103. .screen-record-nochose {
  1104. width: 156rpx;
  1105. height: 60rpx;
  1106. background: #FFFFFF;
  1107. border-radius: 4rpx;
  1108. border: 1px solid #C9C9C9;
  1109. text-align: center;
  1110. line-height: 60rpx;
  1111. margin-right: 22rpx;
  1112. }
  1113. }
  1114. }
  1115. .screen-foot {
  1116. width: 100%;
  1117. height: 88rpx;
  1118. display: flex;
  1119. .screen-foot-reset {
  1120. width: 50%;
  1121. text-align: center;
  1122. height: 88rpx;
  1123. line-height: 88rpx;
  1124. font-size: 30rpx;
  1125. font-weight: 400;
  1126. color: #666666;
  1127. }
  1128. .screen-foot-sure {
  1129. width: 50%;
  1130. text-align: center;
  1131. line-height: 88rpx;
  1132. height: 88rpx;
  1133. font-size: 30rpx;
  1134. font-weight: 400;
  1135. color: #FFFFFF;
  1136. background: #2671E2;
  1137. }
  1138. }
  1139. }
  1140. </style>