对接政策征求意见流程

This commit is contained in:
范强强
2023-10-18 16:08:40 +08:00
parent fb543ac0d3
commit 94b1d79fcd
@@ -496,9 +496,11 @@
}, },
//保存事件 //保存事件
handleSave() { handleSave() {
this.saveLoading = true; this.openButtonLoading()
if (!this.taskKey || this.taskKey == 'PolicySolicitOpinionProcessKey1') { if (!this.taskKey || this.taskKey == 'PolicySolicitOpinionProcessKey1') {
this.draftSaving() this.draftSaving()
} else if (this.taskKey == 'PolicySolicitOpinionProcessKey6') {
} }
}, },
//草稿保存 //草稿保存
@@ -516,7 +518,7 @@
commentText: this.commentText commentText: this.commentText
})); }));
saveTaskFirst(_formData).then(res => { saveTaskFirst(_formData).then(res => {
this.saveLoading = false; this.closeButtonLoading()
this.$message.success("保存成功"); this.$message.success("保存成功");
this.bpnId = res.result this.bpnId = res.result
}).catch(e => { }).catch(e => {
@@ -527,15 +529,17 @@
handleSubmit() { handleSubmit() {
this.$refs['zczqyjForm'].validate((valid) => { this.$refs['zczqyjForm'].validate((valid) => {
if (valid) { if (valid) {
if (!this.taskKey || this.taskKey == 'PolicySolicitOpinionProcessKey1') { this.openButtonLoading()
if (!this.taskKey || this.taskKey == 'PolicySolicitOpinionProcessKey1') {//起草
this.closeButtonLoading()
this.$refs.personnelInformationRef.submit((row) => { this.$refs.personnelInformationRef.submit((row) => {
this.isSubmit = true this.openButtonLoading()
this.saveLoading = true;
this.startProcessRollBack(row) this.startProcessRollBack(row)
}) })
} else if (this.taskKey == 'PolicySolicitOpinionProcessKey2') { } else if (this.taskKey == 'PolicySolicitOpinionProcessKey2' ||
this.isSubmit = true this.taskKey == 'PolicySolicitOpinionProcessKey4' ||
this.saveLoading = true; this.taskKey == 'PolicySolicitOpinionProcessKey5' ||
this.taskKey == 'PolicySolicitOpinionProcessKey6') { //审核、审定、批准、责任人分配任务
const json = Object.assign(this.dataForm); const json = Object.assign(this.dataForm);
json.commentText = this.commentText json.commentText = this.commentText
json.approvalFlag = 0 json.approvalFlag = 0
@@ -544,24 +548,46 @@
commentText: this.commentText commentText: this.commentText
} }
this.completeTask(this.$route.query.taskIds, query) this.completeTask(this.$route.query.taskIds, query)
} else if (this.taskKey == 'PolicySolicitOpinionProcessKey3') {//起草修改
this.closeButtonLoading()
this.$refs.personnelInformationRef.submit((row) => {
const json = Object.assign(this.dataForm, row);
json.commentText = this.commentText
json.approvalFlag = 0
let query = {
form: json,
commentText: this.commentText
}
this.openButtonLoading()
this.completeTask(this.$route.query.taskIds, query)
})
} }
} else { } else {
return this.$message.warning('请完善基础信息') return this.$message.warning('请完善基础信息')
} }
}) })
}, },
openButtonLoading() {
this.isReject = true
this.isSubmit = true
this.saveLoading = true;
},
closeButtonLoading() {
this.isReject = true
this.isSubmit = true
this.saveLoading = true;
},
handleReject() { handleReject() {
// approvalFlag value0通过 1驳回 // approvalFlag value0通过 1驳回
if (this.taskKey == 'PolicySolicitOpinionProcessKey2') { this.openButtonLoading()
const json = Object.assign(this.dataForm); const json = Object.assign(this.dataForm);
json.commentText = this.commentText json.commentText = this.commentText
json.approvalFlag = 1 json.approvalFlag = 1
let query = { let query = {
form: json, form: json,
commentText: this.commentText commentText: this.commentText
}
this.completeTask(this.$route.query.taskIds, query)
} }
this.completeTask(this.$route.query.taskIds, query)
}, },
//启动流程 //启动流程
startProcessRollBack(roleForm) { startProcessRollBack(roleForm) {
@@ -581,8 +607,7 @@
this.completeTask(res.data, query) this.completeTask(res.data, query)
} else { } else {
this.$message.warning('流程启动失败') this.$message.warning('流程启动失败')
this.isSubmit = false this.closeButtonLoading()
this.saveLoading = false;
} }
}) })
}, },
@@ -600,8 +625,7 @@
} }
this.$router.push("/processCenter"); this.$router.push("/processCenter");
} }
this.isSubmit = false; this.closeButtonLoading()
this.saveLoading = false;
}) })
}, },
//删除草稿 //删除草稿
@@ -708,10 +732,11 @@
}); });
}, },
formProcessing(row) { formProcessing(row) {
this.dataForm = row this.dataForm = row.form
this.dataForm = {...this.dataForm} this.dataForm = {...this.dataForm}
console.log(this.dataForm);
if (this.showPersonnel) { if (this.showPersonnel) {
this.$refs.personnelInformationRef.getData(row) this.$refs.personnelInformationRef.getData(row.form)
} }
}, },
getTaskDraftData() { getTaskDraftData() {
@@ -721,7 +746,7 @@
}).then(res => { }).then(res => {
let mes = JSON.parse(res.mes); let mes = JSON.parse(res.mes);
this.dataForm = mes.form this.dataForm = mes.form
this.roleForm = mes.roleForm this.$refs.personnelInformationRef.getData(mes.roleForm)
this.commentText = mes.commentText this.commentText = mes.commentText
this.dataLoading = false this.dataLoading = false
}); });