Commit 9ad08ae5dbcf06d026623444a9c24a342fd05249

Authored by chenxt
1 parent 7c0d46da

完工根据iStar为1才能点击

src/mes/scheduledTasks/machineTasks/index.js
... ... @@ -549,7 +549,7 @@ const MachineTasks = baseProps => {
549 549 tableBtnsConfig: params => {
550 550 const { record, index } = params;
551 551 const { iStar, bManual } = record;
552   - let showName, btnBgColor, sDefault;
  552 + let showName, btnBgColor, sDefault, finishBtnBgColor, finishSdefault;
553 553 if (iStar === 1) {
554 554 showName = "暂停";
555 555 btnBgColor = "#FAAD14";
... ... @@ -561,14 +561,21 @@ const MachineTasks = baseProps => {
561 561 btnBgColor = "#AAA";
562 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 572 if (!bStartWork) {
566 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 579 return [
573 580 ...outPut,
574 581 ...tableBtnsConfig,
... ... @@ -578,7 +585,7 @@ const MachineTasks = baseProps => {
578 585 onTableBtnClick: item => {
579 586 props.onTableBtnClick(item);
580 587 },
581   - tableBtnsWidth: "200px",
  588 + tableBtnsWidth: "200px",
582 589 fixedHeight: "335px",
583 590 onCopyTo: handleCopyTo
584 591 };
... ...