Commit 0378047c authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/luochao/confucius into master

parents 6e4f18d1 7df1e675
......@@ -514,6 +514,47 @@ export function SetSynvEduEmployee(data) {
data
})
}
/**
* 获取客户阶段流程详情
*
*/
export function getCustomerStageFlowInfo(data) {
return request({
url: '/QYCustomer/GetCustomerStageFlowInfo',
method: 'post',
data
})
}
/**
* 设置客户阶段流程状态
*/
export function setCustomerStageFlowState(data) {
return request({
url: '/QYCustomer/SetCustomerStageFlowState',
method: 'post',
data
})
}
/**
* 验证该阶段是否可以删除
*/
export function validataCustomerStageDel(data) {
return request({
url: '/QYCustomer/ValidataCustomerStageDel',
method: 'post',
data
})
}
/**
* 验证阶段输单/无效的 原因选项是否可以删除
*/
export function validataCustomerCauseDel(data) {
return request({
url: '/QYCustomer/ValidataCustomerCauseDel',
method: 'post',
data
})
}
......
......@@ -46,7 +46,7 @@
</tr>
<tr v-if="isShowStudentAnswer">
<td colspan="2" style="height:70px;">
<q-input v-if="isEditStudentScore" filled v-model="data.StudentScore" label="得分:"
<q-input v-if="isEditStudentScore" style="width:180px" filled v-model="data.StudentScore" label="得分:"
maxlength="20" @input="getQuestionScore" />
<span v-else class="v_singleQuestionBold">考生得分:{{data.StudentScore}}</span>
</td>
......
......@@ -132,8 +132,8 @@
</div>
</template>
<template v-if="item.OrderType==1">
<div v-if="item.CourseName">课程名称:{{item.CourseName}}</div>
<div v-if="item.CourseSubjectName">所属科目:{{item.CourseSubjectName}}</div>
<div v-if="item.CourseName">课程名称{{item.CourseName}}</div>
<div v-if="item.CourseSubjectName">所属科目<span style="color:green;">{{item.CourseSubjectName}}</span></div>
<div v-if="item.JoinType==2" style="color:red;cursor:pointer">
插班报入
  <q-tooltip :offset="[10, 10]">
