未符合项流程保存
This commit is contained in:
@@ -234,7 +234,7 @@ import ProcessHeader from '../../components/ProcessHeader'
|
||||
import ProcessFooter from '../../components/ProcessFooter'
|
||||
import ProcessTitle from '../../components/ProcessTitle'
|
||||
import { roleTreeData } from "@/api/unqualProcess.js"
|
||||
import {completeTask, inboundLiaisonDetail, saveinboundTask} from "@/api/process.js"
|
||||
import {completeTask, inboundLiaisonDetail, saveinboundTask, saveTaskForPub} from "@/api/process.js"
|
||||
|
||||
export default {
|
||||
name: "wfhxzgStep2",
|
||||
@@ -373,10 +373,10 @@ export default {
|
||||
_formData.append('taskIds', this.taskIds)
|
||||
_formData.append('json', JSON.stringify({
|
||||
// roleForm: this.roleForm,
|
||||
itemsList: this.dataList,
|
||||
standardInfoList: this.dataList,
|
||||
commentText: this.commentText
|
||||
}))
|
||||
saveinboundTask(_formData).then(res => {
|
||||
saveTaskForPub(_formData).then(res => {
|
||||
this.saveLoading = false
|
||||
this.$message.success('保存成功')
|
||||
this.bpnId = res.result
|
||||
@@ -388,7 +388,7 @@ export default {
|
||||
handleSubmit() {
|
||||
this.isSubmit = true
|
||||
let zqa = new Map();
|
||||
for (let lastDataListElement of this.lastDataList) {
|
||||
for (let lastDataListElement of this.dataList) {
|
||||
let a = zqa.get(lastDataListElement.dutyPeopleInfoId)
|
||||
if( a == null){
|
||||
a = {
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
import ProcessHeader from '../../components/ProcessHeader'
|
||||
import ProcessFooter from '../../components/ProcessFooter'
|
||||
import ProcessTitle from '../../components/ProcessTitle'
|
||||
import {completeTask, inboundLiaisonDetail} from "@/api/process.js";
|
||||
import {completeTask, inboundLiaisonDetail, saveTaskForPub} from "@/api/process.js";
|
||||
|
||||
export default {
|
||||
name: "wfhxzgStep3",
|
||||
@@ -405,7 +405,41 @@ export default {
|
||||
window.open(routeUrl.href, '_blank')
|
||||
},
|
||||
// 保存按钮
|
||||
handleSave() {},
|
||||
handleSave() {
|
||||
this.isSubmit = true
|
||||
let zqa = new Map();
|
||||
for (let lastDataListElement of this.dataList) {
|
||||
let a = zqa.get(lastDataListElement.dutyPeopleInfoId)
|
||||
if( a == null){
|
||||
a = {
|
||||
id: lastDataListElement.dutyPeopleInfoId,
|
||||
name: lastDataListElement.dutyPeopleInfo,
|
||||
standardInfoList: []
|
||||
}
|
||||
}
|
||||
a.standardInfoList.push(lastDataListElement);
|
||||
zqa.set(a.id, a);
|
||||
}
|
||||
let list = [];
|
||||
for(let item of zqa) {
|
||||
list.push(item[1])
|
||||
}
|
||||
this.saveLoading = true
|
||||
let _formData = new FormData()
|
||||
_formData.append('taskIds', this.taskIds)
|
||||
_formData.append('json', JSON.stringify({
|
||||
// roleForm: this.roleForm,
|
||||
dockUserList: list,
|
||||
commentText: this.commentText
|
||||
}))
|
||||
saveTaskForPub(_formData).then(res => {
|
||||
this.saveLoading = false
|
||||
this.$message.success('保存成功')
|
||||
this.bpnId = res.result
|
||||
}).catch(e => {
|
||||
this.saveLoading = false
|
||||
})
|
||||
},
|
||||
// 提交按钮
|
||||
handleSubmit() {
|
||||
this.isSubmit = true
|
||||
@@ -418,7 +452,7 @@ export default {
|
||||
})
|
||||
if(flag)return this.$message.warning('请选择负责人填入')
|
||||
let zqa = new Map();
|
||||
for (let lastDataListElement of this.lastDataList) {
|
||||
for (let lastDataListElement of this.dataList) {
|
||||
let a = zqa.get(lastDataListElement.dutyPeopleId)
|
||||
if( a == null){
|
||||
a = {
|
||||
|
||||
@@ -230,7 +230,7 @@ import ProcessHeader from '../../components/ProcessHeader'
|
||||
import ProcessFooter from '../../components/ProcessFooter'
|
||||
import ProcessTitle from '../../components/ProcessTitle'
|
||||
import {uploadFile} from '@/api/unqualProcess.js';
|
||||
import {inboundLiaisonDetail, completeTask} from "@/api/process"
|
||||
import {inboundLiaisonDetail, completeTask, saveTaskForPub} from "@/api/process"
|
||||
|
||||
export default {
|
||||
name: "wfhxzgStep4",
|
||||
@@ -306,10 +306,13 @@ export default {
|
||||
},
|
||||
getFormFieldList (item) {
|
||||
this.$nextTick(() => {
|
||||
|
||||
this.dataList = [JSON.parse(JSON.stringify(item.responUserInfo.info))]
|
||||
let listJSON = JSON.parse(JSON.stringify(item.responUserInfo.info))
|
||||
if (listJSON.length !== undefined) {
|
||||
this.dataList = listJSON
|
||||
} else {
|
||||
this.dataList = [listJSON]
|
||||
}
|
||||
this.newDataList = []
|
||||
console.log(this.dataList)
|
||||
this.dataList.forEach(item => {
|
||||
if (item.fileText.length !== 0) {
|
||||
item.fileText.forEach(item1 => {
|
||||
@@ -402,7 +405,40 @@ export default {
|
||||
window.open(routeUrl.href, '_blank')
|
||||
},
|
||||
// 保存按钮
|
||||
handleSave() {},
|
||||
handleSave() {
|
||||
let zqa = new Map();
|
||||
for (let lastDataListElement of this.dataList) {
|
||||
let a = zqa.get(lastDataListElement.dutyPeopleId)
|
||||
if( a == null){
|
||||
a = {
|
||||
standardInfoList: []
|
||||
}
|
||||
}
|
||||
a.standardInfoList.push(lastDataListElement);
|
||||
zqa.set(a.id, a);
|
||||
}
|
||||
let list = []
|
||||
for(let item of zqa) {
|
||||
list.push(item[1].standardInfoList)
|
||||
}
|
||||
this.saveLoading = true
|
||||
let _formData = new FormData()
|
||||
_formData.append('taskIds', this.taskIds)
|
||||
_formData.append('json', JSON.stringify({
|
||||
// roleForm: this.roleForm,
|
||||
responUserInfo: {
|
||||
info: this.dataList.splice(-1, 1)
|
||||
},
|
||||
commentText: this.commentText
|
||||
}))
|
||||
saveTaskForPub(_formData).then(res => {
|
||||
this.saveLoading = false
|
||||
this.$message.success('保存成功')
|
||||
this.bpnId = res.result
|
||||
}).catch(e => {
|
||||
this.saveLoading = false
|
||||
})
|
||||
},
|
||||
// 提交按钮
|
||||
handleSubmit() {
|
||||
this.isSubmit = true
|
||||
|
||||
Reference in New Issue
Block a user