Commit 9ad08ae5dbcf06d026623444a9c24a342fd05249

Authored by chenxt
1 parent 7c0d46da

完工根据iStar为1才能点击

src/mes/scheduledTasks/machineTasks/index.js
@@ -549,7 +549,7 @@ const MachineTasks = baseProps => { @@ -549,7 +549,7 @@ const MachineTasks = baseProps => {
549 tableBtnsConfig: params => { 549 tableBtnsConfig: params => {
550 const { record, index } = params; 550 const { record, index } = params;
551 const { iStar, bManual } = record; 551 const { iStar, bManual } = record;
552 - let showName, btnBgColor, sDefault; 552 + let showName, btnBgColor, sDefault, finishBtnBgColor, finishSdefault;
553 if (iStar === 1) { 553 if (iStar === 1) {
554 showName = "暂停"; 554 showName = "暂停";
555 btnBgColor = "#FAAD14"; 555 btnBgColor = "#FAAD14";
@@ -561,14 +561,21 @@ const MachineTasks = baseProps => { @@ -561,14 +561,21 @@ const MachineTasks = baseProps => {
561 btnBgColor = "#AAA"; 561 btnBgColor = "#AAA";
562 sDefault = "${false}"; 562 sDefault = "${false}";
563 } 563 }
  564 + if (iStar !== 1) {
  565 + finishBtnBgColor = "#AAA"
  566 + finishSdefault = "${false}";
  567 + } else {
  568 + finishBtnBgColor = "#1890FF"
  569 + finishSdefault = "${true}";
  570 + }
564 571
565 if (!bStartWork) { 572 if (!bStartWork) {
566 sDefault = "${false}"; 573 sDefault = "${false}";
567 } 574 }
568 575
569 - const outPut = bManual ? [actProduceReportConfig,{ showName, btnBgColor, sDefault, startWorkConfig, pauseWorkConfig },  
570 - { showName: "完工", btnBgColor: "#1890FF", sDefault }] : [{ showName, btnBgColor, sDefault, startWorkConfig, pauseWorkConfig },  
571 - { showName: "完工", btnBgColor: "#1890FF", sDefault }] 576 + const outPut = bManual ? [actProduceReportConfig, { showName, btnBgColor, sDefault, startWorkConfig, pauseWorkConfig },
  577 + { showName: "完工", btnBgColor: finishBtnBgColor, sDefault: finishSdefault }] : [{ showName, btnBgColor, sDefault, startWorkConfig, pauseWorkConfig },
  578 + { showName: "完工", btnBgColor: finishBtnBgColor, sDefault: finishSdefault }]
572 return [ 579 return [
573 ...outPut, 580 ...outPut,
574 ...tableBtnsConfig, 581 ...tableBtnsConfig,
@@ -578,7 +585,7 @@ const MachineTasks = baseProps => { @@ -578,7 +585,7 @@ const MachineTasks = baseProps => {
578 onTableBtnClick: item => { 585 onTableBtnClick: item => {
579 props.onTableBtnClick(item); 586 props.onTableBtnClick(item);
580 }, 587 },
581 - tableBtnsWidth: "200px", 588 + tableBtnsWidth: "200px",
582 fixedHeight: "335px", 589 fixedHeight: "335px",
583 onCopyTo: handleCopyTo 590 onCopyTo: handleCopyTo
584 }; 591 };