......
<template>
<q-card class="q-px-md" style="width:750px;max-width:800px;">
<q-card class="q-px-md" style="width:800px;max-width:800px;">
<q-card-section class="row items-center q-pb-none">
<div class="text-h6">{{model.Id==0?"创建报价单":"修改报价单"}}</div>
<q-space />
......@@ -53,8 +53,8 @@
<span>选择课程</span>
</div>
<div class="row">
<div class="col">
<q-select @input="getCourses" standout v-model="msg.CourseSubject" :options="CourseSubjectList"
<div class="col-3">
<q-select @input="getCourses" dense standout behavior="menu" class="q-mr-md" filled v-model="msg.CourseSubject" :options="CourseSubjectList"
option-label="Name" option-value="Id" emit-value map-options label="所属科目" clearable />
</div>
<div class="col">
......@@ -224,8 +224,8 @@
},
created() {
this.queryCourseSubject()
this.queryCourseSubject();
this.getCourses();
},
mounted() {
this.initObj();
......@@ -345,6 +345,7 @@
IsQPrice: 1,
CourseSubject: this.msg.CourseSubject,
};
this.chosenCourse = null;
queryCourseDropdownList(qMsg).then(res => {
this.courseList = res.Data;
this.courseOptions = this.courseList;
......
......@@ -6,6 +6,11 @@
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.CourseName" label="课程名称"
@clear="resetSearch" maxlength="20" />
</div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.CourseSubject"
:options="CourseSubjectList" option-label="Name" option-value="Id" emit-value map-options label="所属科目"
clearable />
</div>
<div class="col-3">
<select-tree :treeData="TreeCategoryList" :defaultArray="returnString" nodeKey="CateId" :multiple="true"
labelKey="CateName" childrenKey="ChildList" tipText="课程系列" @getChild="getChild"></select-tree>
......@@ -36,30 +41,6 @@
<span v-html="props.value"></span>
</q-td>
</template>
<!-- <template v-slot:body-cell-PreferentialList="props">
<q-td :props="props" style="padding-right:0px">
<div v-for="x in props.value">
<div class="border-bottom" v-if="x.PriceDiscountType == 1">
买{{ x.BuyNum }}送{{ x.SendNum }}
</div>
<div class="border-bottom" v-if="x.PriceDiscountType == 2">
单人报名享优惠{{x.PriceMoney }}%
</div>
<div class="border-bottom" v-if="x.PriceDiscountType == 3">
双人报名优惠{{x.PriceMoney }}%
</div>
<div class="border-bottom" v-if="x.PriceDiscountType == 4">
续费享优惠{{x.PriceMoney }}%
</div>
<div class="remark-font" v-if="x.PriceDiscountType == 0">
暂无优惠政策
</div>
</div>
<div v-if="!props.value || props.value.length == 0">
<div class="remark-font">暂无优惠政策</div>
</div>
</q-td>
</template> -->
<template v-slot:body-cell-PreferentialListSellCommission="props">
<q-td :props="props" style="padding-right:0px;padding-left:0px">
<div v-for="x in props.value">
......@@ -137,10 +118,13 @@
import {
queryCoursePage,
queryCourseCategoryTree,
deleteCourseInfo
deleteCourseInfo,
getCourseSubject
} from "../../api/course/index";
import selectTree from "../../components/common/select-tree";
import { openURL } from "quasar";
import {
openURL
} from "quasar";
import {
mapState
} from "vuex";
......@@ -160,7 +144,6 @@
field: "CoverImg",
align: "left"
},
{
name: "CourseName",
required: true,
......@@ -168,6 +151,13 @@
align: "left",
field: row => row.CourseName
},
{
name: "CourseSubjectName",
required: true,
label: "所属科目",
align: "left",
field: (row) => row.CourseSubjectName,
},
{
name: "CateName",
required: true,
......@@ -175,34 +165,6 @@
align: "left",
field: row => row.CateName
},
// {
// name: "PreferentialList",
// required: true,
// label: "优惠政策",
// align: "left",
// field: row => row.PreferentialList
// },
// {
// name: "PreferentialListSellCommission",
// required: true,
// label: "销售佣金",
// align: "left",
// field: row => row.PreferentialList
// },
// {
// name: "PreferentialListB2BCommission",
// required: true,
// label: "同行佣金",
// align: "left",
// field: row => row.PreferentialList
// },
// {
// name: "EducationCommission",
// required: true,
// label: "教育同行佣金",
// align: "left",
// field: row => row.PreferentialList
// },
{
name: "ClassHours",
label: "课时长度",
......@@ -210,12 +172,6 @@
align: "left",
format: (val, row) => `${val}课时`
},
// {
// name: "CreateByName",
// label: "创建人",
// field: "CreateByName",
// align: "left"
// },
{
name: "UpdateTimeStr",
label: "更新时间",
......@@ -256,23 +212,33 @@
CourseName: "",
QCateIds: "",
IsQPrice: 1,
Status: "0"
Status: "0",
CourseSubject: "", //所属科目
},
//课程分类树形列表
TreeCategoryList: [],
returnString: [], //默认值
pageCount: 0,
CourseSubjectList: [], //科目列表
};
},
mounted() {
if(this.$route.query && this.$route.query.Name){//从订单完成统计跳转过来的带的参数
if (this.$route.query && this.$route.query.Name) { //从订单完成统计跳转过来的带的参数
this.msg.CourseName = this.$route.query.Name
}
this.queryCourseSubject()
this.getCategorytree();
this.currentUrl = this.$route.path;
this.getcourselist();
},
methods: {
queryCourseSubject() {
getCourseSubject({}).then(res => {
if (res.Code == 1) {
this.CourseSubjectList = res.Data;
}
})
},
gotoSub(obj, routeStr) {
var tempStr = "/course/" + routeStr + "?CourseId=" + obj.CourseId;
this.$router.push({
......@@ -321,7 +287,7 @@
},
//跳转至我的课程
goMycourse(obj) {
var tempStr = window.location.origin +"/#/course/courseinfo?CourseId=" + obj.CourseId;
var tempStr = window.location.origin + "/#/course/courseinfo?CourseId=" + obj.CourseId;
// this.$router.push({
// path: tempStr
// });
......
......@@ -138,8 +138,7 @@
</q-card-actions>
</div>
<!-- 人员/部门选择 -->
<choiceapprovalorbranch v-if="outerVisible" @close="outerVisible = false" @success="getsuccess2" :list=showMember
:byval='defaultlist' cptype="1"></choiceapprovalorbranch>
<choiceapprovalorbranch v-if="outerVisible" @close="outerVisible = false" @success="getsuccess2" :list=showMember cptype="1"></choiceapprovalorbranch>
</div>
</template>
......@@ -147,7 +146,8 @@
import choiceapprovalorbranch from './components/choiceapprovalorbranch'
import {
getCustomerStageList,
setCustomerStageFlowInfo
setCustomerStageFlowInfo,
getCustomerStageFlowInfo
} from '../../../../api/system/wechat';
export default {
meta: {
......@@ -176,9 +176,11 @@
UseStageName: [],
getheight: 270,
gettypeoneList: [],//跟进阶段的数量
FlowId: 0
}
},
created() {
this.getCustomerStageList()
},
methods: {
......@@ -230,7 +232,6 @@
} else {
data.InvalidCause = ''
}
console.log(data)
this.loading = true
setCustomerStageFlowInfo(data).then(res => {
this.loading = false
......@@ -246,6 +247,37 @@
}
})
},
getdetails() {//获取详情
getCustomerStageFlowInfo({ FlowId: this.FlowId }).then(res => {
if (res.Code == 1) {
this.addMsg = res.Data
if (this.addMsg.UseStage.length !='') {
this.addMsg.UseStage = this.addMsg.UseStage.split(',').map(Number)
} else {
this.addMsg.UseStage = []
}
if (this.addMsg.LoseCause.length !='') {
this.addMsg.LoseCause = this.addMsg.LoseCause.split(',').map(Number)
} else {
this.addMsg.LoseCause = []
}
if (this.addMsg.InvalidCause.length !='') {
this.addMsg.InvalidCause = this.addMsg.InvalidCause.split(',').map(Number)
} else {
this.addMsg.InvalidCause = []
}
this.showMember = []
this.addMsg.DeptEmpList.forEach(x=>{
let obj = {
DeptId: x.Id,
DeptName: x.Name,
DataType: x.Type,
}
this.showMember.push(obj)
})
}
})
},
getCustomerStageList() {
getCustomerStageList({}).then(res => {
this.loading = false
......@@ -264,13 +296,17 @@
this.getheight = 71 + Number(this.gettypeoneList.length) * 40
}
this.getusestageName()
if (this.$route.query && this.$route.query.FlowId) {//如果有的话 调接口
this.FlowId = this.$route.query.FlowId
this.getdetails()
}
}
})
},
getsuccess2(list, defaultlist) {
getsuccess2(list) {
this.showMember = list
this.outerVisible = false
this.defaultlist = defaultlist
// this.defaultlist = defaultlist
},
stageManagement() {//跳转到阶段管理
......
......@@ -42,12 +42,22 @@
<el-tree class='ApprovalProcessBg' :filter-node-method="filterNode" :data="memberList"
show-checkbox ref="treeUser" :props="defaultProps" :render-after-expand="false"
node-key="DeptId" @check-change="handleNodeChange" @check='btncheck'>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span>
<i class="el-icon-folder" v-if="data.DataType==1" style="margin-right: 3px;color: var(--q-color-primary)!important;"></i>
<i class="el-icon-user-solid" v-if="data.DataType==2" style="margin-right: 3px;color: var(--q-color-primary)!important;"></i>
{{ node.label }}
</span>
</span>
</el-tree>
</div>
<div style="width: 300px; margin: 0 20px;">
<p style="margin: 0 0 20px 0;">已选:</p>
<div class="Approval_yxList">
<li v-for="item in newList">{{item.DeptName}}
<li v-for="item in newList">
<i v-if="item.DataType==1" class="el-icon-folder" style="margin-right: 3px;color: var(--q-color-primary)!important;"></i>
<i v-if="item.DataType==2" class="el-icon-user-solid" style="margin-right: 3px;color: var(--q-color-primary)!important;"></i>
{{item.DeptName}}
<i @click="mySetCheckedKeys(item)"
class="el-icon-circle-close showMemberIcon"></i>
</li>
......@@ -80,10 +90,10 @@
type: String,
default: '',
},
byval: {
type: Array,
default: [],
},
// byval: {
// type: Array,
// default: [],
// },
cptype: {//1是列表上使用2 新增使用
type: String,
default: '1',
......@@ -114,15 +124,14 @@
},
created() {
this.IsShow = true
if (this.byval.length > 0) {
this.memberSetCheckedKeys = [];
this.showMember = JSON.parse(JSON.stringify(this.byval))
this.newList = JSON.parse(JSON.stringify(this.list))
this.byval.forEach(x => {
this.memberSetCheckedKeys.push(x.DeptId)
})
}
// if (this.byval.length > 0) {
// this.memberSetCheckedKeys = [];
// this.showMember = JSON.parse(JSON.stringify(this.byval))
// this.byval.forEach(x => {
// this.memberSetCheckedKeys.push(x.DeptId)
// })
// }
this.getMember()//部门下面选择员工
},
mounted() {
......@@ -134,12 +143,77 @@
},
},
methods: {
huoqucheckedkey(){//根据传过来的list 数据处理
let newList = this.newList;
this.memberList.forEach(x=>{
newList.forEach(z=>{
if(x.DeptId == z.DeptId){
this.memberSetCheckedKeys.push(x.DeptId)
this.showMember.push(x)
if(x.ChildList && x.ChildList.length>0){
x.ChildList.forEach(j => {
this.memberSetCheckedKeys.push(j.DeptId)
this.showMember.push(j)
if(j.ChildList && j.ChildList.length>0){
this.huoqucheckedkey_yes(j.ChildList)
}
})
}
}else{
this.huoqucheckedkey_no(x.ChildList,z.DeptId)
}
})
})
},
huoqucheckedkey_no(ChildList,id){
if(ChildList && ChildList.length>0){
ChildList.forEach(x=>{
if(x.DeptId == id){
this.memberSetCheckedKeys.push(x.DeptId)
this.showMember.push(x)
if (x.ChildList && x.ChildList.length > 0) {
x.ChildList.forEach(j => {
this.memberSetCheckedKeys.push(j.DeptId)
this.showMember.push(j)
if(j.ChildList && j.ChildList.length>0){
this.huoqucheckedkey_yes(j.ChildList)
}
})
}
}else{
this.huoqucheckedkey_no(x.ChildList,id)
}
})
}
},
huoqucheckedkey_yes(ChildList){
ChildList.forEach(j => {
this.memberSetCheckedKeys.push(j.DeptId)
this.showMember.push(j)
if(j.ChildList && j.ChildList.length>0){
this.huoqucheckedkey_yes(j.ChildList)
}
})
},
getMember() {
let _arr = this.sysUserKeys.concat(this.memberSetCheckedKeys)
getEmployeeAddrBook({}).then(res => {
if (res.Code == 1) {
this.memberList = res.Data
let _this = this;
if(this.list.length>0){
this.memberSetCheckedKeys = [];
this.showMember = []
this.newList = JSON.parse(JSON.stringify(this.list))
this.huoqucheckedkey()
console.log( this.memberSetCheckedKeys)
console.log( this.showMember)
}
let _arr = this.sysUserKeys.concat(this.memberSetCheckedKeys)
_this.$refs.treeUser.setCheckedKeys(_arr);
}
}).catch(() => {
......@@ -268,9 +342,13 @@
}
}else{
this.qudiaoziji2(x.ChildList,id)
}
})
this.memberSetCheckedKeys = this.arrayWeightRemoval(this.memberSetCheckedKeys,this.rightobj)
},
qudiaoziji_t(ChildList) {
......@@ -282,21 +360,24 @@
})
},
qudiaoziji2(ChildList,id){
ChildList.forEach(x=>{
if(x.DeptId == id){
if (x.ChildList && x.ChildList.length > 0) {
x.ChildList.forEach(j => {
this.rightobj.push(j.DeptId)
if(j.ChildList && j.ChildList.length>0){
this.qudiaoziji_t(j.ChildList)
}
})
if(ChildList && ChildList.length>0){
ChildList.forEach(x=>{
if(x.DeptId == id){
if (x.ChildList && x.ChildList.length > 0) {
x.ChildList.forEach(j => {
this.rightobj.push(j.DeptId)
if(j.ChildList && j.ChildList.length>0){
this.qudiaoziji_t(j.ChildList)
}
})
}
}else{
this.qudiaoziji2(x.ChildList,id)
}
}else{
this.qudiaoziji2(x.ChildList,id)
}
})
})
}
},
arrayWeightRemoval(array1,array2) {
//临时数组存放
......@@ -321,7 +402,7 @@
this.$emit('close')
},
saveOrderInfo() {
this.$emit('success', this.newList,this.showMember)
this.$emit('success', this.newList)
}
......
......@@ -27,18 +27,23 @@
<tr v-for="(item,index) in data" :key="index">
<td><span>{{item.FlowName}}</span></td>
<td>
<span v-for="(x,y) in item.DeptEmpList" :key='y'>
<el-tag type="danger" v-if="x.Type==0">{{x.Name}}</el-tag>
<el-tag type="success" v-if="x.Type==1">{{x.Name}}</el-tag>
<el-tag v-if="x.Type==2">{{x.Name}}</el-tag>
<span v-if='item.DeptEmpList && item.DeptEmpList.length>0' v-for="(x,y) in item.DeptEmpList" :key='y'>
<!-- <el-tag type="danger" v-if="x.Type==0">{{x.Name}}</el-tag>
<el-tag type="success" v-if="x.Type==1">{{x.Name}}</el-tag> -->
<el-tag style="margin-right: 15px;margin-bottom: 5px;" v-if="x.Type==1"><i class="el-icon-folder"
style="margin-right: 3px;"></i>{{x.Name}}</el-tag>
<el-tag style="margin-right: 15px;margin-bottom: 5px" type="success" v-if="x.Type==2"><i class="el-icon-user-solid"
style="margin-right: 3px;"></i>{{x.Name}}</el-tag>
<el-tag v-if="x.Type==0">{{x.Name}}</el-tag>
</span>
<span v-else>未适配其他规则的阶段</span>
</td>
<td>
<q-toggle v-if="item.IsDefault==1" v-model="item.Enable" :true-value="1" :false-value="2"
<q-toggle v-if="item.IsDefault==1" v-model="item.Enable" :true-value="1" :false-value="2"
icon="lock" disable />
<q-toggle v-else v-model="item.Enable" :true-value="1" :false-value="2"
@input="godelete(item,1,index)" />
@input="setFiledState(item,1)" />
</td>
<td>
<span v-for="(x,y) in item.StageList" :key='y'>
......@@ -53,7 +58,7 @@
<q-btn v-if='item.IsDefault!=1' flat size="xs" icon="edit" style="font-weight:400;color: #3FC4FF" class="q-mr-xs"
label="编辑" @click="goedit(item)" />
<q-btn v-if='item.IsDefault!=1' flat size="xs" icon="delete" color="negative" class="q-mr-xs"
label="删除" @click="godelete(item,3,index)" />
label="删除" @click="godelete(item)" />
</td>
</tr>
......@@ -71,7 +76,7 @@
import addfield from "./components/addfield"
import {
getCustomerStageFlowList,
setCustomerStageFlowState
} from '../../../../api/system/wechat';
//部门
import {
......@@ -106,31 +111,17 @@
this.addMsg = null
},
goedit(item) {
this.Isadd = true;
this.addMsg = JSON.parse(JSON.stringify(item))
},
godelete(item, type, index) {//删除
let text = ''
if (type == 1) {//tyep等于1和2的时候 先让弹出提示 然后再给予掉接口 所以把原本的值暂时先赋值给本身
text = '确定修改启用状态'
if (item.Enable == 2) {
this.data[index].Enable = 1
} else {
this.data[index].Enable = 2
}
} else if (type == 2) {
text = '确定修改必填状态'
if (item.Required == 2) {
this.data[index].Required = 1
} else {
this.data[index].Required = 2
this.$router.push({
path: '/enterprise/customer/CSChild/addPhase',
query: {
FlowId: item.Id
}
} else if (type == 3) {
text = '删除后字段不在显示,是否删除?'
}
});
},
godelete(item) {//删除
this.$q.dialog({
title: "提示信息",
message: text,
message: '是否删除该阶段流程',
cancel: {
label: "取消",
flat: true
......@@ -141,18 +132,18 @@
focus: true
}
}).onOk(() => {
this.setFiledState(item, type)
this.setFiledState(item,2)
});
},
setFiledState(item, Type) {
setFiledState(item,Type) {
console.log('2')
let msg = {
Type: Type,
FiledId: item.Id,
SortFiledId: 0,
FlowId: item.Id,
}
setCustomerFiledState(msg).then(res => {
setCustomerStageFlowState(msg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
......
......@@ -49,7 +49,7 @@
<q-input clearable debounce filled maxlength="10" counter v-model="x.Name" style="width:500px"
@input="$forceUpdate()" placeholder="名称" :rules="[val => !!val || '不能为空']" />
<q-btn flat size="sm" icon="delete" color="negative" class="q-mr-xs" style="margin-left: 10px;" label=""
@click="followupStage.splice(y,1)" />
@click="getStageDel(x,y)" />
</li>
</div>
</ul>
......@@ -89,7 +89,7 @@
<q-input clearable debounce filled maxlength="10" counter v-model="item.Name" style="width:500px"
@input="$forceUpdate()" placeholder="名称" :rules="[val => !!val || '不能为空']" />
<q-btn flat size="sm" icon="delete" color="negative" class="q-mr-xs" style="margin-left: 10px;" label=""
@click="reasonList[y].OptionsList.splice(index,1)" />
@click="setCauseDel(y,index,x,item)" />
</li>
</draggable>
</ul>
......@@ -116,7 +116,9 @@
import draggable from "vuedraggable"
import {
getCustomerStageList,
setCustomerStageInfo
setCustomerStageInfo,
validataCustomerStageDel,
validataCustomerCauseDel
} from '../../../../api/system/wechat';
export default {
meta: {
......@@ -218,9 +220,12 @@
return
break
}
let list = JSON.parse(JSON.stringify(x.OptionsList))
let maxnum = list.sort((a, b) => { return b.Id-a.Id })[0].Id
for (let j = 0; j < x.OptionsList.length; j++) {
let z = x.OptionsList[j]
z.Id=j+1
if (z.Name == '') {
this.$q.notify({
type: 'negative',
......@@ -231,6 +236,10 @@
return
break
}
if(z.Id==0){
z.Id = maxnum+1;
maxnum++
}
}
}
this.addMsg = []
......@@ -253,6 +262,46 @@
this.loading = false
})
},
getStageDel(x,index){//判断阶段是否能删除
validataCustomerStageDel({StageId:x.Id}).then(res => {
if(res.Code==1){
if(res.Data.UseState==false){
this.followupStage.splice(index,1)
}else{
this.$q.notify({
type: 'negative',
message: '不能删除',
position: 'top'
})
}
}
}).catch((e) => {
})
},
setCauseDel(y,index,x,item){//验证阶段输单/无效的 原因选项是否可以删除
console.log(y,index,x,item)
let Type = 1
if(x.Name=='无效')Type =2
let data = {
CauseId:item.Id,
Type:Type
}
validataCustomerCauseDel(data).then(res => {
if(res.Code==1){
if(res.Data.UseState==false){
this.reasonList[y].OptionsList.splice(index,1)
}else{
this.$q.notify({
type: 'negative',
message: '不能删除',
position: 'top'
})
}
}
}).catch((e) => {
})
}
}
}
</script>
\ No newline at end of file
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