Commit 9de13154 authored by 赵茹林's avatar 赵茹林

回访信息 - 标签 新增、编辑、删除

回访信息 - 列表 展示、新增
parent 68344a42
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
// 权限验证 动态路由 // 权限验证 动态路由
if (window.location.href.indexOf("login") < 0) { if (window.location.href.indexOf("login") < 0) {
let permission = this.$store.state.progressList; let permission = this.$store.state.progressList;
console.log(this.$store.state); // console.log(this.$store.state);
let menuList = []; let menuList = [];
this.$router.options.routes[0].children = []; this.$router.options.routes[0].children = [];
let routerUserDetail = { let routerUserDetail = {
......
This diff is collapsed.
...@@ -38,7 +38,7 @@ export default { ...@@ -38,7 +38,7 @@ export default {
}; };
}, },
mounted() { mounted() {
console.log(this.menuList); // console.log(this.menuList);
}, },
methods: { methods: {
changeMenuType: function() { changeMenuType: function() {
......
...@@ -12,35 +12,29 @@ ...@@ -12,35 +12,29 @@
<el-button size="mini" @click="editComment(row.id)"> <el-button size="mini" @click="editComment(row.id)">
新增话术记录 新增话术记录
</el-button> </el-button>
<el-dialog append-to-body :visible.sync="descDialog.show" title="沟通情况列表" width="75%"> <el-dialog append-to-body :visible.sync="descDialog.show" title="沟通情况列表" width="75%">
<el-form label-width="90px">
<call-back :callbackAdd="true" :callbackObj="callbackObj"></call-back>
<!--<el-form label-width="90px">
<el-form-item> <el-form-item>
<el-button style="float: right" type="primary" plain @click="editComment(descDialog.id)">添加沟通情况</el-button> <el-button style="float: right" type="primary" plain @click="editComment(descDialog.id)">添加沟通情况</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table :data="descDialog.descList">
:data="descDialog.descList" <el-table-column label="用户" className="f-c" width="150">
style="width: 100%">
<el-table-column
label="用户" className="f-c" width="150">
<template slot-scope="scope" v-if="descDialog.user_info"> <template slot-scope="scope" v-if="descDialog.user_info">
<img :src="descDialog.user_info.avatar" style="width: 40px;height: 40px;border-radius: 50px"> {{descDialog.user_info.nickname}}(ID:{{descDialog.user_info.user_id}}) <img :src="descDialog.user_info.avatar" style="width: 40px;height: 40px;border-radius: 50px"> {{descDialog.user_info.nickname}}(ID:{{descDialog.user_info.user_id}})
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="desc" label="沟通情况"></el-table-column>
prop="desc" <el-table-column prop="type" label="类型" width="80px">
label="沟通情况">
</el-table-column>
<el-table-column
prop="type"
label="类型" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.type === 0 ? '备注' : scope.row.type === 1 ? '沟通话术' : '召回话术'}} {{scope.row.type === 0 ? '备注' : scope.row.type === 1 ? '沟通话术' : '召回话术'}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="reply_content" label="用户回复">
prop="reply_content"
label="用户回复">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.reply_content"> <div v-if="scope.row.reply_content">
{{scope.row.reply_content}} {{scope.row.reply_content}}
...@@ -51,17 +45,13 @@ ...@@ -51,17 +45,13 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="operator" label="联系人"></el-table-column>
prop="operator" <el-table-column prop="created_at" label="记录事件"></el-table-column>
label="联系人"> </el-table>-->
</el-table-column>
<el-table-column
prop="created_at"
label="记录事件">
</el-table-column>
</el-table>
</el-dialog> </el-dialog>
<el-dialog append-to-body :visible.sync="newDialog.show" center title="添加沟通情况">
<!--<el-dialog append-to-body :visible.sync="newDialog.show" center title="添加沟通情况">
<el-form label-width="120px" size="mini"> <el-form label-width="120px" size="mini">
<el-form-item label="类型" v-if="typeFlag"> <el-form-item label="类型" v-if="typeFlag">
<el-select v-model="newDialog.type" placeholder="类型"> <el-select v-model="newDialog.type" placeholder="类型">
...@@ -87,22 +77,29 @@ ...@@ -87,22 +77,29 @@
<el-button @click="newDialog.show = false">取 消</el-button> <el-button @click="newDialog.show = false">取 消</el-button>
<el-button type="primary" @click="submitDesc()">确 定</el-button> <el-button type="primary" @click="submitDesc()">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>-->
</div> </div>
</template> </template>
<script> <script>
import {addPeriodsClassUserDescApi,getUserDescListApi,editUserReplyApi} from "../../service/api"; import {addPeriodsClassUserDescApi,getUserDescListApi,editUserReplyApi} from "../../service/api";
import CallBack from '@/components/callBack/index';
export default { export default {
name: "teacherDesc", name: "teacherDesc",
props:[ props:[
'row', 'row',
'descType', 'descType',
'typeFlag' 'typeFlag',
'teacherId'
], ],
data(){ data(){
return { return {
callbackObj: {
id: '',
detail: {}
},
descDialog:{ descDialog:{
show:false, show:false,
id:'', id:'',
...@@ -119,6 +116,7 @@ ...@@ -119,6 +116,7 @@
} }
} }
}, },
components: {CallBack},
methods:{ methods:{
subReply(data){ subReply(data){
let json = {} let json = {}
...@@ -142,10 +140,17 @@ ...@@ -142,10 +140,17 @@
nickname:data.nickname, nickname:data.nickname,
user_id:data.user_id, user_id:data.user_id,
}; };
this.getUserDescList() // this.getUserDescList();
this.callbackObj.id = data.user_id;
this.callbackObj.teacher_id = this.teacherId;
this.callbackObj.detail.birthday = data.birthday;
this.callbackObj.detail.user_id = data.user_id;
this.callbackObj.detail.nickname = data.nickname;
this.callbackObj.detail.mobile = data.mobile;
this.callbackObj.detail.baby_name = data.baby_name;
}, },
getUserDescList(){ getUserDescList(){
getUserDescListApi(this.row.id,{limit:1000}).then(res=>{ getUserDescListApi(this.row.id,{limit:1000}).then(res => {
this.descDialog.descList = res.list this.descDialog.descList = res.list
}) })
}, },
......
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
min-width="260" min-width="260"
label="沟通情况"> label="沟通情况">
<template slot-scope="scope"> <template slot-scope="scope">
<teacher-desc :row="scope.row" :descType="2" @onSuccess="refDesc3"></teacher-desc> <teacher-desc :teacherId="id" :row="scope.row" :descType="2" @onSuccess="refDesc3"></teacher-desc>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
min-width="160" min-width="160"
label="沟通情况"> label="沟通情况">
<template slot-scope="scope"> <template slot-scope="scope">
<teacher-desc :row="scope.row" :descType="1" @onSuccess="refDesc2"></teacher-desc> <teacher-desc :teacherId="id" :row="scope.row" :descType="1" @onSuccess="refDesc2"></teacher-desc>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -356,7 +356,7 @@ ...@@ -356,7 +356,7 @@
<el-table-column <el-table-column
label="沟通情况"> label="沟通情况">
<template slot-scope="scope"> <template slot-scope="scope">
<teacher-desc :row="scope.row" :descType="1" @onSuccess="searchPage"></teacher-desc> <teacher-desc :teacherId="id" :row="scope.row" :descType="1" @onSuccess="searchPage"></teacher-desc>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -387,7 +387,7 @@ ...@@ -387,7 +387,7 @@
<el-table-column <el-table-column
label="沟通情况"> label="沟通情况">
<template slot-scope="scope"> <template slot-scope="scope">
<teacher-desc :row="scope.row" :descType="1" @onSuccess="getTask5"></teacher-desc> <teacher-desc :teacherId="id" :row="scope.row" :descType="1" @onSuccess="getTask5"></teacher-desc>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
......
...@@ -385,7 +385,7 @@ ...@@ -385,7 +385,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="desc" label="沟通情况" align="center"> <el-table-column prop="desc" label="沟通情况" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<teacher-desc :row="scope.row" :descType="2" @onSuccess="refDesc1"></teacher-desc> <teacher-desc :teacherId="teacherId" :row="scope.row" :descType="2" @onSuccess="refDesc1"></teacher-desc>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="created_at" label="入课时间" min-width="140px" align="center" sortable></el-table-column> <el-table-column prop="created_at" label="入课时间" min-width="140px" align="center" sortable></el-table-column>
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
min-width="160" min-width="160"
label="沟通情况"> label="沟通情况">
<template slot-scope="scope"> <template slot-scope="scope">
<teacher-desc :row="scope.row" :descType="1" @onSuccess="refDesc2"></teacher-desc> <teacher-desc :teacherId="teacherId" :row="scope.row" :descType="1" @onSuccess="refDesc2"></teacher-desc>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
......
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
min-width="160" min-width="160"
label="沟通情况"> label="沟通情况">
<template slot-scope="scope"> <template slot-scope="scope">
<teacher-desc :row="scope.row" :descType="2" @onSuccess="refDesc3"></teacher-desc> <teacher-desc :teacherId="teacherId" :row="scope.row" :descType="2" @onSuccess="refDesc3"></teacher-desc>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
min-width="160" min-width="160"
label="沟通情况"> label="沟通情况">
<template slot-scope="scope"> <template slot-scope="scope">
<teacher-desc :row="scope.row" :descType="2" @onSuccess="refDesc4"></teacher-desc> <teacher-desc :teacherId="teacherId" :row="scope.row" :descType="2" @onSuccess="refDesc4"></teacher-desc>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
......
<template> <template>
<div class="user" v-loading="loading"> <div class="admin-refresh" v-loading="loading">
<el-form ref="searchFrom" :model="searchFrom" label-width="80px" inline> <div class="section-search">
<el-form-item label="ID"> <el-form ref="searchFrom" :model="searchFrom" label-width="80px" inline>
<el-input v-model="searchFrom.userId"></el-input> <el-form-item>
</el-form-item> <el-input v-model="searchFrom.userId" placeholder="ID" clearable @change="getUser"></el-input>
<el-form-item label="昵称"> </el-form-item>
<el-input v-model="searchFrom.nickName"></el-input> <el-form-item>
</el-form-item> <el-input v-model="searchFrom.nickName" placeholder="昵称" clearable @change="getUser"></el-input>
<el-form-item label="电话"> </el-form-item>
<el-input v-model="searchFrom.mobile"></el-input> <el-form-item>
</el-form-item> <el-input v-model="searchFrom.mobile" placeholder="电话" clearable @change="getUser"></el-input>
<el-form-item label="等级"> </el-form-item>
<el-input v-model="searchFrom.level"></el-input> <el-form-item>
</el-form-item> <el-input v-model="searchFrom.level" placeholder="等级" clearable @change="getUser"></el-input>
<!--<el-form-item label="标签"> </el-form-item>
<el-cascader <!--<el-form-item label="标签">
style="width: 320px" placeholder="选择标签" clearable @change="tagChange" <el-cascader
:options="options" :props="{ multiple: true, checkStrictly: true }"></el-cascader> style="width: 320px" placeholder="选择标签" clearable @change="tagChange"
</el-form-item>--> :options="options" :props="{ multiple: true, checkStrictly: true }"></el-cascader>
<el-form-item> </el-form-item>-->
<div class="flexRow"> <el-form-item>
<el-button type="primary" plain @click="getUser">搜索</el-button> <div class="flexRow">
<!--<el-button type="success" plain @click="syncUser">同步最新数据</el-button>--> <el-button type="primary" plain @click="getUser">搜索</el-button>
</div> <!--<el-button type="success" plain @click="syncUser">同步最新数据</el-button>-->
</el-form-item> </div>
</el-form> </el-form-item>
</el-form>
</div>
<el-table <el-table
:data="userList" :data="userList"
style="width: 100%"> style="width: 100%">
...@@ -158,7 +161,8 @@ ...@@ -158,7 +161,8 @@
teacherDialog teacherDialog
}, },
mounted() { mounted() {
this.getUser() this.$route.query.id ? this.searchFrom.userId = this.$route.query.id : '';
this.getUser();
}, },
methods: { methods: {
......
...@@ -104,7 +104,7 @@ import AddressArray from '../framework/address-picker/addr' ...@@ -104,7 +104,7 @@ import AddressArray from '../framework/address-picker/addr'
vueAddress vueAddress
}, },
mounted(){ mounted(){
console.log(this.dialogObj) // console.log(this.dialogObj)
} }
} }
</script> </script>
......
...@@ -32,27 +32,30 @@ ...@@ -32,27 +32,30 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-card class="user-card"> <el-card class="user-card">
<div class="card-content" v-if="subDetail.nickname"> <div style="min-height: 150px">
<div class="text item"> <div class="card-content" v-if="subDetail.nickname">
<a :href="subDetail.avatar" target="_blank"> <div class="text item">
<img :src="subDetail.avatar"/> <a :href="subDetail.avatar" target="_blank">
</a> <img :src="subDetail.avatar"/>
</div> </a>
<div class="text item">
<div>
<label>用户:</label>{{subDetail.nickname}} (ID: {{subDetail.user_id}})
</div> </div>
<div> <div class="text item">
<label>tel:</label>{{subDetail.mobile}} <div>
<label>用户:</label>{{subDetail.nickname}} (ID: {{subDetail.user_id}})
</div>
<div>
<label>tel:</label>{{subDetail.mobile}}
</div>
</div> </div>
</div> </div>
<p class="fl" v-if="!subDetail.nickname" style="clear:both;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(暂无子账户)</p>
<p class="fl" v-if="subDetail.nickname" style="clear:both;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(子账户)</p>
</div> </div>
<p class="fl" v-if="!subDetail.nickname" style="clear:both;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(暂无子账户)</p>
<p class="fl" v-if="subDetail.nickname" style="clear:both;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(子账户)</p>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<!--<el-tabs type="border-card" v-model="tabs">-->
<el-tabs type="border-card" v-model="tabs"> <el-tabs type="border-card" v-model="tabs">
<el-tab-pane label="回访信息" name="callback"> <el-tab-pane label="回访信息" name="callback">
<call-back :callbackObj="callbackObj"></call-back> <call-back :callbackObj="callbackObj"></call-back>
...@@ -881,7 +884,7 @@ ...@@ -881,7 +884,7 @@
if (!this.id) return; if (!this.id) return;
getUserDetailApi(this.id).then(res => { getUserDetailApi(this.id).then(res => {
this.detail = res; this.detail = res;
this.callbackObj.detail = res; this.callbackObj.detail = res; // 用户的所有数据
if (res.periods_list) { if (res.periods_list) {
this.periodList = res.periods_list this.periodList = res.periods_list
} }
......
...@@ -69,7 +69,7 @@ router.beforeEach((to,from,next)=> { ...@@ -69,7 +69,7 @@ router.beforeEach((to,from,next)=> {
} }
} }
store.state.nowTab = to.name; store.state.nowTab = to.name;
console.log(to) // console.log(to)
if(to.matched.length > 1 && to.name !== 'first'){ if(to.matched.length > 1 && to.name !== 'first'){
let thisMenu; let thisMenu;
for (let i = 0 ; i < store.state.menuList.length ; i ++ ){ for (let i = 0 ; i < store.state.menuList.length ; i ++ ){
...@@ -101,7 +101,7 @@ router.beforeEach((to,from,next)=> { ...@@ -101,7 +101,7 @@ router.beforeEach((to,from,next)=> {
store.dispatch('classManageUnlimited',to.meta.classManageUnlimited) store.dispatch('classManageUnlimited',to.meta.classManageUnlimited)
store.dispatch('classTakeUnlimited',to.meta.classTakeUnlimited) store.dispatch('classTakeUnlimited',to.meta.classTakeUnlimited)
store.dispatch('exportFinish',to.meta.exportFinish) store.dispatch('exportFinish',to.meta.exportFinish)
console.log(to.meta) // console.log(to.meta)
if(to.name==='userDetail'){ if(to.name==='userDetail'){
let list = JSON.parse(localStorage.getItem('permission')) let list = JSON.parse(localStorage.getItem('permission'))
let readonly = list.find(i=>{ let readonly = list.find(i=>{
......
...@@ -64,7 +64,8 @@ export const postUserTransferApi = function (json) { ...@@ -64,7 +64,8 @@ export const postUserTransferApi = function (json) {
}; };
// 获取回访信息 // 获取回访信息
export const getCallBackApi = function (json) { export const getCallBackApi = function (json) {
return Vue.prototype.$fetch(`${_baseUrl}/api/admin/user/visit/${json.user_id}/${json.periods_id}`, json) console.log(json, 9001)
return Vue.prototype.$fetch(`${_baseUrl}api/admin/user/visit/${json.user_id}`, json)
}; };
// 添加回访信息 // 添加回访信息
export const postCallBackApi = function (json) { export const postCallBackApi = function (json) {
......
...@@ -79,8 +79,7 @@ axios.interceptors.request.use( ...@@ -79,8 +79,7 @@ axios.interceptors.request.use(
if(process.env.NODE_ENV === 'development' ){ if(process.env.NODE_ENV === 'development' ){
config.data.special_token="changchangenglish"; config.data.special_token="changchangenglish";
} }
console.log(54) // console.log(JSON.stringify(json2))
console.log(JSON.stringify(json2))
config.data.param_token = md5(JSON.stringify(json2)); config.data.param_token = md5(JSON.stringify(json2));
} }
return config; return config;
...@@ -238,6 +237,7 @@ export function fetch(url,params={}){ ...@@ -238,6 +237,7 @@ export function fetch(url,params={}){
}) })
.catch(err => { .catch(err => {
reject(err); reject(err);
console.log(err);
let message = '请求失败!请检查网络'; let message = '请求失败!请检查网络';
if(err.response)message=err.response.data.message; if(err.response)message=err.response.data.message;
Vue.prototype.$msgbox({ Vue.prototype.$msgbox({
......
...@@ -219,4 +219,52 @@ export const LogisticsStatus = { ...@@ -219,4 +219,52 @@ export const LogisticsStatus = {
1:'已发货', 1:'已发货',
2:'已签收', 2:'已签收',
3:'异常' 3:'异常'
}; };
\ No newline at end of file
export const CALLBACK_METHOD = [{
label: '电话接通',
value: 1
}, {
label: '电话未接通',
value: 2
}, {
label: '微信沟通',
value: 3
}, {
label: '微信留言',
value: 4
}, {
label: '备注',
value: 5
}];
export const CALLBACK_TYPE = [{
label: '开课回访',
value: 1
}, {
label: '常规回访',
value: 2
}, {
label: '通知',
value: 3
}, {
label: '信息变更',
value: 4
}, {
label: '服务评价',
value: 5
}];
export const CALLBACK_INTENTION = [{
label: '低意向',
value: 1
}, {
label: '中意向',
value: 2
}, {
label: '高意向',
value: 3
}, {
label: '不跟踪',
value: 4
}];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment