Commit 1a9370b1 authored by zhengke's avatar zhengke
parents dba9f147 15af8277
......@@ -121,7 +121,8 @@ export function getGuestEducationEnumList(data) {
*/
export function getGuestLearningGoalsEnumList(data) {
return request({
url: '/order/GetGuestLearningGoalsEnumList',
// url: '/order/GetGuestLearningGoalsEnumList',
url:'/CustomerStudent/GetLearningGoalsList',
method: 'post',
data
})
......@@ -388,7 +389,8 @@ export function getMyCustomerList(data) {
// 获取收客渠道下拉
export function GetStuChannelList(data) {
return request({
url: '/User/GetStuChannelList',
// url: '/User/GetStuChannelList',
url:"/CustomerStudent/GetChannelList",
method: 'post',
data
});
......
......@@ -521,16 +521,7 @@ export function GetLearningGoalsPage(data) {
});
}
/**
* 获取学习目的下拉列表
*/
export function GetLearningGoalsDropDown(data) {
return request({
url: '/CustomerStudent/GetLearningGoalsList',
method: 'post',
data
});
}
/**
* 新增修改学习目的
......@@ -564,3 +555,49 @@ export function RemoveLearningGoals(data) {
data
});
}
/**
* 获取收客渠道分页列表
*/
export function GetChannelPage(data) {
return request({
url: '/CustomerStudent/GetChannelPage',
method: 'post',
data
});
}
/**
* 新增修改收客渠道
*/
export function SetChannel(data) {
return request({
url: '/CustomerStudent/SetChannel',
method: 'post',
data
});
}
/**
* 根据编号获取收客渠道详情
*/
export function GetChannel(data) {
return request({
url: '/CustomerStudent/GetChannel',
method: 'post',
data
});
}
/**
* 根据编号删除收客渠道
*/
export function RemoveChannel(data) {
return request({
url: '/CustomerStudent/RemoveChannel',
method: 'post',
data
});
}
\ No newline at end of file
<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" v-model="msg.Name" ref="Name"
class="col-12 q-pb-lg" label="收客渠道" :rules="[val => !!val || '请填写收客渠道']" />
</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 {
SetChannel
} from '../../api/system/index'
export default {
props: {
row: {
type: Object,
default: null
}
},
data() {
return {
persistent: true,
saveLoading: false,
msg : {
Id: 0,
Name:"",
},
optionTitle: "",
}
},
mounted() {
this.init();
},
methods: {
//初始化表单
init() {
console.log(this.row)
if (this.row?.Id??0 > 0) {
this.msg.Id = this.row.Id;
this.msg.Name = this.row.Name;
this.optionTitle = "修改收客渠道"
} else {
this.optionTitle = "新增收客渠道"
this.msg.Id = 0;
this.msg.Name = '';
}
},
//关闭弹窗
closeSaveForm() {
this.$emit('close')
},
//保存菜单
saveStage() {
this.$refs.Name.validate();
if (!this.$refs.Name.hasError) {
this.saveLoading = true
SetChannel(this.msg).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>
<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" v-model="msg.Name" ref="Name"
class="col-12 q-pb-lg" label="学习目的" :rules="[val => !!val || '请填写学习目的']" />
</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 {
SetLearningGoals
} from '../../api/system/index'
export default {
props: {
row: {
type: Object,
default: null
}
},
data() {
return {
persistent: true,
saveLoading: false,
msg : {
Id: 0,
Name:"",
},
optionTitle: "",
}
},
mounted() {
this.init();
},
methods: {
//初始化表单
init() {
if (this.row?.Id??0 > 0) {
this.msg.Id = this.row.Id;
this.msg.Name = this.row.Name;
this.optionTitle = "修改学习目的"
} else {
this.optionTitle = "新增学习目的"
this.msg.Id = 0;
this.msg.Name = '';
}
},
//关闭弹窗
closeSaveForm() {
this.$emit('close')
},
//保存菜单
saveStage() {
this.$refs.Name.validate();
if (!this.$refs.Name.hasError) {
this.saveLoading = true
SetLearningGoals(this.msg).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>
<template>
<div class=page-body>
<q-tabs
v-model="tabCheck"
narrow-indicator
dense
align="left"
class="text-primary q-mb-sm"
>
<q-tab :ripple="false" :name="1" label="客户阶段" />
<q-tab :ripple="false" :name="2" label="客户类型" />
<q-tab :ripple="false" :name="3" label="学习目的" />
<q-tab :ripple="false" :name="4" label="收客渠道" />
</q-tabs>
<stage v-if="tabCheck==1"></stage>
<cusType v-if="tabCheck==2"></cusType>
<aim v-if="tabCheck==3"></aim>
<channel v-if="tabCheck==4"></channel>
</div>
</template>
<script>
import stage from "./stage";
import cusType from "./customType"
import aim from './studyAim'
import channel from './stuReceiveChannel'
export default {
components: {
stage,
cusType,
aim,
channel,
},
data() {
return {
tabCheck: 1
};
}
};
</script>
<template>
<div>
<div class="row q-my-sm">
<q-input filled v-model="msg.Name" label="收客渠道" class="col-3" @input="refreshPage"/>
</div>
<q-table
:pagination="msg"
:loading="loading"
no-data-label="暂无相关数据"
flat
class="sticky-column-table no-bottom-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="showForm(null)"
/>
</div>
</template>
<template v-slot:body-cell-Group_Id="props">
<q-td :props="props">
<div>
<q-btn
flat
size="xs"
icon="edit"
color="accent"
style="font-weight:400"
label="编辑"
@click="showForm(props.row)"
/>
<q-btn
flat
size="xs"
icon="delete"
color="negative"
class="q-mr-xs"
label="删除"
@click="del(props.row.Id)"
/>
</div>
</q-td>
</template>
<template v-slot:bottom>
<q-pagination
class="full-width justify-end"
v-model="msg.pageIndex"
:max="pageCount"
input
color="primary"
@input="changePage"
/>
</template>
</q-table>
<stuReceiveChannelForm
v-if="showStuReceiveChannelForm"
@success="refreshPage"
@close="closeForm"
:row="row"
></stuReceiveChannelForm>
</div>
</template>
<script>
import {
GetChannelPage,
RemoveChannel
} from "../../api/system/index";
import stuReceiveChannelForm from "../../components/system/stuReceiveChannel-form";
export default {
components: {
stuReceiveChannelForm
},
data() {
return {
showStuReceiveChannelForm: false,
columns: [
{
name: "Id",
label: "Id",
field: "Id",
align: "left"
},
{
name: "Name",
label: "收客渠道",
align: "left",
field: "Name"
},
{
name: "CreateByName",
label: "创建人",
align: "left",
field: "CreateByName"
},
{
name: "CreateTime",
label: "创建时间",
align: "left",
field: "CreateTime"
},
{
name: "Group_Id",
label: "操作",
field: "Group_Id"
}
],
msg: {
rowsPerPage: 10,
pageIndex: 1,
pageSize: 10,
Name: ""
},
dataList: [],
pageCount: 0,
loading: false,
row: {}
};
},
methods: {
getList() {
GetChannelPage(this.msg).then(res => {
this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
});
},
//翻页
changePage(val) {
this.msg.pageIndex = val;
this.getList();
},
refreshPage() {
this.msg.pageIndex = 1;
this.getList();
},
showForm(row) {
this.showStuReceiveChannelForm = true;
this.row = row;
},
closeForm() {
this.showStuReceiveChannelForm = false;
},
del(Id) {
let delMsg = {
Id: Id
};
this.$q
.dialog({
title: "提示信息",
message: "是否确认删除?",
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消"
})
.onOk(() => {
RemoveChannel(delMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "删除成功!",
position: "top"
});
this.getList();
}
});
});
}
},
created() {
this.getList();
}
};
</script>
<template>
<div>
<div class="row q-my-sm">
<q-input filled v-model="msg.Name" label="学习目的" class="col-3" @input="refreshPage"/>
</div>
<q-table
:pagination="msg"
:loading="loading"
no-data-label="暂无相关数据"
flat
class="sticky-column-table no-bottom-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="showForm(null)"
/>
</div>
</template>
<template v-slot:body-cell-Group_Id="props">
<q-td :props="props">
<div>
<q-btn
flat
size="xs"
icon="edit"
color="accent"
style="font-weight:400"
label="编辑"
@click="showForm(props.row)"
/>
<q-btn
flat
size="xs"
icon="delete"
color="negative"
class="q-mr-xs"
label="删除"
@click="del(props.row.Id)"
/>
</div>
</q-td>
</template>
<template v-slot:bottom>
<q-pagination
class="full-width justify-end"
v-model="msg.pageIndex"
:max="pageCount"
input
color="primary"
@input="changePage"
/>
</template>
</q-table>
<studyAimForm
v-if="showStudyAimForm"
@success="refreshPage"
@close="closeForm"
:row="row"
></studyAimForm>
</div>
</template>
<script>
import {
GetLearningGoalsPage,
RemoveLearningGoals
} from "../../api/system/index";
import studyAimForm from "../../components/system/studyAim-form";
export default {
components: {
studyAimForm
},
data() {
return {
showStudyAimForm: false,
columns: [
{
name: "Id",
label: "Id",
field: "Id",
align: "left"
},
{
name: "Name",
label: "学习目的",
align: "left",
field: "Name"
},
{
name: "CreateByName",
label: "创建人",
align: "left",
field: "CreateByName"
},
{
name: "CreateTime",
label: "创建时间",
align: "left",
field: "CreateTime"
},
{
name: "Group_Id",
label: "操作",
field: "Group_Id"
}
],
msg: {
rowsPerPage: 10,
pageIndex: 1,
pageSize: 10,
Name: ""
},
dataList: [],
pageCount: 0,
loading: false,
isShowStageForm: false,
row: {}
};
},
methods: {
getList() {
GetLearningGoalsPage(this.msg).then(res => {
this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
});
},
//翻页
changePage(val) {
this.msg.pageIndex = val;
this.getList();
},
refreshPage() {
this.msg.pageIndex = 1;
this.getList();
},
showForm(row) {
this.showStudyAimForm = true;
this.row = row;
},
closeForm() {
this.showStudyAimForm = false;
},
del(Id) {
let delMsg = {
Id: Id
};
this.$q
.dialog({
title: "提示信息",
message: "是否确认删除?",
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消"
})
.onOk(() => {
RemoveLearningGoals(delMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "删除成功!",
position: "top"
});
this.getList();
}
});
});
}
},
created() {
this.getList();
}
};
</script>
......@@ -88,6 +88,11 @@ const routes = [{
component: () =>
import("pages/system/customType.vue")
},
{
path: "/system/stuManageConfig", //学员管理配置
component: () =>
import("pages/system/stuManageConfig.vue")
},
{
path: "/system/area", //地区管理
component: () =>
......
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