[update] 处理流程中人员信息
This commit is contained in:
+45
-41
@@ -247,8 +247,11 @@ export default {
|
||||
this.currentNode = 5
|
||||
} else if (taskName === '主起草单位主管级领导批准') {
|
||||
this.currentNode = 6
|
||||
} else {
|
||||
} else if (taskName === '标准化归档') {
|
||||
this.currentNode = 7
|
||||
} else {
|
||||
// 预留加签节点
|
||||
this.currentNode = 999
|
||||
}
|
||||
}
|
||||
// 如果是查看进入的,不可编辑,不可操作
|
||||
@@ -425,24 +428,23 @@ export default {
|
||||
}
|
||||
this.processInfoForm.validateFields((err, values) => {
|
||||
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
|
||||
this.$refs.baseInfoRef.getDataValidate((data) => {
|
||||
if (!err && !approvalErr && data) {
|
||||
const param = {} // 传给后端的数据
|
||||
param.common = { ...values, ...approvalValues }
|
||||
param.dataList = data.dataSource
|
||||
param.flowUser = personnelObj
|
||||
standardizationInitApproval(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
const data = this.$refs.baseInfoRef.getDataValidate()
|
||||
if (!err && !approvalErr && data) {
|
||||
const param = {} // 传给后端的数据
|
||||
param.common = { ...values, ...approvalValues }
|
||||
param.dataList = data.dataSource
|
||||
param.flowUser = personnelObj
|
||||
standardizationInitApproval(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -478,35 +480,37 @@ export default {
|
||||
if (this.loading) return
|
||||
// 流程审批信息校验
|
||||
this.approvalInfoForm.validateFields((approvalErr, approvalValues) => {
|
||||
this.$refs.baseInfoFormRef.getDataValidate(data => {
|
||||
if (approvalErr && data) {
|
||||
// 只有表格
|
||||
const param = {}
|
||||
param.common = approvalValues
|
||||
param.dataList = data.dataSource
|
||||
standardizationInitAgree(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
const data = this.$refs.baseInfoFormRef.getDataValidate()
|
||||
if (!approvalErr && data) {
|
||||
// 只有表格
|
||||
const param = {}
|
||||
param.common = approvalValues
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
param.dataList = data.dataSource
|
||||
standardizationInitAgree(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 同意(节点2,3,6有同意)
|
||||
handleAgree () {
|
||||
if (this.loading) return
|
||||
this.approvalInfoForm.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
this.loading = true
|
||||
const data = this.$refs.baseInfoFormRef.getDataValidate()
|
||||
if (!err && data) {
|
||||
// 只有表格
|
||||
const param = {}
|
||||
param.common = Object.assign({}, values)
|
||||
param.taskId = this.$route.query.taskId
|
||||
param.common = values
|
||||
param.common.taskId = this.$route.query.taskId
|
||||
param.dataList = data.dataSource
|
||||
standardizationInitAgree(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
|
||||
+5
-7
@@ -215,9 +215,8 @@ export default {
|
||||
methods: {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表格赋值
|
||||
// this.dataSource =
|
||||
this.dataSource = data.dataList
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
@@ -227,8 +226,9 @@ export default {
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate (callback) {
|
||||
getDataValidate () {
|
||||
// 每行的审批人是否都有
|
||||
let data = {}
|
||||
let hasErr = false
|
||||
for (const item of this.dataSource) {
|
||||
if (!item.approvalUser) {
|
||||
@@ -237,15 +237,13 @@ export default {
|
||||
break
|
||||
}
|
||||
}
|
||||
let data
|
||||
if (hasErr) {
|
||||
this.$message.warning(this.$t('workCenter.revisionPlanActivelyReport.pleaseSelectApprover'))
|
||||
data = false
|
||||
callback(data)
|
||||
} else {
|
||||
data = { dataSource: this.dataSource }
|
||||
callback(data)
|
||||
data.dataSource = this.dataSource
|
||||
}
|
||||
return data
|
||||
},
|
||||
// 企标编号,企标名称跳转详情,原企标
|
||||
handleGoDetailOld (record) {
|
||||
|
||||
+12
-10
@@ -287,9 +287,8 @@ export default {
|
||||
methods: {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表格赋值
|
||||
// this.dataSource =
|
||||
this.dataSource = data.dataList
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
@@ -301,10 +300,10 @@ export default {
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate (callback) {
|
||||
getDataValidate () {
|
||||
// 校验表格是否每行都有数据,每行的联络人是否都有
|
||||
let data = {}
|
||||
if (this.dataSource && this.dataSource.length > 0) {
|
||||
const data = {}
|
||||
data.dataSource = this.dataSource.map(item => {
|
||||
return { ...item, enStandardSystem: item.enStandardSystem ? item.enStandardSystem.join(',') : ''}
|
||||
})
|
||||
@@ -318,16 +317,13 @@ export default {
|
||||
}
|
||||
if (hasErr) {
|
||||
this.$message.warning(this.$t('workCenter.revisionPlanActivelyReport.pleaseSelectContact'))
|
||||
const data = false
|
||||
callback(data)
|
||||
} else {
|
||||
callback(data)
|
||||
data = false
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
const data = false
|
||||
callback(data)
|
||||
data = false
|
||||
}
|
||||
return data
|
||||
},
|
||||
// 企标编号,企标名称跳转详情,原企标
|
||||
handleGoDetailOld (record) {
|
||||
@@ -375,6 +371,12 @@ export default {
|
||||
},
|
||||
// 导入
|
||||
handleImportExcel (info) {
|
||||
// 限制导入大于500MB
|
||||
if (info.file.size > 1024 * 1024 * 500) {
|
||||
this.$message.error('导入文件最大500MB!')
|
||||
info.fileList.pop()
|
||||
return
|
||||
}
|
||||
// 加一个大的提示
|
||||
if (!this.loading) {
|
||||
importModalLoading = this.$info({
|
||||
|
||||
+5
-7
@@ -211,9 +211,8 @@ export default {
|
||||
methods: {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表格赋值
|
||||
// this.dataSource =
|
||||
this.dataSource = data.dataList
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
@@ -223,8 +222,9 @@ export default {
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate (callback) {
|
||||
getDataValidate () {
|
||||
// 每行的主起草人是否都有
|
||||
let data = {}
|
||||
let hasErr = false
|
||||
for (const item of this.dataSource) {
|
||||
if (!item.drafter) {
|
||||
@@ -233,15 +233,13 @@ export default {
|
||||
break
|
||||
}
|
||||
}
|
||||
let data
|
||||
if (hasErr) {
|
||||
this.$message.warning(this.$t('workCenter.revisionPlanActivelyReport.pleaseSelectDrafter'))
|
||||
data = false
|
||||
callback(data)
|
||||
} else {
|
||||
data = { dataSource: this.dataSource }
|
||||
callback(data)
|
||||
data.dataSource = this.dataSource
|
||||
}
|
||||
return data
|
||||
},
|
||||
// 企标编号,企标名称跳转详情,原企标
|
||||
handleGoDetailOld (record) {
|
||||
|
||||
+5
-7
@@ -230,9 +230,8 @@ export default {
|
||||
methods: {
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
// 给表格赋值
|
||||
// this.dataSource =
|
||||
this.dataSource = data.dataList
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
@@ -242,17 +241,16 @@ export default {
|
||||
return data
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate (callback) {
|
||||
getDataValidate () {
|
||||
// 校验表格是否每行都有数据,每行的联络人是否都有
|
||||
let data = {}
|
||||
if (this.dataSource && this.dataSource.length > 0) {
|
||||
const data = {}
|
||||
data.dataSource = this.dataSource
|
||||
callback(data)
|
||||
} else {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
const data = false
|
||||
callback(data)
|
||||
data = false
|
||||
}
|
||||
return data
|
||||
},
|
||||
// 企标编号,企标名称跳转详情,原企标
|
||||
handleGoDetailOld (record) {
|
||||
|
||||
Reference in New Issue
Block a user