Commit 08188a27 authored by zhengke's avatar zhengke

修改

parent f1689064
......@@ -754,4 +754,51 @@ export function GetStudyabroadType(data) {
method: 'post',
data
});
}
\ No newline at end of file
}
/**
* 获取课程顾问跟进配置分页列表
*/
export function GetStudentAdvisorConfigPage(data) {
return request({
url: '/User/GetStudentAdvisorConfigPage',
method: 'post',
data
});
}
/**
* 根据编号获取课程顾问配置信息
*/
export function GetStudentAdvisorConfig(data) {
return request({
url: '/User/GetStudentAdvisorConfig',
method: 'post',
data
});
}
/**
* 新增修改课程顾问配置
*/
export function SetStudentAdvisorConfig(data) {
return request({
url: '/User/SetStudentAdvisorConfig',
method: 'post',
data
});
}
/**
* 根据编号删除课程顾问配置信息
*/
export function RemoveStudentAdvisorConfig(data) {
return request({
url: '/User/RemoveStudentAdvisorConfig',
method: 'post',
data
});
}
<template>
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale">
<q-card style="width: 400px;max-width:400px;">
<q-card-section>
<div class="text-h6">{{optionTitle}}</div>
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div class="row wrap">
<q-input filled stack-label maxlength="30" :dense="false" v-model="objOption.Name" ref="Name"
class="col-12 q-pb-lg" label="名称" :rules="[val => !!val || '请填写名称']" />
</div>
<div class="row wrap">
<q-input filled stack-label maxlength="5" :dense="false" v-model="objOption.Num" ref="Num"
class="col-12 q-pb-lg" label="排序" @keyup.native="checkInteger(objOption,'Num')" />
</div>
<div class="row wrap">
<q-input filled stack-label maxlength="5" :dense="false" v-model="objOption.Rate" ref="Rate"
class="col-12 q-pb-lg" label="比例" @keyup.native="checkInteger(objOption,'Rate')" />
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeSaveForm" />
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="saveLoading"
@click="saveStage" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script>
import {
GetStudentAdvisorConfig,
SetStudentAdvisorConfig
} from '../../api/system/index'
export default {
props: {
saveObj: {
type: Object,
default: null
}
},
data() {
return {
persistent: true,
saveLoading: false,
objOption: {
Id: 0,
Name:"", //名称
Num:'', //排序
Rate:'',//比例
},
optionTitle: "",
}
},
mounted() {
this.initObj();
},
methods: {
//初始化表单
initObj() {
if (this.saveObj && this.saveObj.Id > 0) {
this.objOption.Id = this.saveObj.Id;
GetStudentAdvisorConfig({
Id: this.saveObj.Id,
}).then((res) => {
this.objOption.Id = res.Data.Id;
this.objOption.Name = res.Data.Name;
this.objOption.Num = res.Data.Num;
this.objOption.Rate = res.Data.Rate;
})
this.optionTitle = "修改跟进状态信息"
} else {
this.optionTitle = "新增跟进状态信息"
this.objOption.Id = 0;
this.objOption.Name = '';
this.objOption.Num = '';
this.objOption.Rate = '';
}
},
//关闭弹窗
closeSaveForm() {
this.$emit('close')
},
//保存菜单
saveStage() {
this.$refs.Name.validate();
if (!this.$refs.Name.hasError) {
this.saveLoading = true
SetStudentAdvisorConfig(this.objOption).then(res => {
this.saveLoading = false;
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据保存成功!',
position: 'top'
})
this.$emit("success")
this.closeSaveForm()
}
})
}
}
}
}
</script>
......@@ -54,7 +54,7 @@
</el-table-column>
<el-table-column prop="ChannelName" label="渠道名">
<template slot-scope="scope">
<div class="CustomerName" v-if="scope.row.CustomerType" @click="showDetail(scope.row)">
<div class="CustomerName" v-if="scope.row.CustomerType||scope.row.ChannelType==1" @click="showDetail(scope.row)">
{{scope.row.ChannelName}}
</div>
<div v-else>
......@@ -230,8 +230,20 @@
},
//客户详情
showDetail(row) {
this.curRowId = row.ChannelId;
this.isShowDetailForm = true;
if(row.ChannelType==1){
this.$router.push({
path: '/sale/mystu',
query: {
startTime: this.msg.startTime,
endTime: this.msg.endTime,
empList:this.msg.empList.toString(),
blank: 'y'
}
})
}else{
this.curRowId = row.ChannelId;
this.isShowDetailForm = true;
}
},
//关闭弹窗
closeCustomForm() {
......
......@@ -183,6 +183,14 @@
},
mounted() {
this.currentUrl = this.$route.path;
if(this.$route.query.startTime){
this.dateArray.push(this.$route.query.startTime);
this.msg.StartTime = this.$route.query.startTime;
}
if(this.$route.query.endTime){
this.dateArray.push(this.$route.query.endTime);
this.msg.EndTime = this.$route.query.endTime;
}
this.getStudent();
this.getCustomerList();
this.getCustomFrom();
......
<template>
<div class="page-body">
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table" separator="none" :data="dataList" :columns="columns"
row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">客户阶段</div>
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增跟进" @click="addObj(null)" />
</div>
</template>
<template v-slot:body-cell-Id="props">
<q-td :props="props">
<div>
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="addObj(props.row)" />
<q-btn flat size="xs" icon="delete" color="negative" class="q-mr-xs" label="删除"
@click="deleteStage(props.row.Id)" />
</div>
</q-td>
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</template>
</q-table>
</div>
<flow-form v-if="isShowFlowForm" :save-obj="flowObj" @close="closeflowForm" @success="refreshPage">
</flow-form>
</div>
</template>
<script>
import {
GetStudentAdvisorConfigPage,
RemoveStudentAdvisorConfig
} from '../../api/system/index'
import flowForm from '../../components/system/flow-form'
export default {
meta: {
title: "客户阶段管理"
},
components: {
flowForm
},
data() {
return {
columns: [{
name: 'Name',
label: '名称',
field: 'Name',
align: 'left'
},{
name: 'Num',
label: '排序',
field: 'Name',
align: 'left'
},{
name: 'Rate',
label: '比例',
field: 'Rate',
align: 'left'
},{
name: 'Id',
label: '操作',
field: 'Id'
}
],
dataList: [],
loading: true,
isShowFlowForm: false,
flowObj: {},
msg:{
pageIndex:1,
pageSize:12,
rowsPerPage: 12,
Name:""
},
pageCount:0
}
},
mounted() {
this.getList()
},
methods: {
deleteStage(Id) {
let delMsg = {
Id: Id
};
this.$q.dialog({
title: '提示信息',
message: '是否确定该阶段?',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
RemoveStudentAdvisorConfig(delMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '删除成功!',
position: 'top'
})
this.getList();
}
})
}).onCancel(() => {
});
},
//翻页
changePage(val){
this.msg.pageIndex = val;
this.getList();
},
getList() {
this.loading = true;
GetStudentAdvisorConfigPage(this.msg).then(res => {
this.loading = false;
console.log(res,'数据');
if(res.Code==1){
this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}
})
},
closeflowForm() {
this.isShowFlowForm = false
},
refreshPage(){
this.getList();
},
addObj(obj){
if (obj) {
this.flowObj = obj
} else {
this.flowObj = null
}
this.isShowFlowForm = true;
}
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
......@@ -14,6 +14,7 @@
<q-tab :ripple="false" :name="5" label="客户需求"></q-tab>
<q-tab :ripple="false" :name="6" label="客户分配规则"></q-tab>
<q-tab :ripple="false" :name="7" label="目标管理"></q-tab>
<q-tab :ripple="false" :name="8" label="跟进状态"></q-tab>
</q-tabs>
<stage v-if="tabCheck == 1"></stage>
<cusType v-if="tabCheck == 2"></cusType>
......@@ -22,6 +23,7 @@
<customneed v-if="tabCheck == 5"></customneed>
<stu-distribution-rule v-if="tabCheck == 6"></stu-distribution-rule>
<stuTarget v-if="tabCheck==7"></stuTarget>
<stuFlow v-if="tabCheck==8"></stuFlow>
</div>
</template>
<script>
......@@ -32,6 +34,7 @@ import channel from "./stuReceiveChannel";
import customneed from "./customneed";
import stuDistributionRule from "./stuDistributionRule";
import stuTarget from "./stuTarget";
import stuFlow from "./stuFlow";
export default {
components: {
stage,
......@@ -40,7 +43,8 @@ export default {
channel,
customneed,
stuDistributionRule,
stuTarget
stuTarget,
stuFlow
},
data() {
return {
......
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