修改流程阻塞bug

This commit is contained in:
zyx.net
2022-12-01 12:10:42 +08:00
parent ae4d88b9e4
commit 1ec2064832
7 changed files with 103 additions and 42 deletions
@@ -389,11 +389,11 @@
var fileSuffix = filename.substring(index1, index2) var fileSuffix = filename.substring(index1, index2)
// const fileSuffix = file.name.split('.')[1] // 后缀名 // const fileSuffix = file.name.split('.')[1] // 后缀名
// 判断上传文件格式 // 判断上传文件格式
if (fileSuffix === '.ppt' || fileSuffix === '.docx' || fileSuffix === '.DOCX' || fileSuffix === '.PPT' || fileSuffix === '.xls' || fileSuffix === '.xlsx' || fileSuffix === '.XLS' || fileSuffix === '.XLSX' || fileSuffix === '.pdf' || fileSuffix === '.PDF') { if (fileSuffix === '.ppt' || fileSuffix === '.docx' || fileSuffix === '.DOCX' || fileSuffix === '.DOC' || fileSuffix === '.doc' || fileSuffix === '.PPT' || fileSuffix === '.xls' || fileSuffix === '.xlsx' || fileSuffix === '.XLS' || fileSuffix === '.XLSX' || fileSuffix === '.pdf' || fileSuffix === '.PDF'|| fileSuffix === '.ZIP'|| fileSuffix === '.zip'|| fileSuffix === '.RAR'|| fileSuffix === '.rar') {
return true return true
} else { } else {
this.spinShow = false this.spinShow = false
this.$message.error('文件' + file.name + '格式不正确,请上传PPT,DOCX,XLS,PDF文件') this.$message.error('文件' + file.name + '格式不正确,请上传PPT,DOCX,XLS,PDF,ZIP,RAR,DOC文件')
return false return false
} }
// 判断文件上传大小 // 判断文件上传大小
@@ -2538,6 +2538,7 @@
this.modelFunc() this.modelFunc()
this.menu2("",this.form.standSystem) this.menu2("",this.form.standSystem)
this.$forceUpdate() this.$forceUpdate()
this.ccc = false
} }
// 遍历对象初始化文件信息 // 遍历对象初始化文件信息
for (const p in this.form) { for (const p in this.form) {
@@ -2488,6 +2488,7 @@
} }
}) })
}else{ }else{
this.$message.warning('请确认审批意见是否填写完整')
} }
}) })
}, },
@@ -566,7 +566,6 @@ export default {
return res return res
}) })
} }
this.isSubmit = false; this.isSubmit = false;
this.$router.push({ path: "/processCenter?tabsName=ProcessCenter" }); this.$router.push({ path: "/processCenter?tabsName=ProcessCenter" });
} }
@@ -577,6 +576,7 @@ export default {
this.$message.warning("请完善人员信息"); this.$message.warning("请完善人员信息");
} }
}); });
}); });
// if (flag) { // if (flag) {
@@ -587,30 +587,75 @@ export default {
} else { } else {
let flag = this.$refs["childForm"].validateForm(() => { let flag = this.$refs["childForm"].validateForm(() => {
let qbzxdFrom = this.$refs["childForm"].qbfsForm; let qbzxdFrom = this.$refs["childForm"].qbfsForm;
this.$refs["roleForm"].validate((valid) => { if(this.$route.query.taskInfo == '重新起草'){
if (valid) { this.isSubmit = true;
this.isSubmit = true; qbzxdFrom.commentText = this.commentText;
qbzxdFrom.commentText = this.commentText; qbzxdFrom.addFlag = '0'
qbzxdFrom.addFlag = '0' let json = Object.assign(qbzxdFrom, this.roleForm);
var json = Object.assign(qbzxdFrom, this.roleForm); this.$http.post("lawss/activiti/startProcessRollBack", {
this.$http.post("lawss/activiti/completeTask", { createUser: this.$store.getters.userInfo.userId,
taskIds: this.$route.query.taskIds, createUserName: this.$store.getters.userInfo.userName,
userId: this.$store.getters.userInfo.userId, type: '25',
json: JSON.stringify(json) json: JSON.stringify({
}, { roleForm: this.roleForm,
_this: this qbfsForm: qbzxdFrom,
}, res => { commentText: this.commentText
if (res.success) { })
this.$message.success(res.message); }, {
this.isSubmit = false; _this: this
this.addLog(qbzxdFrom) }, res => {
this.$router.push({ path: "/processCenter?tabsName=ProcessCenter" }); if (res.ok) {
} this.$http.post("lawss/activiti/completeTask", {
}); taskIds: res.data,
} else { userId: this.$store.getters.userInfo.userId,
this.$message.warning("请完善人员信息"); json: JSON.stringify(json)
} }, {
}); _this: this
}, res => {
if (res.success) {
this.$message.success(res.message);
this.addLog(qbzxdFrom)
if (this.bpnId !== '' && this.bpnId !== undefined) {
let taskId = {
id: this.bpnId
}
taskDel(taskId).then(res=>{
return res
})
}
this.isSubmit = false;
this.$router.push({ path: "/processCenter?tabsName=ProcessCenter" });
}
});
}
});
}else {
this.$refs["roleForm"].validate((valid) => {
if (valid) {
this.isSubmit = true;
qbzxdFrom.commentText = this.commentText;
qbzxdFrom.addFlag = '0'
var json = Object.assign(qbzxdFrom, this.roleForm);
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.$route.query.taskIds,
userId: this.$store.getters.userInfo.userId,
json: JSON.stringify(json)
}, {
_this: this
}, res => {
if (res.success) {
this.$message.success(res.message);
this.isSubmit = false;
this.addLog(qbzxdFrom)
this.$router.push({ path: "/processCenter?tabsName=ProcessCenter" });
}
});
} else {
this.$message.warning("请完善人员信息");
}
});
}
}); });
// if (flag) { // if (flag) {
@@ -23,8 +23,9 @@
<el-input v-model="listForm.projectName" clearable disabled placeholder="请输入项目名称"></el-input> <el-input v-model="listForm.projectName" clearable disabled placeholder="请输入项目名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="截止日期" prop="endTime" class="add-form-item form-item-disabled"> <el-form-item label="截止日期" prop="endTime" class="add-form-item form-item-disabled">
<!-- :picker-options="pickerOptions"-->
<el-date-picker <el-date-picker
:picker-options="pickerOptions"
v-model="listForm.endTime" v-model="listForm.endTime"
type="date" type="date"
placeholder="请选择截止日期" placeholder="请选择截止日期"
@@ -458,6 +459,11 @@ export default {
this.listForm.children = dataListChildren; this.listForm.children = dataListChildren;
this.listForm.dataList = this.dataList; this.listForm.dataList = this.dataList;
const json = JSON.stringify(this.listForm); const json = JSON.stringify(this.listForm);
if(this.nodeList.length == 0){
this.$message.warning('请先分发责任人')
this.isSubmit = false;
return
}
this.$http.post("lawss/activiti/completeTask", { this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds, taskIds: this.taskIds,
userId: this.userId, userId: this.userId,
@@ -391,6 +391,7 @@ export default {
}, },
//提交事件 //提交事件
handleSubmit() { handleSubmit() {
debugger
let dataChildren = []; let dataChildren = [];
let dataListChildren = []; let dataListChildren = [];
this.dataList.forEach(item => { this.dataList.forEach(item => {
@@ -404,20 +405,26 @@ export default {
this.listForm.children = dataListChildren; this.listForm.children = dataListChildren;
this.listForm.dataList = this.dataList; this.listForm.dataList = this.dataList;
const json = JSON.stringify(this.listForm); const json = JSON.stringify(this.listForm);
this.$http.post("lawss/activiti/completeTask", { // this.$refs['listForm'].validate((valid) => {
taskIds: this.taskIds, // if (valid) {
userId: this.userId, this.$http.post("lawss/activiti/completeTask", {
json: json taskIds: this.taskIds,
}, { userId: this.userId,
_this: this json: json
}, res => { }, {
if (res.success) { _this: this
this.$message.success(res.message); }, res => {
this.$router.push("/processCenter"); if (res.success) {
} this.$message.success(res.message);
this.isSubmit = false; this.$router.push("/processCenter");
}, e => { }
}); this.isSubmit = false;
}, e => {
});
// }else {
// this.$message.warning('请确认复审评分是否填写完整')
// }
// })
}, },
//批量分发按钮 //批量分发按钮
choiceZRRS(row, type, index) { choiceZRRS(row, type, index) {
@@ -2209,6 +2209,7 @@ export default {
prcId: row.prcId, prcId: row.prcId,
prcNum: row.prcNum, prcNum: row.prcNum,
prcName: row.prcName, prcName: row.prcName,
taskInfo: row.taskInfo,
prcType: row.prcType prcType: row.prcType
} }
}) })