|
@@ -0,0 +1,186 @@
|
|
|
+<template>
|
|
|
+ <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.invoicesCode }}</e-desc-item>
|
|
|
+ <e-desc-item label="任务单编码">{{ dataForm.orderCode }}</e-desc-item>
|
|
|
+ <e-desc-item label="批次号">{{ dataForm.batchNumber }}</e-desc-item>
|
|
|
+
|
|
|
+ <e-desc-item label="物料名称">{{ dataForm.productName }}</e-desc-item>
|
|
|
+ <e-desc-item label="生产编号">{{ dataForm.productNumber }}</e-desc-item>
|
|
|
+ <e-desc-item label="工艺名称">{{ dataForm.techName }}</e-desc-item>
|
|
|
+
|
|
|
+ <e-desc-item label="检验工序节点">{{ dataForm.nodeName }}</e-desc-item>
|
|
|
+ <e-desc-item label="发生工序节点">{{ dataForm.disqualificationNodeName }}</e-desc-item>
|
|
|
+ <e-desc-item label="交检数量">{{ dataForm.cnt }}</e-desc-item>
|
|
|
+
|
|
|
+ <e-desc-item label="不合格数量">{{ dataForm.disqualificationCnt }}</e-desc-item>
|
|
|
+ <e-desc-item label="处理状态">{{ formatMeasureState(dataForm) }}</e-desc-item>
|
|
|
+ <e-desc-item label="当前审理人">{{ dataForm.approver }}</e-desc-item>
|
|
|
+
|
|
|
+ <e-desc-item label="责任人">{{ dataForm.responsibleName }}</e-desc-item>
|
|
|
+ <e-desc-item label="处理分析">{{ dataForm.disposeAnalyse }}</e-desc-item>
|
|
|
+ <e-desc-item label="处理分析人">{{ dataForm.analyseName }}</e-desc-item>
|
|
|
+
|
|
|
+ <e-desc-item label="处置措施">{{ dataForm.disposeMeasure }}</e-desc-item>
|
|
|
+ <e-desc-item label="处置措施人">{{ dataForm.measureName }}</e-desc-item>
|
|
|
+ <e-desc-item label="验证结论">{{ dataForm.verifyConclusion }}</e-desc-item>
|
|
|
+
|
|
|
+ <e-desc-item label="验证人">{{ dataForm.verifyName }}</e-desc-item>
|
|
|
+ <e-desc-item label="检验员">{{ dataForm.creatorName }}</e-desc-item>
|
|
|
+ <e-desc-item label="检验时间">{{ dataForm.createTime }}</e-desc-item>
|
|
|
+
|
|
|
+ <e-desc-item label="审理评审状态">{{ formatApproveState(dataForm) }}</e-desc-item>
|
|
|
+ <e-desc-item label="返工数量">{{ dataForm.reworkCnt }}</e-desc-item>
|
|
|
+ <e-desc-item label="返修数量">{{ dataForm.repairCnt }}</e-desc-item>
|
|
|
+
|
|
|
+ <e-desc-item label="不合格/报损数量">{{ dataForm.damageCnt }}</e-desc-item>
|
|
|
+ <e-desc-item label="让步接收数量">{{ dataForm.concessionCnt }}</e-desc-item>
|
|
|
+
|
|
|
+ </e-desc>
|
|
|
+ <e-desc label="顾客放行表">
|
|
|
+ <upload-component :display="true" :accept="'*'" v-model="dataForm.releaseList" />
|
|
|
+ </e-desc>
|
|
|
+ <e-desc label="附件">
|
|
|
+ <upload-component :display="true" :accept="'*'" v-model="dataForm.attachList" />
|
|
|
+ </e-desc>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="onChose">返回</el-button>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { getDisDetail } from '@/api/quality'
|
|
|
+import { dealStepData, dealStepLogs } from '@/api/util'
|
|
|
+import EDesc from '../common/e-desc'
|
|
|
+import EDescItem from '../common/e-desc-item'
|
|
|
+import ApproveComponent from '../common/approve-component'
|
|
|
+import UploadComponent from '../common/upload-component-v2'
|
|
|
+import {approveStateOption, measureStateOption} from '@/utils/enums'
|
|
|
+export default {
|
|
|
+ name: 'disqualification-detail',
|
|
|
+ components: { EDesc, EDescItem, ApproveComponent, UploadComponent },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ visible: false,
|
|
|
+ isFlow: false,
|
|
|
+ id: 0,
|
|
|
+ approveStateOption: approveStateOption,
|
|
|
+ measureStateOption: measureStateOption,
|
|
|
+ dataForm: {},
|
|
|
+ stepList: [],
|
|
|
+ logList: []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted () {},
|
|
|
+ methods: {
|
|
|
+ onChose () {
|
|
|
+ this.$emit('onChose')
|
|
|
+ },
|
|
|
+ async init (id, businessType) {
|
|
|
+ this.visible = true
|
|
|
+ this.isFlow = !!(businessType && businessType !== '')
|
|
|
+ this.id = id || 0
|
|
|
+ this.dataForm = {
|
|
|
+ workFlowBusinessExt: null
|
|
|
+ }
|
|
|
+ this.stepList = []
|
|
|
+ this.logList = []
|
|
|
+ this.getDetails(businessType)
|
|
|
+ },
|
|
|
+ getDetails (businessType) {
|
|
|
+ getDisDetail(this.id).then(({ data }) => {
|
|
|
+ if (data && data.code === '200' && data.data) {
|
|
|
+ this.dataForm = data.data
|
|
|
+ // 流程图展示
|
|
|
+ dealStepData(
|
|
|
+ data.data.workFlowBusinessExt.workFlowProcessStepList,
|
|
|
+ this.stepList
|
|
|
+ )
|
|
|
+ dealStepLogs(
|
|
|
+ data.data.workFlowBusinessExt.processLogList,
|
|
|
+ this.logList
|
|
|
+ )
|
|
|
+
|
|
|
+ // 初始化审批Form
|
|
|
+ this.showApproveForm(businessType, this.id)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 状态
|
|
|
+ formatMeasureState (row) {
|
|
|
+ if (!row.measureState) return ''
|
|
|
+ let option = this.measureStateOption.find(t => t.value === row.measureState)
|
|
|
+ if (option != null) {
|
|
|
+ return option.label
|
|
|
+ }
|
|
|
+ return ''
|
|
|
+ },
|
|
|
+ // 状态
|
|
|
+ formatApproveState (row) {
|
|
|
+ if (!row.approveState) return ''
|
|
|
+ let option = this.approveStateOption.find(t => t.value === row.approveState)
|
|
|
+ if (option != null) {
|
|
|
+ return option.label
|
|
|
+ }
|
|
|
+ return ''
|
|
|
+ },
|
|
|
+ // 初始化审批Form
|
|
|
+ showApproveForm (businessType, businessId) {
|
|
|
+ if (this.isFlow) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.approve.init(businessType, businessId)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 审批完成
|
|
|
+ approveFinished () {
|
|
|
+ this.onChose()
|
|
|
+ this.$emit('approveFinished')
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+</style>
|