【修改】修改批量同意不同意 以及列表同意不同意
This commit is contained in:
@@ -114,25 +114,34 @@
|
||||
// 所有流程的完成任务
|
||||
completeProcess(obj) {
|
||||
this.$api.process.completeTask(obj).then(res=>{
|
||||
this.$message['success']('提交成功')
|
||||
this.$router.push({
|
||||
path:"/userCenter/processCenter",
|
||||
query:{
|
||||
id:'AEHJB8YNJ3'
|
||||
if(this.$route.path=='/userCenter/processCenter'){
|
||||
this.loadData()
|
||||
}else {
|
||||
this.$message['success']('提交成功')
|
||||
this.$router.push({
|
||||
path: "/userCenter/processCenter",
|
||||
query: {
|
||||
id: 'AEHJB8YNJ3'
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 所有流程的完成任务
|
||||
completeProcessALL(obj) {
|
||||
this.$api.process.completeTaskALL(obj).then(res=>{
|
||||
this.$message['success']('提交成功')
|
||||
this.$router.push({
|
||||
path:"/userCenter/processCenter",
|
||||
query:{
|
||||
id:'AEHJB8YNJ3'
|
||||
}
|
||||
})
|
||||
if(this.$route.path=='/userCenter/processCenter'){
|
||||
this.reset()
|
||||
}else{
|
||||
this.$message['success']('提交成功')
|
||||
this.$router.push({
|
||||
path:"/userCenter/processCenter",
|
||||
query:{
|
||||
id:'AEHJB8YNJ3',
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
// 获取流程详细信息
|
||||
|
||||
@@ -39,13 +39,14 @@
|
||||
<div class="tabs">
|
||||
<tabs @clearForm="reset"/>
|
||||
</div>
|
||||
<el-dialog title="审核意见" width="20%" :visible.sync="dialogVisible" >
|
||||
<el-dialog title="审核意见" width="20%" :visible.sync="dialogVisible"
|
||||
@close="cancel">
|
||||
<el-form ref="examineForm"
|
||||
:model="approveForm"
|
||||
:rules="approveFormRules"
|
||||
size="medium"
|
||||
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>
|
||||
<el-input :maxlength='1000'
|
||||
v-model="approveForm.approvalOpinion"
|
||||
@@ -88,10 +89,17 @@ import tabs from '../userCenter/processCenter/tabs.vue'
|
||||
prcName:''
|
||||
},
|
||||
checkList:[],
|
||||
flag:1,//是不是同意
|
||||
flag:'',//是不是同意
|
||||
isShowbtn:this.$store.getters.activeTab =='' || this.$store.getters.activeTab =='first'
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
// dialogVisible(value){
|
||||
// if(!value && this.flag){
|
||||
// this.reset()
|
||||
// }
|
||||
// }
|
||||
},
|
||||
created () {
|
||||
},
|
||||
mounted () {
|
||||
@@ -105,36 +113,61 @@ import tabs from '../userCenter/processCenter/tabs.vue'
|
||||
},
|
||||
methods: {
|
||||
cancel(){
|
||||
this.flag = ''
|
||||
this.dialogVisible=false
|
||||
},
|
||||
submitForm(){
|
||||
this.$refs.examineForm.validate(v=>{
|
||||
if(v){
|
||||
this.checkList= this.checkList.map(item=>{
|
||||
item.flag= this.flag
|
||||
item.approvalOpinion = this.approveForm.approvalOpinion
|
||||
return item
|
||||
})
|
||||
this.completeProcessALL(this.checkList).then(res=>{
|
||||
|
||||
})
|
||||
this.arrangeData()
|
||||
this.completeProcessALL(this.checkList)
|
||||
this.dialogVisible=false
|
||||
}
|
||||
})
|
||||
},
|
||||
allAgree(type){
|
||||
this.approveForm.approvalOpinion=''
|
||||
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'){
|
||||
this.dialogVisible=true
|
||||
|
||||
this.flag=2
|
||||
}else{
|
||||
this.flag=1
|
||||
}
|
||||
|
||||
}else{
|
||||
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() {
|
||||
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 title="操作" width="200" fixed="right">
|
||||
<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 @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 @click.native.prevent="handle(row)" type="text" size="small">
|
||||
@@ -57,10 +57,10 @@
|
||||
<el-dialog title="审核意见" width="20%" :visible.sync="dialogVisible" >
|
||||
<el-form ref="examineForm"
|
||||
:model="approveForm"
|
||||
:rules="approveFormRules"
|
||||
size="medium"
|
||||
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>
|
||||
<el-input :maxlength='1000'
|
||||
v-model="approveForm.approvalOpinion"
|
||||
@@ -102,7 +102,8 @@ export default {
|
||||
tableData: [],
|
||||
checkList:[],
|
||||
checkIds:[],
|
||||
flag:1
|
||||
flag:1,
|
||||
check:[]
|
||||
};
|
||||
},
|
||||
props:{
|
||||
@@ -131,22 +132,29 @@ export default {
|
||||
submitForm(){
|
||||
this.$refs.examineForm.validate(v=>{
|
||||
if(v){
|
||||
this.checkList= this.checkList.map(item=>{
|
||||
item.flag=this.flag
|
||||
item.approvalOpinion = this.approveForm.approvalOpinion
|
||||
return item
|
||||
})
|
||||
this.completeProcess(this.checkList).then(res=>{
|
||||
|
||||
})
|
||||
let obj={
|
||||
prcType:this.check.prcType,
|
||||
reportId:this.check.dataId,
|
||||
taskId: this.check.taskId,
|
||||
userId: this.check.userId,
|
||||
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){
|
||||
this.approveForm.approvalOpinion=''
|
||||
this.dialogVisible=true
|
||||
this.check=row
|
||||
if(flag=='no'){
|
||||
this.flag=2
|
||||
this.dialogVisible=true
|
||||
|
||||
}else{
|
||||
this.flag=1
|
||||
}
|
||||
@@ -318,4 +326,12 @@ export default {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
}
|
||||
.approveForm{
|
||||
position: relative;
|
||||
|
||||
}
|
||||
.done{
|
||||
margin: 10px;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user