避免形成二次草稿
This commit is contained in:
@@ -283,6 +283,7 @@ export default {
|
|||||||
qbfsForm: {},
|
qbfsForm: {},
|
||||||
formLoading: false,
|
formLoading: false,
|
||||||
approvalFlag: false,
|
approvalFlag: false,
|
||||||
|
saveFlag: false,
|
||||||
showFlag: true,
|
showFlag: true,
|
||||||
taskIds: '',
|
taskIds: '',
|
||||||
bpnId: '',
|
bpnId: '',
|
||||||
@@ -333,6 +334,7 @@ export default {
|
|||||||
this.taskIds = this.$route.query.taskIds
|
this.taskIds = this.$route.query.taskIds
|
||||||
this.bpnId = this.$route.query.bpnId
|
this.bpnId = this.$route.query.bpnId
|
||||||
if (this.bpnId !== undefined) {
|
if (this.bpnId !== undefined) {
|
||||||
|
this.saveFlag = true
|
||||||
this.getData()
|
this.getData()
|
||||||
}
|
}
|
||||||
if(this.taskIds){
|
if(this.taskIds){
|
||||||
@@ -387,6 +389,7 @@ export default {
|
|||||||
* @description: 动态表单读取
|
* @description: 动态表单读取
|
||||||
*/
|
*/
|
||||||
getFormFieldList(item) {
|
getFormFieldList(item) {
|
||||||
|
console.log(item);
|
||||||
this.toggleType= item.type || item.qbfsForm.type
|
this.toggleType= item.type || item.qbfsForm.type
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
switch (this.toggleType){
|
switch (this.toggleType){
|
||||||
@@ -440,28 +443,7 @@ export default {
|
|||||||
},
|
},
|
||||||
//流程保存
|
//流程保存
|
||||||
handleSave() {
|
handleSave() {
|
||||||
if(!this.approvalFlag){
|
if(this.approvalFlag || this.saveFlag){
|
||||||
//第一次正常保存
|
|
||||||
let qbzxdFrom = this.$refs["childForm"].qbfsForm;
|
|
||||||
qbzxdFrom.type = this.toggleType
|
|
||||||
this.saveLoading = true
|
|
||||||
let _formData = new FormData()
|
|
||||||
_formData.append('createUser', this.$store.getters.userInfo.userId)
|
|
||||||
_formData.append('createUserName', this.$store.getters.userInfo.userName)
|
|
||||||
_formData.append('prcType', '25')
|
|
||||||
_formData.append('json', JSON.stringify({
|
|
||||||
roleForm: this.roleForm,
|
|
||||||
qbfsForm: qbzxdFrom,
|
|
||||||
commentText: this.commentText
|
|
||||||
}))
|
|
||||||
saveTaskFirst(_formData).then(res => {
|
|
||||||
this.saveLoading = false
|
|
||||||
this.$message.success('保存成功')
|
|
||||||
this.bpnId = res.result
|
|
||||||
}).catch(e => {
|
|
||||||
this.saveLoading = false
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
//被驳回后的保存
|
//被驳回后的保存
|
||||||
this.saveLoading = true;
|
this.saveLoading = true;
|
||||||
let qbzxdFrom = this.$refs["childForm"].qbfsForm;
|
let qbzxdFrom = this.$refs["childForm"].qbfsForm;
|
||||||
@@ -484,7 +466,27 @@ export default {
|
|||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
this.saveLoading = false;
|
this.saveLoading = false;
|
||||||
});
|
});
|
||||||
|
}else{
|
||||||
|
//第一次正常保存
|
||||||
|
let qbzxdFrom = this.$refs["childForm"].qbfsForm;
|
||||||
|
qbzxdFrom.type = this.toggleType
|
||||||
|
this.saveLoading = true
|
||||||
|
let _formData = new FormData()
|
||||||
|
_formData.append('createUser', this.$store.getters.userInfo.userId)
|
||||||
|
_formData.append('createUserName', this.$store.getters.userInfo.userName)
|
||||||
|
_formData.append('prcType', '25')
|
||||||
|
_formData.append('json', JSON.stringify({
|
||||||
|
roleForm: this.roleForm,
|
||||||
|
qbfsForm: qbzxdFrom,
|
||||||
|
commentText: this.commentText
|
||||||
|
}))
|
||||||
|
saveTaskFirst(_formData).then(res => {
|
||||||
|
this.saveLoading = false
|
||||||
|
this.$message.success('保存成功')
|
||||||
|
this.bpnId = res.result
|
||||||
|
}).catch(e => {
|
||||||
|
this.saveLoading = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//流程提交
|
//流程提交
|
||||||
|
|||||||
Reference in New Issue
Block a user