From 9ad08ae5dbcf06d026623444a9c24a342fd05249 Mon Sep 17 00:00:00 2001 From: chenxt <10125295+chen-xintao97@user.noreply.gitee.com> Date: Thu, 15 Jan 2026 14:30:53 +0800 Subject: [PATCH] 完工根据iStar为1才能点击 --- src/mes/scheduledTasks/machineTasks/index.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/mes/scheduledTasks/machineTasks/index.js b/src/mes/scheduledTasks/machineTasks/index.js index f13fade..4ba8b47 100644 --- a/src/mes/scheduledTasks/machineTasks/index.js +++ b/src/mes/scheduledTasks/machineTasks/index.js @@ -549,7 +549,7 @@ const MachineTasks = baseProps => { tableBtnsConfig: params => { const { record, index } = params; const { iStar, bManual } = record; - let showName, btnBgColor, sDefault; + let showName, btnBgColor, sDefault, finishBtnBgColor, finishSdefault; if (iStar === 1) { showName = "暂停"; btnBgColor = "#FAAD14"; @@ -561,14 +561,21 @@ const MachineTasks = baseProps => { btnBgColor = "#AAA"; sDefault = "${false}"; } + if (iStar !== 1) { + finishBtnBgColor = "#AAA" + finishSdefault = "${false}"; + } else { + finishBtnBgColor = "#1890FF" + finishSdefault = "${true}"; + } if (!bStartWork) { sDefault = "${false}"; } - const outPut = bManual ? [actProduceReportConfig,{ showName, btnBgColor, sDefault, startWorkConfig, pauseWorkConfig }, - { showName: "完工", btnBgColor: "#1890FF", sDefault }] : [{ showName, btnBgColor, sDefault, startWorkConfig, pauseWorkConfig }, - { showName: "完工", btnBgColor: "#1890FF", sDefault }] + const outPut = bManual ? [actProduceReportConfig, { showName, btnBgColor, sDefault, startWorkConfig, pauseWorkConfig }, + { showName: "完工", btnBgColor: finishBtnBgColor, sDefault: finishSdefault }] : [{ showName, btnBgColor, sDefault, startWorkConfig, pauseWorkConfig }, + { showName: "完工", btnBgColor: finishBtnBgColor, sDefault: finishSdefault }] return [ ...outPut, ...tableBtnsConfig, @@ -578,7 +585,7 @@ const MachineTasks = baseProps => { onTableBtnClick: item => { props.onTableBtnClick(item); }, - tableBtnsWidth: "200px", + tableBtnsWidth: "200px", fixedHeight: "335px", onCopyTo: handleCopyTo }; -- libgit2 0.22.2