[update] 修改各部门主动上报流程的保存
This commit is contained in:
+19
-11
@@ -421,12 +421,12 @@ export default {
|
|||||||
// 业务基本信息有表单,可能有表格也可能没有
|
// 业务基本信息有表单,可能有表格也可能没有
|
||||||
const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj, ...ruleForm.formInline }
|
const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj, ...ruleForm.formInline }
|
||||||
const flag = Object.values(param).some(v => !!v || v === 0)
|
const flag = Object.values(param).some(v => !!v || v === 0)
|
||||||
if (!flag || (ruleForm.dataSource && ruleForm.dataSource.length <= 0)) {
|
if (!flag && (ruleForm.dataSource && ruleForm.dataSource.length <= 0)) {
|
||||||
// 提示至少填写一项
|
// 提示至少填写一项
|
||||||
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
|
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (ruleForm.dataSource) {
|
if (ruleForm.dataSource && ruleForm.dataSource.length > 0) {
|
||||||
paramObj.infoJsonStr = JSON.stringify({
|
paramObj.infoJsonStr = JSON.stringify({
|
||||||
dataList: ruleForm.dataSource.map(item => {
|
dataList: ruleForm.dataSource.map(item => {
|
||||||
return { ...item, ...ruleForm.formInline }
|
return { ...item, ...ruleForm.formInline }
|
||||||
@@ -445,22 +445,30 @@ export default {
|
|||||||
// 业务基本信息有表单也有表格
|
// 业务基本信息有表单也有表格
|
||||||
const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj, ...ruleForm.formInline }
|
const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj, ...ruleForm.formInline }
|
||||||
const flag = Object.values(param).some(v => !!v || v === 0)
|
const flag = Object.values(param).some(v => !!v || v === 0)
|
||||||
if (!flag || ruleForm.dataSource.length <= 0) {
|
if (!flag && ruleForm.dataSource.length <= 0) {
|
||||||
// 提示至少填写一项
|
// 提示至少填写一项
|
||||||
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
|
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
paramObj.infoJsonStr = JSON.stringify({
|
if (ruleForm.dataSource && ruleForm.dataSource.length > 0) {
|
||||||
dataList: ruleForm.dataSource.map(item => {
|
paramObj.infoJsonStr = JSON.stringify({
|
||||||
return { ...item, ...ruleForm.formInline }
|
dataList: ruleForm.dataSource.map(item => {
|
||||||
}),
|
return { ...item, ...ruleForm.formInline }
|
||||||
personnelObj: personnelObj,
|
}),
|
||||||
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
personnelObj: personnelObj,
|
||||||
})
|
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
paramObj.infoJsonStr = JSON.stringify({
|
||||||
|
dataList: [ruleForm.formInline],
|
||||||
|
personnelObj: personnelObj,
|
||||||
|
processDescription: this.processInfoForm.getFieldValue('processDescription')
|
||||||
|
})
|
||||||
|
}
|
||||||
} else if (this.currentNode === 5) {
|
} else if (this.currentNode === 5) {
|
||||||
const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj }
|
const param = { ...processInfoForm, ...approvalInfoForm, ...personnelObj }
|
||||||
const flag = Object.values(param).some(v => !!v || v === 0)
|
const flag = Object.values(param).some(v => !!v || v === 0)
|
||||||
if (!flag || ruleForm.dataSource.length <= 0) {
|
if (!flag && ruleForm.dataSource.length <= 0) {
|
||||||
// 提示至少填写一项
|
// 提示至少填写一项
|
||||||
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
|
this.$message.warning(this.$t('pleaseFillInAtLeastOneItem'))
|
||||||
return
|
return
|
||||||
|
|||||||
+6
-3
@@ -139,9 +139,12 @@ export default {
|
|||||||
this.formInline.contactUserLeaderLeader_dictText = data.flowUser ? data.flowUser.contactUserLeaderLeader_dictText : data.dataList[0].contactUserLeaderLeader_dictText
|
this.formInline.contactUserLeaderLeader_dictText = data.flowUser ? data.flowUser.contactUserLeaderLeader_dictText : data.dataList[0].contactUserLeaderLeader_dictText
|
||||||
this.formInline = Object.assign({}, this.formInline)
|
this.formInline = Object.assign({}, this.formInline)
|
||||||
// 给表格赋值
|
// 给表格赋值
|
||||||
this.$nextTick(() => {
|
if (data.dataList.length > 0 && data.dataList[0].applicationType) {
|
||||||
this.$refs.tableRef.initData(data)
|
// 第一行数据有申请类型字段说明才有表格数据,否则有可能是保存没有填表格信息的情况
|
||||||
})
|
this.$nextTick(() => {
|
||||||
|
this.$refs.tableRef.initData(data)
|
||||||
|
})
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// 下发联络人,没有表格
|
// 下发联络人,没有表格
|
||||||
this.formInline.distributeFlag = data.dataList[0].distributeFlag
|
this.formInline.distributeFlag = data.dataList[0].distributeFlag
|
||||||
|
|||||||
+6
-3
@@ -78,9 +78,12 @@ export default {
|
|||||||
this.formInline.collectUserLeader_dictText = data.dataList[0].collectUserLeader_dictText
|
this.formInline.collectUserLeader_dictText = data.dataList[0].collectUserLeader_dictText
|
||||||
this.formInline = Object.assign({}, this.formInline)
|
this.formInline = Object.assign({}, this.formInline)
|
||||||
// 给表格赋值
|
// 给表格赋值
|
||||||
this.$nextTick(() => {
|
if (data.dataList.length > 0 && data.dataList[0].applicationType) {
|
||||||
this.$refs.tableRef.initData(data)
|
// 第一行数据有申请类型字段说明才有表格数据,否则有可能是保存没有填表格信息的情况
|
||||||
})
|
this.$nextTick(() => {
|
||||||
|
this.$refs.tableRef.initData(data)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
initTableData (data) {
|
initTableData (data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user