|
@@ -7,6 +7,27 @@
|
|
|
<div>
|
|
|
<div class="my-title">查看</div>
|
|
|
<div style="margin-left: 20px; margin-right: 20px">
|
|
|
+ <!-- 工作流 -->
|
|
|
+ <div v-show="dataForm.workFlowBusinessExt">
|
|
|
+ <el-steps :active="dataForm.workFlowBusinessExt&&dataForm.workFlowBusinessExt.workFlowProcessStepList?dataForm.workFlowBusinessExt.workFlowProcessStepList.length + 2:0" align-center style="margin-bottom: 20px">
|
|
|
+ <template v-for="(item, i) in stepList">
|
|
|
+ <el-step :icon="item.icon" :title="item.title" :description="item.description"></el-step>
|
|
|
+ </template>
|
|
|
+ </el-steps>
|
|
|
+ <el-collapse style="margin-bottom: 20px">
|
|
|
+ <el-collapse-item>
|
|
|
+ <template slot="title">
|
|
|
+ <span style="color: red">审批日志(展开查看更多):</span>
|
|
|
+ </template>
|
|
|
+ <template v-for="(item, i) in logList">
|
|
|
+ <div>{{++i}}:{{item.approverName}} {{item.createTime}} {{item.approvalValue}}</div>
|
|
|
+ </template>
|
|
|
+ </el-collapse-item>
|
|
|
+ </el-collapse>
|
|
|
+ </div>
|
|
|
+ <div v-if="isFlow">
|
|
|
+ <approve-component ref="approve" @approveFinished="approveFinished"/>
|
|
|
+ </div>
|
|
|
<e-desc title="基本信息" column="3">
|
|
|
<e-desc-item label="沟通编码">{{ dataForm.coCode }}</e-desc-item>
|
|
|
<e-desc-item label="客户名称">{{ dataForm.customerName }}</e-desc-item>
|
|
@@ -117,7 +138,7 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{
|
|
|
- taskTypeOption.findIndex((t) => t.value == scope.row.taskType) > -1
|
|
|
+ taskTypeOption.findIndex((t) => t.value == scope.row.taskType) > -1
|
|
|
? taskTypeOption.find((t) => t.value == scope.row.taskType).label
|
|
|
: ''
|
|
|
}}</span>
|
|
@@ -140,7 +161,7 @@
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{
|
|
|
- rankTypeOption.findIndex((t) => t.value == scope.row.ranks) > -1
|
|
|
+ rankTypeOption.findIndex((t) => t.value == scope.row.ranks) > -1
|
|
|
? rankTypeOption.find((t) => t.value == scope.row.ranks).label
|
|
|
: ''
|
|
|
}}</span>
|
|
@@ -211,9 +232,12 @@ import { getCoDetail } from '@/api/cus'
|
|
|
import uploadComponent from '../common/upload-component-v2'
|
|
|
import AttachDetailDialog from '../common/attach-detail-dialog'
|
|
|
import { taskTypeOption, rankTypeOption } from '@/utils/enums'
|
|
|
+import {dealStepData, dealStepLogs} from '@/api/util'
|
|
|
+import ApproveComponent from '@/views/modules/common/approve-component'
|
|
|
export default {
|
|
|
name: 'communicate-detail',
|
|
|
components: {
|
|
|
+ ApproveComponent,
|
|
|
EDesc,
|
|
|
EDescItem,
|
|
|
uploadComponent,
|
|
@@ -227,22 +251,26 @@ export default {
|
|
|
cusRCommProductVOS: [],
|
|
|
fileList: [],
|
|
|
taskTypeOption: taskTypeOption,
|
|
|
- rankTypeOption: rankTypeOption
|
|
|
+ rankTypeOption: rankTypeOption,
|
|
|
+ isFlow: false,
|
|
|
+ stepList: [],
|
|
|
+ logList: []
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
onChose () {
|
|
|
this.$emit('onChose')
|
|
|
},
|
|
|
- async init (id) {
|
|
|
+ async init (id, businessType) {
|
|
|
this.visible = true
|
|
|
+ this.isFlow = !!(businessType && businessType !== '')
|
|
|
this.id = id || 0
|
|
|
this.dataForm = {}
|
|
|
this.cusRCommProductVOS = []
|
|
|
this.fileList = []
|
|
|
- this.getDetails()
|
|
|
+ this.getDetails(businessType)
|
|
|
},
|
|
|
- getDetails () {
|
|
|
+ getDetails (businessType) {
|
|
|
getCoDetail(this.id).then(({ data }) => {
|
|
|
if (data && data.code === '200') {
|
|
|
this.dataForm = data.data
|
|
@@ -272,7 +300,6 @@ export default {
|
|
|
item.id = item.url
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
if (data.data.cusRCommProductVOS) {
|
|
|
data.data.cusRCommProductVOS.forEach((item) => {
|
|
|
this.cusRCommProductVOS.push({
|
|
@@ -280,11 +307,31 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+ // 流程图展示
|
|
|
+ dealStepData(data.data.workFlowBusinessExt.workFlowProcessStepList, this.stepList)
|
|
|
+ dealStepLogs(data.data.workFlowBusinessExt.processLogList, this.logList)
|
|
|
+
|
|
|
+ // 初始化审批Form
|
|
|
+ this.showApproveForm(businessType, this.id)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
attachDetails (attachList) {
|
|
|
this.$refs.attachDetail.init(attachList)
|
|
|
+ },
|
|
|
+ // 初始化审批Form
|
|
|
+ showApproveForm (businessType, businessId) {
|
|
|
+ if (this.isFlow) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.approve.init(businessType, businessId)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 审批完成
|
|
|
+ approveFinished () {
|
|
|
+ this.onChose()
|
|
|
+ this.$emit('approveFinished')
|
|
|
}
|
|
|
}
|
|
|
}
|