[update] 联调企标废止流程
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<internal-detail-page :title="pageTitle" :content-padding="0">
|
<internal-detail-page :title="pageTitle" :content-padding="0" :loading="loading">
|
||||||
<!-- 标题右侧tab -->
|
<!-- 标题右侧tab -->
|
||||||
<template v-slot:titleRightCustom>
|
<template v-slot:titleRightCustom>
|
||||||
<div class="table-operator-tab">
|
<div class="table-operator-tab">
|
||||||
@@ -141,15 +141,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
// 获取人员信息结构
|
|
||||||
this.getPersonInfoStructure(ProcessKey.ES_ABOLISH.value)
|
|
||||||
if (this.$route.query.taskId) {
|
|
||||||
this.currentNodeName = this.$route.query.taskName
|
|
||||||
// 有流程id说明是从流程中心来的,需要初始化数据
|
|
||||||
this.getProcessData(this.$route.query.taskId)
|
|
||||||
} else {
|
|
||||||
this.currentNodeName = '发起人发起'
|
|
||||||
}
|
|
||||||
// 初始化节点
|
// 初始化节点
|
||||||
const taskName = this.$route.query.taskName
|
const taskName = this.$route.query.taskName
|
||||||
if (taskName) {
|
if (taskName) {
|
||||||
@@ -170,12 +161,23 @@ export default {
|
|||||||
this.currentNode = 999
|
this.currentNode = 999
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.currentNode === 1) {
|
// 获取人员信息结构
|
||||||
this.disabled = false
|
this.getPersonInfoStructure(ProcessKey.ES_ABOLISH.value, () => {
|
||||||
|
if (this.currentNode === 1) {
|
||||||
|
this.disabled = false
|
||||||
|
this.initPersonInfoData(true)
|
||||||
|
} else {
|
||||||
|
this.disabled = true
|
||||||
|
// 如果不是第一个节点,人员信息全部不可选
|
||||||
|
this.initPersonInfoData(false)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (this.$route.query.taskId) {
|
||||||
|
this.currentNodeName = this.$route.query.taskName
|
||||||
|
// 有流程id说明是从流程中心来的,需要初始化数据
|
||||||
|
this.getProcessData(this.$route.query.taskId)
|
||||||
} else {
|
} else {
|
||||||
this.disabled = true
|
this.currentNodeName = '发起人发起'
|
||||||
// 如果不是第一个节点,人员信息全部不可选
|
|
||||||
this.initPersonInfoData()
|
|
||||||
}
|
}
|
||||||
// 如果是查看进入的,不可编辑,不可操作
|
// 如果是查看进入的,不可编辑,不可操作
|
||||||
if (this.$route.query.onlyLook) {
|
if (this.$route.query.onlyLook) {
|
||||||
@@ -235,19 +237,25 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 根据流程id获取数据并回显
|
// 根据流程id获取数据并回显
|
||||||
getProcessData (taskId) {
|
getProcessData (taskId) {
|
||||||
enStandardAnnulGetDataById({ taskId: taskId }).then(res => {
|
this.loading = true
|
||||||
|
enStandardAnnulGetDataById(taskId).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.model = res.result
|
this.model = res.result
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// 初始化流程信息
|
// 初始化流程信息
|
||||||
this.processInfoForm.setFieldsValue(pick(this.model[0], 'processName', 'deadlineDate', 'processDescription'))
|
this.processInfoForm.setFieldsValue(pick(this.model, 'processName', 'deadlineDate', 'processDescription'))
|
||||||
// 初始化流程审批信息,todo:需要判断是不是草稿进来的,草稿进来的才回显审批信息
|
// 初始化流程审批信息,todo:需要判断是不是草稿进来的,草稿进来的才回显审批信息
|
||||||
// this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'remarks', 'attachment'))
|
// this.approvalInfoForm.setFieldsValue(pick(this.model[0], 'remarks', 'attachment'))
|
||||||
|
if (this.$refs.baseInfoRef) {
|
||||||
|
this.$refs.baseInfoRef.initData(this.model.data)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
// 初始化业务基本信息中组件内容
|
// 初始化业务基本信息中组件内容
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 头部tab改变
|
// 头部tab改变
|
||||||
@@ -283,7 +291,7 @@ export default {
|
|||||||
const paramObj = {}
|
const paramObj = {}
|
||||||
paramObj.common = { ...processInfoForm, ...approvalInfoForm }
|
paramObj.common = { ...processInfoForm, ...approvalInfoForm }
|
||||||
paramObj.flowUser = personnelObj
|
paramObj.flowUser = personnelObj
|
||||||
paramObj.dataList = [baseInfo.formInline]
|
paramObj.data = baseInfo.formInline
|
||||||
this.loading = true
|
this.loading = true
|
||||||
// 保存到草稿
|
// 保存到草稿
|
||||||
enStandardAnnulSave(paramObj).then(res => {
|
enStandardAnnulSave(paramObj).then(res => {
|
||||||
@@ -317,6 +325,7 @@ export default {
|
|||||||
enStandardAnnulApproval(paramObj).then(res => {
|
enStandardAnnulApproval(paramObj).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
@@ -344,6 +353,7 @@ export default {
|
|||||||
enStandardAnnulTurnTo(param).then(res => {
|
enStandardAnnulTurnTo(param).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
@@ -359,11 +369,13 @@ export default {
|
|||||||
this.approvalInfoForm.validateFields((err, values) => {
|
this.approvalInfoForm.validateFields((err, values) => {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const param = Object.assign({}, values)
|
const param = {}
|
||||||
param.taskId = this.$route.query.taskId
|
param.common = Object.assign({}, values)
|
||||||
|
param.common.taskId = this.$route.query.taskId
|
||||||
enStandardAnnulAgree(param).then(res => {
|
enStandardAnnulAgree(param).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
@@ -389,6 +401,7 @@ export default {
|
|||||||
enStandardAnnulReject(param).then(res => {
|
enStandardAnnulReject(param).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(res.message)
|
this.$message.success(res.message)
|
||||||
|
this.goBack()
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -197,9 +197,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||||
initData (data) {
|
initData (data) {
|
||||||
this.data = data
|
|
||||||
// 给表单赋值
|
// 给表单赋值
|
||||||
// this.formInline =
|
this.formInline = Object.assign({}, data)
|
||||||
},
|
},
|
||||||
// 外层要获取数据
|
// 外层要获取数据
|
||||||
getData () {
|
getData () {
|
||||||
|
|||||||
Reference in New Issue
Block a user