[update] 年度制修订主动上报流程的保存
This commit is contained in:
@@ -44,7 +44,7 @@ const activelyReportReject = (params) => postAction('/process/es/annualReport/re
|
||||
// 根据流程id获取流程信息
|
||||
const activelyReportGetDataById = (taskId, params) => getAction(`/process/es/annualReport/handle/${taskId}`, params)
|
||||
// 草稿的办理回显数据
|
||||
const activelyReportGetDataDraft = (params) => getAction('', params)
|
||||
const activelyReportGetDataDraft = (params) => getAction('/process/es/annualReport/draftHandle', params)
|
||||
|
||||
// 年度制修订计划(标准化发起)
|
||||
// 发起
|
||||
|
||||
+82
-27
@@ -317,28 +317,43 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
// 初始化流程信息,节点1没有制修订计划说明,其余节点都有制修订计划说明
|
||||
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes', 'processDescription'))
|
||||
// 初始化流程审批信息,草稿进来的才回显审批信息
|
||||
// 草稿进来的回显
|
||||
if (type === 'draft') {
|
||||
this.approvalInfoForm.setFieldsValue(pick(this.model.common, 'commitText', 'commitFile'))
|
||||
// 初始化流程信息
|
||||
const prcObj = Object.assign({}, this.model)
|
||||
prcObj.dueTime = this.model.processDueDate
|
||||
prcObj.prcMes = this.model.processDescription
|
||||
prcObj.processDescription = JSON.parse(this.model.infoJsonStr).processDescription
|
||||
this.processInfoForm.setFieldsValue(pick(prcObj, 'prcName', 'dueTime', 'prcMes', 'processDescription'))
|
||||
// 初始化流程审批信息
|
||||
prcObj.commitText = this.model.handleText
|
||||
prcObj.commitFile = this.model.handleFile
|
||||
this.approvalInfoForm.setFieldsValue(pick(prcObj, 'commitText', 'commitFile'))
|
||||
this.model.dataList = JSON.parse(this.model.infoJsonStr).dataList
|
||||
// 如果是节点1的保存回显人员信息
|
||||
if (this.currentNode === 1) {
|
||||
this.draftInitPersonInfo(JSON.parse(this.model.infoJsonStr).personnelObj)
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log('-----------currentNode----------', this.currentNode)
|
||||
// 初始化业务基本信息
|
||||
if (this.currentNode === 1) {
|
||||
// 节点1需要回显数据
|
||||
this.$refs.baseInfoFormRef.initData(this.model)
|
||||
} else if (this.currentNode === 2) {
|
||||
// 节点2草稿情况下需要回显数据
|
||||
if (type === 'draft') {
|
||||
console.log('-----------currentNode----------', this.currentNode)
|
||||
console.log('+++++++++++this.model++++++++++++', this.model)
|
||||
// 初始化业务基本信息
|
||||
if (this.currentNode === 1) {
|
||||
// 节点1需要回显数据
|
||||
this.$refs.baseInfoFormRef.initData(this.model)
|
||||
} else if (this.currentNode === 2) {
|
||||
// 节点2草稿情况下需要回显数据
|
||||
if (type === 'draft') {
|
||||
this.$refs.baseInfoFormRef.initData(this.model)
|
||||
}
|
||||
} else if (this.currentNode === 3) {
|
||||
// 节点3回显数据
|
||||
this.$refs.baseInfoFormRef.initData(this.model)
|
||||
} else if ([4, 5, 6, 7].includes(this.currentNode)) {
|
||||
// 节点4,5,6,7回显数据
|
||||
this.$refs.baseInfoFormRef.initData(this.model)
|
||||
}
|
||||
} else if (this.currentNode === 3) {
|
||||
// 节点3回显数据
|
||||
this.$refs.baseInfoFormRef.initData(this.model)
|
||||
} else if ([4, 5, 6, 7].includes(this.currentNode)) {
|
||||
// 节点4,5,6,7回显数据
|
||||
this.$refs.baseInfoFormRef.initData(this.model)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
@@ -360,8 +375,19 @@ export default {
|
||||
const personnelObj = this.$refs.personnelInfo.getDataObj()
|
||||
// 需要传给后端的
|
||||
const paramObj = {}
|
||||
paramObj.common = { ...processInfoForm, ...approvalInfoForm }
|
||||
paramObj.flowUser = personnelObj
|
||||
// 流程信息
|
||||
paramObj.basicProcessInfoDTO = Object.assign({}, processInfoForm)
|
||||
paramObj.basicProcessInfoDTO.processName = paramObj.basicProcessInfoDTO.prcName
|
||||
paramObj.basicProcessInfoDTO.processDueDate = paramObj.basicProcessInfoDTO.dueTime
|
||||
paramObj.basicProcessInfoDTO.processDescription = paramObj.basicProcessInfoDTO.prcMes
|
||||
paramObj.basicProcessInfoDTO.processInstanceId = this.$route.query.processInstanceId
|
||||
// 流程审批信息
|
||||
paramObj.basicTaskInfoDTO = Object.assign({}, approvalInfoForm)
|
||||
paramObj.basicTaskInfoDTO.handleText = paramObj.basicTaskInfoDTO.commitText
|
||||
paramObj.basicTaskInfoDTO.handleFile = paramObj.basicTaskInfoDTO.commitFile
|
||||
paramObj.basicTaskInfoDTO.taskId = this.$route.query.taskId
|
||||
// paramObj.common = { ...processInfoForm, ...approvalInfoForm }
|
||||
// paramObj.flowUser = personnelObj
|
||||
// 业务基本信息
|
||||
if (this.$refs.baseInfoFormRef) {
|
||||
const ruleForm = this.$refs.baseInfoFormRef.getData()
|
||||
@@ -374,7 +400,10 @@ export default {
|
||||
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
|
||||
return
|
||||
}
|
||||
paramObj.dataList = [ruleForm.formInline]
|
||||
paramObj.infoJsonStr = JSON.stringify({
|
||||
dataList: [ruleForm.formInline],
|
||||
personnelObj: personnelObj
|
||||
})
|
||||
} else if (this.currentNode === 2) {
|
||||
// 业务基本信息有表单,可能有表格也可能没有
|
||||
const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj, ...ruleForm.formInline }
|
||||
@@ -385,11 +414,19 @@ export default {
|
||||
return
|
||||
}
|
||||
if (ruleForm.dataSource) {
|
||||
paramObj.dataList = ruleForm.dataSource.map(item => {
|
||||
return { ...item, ...ruleForm.formInline }
|
||||
paramObj.infoJsonStr = JSON.stringify({
|
||||
dataList: ruleForm.dataSource.map(item => {
|
||||
return { ...item, ...ruleForm.formInline }
|
||||
}),
|
||||
personnelObj: personnelObj,
|
||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||
})
|
||||
} else {
|
||||
paramObj.dataList = [ruleForm.formInline]
|
||||
paramObj.infoJsonStr = JSON.stringify({
|
||||
dataList: [ruleForm.formInline],
|
||||
personnelObj: personnelObj,
|
||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||
})
|
||||
}
|
||||
} else if (this.currentNode === 3) {
|
||||
// 业务基本信息有表单也有表格
|
||||
@@ -400,8 +437,12 @@ export default {
|
||||
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
|
||||
return
|
||||
}
|
||||
paramObj.dataList = ruleForm.dataSource.map(item => {
|
||||
return { ...item, ...ruleForm.formInline }
|
||||
paramObj.infoJsonStr = JSON.stringify({
|
||||
dataList: ruleForm.dataSource.map(item => {
|
||||
return { ...item, ...ruleForm.formInline }
|
||||
}),
|
||||
personnelObj: personnelObj,
|
||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||
})
|
||||
} else if (this.currentNode === 5) {
|
||||
const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj }
|
||||
@@ -412,7 +453,21 @@ export default {
|
||||
return
|
||||
}
|
||||
// 业务基础信息中只有表格
|
||||
paramObj.dataList = ruleForm.dataSource
|
||||
paramObj.infoJsonStr = JSON.stringify({
|
||||
dataList: ruleForm.dataSource,
|
||||
personnelObj: personnelObj,
|
||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||
})
|
||||
} else {
|
||||
paramObj.infoJsonStr = JSON.stringify({
|
||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||
})
|
||||
// 业务基础信息中只有表格
|
||||
paramObj.infoJsonStr = JSON.stringify({
|
||||
dataList: ruleForm.dataSource,
|
||||
personnelObj: personnelObj,
|
||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||
})
|
||||
}
|
||||
} else {
|
||||
// 需要外层信息至少填了一项
|
||||
|
||||
+19
-10
@@ -128,24 +128,31 @@ export default {
|
||||
},
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
console.log(data)
|
||||
// 给表单赋值
|
||||
if (data.dataList[0].distributeFlag + '' === '0') {
|
||||
// 不下发联络人
|
||||
this.formInline = {
|
||||
distributeFlag: data.dataList[0].distributeFlag,
|
||||
contactUserLeaderLeader: data.flowUser.contactUserLeaderLeader
|
||||
}
|
||||
this.formInline.distributeFlag = data.dataList[0].distributeFlag
|
||||
this.formInline.contactUserLeaderLeader = data.flowUser ? data.flowUser.contactUserLeaderLeader : data.dataList[0].contactUserLeaderLeader
|
||||
this.formInline.contactUserLeaderLeader_dictText = data.flowUser ? data.flowUser.contactUserLeaderLeader_dictText : data.dataList[0].contactUserLeaderLeader_dictText
|
||||
this.formInline = Object.assign({}, this.formInline)
|
||||
// 给表格赋值
|
||||
this.$nextTick(() => {
|
||||
this.$refs.tableRef.initData(data)
|
||||
})
|
||||
} else {
|
||||
// 下发联络人,没有表格
|
||||
this.formInline = {
|
||||
distributeFlag: data.dataList[0].distributeFlag,
|
||||
workGroupUserList: data.flowUser.workGroupUserList,
|
||||
contactUserLeaderLeader: data.flowUser.contactUserLeaderLeader
|
||||
}
|
||||
this.formInline.distributeFlag = data.dataList[0].distributeFlag
|
||||
this.formInline.workGroupUser = data.flowUser ? data.flowUser.workGroupUserList : data.dataList[0].workGroupUser
|
||||
this.formInline.workGroupUser_dictText = data.flowUser ? data.flowUser.workGroupUserList_dictText : data.dataList[0].workGroupUser_dictText
|
||||
this.formInline.contactUserLeaderLeader = data.flowUser ? data.flowUser.contactUserLeaderLeader : data.dataList[0].contactUserLeaderLeader
|
||||
this.formInline.contactUserLeaderLeader_dictText = data.flowUser ? data.flowUser.contactUserLeaderLeader_dictText : data.dataList[0].contactUserLeaderLeader_dictText
|
||||
this.formInline = Object.assign({}, this.formInline)
|
||||
// this.formInline = {
|
||||
// distributeFlag: data.dataList[0].distributeFlag,
|
||||
// workGroupUserList: data.flowUser.workGroupUserList || data.dataList[0].workGroupUserList,
|
||||
// contactUserLeaderLeader: data.flowUser.contactUserLeaderLeader || data.dataList[0].contactUserLeaderLeader
|
||||
// }
|
||||
}
|
||||
},
|
||||
// 外层要获取数据
|
||||
@@ -153,7 +160,9 @@ export default {
|
||||
// 把数据抛出
|
||||
const data = {}
|
||||
data.formInline = this.formInline
|
||||
data.dataSource = this.$refs.tableRef.dataSource
|
||||
if (this.$refs.tableRef) {
|
||||
data.dataSource = this.$refs.tableRef.getData().dataSource
|
||||
}
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
|
||||
@@ -50,7 +50,7 @@ export default {
|
||||
initData (data) {
|
||||
// 给表单赋值
|
||||
this.formInline = {
|
||||
processDescription: data.common.processDescription
|
||||
processDescription: data.common ? data.common.processDescription : data.dataList[0].processDescription
|
||||
}
|
||||
},
|
||||
// 外层要获取数据
|
||||
|
||||
Reference in New Issue
Block a user