feat(mes): qc 添加安灯处置状态和级别枚举,更新相关错误码和接口定义
parent
e20122bd3c
commit
5ddc53bce9
|
|
@ -1,6 +1,5 @@
|
||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
|
|
||||||
// TODO @AI:indicator/index.ts 迁移过去;
|
|
||||||
// MES 质检方案-检测指标项 VO
|
// MES 质检方案-检测指标项 VO
|
||||||
export interface QcTemplateIndicatorVO {
|
export interface QcTemplateIndicatorVO {
|
||||||
id: number // 编号
|
id: number // 编号
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
|
|
||||||
// TODO @AI:item/index.ts 迁移过去;
|
|
||||||
// MES 质检方案-产品关联 VO
|
// MES 质检方案-产品关联 VO
|
||||||
export interface QcTemplateItemVO {
|
export interface QcTemplateItemVO {
|
||||||
id: number // 编号
|
id: number // 编号
|
||||||
|
|
@ -285,4 +285,9 @@ export enum DICT_TYPE {
|
||||||
MES_DV_REPAIR_RESULT = 'mes_dv_repair_result', // MES 维修结果
|
MES_DV_REPAIR_RESULT = 'mes_dv_repair_result', // MES 维修结果
|
||||||
MES_DV_CHECK_RECORD_STATUS = 'mes_dv_check_record_status', // MES 点检记录状态
|
MES_DV_CHECK_RECORD_STATUS = 'mes_dv_check_record_status', // MES 点检记录状态
|
||||||
MES_DV_CHECK_RESULT = 'mes_dv_check_result', // MES 点检结果
|
MES_DV_CHECK_RESULT = 'mes_dv_check_result', // MES 点检结果
|
||||||
|
MES_PRO_FEEDBACK_STATUS = 'mes_pro_feedback_status', // MES 生产报工状态
|
||||||
|
MES_PRO_FEEDBACK_TYPE = 'mes_pro_feedback_type', // MES 生产报工类型
|
||||||
|
MES_PRO_FEEDBACK_CHANNEL = 'mes_pro_feedback_channel', // MES 生产报工途径
|
||||||
|
MES_PRO_ANDON_STATUS = 'mes_pro_andon_status', // MES 安灯处置状态
|
||||||
|
MES_PRO_ANDON_LEVEL = 'mes_pro_andon_level', // MES 安灯级别
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
<template>
|
<template>
|
||||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="900px">
|
<Dialog :title="dialogTitle" v-model="dialogVisible" width="900px">
|
||||||
<!-- 基本信息表单 -->
|
<!-- 基本信息表单 -->
|
||||||
<!-- TODO @AI:rules 有linter报错; -->
|
|
||||||
<el-form
|
<el-form
|
||||||
ref="formRef"
|
ref="formRef"
|
||||||
:model="formData"
|
:model="formData"
|
||||||
|
|
@ -90,6 +89,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import type { FormRules } from 'element-plus'
|
||||||
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||||
import { CommonStatusEnum } from '@/utils/constants'
|
import { CommonStatusEnum } from '@/utils/constants'
|
||||||
import { generateRandomStr } from '@/utils'
|
import { generateRandomStr } from '@/utils'
|
||||||
|
|
@ -115,7 +115,7 @@ const formData = ref({
|
||||||
status: CommonStatusEnum.ENABLE,
|
status: CommonStatusEnum.ENABLE,
|
||||||
remark: undefined
|
remark: undefined
|
||||||
})
|
})
|
||||||
const formRules = reactive({
|
const formRules = reactive<FormRules>({
|
||||||
code: [{ required: true, message: '方案编号不能为空', trigger: 'blur' }],
|
code: [{ required: true, message: '方案编号不能为空', trigger: 'blur' }],
|
||||||
name: [{ required: true, message: '方案名称不能为空', trigger: 'blur' }],
|
name: [{ required: true, message: '方案名称不能为空', trigger: 'blur' }],
|
||||||
types: [
|
types: [
|
||||||
|
|
@ -144,8 +144,7 @@ const open = async (type: string, id?: number) => {
|
||||||
const data = await QcTemplateApi.getTemplate(id)
|
const data = await QcTemplateApi.getTemplate(id)
|
||||||
formData.value = {
|
formData.value = {
|
||||||
...data,
|
...data,
|
||||||
// TODO @AI:应该不用 types?后端已经处理;
|
types: data.types
|
||||||
types: data.types ?? []
|
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
formLoading.value = false
|
formLoading.value = false
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,40 @@ export const MesDvCheckResultEnum = {
|
||||||
ABNORMAL: 2 // 异常
|
ABNORMAL: 2 // 异常
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** MES 来料检验单(IQC)状态枚举 */
|
||||||
|
export const MesQcIqcStatusEnum = {
|
||||||
|
PREPARE: 0, // 草稿
|
||||||
|
FINISHED: 1 // 已完成
|
||||||
|
}
|
||||||
|
|
||||||
|
/** MES 生产报工状态枚举 */
|
||||||
|
export const MesProFeedbackStatusEnum = {
|
||||||
|
PREPARE: 0, // 草稿
|
||||||
|
APPROVING: 1, // 审批中
|
||||||
|
UNCHECK: 2, // 待检验
|
||||||
|
FINISHED: 3, // 已完成
|
||||||
|
CANCELED: 4 // 已取消
|
||||||
|
}
|
||||||
|
|
||||||
|
/** MES 安灯处置状态枚举 */
|
||||||
|
export const MesProAndonStatusEnum = {
|
||||||
|
ACTIVE: 0, // 未处置
|
||||||
|
HANDLED: 1 // 已处置
|
||||||
|
}
|
||||||
|
|
||||||
|
/** MES 安灯级别枚举 */
|
||||||
|
export const MesProAndonLevelEnum = {
|
||||||
|
LEVEL1: 1, // 一级
|
||||||
|
LEVEL2: 2, // 二级
|
||||||
|
LEVEL3: 3 // 三级
|
||||||
|
}
|
||||||
|
|
||||||
|
/** MES 生产报工类型枚举 */
|
||||||
|
export const MesProFeedbackTypeEnum = {
|
||||||
|
SELF: 1, // 自行报工
|
||||||
|
UNIFIED: 2 // 统一报工
|
||||||
|
}
|
||||||
|
|
||||||
/** 获取物料/产品标识的标签 */
|
/** 获取物料/产品标识的标签 */
|
||||||
export const getItemOrProductLabel = (value: string): string => {
|
export const getItemOrProductLabel = (value: string): string => {
|
||||||
for (const item of Object.values(MesItemOrProductEnum)) {
|
for (const item of Object.values(MesItemOrProductEnum)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue