From 18e50f00e722de90553436632fe46169d5708e5e Mon Sep 17 00:00:00 2001 From: chenxt <10125295+chen-xintao97@user.noreply.gitee.com> Date: Wed, 28 Jan 2026 16:00:09 +0800 Subject: [PATCH] 手工机台 --- src/components/Common/CommonComponent/index.js | 3 ++- src/components/Common/CommonTable/index.js | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------- src/index.less | 4 ++++ 3 files changed, 61 insertions(+), 38 deletions(-) diff --git a/src/components/Common/CommonComponent/index.js b/src/components/Common/CommonComponent/index.js index 0e3607c..e4028e4 100644 --- a/src/components/Common/CommonComponent/index.js +++ b/src/components/Common/CommonComponent/index.js @@ -3051,9 +3051,10 @@ export default class CommonComponent extends Component { /* 页面输出 */ const className = iColValue === 24 ? 'input24' : iColValue === 18 ? 'input18' : iColValue === 12 ? 'input12' : 'changeClassName'; const mesInputBlue = enabled && !this.props.bNoMesBlue && this.firstDataIndex !== 'b'; + const {bManual = false} = this.props?.app?.userinfo return (
- {mesInputBlue ?
: ''} + {mesInputBlue ?
: ''}
{oPreDot} {commonAssembly} diff --git a/src/components/Common/CommonTable/index.js b/src/components/Common/CommonTable/index.js index 4a43010..1959084 100644 --- a/src/components/Common/CommonTable/index.js +++ b/src/components/Common/CommonTable/index.js @@ -2395,28 +2395,28 @@ class CommonTableRc extends React.Component { colorValue = t.background; } else { const sState = commonUtils.isEmpty(t.sState) ? 4 : t.sState; - switch (Number(sState)) { // 根据状态显示颜色 - case 0: - colorValue = '#808080'; /* 0:灰色 */ - break; - case 1: - colorValue = '#808080'; /* 1:灰色 */ - break; - case 2: - colorValue = '#ff4d4f'; /* 2:红色 */ - break; - case 3: - colorValue = '#d4b106'; /* 3:黄色 */ - break; - case 4: - colorValue = '#000000'; /* 黑色 */ - break; - case 5: - colorValue = '#49aa19'; /* 5:绿色 */ - break; - default: - colorValue = '#000000'; - } + switch (Number(sState)) { // 根据状态显示颜色 + case 0: + colorValue = '#808080'; /* 0:灰色 */ + break; + case 1: + colorValue = '#808080'; /* 1:灰色 */ + break; + case 2: + colorValue = '#ff4d4f'; /* 2:红色 */ + break; + case 3: + colorValue = '#d4b106'; /* 3:黄色 */ + break; + case 4: + colorValue = '#000000'; /* 黑色 */ + break; + case 5: + colorValue = '#49aa19'; /* 5:绿色 */ + break; + default: + colorValue = '#000000'; + } } return (
{ }; const resultTemp = {}; const list = sDefault.split(","); + const bManual = props?.app?.userinfo?.bManual list.forEach(btnType => { if (btnType.includes("add")) { resultTemp.mesAdd = params => { @@ -12274,20 +12275,37 @@ const useGetTableBtnOprSetting = props => { icon={} onClick={e => { e.stopPropagation(); - props.onMesTableLineAdd && - props.onMesTableLineAdd({ - ...params, - callback: props.bAddFirst - ? scrollToTop(params.tableClassName) - : scrollToBottom(params.tableClassName), - bAddFirst: props.bAddFirst + if (bManual) { + const btnsConfig = + gdsconfigformslave.find( + item => item.sControlName?.toLowerCase().includes("add") + ) || {}; + props.parentProps.onExecInstructSet({ + btnConfig: { + ...btnsConfig, + sInstruct: btnsConfig.sButtonParam + }, + nextProps: { + ...props + } }); + } else { + props.onMesTableLineAdd && + props.onMesTableLineAdd({ + ...params, + callback: props.bAddFirst + ? scrollToTop(params.tableClassName) + : scrollToBottom(params.tableClassName), + bAddFirst: props.bAddFirst + }); + } + }} /> ); }; } else if (btnType.includes("del")) { - if (btnType.includes("enventdel")) { + if (bManual) { resultTemp.mesDel = params => { const { record } = params; const { sDefault: str } = btnTableDelConfig; @@ -12312,10 +12330,10 @@ const useGetTableBtnOprSetting = props => { item => item.sControlName?.toLowerCase().includes("btnenventdel") ) || {}; props.parentProps.onExecInstructSet({ - btnConfig: { - ...btnsConfig, - sInstruct: btnsConfig.sButtonParam - }, + btnConfig: { + ...btnsConfig, + sInstruct: btnsConfig.sButtonParam + }, nextProps: { ...props } @@ -12371,7 +12389,7 @@ const useGetTableBtnOprSetting = props => { } ; } else if (btnType.includes("save")) { - if (btnType.includes("enventsave")) { + if (bManual) { resultTemp.mesSave = () => (