按钮loading-标准入库流程

This commit is contained in:
zyn
2023-11-06 10:23:35 +08:00
parent 6dc35be591
commit dda0b8c60c
5 changed files with 46 additions and 14 deletions
@@ -3597,6 +3597,7 @@
// }
this.saveLoading = true
this.isSubmit = true
let _formData = new FormData()
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
@@ -3616,11 +3617,11 @@
commentText: this.commentText
}))
saveTaskFirst(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
fileInfoHandle() {
@@ -3687,6 +3688,7 @@
if (res.ok) {
this.fileInfoHandle()
this.isSubmit = true
this.saveLoading = true
// this.form.country = this.countryArr;
var json = Object.assign(this.form, this.roleForm)
json.zrUserId = this.form.zrUserId
@@ -3719,7 +3721,6 @@
}, res => {
if (res.success) {
this.$message.success(res.message)
this.isSubmit = false
if (this.bpnId !== '') {
let taskId = {
id: this.bpnId
@@ -3732,11 +3733,13 @@
this.$router.push({path: '/processCenter?tabsName=ProcessCenter'})
} else {
this.$message.warning(res.message)
this.isSubmit = true
}
this.saveLoading = false
this.isSubmit = false
})
} else {
this.isSubmit = false
this.saveLoading = false
}
})
} else {
@@ -3747,6 +3750,7 @@
} else {
this.fileInfoHandle()
this.isSubmit = true
this.saveLoading = true
// this.form.country = this.countryArr;
var json = Object.assign(this.form, this.roleForm)
json.zrUserId = this.form.zrUserId
@@ -3779,7 +3783,6 @@
}, res => {
if (res.success) {
this.$message.success(res.message)
this.isSubmit = false
if (this.bpnId !== '') {
let taskId = {
id: this.bpnId
@@ -3790,12 +3793,13 @@
}
// 流程提交之后,应该流转至待办任务页面
this.$router.push({path: '/processCenter?tabsName=ProcessCenter'})
} else {
this.isSubmit = false
}
this.isSubmit = false
this.saveLoading = false
})
} else {
this.isSubmit = false
this.saveLoading = false
}
})
}
@@ -3606,6 +3606,7 @@
// }
this.saveLoading = true
this.isSubmit = true
let _formData = new FormData()
_formData.append('id', this.bpnId || '')
_formData.append('createUser', this.$store.getters.userInfo.userId)
@@ -3628,8 +3629,9 @@
this.saveLoading = false
this.$message.success('保存成功')
this.bpnId = res.result
}).catch(e => {
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
fileInfoHandle() {
@@ -3696,6 +3698,7 @@
if (res.ok) {
this.fileInfoHandle()
this.isSubmit = true
this.saveLoading = true
// this.form.country = this.countryArr;
var json = Object.assign(this.form, this.roleForm)
json.zrUserId = this.form.zrUserId
@@ -3741,11 +3744,13 @@
this.$router.push({path: '/processCenter?tabsName=ProcessCenter'})
} else {
this.$message.warning(res.message)
this.isSubmit = true
}
this.isSubmit = false
this.saveLoading = false
})
} else {
this.isSubmit = false
this.saveLoading = false
}
})
} else {
@@ -3756,6 +3761,7 @@
} else {
this.fileInfoHandle()
this.isSubmit = true
this.saveLoading = true
// this.form.country = this.countryArr;
var json = Object.assign(this.form, this.roleForm)
json.zrUserId = this.form.zrUserId
@@ -3788,7 +3794,6 @@
}, res => {
if (res.success) {
this.$message.success(res.message)
this.isSubmit = false
if (this.bpnId !== '') {
let taskId = {
id: this.bpnId
@@ -3799,12 +3804,13 @@
}
// 流程提交之后,应该流转至待办任务页面
this.$router.push({path: '/processCenter?tabsName=ProcessCenter'})
} else {
this.isSubmit = false
}
this.isSubmit = false
this.saveLoading = false
})
} else {
this.isSubmit = false
this.saveLoading = false
}
})
}
@@ -1045,6 +1045,8 @@ export default {
methods: {
checkedRole(data) {
this.assigneeNewLoading = true
this.isSubmit = true
this.saveLoading = true
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
userId: this.$store.getters.userInfo.userId, // 委托人
@@ -1059,6 +1061,9 @@ export default {
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.isSubmit = false
this.saveLoading = false
})
},
downloadFileNew(attId) {
@@ -1289,6 +1294,7 @@ export default {
},
handleSubmit() {
this.isSubmit = true;
this.saveLoading = true;
this.form.commentText = this.commentText;
this.form.approvalOpinion = this.formTongGuo.approvalOpinion;
if (this.form.syrz.length === 0) {
@@ -1346,6 +1352,9 @@ export default {
} else {
this.processCreateStand(json);
}
} else {
this.isSubmit = false;
this.saveLoading = false;
}
});
},
@@ -1378,6 +1387,9 @@ export default {
this.$message.warning(res.message)
this.isSubmit = false
}
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
getDicTypeListCode(res,json) {
@@ -1016,6 +1016,8 @@ export default {
methods: {
checkedRole (data) {
this.assigneeNewLoading = true
this.saveLoading = true
this.isSubmit = true
changeAssigneeNew({
taskId: this.$route.query.taskIds, // 任务id
userId:this.$store.getters.userInfo.userId, // 委托人
@@ -1032,6 +1034,9 @@ export default {
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
downloadFileNew(attId) {
@@ -1237,6 +1242,7 @@ export default {
},
handleSave() {
this.saveLoading = true
this.isSubmit = true
let _formData = new FormData()
// _formData.append('id', this.bpnId)
_formData.append('createUser', this.$store.getters.userInfo.userId)
@@ -1252,15 +1258,16 @@ export default {
submitType: this.submitType
}))
saveTaskFirst(_formData).then(res => {
this.saveLoading = false
this.$message.success('保存成功')
// this.bpnId = res.result
}).catch(e => {
}).finally(() => {
this.saveLoading = false
this.isSubmit = false
})
},
handleSubmit() {
this.isSubmit = true
this.saveLoading = true
this.form.submitType = this.submitType
this.form.commentText = this.commentText
this.form.approvalOpinion = this.approvalOpinion
@@ -1280,6 +1287,7 @@ export default {
this.$message.success(res.message)
}
this.isSubmit = false
this.saveLoading = false
})
},
@@ -2961,6 +2961,7 @@ export default {
} else {
this.fileInfoHandle();
this.isSubmit = true
this.saveLoading = true
this.form.submitType = this.submitType
this.form.commentText = this.commentText
this.form.approvalOpinion = this.approvalOpinion
@@ -2980,6 +2981,7 @@ export default {
this.$message.success(res.message)
}
this.isSubmit = false
this.saveLoading = false
})
}
}