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.
 
 
 
 

1312 lines
34 KiB

  1. <template>
  2. <view class="box">
  3. <!-- 选择器 -->
  4. <view class="boxtittab">
  5. <view class="tabbox" :class="{activeColor: arriveFilter!=='接待时间'}" @click="timeshow = true">
  6. {{ arriveFilter }}
  7. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
  8. </view>
  9. <view class="tabbox" :class="{activeColor:counselorName!=='接待顾问'}" @click="selectshow=true">
  10. {{ counselorName }}
  11. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
  12. </view>
  13. <view class="tabbox" :class="{activeColor: sortText!=='排序'}" @click="soltishow = true">
  14. {{ sortText }}
  15. <u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
  16. </view>
  17. <view class="tabbox" :class="{activeColor: chooseMore}" @click="screenShow = true">
  18. 更多筛选<u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
  19. </view>
  20. </view>
  21. <!-- 筛选后的数量 -->
  22. <view class="count" v-if="recordList.length > 0">
  23. 筛选结果:<text>{{totalRecords}}</text>条
  24. </view>
  25. <view class="content">
  26. <view v-if="recordList.length == 0"
  27. style="width: 100%;height: 100%;display: flex;align-items: center;background: #FFFFFF;">
  28. <view style="width: 100%;padding-top: 200rpx;">
  29. <view style="width: 100%;text-align: center;">
  30. <image style="width: 220rpx;height: 200rpx;"
  31. src="https://static.quhouse.com/zhikong_xcx_img/nodatalist.png" mode=""></image>
  32. </view>
  33. <view style="text-align: center;width: 100%;margin-top: 20rpx;color: #999999;">暂无数据</view>
  34. </view>
  35. </view>
  36. <view v-else class="content-tips" v-for="(item,index) in recordList" :key='index'
  37. @click="tapThevisiting(item)">
  38. <view class="content-first">
  39. <view class="left">
  40. <view class="adviser">顾</view>
  41. <view class="name">{{item.agentName}}</view>
  42. </view>
  43. <view class="right" v-if="item.recording!=0">
  44. <view v-if="item.receptionStatusName" style="margin-right: 6rpx;color: red;">
  45. {{item.receptionStatusName.slice(0, 2) || ''}}
  46. </view>
  47. <text style="margin-right: 6rpx;" v-if="item.receptionStatusName"> |</text>
  48. <view v-if="methodsisshow">
  49. <text style="margin-right: 6rpx;color: red;" v-if="item.taboo==1">违禁接待</text>
  50. <text style="margin-right: 6rpx;" v-if="item.taboo==1"> |</text>
  51. </view>
  52. <view v-if="item.validInvalidName" style="margin-right: 6rpx;">
  53. {{item.validInvalidName.slice(0, 2)||''}}
  54. </view>
  55. <text style="margin-right: 6rpx;" v-if="item.validInvalidName"> |</text>
  56. <view v-if="item.markAdvisor==0" class="">未标记</view>
  57. <view v-if="item.markAdvisor==1" class="">已标记</view>
  58. </view>
  59. <view class="right" v-else>
  60. <view class="">无录音</view>
  61. </view>
  62. </view>
  63. <view class="content-sec">
  64. <view class="left">
  65. <view class="adviser">客</view>
  66. <view class="cus">{{item.name || '--'}}</view>
  67. <!-- TODO -->
  68. <view class="arriveNum">销讲业务:{{ item.marketingBusinessName || '--' }}</view>
  69. <view class="arriveNum">{{ item.phone | encryption }}</view>
  70. </view>
  71. <view class="right">
  72. <!-- 销讲业务:{{item.marketingBusiness || ''}} -->
  73. </view>
  74. </view>
  75. <view class="content-newadd">
  76. <view class="c-items">
  77. 挖掘执行:{{item.wordFraction||0}}%
  78. </view>
  79. <view class="c-items">
  80. 挖掘成功:{{item.wordFinishFraction||0}}%
  81. </view>
  82. <view class="c-items u-flex">
  83. 销讲执行:<view class="value" style="color: #2671E2;font-weight:bold;">{{item.fraction||0}}%</view>
  84. </view>
  85. </view>
  86. <view class="content-last">
  87. <view class="c-items">
  88. <image src="../static/img/people.png" class="c-items-img" mode=""></image>
  89. {{ item.visitRecord || "--" }}次到访
  90. </view>
  91. <view class="c-items">
  92. <image src="../static/img/time.png" class="c-items-img" mode=""></image>
  93. {{ item.createTime }}
  94. </view>
  95. <view class="c-items">
  96. <image src="../static/img/voice.png" class="c-items-img" mode=""></image>
  97. {{ item.mm || '0' }}min
  98. </view>
  99. </view>
  100. </view>
  101. </view>
  102. <u-popup v-model="screenShow" mode="top" height="900">
  103. <view class="screen">
  104. <scroll-view scroll-y="true" style="height: 750rpx;">
  105. <!-- 销讲业务 -->
  106. <view class="screen-record">
  107. <view class="screen-record-text" @click="showTemplate=!showTemplate">
  108. 销讲业务
  109. <image v-if="showTemplate" class="arrow"
  110. src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
  111. <image v-else class="arrow"
  112. src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
  113. </view>
  114. <view class="screen-record-tab" v-if="showTemplate">
  115. <block v-for="(item,index) in templateList" :key="index">
  116. <view class="screen-record-item"
  117. :class="[item.isShow?'screen-record-chose':'screen-record-nochose']"
  118. @click="choice(item)">
  119. {{item.templateName}}
  120. </view>
  121. </block>
  122. </view>
  123. </view>
  124. <!-- 销讲执行率 -->
  125. <view class="screen-record">
  126. <view class="screen-record-text" @click="xiaojiangArrow=!xiaojiangArrow">
  127. 销讲执行率
  128. <image v-if="xiaojiangArrow" class="arrow"
  129. src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
  130. <image v-else class="arrow"
  131. src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
  132. </view>
  133. <view class="screen-record-tab" v-if="xiaojiangArrow">
  134. <block v-for="(item,index) in xiaojiangList" :key="index">
  135. <view class="screen-record-item"
  136. :class="[item.isShow?'screen-record-chose':'screen-record-nochose']"
  137. @click="choice(item)">
  138. {{item.label}}
  139. </view>
  140. </block>
  141. </view>
  142. </view>
  143. <!-- 需求挖掘率 -->
  144. <view class="screen-record">
  145. <view class="screen-record-text" @click="wajueArrow=!wajueArrow">
  146. 挖掘执行率
  147. <image v-if="wajueArrow" class="arrow"
  148. src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
  149. <image v-else class="arrow"
  150. src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
  151. </view>
  152. <view class="screen-record-tab" v-if="wajueArrow">
  153. <block v-for="(item,index) in wajueList" :key="index">
  154. <view class="screen-record-item"
  155. :class="[item.isShow?'screen-record-chose':'screen-record-nochose']"
  156. @click="choice(item)">
  157. {{item.label}}
  158. </view>
  159. </block>
  160. </view>
  161. </view>
  162. <!-- 需求挖掘率 -->
  163. <view class="screen-record">
  164. <view class="screen-record-text" @click="wajueArrows=!wajueArrows">
  165. 挖掘成功率
  166. <image v-if="wajueArrows" class="arrow"
  167. src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
  168. <image v-else class="arrow"
  169. src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
  170. </view>
  171. <view class="screen-record-tab" v-if="wajueArrows">
  172. <block v-for="(item,index) in wajueLists" :key="index">
  173. <view class="screen-record-item"
  174. :class="[item.isShow?'screen-record-chose':'screen-record-nochose']"
  175. @click="choice(item)">
  176. {{item.label}}
  177. </view>
  178. </block>
  179. </view>
  180. </view>
  181. <!-- 接待时长 -->
  182. <view class="screen-record">
  183. <view class="screen-record-text" @click="jiedaiArrow=!jiedaiArrow">
  184. 接待时长
  185. <image v-if="jiedaiArrow" class="arrow"
  186. src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
  187. <image v-else class="arrow"
  188. src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
  189. </view>
  190. <view class="screen-record-tab" v-if="jiedaiArrow">
  191. <block v-for="(item,index) in jiedaiList" :key="index">
  192. <view class="screen-record-item"
  193. :class="[item.isShow?'screen-record-chose':'screen-record-nochose']"
  194. @click="choice(item)">
  195. {{item.label}}
  196. </view>
  197. </block>
  198. </view>
  199. </view>
  200. <!-- 录音标识 -->
  201. <view class="screen-record">
  202. <view class="screen-record-text" @click="luyinArrow=!luyinArrow">
  203. 录音标识
  204. <image v-if="luyinArrow" class="arrow"
  205. src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
  206. <image v-else class="arrow"
  207. src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
  208. </view>
  209. <view class="screen-record-tab" v-if="luyinArrow">
  210. <view class="screen-record-item"
  211. :class="[screen.validInvalid===0?'screen-record-chose':'screen-record-nochose']"
  212. @click="screenvisivalidInvalid(0)">
  213. 有效接待
  214. </view>
  215. <view class="screen-record-item"
  216. :class="[screen.validInvalid===1?'screen-record-chose':'screen-record-nochose']"
  217. @click="screenvisivalidInvalid(1)">
  218. 无效接待
  219. </view>
  220. <view class="screen-record-item"
  221. :class="[screen.validInvalid===2?'screen-record-chose':'screen-record-nochose']"
  222. @click="screenvisivalidInvalid(2)">
  223. 无录音
  224. </view>
  225. <view class="screen-record-item"
  226. :class="[screen.validInvalid===3?'screen-record-chose':'screen-record-nochose']"
  227. @click="screenvisivalidInvalid(3)">
  228. 无效(未审核)
  229. </view>
  230. </view>
  231. </view>
  232. <!-- 标记顾问 -->
  233. <view class="screen-record">
  234. <view class="screen-record-text" @click="markArrow=!markArrow">
  235. 标记顾问
  236. <image v-if="markArrow" class="arrow"
  237. src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
  238. <image v-else class="arrow"
  239. src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
  240. </view>
  241. <view class="screen-record-tab" v-if="markArrow">
  242. <view class="screen-record-item"
  243. :class="[screen.markAdvisor==1?'screen-record-chose':'screen-record-nochose']"
  244. @click="screenvisitRecord(1)">
  245. 标记
  246. </view>
  247. <view class="screen-record-item"
  248. :class="[screen.markAdvisor===0?'screen-record-chose':'screen-record-nochose']"
  249. @click="screenvisitRecord(0)">
  250. 未标记
  251. </view>
  252. </view>
  253. </view>
  254. <!-- 到访次数 -->
  255. <view class="screen-record">
  256. <view class="screen-record-text" @click="visitArrow=!visitArrow">
  257. 到访次数
  258. <image v-if="visitArrow" class="arrow"
  259. src="https://static.quhouse.com/6cf38a2b82694392a7ab6eea24ce76b1.png" mode="" />
  260. <image v-else class="arrow"
  261. src="https://static.quhouse.com/17d69984ec7c4830b43f712016f06807.png" mode="" />
  262. </view>
  263. <view class="screen-record-tab" v-if="visitArrow">
  264. <block v-for="(item,index) in visitList" :key="index">
  265. <view class="screen-record-item"
  266. :class="[item.isShow?'screen-record-chose':'screen-record-nochose']"
  267. @click="choice(item)">
  268. {{item.label}}
  269. </view>
  270. </block>
  271. </view>
  272. </view>
  273. </scroll-view>
  274. <view class="screen-foot">
  275. <view class="screen-foot-reset" @click="reset">
  276. 重置
  277. </view>
  278. <view class="screen-foot-sure" @click="screensure">
  279. 确定
  280. </view>
  281. </view>
  282. </view>
  283. </u-popup>
  284. <!-- 选择顾问的选择框 -->
  285. <u-select v-model="selectshow" :list="freeList" @confirm="actionSelectCallback"></u-select>
  286. <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
  287. <u-popup v-model="timeshow" mode="bottom">
  288. <view class="timeview" :style="{ color: activeTotal == 5 ? '#2B6EFF' : '#333333' }"
  289. @click="tabtimetap(5, '接待时间')">
  290. 全部</view>
  291. <view class="timeview" :style="{ color: activeTotal == 0 ? '#2B6EFF' : '#333333' }"
  292. @click="tabtimetap(0, '今天')">
  293. 今天</view>
  294. <view class="timeview" :style="{ color: activeTotal == 1 ? '#2B6EFF' : '#333333' }"
  295. @click="tabtimetap(1, '昨天')">
  296. 昨天</view>
  297. <view class="timeview" :style="{ color: activeTotal == 2 ? '#2B6EFF' : '#333333' }"
  298. @click="tabtimetap(2, '近7天')">
  299. 近7天</view>
  300. <view class="timeview" :style="{ color: activeTotal == 3 ? '#2B6EFF' : '#333333' }"
  301. @click="tabtimetap(3, '近30天')">
  302. 近30天</view>
  303. <view class="timeview" :style="{ color: activeTotal == 4 ? '#2B6EFF' : '#333333' }" @click="tabtimetap(4)">
  304. 自定义</view>
  305. </u-popup>
  306. <u-select v-model="soltishow" :list="orderBylist" @confirm="selectCallback2"></u-select>
  307. <!-- 加载组件 -->
  308. <u-loadings v-model="LOADING"></u-loadings>
  309. </view>
  310. </template>
  311. <script>
  312. export default {
  313. data() {
  314. return {
  315. templateList: [], // 销讲业务
  316. showTemplate: true, // 展示销讲业务
  317. orderBylist: [
  318. // {
  319. // label: '全部',
  320. // value: '0'
  321. // },
  322. {
  323. label: '创建时间倒序',
  324. value: '1'
  325. },
  326. {
  327. label: '创建时间正序',
  328. value: '2'
  329. },
  330. {
  331. label: '接待时间倒序',
  332. value: '3'
  333. },
  334. {
  335. label: '接待时间正序',
  336. value: '4'
  337. },
  338. {
  339. label: '执行率正序',
  340. value: '5'
  341. },
  342. {
  343. label: '执行率倒序',
  344. value: '6'
  345. },
  346. {
  347. label: '接访次数正序',
  348. value: '7'
  349. },
  350. {
  351. label: '接访次数倒序',
  352. value: '8'
  353. },
  354. ],
  355. jiedaiList: [{
  356. label: '0~15min',
  357. value: 1,
  358. isShow: false,
  359. }, {
  360. label: '16~30min',
  361. value: 2,
  362. isShow: false,
  363. }, {
  364. label: '31~60min',
  365. value: 3,
  366. isShow: false,
  367. }, {
  368. label: '61~90min',
  369. value: 4,
  370. isShow: false,
  371. }, {
  372. label: '91min及以上',
  373. value: 5,
  374. isShow: false,
  375. }],
  376. wajueList: [{
  377. label: '30%及以下',
  378. value: 1,
  379. isShow: false,
  380. }, {
  381. label: '31%~50%',
  382. value: 2,
  383. isShow: false,
  384. }, {
  385. label: '51%~70%',
  386. value: 3,
  387. isShow: false,
  388. }, {
  389. label: '71%及以上',
  390. value: 4,
  391. isShow: false,
  392. }],
  393. wajueLists: [{
  394. label: '30%及以下',
  395. value: 1,
  396. isShow: false,
  397. }, {
  398. label: '31%~50%',
  399. value: 2,
  400. isShow: false,
  401. }, {
  402. label: '51%~70%',
  403. value: 3,
  404. isShow: false,
  405. }, {
  406. label: '71%及以上',
  407. value: 4,
  408. isShow: false,
  409. }],
  410. xiaojiangList: [{
  411. label: '30%及以下',
  412. value: 1,
  413. isShow: false,
  414. }, {
  415. label: '31%~50%',
  416. value: 2,
  417. isShow: false,
  418. }, {
  419. label: '51%~70%',
  420. value: 3,
  421. isShow: false,
  422. }, {
  423. label: '71%及以上',
  424. value: 4,
  425. isShow: false,
  426. }],
  427. activeTotal: 5,
  428. value: '',
  429. screenShow: false,
  430. wajueArrow: true,
  431. wajueArrows: true,
  432. jiedaiArrow: true,
  433. markArrow: true,
  434. visitArrow: true,
  435. xiaojiangArrow: true,
  436. luyinArrow: true,
  437. selectshow: false,
  438. totalTimeShow: false,
  439. totalRecords: '',
  440. screen: {
  441. orderBy: '', //排序
  442. agentId: '', //顾问id
  443. markAdvisor: '', //标记顾问
  444. validInvalid: '', // 录音标识
  445. visitRecord: [], // 到访次数
  446. wajueVal: [], // 需求挖掘
  447. wajueVals: [], // 需求挖掘
  448. xiaojiangVal: [], //销讲执行率
  449. jiedaiVal: [], // 接待时长
  450. marketingBusiness: [], // 选中销讲业务id
  451. },
  452. freeList: [], //顾问
  453. recordList: [],
  454. buildingID: '',
  455. nextPage: 1,
  456. totalRecord: "",
  457. staTime: '',
  458. endtime: '',
  459. isnorefresh: '',
  460. activeTotal2: 0,
  461. timeshow: false,
  462. timetushow: false,
  463. soltishow: false,
  464. methodsisshow: false,
  465. userInfo: {},
  466. counselorName: '接待顾问', //接待顾问
  467. arriveFilter: '接待时间', // 接待时间
  468. sortText: '排序',
  469. visitList: [{
  470. label: '首次到访',
  471. value: 1,
  472. isShow: false,
  473. }, {
  474. label: '2次到访',
  475. value: 2,
  476. isShow: false,
  477. }, {
  478. label: '3次到访',
  479. value: 3,
  480. isShow: false,
  481. }, {
  482. label: '3次以上',
  483. value: 4,
  484. isShow: false,
  485. }, ],
  486. isRefresh: false,
  487. chooseMore: false,
  488. }
  489. },
  490. onLoad(options) {
  491. this.LOADING = true
  492. this.isnorefresh = options.refresh;
  493. this.activeTotal = options.activeTotal
  494. this.screen.markAdvisor = options.markAdvisor
  495. this.screen.validInvalid = options.validInvalid
  496. if (options.staTime) {
  497. this.staTime = options.staTime;
  498. this.endtime = options.endtime + ' 23:59:59';
  499. }
  500. },
  501. onShow() {
  502. try {
  503. this.$store.commit('stopAduio')
  504. } catch (e) {
  505. console.log(e)
  506. }
  507. this.userInfo = uni.getStorageSync('weapp_session_userInfo_data');
  508. if (this.userInfo.dataCode == 6 || this.userInfo.dataCode == 3) {
  509. this.methodsisshow = false;
  510. } else {
  511. this.methodsisshow = true;
  512. }
  513. if (this.isnorefresh == 'refresh') {
  514. this.buildingID = uni.getStorageSync('buildingID').id;
  515. this.recordList = [];
  516. this.nextPage = 1;
  517. this.isRefresh = false;
  518. this.getMyCustom()
  519. this.getFreeList();
  520. this.getMarketingBusiness()
  521. this.isnorefresh = '';
  522. }
  523. },
  524. onPullDownRefresh() {
  525. this.isRefresh = true;
  526. this.nextPage = 1;
  527. this.getMyCustom()
  528. setTimeout(function() {
  529. uni.stopPullDownRefresh();
  530. }, 1000);
  531. },
  532. onReachBottom() {
  533. if (this.totalRecord == this.nextPage) {
  534. uni.showToast({
  535. icon: 'none',
  536. title: '到底了',
  537. duration: 2000
  538. });
  539. return
  540. } else {
  541. this.nextPage += 1;
  542. this.isRefresh = false;
  543. this.getMyCustom();
  544. }
  545. },
  546. methods: {
  547. // 获取销讲业务
  548. getMarketingBusiness() {
  549. this.$u.get('/customer/marketingBusiness', {
  550. houseId: this.buildingID,
  551. }).then(res => {
  552. this.templateList = res.map(item => {
  553. return {
  554. ...item,
  555. isShow: false,
  556. }
  557. })
  558. console.log(this.templateList, 'this.templateList')
  559. })
  560. },
  561. taptimetuisshow() {
  562. this.timetushow = true;
  563. },
  564. //选择标签
  565. selectCallback2(e) {
  566. this.sortText = e[0].label
  567. this.screen.orderBy = e[0].value;
  568. this.nextPage = 1;
  569. this.recordList = [];
  570. this.isRefresh = false;
  571. this.getMyCustom();
  572. },
  573. //时间选择
  574. tabtimetap(index, text) {
  575. this.timeshow = false;
  576. if (text) {
  577. this.arriveFilter = text
  578. }
  579. if (index == 4) {
  580. this.totalTimeShow = true;
  581. } else {
  582. this.activeTotal = index;
  583. this.staTime = '';
  584. this.endtime = '';
  585. this.nextPage = 1;
  586. this.recordList = [];
  587. this.isRefresh = false;
  588. this.getMyCustom();
  589. }
  590. },
  591. //自定义时间
  592. totalTimeChange(e) {
  593. this.staTime = e.startDate;
  594. this.endtime = e.endDate;
  595. this.activeTotal = 4;
  596. this.nextPage = 1;
  597. this.recordList = [];
  598. this.isRefresh = false;
  599. this.getMyCustom();
  600. },
  601. tapThevisiting(item) {
  602. let newmenulist = uni.getStorageSync('weapp_session_Menu_data');
  603. if (newmenulist.jdjl_ck != true) {
  604. return
  605. }
  606. this.wordFinishFraction = item.wordFinishFraction
  607. this.wordFraction = item.wordFraction
  608. uni.showLoading({
  609. title: '加载中',
  610. mask: true
  611. });
  612. if (item.status == 0) {
  613. setTimeout(function() {
  614. uni.hideLoading();
  615. }, 2000);
  616. uni.showToast({
  617. icon: "none",
  618. title: "排队中"
  619. })
  620. return
  621. } else {
  622. const parames = {
  623. pageNum: 1,
  624. pageSize: 100,
  625. query: {
  626. customerId: item.id,
  627. }
  628. }
  629. var item = {
  630. bg: 0,
  631. customerId: item.id,
  632. }
  633. uni.setStorageSync("searchobj", item); //写入缓存
  634. uni.setStorageSync("entrance", 1); //写入缓存
  635. this.$u.post("/corpus/findByPage", parames).then(res => {
  636. if (res == null) {
  637. setTimeout(function() {
  638. uni.hideLoading();
  639. }, 2000);
  640. uni.showToast({
  641. icon: "none",
  642. title: "暂无音频"
  643. })
  644. return
  645. } else {
  646. setTimeout(function() {
  647. uni.hideLoading();
  648. }, 2000);
  649. let newobj = res[0];
  650. if (res[0].merge == 0) {
  651. uni.navigateTo({
  652. url: `/pages/mine/details2?customerId=${newobj.customerId}&status=${newobj.status}&stateisshow=2&wordFraction=${this.wordFraction}&wordFinishFraction=${this.wordFinishFraction}`
  653. })
  654. } else {
  655. uni.navigateTo({
  656. url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&stateisshow=1`
  657. })
  658. }
  659. }
  660. })
  661. }
  662. },
  663. getMyCustom() {
  664. let dateType = 0;
  665. let recDurationInterval = 0;
  666. if (this.activeTotal == 5) {
  667. dateType = null;
  668. } else if (this.activeTotal == 4) {
  669. dateType = null;
  670. } else {
  671. dateType = this.activeTotal;
  672. }
  673. if (this.activeTotal2 == 0) {
  674. recDurationInterval = null
  675. } else {
  676. recDurationInterval = this.activeTotal2
  677. }
  678. this.screen.jiedaiVal = []
  679. this.screen.wajueVal = []
  680. this.screen.wajueVals = []
  681. this.screen.xiaojiangVal = []
  682. this.screen.visitRecord = []
  683. this.screen.marketingBusiness = []
  684. // 到访次数
  685. this.visitList.forEach(i => {
  686. if (i.isShow) this.screen.visitRecord.push(i.value)
  687. })
  688. // 接待时长
  689. this.jiedaiList.forEach(i => {
  690. if (i.isShow) this.screen.jiedaiVal.push(i.value)
  691. })
  692. // 需求挖掘
  693. this.wajueList.forEach(i => {
  694. if (i.isShow) this.screen.wajueVal.push(i.value)
  695. })
  696. // 需求挖掘成功
  697. this.wajueLists.forEach(i => {
  698. if (i.isShow) this.screen.wajueVals.push(i.value)
  699. })
  700. // 销讲执行率
  701. this.xiaojiangList.forEach(i => {
  702. if (i.isShow) this.screen.xiaojiangVal.push(i.value)
  703. })
  704. // 销讲业务
  705. this.templateList.forEach(i => {
  706. if (i.isShow) this.screen.marketingBusiness.push(i.id)
  707. })
  708. var parames = {
  709. pageNum: this.nextPage,
  710. pageSize: 10,
  711. query: {
  712. projectId: this.buildingID,
  713. time: 1,
  714. staDate: this.staTime,
  715. endDate: this.endtime,
  716. markAdvisor: this.screen.markAdvisor,
  717. dateType: dateType,
  718. recDurationInterval: recDurationInterval,
  719. orderBy: this.screen.orderBy == '' ? '' : this.screen.orderBy, //排序,
  720. validInvalid: this.screen.validInvalid == 2 ? null : this.screen.validInvalid, //录音标识
  721. recording: this.screen.validInvalid == 2 ? 0 : null,
  722. visitRecords: this.screen.visitRecord.length ? this.screen.visitRecord.join(",") : '', //到访次数
  723. wordFractions: this.screen.wajueVal.length ? this.screen.wajueVal.join(',') : '', //需求挖掘
  724. wordFinishFractions: this.screen.wajueVals.length ? this.screen.wajueVals.join(',') : '', //需求挖掘
  725. duractionNums: this.screen.jiedaiVal.length ? this.screen.jiedaiVal.join(',') : '', //接待时长
  726. fractions: this.screen.xiaojiangVal.length ? this.screen.xiaojiangVal.join(',') : '', //销讲执行
  727. marketingBusiness: this.screen.marketingBusiness.length ? this.screen.marketingBusiness.join(
  728. ',') : '', //销讲执行
  729. }
  730. };
  731. if (this.screen.agentId) {
  732. parames.query.agentId = this.screen.agentId
  733. }
  734. this.$u.post("/customer/findbypage", parames).then(data => {
  735. this.LOADING = false
  736. // console.log(data)
  737. let list = data.records || [];
  738. if (this.isRefresh) {
  739. this.recordList = list;
  740. } else {
  741. this.recordList = [].concat(this.recordList, list)
  742. }
  743. this.totalRecord = data.pages;
  744. this.totalRecords = data.total;
  745. if (this.staTime && this.endtime) {
  746. this.arriveFilter = `${this.staTime}-${this.endtime}`
  747. }
  748. }).catch(e => {
  749. this.LOADING = false
  750. })
  751. },
  752. //获取顾问列表
  753. getFreeList() {
  754. this.$u.post("/cusLvStatistics/selectAllAccountIdByHouseId", {
  755. houseId: this.buildingID
  756. }).then(res => {
  757. this.freeList = res;
  758. this.freeList.forEach(item => {
  759. item.label = item.name;
  760. item.value = item.accountId
  761. })
  762. this.freeList.unshift({
  763. label: '全部',
  764. value: ''
  765. })
  766. })
  767. },
  768. //select接待顾问
  769. actionSelectCallback(e) {
  770. if (e[0].label == '全部') {
  771. this.counselorName = '接待顾问'
  772. this.screen.agentId = ''
  773. } else {
  774. this.screen.agentId = e[0].value;
  775. this.counselorName = e[0].label
  776. }
  777. this.recordList = [];
  778. this.nextPage = 1;
  779. this.isRefresh = false;
  780. this.getMyCustom();
  781. },
  782. reset() {
  783. this.screen.agentId = ''
  784. this.screen.validInvalid = ''
  785. this.screen.markAdvisor = ''
  786. this.screen.orderBy = '';
  787. this.screen.jiedaiVal = []
  788. this.screen.wajueVal = []
  789. this.screen.wajueVals = []
  790. this.screen.xiaojiangVal = []
  791. this.screen.visitRecord = []
  792. this.screen.marketingBusiness = []
  793. this.sortText = '排序';
  794. this.arriveFilter = '接待时间';
  795. this.staTime = '';
  796. this.endTime = '';
  797. this.nextPage = 1;
  798. this.activeTotal = 5;
  799. this.recordList = [];
  800. this.counselorName = '接待顾问';
  801. this.visitList.forEach(i => {
  802. i.isShow = false
  803. })
  804. this.jiedaiList.forEach(i => {
  805. i.isShow = false
  806. })
  807. this.wajueList.forEach(i => {
  808. i.isShow = false
  809. })
  810. this.xiaojiangList.forEach(i => {
  811. i.isShow = false
  812. })
  813. this.templateList.forEach(i => {
  814. i.isShow = false
  815. })
  816. this.isRefresh = false;
  817. this.getMyCustom();
  818. },
  819. chooseMores() {
  820. let change1 = this.templateList.some(item => item.isShow == true)
  821. let change2 = this.xiaojiangList.some(item => item.isShow == true)
  822. let change3 = this.wajueList.some(item => item.isShow == true)
  823. let change8 = this.wajueLists.some(item => item.isShow == true)
  824. let change4 = this.jiedaiList.some(item => item.isShow == true)
  825. let change5 = this.screen.validInvalid != null && this.screen.validInvalid != ''
  826. let change6 = this.screen.markAdvisor != null && this.screen.markAdvisor != ''
  827. let change7 = this.visitList.some(item => item.isShow == true)
  828. console.log(change1, change2, change3, change4, change5, change6, change7)
  829. if (change1 || change2 || change3 || change4 || change5 || change6 || change7 || change8) {
  830. return true
  831. } else {
  832. return false
  833. }
  834. },
  835. choice(item) {
  836. item.isShow = !item.isShow;
  837. },
  838. // 标记顾问
  839. screenvisitRecord(i) {
  840. if (this.screen.markAdvisor === i) {
  841. this.screen.markAdvisor = ''
  842. } else {
  843. this.screen.markAdvisor = i
  844. }
  845. },
  846. // 录音标识
  847. screenvisivalidInvalid(i) {
  848. if (this.screen.validInvalid == i) {
  849. this.screen.validInvalid = null
  850. } else {
  851. this.screen.validInvalid = i
  852. }
  853. },
  854. screensure() {
  855. this.chooseMore = this.chooseMores()
  856. this.screenShow = false;
  857. this.recordList = [];
  858. this.nextPage = 1;
  859. this.isRefresh = false;
  860. this.getMyCustom();
  861. },
  862. goSearch() {
  863. uni.navigateTo({
  864. url: '/pages/center/records/recordSearch'
  865. });
  866. },
  867. },
  868. filters: {
  869. // 加密手机号
  870. encryption(phone) {
  871. if (!phone) return
  872. return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
  873. }
  874. }
  875. }
  876. </script>
  877. <style lang="scss" scoped>
  878. .box {
  879. width: 100%;
  880. height: 100%;
  881. background: #F8F8F8;
  882. }
  883. .timeview {
  884. height: 90rpx;
  885. line-height: 90rpx;
  886. width: 100%;
  887. text-align: center;
  888. border-bottom: 1rpx solid #F8F8F8;
  889. }
  890. //时间切换的样式
  891. .boxtittab {
  892. position: sticky;
  893. top: var(--window-top);
  894. z-index: 999;
  895. width: 100;
  896. height: 92rpx;
  897. background: #FFFFFF;
  898. display: flex;
  899. align-items: center;
  900. .tabbox {
  901. flex-shrink: 0;
  902. flex-grow: 1;
  903. height: 100%;
  904. text-align: center;
  905. line-height: 92rpx;
  906. color: #666666;
  907. font-size: 28rpx;
  908. overflow: hidden;
  909. text-overflow: ellipsis;
  910. display: -webkit-box;
  911. /* 将对象作为弹性伸缩盒子模型显示 */
  912. -webkit-line-clamp: 1;
  913. /* 控制最多显示几行 */
  914. -webkit-box-orient: vertical;
  915. /* 设置或检索伸缩盒对象的子元素的排列方式 */
  916. }
  917. .activeColor {
  918. font-weight: bold;
  919. color: #2671E2;
  920. }
  921. }
  922. .search-box {
  923. width: 100%;
  924. height: 102rpx;
  925. background: #FFFFFF;
  926. display: flex;
  927. align-items: center;
  928. justify-content: center;
  929. .search {
  930. width: 94%;
  931. height: 70rpx;
  932. display: flex;
  933. align-items: center;
  934. background: #F8F8F8;
  935. border-radius: 33rpx;
  936. .search-img {
  937. width: 26rpx;
  938. height: 30rpx;
  939. margin-left: 20rpx;
  940. .search-img1 {
  941. width: 100%;
  942. height: 100%;
  943. margin-top: 2rpx;
  944. }
  945. }
  946. .search-text {
  947. font-size: 28rpx;
  948. font-weight: 400;
  949. color: #999999;
  950. margin-left: 10rpx;
  951. }
  952. }
  953. .search-screen {
  954. width: 40rpx;
  955. height: 40rpx;
  956. margin-left: 30rpx;
  957. .search-screen1 {
  958. width: 100%;
  959. height: 100%;
  960. }
  961. }
  962. }
  963. .count {
  964. width: 100%;
  965. height: 82rpx;
  966. line-height: 82rpx;
  967. display: flex;
  968. align-items: center;
  969. justify-content: center;
  970. background-color: #f8f8f8;
  971. font-size: 30rpx;
  972. font-family: PingFangSC-Regular, PingFang SC;
  973. font-weight: 400;
  974. color: #333333;
  975. text {
  976. color: #E7483C;
  977. }
  978. }
  979. .content {
  980. .content-tips {
  981. background: #fff;
  982. box-sizing: border-box;
  983. overflow: hidden;
  984. margin-bottom: 20rpx;
  985. &:last-child {
  986. margin-bottom: 0
  987. }
  988. .content-first {
  989. padding: 0 30rpx;
  990. height: 92rpx;
  991. border-bottom: 1rpx solid #D8D8D8;
  992. display: flex;
  993. align-items: center;
  994. justify-content: space-between;
  995. .left {
  996. flex-shrink: 0;
  997. min-width: 40%;
  998. display: flex;
  999. align-items: center;
  1000. overflow: hidden;
  1001. .adviser {
  1002. margin-right: 10rpx;
  1003. padding: 5rpx 11rpx;
  1004. border-radius: 50%;
  1005. border: 1rpx solid #2671E2;
  1006. font-size: 30rpx;
  1007. color: #2671E2;
  1008. }
  1009. .img {
  1010. width: 52rpx;
  1011. height: 52rpx;
  1012. background: #FFFFFF;
  1013. border: 1px solid #C9C9C9;
  1014. border-radius: 50%;
  1015. text-align: center;
  1016. }
  1017. .name {
  1018. color: #333333;
  1019. font-size: 32rpx;
  1020. font-weight: bold;
  1021. }
  1022. .status {
  1023. margin-left: 19rpx;
  1024. width: 110rpx;
  1025. background: #FFF9F5;
  1026. border-radius: 4rpx;
  1027. font-size: 26rpx;
  1028. font-weight: 400;
  1029. color: #EC8D49;
  1030. text-align: center;
  1031. }
  1032. }
  1033. .right {
  1034. flex: 1;
  1035. display: flex;
  1036. font-size: 30rpx;
  1037. justify-content: flex-end;
  1038. view,
  1039. text {
  1040. flex-shrink: 0;
  1041. }
  1042. .point {
  1043. flex-shrink: 0;
  1044. width: 12rpx;
  1045. height: 12rpx;
  1046. background: #2B6EFF;
  1047. border-radius: 50%;
  1048. margin-right: 9rpx;
  1049. margin-top: 16rpx;
  1050. }
  1051. }
  1052. }
  1053. .content-sec {
  1054. padding: 28rpx 30rpx 32rpx;
  1055. display: flex;
  1056. justify-content: space-between;
  1057. .left {
  1058. display: flex;
  1059. align-items: center;
  1060. .adviser {
  1061. margin-right: 10rpx;
  1062. padding: 5rpx 11rpx;
  1063. border-radius: 50%;
  1064. border: 1rpx solid #2671E2;
  1065. background: #2671E2;
  1066. font-size: 30rpx;
  1067. color: #fff;
  1068. }
  1069. .cus {
  1070. font-size: 30rpx;
  1071. font-weight: 400;
  1072. color: #333;
  1073. overflow: hidden;
  1074. text-overflow: ellipsis;
  1075. display: -webkit-box;
  1076. line-height: 23px;
  1077. max-height: 46px;
  1078. -webkit-line-clamp: 1;
  1079. -webkit-box-orient: vertical;
  1080. }
  1081. .arriveNum {
  1082. font-size: 30rpx;
  1083. font-weight: 400;
  1084. margin-left: 10rpx;
  1085. }
  1086. }
  1087. .right {
  1088. font-size: 28rpx;
  1089. font-weight: 400;
  1090. display: flex;
  1091. align-items: center;
  1092. }
  1093. }
  1094. .content-newadd {
  1095. padding: 0 30rpx 34rpx;
  1096. display: flex;
  1097. align-items: center;
  1098. justify-content: space-between;
  1099. font-size: 30rpx;
  1100. color: #333;
  1101. }
  1102. .content-last {
  1103. padding: 0 30rpx 34rpx;
  1104. font-size: 30rpx;
  1105. font-weight: 400;
  1106. color: #666666;
  1107. display: flex;
  1108. align-items: center;
  1109. justify-content: space-between;
  1110. .c-items {
  1111. flex-shrink: 0;
  1112. display: flex;
  1113. align-items: center;
  1114. font-size: 28rpx;
  1115. .c-items-img {
  1116. margin-right: 10rpx;
  1117. width: 32rpx;
  1118. height: 32rpx;
  1119. }
  1120. }
  1121. }
  1122. }
  1123. }
  1124. // 这是弹出层
  1125. .screen {
  1126. width: 750rpx;
  1127. .screen-counselor {
  1128. display: flex;
  1129. height: 106rpx;
  1130. padding: 0 30rpx;
  1131. box-sizing: border-box;
  1132. border-bottom: 1px solid #EEEEEE;
  1133. .screen-text {
  1134. margin: 40rpx 0 36rpx 0;
  1135. font-size: 30rpx;
  1136. font-weight: 400;
  1137. color: #333333;
  1138. line-height: 30rpx;
  1139. }
  1140. .screen-sel {
  1141. display: flex;
  1142. justify-content: space-between;
  1143. width: 500rpx;
  1144. margin-left: 60rpx;
  1145. .screen-sel-img {
  1146. margin: 40rpx 0 36rpx 0;
  1147. width: 14rpx;
  1148. height: 30rpx;
  1149. }
  1150. .screen-inp {
  1151. margin-top: 20rpx;
  1152. }
  1153. }
  1154. }
  1155. .screen-record {
  1156. overflow: hidden;
  1157. padding: 0 30rpx;
  1158. box-sizing: border-box;
  1159. border-bottom: 1px solid #e0e0e0;
  1160. .screen-record-text {
  1161. padding: 30rpx 0;
  1162. font-size: 30rpx;
  1163. font-weight: 600;
  1164. color: #333333;
  1165. line-height: 30rpx;
  1166. display: flex;
  1167. align-items: center;
  1168. justify-content: space-between;
  1169. .arrow {
  1170. width: 30rpx;
  1171. height: 14rpx;
  1172. }
  1173. }
  1174. .screen-record-tab {
  1175. margin-top: 30rpx;
  1176. padding-bottom: 10rpx;
  1177. display: flex;
  1178. flex-wrap: wrap;
  1179. .screen-record-item {
  1180. min-width: 150rpx;
  1181. padding: 0 14rpx;
  1182. height: 60rpx;
  1183. border-radius: 8rpx;
  1184. text-align: center;
  1185. line-height: 60rpx;
  1186. margin: 0 22rpx 22rpx 0;
  1187. &:nth-child(4n) {
  1188. margin-right: 0;
  1189. }
  1190. }
  1191. .screen-record-chose {
  1192. background: #F1F6FD;
  1193. color: #2671E2;
  1194. }
  1195. .screen-record-nochose {
  1196. background: #F7F8FA;
  1197. color: #333;
  1198. }
  1199. }
  1200. }
  1201. .screen-foot {
  1202. width: 100%;
  1203. height: 78rpx;
  1204. display: flex;
  1205. margin: 30rpx 30rpx 0;
  1206. .screen-foot-reset {
  1207. width: 176rpx;
  1208. height: 78rpx;
  1209. line-height: 78rpx;
  1210. background: #FFFFFF;
  1211. border-radius: 8rpx;
  1212. border: 1px solid #2671E2;
  1213. margin-right: 30rpx;
  1214. font-size: 30rpx;
  1215. font-family: PingFangSC-Regular, PingFang SC;
  1216. font-weight: 400;
  1217. color: #2671E2;
  1218. text-align: center;
  1219. }
  1220. .screen-foot-sure {
  1221. width: 484rpx;
  1222. height: 78rpx;
  1223. line-height: 78rpx;
  1224. background: #2671E2;
  1225. border: 1px solid #2671E2;
  1226. border-radius: 8rpx;
  1227. font-size: 30rpx;
  1228. font-family: PingFangSC-Regular, PingFang SC;
  1229. font-weight: 400;
  1230. color: #FFFFFF;
  1231. text-align: center;
  1232. }
  1233. }
  1234. }
  1235. </style>