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) { ...@@ -514,6 +514,47 @@ export function SetSynvEduEmployee(data) {
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 @@ ...@@ -46,7 +46,7 @@
</tr> </tr>
<tr v-if="isShowStudentAnswer"> <tr v-if="isShowStudentAnswer">
<td colspan="2" style="height:70px;"> <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" /> maxlength="20" @input="getQuestionScore" />
<span v-else class="v_singleQuestionBold">考生得分:{{data.StudentScore}}</span> <span v-else class="v_singleQuestionBold">考生得分:{{data.StudentScore}}</span>
</td> </td>
......
...@@ -132,8 +132,8 @@ ...@@ -132,8 +132,8 @@
</div> </div>
</template> </template>
<template v-if="item.OrderType==1"> <template v-if="item.OrderType==1">
<div v-if="item.CourseName">课程名称:{{item.CourseName}}</div> <div v-if="item.CourseName">课程名称{{item.CourseName}}</div>
<div v-if="item.CourseSubjectName">所属科目:{{item.CourseSubjectName}}</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"> <div v-if="item.JoinType==2" style="color:red;cursor:pointer">
插班报入 插班报入
  <q-tooltip :offset="[10, 10]">   <q-tooltip :offset="[10, 10]">
......
<template> <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"> <q-card-section class="row items-center q-pb-none">
<div class="text-h6">{{model.Id==0?"创建报价单":"修改报价单"}}</div> <div class="text-h6">{{model.Id==0?"创建报价单":"修改报价单"}}</div>
<q-space /> <q-space />
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
<span>选择课程</span> <span>选择课程</span>
</div> </div>
<div class="row"> <div class="row">
<div class="col"> <div class="col-3">
<q-select @input="getCourses" standout v-model="msg.CourseSubject" :options="CourseSubjectList" <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 /> option-label="Name" option-value="Id" emit-value map-options label="所属科目" clearable />
</div> </div>
<div class="col"> <div class="col">
...@@ -224,8 +224,8 @@ ...@@ -224,8 +224,8 @@
}, },
created() { created() {
this.queryCourseSubject();
this.queryCourseSubject() this.getCourses();
}, },
mounted() { mounted() {
this.initObj(); this.initObj();
...@@ -345,6 +345,7 @@ ...@@ -345,6 +345,7 @@
IsQPrice: 1, IsQPrice: 1,
CourseSubject: this.msg.CourseSubject, CourseSubject: this.msg.CourseSubject,
}; };
this.chosenCourse = null;
queryCourseDropdownList(qMsg).then(res => { queryCourseDropdownList(qMsg).then(res => {
this.courseList = res.Data; this.courseList = res.Data;
this.courseOptions = this.courseList; this.courseOptions = this.courseList;
......
...@@ -6,6 +6,11 @@ ...@@ -6,6 +6,11 @@
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.CourseName" label="课程名称" <q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.CourseName" label="课程名称"
@clear="resetSearch" maxlength="20" /> @clear="resetSearch" maxlength="20" />
</div> </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"> <div class="col-3">
<select-tree :treeData="TreeCategoryList" :defaultArray="returnString" nodeKey="CateId" :multiple="true" <select-tree :treeData="TreeCategoryList" :defaultArray="returnString" nodeKey="CateId" :multiple="true"
labelKey="CateName" childrenKey="ChildList" tipText="课程系列" @getChild="getChild"></select-tree> labelKey="CateName" childrenKey="ChildList" tipText="课程系列" @getChild="getChild"></select-tree>
...@@ -36,30 +41,6 @@ ...@@ -36,30 +41,6 @@
<span v-html="props.value"></span> <span v-html="props.value"></span>
</q-td> </q-td>
</template> </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"> <template v-slot:body-cell-PreferentialListSellCommission="props">
<q-td :props="props" style="padding-right:0px;padding-left:0px"> <q-td :props="props" style="padding-right:0px;padding-left:0px">
<div v-for="x in props.value"> <div v-for="x in props.value">
...@@ -137,10 +118,13 @@ ...@@ -137,10 +118,13 @@
import { import {
queryCoursePage, queryCoursePage,
queryCourseCategoryTree, queryCourseCategoryTree,
deleteCourseInfo deleteCourseInfo,
getCourseSubject
} from "../../api/course/index"; } from "../../api/course/index";
import selectTree from "../../components/common/select-tree"; import selectTree from "../../components/common/select-tree";
import { openURL } from "quasar"; import {
openURL
} from "quasar";
import { import {
mapState mapState
} from "vuex"; } from "vuex";
...@@ -160,7 +144,6 @@ ...@@ -160,7 +144,6 @@
field: "CoverImg", field: "CoverImg",
align: "left" align: "left"
}, },
{ {
name: "CourseName", name: "CourseName",
required: true, required: true,
...@@ -168,6 +151,13 @@ ...@@ -168,6 +151,13 @@
align: "left", align: "left",
field: row => row.CourseName field: row => row.CourseName
}, },
{
name: "CourseSubjectName",
required: true,
label: "所属科目",
align: "left",
field: (row) => row.CourseSubjectName,
},
{ {
name: "CateName", name: "CateName",
required: true, required: true,
...@@ -175,34 +165,6 @@ ...@@ -175,34 +165,6 @@
align: "left", align: "left",
field: row => row.CateName 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", name: "ClassHours",
label: "课时长度", label: "课时长度",
...@@ -210,12 +172,6 @@ ...@@ -210,12 +172,6 @@
align: "left", align: "left",
format: (val, row) => `${val}课时` format: (val, row) => `${val}课时`
}, },
// {
// name: "CreateByName",
// label: "创建人",
// field: "CreateByName",
// align: "left"
// },
{ {
name: "UpdateTimeStr", name: "UpdateTimeStr",
label: "更新时间", label: "更新时间",
...@@ -256,23 +212,33 @@ ...@@ -256,23 +212,33 @@
CourseName: "", CourseName: "",
QCateIds: "", QCateIds: "",
IsQPrice: 1, IsQPrice: 1,
Status: "0" Status: "0",
CourseSubject: "", //所属科目
}, },
//课程分类树形列表 //课程分类树形列表
TreeCategoryList: [], TreeCategoryList: [],
returnString: [], //默认值 returnString: [], //默认值
pageCount: 0, pageCount: 0,
CourseSubjectList: [], //科目列表
}; };
}, },
mounted() { 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.msg.CourseName = this.$route.query.Name
} }
this.queryCourseSubject()
this.getCategorytree(); this.getCategorytree();
this.currentUrl = this.$route.path; this.currentUrl = this.$route.path;
this.getcourselist(); this.getcourselist();
}, },
methods: { methods: {
queryCourseSubject() {
getCourseSubject({}).then(res => {
if (res.Code == 1) {
this.CourseSubjectList = res.Data;
}
})
},
gotoSub(obj, routeStr) { gotoSub(obj, routeStr) {
var tempStr = "/course/" + routeStr + "?CourseId=" + obj.CourseId; var tempStr = "/course/" + routeStr + "?CourseId=" + obj.CourseId;
this.$router.push({ this.$router.push({
...@@ -321,7 +287,7 @@ ...@@ -321,7 +287,7 @@
}, },
//跳转至我的课程 //跳转至我的课程
goMycourse(obj) { 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({ // this.$router.push({
// path: tempStr // path: tempStr
// }); // });
......
...@@ -138,8 +138,7 @@ ...@@ -138,8 +138,7 @@
</q-card-actions> </q-card-actions>
</div> </div>
<!-- 人员/部门选择 --> <!-- 人员/部门选择 -->
<choiceapprovalorbranch v-if="outerVisible" @close="outerVisible = false" @success="getsuccess2" :list=showMember <choiceapprovalorbranch v-if="outerVisible" @close="outerVisible = false" @success="getsuccess2" :list=showMember cptype="1"></choiceapprovalorbranch>
:byval='defaultlist' cptype="1"></choiceapprovalorbranch>
</div> </div>
</template> </template>
...@@ -147,7 +146,8 @@ ...@@ -147,7 +146,8 @@
import choiceapprovalorbranch from './components/choiceapprovalorbranch' import choiceapprovalorbranch from './components/choiceapprovalorbranch'
import { import {
getCustomerStageList, getCustomerStageList,
setCustomerStageFlowInfo setCustomerStageFlowInfo,
getCustomerStageFlowInfo
} from '../../../../api/system/wechat'; } from '../../../../api/system/wechat';
export default { export default {
meta: { meta: {
...@@ -176,9 +176,11 @@ ...@@ -176,9 +176,11 @@
UseStageName: [], UseStageName: [],
getheight: 270, getheight: 270,
gettypeoneList: [],//跟进阶段的数量 gettypeoneList: [],//跟进阶段的数量
FlowId: 0
} }
}, },
created() { created() {
this.getCustomerStageList() this.getCustomerStageList()
}, },
methods: { methods: {
...@@ -230,7 +232,6 @@ ...@@ -230,7 +232,6 @@
} else { } else {
data.InvalidCause = '' data.InvalidCause = ''
} }
console.log(data)
this.loading = true this.loading = true
setCustomerStageFlowInfo(data).then(res => { setCustomerStageFlowInfo(data).then(res => {
this.loading = false this.loading = false
...@@ -246,6 +247,37 @@ ...@@ -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() {
getCustomerStageList({}).then(res => { getCustomerStageList({}).then(res => {
this.loading = false this.loading = false
...@@ -264,13 +296,17 @@ ...@@ -264,13 +296,17 @@
this.getheight = 71 + Number(this.gettypeoneList.length) * 40 this.getheight = 71 + Number(this.gettypeoneList.length) * 40
} }
this.getusestageName() 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.showMember = list
this.outerVisible = false this.outerVisible = false
this.defaultlist = defaultlist // this.defaultlist = defaultlist
}, },
stageManagement() {//跳转到阶段管理 stageManagement() {//跳转到阶段管理
......
...@@ -42,12 +42,22 @@ ...@@ -42,12 +42,22 @@
<el-tree class='ApprovalProcessBg' :filter-node-method="filterNode" :data="memberList" <el-tree class='ApprovalProcessBg' :filter-node-method="filterNode" :data="memberList"
show-checkbox ref="treeUser" :props="defaultProps" :render-after-expand="false" show-checkbox ref="treeUser" :props="defaultProps" :render-after-expand="false"
node-key="DeptId" @check-change="handleNodeChange" @check='btncheck'> 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> </el-tree>
</div> </div>
<div style="width: 300px; margin: 0 20px;"> <div style="width: 300px; margin: 0 20px;">
<p style="margin: 0 0 20px 0;">已选:</p> <p style="margin: 0 0 20px 0;">已选:</p>
<div class="Approval_yxList"> <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)" <i @click="mySetCheckedKeys(item)"
class="el-icon-circle-close showMemberIcon"></i> class="el-icon-circle-close showMemberIcon"></i>
</li> </li>
...@@ -80,10 +90,10 @@ ...@@ -80,10 +90,10 @@
type: String, type: String,
default: '', default: '',
}, },
byval: { // byval: {
type: Array, // type: Array,
default: [], // default: [],
}, // },
cptype: {//1是列表上使用2 新增使用 cptype: {//1是列表上使用2 新增使用
type: String, type: String,
default: '1', default: '1',
...@@ -114,15 +124,14 @@ ...@@ -114,15 +124,14 @@
}, },
created() { created() {
this.IsShow = true this.IsShow = true
if (this.byval.length > 0) {
this.memberSetCheckedKeys = []; // if (this.byval.length > 0) {
this.showMember = JSON.parse(JSON.stringify(this.byval)) // this.memberSetCheckedKeys = [];
this.newList = JSON.parse(JSON.stringify(this.list)) // this.showMember = JSON.parse(JSON.stringify(this.byval))
// this.byval.forEach(x => {
this.byval.forEach(x => { // this.memberSetCheckedKeys.push(x.DeptId)
this.memberSetCheckedKeys.push(x.DeptId) // })
}) // }
}
this.getMember()//部门下面选择员工 this.getMember()//部门下面选择员工
}, },
mounted() { mounted() {
...@@ -134,12 +143,77 @@ ...@@ -134,12 +143,77 @@
}, },
}, },
methods: { 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() { getMember() {
let _arr = this.sysUserKeys.concat(this.memberSetCheckedKeys)
getEmployeeAddrBook({}).then(res => { getEmployeeAddrBook({}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.memberList = res.Data this.memberList = res.Data
let _this = this; 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); _this.$refs.treeUser.setCheckedKeys(_arr);
} }
}).catch(() => { }).catch(() => {
...@@ -268,9 +342,13 @@ ...@@ -268,9 +342,13 @@
} }
}else{ }else{
this.qudiaoziji2(x.ChildList,id) this.qudiaoziji2(x.ChildList,id)
} }
}) })
this.memberSetCheckedKeys = this.arrayWeightRemoval(this.memberSetCheckedKeys,this.rightobj) this.memberSetCheckedKeys = this.arrayWeightRemoval(this.memberSetCheckedKeys,this.rightobj)
}, },
qudiaoziji_t(ChildList) { qudiaoziji_t(ChildList) {
...@@ -282,21 +360,24 @@ ...@@ -282,21 +360,24 @@
}) })
}, },
qudiaoziji2(ChildList,id){ qudiaoziji2(ChildList,id){
ChildList.forEach(x=>{ if(ChildList && ChildList.length>0){
if(x.DeptId == id){ ChildList.forEach(x=>{
if (x.ChildList && x.ChildList.length > 0) { if(x.DeptId == id){
x.ChildList.forEach(j => { if (x.ChildList && x.ChildList.length > 0) {
this.rightobj.push(j.DeptId) x.ChildList.forEach(j => {
if(j.ChildList && j.ChildList.length>0){ this.rightobj.push(j.DeptId)
this.qudiaoziji_t(j.ChildList) 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) { arrayWeightRemoval(array1,array2) {
//临时数组存放 //临时数组存放
...@@ -321,7 +402,7 @@ ...@@ -321,7 +402,7 @@
this.$emit('close') this.$emit('close')
}, },
saveOrderInfo() { saveOrderInfo() {
this.$emit('success', this.newList,this.showMember) this.$emit('success', this.newList)
} }
......
...@@ -27,18 +27,23 @@ ...@@ -27,18 +27,23 @@
<tr v-for="(item,index) in data" :key="index"> <tr v-for="(item,index) in data" :key="index">
<td><span>{{item.FlowName}}</span></td> <td><span>{{item.FlowName}}</span></td>
<td> <td>
<span v-for="(x,y) in item.DeptEmpList" :key='y'> <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="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 type="success" v-if="x.Type==1">{{x.Name}}</el-tag> -->
<el-tag v-if="x.Type==2">{{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>
<span v-else>未适配其他规则的阶段</span>
</td> </td>
<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 /> icon="lock" disable />
<q-toggle v-else v-model="item.Enable" :true-value="1" :false-value="2" <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>
<td> <td>
<span v-for="(x,y) in item.StageList" :key='y'> <span v-for="(x,y) in item.StageList" :key='y'>
...@@ -53,7 +58,7 @@ ...@@ -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" <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)" /> label="编辑" @click="goedit(item)" />
<q-btn v-if='item.IsDefault!=1' flat size="xs" icon="delete" color="negative" class="q-mr-xs" <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> </td>
</tr> </tr>
...@@ -71,7 +76,7 @@ ...@@ -71,7 +76,7 @@
import addfield from "./components/addfield" import addfield from "./components/addfield"
import { import {
getCustomerStageFlowList, getCustomerStageFlowList,
setCustomerStageFlowState
} from '../../../../api/system/wechat'; } from '../../../../api/system/wechat';
//部门 //部门
import { import {
...@@ -106,31 +111,17 @@ ...@@ -106,31 +111,17 @@
this.addMsg = null this.addMsg = null
}, },
goedit(item) { goedit(item) {
this.Isadd = true; this.$router.push({
this.addMsg = JSON.parse(JSON.stringify(item)) path: '/enterprise/customer/CSChild/addPhase',
}, query: {
godelete(item, type, index) {//删除 FlowId: item.Id
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
} }
} else if (type == 3) { });
text = '删除后字段不在显示,是否删除?' },
} godelete(item) {//删除
this.$q.dialog({ this.$q.dialog({
title: "提示信息", title: "提示信息",
message: text, message: '是否删除该阶段流程',
cancel: { cancel: {
label: "取消", label: "取消",
flat: true flat: true
...@@ -141,18 +132,18 @@ ...@@ -141,18 +132,18 @@
focus: true focus: true
} }
}).onOk(() => { }).onOk(() => {
this.setFiledState(item, type) this.setFiledState(item,2)
}); });
}, },
setFiledState(item, Type) { setFiledState(item,Type) {
console.log('2')
let msg = { let msg = {
Type: Type, Type: Type,
FiledId: item.Id, FlowId: item.Id,
SortFiledId: 0,
} }
setCustomerFiledState(msg).then(res => { setCustomerStageFlowState(msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.$q.notify({ this.$q.notify({
icon: 'iconfont icon-chenggong', icon: 'iconfont icon-chenggong',
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<q-input clearable debounce filled maxlength="10" counter v-model="x.Name" style="width:500px" <q-input clearable debounce filled maxlength="10" counter v-model="x.Name" style="width:500px"
@input="$forceUpdate()" placeholder="名称" :rules="[val => !!val || '不能为空']" /> @input="$forceUpdate()" placeholder="名称" :rules="[val => !!val || '不能为空']" />
<q-btn flat size="sm" icon="delete" color="negative" class="q-mr-xs" style="margin-left: 10px;" label="" <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> </li>
</div> </div>
</ul> </ul>
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
<q-input clearable debounce filled maxlength="10" counter v-model="item.Name" style="width:500px" <q-input clearable debounce filled maxlength="10" counter v-model="item.Name" style="width:500px"
@input="$forceUpdate()" placeholder="名称" :rules="[val => !!val || '不能为空']" /> @input="$forceUpdate()" placeholder="名称" :rules="[val => !!val || '不能为空']" />
<q-btn flat size="sm" icon="delete" color="negative" class="q-mr-xs" style="margin-left: 10px;" label="" <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> </li>
</draggable> </draggable>
</ul> </ul>
...@@ -116,7 +116,9 @@ ...@@ -116,7 +116,9 @@
import draggable from "vuedraggable" import draggable from "vuedraggable"
import { import {
getCustomerStageList, getCustomerStageList,
setCustomerStageInfo setCustomerStageInfo,
validataCustomerStageDel,
validataCustomerCauseDel
} from '../../../../api/system/wechat'; } from '../../../../api/system/wechat';
export default { export default {
meta: { meta: {
...@@ -218,9 +220,12 @@ ...@@ -218,9 +220,12 @@
return return
break 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++) { for (let j = 0; j < x.OptionsList.length; j++) {
let z = x.OptionsList[j] let z = x.OptionsList[j]
z.Id=j+1
if (z.Name == '') { if (z.Name == '') {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
...@@ -231,6 +236,10 @@ ...@@ -231,6 +236,10 @@
return return
break break
} }
if(z.Id==0){
z.Id = maxnum+1;
maxnum++
}
} }
} }
this.addMsg = [] this.addMsg = []
...@@ -253,6 +262,46 @@ ...@@ -253,6 +262,46 @@
this.loading = false 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> </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