From 7d677e3c8d06a402d3413c6d04c16f46ea153dd8 Mon Sep 17 00:00:00 2001 From: douzhuo <17611323298@163.com> Date: Fri, 6 Jan 2023 17:26:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/http.js | 23 +++- src/views/Customer/index.vue | 154 +++++++++++++++++++-------- src/views/Customer/table.js | 5 + src/views/ReceivingRecords/index.vue | 40 ++++++- src/views/ReceivingRecords/table.js | 6 ++ src/views/Template/Pinspeakwords.vue | 19 ++++ src/views/Template/table.js | 13 ++- vue.config.js | 5 +- 8 files changed, 215 insertions(+), 50 deletions(-) diff --git a/src/api/modules/http.js b/src/api/modules/http.js index 56cc2ff..b457a65 100644 --- a/src/api/modules/http.js +++ b/src/api/modules/http.js @@ -911,4 +911,25 @@ export function updateRead(params) { method: 'get', params }) -} \ No newline at end of file +} + + +// 获取销讲业务模板 +export function marketingBusiness(params) { + return request({ + url: 'autoSR/api/customer/marketingBusiness', + method: 'get', + params + }) +} + + +// 检测销讲模板名称是否重复 +export function findByRepetitionName(params) { + return request({ + url: 'autoSR/template/findByRepetitionName', + method: 'get', + params + }) +} + diff --git a/src/views/Customer/index.vue b/src/views/Customer/index.vue index 74ff414..8f93966 100644 --- a/src/views/Customer/index.vue +++ b/src/views/Customer/index.vue @@ -22,13 +22,13 @@
-
+
+
+
销讲业务:
+ + + + +
@@ -250,23 +270,33 @@ 筛选 清空筛选条件 - - {{isOpen?'收起':'展开'}} - + {{ isOpen ? "收起" : "展开" + }}
批量转交 - 导出 + 导出
-
-
- +
员工:
- + { + console.log(res); + if (res.code == 10000) { + this.templateList = res.data; + } + }); + }, + // 获取当前页面的显隐 setTableOption() { this.$db.getDataByKey(this.tableIdName).then((res) => { @@ -537,11 +595,11 @@ export default { } }); }, - isSystoleForm(){ - this.isOpen = !this.isOpen + isSystoleForm() { + this.isOpen = !this.isOpen; }, toCustomer() { - this.$router.push('/Customer/CustomerDetail') + this.$router.push("/Customer/CustomerDetail"); }, // 批量转交按钮点击事件 transfer() { @@ -561,12 +619,12 @@ export default { tranfser(row) { console.log(row); this.dialogVisible = true; - this.selectMoreIds = row.id; + this.selectMoreIds = row.id; }, // 转移客户至其他顾问 theCirculation(query) { - console.log(query) + console.log(query); this.$api.http.theCirculation(query).then((res) => { if (res.code == 0) { this.$message({ @@ -632,8 +690,9 @@ export default { size: this.page.pageSize, ...this.searchForm, }; + obj.marketingBusiness = obj.marketingBusiness.join(',') obj.keywordIds = obj.keywordsId.join(","); - console.log(obj, '入参') + console.log(obj, "入参"); obj.sensitiveWords = JSON.stringify(obj.sensitiveWords); (obj.dateType = this.searchForm.staDate ? null @@ -642,7 +701,7 @@ export default { // console.log(res) this.tableData = res.data.records; this.page.total = res.data.total; - + // 表格中设置ref属性,在数据渲染之后或者updated()之后 this.$nextTick(() => { this.$refs.crud.doLayout(); @@ -662,6 +721,7 @@ export default { endDate: "", dateType: null, searchForm: "", + marketingBusiness: [], timeType: "0", orderBy: "", sensitiveWords: [], @@ -675,6 +735,9 @@ export default { houseChange() { this.searchForm.sensitiveWords = []; this.searchForm.keywordsId = []; + this.searchForm.marketingBusiness = []; + // 获取销讲业务 + this.getMarketingBusiness(); this.findbypage(); this.findKeywords(); // 获取置业顾问列表 @@ -738,6 +801,9 @@ export default { this.searchForm.projectId = res.data[0].id; } this.houseChange(); + + // 获取销讲业务 + this.getMarketingBusiness(); }); }, // 置业顾问列表 @@ -854,27 +920,27 @@ export default { color: #ffffff; background: #2671e2; } -/deep/ .el-table__header-wrapper{ - thead{ - tr{ - th{ - background: #F5F7FA; +/deep/ .el-table__header-wrapper { + thead { + tr { + th { + background: #f5f7fa; color: #333333; } } } } -/deep/ .el-dialog--center{ +/deep/ .el-dialog--center { border-radius: 8px; - .el-dialog__title{ + .el-dialog__title { font-weight: bold; } } -/deep/ .el-button--primary{ - background: #2671E2 !important; - border: 1px solid #2671E2 !important; +/deep/ .el-button--primary { + background: #2671e2 !important; + border: 1px solid #2671e2 !important; } -/deep/ .el-button--text{ - color: #2671E2; +/deep/ .el-button--text { + color: #2671e2; } diff --git a/src/views/Customer/table.js b/src/views/Customer/table.js index e12fe18..f8d6fdf 100644 --- a/src/views/Customer/table.js +++ b/src/views/Customer/table.js @@ -284,6 +284,11 @@ export default { prop: "mm", width: '100px', }, + { + label: "销讲业务", + prop: "marketingBusinessName", + width: '100px', + }, { sortable: true, label: "销讲执行率", diff --git a/src/views/ReceivingRecords/index.vue b/src/views/ReceivingRecords/index.vue index f5002c6..19fc919 100644 --- a/src/views/ReceivingRecords/index.vue +++ b/src/views/ReceivingRecords/index.vue @@ -257,6 +257,26 @@ > +
+
销讲业务:
+ + + + +
@@ -473,11 +493,14 @@ export default { taboo: "", zfal: "", // 正反案例 0:正面案例 1:反面案例 validInvalid: "", // 是否为有效接待 0:有效 1:无效 + marketingBusiness: [], }, rec_index_show: false, // 按钮权限 rec_index_text: false, // 按钮权限 rec_index_voice: false, // 按钮权限 rec_index_downLoad: false, // 按钮权限 + + templateList: [], // 销讲业务列表 }; }, computed: { @@ -599,6 +622,17 @@ export default { }, methods: { + // 获取销讲业务 + getMarketingBusiness() { + this.$api.http + .marketingBusiness({ houseId: this.searchForm.projectId }) + .then((res) => { + console.log(res); + if (res.code == 10000) { + this.templateList = res.data; + } + }); + }, // 获取当前页面的显隐 setTableOption() { this.$db.getDataByKey(this.tableIdName).then((res) => { @@ -660,6 +694,7 @@ export default { obj.projectId = this.$route.query.houseId; } obj.keywordIds = obj.keywordsId.join(","); + obj.marketingBusiness = obj.marketingBusiness.join(',') obj.dateType = this.searchForm.staDate ? null : this.searchForm.dateType; this.$api.api.findbypage(obj).then((res) => { console.log(res); @@ -685,6 +720,7 @@ export default { houseType: "", dateType: null, taboo: "", + marketingBusiness: [], zfal: "", // projectId: this.houseList[0].id, projectId: @@ -754,6 +790,9 @@ export default { this.searchForm.projectId = res.data[0].id; } this.houseChange(); + + // 获取销讲业务 + this.getMarketingBusiness(); }); }, // 置业顾问列表 @@ -817,7 +856,6 @@ export default { } }, - showColumn(nowV) { let params = { tableIdName: this.tableIdName, diff --git a/src/views/ReceivingRecords/table.js b/src/views/ReceivingRecords/table.js index 911f846..503beca 100644 --- a/src/views/ReceivingRecords/table.js +++ b/src/views/ReceivingRecords/table.js @@ -59,10 +59,16 @@ export default { } }, + { + label: "销讲业务", + prop: "marketingBusinessName", + }, + { sortable: true, label: "画像标签触达次数", prop: "total", + width: '150px', }, { diff --git a/src/views/Template/Pinspeakwords.vue b/src/views/Template/Pinspeakwords.vue index fc408a6..fac4b94 100644 --- a/src/views/Template/Pinspeakwords.vue +++ b/src/views/Template/Pinspeakwords.vue @@ -204,6 +204,7 @@ maxlength="16" show-word-limit clearable + @blur="findByRepetitionName" >
@@ -429,6 +430,22 @@ export default { }, }, methods: { + // 检测模板名称 + findByRepetitionName() { + this.$api.http + .findByRepetitionName({ + name: this.inparams.templateName, + houseId: this.houseId, + }) + .then((res) => { + if (res.code != 0) { + this.$message({ + message: res.msg, + type: "warning", + }); + } + }); + }, // 项目选择 selectChange(e) { this.houseId = e; @@ -515,11 +532,13 @@ export default { tempId: this.Templateid, }; this.$api.http.templatedelfindByTempId(parmest).then((res) => { + console.log(res.data, "res.data"); this.houseId = res.data.houseId; this.checklist = res.data.list; this.nodelist = res.data.list; this.inparams.templateName = res.data.templateName; this.inparams.defaultTemplate = res.data.defaultTemplate; + console.log(this.inparams); this.getHouse2(); this.checklist.forEach((item) => { this.rateMap.set(item.id, item.fraction); // map维护分数 diff --git a/src/views/Template/table.js b/src/views/Template/table.js index 7b80bf5..7980bd8 100644 --- a/src/views/Template/table.js +++ b/src/views/Template/table.js @@ -30,11 +30,22 @@ export default { if(data.status == 1) return '停用' } }, + { + label: "模板名称", + prop: "templateName", + }, + { + label: "默认话术", + prop: "defaultTemplate", + formatter: (data) => { + if(data.defaultTemplate == 0) return '是' + if(data.defaultTemplate == 1) return '否' + } + }, { label: "大类个数", prop: "count", }, - { label: "创建时间", prop: "createTime", diff --git a/vue.config.js b/vue.config.js index 49b7ff2..884fc33 100644 --- a/vue.config.js +++ b/vue.config.js @@ -3,13 +3,12 @@ * https://cli.vuejs.org/zh/config/ */ // const url = 'http://192.168.31.160:9999' //长龙 -// const url = 'http://192.168.31.149:9999' // 胜浩 +const url = 'http://192.168.31.85:9999' // 胜浩 // const url = 'http://127.0.0.1:9999' // 本地 -const url = 'http://39.97.244.65:9999' // 测试服务器 +// const url = 'http://39.97.244.65:9999' // 测试服务器 // const url = 'http://62.234.122.43:9999' //正式服务器1 -// const url = 'http://82.156.35.22:9999' // 正式服务器2 // const url = 'https://www.aihxz.com' // 正式域名 const CompressionWebpackPlugin = require('compression-webpack-plugin') const productionGzipExtensions = ['js', 'css']