feat(mes): 设备状态枚举同步调整,表单增加点检保养时间选择器
1. constants.ts MesDvMachineryStatusEnum 改为 STOP/PRODUCING/MAINTENANCE 2. MachineryForm 默认状态改为 STOP,新增 lastCheckTime、lastMaintenTime 两个 el-date-picker 字段pull/871/MERGE
parent
d313450069
commit
2d79633b07
|
|
@ -262,5 +262,7 @@ export enum DICT_TYPE {
|
|||
MES_CAL_PLAN_STATUS = 'mes_cal_plan_status', // MES 排班计划状态
|
||||
MES_TM_TOOL_STATUS = 'mes_tm_tool_status', // MES 工具状态
|
||||
MES_TM_MAINTEN_TYPE = 'mes_tm_mainten_type', // MES 保养维护类型
|
||||
MES_DV_MACHINERY_STATUS = 'mes_dv_machinery_status' // MES 设备状态
|
||||
MES_DV_MACHINERY_STATUS = 'mes_dv_machinery_status', // MES 设备状态
|
||||
MES_INDEX_TYPE = 'mes_index_type', // MES 检测项类型
|
||||
MES_DEFECT_LEVEL = 'mes_defect_level' // MES 缺陷等级
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@
|
|||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.status === 0"
|
||||
v-if="scope.row.status === MesCalPlanStatusEnum.PREPARE"
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
|
|
@ -150,6 +150,7 @@ import download from '@/utils/download'
|
|||
import { CalPlanApi, CalPlanVO } from '@/api/mes/cal/plan'
|
||||
import CalPlanForm from './CalPlanForm.vue'
|
||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||
import { MesCalPlanStatusEnum } from '@/views/mes/utils/constants'
|
||||
|
||||
defineOptions({ name: 'MesCalPlan' })
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
<!-- MES 设备台账表单 -->
|
||||
<template>
|
||||
<Dialog :title="dialogTitle" v-model="dialogVisible" width="960px">
|
||||
<!-- TODO @AI:最近点检时间 -->
|
||||
<!-- TODO @AI:最近保养时间 -->
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
|
|
@ -78,6 +76,28 @@
|
|||
<el-input v-model="formData.spec" placeholder="请输入规格型号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最近点检时间" prop="lastCheckTime">
|
||||
<el-date-picker
|
||||
v-model="formData.lastCheckTime"
|
||||
type="datetime"
|
||||
placeholder="请选择最近点检时间"
|
||||
value-format="x"
|
||||
class="!w-1/1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="最近保养时间" prop="lastMaintenTime">
|
||||
<el-date-picker
|
||||
v-model="formData.lastMaintenTime"
|
||||
type="datetime"
|
||||
placeholder="请选择最近保养时间"
|
||||
value-format="x"
|
||||
class="!w-1/1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
|
|
@ -87,6 +107,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<!-- TODO @芋艿:barcodeimg -->
|
||||
<!-- 编辑时显示子资源 Tab -->
|
||||
<el-tabs v-if="formType === 'update'" v-model="activeTab" class="mt-10px">
|
||||
<el-tab-pane label="点检记录" name="check">
|
||||
|
|
@ -135,7 +156,9 @@ const formData = ref({
|
|||
spec: undefined,
|
||||
machineryTypeId: undefined,
|
||||
workshopId: undefined,
|
||||
status: MesDvMachineryStatusEnum.RUNNING,
|
||||
status: MesDvMachineryStatusEnum.STOP,
|
||||
lastCheckTime: undefined,
|
||||
lastMaintenTime: undefined,
|
||||
remark: undefined
|
||||
})
|
||||
const formRules = reactive({
|
||||
|
|
@ -211,7 +234,9 @@ const resetForm = () => {
|
|||
spec: undefined,
|
||||
machineryTypeId: undefined,
|
||||
workshopId: undefined,
|
||||
status: MesDvMachineryStatusEnum.RUNNING,
|
||||
status: MesDvMachineryStatusEnum.STOP,
|
||||
lastCheckTime: undefined,
|
||||
lastMaintenTime: undefined,
|
||||
remark: undefined
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@
|
|||
width="180px"
|
||||
/>
|
||||
<el-table-column label="操作" align="center" width="130">
|
||||
<!-- TODO @芋艿:标签打印 -->
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ export const MesItemOrProductEnum = {
|
|||
|
||||
/** MES 设备状态枚举 */
|
||||
export const MesDvMachineryStatusEnum = {
|
||||
RUNNING: 1, // 运行中
|
||||
STOP: 2, // 停机
|
||||
FAULT: 3 // 故障
|
||||
STOP: 1, // 停机
|
||||
PRODUCING: 2, // 生产中
|
||||
MAINTENANCE: 3 // 维护中
|
||||
}
|
||||
|
||||
/** MES 假期类型枚举 */
|
||||
|
|
@ -37,6 +37,27 @@ export const HolidayType = {
|
|||
HOLIDAY: 2 // 节假日
|
||||
} as const
|
||||
|
||||
/** MES 排班计划状态枚举 */
|
||||
export const MesCalPlanStatusEnum = {
|
||||
PREPARE: 0, // 草稿
|
||||
CONFIRMED: 1 // 已确认
|
||||
}
|
||||
|
||||
/** MES 轮班方式枚举 */
|
||||
export const MesCalShiftTypeEnum = {
|
||||
SINGLE: 1, // 单白班
|
||||
TWO: 2, // 两班倒
|
||||
THREE: 3 // 三班倒
|
||||
}
|
||||
|
||||
/** MES 倒班方式枚举 */
|
||||
export const MesCalShiftMethodEnum = {
|
||||
QUARTER: 1, // 按季度
|
||||
MONTH: 2, // 按月
|
||||
WEEK: 3, // 按周
|
||||
DAY: 4 // 按天
|
||||
}
|
||||
|
||||
/** 获取物料/产品标识的标签 */
|
||||
export const getItemOrProductLabel = (value: string): string => {
|
||||
for (const item of Object.values(MesItemOrProductEnum)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue