|
@@ -2,6 +2,43 @@
|
|
|
<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.projectName }}</e-desc-item>
|
|
@@ -283,6 +320,8 @@ import EDesc from '../common/e-desc'
|
|
|
import EDescItem from '../common/e-desc-item'
|
|
|
import UploadComponent from '../common/upload-component-v2'
|
|
|
import AttachDetailDialog from '../common/attach-detail-dialog'
|
|
|
+import ApproveComponent from '../common/approve-component'
|
|
|
+import { dealStepData, dealStepLogs } from '@/api/util'
|
|
|
import { getDetail } from '@/api/quoted'
|
|
|
import { getCoCode } from '@/api/cus'
|
|
|
import { getProductList, getProductAllDetail } from '@/api/product'
|
|
@@ -292,11 +331,12 @@ import {
|
|
|
rankTypeOption
|
|
|
} from '@/utils/enums'
|
|
|
export default {
|
|
|
- name: '',
|
|
|
- components: { EDesc, EDescItem, UploadComponent, AttachDetailDialog },
|
|
|
+ name: 'cus-quoted-detail',
|
|
|
+ components: { EDesc, EDescItem, UploadComponent, AttachDetailDialog, ApproveComponent },
|
|
|
props: {},
|
|
|
data () {
|
|
|
return {
|
|
|
+ isFlow: false,
|
|
|
id: 0,
|
|
|
productTypeOption: productTypeOption,
|
|
|
taskTypeOption: taskTypeOption,
|
|
@@ -311,7 +351,9 @@ export default {
|
|
|
quotedPriceProductList: [], // 报价物料清单
|
|
|
workInfoList: []
|
|
|
},
|
|
|
- productList: []
|
|
|
+ productList: [],
|
|
|
+ stepList: [],
|
|
|
+ logList: []
|
|
|
}
|
|
|
},
|
|
|
watch: {},
|
|
@@ -323,11 +365,17 @@ export default {
|
|
|
onChose () {
|
|
|
this.$emit('onChose')
|
|
|
},
|
|
|
- async init (id) {
|
|
|
+ async init (id, businessType) {
|
|
|
this.id = id || 0
|
|
|
+ this.isFlow = !!(businessType && businessType !== '')
|
|
|
+ this.dataForm = {
|
|
|
+ workFlowBusinessExt: null
|
|
|
+ }
|
|
|
+ this.stepList = []
|
|
|
+ this.logList = []
|
|
|
await this.getCoCode()
|
|
|
await this.getProductList()
|
|
|
- this.getDetail(id)
|
|
|
+ this.getDetail(id, businessType)
|
|
|
},
|
|
|
async getCoCode () {
|
|
|
await getCoCode().then(({ data }) => {
|
|
@@ -354,7 +402,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- getDetail (id) {
|
|
|
+ getDetail (id, businessType) {
|
|
|
getDetail(id).then(({ data }) => {
|
|
|
if (data && data.code === '200') {
|
|
|
this.dataForm = data.data
|
|
@@ -369,6 +417,19 @@ export default {
|
|
|
).label
|
|
|
|
|
|
this.productIdChangeHandle(this.dataForm.productId)
|
|
|
+
|
|
|
+ // 流程图展示
|
|
|
+ dealStepData(
|
|
|
+ data.data.workFlowBusinessExt.workFlowProcessStepList,
|
|
|
+ this.stepList
|
|
|
+ )
|
|
|
+ dealStepLogs(
|
|
|
+ data.data.workFlowBusinessExt.processLogList,
|
|
|
+ this.logList
|
|
|
+ )
|
|
|
+
|
|
|
+ // 初始化审批Form
|
|
|
+ this.showApproveForm(businessType, this.id)
|
|
|
}
|
|
|
})
|
|
|
},
|