AI销管
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.

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