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 };