避免形成二次草稿
This commit is contained in:
@@ -283,6 +283,7 @@ export default {
|
||||
qbfsForm: {},
|
||||
formLoading: false,
|
||||
approvalFlag: false,
|
||||
saveFlag: false,
|
||||
showFlag: true,
|
||||
taskIds: '',
|
||||
bpnId: '',
|
||||
@@ -333,6 +334,7 @@ export default {
|
||||
this.taskIds = this.$route.query.taskIds
|
||||
this.bpnId = this.$route.query.bpnId
|
||||
if (this.bpnId !== undefined) {
|
||||
this.saveFlag = true
|
||||
this.getData()
|
||||
}
|
||||
if(this.taskIds){
|
||||
@@ -387,6 +389,7 @@ export default {
|
||||
* @description: 动态表单读取
|
||||
*/
|
||||
getFormFieldList(item) {
|
||||
console.log(item);
|
||||
this.toggleType= item.type || item.qbfsForm.type
|
||||
this.$nextTick(() => {
|
||||
switch (this.toggleType){
|
||||
@@ -440,28 +443,7 @@ export default {
|
||||
},
|
||||
//流程保存
|
||||
handleSave() {
|
||||
if(!this.approvalFlag){
|
||||
//第一次正常保存
|
||||
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{
|
||||
if(this.approvalFlag || this.saveFlag){
|
||||
//被驳回后的保存
|
||||
this.saveLoading = true;
|
||||
let qbzxdFrom = this.$refs["childForm"].qbfsForm;
|
||||
@@ -484,7 +466,27 @@ export default {
|
||||
}).catch(e => {
|
||||
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