|
@@ -159,9 +159,9 @@ const saveFormClick = async () => {
|
|
|
delete ele.users
|
|
|
})
|
|
|
form.fixedBranchList = fixedBranchList
|
|
|
- if (!form.id) {
|
|
|
+ if (!form.id && !form.fixedFlowId) {
|
|
|
sevaLoading.value = true
|
|
|
- const { error, code } = await tasksFlowApi.saveFixedFlow({
|
|
|
+ const { error, code, msg } = await tasksFlowApi.saveFixedFlow({
|
|
|
...form,
|
|
|
projectId: projectId.value,
|
|
|
contractId: contractId.value,
|
|
@@ -172,12 +172,14 @@ const saveFormClick = async () => {
|
|
|
showEditModal.value = false
|
|
|
window?.$message?.success('保存成功')
|
|
|
getTableData().then()
|
|
|
+ } else {
|
|
|
+ window?.$message?.error(msg)
|
|
|
}
|
|
|
} else {
|
|
|
sevaLoading.value = true
|
|
|
form.fixedFlowId = form.id
|
|
|
delete form.id
|
|
|
- const { error, code } = await tasksFlowApi.updateFixedFlowData({
|
|
|
+ const { error, code, msg } = await tasksFlowApi.updateFixedFlowData({
|
|
|
...form,
|
|
|
projectId: projectId.value,
|
|
|
contractId: contractId.value,
|
|
@@ -188,6 +190,8 @@ const saveFormClick = async () => {
|
|
|
showEditModal.value = false
|
|
|
window?.$message?.success('保存成功')
|
|
|
getTableData().then()
|
|
|
+ } else {
|
|
|
+ window?.$message?.error(msg)
|
|
|
}
|
|
|
}
|
|
|
}
|