未符合项整改流程 第二步驳回 第三步隐藏驳回

This commit is contained in:
宋伟佳
2022-03-03 15:26:39 +08:00
parent e42ee6b763
commit f494fb18ea
5 changed files with 189 additions and 33 deletions
@@ -970,6 +970,18 @@ export default {
prcType: row.prcType
}
})
}else if (row.taskInfo === '重新起草') {
this.$router.push({
name: 'wfhxzgStep1',
query: {
taskIds: row.taskIds,
prcId: row.prcId,
prcNum: row.prcNum,
taskAssignee: row.taskAssignee,
prcName: row.prcName,
prcType: row.prcType
}
})
}else {
this.$router.push({
name: 'wfhxzgStep5',
@@ -324,7 +324,15 @@
import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle'
import {startProcess, completeTask, saveTaskFirst, queryTaskFirst, taskDel, processBack} from '@/api/process.js'
import {
startProcess,
completeTask,
saveTaskFirst,
queryTaskFirst,
taskDel,
processBack,
inboundLiaisonDetail
} from "@/api/process.js";
import {standUnqualified, dicTypeData} from '@/api/unqualProcess.js'
export default {
@@ -332,6 +340,7 @@ export default {
data() {
return {
loading: false,
submitFlag: '', //是否是修改节点
commentText: '', // 意见
title: '', // 新增编辑抽屉标题
ListModel: false, // 新增编辑抽屉开关
@@ -367,6 +376,7 @@ export default {
dockUserName: [{required: true, message: "请选择标准法规工程师", trigger: ['blur', 'change']}]
},
nodeList: [],
hisListForm:{},
drawerTitle: '', //drawer标题
modalshowflag: false, // drawer开关
treeData: [], // 人员数据
@@ -388,8 +398,39 @@ export default {
if (this.bpnId !== undefined) {
this.getData()
}
if(this.$route.query.taskIds){
//被驳回时调用
this.getHistoryData()
}
},
methods: {
getHistoryData() {
return new Promise((resolve, reject) => {
inboundLiaisonDetail({
taskIds: this.$route.query.taskIds,
pId: this.$route.query.prcId,
}).then(res => {
if (res) {
const processForm = JSON.parse(res.mesg)
this.getFormFieldList(processForm)
}
}).catch(e => {
})
})
},
/**
* @description: 动态表单读取
*/
getFormFieldList (item) {
item.commentText = ''
this.$nextTick(() => {
this.hisListForm = JSON.parse(JSON.stringify(item))
this.submitFlag = '修改节点'
this.dataList = item.dockUserList[0].standardInfoList
this.roleForm.dockUserName = this.dataList[0].engineer
this.roleForm.dockUser = this.dataList[0].engineerId
})
},
getData() {
queryTaskFirst({
bpnId: this.$route.query.bpnId
@@ -557,6 +598,7 @@ export default {
prcCreateUser: this.$store.getters.userInfo.userId,
prcCreateUserName: this.$store.getters.userInfo.userName,
engineer: this.roleForm.dockUser,
engineerName: this.roleForm.dockUserName,
standardInfoList: this.dataList,
commentText: this.commentText
}
@@ -566,43 +608,86 @@ export default {
if (this.roleForm.dockUserName === '') {
this.$message.warning('请完善人员信息')
} else {
this.$refs['roleForm'].validate((valid) => {
if (valid) {
this.isSubmit = true
let paramsInfo = new FormData()
// paramsInfo.append('id', this.bpnId || '')
paramsInfo.append('createUser', this.$store.getters.userInfo.userId)
paramsInfo.append('createUserName', this.$store.getters.userInfo.userName)
paramsInfo.append('type', '8')
paramsInfo.append('json', JSON.stringify({
roleForm: this.roleForm,
dataList: this.dataList,
commentText: this.commentText
}))
processBack(paramsInfo).then(res => {
this.taskID = res.data
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskIds', this.taskID)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('提交成功')
if (this.bpnId !== '') {
if(!this.submitFlag){
this.$refs['roleForm'].validate((valid) => {
if (valid) {
this.isSubmit = true
let paramsInfo = new FormData()
// paramsInfo.append('id', this.bpnId || '')
paramsInfo.append('createUser', this.$store.getters.userInfo.userId)
paramsInfo.append('createUserName', this.$store.getters.userInfo.userName)
paramsInfo.append('type', '8')
paramsInfo.append('json', JSON.stringify({
roleForm: this.roleForm,
dataList: this.dataList,
commentText: this.commentText
}))
processBack(paramsInfo).then(res => {
this.taskID = res.data
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskIds', this.taskID)
completeTask(params).then(res => {
if (res.success === true) {
this.$message.success('提交成功')
if (this.bpnId !== '') {
let taskId = {
id: this.bpnId
}
taskDel(taskId).then(res => {
return res
})
}
this.$router.push("/processCenter");
}
this.isSubmit = false
})
})
}
})
}else{
this.$refs["roleForm"].validate((valid) => {
if (valid) {
let specialJson = {
createUser: this.$store.getters.userInfo.userId,
createUserName: this.$store.getters.userInfo.userName,
type: "8",
json: {
standardInfoList: this.dataList,
roleForm: this.roleForm,
commentText: this.commentText
}
};
this.$http.post("lawss/activiti/completeTaskNew", {
taskIds: this.$route.query.taskIds,
userId: this.$store.getters.userInfo.userId,
json: JSON.stringify(json),
specialJson: JSON.stringify(specialJson)
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message);
if (this.bpnId !== "") {
let taskId = {
id: this.bpnId
}
};
taskDel(taskId).then(res => {
return res
})
return res;
});
}
this.$router.push("/processCenter");
}
this.isSubmit = false
})
})
}
})
this.isSubmit = false;
});
} else {
this.isSubmit = false;
return this.$message.warning("请完善人员信息");
}
});
}
}
}
},
@@ -150,9 +150,11 @@
show-save
show-submit
show-transfer
show-back
:submitLoading="isSubmit"
:saveLoading="saveLoading"
:transferLoading="turnLoading"
@back="beforeBack"
@transfer="handleTurnTo"
@save="handleSave"
@submit="handleSubmit"
@@ -277,6 +279,7 @@ export default {
})
},
getFormFieldList (item) {
console.log(item);
this.$nextTick(() => {
if (item.passInfo !== undefined) {
this.passInfo = JSON.parse(JSON.stringify(item)).passInfo
@@ -336,6 +339,50 @@ export default {
this.saveLoading = false
})
},
//驳回按钮
beforeBack(){
if(!this.commentInfo){
this.$message.warning('请填写审批意见')
}else{
let zqa = new Map();
for (let lastDataListElement of this.dataList) {
let a = zqa.get(lastDataListElement.dutyPeopleInfoId)
if( a == null){
a = {
id: lastDataListElement.dutyPeopleInfoId,
name: lastDataListElement.dutyPeopleInfo,
standardInfoList: []
}
}
a.standardInfoList.push(lastDataListElement);
zqa.set(a.id, a);
}
let list = [];
for(let item of zqa) {
list.push(item[1])
}
let json = {
dockUserList: list,
passInfo: this.passInfo,
passFlag: '1',
commentText: this.commentInfo
}
const params = new FormData();
params.set('json', JSON.stringify(json))
params.set('userId', this.$store.getters.userInfo.userId)
params.set('taskIds', this.taskIds)
completeTask(params).then(res => {
if(res.success === true) {
this.$message.success('提交成功')
this.$router.push("/processCenter");
}
this.isSubmit = false
}).catch(e => {
this.isSubmit = false
})
}
},
// 提交按钮
handleSubmit() {
this.isSubmit = true
@@ -359,6 +406,7 @@ export default {
let json = {
dockUserList: list,
passInfo: this.passInfo,
passFlag: '0',
commentText: this.commentInfo
}
let flag=false
@@ -152,7 +152,6 @@
<ProcessFooter
show-save
show-submit
show-back
show-transfer
:submitLoading="isSubmit"
:saveLoading="saveLoading"
@@ -1212,6 +1212,18 @@ export default {
prcType: row.prcType
}
})
}else if (row.taskInfo === '重新起草') {
this.$router.push({
name: 'wfhxzgStep1',
query: {
taskIds: row.taskIds,
prcId: row.prcId,
prcNum: row.prcNum,
taskAssignee: row.taskAssignee,
prcName: row.prcName,
prcType: row.prcType
}
})
}else {
this.$router.push({
name: 'wfhxzgStep5',