Commit 396cf7cd5946d0274c0cb05ab95a12e6e2870cca
1 parent
8926399f
按钮样式
Showing
7 changed files
with
139 additions
and
48 deletions
src/components/Common/CommonInstructSet.js
| ... | ... | @@ -147,7 +147,7 @@ const addExtraData = props => { |
| 147 | 147 | } |
| 148 | 148 | }); |
| 149 | 149 | } |
| 150 | - | |
| 150 | + | |
| 151 | 151 | const globalData = commonUtils.convertStrToObj( |
| 152 | 152 | localStorage.xlybusinessglobalData |
| 153 | 153 | ); |
| ... | ... | @@ -226,7 +226,6 @@ const instructSetInit = async props => { |
| 226 | 226 | |
| 227 | 227 | // 基础校验 |
| 228 | 228 | const sInstruct = instructCheck(props); |
| 229 | - | |
| 230 | 229 | if (!sInstruct) return; |
| 231 | 230 | |
| 232 | 231 | // 添加额外数据 |
| ... | ... | @@ -337,6 +336,7 @@ const instructSetInit = async props => { |
| 337 | 336 | props.callback && props.callback(); |
| 338 | 337 | }); |
| 339 | 338 | }); |
| 339 | + | |
| 340 | 340 | props.inscallback && props.inscallback({ ...props, ...addStateNew }); |
| 341 | 341 | }; |
| 342 | 342 | ... | ... |
src/mes/common/commonModelComponent/index.js
| ... | ... | @@ -1306,6 +1306,7 @@ const CommonModelComponent = props => { |
| 1306 | 1306 | tableBtnsConfig, // 表格按钮配置 |
| 1307 | 1307 | bFirstComponent: level === 0 && index === -1 |
| 1308 | 1308 | }; |
| 1309 | + console.log("🚀 ~ getComponent ~ componentProps:", componentProps) | |
| 1309 | 1310 | const commonDivHeight = useComputedCommonDivHeight(componentProps); |
| 1310 | 1311 | return ( |
| 1311 | 1312 | <div |
| ... | ... | @@ -1874,8 +1875,6 @@ const CommonTableComponent = props => { |
| 1874 | 1875 | sName |
| 1875 | 1876 | }; |
| 1876 | 1877 | if (tableProps.data && tableProps.data.length === 0) { |
| 1877 | - console.log("🚀 ~ CommonTableComponent ~ tableProps:", tableProps) | |
| 1878 | - | |
| 1879 | 1878 | props.onMesTableLineAdd({ |
| 1880 | 1879 | tableName: tableProps.name, |
| 1881 | 1880 | // tableClassName: state.tableClassName | ... | ... |
src/mes/common/commonOperationBarComponent/MesToolbar.js
| ... | ... | @@ -132,7 +132,6 @@ const handleScanFace = (props) => { |
| 132 | 132 | onSuccess: (_, dataset) => { |
| 133 | 133 | const { proData = [] } = dataset.rows[0].dataSet; |
| 134 | 134 | const { [`${addData}Data`]: tableData = [], [`${addData}Config`]: config = {} } = props; |
| 135 | - const { btnConfig = {}, copyToConfig = [], record = {} } = props?.parentProps || {} | |
| 136 | 135 | const copyConfig = config?.gdsconfigformslave?.find(item => item.sControlName.toLowerCase().includes('btnscanface')) |
| 137 | 136 | proData.forEach(item => { |
| 138 | 137 | const data = commonFunc.getAssignFieldValue(copyConfig?.sAssignField, item) | ... | ... |
src/mes/productionExec/productionExecMain/index.js
| ... | ... | @@ -37,7 +37,7 @@ const list = [ |
| 37 | 37 | |
| 38 | 38 | const useProductionExecMainEvent = props => { |
| 39 | 39 | const { formData = [] } = props; |
| 40 | - const noProduction= commonFunc.showLocalMessage(props, 'noProduction', '暂无生产执行数据,请先开工一条任务!'); | |
| 40 | + const noProduction = commonFunc.showLocalMessage(props, 'noProduction', '暂无生产执行数据,请先开工一条任务!'); | |
| 41 | 41 | |
| 42 | 42 | const waitWorkLoading = commonFunc.showLocalMessage(props, 'waitWorkLoading', '等待工单数据加载中...'); |
| 43 | 43 | |
| ... | ... | @@ -452,9 +452,8 @@ const ProductionExecMain = baseProps => { |
| 452 | 452 | <div className={`rightPanel ${collapsed ? "collapsed" : ""}`}> |
| 453 | 453 | {props.pageloading ? ( |
| 454 | 454 | <div |
| 455 | - className={`mesPageloadingDiv ${ | |
| 456 | - props.bNoWorkOrderInfo ? "hideDot" : "" | |
| 457 | - }`} | |
| 455 | + className={`mesPageloadingDiv ${props.bNoWorkOrderInfo ? "hideDot" : "" | |
| 456 | + }`} | |
| 458 | 457 | > |
| 459 | 458 | <Spin |
| 460 | 459 | spinning={props.pageloading} |
| ... | ... | @@ -525,9 +524,8 @@ const ProductionExecMain = baseProps => { |
| 525 | 524 | onClick={() => { |
| 526 | 525 | setCollapsed(!collapsed); |
| 527 | 526 | }} |
| 528 | - className={`btns ${styles.expandCutBtn} ${ | |
| 529 | - collapsed ? "collapsed" : "" | |
| 530 | - }`} | |
| 527 | + className={`btns ${styles.expandCutBtn} ${collapsed ? "collapsed" : "" | |
| 528 | + }`} | |
| 531 | 529 | style={{ display: !props.bFinish1 ? "none" : "" }} |
| 532 | 530 | > |
| 533 | 531 | <Button |
| ... | ... | @@ -729,8 +727,8 @@ const ProductionExecContent = props => { |
| 729 | 727 | onSuccess: () => { |
| 730 | 728 | props.onRefresh && props.onRefresh(); |
| 731 | 729 | }, |
| 732 | - onConfirm: () => {}, | |
| 733 | - onError: () => {} | |
| 730 | + onConfirm: () => { }, | |
| 731 | + onError: () => { } | |
| 734 | 732 | }); |
| 735 | 733 | return; |
| 736 | 734 | } |
| ... | ... | @@ -978,7 +976,7 @@ const ProductionExecContent0 = props => { |
| 978 | 976 | const btnProps = { |
| 979 | 977 | type: "primary", |
| 980 | 978 | size: "large", |
| 981 | - style: { width: 80 } | |
| 979 | + style: { width: 100, height: 40 } | |
| 982 | 980 | }; |
| 983 | 981 | |
| 984 | 982 | const getBtnConfigByControlName = sControlName => { |
| ... | ... | @@ -986,9 +984,9 @@ const ProductionExecContent0 = props => { |
| 986 | 984 | config.gdsconfigformslave.find( |
| 987 | 985 | item => item.sControlName === sControlName |
| 988 | 986 | ) || {}; |
| 989 | - if (!btnConfig.bVisible) { | |
| 990 | - btnConfig.style = { display: "none" }; | |
| 991 | - } | |
| 987 | + if (!btnConfig.bVisible) { | |
| 988 | + btnConfig.style = { display: "none" }; | |
| 989 | + } | |
| 992 | 990 | return { |
| 993 | 991 | ...btnConfig, |
| 994 | 992 | disabled: props.onGetBtnStatus(tableName, btnConfig), |
| ... | ... | @@ -1016,8 +1014,8 @@ const ProductionExecContent0 = props => { |
| 1016 | 1014 | onSuccess: () => { |
| 1017 | 1015 | props.onRefresh && props.onRefresh(); |
| 1018 | 1016 | }, |
| 1019 | - onConfirm: () => {}, | |
| 1020 | - onError: () => {} | |
| 1017 | + onConfirm: () => { }, | |
| 1018 | + onError: () => { } | |
| 1021 | 1019 | }); |
| 1022 | 1020 | return; |
| 1023 | 1021 | } |
| ... | ... | @@ -1027,7 +1025,7 @@ const ProductionExecContent0 = props => { |
| 1027 | 1025 | record: viewRow, |
| 1028 | 1026 | config: btnConfig |
| 1029 | 1027 | }); |
| 1030 | - } | |
| 1028 | + }, | |
| 1031 | 1029 | }; |
| 1032 | 1030 | }; |
| 1033 | 1031 | |
| ... | ... | @@ -1080,6 +1078,100 @@ const ProductionExecContent0 = props => { |
| 1080 | 1078 | <CommonViewTable className="rightFormBox" {...viewProps} /> |
| 1081 | 1079 | <div className="rightFormBtn"> |
| 1082 | 1080 | <div className="rightFormBtnFloor"> |
| 1081 | + <div className='rightFormBtnFloorBtnBox'> | |
| 1082 | + <Button | |
| 1083 | + {...btnProps} | |
| 1084 | + {...getBtnConfigByControlName("BtnEventBlanking")} | |
| 1085 | + > | |
| 1086 | + 下料 | |
| 1087 | + </Button> | |
| 1088 | + <Button | |
| 1089 | + {...btnProps} | |
| 1090 | + {...getBtnConfigByControlName("BtnEventJL")} | |
| 1091 | + > | |
| 1092 | + 叫料 | |
| 1093 | + </Button> | |
| 1094 | + <Button | |
| 1095 | + className="abnormalBtn" | |
| 1096 | + style={{ "border-color": "#faad14", background: "#faad14" }} | |
| 1097 | + {...btnProps} | |
| 1098 | + {...getBtnConfigByControlName("BtnCancel")} | |
| 1099 | + > | |
| 1100 | + 撤销 | |
| 1101 | + </Button> | |
| 1102 | + {[""].map(() => { | |
| 1103 | + const sControlName = "BtnRight1.BtnPrint4"; | |
| 1104 | + const btnConfig = config.gdsconfigformslave.find( | |
| 1105 | + item => item.sControlName === sControlName | |
| 1106 | + ); | |
| 1107 | + if (!btnConfig) return ""; | |
| 1108 | + return ( | |
| 1109 | + <Button | |
| 1110 | + {...btnProps} | |
| 1111 | + {...getBtnConfigByControlName(sControlName)} | |
| 1112 | + > | |
| 1113 | + {btnConfig.showName} | |
| 1114 | + </Button> | |
| 1115 | + ); | |
| 1116 | + })} | |
| 1117 | + <Button | |
| 1118 | + {...btnProps} | |
| 1119 | + {...getBtnConfigByControlName("BtnPrint1")} | |
| 1120 | + > | |
| 1121 | + 产量① | |
| 1122 | + </Button> | |
| 1123 | + <Button | |
| 1124 | + {...btnProps} | |
| 1125 | + {...getBtnConfigByControlName("BtnPrint2")} | |
| 1126 | + > | |
| 1127 | + 产品② | |
| 1128 | + </Button> | |
| 1129 | + <Button | |
| 1130 | + {...btnProps} | |
| 1131 | + {...getBtnConfigByControlName("BtnPrint3")} | |
| 1132 | + > | |
| 1133 | + 异常③ | |
| 1134 | + </Button> | |
| 1135 | + </div> | |
| 1136 | + {/* <Space> | |
| 1137 | + <Button | |
| 1138 | + {...btnProps} | |
| 1139 | + {...getBtnConfigByControlName("BtnPrint1")} | |
| 1140 | + > | |
| 1141 | + 产量① | |
| 1142 | + </Button> | |
| 1143 | + <Button | |
| 1144 | + {...btnProps} | |
| 1145 | + {...getBtnConfigByControlName("BtnPrint2")} | |
| 1146 | + > | |
| 1147 | + 产品② | |
| 1148 | + </Button> | |
| 1149 | + </Space> */} | |
| 1150 | + {/* <Space className="rightPart"> | |
| 1151 | + <Button | |
| 1152 | + {...btnProps} | |
| 1153 | + {...getBtnConfigByControlName("BtnPrint3")} | |
| 1154 | + > | |
| 1155 | + 异常③ | |
| 1156 | + </Button> | |
| 1157 | + </Space> */} | |
| 1158 | + </div> | |
| 1159 | + <div className="rightFormBtnFoot pagesNuxt"> | |
| 1160 | + <Button | |
| 1161 | + onClick={() => props.onPagesNuxt(tableName, "up")} | |
| 1162 | + icon={<LeftOutlined />} | |
| 1163 | + {...btnProps} | |
| 1164 | + /> | |
| 1165 | + <Button | |
| 1166 | + onClick={() => props.onPagesNuxt(tableName, "next")} | |
| 1167 | + icon={<RightOutlined />} | |
| 1168 | + {...btnProps} | |
| 1169 | + /> | |
| 1170 | + | |
| 1171 | + </div> | |
| 1172 | + </div> | |
| 1173 | + {/* <div className="rightFormBtn"> | |
| 1174 | + <div className="rightFormBtnFloor"> | |
| 1083 | 1175 | <Space> |
| 1084 | 1176 | <Button |
| 1085 | 1177 | {...btnProps} |
| ... | ... | @@ -1115,7 +1207,6 @@ const ProductionExecContent0 = props => { |
| 1115 | 1207 | > |
| 1116 | 1208 | 产品② |
| 1117 | 1209 | </Button> |
| 1118 | - {/* <Button {...btnProps}>产品②</Button> */} | |
| 1119 | 1210 | </Space> |
| 1120 | 1211 | </div> |
| 1121 | 1212 | <div className="rightFormBtnFloor"> |
| ... | ... | @@ -1129,7 +1220,6 @@ const ProductionExecContent0 = props => { |
| 1129 | 1220 | > |
| 1130 | 1221 | 异常③ |
| 1131 | 1222 | </Button> |
| 1132 | - {/* <Button {...btnProps}>撤销</Button> */} | |
| 1133 | 1223 | </Space> |
| 1134 | 1224 | </div> |
| 1135 | 1225 | <div className="rightFormBtnFoot pagesNuxt"> |
| ... | ... | @@ -1161,7 +1251,7 @@ const ProductionExecContent0 = props => { |
| 1161 | 1251 | ); |
| 1162 | 1252 | })} |
| 1163 | 1253 | </div> |
| 1164 | - </div> | |
| 1254 | + </div> */} | |
| 1165 | 1255 | </div> |
| 1166 | 1256 | </div> |
| 1167 | 1257 | <div className="btns"> |
| ... | ... | @@ -1323,8 +1413,8 @@ const ProductionExecContent1 = props => { |
| 1323 | 1413 | onSuccess: () => { |
| 1324 | 1414 | props.onRefresh && props.onRefresh(); |
| 1325 | 1415 | }, |
| 1326 | - onConfirm: () => {}, | |
| 1327 | - onError: () => {} | |
| 1416 | + onConfirm: () => { }, | |
| 1417 | + onError: () => { } | |
| 1328 | 1418 | }); |
| 1329 | 1419 | return; |
| 1330 | 1420 | } |
| ... | ... | @@ -1589,8 +1679,8 @@ const ProductionExecContent2 = props => { |
| 1589 | 1679 | onSuccess: () => { |
| 1590 | 1680 | props.onRefresh && props.onRefresh(); |
| 1591 | 1681 | }, |
| 1592 | - onConfirm: () => {}, | |
| 1593 | - onError: () => {} | |
| 1682 | + onConfirm: () => { }, | |
| 1683 | + onError: () => { } | |
| 1594 | 1684 | }); |
| 1595 | 1685 | return; |
| 1596 | 1686 | } |
| ... | ... | @@ -1777,17 +1867,15 @@ const ProductionExecContent3 = props => { |
| 1777 | 1867 | const bXialiao = filterData?.[0]?.iJobStatus === 3; |
| 1778 | 1868 | return ( |
| 1779 | 1869 | <div |
| 1780 | - className={`${ | |
| 1781 | - index < currentStep - 1 | |
| 1782 | - ? styles.stepState1 | |
| 1783 | - : index === currentStep - 1 | |
| 1784 | - ? bXialiao | |
| 1785 | - ? styles.stepState1 | |
| 1786 | - : styles.stepState2 | |
| 1787 | - : "" | |
| 1788 | - } ${ | |
| 1789 | - currentSelectedStep === index + 1 ? styles.stepStateUnderline : "" | |
| 1790 | - } `} | |
| 1870 | + className={`${index < currentStep - 1 | |
| 1871 | + ? styles.stepState1 | |
| 1872 | + : index === currentStep - 1 | |
| 1873 | + ? bXialiao | |
| 1874 | + ? styles.stepState1 | |
| 1875 | + : styles.stepState2 | |
| 1876 | + : "" | |
| 1877 | + } ${currentSelectedStep === index + 1 ? styles.stepStateUnderline : "" | |
| 1878 | + } `} | |
| 1791 | 1879 | onClick={() => { |
| 1792 | 1880 | if (index <= currentStep - 1) { |
| 1793 | 1881 | setCurrentSelectedStep(index + 1); |
| ... | ... | @@ -1996,8 +2084,8 @@ const ProductionExecContent8 = props => { |
| 1996 | 2084 | onSuccess: () => { |
| 1997 | 2085 | props.onRefresh && props.onRefresh(); |
| 1998 | 2086 | }, |
| 1999 | - onConfirm: () => {}, | |
| 2000 | - onError: () => {} | |
| 2087 | + onConfirm: () => { }, | |
| 2088 | + onError: () => { } | |
| 2001 | 2089 | }); |
| 2002 | 2090 | return; |
| 2003 | 2091 | } |
| ... | ... | @@ -2252,8 +2340,8 @@ const ProductionExecContent10 = props => { |
| 2252 | 2340 | onSuccess: () => { |
| 2253 | 2341 | props.onRefresh && props.onRefresh(); |
| 2254 | 2342 | }, |
| 2255 | - onConfirm: () => {}, | |
| 2256 | - onError: () => {} | |
| 2343 | + onConfirm: () => { }, | |
| 2344 | + onError: () => { } | |
| 2257 | 2345 | }); |
| 2258 | 2346 | return; |
| 2259 | 2347 | } |
| ... | ... | @@ -2379,7 +2467,7 @@ const ProductionExecContent10 = props => { |
| 2379 | 2467 | {...btnProps} |
| 2380 | 2468 | {...getBtnConfigByControlName(sControlName)} |
| 2381 | 2469 | className={`${styles.print4} print4`} |
| 2382 | - // style={{display: 'none'}} | |
| 2470 | + // style={{display: 'none'}} | |
| 2383 | 2471 | > |
| 2384 | 2472 | 打印标条 |
| 2385 | 2473 | {/* {btnConfig.showName} */} | ... | ... |
src/mes/productionExec/productionExecMain/index.less
| ... | ... | @@ -133,7 +133,13 @@ |
| 133 | 133 | .flex(center); |
| 134 | 134 | justify-content: space-between; |
| 135 | 135 | padding: 0 5px; |
| 136 | - | |
| 136 | + width: 100%; | |
| 137 | + .rightFormBtnFloorBtnBox{ | |
| 138 | + width: 100%; | |
| 139 | + display: flex; | |
| 140 | + align-items: center; | |
| 141 | + justify-content: space-between; | |
| 142 | + } | |
| 137 | 143 | .abnormalBtn { |
| 138 | 144 | border-color: #faad14; |
| 139 | 145 | background: #faad14; | ... | ... |
src/mes/teamInfo/index.js
| ... | ... | @@ -484,7 +484,6 @@ const TeamInfo = baseProps => { |
| 484 | 484 | |
| 485 | 485 | const { sForemanName = "", sIpqcName = "", sEmployeeName = "" } = |
| 486 | 486 | props.slaveData && props.slaveData.length !== 0 ? props.slaveData[0] : {}; |
| 487 | - | |
| 488 | 487 | const { sTeamEmployeeNo = "" } = props.slave0Data?.[0] || {}; |
| 489 | 488 | |
| 490 | 489 | const foremanConfig = props.slaveConfig?.gdsconfigformslave.find(item => item.sName === 'sForemanName') || {}; | ... | ... |
src/oee/common/oeeKeyBoard.js
| ... | ... | @@ -308,8 +308,8 @@ class VK extends React.Component { |
| 308 | 308 | borderRadius: 8, |
| 309 | 309 | userSelect: 'none', |
| 310 | 310 | }} |
| 311 | - onMouseDown={this.F_MouseDown} | |
| 312 | - onTouchStart={this.F_TouchStart} | |
| 311 | + // onMouseDown={this.F_MouseDown} | |
| 312 | + // onTouchStart={this.F_TouchStart} | |
| 313 | 313 | // onBlur={this.F_Close} |
| 314 | 314 | > |
| 315 | 315 | <div id="VK_Title" style={{ fontSize: 14, margin: 5, textAlign: 'right' }}>可以拖动移开或 <button style={{ borderRadius: 6, border: '1px dotted #333' }} onClick={this.F_Close}>关闭键盘</button></div> | ... | ... |