【修改】修改批量同意不同意 以及列表同意不同意
This commit is contained in:
@@ -114,25 +114,34 @@
|
|||||||
// 所有流程的完成任务
|
// 所有流程的完成任务
|
||||||
completeProcess(obj) {
|
completeProcess(obj) {
|
||||||
this.$api.process.completeTask(obj).then(res=>{
|
this.$api.process.completeTask(obj).then(res=>{
|
||||||
this.$message['success']('提交成功')
|
if(this.$route.path=='/userCenter/processCenter'){
|
||||||
this.$router.push({
|
this.loadData()
|
||||||
path:"/userCenter/processCenter",
|
}else {
|
||||||
query:{
|
this.$message['success']('提交成功')
|
||||||
id:'AEHJB8YNJ3'
|
this.$router.push({
|
||||||
|
path: "/userCenter/processCenter",
|
||||||
|
query: {
|
||||||
|
id: 'AEHJB8YNJ3'
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 所有流程的完成任务
|
// 所有流程的完成任务
|
||||||
completeProcessALL(obj) {
|
completeProcessALL(obj) {
|
||||||
this.$api.process.completeTaskALL(obj).then(res=>{
|
this.$api.process.completeTaskALL(obj).then(res=>{
|
||||||
this.$message['success']('提交成功')
|
if(this.$route.path=='/userCenter/processCenter'){
|
||||||
this.$router.push({
|
this.reset()
|
||||||
path:"/userCenter/processCenter",
|
}else{
|
||||||
query:{
|
this.$message['success']('提交成功')
|
||||||
id:'AEHJB8YNJ3'
|
this.$router.push({
|
||||||
}
|
path:"/userCenter/processCenter",
|
||||||
})
|
query:{
|
||||||
|
id:'AEHJB8YNJ3',
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取流程详细信息
|
// 获取流程详细信息
|
||||||
|
|||||||
@@ -39,13 +39,14 @@
|
|||||||
<div class="tabs">
|
<div class="tabs">
|
||||||
<tabs @clearForm="reset"/>
|
<tabs @clearForm="reset"/>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog title="审核意见" width="20%" :visible.sync="dialogVisible" >
|
<el-dialog title="审核意见" width="20%" :visible.sync="dialogVisible"
|
||||||
|
@close="cancel">
|
||||||
<el-form ref="examineForm"
|
<el-form ref="examineForm"
|
||||||
:model="approveForm"
|
:model="approveForm"
|
||||||
:rules="approveFormRules"
|
|
||||||
size="medium"
|
size="medium"
|
||||||
class="label-input-form prc-content-border approveForm">
|
class="label-input-form prc-content-border approveForm">
|
||||||
<el-form-item label-width="132px" class="add-form-item" prop="approvalOpinion">
|
<el-form-item label-width="132px" class="add-form-item" prop="approvalOpinion"
|
||||||
|
:rules="[{required:flag==1?false:true,message:'请输入审核意见',trigger:'change'}]">
|
||||||
<template slot="label">审核意见:</template>
|
<template slot="label">审核意见:</template>
|
||||||
<el-input :maxlength='1000'
|
<el-input :maxlength='1000'
|
||||||
v-model="approveForm.approvalOpinion"
|
v-model="approveForm.approvalOpinion"
|
||||||
@@ -88,10 +89,17 @@ import tabs from '../userCenter/processCenter/tabs.vue'
|
|||||||
prcName:''
|
prcName:''
|
||||||
},
|
},
|
||||||
checkList:[],
|
checkList:[],
|
||||||
flag:1,//是不是同意
|
flag:'',//是不是同意
|
||||||
isShowbtn:this.$store.getters.activeTab =='' || this.$store.getters.activeTab =='first'
|
isShowbtn:this.$store.getters.activeTab =='' || this.$store.getters.activeTab =='first'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch:{
|
||||||
|
// dialogVisible(value){
|
||||||
|
// if(!value && this.flag){
|
||||||
|
// this.reset()
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
},
|
||||||
created () {
|
created () {
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
@@ -105,36 +113,61 @@ import tabs from '../userCenter/processCenter/tabs.vue'
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
cancel(){
|
cancel(){
|
||||||
|
this.flag = ''
|
||||||
this.dialogVisible=false
|
this.dialogVisible=false
|
||||||
},
|
},
|
||||||
submitForm(){
|
submitForm(){
|
||||||
this.$refs.examineForm.validate(v=>{
|
this.$refs.examineForm.validate(v=>{
|
||||||
if(v){
|
if(v){
|
||||||
this.checkList= this.checkList.map(item=>{
|
this.arrangeData()
|
||||||
item.flag= this.flag
|
this.completeProcessALL(this.checkList)
|
||||||
item.approvalOpinion = this.approveForm.approvalOpinion
|
this.dialogVisible=false
|
||||||
return item
|
|
||||||
})
|
|
||||||
this.completeProcessALL(this.checkList).then(res=>{
|
|
||||||
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
allAgree(type){
|
allAgree(type){
|
||||||
this.approveForm.approvalOpinion=''
|
this.approveForm.approvalOpinion=''
|
||||||
if(this.checkList.length>0){
|
if(this.checkList.length>0){
|
||||||
|
//判断选中的有没有重新发起的
|
||||||
|
let List=this.checkList.filter(item=>{
|
||||||
|
if(item.taskDefinitionKey == 'reEdit'){
|
||||||
|
return item
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if(List.length>0){
|
||||||
|
this.$message("您当前选择的数据存在正处于重新发起节点的流程,请重新选择")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.dialogVisible=true
|
||||||
if(type=='no'){
|
if(type=='no'){
|
||||||
this.dialogVisible=true
|
|
||||||
this.flag=2
|
this.flag=2
|
||||||
}else{
|
}else{
|
||||||
this.flag=1
|
this.flag=1
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
this.$message.warning("请至少选择一条数据")
|
this.$message.warning("请至少选择一条数据")
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
// 处理数据
|
||||||
|
arrangeData() {
|
||||||
|
this.checkList= this.checkList.map(item=>{
|
||||||
|
let obj={
|
||||||
|
prcType:item.prcType,
|
||||||
|
reportId:item.dataId,
|
||||||
|
taskId: item.taskId,
|
||||||
|
userId: this.userId,
|
||||||
|
submitJson:''
|
||||||
|
}
|
||||||
|
let temp=JSON.parse(item.submitJson)
|
||||||
|
temp.flag = this.flag
|
||||||
|
temp.approvalOpinion=this.approveForm.approvalOpinion
|
||||||
|
obj.submitJson =JSON.stringify(temp)
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
},
|
||||||
//查询
|
//查询
|
||||||
search() {
|
search() {
|
||||||
console.log(this.form)
|
console.log(this.form)
|
||||||
|
|||||||
@@ -38,10 +38,10 @@
|
|||||||
<vxe-column show-overflow show-header-overflow field="creatTime" title="创建时间"></vxe-column>
|
<vxe-column show-overflow show-header-overflow field="creatTime" title="创建时间"></vxe-column>
|
||||||
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right">
|
<vxe-column show-overflow show-header-overflow title="操作" width="200" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button @click.native.prevent="handleSubmit(row,'yes')" type="text" size="small">
|
<el-button v-if="row.taskDefinitionKey!='reEdit'" @click.native.prevent="handleSubmit(row,'yes')" type="text" size="small">
|
||||||
同意
|
同意
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click.native.prevent="handleSubmit(row,'no')" type="text" size="small">
|
<el-button v-if="row.taskDefinitionKey!='reEdit'" @click.native.prevent="handleSubmit(row,'no')" type="text" size="small">
|
||||||
不同意
|
不同意
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click.native.prevent="handle(row)" type="text" size="small">
|
<el-button @click.native.prevent="handle(row)" type="text" size="small">
|
||||||
@@ -57,10 +57,10 @@
|
|||||||
<el-dialog title="审核意见" width="20%" :visible.sync="dialogVisible" >
|
<el-dialog title="审核意见" width="20%" :visible.sync="dialogVisible" >
|
||||||
<el-form ref="examineForm"
|
<el-form ref="examineForm"
|
||||||
:model="approveForm"
|
:model="approveForm"
|
||||||
:rules="approveFormRules"
|
|
||||||
size="medium"
|
size="medium"
|
||||||
class="label-input-form prc-content-border approveForm">
|
class="label-input-form prc-content-border approveForm">
|
||||||
<el-form-item label-width="132px" class="add-form-item" prop="approvalOpinion">
|
<el-form-item label-width="132px" class="add-form-item" prop="approvalOpinion"
|
||||||
|
:rules="[{required:flag==1?false:true,message:'请输入审核意见',trigger:'change'}]">
|
||||||
<template slot="label">审核意见:</template>
|
<template slot="label">审核意见:</template>
|
||||||
<el-input :maxlength='1000'
|
<el-input :maxlength='1000'
|
||||||
v-model="approveForm.approvalOpinion"
|
v-model="approveForm.approvalOpinion"
|
||||||
@@ -102,7 +102,8 @@ export default {
|
|||||||
tableData: [],
|
tableData: [],
|
||||||
checkList:[],
|
checkList:[],
|
||||||
checkIds:[],
|
checkIds:[],
|
||||||
flag:1
|
flag:1,
|
||||||
|
check:[]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props:{
|
props:{
|
||||||
@@ -131,22 +132,29 @@ export default {
|
|||||||
submitForm(){
|
submitForm(){
|
||||||
this.$refs.examineForm.validate(v=>{
|
this.$refs.examineForm.validate(v=>{
|
||||||
if(v){
|
if(v){
|
||||||
this.checkList= this.checkList.map(item=>{
|
let obj={
|
||||||
item.flag=this.flag
|
prcType:this.check.prcType,
|
||||||
item.approvalOpinion = this.approveForm.approvalOpinion
|
reportId:this.check.dataId,
|
||||||
return item
|
taskId: this.check.taskId,
|
||||||
})
|
userId: this.check.userId,
|
||||||
this.completeProcess(this.checkList).then(res=>{
|
submitJson:''
|
||||||
|
}
|
||||||
})
|
let temp=JSON.parse(this.check.submitJson)
|
||||||
|
temp.flag = this.flag
|
||||||
|
temp.approvalOpinion=this.approveForm.approvalOpinion
|
||||||
|
obj.submitJson =JSON.stringify(temp)
|
||||||
|
this.completeProcess(obj)
|
||||||
|
this.dialogVisible=false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleSubmit(row,flag){
|
handleSubmit(row,flag){
|
||||||
this.approveForm.approvalOpinion=''
|
this.approveForm.approvalOpinion=''
|
||||||
|
this.dialogVisible=true
|
||||||
|
this.check=row
|
||||||
if(flag=='no'){
|
if(flag=='no'){
|
||||||
this.flag=2
|
this.flag=2
|
||||||
this.dialogVisible=true
|
|
||||||
}else{
|
}else{
|
||||||
this.flag=1
|
this.flag=1
|
||||||
}
|
}
|
||||||
@@ -318,4 +326,12 @@ export default {
|
|||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.approveForm{
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
}
|
||||||
|
.done{
|
||||||
|
margin: 10px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user