您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

798 行
21 KiB

  1. <template>
  2. <div class="box-center">
  3. <!-- <div class="add-button">
  4. <el-button type="primary">筛选</el-button>
  5. </div> -->
  6. <div class="booxtop">
  7. <div class="app-topbox">
  8. <div class="div-labox" v-if="orgType != 3">
  9. <div class="labeltext">楼盘选择:</div>
  10. <el-select
  11. class="div-inpbox"
  12. v-model="searchForm.projectId"
  13. @change="houseChange"
  14. placeholder="请选择"
  15. filterable
  16. >
  17. <el-option
  18. v-for="item in houseList"
  19. :key="item.id"
  20. :label="item.propertyName"
  21. :value="item.id"
  22. >
  23. </el-option>
  24. </el-select>
  25. </div>
  26. <div class="div-labox">
  27. <div class="labeltext">
  28. <!-- 时间: -->
  29. <el-select
  30. v-model="searchForm.timeType"
  31. @change="houseChange"
  32. placeholder="请选择"
  33. style="width: 125px"
  34. >
  35. <el-option
  36. v-for="item in timeTypeList"
  37. :key="item.value"
  38. :label="item.label"
  39. :value="item.value"
  40. >
  41. </el-option>
  42. </el-select>
  43. </div>
  44. <div class="toptimeqhuan">
  45. <el-button
  46. class="btn"
  47. :type="searchForm.dateType == null ? 'primary' : ''"
  48. @click="tabtimetap(null)"
  49. >
  50. 全部
  51. </el-button>
  52. <el-button
  53. class="btn"
  54. :type="searchForm.dateType == 0 ? 'primary' : ''"
  55. @click="tabtimetap(0)"
  56. >
  57. 今日
  58. </el-button>
  59. <el-button
  60. class="btn"
  61. :type="searchForm.dateType == 2 ? 'primary' : ''"
  62. @click="tabtimetap(2)"
  63. >
  64. 近7天
  65. </el-button>
  66. <el-button
  67. class="btn"
  68. :type="searchForm.dateType == 6 ? 'primary' : ''"
  69. @click="tabtimetap(6)"
  70. >
  71. 近30天
  72. </el-button>
  73. </div>
  74. <el-date-picker
  75. v-model="time"
  76. type="daterange"
  77. class="div-inpbox"
  78. range-separator="-"
  79. start-placeholder="开始日期"
  80. :default-time="['00:00:00', '23:59:59']"
  81. value-format="yyyy-MM-dd"
  82. end-placeholder="结束日期"
  83. @change="timeChange"
  84. >
  85. </el-date-picker>
  86. </div>
  87. </div>
  88. <div class="app-topbox">
  89. <div class="div-labox">
  90. <div class="labeltext">客户名称:</div>
  91. <el-input
  92. class="div-inpbox"
  93. maxlength="10"
  94. clearable
  95. v-model="searchForm.name"
  96. ></el-input>
  97. </div>
  98. <div class="div-labox">
  99. <div class="labeltext">置业顾问:</div>
  100. <el-select
  101. v-model="searchForm.accountId"
  102. clearable
  103. filterable
  104. placeholder="请选择"
  105. class="div-inpbox"
  106. >
  107. <el-option
  108. v-for="item in accountList"
  109. :key="item.accountId"
  110. :label="item.name"
  111. :value="item.accountId"
  112. >
  113. </el-option>
  114. </el-select>
  115. </div>
  116. <div class="div-labox">
  117. <div class="labeltext">画像标签:</div>
  118. <el-select
  119. class="div-inpbox"
  120. multiple
  121. clearable
  122. filterable
  123. collapse-tags
  124. v-model="searchForm.keywordsId"
  125. placeholder="请选择"
  126. >
  127. <el-option
  128. v-for="item in keywordsList"
  129. :key="item.keywordsId"
  130. :label="
  131. item.isInterval == 0
  132. ? item.name + '-' + item.endName + item.unit
  133. : item.name
  134. "
  135. :value="item.keywordsId"
  136. >
  137. </el-option>
  138. </el-select>
  139. </div>
  140. <div class="div-labox">
  141. <div class="labeltext">客户等级:</div>
  142. <el-select
  143. v-model="searchForm.level"
  144. clearable
  145. filterable
  146. placeholder="请选择"
  147. class="div-inpbox"
  148. >
  149. <el-option
  150. v-for="item in levelList"
  151. :key="item.value"
  152. :label="item.label"
  153. :value="item.value"
  154. >
  155. </el-option>
  156. </el-select>
  157. </div>
  158. <div class="div-labox">
  159. <div class="labeltext">接待时长:</div>
  160. <el-select
  161. clearable
  162. filterable
  163. v-model="searchForm.recDurationInterval"
  164. placeholder="请选择"
  165. class="div-inpbox"
  166. >
  167. <el-option
  168. v-for="item in options3"
  169. :key="item.value"
  170. :label="item.label"
  171. :value="item.value"
  172. >
  173. </el-option>
  174. </el-select>
  175. </div>
  176. <div class="div-labox">
  177. <div class="labeltext">到访次数:</div>
  178. <el-select
  179. v-model="searchForm.visitRecord"
  180. clearable
  181. filterable
  182. placeholder="请选择"
  183. class="div-inpbox"
  184. >
  185. <el-option
  186. v-for="item in options4"
  187. :key="item.value"
  188. :label="item.label"
  189. :value="item.value"
  190. >
  191. </el-option>
  192. </el-select>
  193. </div>
  194. <div class="div-labox">
  195. <div class="labeltext">客户阶段:</div>
  196. <el-select
  197. v-model="searchForm.clientStage"
  198. clearable
  199. filterable
  200. placeholder="请选择"
  201. class="div-inpbox"
  202. >
  203. <el-option
  204. v-for="item in clientStagelist"
  205. :key="item.id"
  206. :label="item.stageName"
  207. :value="item.id"
  208. >
  209. </el-option>
  210. </el-select>
  211. </div>
  212. <div class="div-labox">
  213. <div class="labeltext">排序:</div>
  214. <el-select
  215. v-model="searchForm.orderBy"
  216. clearable
  217. filterable
  218. placeholder="请选择"
  219. class="div-inpbox"
  220. >
  221. <el-option
  222. v-for="item in orderList"
  223. :key="item.value"
  224. :label="item.label"
  225. :value="item.value"
  226. >
  227. </el-option>
  228. </el-select>
  229. </div>
  230. <div class="div-labox">
  231. <div class="labeltext">违禁标签:</div>
  232. <el-select
  233. v-model="searchForm.sensitiveWords"
  234. multiple
  235. clearable
  236. filterable
  237. collapse-tags
  238. placeholder="请选择"
  239. class="div-inpbox"
  240. >
  241. <el-option
  242. v-for="item in sensitiveList"
  243. :key="item.id"
  244. :label="item.words"
  245. :value="item.words"
  246. >
  247. </el-option>
  248. </el-select>
  249. </div>
  250. </div>
  251. <div class="app-topbox">
  252. <div class="div-labox">
  253. <div class="labeltext"></div>
  254. <el-button type="primary" @click="screen">筛选</el-button>
  255. <el-button @click="clearScreen">清空筛选条件</el-button>
  256. </div>
  257. <div
  258. style="margin-left: auto; margin-right: 10px"
  259. v-if="cus_index_downLoad"
  260. >
  261. <el-button @click="downLoad">导出</el-button>
  262. </div>
  263. </div>
  264. </div>
  265. <!-- 表格 -->
  266. <div class="cen-tab">
  267. <el-table :data="tableData" stripe style="width: 100%">
  268. <el-table-column type="index" label="序号" align="center">
  269. </el-table-column>
  270. <el-table-column prop="name" label="客户" align="center">
  271. </el-table-column>
  272. <el-table-column
  273. prop="phone"
  274. label="联系电话"
  275. width="150"
  276. align="center"
  277. >
  278. </el-table-column>
  279. <el-table-column
  280. prop="agentName"
  281. label="置业顾问"
  282. width="110"
  283. align="center"
  284. >
  285. </el-table-column>
  286. <el-table-column prop="level" label="客户等级" align="center">
  287. <template slot-scope="{ row }">
  288. {{
  289. row.level == 1
  290. ? "A"
  291. : row.level == 2
  292. ? "B"
  293. : row.level == 3
  294. ? "C"
  295. : row.level == 4
  296. ? "D"
  297. : ""
  298. }}
  299. </template>
  300. </el-table-column>
  301. <el-table-column prop="clientStageName" label="客户阶段" align="center">
  302. <template slot-scope="{ row }">
  303. {{ row.clientStageName || "--" }}
  304. </template>
  305. </el-table-column>
  306. <el-table-column prop="visitRecord" label="到访次数" align="center">
  307. <template slot-scope="{ row }">
  308. {{ row.visitRecord || "0" }}
  309. </template>
  310. </el-table-column>
  311. <el-table-column prop="mm" label="接待时长" align="center">
  312. </el-table-column>
  313. <el-table-column prop="fraction" label="销讲执行率" align="center">
  314. <template slot-scope="{ row }"> {{ row.fraction || "0" }}% </template>
  315. </el-table-column>
  316. <el-table-column
  317. prop="updateTime"
  318. label="添加时间"
  319. width="200"
  320. align="center"
  321. >
  322. </el-table-column>
  323. <el-table-column
  324. prop="createTime"
  325. label="最近到访时间"
  326. width="200"
  327. align="center"
  328. >
  329. <template slot-scope="{ row }">
  330. {{ row.createTime || "暂无" }}
  331. </template>
  332. </el-table-column>
  333. <el-table-column label="操作" align="center" width="250" fixed="right">
  334. <template slot-scope="{ row }">
  335. <!-- <el-button type="text" v-if="cus_index_detail">客户详情</el-button> -->
  336. <el-button
  337. type="text"
  338. @click="Receivedetailsabout(row)"
  339. v-if="cus_index_visit"
  340. >接待详情</el-button
  341. >
  342. <!-- <el-button type="text">更多</el-button> -->
  343. <el-button type="text" @click="tranfser(row)" v-if="cus_index_take"
  344. >转交</el-button
  345. >
  346. <!-- <el-button type="text" v-if="cus_index_del">删除</el-button> -->
  347. </template>
  348. </el-table-column>
  349. </el-table>
  350. <div style="display: flex; justify-content: flex-end; margin-top: 10px">
  351. <el-pagination
  352. @size-change="handleSizeChange"
  353. @current-change="handleCurrentChange"
  354. :current-page="currentPage"
  355. :page-sizes="[10, 30, 50]"
  356. :page-size="size"
  357. layout="total, sizes, prev, pager, next, jumper"
  358. :total="total"
  359. >
  360. </el-pagination>
  361. </div>
  362. </div>
  363. </div>
  364. </template>
  365. <script>
  366. import { mapGetters } from "vuex";
  367. import { exportMethodPost } from "@/util/util";
  368. export default {
  369. data() {
  370. return {
  371. TimetoAhoose: 2,
  372. time: [],
  373. houseList: [],
  374. options: [],
  375. keywordsList: [],
  376. accountList: [],
  377. orderList: [
  378. {
  379. value: "1",
  380. label: "创建时间倒叙",
  381. },
  382. {
  383. value: "2",
  384. label: "创建时间正序",
  385. },
  386. {
  387. value: "3",
  388. label: "接待时间倒叙",
  389. },
  390. {
  391. value: "4",
  392. label: "接待时间正序",
  393. },
  394. {
  395. value: "5",
  396. label: "执行率正序",
  397. },
  398. {
  399. value: "6",
  400. label: "执行率倒叙",
  401. },
  402. {
  403. value: "7",
  404. label: "接访次数正序",
  405. },
  406. {
  407. value: "8",
  408. label: "接访次数倒叙",
  409. },
  410. ],
  411. levelList: [
  412. {
  413. value: "1",
  414. label: "A",
  415. },
  416. {
  417. value: "2",
  418. label: "B",
  419. },
  420. {
  421. value: "3",
  422. label: "C",
  423. },
  424. {
  425. value: "4",
  426. label: "D",
  427. },
  428. ],
  429. options3: [
  430. {
  431. value: "1",
  432. label: "0-15分钟",
  433. },
  434. {
  435. value: "2",
  436. label: "15-30分钟",
  437. },
  438. {
  439. value: "3",
  440. label: "30-60分钟",
  441. },
  442. {
  443. value: "4",
  444. label: "60-90分钟",
  445. },
  446. {
  447. value: "5",
  448. label: "90分钟以上",
  449. },
  450. ],
  451. options4: [
  452. {
  453. value: "1",
  454. label: "首次到访",
  455. },
  456. {
  457. value: "2",
  458. label: "2次到访",
  459. },
  460. {
  461. value: "3",
  462. label: "3次到访",
  463. },
  464. {
  465. value: "4",
  466. label: "三次以上",
  467. },
  468. ],
  469. timeTypeList: [
  470. {
  471. value: "0",
  472. label: "添加时间",
  473. },
  474. {
  475. value: "1",
  476. label: "最近到访时间",
  477. },
  478. ],
  479. options5: [
  480. {
  481. value: null,
  482. label: "全部",
  483. },
  484. {
  485. value: "1",
  486. label: "已标注",
  487. },
  488. {
  489. value: "2",
  490. label: "未标注",
  491. },
  492. ],
  493. currentPage: 1,
  494. size: 10,
  495. total: 10,
  496. value: "",
  497. input: "",
  498. tableData: [],
  499. tophove: "",
  500. orgType: localStorage.getItem("orgType"),
  501. type: "0",
  502. searchForm: {
  503. name: "",
  504. keywordsId: [],
  505. markAdvisor: null,
  506. level: "",
  507. recDurationInterval: "",
  508. visitRecord: "",
  509. staDate: "",
  510. endDate: "",
  511. dateType: null,
  512. projectId: "",
  513. timeType: "0",
  514. clientStage: "",
  515. orderBy:'',
  516. sensitiveWords:[],
  517. },
  518. clientStagelist: [],
  519. sensitiveList:[],//违禁词
  520. };
  521. },
  522. computed: {
  523. ...mapGetters(["permissions"]),
  524. },
  525. created() {
  526. this.cus_index_detail = this.permissions["cus_index_detail"];
  527. this.cus_index_take = this.permissions["cus_index_take"];
  528. this.cus_index_del = this.permissions["cus_index_del"];
  529. this.cus_index_visit = this.permissions["cus_index_visit"];
  530. this.cus_index_downLoad = this.permissions["cus_index_downLoad"];
  531. },
  532. mounted() {
  533. // 获取楼盘列表
  534. this.zkhousePage();
  535. },
  536. methods: {
  537. downLoad() {
  538. // this.searchForm
  539. exportMethodPost(
  540. "autoSR/customer/customerManagementExport",
  541. "客户管理",
  542. this.searchForm
  543. );
  544. },
  545. // 跳转接待详情
  546. Receivedetailsabout(row) {
  547. this.$api.http.findByCusIdcusId({ cusId: row.id }).then((res) => {
  548. if (res.data.length == 0) {
  549. this.$message({
  550. message: "无录音",
  551. type: "warning",
  552. });
  553. } else {
  554. this.$router.push({
  555. path: "/Receive/index",
  556. query: { flag: row.id, AudioIdx: 0 },
  557. });
  558. }
  559. });
  560. },
  561. // 转交
  562. tranfser(row) {
  563. console.log(row);
  564. },
  565. // 接待记录列表
  566. findbypage() {
  567. let obj = {
  568. current: this.currentPage,
  569. size: this.size,
  570. ...this.searchForm,
  571. };
  572. obj.keywordIds = obj.keywordsId.join(",");
  573. obj.sensitiveWords = JSON.stringify(obj.sensitiveWords);
  574. (obj.dateType = this.searchForm.staDate
  575. ? null
  576. : this.searchForm.dateType),
  577. this.$api.api.customerManagement(obj).then((res) => {
  578. // console.log(res)
  579. this.tableData = res.data.records;
  580. this.total = res.data.total;
  581. });
  582. },
  583. clearScreen() {
  584. this.currentPage = 1;
  585. this.searchForm = {
  586. name: "",
  587. keywordsId: [],
  588. markAdvisor: null,
  589. level: "",
  590. recDurationInterval: "",
  591. visitRecord: "",
  592. staDate: "",
  593. endDate: "",
  594. dateType: null,
  595. searchForm: "",
  596. timeType: "0",
  597. orderBy:'',
  598. sensitiveWords:[],
  599. projectId:
  600. this.orgType == 3
  601. ? localStorage.getItem("houseId")
  602. : this.houseList[0].id,
  603. };
  604. this.findbypage();
  605. },
  606. houseChange() {
  607. this.searchForm.sensitiveWords=[]
  608. this.searchForm.keywordsId=[]
  609. this.findbypage();
  610. this.findKeywords();
  611. // 获取置业顾问列表
  612. this.findUserListByHouseId();
  613. this.getclientStage();
  614. // 获取违禁词
  615. this.sensitivewordsList()
  616. },
  617. // 违禁词
  618. sensitivewordsList(){
  619. let obj = {
  620. houseId: this.searchForm.projectId,
  621. };
  622. this.$api.api.sensitivewordsList(obj).then((res) => {
  623. console.log(res,'suhju')
  624. this.sensitiveList = res.data;
  625. });
  626. },
  627. getclientStage() {
  628. let obj = {
  629. houseId: this.searchForm.projectId,
  630. };
  631. this.$api.api.lifeTrackDefineList(obj).then((res) => {
  632. this.clientStagelist = res.data;
  633. });
  634. },
  635. timeChange(e) {
  636. this.searchForm.dateType = null;
  637. this.searchForm.staDate = e[0];
  638. this.searchForm.endDate = e[1];
  639. this.houseChange();
  640. },
  641. screen() {
  642. this.currentPage = 1;
  643. this.findbypage();
  644. },
  645. findKeywords() {
  646. this.$api.api
  647. .findKeywords({
  648. dateType: this.searchForm.staDate ? null : this.searchForm.dateType,
  649. statDateStart: this.searchForm.staDate,
  650. statDateEnd: this.searchForm.endDate,
  651. projectId: this.searchForm.projectId,
  652. type: this.type,
  653. })
  654. .then((res) => {
  655. this.keywordsList = res.data;
  656. });
  657. },
  658. zkhousePage() {
  659. this.$api.api
  660. .findHouseByUser({
  661. orgType: localStorage.getItem("orgType"),
  662. })
  663. .then((res) => {
  664. this.houseList = res.data;
  665. if (localStorage.getItem("orgType") == 3) {
  666. this.searchForm.projectId = localStorage.getItem("houseId");
  667. } else {
  668. this.searchForm.projectId = res.data[0].id;
  669. }
  670. this.houseChange();
  671. });
  672. },
  673. // 置业顾问列表
  674. async findUserListByHouseId() {
  675. let result = await this.$api.api.findUserListByHouseId({
  676. orgType: localStorage.getItem("orgType"),
  677. projectId: this.searchForm.projectId,
  678. });
  679. this.accountList = result.data;
  680. },
  681. handleSizeChange(val) {
  682. console.log(`每页 ${val} 条`);
  683. this.size = val;
  684. this.findbypage();
  685. },
  686. handleCurrentChange(val) {
  687. console.log(`当前页: ${val}`);
  688. this.currentPage = val;
  689. this.findbypage();
  690. },
  691. tabtimetap(idx) {
  692. this.searchForm.staDate = "";
  693. this.searchForm.endDate = "";
  694. // this.$set(this, "time", null);
  695. this.searchForm.dateType = idx;
  696. this.houseChange();
  697. },
  698. timestampToTime(timestamp) {
  699. var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
  700. var yyyy = date.getFullYear() + "-";
  701. var MM =
  702. (date.getMonth() + 1 < 10
  703. ? "0" + (date.getMonth() + 1)
  704. : date.getMonth() + 1) + "-";
  705. // var dd = date.getDate() + ' ';
  706. var dd =
  707. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  708. return yyyy + MM + dd;
  709. },
  710. },
  711. };
  712. </script>
  713. <style scoped="scoped" lang="scss" >
  714. .box-center {
  715. width: 98%;
  716. margin: 0 auto;
  717. margin-top: 6px;
  718. padding: 16px;
  719. min-width: 1000px;
  720. padding-bottom: 20px;
  721. background: #ffffff;
  722. border-radius: 4px;
  723. font-size: 14px;
  724. }
  725. .booxtop {
  726. width: 100%;
  727. padding-bottom: 20px;
  728. background: #f7f8fa;
  729. border-radius: 2px;
  730. margin-top: 0px;
  731. padding-right: 20px;
  732. .app-topbox {
  733. width: 100%;
  734. display: flex;
  735. align-items: center;
  736. flex-wrap: wrap;
  737. .div-labox {
  738. margin-right: 40px;
  739. margin-top: 20px;
  740. height: 32px;
  741. display: flex;
  742. align-items: center;
  743. .labeltext {
  744. min-width: 85px;
  745. text-align: right;
  746. line-height: 32px;
  747. }
  748. .div-inpbox {
  749. width: 220px;
  750. }
  751. .toptimeqhuan {
  752. height: 30px;
  753. display: flex;
  754. align-items: center;
  755. margin-left: 20px;
  756. }
  757. .toptimeqhuan div {
  758. padding-left: 20px;
  759. padding-right: 20px;
  760. text-align: center;
  761. line-height: 30px;
  762. font-size: 14px;
  763. margin-right: 15px;
  764. border-radius: 4px;
  765. border: 1px solid #e0e0e0;
  766. }
  767. .toptimeqhuan .btn {
  768. padding-left: 20px;
  769. padding-right: 20px;
  770. text-align: center;
  771. // line-height: 30px;
  772. font-size: 14px;
  773. margin-right: 15px;
  774. border-radius: 4px;
  775. border: 1px solid #e0e0e0;
  776. }
  777. }
  778. }
  779. }
  780. .cen-tab {
  781. width: 100%;
  782. padding: 15px;
  783. margin-top: 15px;
  784. }
  785. .tophove {
  786. color: #ffffff;
  787. background: #2671e2;
  788. }
  789. </style>