fix 81137
This commit is contained in:
+37
-11
@@ -877,7 +877,7 @@ export default {
|
||||
return this.currentNode === ProjectComplianceEvaluationProcessNode.moduleOwnerModification.value ? ProjectComplianceEvaluationProcessNode.moduleOwnerApproval.value : this.currentNode
|
||||
},
|
||||
// 是否发起节点
|
||||
isInit() {
|
||||
isInit () {
|
||||
return this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value
|
||||
}
|
||||
},
|
||||
@@ -1296,7 +1296,7 @@ export default {
|
||||
/**
|
||||
* 处理保存的Json数据部门
|
||||
*/
|
||||
dealSaveJsonData() {
|
||||
dealSaveJsonData () {
|
||||
const formData = {}
|
||||
// 流程信息
|
||||
const processInfo = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue())
|
||||
@@ -1340,23 +1340,29 @@ export default {
|
||||
* 保存
|
||||
*/
|
||||
handleSave () {
|
||||
const formData = this.dealSaveJsonData()
|
||||
if (!formData) {
|
||||
if (this.disabledBtnClick) {
|
||||
return
|
||||
}
|
||||
this.disabledBtnClick = true
|
||||
const formData = this.dealSaveJsonData()
|
||||
if (!formData) {
|
||||
this.disabledBtnClick = false
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
const params = {
|
||||
infoJsonStr: JSON.stringify(formData),
|
||||
basicProcessInfoDTO: formData.basicProcessInfoDTO,
|
||||
draftId: this.$route.query.draftId,
|
||||
basicTaskInfoDTO: Object.assign(formData.approvalInfo, { taskId: this.$route.query.taskId })
|
||||
}
|
||||
this.loading = true
|
||||
saveProjectComplianceEvaluation(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
this.disabledBtnClick = false
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
@@ -1366,10 +1372,16 @@ export default {
|
||||
* 提交
|
||||
*/
|
||||
handleSubmit () {
|
||||
const formData = this.dealFormData()
|
||||
if (!formData) {
|
||||
if (this.disabledBtnClick) {
|
||||
return
|
||||
}
|
||||
this.disabledBtnClick = true
|
||||
const formData = this.dealFormData()
|
||||
if (!formData) {
|
||||
this.disabledBtnClick = false
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
let submitFunc
|
||||
// 发起和提交的接口判断
|
||||
if (this.currentNode === ProjectComplianceEvaluationProcessNode.initiate.value) {
|
||||
@@ -1382,16 +1394,13 @@ export default {
|
||||
} else {
|
||||
submitFunc = submitProjectComplianceEvaluation
|
||||
}
|
||||
if (!submitFunc) {
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
submitFunc(formData).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
this.disabledBtnClick = false
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
@@ -1401,6 +1410,9 @@ export default {
|
||||
* 转办
|
||||
*/
|
||||
handleTurnTo () {
|
||||
if (this.disabledBtnClick) {
|
||||
return
|
||||
}
|
||||
this.isTransfer = true
|
||||
this.$refs.userSelectModal.open()
|
||||
},
|
||||
@@ -1408,6 +1420,7 @@ export default {
|
||||
if (!this.isTransfer) {
|
||||
return
|
||||
}
|
||||
this.disabledBtnClick = true
|
||||
const params = {
|
||||
taskId: this.$route.query.taskId,
|
||||
userId
|
||||
@@ -1419,6 +1432,7 @@ export default {
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
this.disabledBtnClick = false
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
@@ -1428,12 +1442,17 @@ export default {
|
||||
* 同意
|
||||
*/
|
||||
handleAgree () {
|
||||
if (this.disabledBtnClick) {
|
||||
return
|
||||
}
|
||||
this.disabledBtnClick = true
|
||||
this.validatorRules.handleText.rules[0].required = false
|
||||
if (!this.approvalInfoForm.getFieldValue('handleText')) {
|
||||
this.approvalInfoForm.setFieldsValue({ handleText: '同意' })
|
||||
}
|
||||
const formData = this.dealFormData()
|
||||
if (!formData) {
|
||||
this.disabledBtnClick = false
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
@@ -1443,6 +1462,7 @@ export default {
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
this.disabledBtnClick = false
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
@@ -1452,9 +1472,14 @@ export default {
|
||||
* 驳回
|
||||
*/
|
||||
handleReject () {
|
||||
if (this.disabledBtnClick) {
|
||||
return
|
||||
}
|
||||
this.disabledBtnClick = true
|
||||
this.validatorRules.handleText.rules[0].required = true
|
||||
const formData = this.dealFormData()
|
||||
if (!formData) {
|
||||
this.disabledBtnClick = false
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
@@ -1464,6 +1489,7 @@ export default {
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
this.disabledBtnClick = false
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
|
||||
Reference in New Issue
Block a user