|
@@ -5,6 +5,25 @@
|
|
|
width="70%"
|
|
|
:close-on-click-modal="false"
|
|
|
:visible.sync="visible">
|
|
|
+ <!-- 工作流 -->
|
|
|
+ <div v-show="display && dataForm.workFlowBusinessExt">
|
|
|
+ <el-steps :active="dataForm.workFlowBusinessExt?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>
|
|
|
+ <!-- 表单 -->
|
|
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="auto">
|
|
|
<el-row class="my-row">
|
|
|
<el-col :span="8">
|
|
@@ -179,6 +198,7 @@
|
|
|
import { getDictList } from '@/api/dict'
|
|
|
import { getPurchaseDetail } from '@/api/sale'
|
|
|
import { getUserList } from '@/api/user'
|
|
|
+ import { dealStepData, dealStepLogs } from '@/api/util'
|
|
|
export default {
|
|
|
name: 'purchase-add-or-update',
|
|
|
components: {
|
|
@@ -199,7 +219,9 @@
|
|
|
dataRule: {
|
|
|
purchaseType: [{ required: true, message: '请选择采购类别', trigger: 'change' }],
|
|
|
applierId: [{ required: true, message: '请选择申请人', trigger: 'change' }]
|
|
|
- }
|
|
|
+ },
|
|
|
+ stepList: [],
|
|
|
+ logList: []
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -227,7 +249,11 @@
|
|
|
await getPurchaseDetail(this.id).then(({data}) => {
|
|
|
if (data && data.code === '200') {
|
|
|
this.dataForm = data.data
|
|
|
- // todo 工作流赋值
|
|
|
+ // 流程图展示
|
|
|
+ if (data.data.workFlowBusinessExt) {
|
|
|
+ dealStepData(data.data.workFlowBusinessExt.workFlowProcessStepList, this.stepList)
|
|
|
+ dealStepLogs(data.data.workFlowBusinessExt.processLogList, this.logList)
|
|
|
+ }
|
|
|
// 获取采购物品明细
|
|
|
if (data.data.details) {
|
|
|
this.materialDetails = []
|