|
@@ -4,7 +4,7 @@
|
|
|
<div class="my-title">查看</div>
|
|
|
<div style="margin-left: 20px;margin-right: 20px">
|
|
|
<!-- 工作流 -->
|
|
|
- <div v-show="flowVisible">
|
|
|
+ <div v-if="flowVisible">
|
|
|
<el-steps :active="flowVisible?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>
|
|
@@ -21,7 +21,7 @@
|
|
|
</el-collapse-item>
|
|
|
</el-collapse>
|
|
|
</div>
|
|
|
- <div v-show="flowVisible">
|
|
|
+ <div v-if="isFlow">
|
|
|
<approve-component ref="approve" @approveFinished="approveFinished"/>
|
|
|
</div>
|
|
|
<e-desc title="基本信息" column="3">
|
|
@@ -60,25 +60,25 @@
|
|
|
<a :key="item.fileName + index" type="primary" href="#" @click="previewFile(item.fileName, item.url)">{{ item.fileName }}</a>
|
|
|
</div>
|
|
|
</e-desc-item>
|
|
|
- <e-desc-item v-show="dataForm.attachListB" label="合格供方基本信息调查表" span="3">
|
|
|
+ <e-desc-item v-show="dataForm.attachListB" label="供方风险评价表" span="3">
|
|
|
<div v-for="(item, index) in dataForm.attachListB" style="display: inline">
|
|
|
<span v-if="index > 0">,</span>
|
|
|
<a :key="item.fileName + index" type="primary" href="#" @click="previewFile(item.fileName, item.url)">{{ item.fileName }}</a>
|
|
|
</div>
|
|
|
</e-desc-item>
|
|
|
- <e-desc-item v-show="dataForm.attachListC" label="合格供方基本信息调查表" span="3">
|
|
|
+ <e-desc-item v-show="dataForm.attachListC" label="合格供方(含外包)评审(复审)表" span="3">
|
|
|
<div v-for="(item, index) in dataForm.attachListC" style="display: inline">
|
|
|
<span v-if="index > 0">,</span>
|
|
|
<a :key="item.fileName + index" type="primary" href="#" @click="previewFile(item.fileName, item.url)">{{ item.fileName }}</a>
|
|
|
</div>
|
|
|
</e-desc-item>
|
|
|
- <e-desc-item v-show="dataForm.attachListD" label="合格供方基本信息调查表" span="3">
|
|
|
+ <e-desc-item v-show="dataForm.attachListD" label="合格供方改善通知单" span="3">
|
|
|
<div v-for="(item, index) in dataForm.attachListD" style="display: inline">
|
|
|
<span v-if="index > 0">,</span>
|
|
|
<a :key="item.fileName + index" type="primary" href="#" @click="previewFile(item.fileName, item.url)">{{ item.fileName }}</a>
|
|
|
</div>
|
|
|
</e-desc-item>
|
|
|
- <e-desc-item v-show="dataForm.attachListE" label="合格供方基本信息调查表" span="3">
|
|
|
+ <e-desc-item v-show="dataForm.attachListE" label="合格供方(含外包方)资格取消申请单" span="3">
|
|
|
<div v-for="(item, index) in dataForm.attachListE" style="display: inline">
|
|
|
<span v-if="index > 0">,</span>
|
|
|
<a :key="item.fileName + index" type="primary" href="#" @click="previewFile(item.fileName, item.url)">{{ item.fileName }}</a>
|
|
@@ -100,6 +100,7 @@
|
|
|
import PreviewComponent from '../common/preview-component'
|
|
|
import ApproveComponent from '../common/approve-component'
|
|
|
import { getSupplierDetail } from '../../../api/sale'
|
|
|
+ import { dealStepData, dealStepLogs } from '@/api/util'
|
|
|
export default {
|
|
|
name: 'supplier-detail',
|
|
|
components: {
|
|
@@ -115,6 +116,7 @@ export default {
|
|
|
previewVisible: false,
|
|
|
// 流程图
|
|
|
flowVisible: false,
|
|
|
+ isFlow: false,
|
|
|
stepList: [],
|
|
|
logList: []
|
|
|
}
|
|
@@ -123,16 +125,24 @@ export default {
|
|
|
onChose () {
|
|
|
this.$emit('onChose')
|
|
|
},
|
|
|
- async init (id) {
|
|
|
+ async init (id, businessType) {
|
|
|
this.id = id || 0
|
|
|
+ this.isFlow = !!(businessType && businessType !== '')
|
|
|
this.dataForm = {}
|
|
|
this.getDetails()
|
|
|
},
|
|
|
- getDetails () {
|
|
|
+ getDetails (businessType) {
|
|
|
getSupplierDetail(this.id).then(({data}) => {
|
|
|
if (data && data.code === '200' && data.data) {
|
|
|
this.dataForm = data.data
|
|
|
- // todo 工作流
|
|
|
+ // 流程图展示
|
|
|
+ if (data.data.workFlowBusinessExt) {
|
|
|
+ this.flowVisible = true
|
|
|
+ dealStepData(data.data.workFlowBusinessExt.workFlowProcessStepList, this.stepList)
|
|
|
+ dealStepLogs(data.data.workFlowBusinessExt.processLogList, this.logList)
|
|
|
+ }
|
|
|
+ // 初始化审批Form
|
|
|
+ this.showApproveForm(businessType, this.id)
|
|
|
} else {
|
|
|
this.onChose()
|
|
|
}
|
|
@@ -145,6 +155,14 @@ export default {
|
|
|
this.$refs.preview.init(fileName, url)
|
|
|
})
|
|
|
},
|
|
|
+ // 初始化审批Form
|
|
|
+ showApproveForm (businessType, businessId) {
|
|
|
+ if (this.isFlow) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.approve.init(businessType, businessId)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
// 审批完成
|
|
|
approveFinished () {
|
|
|
this.onChose()
|