style:生产报表-质检信息字段调整

pull/1/head
黄伟杰 4 weeks ago
parent 006c03b747
commit 0de4716c80

@ -36,37 +36,38 @@
</template>
</el-table-column>
<el-table-column label="质检编码" align="center" prop="code" min-width="140px" />
<el-table-column label="质检名称" align="center" prop="name" min-width="120px" />
<el-table-column label="质检分类" align="center" prop="type" min-width="100px" />
<el-table-column label="检验方案" align="center" prop="schemaName" min-width="140px" />
<el-table-column label="工序" align="center" prop="orgType" min-width="80px" />
<el-table-column label="负责人" align="center" prop="managerName" min-width="100px" />
<el-table-column label="执行人" align="center" prop="executorName" min-width="100px" />
<el-table-column label="质检分类" align="center" prop="type" min-width="100px">
<template #default="scope">
<DictTag type="mes_zj_task_type" :value="scope.row.type" />
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status" min-width="80px">
<template #default="scope">
<el-tag :type="getStatusType(scope.row.status)">
{{ getStatusLabel(scope.row.status) }}
</el-tag>
<DictTag :type="'job_status'" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="结果" align="center" prop="resultName" min-width="100px">
<el-table-column label="工单编码" align="center" prop="ticketCode" min-width="200px" />
<el-table-column label="工序" align="center" prop="orgType" min-width="80px">
<template #default="scope">
<el-tag :type="scope.row.result === '通过' ? 'success' : 'danger'">
{{ scope.row.resultName || '-' }}
</el-tag>
<DictTag :type="DICT_TYPE.MES_ORG_TYPE" :value="scope.row.orgType" />
</template>
</el-table-column>
<el-table-column label="检验方案" align="center" prop="schemaName" min-width="140px" />
<el-table-column label="负责人" align="center" prop="managerName" min-width="100px" />
<el-table-column label="执行人" align="center" prop="executorName" min-width="100px" />
<el-table-column label="执行时间" align="center" prop="executeTime" min-width="180px">
<template #default="scope">
{{ formatDateTime(scope.row.executeTime) }}
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" min-width="180px">
<el-table-column label="备注" align="center" prop="remark" min-width="150px" />
<el-table-column label="结果" align="center" prop="result" min-width="100px">
<template #default="scope">
{{ formatDateTime(scope.row.createTime) }}
<el-tag v-if="scope.row.result === '1' || scope.row.result === 1" type="success"></el-tag>
<el-tag v-else-if="scope.row.result === '2' || scope.row.result === 2" type="danger">不通过</el-tag>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" min-width="150px" />
</el-table>
<!-- 分页 -->
<Pagination
@ -81,6 +82,8 @@
<script setup lang="ts">
import dayjs from 'dayjs'
import { ZjTaskApi } from '@/api/mes/zjtask'
import { DictTag } from '@/components/DictTag'
import { DICT_TYPE } from '@/utils/dict'
defineOptions({ name: 'ProductionReportQualityInfo' })
@ -198,28 +201,6 @@ const getResultLabel = (result: number): string => {
return labelMap[result] || '未知'
}
/** 获取状态标签 */
const getStatusLabel = (status: number): string => {
const labelMap: Record<number, string> = {
0: '未开始',
1: '进行中',
2: '已完成',
3: '已取消'
}
return labelMap[status] || '未知'
}
/** 获取状态类型 */
const getStatusType = (status: number): string => {
const typeMap: Record<number, string> = {
0: 'info',
1: 'warning',
2: 'success',
3: 'danger'
}
return typeMap[status] || 'info'
}
/** 格式化日期时间 */
const formatDateTime = (value: string | Date | null) => {
if (!value) return '-'

Loading…
Cancel
Save