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.
 
 
 
 

1328 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 ||''}}
  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.houseId) this.buildingID = options.houseId
  497. if (options.staTime) {
  498. this.staTime = options.staTime;
  499. this.endtime = options.endtime + ' 23:59:59';
  500. }
  501. if (options.visitRecords==1) {
  502. this.visitList[0].isShow=true
  503. }else if(options.visitRecords==2){
  504. this.visitList[1].isShow=true
  505. this.visitList[2].isShow=true
  506. this.visitList[3].isShow=true
  507. }
  508. },
  509. onShow() {
  510. try {
  511. this.$store.commit('stopAduio')
  512. } catch (e) {
  513. console.log(e)
  514. }
  515. this.userInfo = uni.getStorageSync('weapp_session_userInfo_data');
  516. if (this.userInfo.dataCode == 6 || this.userInfo.dataCode == 3) {
  517. this.methodsisshow = false;
  518. } else {
  519. this.methodsisshow = true;
  520. }
  521. if (this.isnorefresh == 'refresh') {
  522. if (!this.buildingID) this.buildingID = uni.getStorageSync('buildingID').id;
  523. this.recordList = [];
  524. this.nextPage = 1;
  525. this.isRefresh = false;
  526. this.getMyCustom()
  527. this.getFreeList();
  528. this.getMarketingBusiness()
  529. this.isnorefresh = '';
  530. }
  531. },
  532. onPullDownRefresh() {
  533. this.isRefresh = true;
  534. this.nextPage = 1;
  535. this.getMyCustom()
  536. setTimeout(function() {
  537. uni.stopPullDownRefresh();
  538. }, 1000);
  539. },
  540. onReachBottom() {
  541. if (this.totalRecord == this.nextPage) {
  542. uni.showToast({
  543. icon: 'none',
  544. title: '到底了',
  545. duration: 2000
  546. });
  547. return
  548. } else {
  549. this.nextPage += 1;
  550. this.isRefresh = false;
  551. this.getMyCustom();
  552. }
  553. },
  554. methods: {
  555. // 获取销讲业务
  556. getMarketingBusiness() {
  557. this.$u.get('/customer/marketingBusiness', {
  558. houseId: this.buildingID,
  559. }).then(res => {
  560. this.templateList = res.map(item => {
  561. return {
  562. ...item,
  563. isShow: false,
  564. }
  565. })
  566. console.log(this.templateList, 'this.templateList')
  567. })
  568. },
  569. taptimetuisshow() {
  570. this.timetushow = true;
  571. },
  572. //选择标签
  573. selectCallback2(e) {
  574. this.sortText = e[0].label
  575. this.screen.orderBy = e[0].value;
  576. this.nextPage = 1;
  577. this.recordList = [];
  578. this.isRefresh = false;
  579. this.getMyCustom();
  580. },
  581. //时间选择
  582. tabtimetap(index, text) {
  583. this.timeshow = false;
  584. if (text) {
  585. this.arriveFilter = text
  586. }
  587. if (index == 4) {
  588. this.totalTimeShow = true;
  589. } else {
  590. this.activeTotal = index;
  591. this.staTime = '';
  592. this.endtime = '';
  593. this.nextPage = 1;
  594. this.recordList = [];
  595. this.isRefresh = false;
  596. this.getMyCustom();
  597. }
  598. },
  599. //自定义时间
  600. totalTimeChange(e) {
  601. this.staTime = e.startDate;
  602. this.endtime = e.endDate;
  603. this.activeTotal = 4;
  604. this.nextPage = 1;
  605. this.recordList = [];
  606. this.isRefresh = false;
  607. this.getMyCustom();
  608. },
  609. tapThevisiting(item) {
  610. let newmenulist = uni.getStorageSync('weapp_session_Menu_data');
  611. if (newmenulist.jdjl_ck != true) {
  612. return
  613. }
  614. this.wordFinishFraction = item.wordFinishFraction
  615. this.wordFraction = item.wordFraction
  616. uni.showLoading({
  617. title: '加载中',
  618. mask: true
  619. });
  620. if (item.status == 0) {
  621. setTimeout(() => {
  622. uni.hideLoading();
  623. }, 2000);
  624. uni.showToast({
  625. icon: "none",
  626. title: "排队中"
  627. })
  628. return
  629. } else {
  630. const parames = {
  631. pageNum: 1,
  632. pageSize: 100,
  633. query: {
  634. customerId: item.id,
  635. }
  636. }
  637. var item = {
  638. bg: 0,
  639. customerId: item.id,
  640. }
  641. uni.setStorageSync("searchobj", item); //写入缓存
  642. uni.setStorageSync("entrance", 1); //写入缓存
  643. this.$u.post("/corpus/findByPage", parames).then(res => {
  644. if (res == null) {
  645. setTimeout(() => {
  646. uni.hideLoading();
  647. }, 2000);
  648. if (this.CHECKAUTHORITY('sbrz')) {
  649. uni.navigateTo({
  650. url: `/pages/mine/equipmentLog?id=${item.customerId}`
  651. })
  652. } else {
  653. uni.showToast({
  654. icon: "none",
  655. title: "暂无音频"
  656. })
  657. }
  658. return
  659. } else {
  660. setTimeout(() => {
  661. uni.hideLoading();
  662. }, 2000);
  663. let newobj = res[0];
  664. if (res[0].merge == 0) {
  665. uni.navigateTo({
  666. url: `/pages/mine/details2?customerId=${newobj.customerId}&status=${newobj.status}&stateisshow=2&wordFraction=${this.wordFraction}&wordFinishFraction=${this.wordFinishFraction}`
  667. })
  668. } else {
  669. uni.navigateTo({
  670. url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&stateisshow=1`
  671. })
  672. }
  673. }
  674. })
  675. }
  676. },
  677. getMyCustom() {
  678. let dateType = 0;
  679. let recDurationInterval = 0;
  680. if (this.activeTotal == 5) {
  681. dateType = null;
  682. } else if (this.activeTotal == 4) {
  683. dateType = null;
  684. } else {
  685. dateType = this.activeTotal;
  686. }
  687. if (this.activeTotal2 == 0) {
  688. recDurationInterval = null
  689. } else {
  690. recDurationInterval = this.activeTotal2
  691. }
  692. this.screen.jiedaiVal = []
  693. this.screen.wajueVal = []
  694. this.screen.wajueVals = []
  695. this.screen.xiaojiangVal = []
  696. this.screen.visitRecord = []
  697. this.screen.marketingBusiness = []
  698. // 到访次数
  699. this.visitList.forEach(i => {
  700. if (i.isShow) this.screen.visitRecord.push(i.value)
  701. })
  702. // 接待时长
  703. this.jiedaiList.forEach(i => {
  704. if (i.isShow) this.screen.jiedaiVal.push(i.value)
  705. })
  706. // 需求挖掘
  707. this.wajueList.forEach(i => {
  708. if (i.isShow) this.screen.wajueVal.push(i.value)
  709. })
  710. // 需求挖掘成功
  711. this.wajueLists.forEach(i => {
  712. if (i.isShow) this.screen.wajueVals.push(i.value)
  713. })
  714. // 销讲执行率
  715. this.xiaojiangList.forEach(i => {
  716. if (i.isShow) this.screen.xiaojiangVal.push(i.value)
  717. })
  718. // 销讲业务
  719. this.templateList.forEach(i => {
  720. if (i.isShow) this.screen.marketingBusiness.push(i.id)
  721. })
  722. var parames = {
  723. pageNum: this.nextPage,
  724. pageSize: 10,
  725. query: {
  726. projectId: this.buildingID,
  727. time: 1,
  728. staDate: this.staTime,
  729. endDate: this.endtime,
  730. markAdvisor: this.screen.markAdvisor,
  731. dateType: dateType,
  732. recDurationInterval: recDurationInterval,
  733. orderBy: this.screen.orderBy == '' ? '' : this.screen.orderBy, //排序,
  734. validInvalid: this.screen.validInvalid == 2 ? null : this.screen.validInvalid, //录音标识
  735. recording: this.screen.validInvalid == 2 ? 0 : null,
  736. visitRecords: this.screen.visitRecord.length ? this.screen.visitRecord.join(",") : '', //到访次数
  737. wordFractions: this.screen.wajueVal.length ? this.screen.wajueVal.join(',') : '', //需求挖掘
  738. wordFinishFractions: this.screen.wajueVals.length ? this.screen.wajueVals.join(',') : '', //需求挖掘
  739. duractionNums: this.screen.jiedaiVal.length ? this.screen.jiedaiVal.join(',') : '', //接待时长
  740. fractions: this.screen.xiaojiangVal.length ? this.screen.xiaojiangVal.join(',') : '', //销讲执行
  741. marketingBusiness: this.screen.marketingBusiness.length ? this.screen.marketingBusiness.join(
  742. ',') : '', //销讲执行
  743. }
  744. };
  745. if (this.screen.agentId) {
  746. parames.query.agentId = this.screen.agentId
  747. }
  748. console.log("zzj2:"+this.screen.visitRecord)
  749. this.$u.post("/customer/findbypage", parames).then(data => {
  750. this.LOADING = false
  751. // console.log(data)
  752. let list = data.records || [];
  753. if (this.isRefresh) {
  754. this.recordList = list;
  755. } else {
  756. this.recordList = [].concat(this.recordList, list)
  757. }
  758. this.totalRecord = data.pages;
  759. this.totalRecords = data.total;
  760. if (this.staTime && this.endtime) {
  761. this.arriveFilter = `${this.staTime}-${this.endtime}`
  762. }
  763. }).catch(e => {
  764. this.LOADING = false
  765. })
  766. },
  767. //获取顾问列表
  768. getFreeList() {
  769. this.$u.post("/cusLvStatistics/selectAllAccountIdByHouseId", {
  770. houseId: this.buildingID
  771. }).then(res => {
  772. this.freeList = res;
  773. this.freeList.forEach(item => {
  774. item.label = item.name;
  775. item.value = item.accountId
  776. })
  777. this.freeList.unshift({
  778. label: '全部',
  779. value: ''
  780. })
  781. })
  782. },
  783. //select接待顾问
  784. actionSelectCallback(e) {
  785. if (e[0].label == '全部') {
  786. this.counselorName = '接待顾问'
  787. this.screen.agentId = ''
  788. } else {
  789. this.screen.agentId = e[0].value;
  790. this.counselorName = e[0].label
  791. }
  792. this.recordList = [];
  793. this.nextPage = 1;
  794. this.isRefresh = false;
  795. this.getMyCustom();
  796. },
  797. reset() {
  798. this.screen.agentId = ''
  799. this.screen.validInvalid = ''
  800. this.screen.markAdvisor = ''
  801. this.screen.orderBy = '';
  802. this.screen.jiedaiVal = []
  803. this.screen.wajueVal = []
  804. this.screen.wajueVals = []
  805. this.screen.xiaojiangVal = []
  806. this.screen.visitRecord = []
  807. this.screen.marketingBusiness = []
  808. this.sortText = '排序';
  809. this.arriveFilter = '接待时间';
  810. this.staTime = '';
  811. this.endTime = '';
  812. this.nextPage = 1;
  813. this.activeTotal = 5;
  814. this.recordList = [];
  815. this.counselorName = '接待顾问';
  816. this.visitList.forEach(i => {
  817. i.isShow = false
  818. })
  819. this.jiedaiList.forEach(i => {
  820. i.isShow = false
  821. })
  822. this.wajueList.forEach(i => {
  823. i.isShow = false
  824. })
  825. this.xiaojiangList.forEach(i => {
  826. i.isShow = false
  827. })
  828. this.templateList.forEach(i => {
  829. i.isShow = false
  830. })
  831. this.isRefresh = false;
  832. this.getMyCustom();
  833. },
  834. chooseMores() {
  835. let change1 = this.templateList.some(item => item.isShow == true)
  836. let change2 = this.xiaojiangList.some(item => item.isShow == true)
  837. let change3 = this.wajueList.some(item => item.isShow == true)
  838. let change8 = this.wajueLists.some(item => item.isShow == true)
  839. let change4 = this.jiedaiList.some(item => item.isShow == true)
  840. let change5 = this.screen.validInvalid != null && this.screen.validInvalid != ''
  841. let change6 = this.screen.markAdvisor != null && this.screen.markAdvisor != ''
  842. let change7 = this.visitList.some(item => item.isShow == true)
  843. console.log(change1, change2, change3, change4, change5, change6, change7)
  844. if (change1 || change2 || change3 || change4 || change5 || change6 || change7 || change8) {
  845. return true
  846. } else {
  847. return false
  848. }
  849. },
  850. choice(item) {
  851. item.isShow = !item.isShow;
  852. },
  853. // 标记顾问
  854. screenvisitRecord(i) {
  855. if (this.screen.markAdvisor === i) {
  856. this.screen.markAdvisor = ''
  857. } else {
  858. this.screen.markAdvisor = i
  859. }
  860. },
  861. // 录音标识
  862. screenvisivalidInvalid(i) {
  863. if (this.screen.validInvalid == i) {
  864. this.screen.validInvalid = null
  865. } else {
  866. this.screen.validInvalid = i
  867. }
  868. },
  869. screensure() {
  870. this.chooseMore = this.chooseMores()
  871. this.screenShow = false;
  872. this.recordList = [];
  873. this.nextPage = 1;
  874. this.isRefresh = false;
  875. this.getMyCustom();
  876. },
  877. goSearch() {
  878. uni.navigateTo({
  879. url: '/pages/center/records/recordSearch'
  880. });
  881. },
  882. },
  883. filters: {
  884. // 加密手机号
  885. encryption(phone) {
  886. if (!phone) return
  887. return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
  888. }
  889. }
  890. }
  891. </script>
  892. <style lang="scss" scoped>
  893. .box {
  894. width: 100%;
  895. height: 100%;
  896. background: #F8F8F8;
  897. }
  898. .timeview {
  899. height: 90rpx;
  900. line-height: 90rpx;
  901. width: 100%;
  902. text-align: center;
  903. border-bottom: 1rpx solid #F8F8F8;
  904. }
  905. //时间切换的样式
  906. .boxtittab {
  907. position: sticky;
  908. top: var(--window-top);
  909. z-index: 999;
  910. width: 100;
  911. height: 92rpx;
  912. background: #FFFFFF;
  913. display: flex;
  914. align-items: center;
  915. .tabbox {
  916. flex-shrink: 0;
  917. flex-grow: 1;
  918. height: 100%;
  919. text-align: center;
  920. line-height: 92rpx;
  921. color: #666666;
  922. font-size: 28rpx;
  923. overflow: hidden;
  924. text-overflow: ellipsis;
  925. display: -webkit-box;
  926. /* 将对象作为弹性伸缩盒子模型显示 */
  927. -webkit-line-clamp: 1;
  928. /* 控制最多显示几行 */
  929. -webkit-box-orient: vertical;
  930. /* 设置或检索伸缩盒对象的子元素的排列方式 */
  931. }
  932. .activeColor {
  933. font-weight: bold;
  934. color: #2671E2;
  935. }
  936. }
  937. .search-box {
  938. width: 100%;
  939. height: 102rpx;
  940. background: #FFFFFF;
  941. display: flex;
  942. align-items: center;
  943. justify-content: center;
  944. .search {
  945. width: 94%;
  946. height: 70rpx;
  947. display: flex;
  948. align-items: center;
  949. background: #F8F8F8;
  950. border-radius: 33rpx;
  951. .search-img {
  952. width: 26rpx;
  953. height: 30rpx;
  954. margin-left: 20rpx;
  955. .search-img1 {
  956. width: 100%;
  957. height: 100%;
  958. margin-top: 2rpx;
  959. }
  960. }
  961. .search-text {
  962. font-size: 28rpx;
  963. font-weight: 400;
  964. color: #999999;
  965. margin-left: 10rpx;
  966. }
  967. }
  968. .search-screen {
  969. width: 40rpx;
  970. height: 40rpx;
  971. margin-left: 30rpx;
  972. .search-screen1 {
  973. width: 100%;
  974. height: 100%;
  975. }
  976. }
  977. }
  978. .count {
  979. width: 100%;
  980. height: 82rpx;
  981. line-height: 82rpx;
  982. display: flex;
  983. align-items: center;
  984. justify-content: center;
  985. background-color: #f8f8f8;
  986. font-size: 30rpx;
  987. font-family: PingFangSC-Regular, PingFang SC;
  988. font-weight: 400;
  989. color: #333333;
  990. text {
  991. color: #E7483C;
  992. }
  993. }
  994. .content {
  995. .content-tips {
  996. background: #fff;
  997. box-sizing: border-box;
  998. overflow: hidden;
  999. margin-bottom: 20rpx;
  1000. &:last-child {
  1001. margin-bottom: 0
  1002. }
  1003. .content-first {
  1004. padding: 0 30rpx;
  1005. height: 92rpx;
  1006. border-bottom: 1rpx solid #D8D8D8;
  1007. display: flex;
  1008. align-items: center;
  1009. justify-content: space-between;
  1010. .left {
  1011. flex-shrink: 0;
  1012. min-width: 40%;
  1013. display: flex;
  1014. align-items: center;
  1015. overflow: hidden;
  1016. .adviser {
  1017. margin-right: 10rpx;
  1018. padding: 5rpx 11rpx;
  1019. border-radius: 50%;
  1020. border: 1rpx solid #2671E2;
  1021. font-size: 30rpx;
  1022. color: #2671E2;
  1023. }
  1024. .img {
  1025. width: 52rpx;
  1026. height: 52rpx;
  1027. background: #FFFFFF;
  1028. border: 1px solid #C9C9C9;
  1029. border-radius: 50%;
  1030. text-align: center;
  1031. }
  1032. .name {
  1033. color: #333333;
  1034. font-size: 32rpx;
  1035. font-weight: bold;
  1036. }
  1037. .status {
  1038. margin-left: 19rpx;
  1039. width: 110rpx;
  1040. background: #FFF9F5;
  1041. border-radius: 4rpx;
  1042. font-size: 26rpx;
  1043. font-weight: 400;
  1044. color: #EC8D49;
  1045. text-align: center;
  1046. }
  1047. }
  1048. .right {
  1049. flex: 1;
  1050. display: flex;
  1051. font-size: 30rpx;
  1052. justify-content: flex-end;
  1053. view,
  1054. text {
  1055. flex-shrink: 0;
  1056. }
  1057. .point {
  1058. flex-shrink: 0;
  1059. width: 12rpx;
  1060. height: 12rpx;
  1061. background: #2B6EFF;
  1062. border-radius: 50%;
  1063. margin-right: 9rpx;
  1064. margin-top: 16rpx;
  1065. }
  1066. }
  1067. }
  1068. .content-sec {
  1069. padding: 28rpx 30rpx 32rpx;
  1070. display: flex;
  1071. justify-content: space-between;
  1072. .left {
  1073. display: flex;
  1074. align-items: center;
  1075. .adviser {
  1076. margin-right: 10rpx;
  1077. padding: 5rpx 11rpx;
  1078. border-radius: 50%;
  1079. border: 1rpx solid #2671E2;
  1080. background: #2671E2;
  1081. font-size: 30rpx;
  1082. color: #fff;
  1083. }
  1084. .cus {
  1085. font-size: 30rpx;
  1086. font-weight: 400;
  1087. color: #333;
  1088. overflow: hidden;
  1089. text-overflow: ellipsis;
  1090. display: -webkit-box;
  1091. line-height: 23px;
  1092. max-height: 46px;
  1093. -webkit-line-clamp: 1;
  1094. -webkit-box-orient: vertical;
  1095. }
  1096. .arriveNum {
  1097. font-size: 30rpx;
  1098. font-weight: 400;
  1099. margin-left: 10rpx;
  1100. }
  1101. }
  1102. .right {
  1103. font-size: 28rpx;
  1104. font-weight: 400;
  1105. display: flex;
  1106. align-items: center;
  1107. }
  1108. }
  1109. .content-newadd {
  1110. padding: 0 30rpx 34rpx;
  1111. display: flex;
  1112. align-items: center;
  1113. justify-content: space-between;
  1114. font-size: 30rpx;
  1115. color: #333;
  1116. }
  1117. .content-last {
  1118. padding: 0 30rpx 34rpx;
  1119. font-size: 30rpx;
  1120. font-weight: 400;
  1121. color: #666666;
  1122. display: flex;
  1123. align-items: center;
  1124. justify-content: space-between;
  1125. .c-items {
  1126. flex-shrink: 0;
  1127. display: flex;
  1128. align-items: center;
  1129. font-size: 28rpx;
  1130. .c-items-img {
  1131. margin-right: 10rpx;
  1132. width: 32rpx;
  1133. height: 32rpx;
  1134. }
  1135. }
  1136. }
  1137. }
  1138. }
  1139. // 这是弹出层
  1140. .screen {
  1141. width: 750rpx;
  1142. .screen-counselor {
  1143. display: flex;
  1144. height: 106rpx;
  1145. padding: 0 30rpx;
  1146. box-sizing: border-box;
  1147. border-bottom: 1px solid #EEEEEE;
  1148. .screen-text {
  1149. margin: 40rpx 0 36rpx 0;
  1150. font-size: 30rpx;
  1151. font-weight: 400;
  1152. color: #333333;
  1153. line-height: 30rpx;
  1154. }
  1155. .screen-sel {
  1156. display: flex;
  1157. justify-content: space-between;
  1158. width: 500rpx;
  1159. margin-left: 60rpx;
  1160. .screen-sel-img {
  1161. margin: 40rpx 0 36rpx 0;
  1162. width: 14rpx;
  1163. height: 30rpx;
  1164. }
  1165. .screen-inp {
  1166. margin-top: 20rpx;
  1167. }
  1168. }
  1169. }
  1170. .screen-record {
  1171. overflow: hidden;
  1172. padding: 0 30rpx;
  1173. box-sizing: border-box;
  1174. border-bottom: 1px solid #e0e0e0;
  1175. .screen-record-text {
  1176. padding: 30rpx 0;
  1177. font-size: 30rpx;
  1178. font-weight: 600;
  1179. color: #333333;
  1180. line-height: 30rpx;
  1181. display: flex;
  1182. align-items: center;
  1183. justify-content: space-between;
  1184. .arrow {
  1185. width: 30rpx;
  1186. height: 14rpx;
  1187. }
  1188. }
  1189. .screen-record-tab {
  1190. margin-top: 30rpx;
  1191. padding-bottom: 10rpx;
  1192. display: flex;
  1193. flex-wrap: wrap;
  1194. .screen-record-item {
  1195. min-width: 150rpx;
  1196. padding: 0 14rpx;
  1197. height: 60rpx;
  1198. border-radius: 8rpx;
  1199. text-align: center;
  1200. line-height: 60rpx;
  1201. margin: 0 22rpx 22rpx 0;
  1202. &:nth-child(4n) {
  1203. margin-right: 0;
  1204. }
  1205. }
  1206. .screen-record-chose {
  1207. background: #F1F6FD;
  1208. color: #2671E2;
  1209. }
  1210. .screen-record-nochose {
  1211. background: #F7F8FA;
  1212. color: #333;
  1213. }
  1214. }
  1215. }
  1216. .screen-foot {
  1217. width: 100%;
  1218. height: 78rpx;
  1219. display: flex;
  1220. margin: 30rpx 30rpx 0;
  1221. .screen-foot-reset {
  1222. width: 176rpx;
  1223. height: 78rpx;
  1224. line-height: 78rpx;
  1225. background: #FFFFFF;
  1226. border-radius: 8rpx;
  1227. border: 1px solid #2671E2;
  1228. margin-right: 30rpx;
  1229. font-size: 30rpx;
  1230. font-family: PingFangSC-Regular, PingFang SC;
  1231. font-weight: 400;
  1232. color: #2671E2;
  1233. text-align: center;
  1234. }
  1235. .screen-foot-sure {
  1236. width: 484rpx;
  1237. height: 78rpx;
  1238. line-height: 78rpx;
  1239. background: #2671E2;
  1240. border: 1px solid #2671E2;
  1241. border-radius: 8rpx;
  1242. font-size: 30rpx;
  1243. font-family: PingFangSC-Regular, PingFang SC;
  1244. font-weight: 400;
  1245. color: #FFFFFF;
  1246. text-align: center;
  1247. }
  1248. }
  1249. }
  1250. </style>