From fa12d8a90626cce2d60d361fcefd797f7d31d9b8 Mon Sep 17 00:00:00 2001 From: chenxt <10125295+chen-xintao97@user.noreply.gitee.com> Date: Mon, 12 Jan 2026 14:04:33 +0800 Subject: [PATCH] 调机开始状态 --- src/mes/common/commonOperationBarComponent/index.js | 10 ++++++++-- src/mes/productionExec/productionExecMain/index.js | 13 +++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/mes/common/commonOperationBarComponent/index.js b/src/mes/common/commonOperationBarComponent/index.js index 2cbf507..b9dd725 100644 --- a/src/mes/common/commonOperationBarComponent/index.js +++ b/src/mes/common/commonOperationBarComponent/index.js @@ -739,7 +739,7 @@ const useCommonOperationBarComponentEvent = props => { } else if (props.bMesBill) { const btnName = sControlName.replace('BtnLeft.', '').replace('BtnRight.', '').toLowerCase(); - let enabled = props.enabled + let enabled = props.enabled if (props.enabled === undefined && !props?.parentProps?.record) { enabled = true } @@ -840,7 +840,13 @@ const useCommonOperationBarComponentEvent = props => { style.color = "#000"; defaultProps.style = style; } - + if (config.btnBgColor) { + const { style = {} } = defaultProps; + style.backgroundColor = config.btnBgColor; + style.borderColor = config.btnBgColor; + style.color = "#fff"; + defaultProps.style = style; + } return defaultProps; }; diff --git a/src/mes/productionExec/productionExecMain/index.js b/src/mes/productionExec/productionExecMain/index.js index cb0f297..eded197 100644 --- a/src/mes/productionExec/productionExecMain/index.js +++ b/src/mes/productionExec/productionExecMain/index.js @@ -560,15 +560,20 @@ const ProductionExecContentByType = props => { ) return; const { globalData } = props?.app - const {currentWorkOrderInfo} = globalData || {} + const { currentWorkOrderInfo } = globalData || {} const { dAdjustOrRun } = currentWorkOrderInfo || {} - const sStatusNameValue = dAdjustOrRun === 0 + // const sStatusNameValue = dAdjustOrRun === 0 + // ? 0 + // : 1; + const sStatusNameValue = deviceTargetInfoData[0]?.sStatus?.includes( + "adjustment" + ) ? 0 : 1; const showValue = { stop: { - showName: "调机 / 生产", + showName: "调机开始", onClick: config => operationFetch(props, config, undefined, () => { props.onSaveState({ @@ -578,7 +583,7 @@ const ProductionExecContentByType = props => { }) }, again: { - showName: "调机 / 生产", + showName: "调机结束", onClick: config => operationFetch(props, config, "again", () => { props.onSaveState({ -- libgit2 0.22.2