Commit 29bcc01b authored by Mac's avatar Mac
parents 77f36d42 c74d3e28
...@@ -645,3 +645,58 @@ export function RemoveNeeds(data) { ...@@ -645,3 +645,58 @@ export function RemoveNeeds(data) {
data data
}); });
} }
/**
* 获取目标分页列表
*/
export function GetConsultantGoalPage(data) {
return request({
url: '/UserCenter/GetConsultantGoalPage',
method: 'post',
data
});
}
/**
* 批量添加目标
*/
export function AddConsultantGoal(data) {
return request({
url: '/UserCenter/AddConsultantGoal',
method: 'post',
data
});
}
/**
* 删除目标
*/
export function RemoveConsultantGoal(data) {
return request({
url: '/UserCenter/RemoveConsultantGoal',
method: 'post',
data
});
}
/**
* 修改目标
*/
export function UpdateConsultantGoal(data) {
return request({
url: '/UserCenter/UpdateConsultantGoal',
method: 'post',
data
});
}
/**
* 获取目标详情
*/
export function GetConsultantGoal(data) {
return request({
url: '/UserCenter/GetConsultantGoal',
method: 'post',
data
});
}
\ No newline at end of file
...@@ -41,3 +41,15 @@ export function MarketStatic(data) { ...@@ -41,3 +41,15 @@ export function MarketStatic(data) {
}) })
} }
/**
* 首页 课程顾问部统计
*/
export function ConsultantStatic(data) {
return request({
url: '/UserCenter/ConsultantStatic',
method: 'post',
data
})
}
...@@ -658,7 +658,6 @@ export default { ...@@ -658,7 +658,6 @@ export default {
this.changeBillMsg.Id = this.setingObj.Id; this.changeBillMsg.Id = this.setingObj.Id;
this.changeBillMsg.SpecialNode = this.setingObj.SpecialNode; this.changeBillMsg.SpecialNode = this.setingObj.SpecialNode;
this.changeBillMsg.RemunerationState = this.setingObj.DataObj.RemunerationState; this.changeBillMsg.RemunerationState = this.setingObj.DataObj.RemunerationState;
console.log(this.setingObj)
}, },
methods: { methods: {
closeBackInfo() { closeBackInfo() {
......
...@@ -425,7 +425,6 @@ export default { ...@@ -425,7 +425,6 @@ export default {
}); });
}, },
assistBatchHandler() { assistBatchHandler() {
console.log(this.pushing || this.baseObj.IsHaveCurseManager);
if (this.pushing || this.baseObj.IsHaveCurseManager) return; if (this.pushing || this.baseObj.IsHaveCurseManager) return;
this.pushing = true; this.pushing = true;
let parameter = { let parameter = {
......
<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">
<template v-if="isShow==1">
<div class="row wrap">
<div class="col-12">
<el-date-picker v-model="value" style="width:100%" type="month" :clearable="false" @change="dateChange"
value-format="yyyy-MM" placeholder="选择月">
</el-date-picker>
<div style="margin-top:10px;">
<el-tag v-for="(tag, index) in objOption.TimeList" size="small" style="margin:0 5px 5px 0;" :key="tag"
@close="params => tagClose(index)" closable type="success">
{{tag}}
</el-tag>
</div>
</div>
</div>
<div class="row wrap">
<div class="col-12">
<el-input v-model="objOption.GoalMoney" placeholder="金额"
@keyup.native="checkInteger(objOption,'GoalMoney')"></el-input>
</div>
</div>
<div class="row wrap" style="margin-top:10px;">
<div class="col-12">
<selectTree :treeData='DeptList' :defaultArray="returnString" nodeKey="DeptId" :multiple="false"
labelKey="DeptName" childrenKey="ChildList" tipText="选择部门" @getChild="getChild"></selectTree>
</div>
</div>
</template>
<template v-if="isShow==2">
<div class="row wrap">
<div class="col-12">
<el-date-picker v-model="value2" style="width:100%" type="month"
value-format="yyyy-MM" placeholder="选择月">
</el-date-picker>
</div>
</div>
<div class="row wrap" style="margin-top:10px;">
<div class="col-12">
<el-input v-model="updateMsg.GoalMoney" placeholder="金额" @keyup.native="checkInteger(updateMsg,'GoalMoney')"></el-input>
</div>
</div>
<div class="row wrap" style="margin-top:10px;">
<div class="col-12">
<selectTree :treeData='DeptList' :defaultArray="returnString2" nodeKey="DeptId" :multiple="false"
labelKey="DeptName" childrenKey="ChildList" tipText="选择部门" @getChild="getChild"></selectTree>
</div>
</div>
</template>
</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" v-if="isShow==1" :loading="saveLoading"
@click="saveNeed" />
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" v-if="isShow==2" :loading="saveLoading"
@click="saveTarget" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script>
import {
AddConsultantGoal,
UpdateConsultantGoal,
GetConsultantGoal
} from '../../api/system/index'
//部门
import {
getDeptTree,
getDeptList
} from '../../api/system/dept'
import selectTree from '../../components/common/select-tree'
export default {
props: {
saveObj: {
type: Object,
default: null
}
},
components: {
selectTree
},
data() {
return {
persistent: true,
saveLoading: false,
value: '',
objOption: {
GoalMoney: "",
Dept_Id: 0,
TimeList: [],
},
updateMsg: {
Id: 0,
YearStr: '',
MonthStr: '',
GoalMoney: '',
Dept_Id: ''
},
optionTitle: "",
DeptList: [], // 部门下拉
returnString: [], //默认岗位
isShow: 1,
value2:'',
returnString2:[]
}
},
mounted() {
this.initObj();
this.queryDeptTree();
},
methods: {
//获取部门结构树
queryDeptTree() {
getDeptTree({}).then(res => {
if (res.Code == 1) {
this.DeptList = res.Data;
}
})
},
getChild(deptArray) {
var tempStr = "";
if (deptArray && deptArray != '') {
tempStr = deptArray;
}
if (tempStr) {
this.objOption.Dept_Id = tempStr;
this.updateMsg.Dept_Id = tempStr;
} else {
this.objOption.Dept_Id = 0;
this.updateMsg.Dept_Id = 0;
}
},
//选择月份
dateChange(val) {
this.objOption.TimeList.push(val) // 这里记得格式化
},
tagClose(index) {
this.objOption.TimeList.splice(index, 1);
},
//初始化表单
initObj() {
if (this.saveObj && this.saveObj.Id > 0) {
GetConsultantGoal({
Id: this.saveObj.Id
}).then(res => {
this.updateMsg.Id = res.Data.Id;
this.updateMsg.YearStr = res.Data.YearStr;
this.updateMsg.MonthStr = res.Data.MonthStr;
this.updateMsg.GoalMoney = res.Data.GoalMoney;
this.updateMsg.Dept_Id = res.Data.Dept_Id;
this.returnString2.push(res.Data.Dept_Id);
this.isShow = 2;
this.value2 = this.updateMsg.YearStr+'-'+this.updateMsg.MonthStr;
})
this.optionTitle = "修改目标"
} else {
this.optionTitle = "新增目标"
this.objOption.GoalMoney = '';
this.objOption.Dept_Id = '';
this.objOption.TimeList = [];
this.isShow = 1
}
},
//关闭弹窗
closeSaveForm() {
this.$emit('close')
},
//新增保存菜单
saveNeed() {
this.saveLoading = true
AddConsultantGoal(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()
}
})
},
//修改保存
saveTarget(){
if(this.value2){
let myDate = this.value2.split('-');
this.updateMsg.YearStr = myDate[0];
this.updateMsg.MonthStr = myDate[1];
}else{
this.updateMsg.YearStr = '';
this.updateMsg.MonthStr = '';
}
this.saveLoading = true;
UpdateConsultantGoal(this.updateMsg).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>
This diff is collapsed.
...@@ -285,7 +285,6 @@ export default { ...@@ -285,7 +285,6 @@ export default {
return obj return obj
}, },
choicedate(item,x,index,y){//点击某一个弹出 choicedate(item,x,index,y){//点击某一个弹出
console.log(item,x);
this.InfoMsg = { this.InfoMsg = {
index:index, index:index,
y:y, y:y,
......
...@@ -1422,7 +1422,6 @@ ...@@ -1422,7 +1422,6 @@
this.closeLayer() this.closeLayer()
}, },
getItemValue(obj, index) { getItemValue(obj, index) {
console.log(obj)
this.SpecialNode = obj.SpecialNode this.SpecialNode = obj.SpecialNode
this.addBtn = false; this.addBtn = false;
this.updateItemIndex = index; this.updateItemIndex = index;
......
...@@ -82,7 +82,6 @@ export default { ...@@ -82,7 +82,6 @@ export default {
this.outerVisible = false; this.outerVisible = false;
}, },
getsuccess2(list, type) { getsuccess2(list, type) {
console.log(list);
this.chosenUser = list; this.chosenUser = list;
this.outerVisible = false; this.outerVisible = false;
}, },
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
<q-tab :ripple="false" :name="4" label="收客渠道" /> <q-tab :ripple="false" :name="4" label="收客渠道" />
<q-tab :ripple="false" :name="5" label="客户需求"></q-tab> <q-tab :ripple="false" :name="5" label="客户需求"></q-tab>
<q-tab :ripple="false" :name="6" label="客户分配规则"></q-tab> <q-tab :ripple="false" :name="6" label="客户分配规则"></q-tab>
<q-tab :ripple="false" :name="7" label="目标管理"></q-tab>
</q-tabs> </q-tabs>
<stage v-if="tabCheck == 1"></stage> <stage v-if="tabCheck == 1"></stage>
<cusType v-if="tabCheck == 2"></cusType> <cusType v-if="tabCheck == 2"></cusType>
...@@ -20,6 +21,7 @@ ...@@ -20,6 +21,7 @@
<channel v-if="tabCheck == 4"></channel> <channel v-if="tabCheck == 4"></channel>
<customneed v-if="tabCheck == 5"></customneed> <customneed v-if="tabCheck == 5"></customneed>
<stu-distribution-rule v-if="tabCheck == 6"></stu-distribution-rule> <stu-distribution-rule v-if="tabCheck == 6"></stu-distribution-rule>
<stuTarget v-if="tabCheck==7"></stuTarget>
</div> </div>
</template> </template>
<script> <script>
...@@ -29,6 +31,7 @@ import aim from "./studyAim"; ...@@ -29,6 +31,7 @@ import aim from "./studyAim";
import channel from "./stuReceiveChannel"; import channel from "./stuReceiveChannel";
import customneed from "./customneed"; import customneed from "./customneed";
import stuDistributionRule from "./stuDistributionRule"; import stuDistributionRule from "./stuDistributionRule";
import stuTarget from "./stuTarget";
export default { export default {
components: { components: {
stage, stage,
...@@ -36,7 +39,8 @@ export default { ...@@ -36,7 +39,8 @@ export default {
aim, aim,
channel, channel,
customneed, customneed,
stuDistributionRule stuDistributionRule,
stuTarget
}, },
data() { data() {
return { return {
......
<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">
<el-date-picker v-model="dateTime" size="small" style="margin-right:10px;" type="month" value-format="yyyy-MM" @change="dateChange" placeholder="选择月">
</el-date-picker>
<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="deletTarget(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>
<target-form v-if="isShowTargetForm" :save-obj="customObj" @close="closestageForm" @success="refreshPage">
</target-form>
</div>
</template>
<script>
import {
GetConsultantGoalPage,
RemoveConsultantGoal
} from '../../api/system/index'
import targetForm from '../../components/system/target-form'
export default {
meta: {
title: "目标管理"
},
components: {
targetForm
},
data() {
return {
columns: [{
name: 'YearStr',
label: '年份',
field: 'YearStr',
align: 'left'
}, {
name: 'GoalMoney',
label: '金额',
field: 'GoalMoney',
align: 'left'
}, {
name: 'CreateBy',
label: '创建人',
align: 'left',
field: 'CreateBy'
}, {
name: 'Id',
label: '操作',
field: 'Id'
}],
msg: {
pageIndex: 1,
pageSize: 12,
YearStr: '',
MonthStr: '',
rowsPerPage: 12
},
dataList: [],
pageCount: 0,
loading: true,
isShowTargetForm: false,
customObj: {},
dateTime:''
}
},
mounted() {
this.getList()
},
methods: {
//选择日期
dateChange(val){
if(val){
let myDate = val.split('-');
this.msg.YearStr = myDate[0];
this.msg.MonthStr = myDate[1];
}else{
this.msg.YearStr = '';
this.msg.MonthStr = '';
}
this.getList();
},
//翻页
changePage(val) {
this.msg.pageIndex = val;
this.getList()
},
deletTarget(Id) {
let delMsg = {
Id: Id
};
this.$q.dialog({
title: '提示信息',
message: '是否确定该目标?',
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
RemoveConsultantGoal(delMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '删除成功!',
position: 'top'
})
this.getList();
}
})
}).onCancel(() => {
});
},
getList() {
this.loading = true;
GetConsultantGoalPage(this.msg).then(res => {
this.loading = false;
if (res.Code == 1) {
console.log(res, '数据');
this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}
})
},
closestageForm() {
this.isShowTargetForm = false
},
refreshPage() {
this.getList();
},
addObj(obj) {
if (obj) {
this.customObj = obj
} else {
this.customObj = null
}
this.isShowTargetForm = true;
}
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
...@@ -397,7 +397,6 @@ ...@@ -397,7 +397,6 @@
}, },
saveCourse2(){ saveCourse2(){
console.log(this.gaochouMsg)
setRemunerationState(this.gaochouMsg).then(res => { setRemunerationState(this.gaochouMsg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.$q.notify({ this.$q.notify({
......
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