diff --git a/src/api/mes/pro/workrecord/index.ts b/src/api/mes/pro/workrecord/index.ts index 4f89bfc7f..3901cdc4a 100644 --- a/src/api/mes/pro/workrecord/index.ts +++ b/src/api/mes/pro/workrecord/index.ts @@ -13,6 +13,18 @@ export interface ProWorkRecordLogVO { createTime: Date } +// MES 当前工作站绑定状态 VO +export interface ProWorkRecordVO { + userId: number + userNickname: string + workstationId: number + workstationCode: string + workstationName: string + type: number // 1=上工 2=下工 + clockInTime: Date + clockOutTime: Date +} + // MES 工作记录 API export const ProWorkRecordApi = { // 查询工作记录分页 diff --git a/src/views/mes/pro/workrecord/WorkRecordStatusBar.vue b/src/views/mes/pro/workrecord/WorkRecordStatusBar.vue new file mode 100644 index 000000000..526267724 --- /dev/null +++ b/src/views/mes/pro/workrecord/WorkRecordStatusBar.vue @@ -0,0 +1,116 @@ + + + + + 我的工作站 + + + + + {{ myWorkstation!.workstationCode }} - {{ myWorkstation!.workstationName }} + + + 上工时间:{{ formatDate(myWorkstation!.clockInTime) }} + + + + 当前未上工 + + + + + + + 上工 + + + + 选择工作站 + + + 取消 + + 确认上工 + + + + + + 下工 + + + + + + diff --git a/src/views/mes/pro/workrecord/index.vue b/src/views/mes/pro/workrecord/index.vue index 69f8e4fcb..48ab83bae 100644 --- a/src/views/mes/pro/workrecord/index.vue +++ b/src/views/mes/pro/workrecord/index.vue @@ -1,68 +1,7 @@ - - - - - 我的工作站 - - - - - - - 已上工:{{ myWorkstation.workstationCode }} - {{ myWorkstation.workstationName }} - - - 上工时间:{{ formatDate(myWorkstation.createTime) }} - - - - - - 当前未绑定工作站 - - - - - - - 上工 - - - - 选择工作站 - - - 取消 - - 确认上工 - - - - - - 下工 - - - - + - - - + + + - + - diff --git a/src/views/mes/utils/constants.ts b/src/views/mes/utils/constants.ts index b98f46724..4a46b4e4c 100644 --- a/src/views/mes/utils/constants.ts +++ b/src/views/mes/utils/constants.ts @@ -222,6 +222,12 @@ export const MesProAndonLevelEnum = { LEVEL3: 3 // 三级 } +/** MES 上下工操作类型枚举 */ +export const MesProWorkRecordTypeEnum = { + CLOCK_IN: 1, // 上工 + CLOCK_OUT: 2 // 下工 +} + /** MES 生产报工类型枚举 */ export const MesProFeedbackTypeEnum = { SELF: 1, // 自行报工
选择工作站