Commit fa12d8a90626cce2d60d361fcefd797f7d31d9b8

Authored by chenxt
1 parent 440782b8

调机开始状态

src/mes/common/commonOperationBarComponent/index.js
@@ -739,7 +739,7 @@ const useCommonOperationBarComponentEvent = props => { @@ -739,7 +739,7 @@ const useCommonOperationBarComponentEvent = props => {
739 } else if (props.bMesBill) { 739 } else if (props.bMesBill) {
740 740
741 const btnName = sControlName.replace('BtnLeft.', '').replace('BtnRight.', '').toLowerCase(); 741 const btnName = sControlName.replace('BtnLeft.', '').replace('BtnRight.', '').toLowerCase();
742 - let enabled = props.enabled 742 + let enabled = props.enabled
743 if (props.enabled === undefined && !props?.parentProps?.record) { 743 if (props.enabled === undefined && !props?.parentProps?.record) {
744 enabled = true 744 enabled = true
745 } 745 }
@@ -840,7 +840,13 @@ const useCommonOperationBarComponentEvent = props => { @@ -840,7 +840,13 @@ const useCommonOperationBarComponentEvent = props => {
840 style.color = "#000"; 840 style.color = "#000";
841 defaultProps.style = style; 841 defaultProps.style = style;
842 } 842 }
843 - 843 + if (config.btnBgColor) {
  844 + const { style = {} } = defaultProps;
  845 + style.backgroundColor = config.btnBgColor;
  846 + style.borderColor = config.btnBgColor;
  847 + style.color = "#fff";
  848 + defaultProps.style = style;
  849 + }
844 return defaultProps; 850 return defaultProps;
845 }; 851 };
846 852
src/mes/productionExec/productionExecMain/index.js
@@ -560,15 +560,20 @@ const ProductionExecContentByType = props => { @@ -560,15 +560,20 @@ const ProductionExecContentByType = props => {
560 ) 560 )
561 return; 561 return;
562 const { globalData } = props?.app 562 const { globalData } = props?.app
563 - const {currentWorkOrderInfo} = globalData || {} 563 + const { currentWorkOrderInfo } = globalData || {}
564 const { dAdjustOrRun } = currentWorkOrderInfo || {} 564 const { dAdjustOrRun } = currentWorkOrderInfo || {}
565 - const sStatusNameValue = dAdjustOrRun === 0 565 + // const sStatusNameValue = dAdjustOrRun === 0
  566 + // ? 0
  567 + // : 1;
  568 + const sStatusNameValue = deviceTargetInfoData[0]?.sStatus?.includes(
  569 + "adjustment"
  570 + )
566 ? 0 571 ? 0
567 : 1; 572 : 1;
568 573
569 const showValue = { 574 const showValue = {
570 stop: { 575 stop: {
571 - showName: "调机 / 生产", 576 + showName: "调机开始",
572 onClick: config => 577 onClick: config =>
573 operationFetch(props, config, undefined, () => { 578 operationFetch(props, config, undefined, () => {
574 props.onSaveState({ 579 props.onSaveState({
@@ -578,7 +583,7 @@ const ProductionExecContentByType = props => { @@ -578,7 +583,7 @@ const ProductionExecContentByType = props => {
578 }) 583 })
579 }, 584 },
580 again: { 585 again: {
581 - showName: "调机 / 生产", 586 + showName: "调机结束",
582 onClick: config => 587 onClick: config =>
583 operationFetch(props, config, "again", () => { 588 operationFetch(props, config, "again", () => {
584 props.onSaveState({ 589 props.onSaveState({