diff --git a/src/components/Common/CommonBillEvent.js b/src/components/Common/CommonBillEvent.js index 2849e7a..35fcdd6 100644 --- a/src/components/Common/CommonBillEvent.js +++ b/src/components/Common/CommonBillEvent.js @@ -9942,14 +9942,16 @@ export default (ChildComponent) => { }else if (type === 'before') { if(iIndex === 0 || iIndex > len -1) { - message.error('当前是首条'); + const currentFirst = commonFunc.showMessage(props.app.commonConst, 'currentFirst') || '当前是首条'; + message.error(currentFirst); return; } tableDataRow = filterData[iIndex - 1]; }else if (type === 'next') { if(iIndex === len-1 || iIndex > len -1) { - message.error('当前是末条'); + const currentLast = commonFunc.showMessage(props.app.commonConst, 'currentLast') || '当前是末条'; + message.error(currentLast); return; } tableDataRow = filterData[iIndex + 1]; diff --git a/src/components/Common/commonFunc.js b/src/components/Common/commonFunc.js index bea4631..77cdc66 100644 --- a/src/components/Common/commonFunc.js +++ b/src/components/Common/commonFunc.js @@ -564,7 +564,16 @@ export function getFilterConditon(sAssignField, allTableData) { } return returnData; } - +export function showLocalMessage(props, sName, sChineseName) { + let sTitle = ''; + if(commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyObject(props.app) && commonUtils.isNotEmptyArr(props.app.gdsformconst)) { + const gdsformconst = props.app.gdsformconst; + sTitle = this.showMessage(gdsformconst, sName) + } else { + sTitle = sChineseName; + } + return sTitle; +} /** 获取常量数据 */ export function showMessage(gdsformconst, sName) { const iIndex = gdsformconst.findIndex(item => item.sName === sName); diff --git a/src/components/Manufacture/CommonPackEvent.js b/src/components/Manufacture/CommonPackEvent.js index 8fa4e74..0e99fad 100644 --- a/src/components/Manufacture/CommonPackEvent.js +++ b/src/components/Manufacture/CommonPackEvent.js @@ -1376,7 +1376,7 @@ const ParamsChooseModal = props => { // 选择工艺参数弹窗(新) const ParamsChooseNewModal = props => { const modalName = "sWorkParamsModalVisible"; // commonParamVisible - const sProcessParams = "工单参数"; + const sProcessParams = commonFunc.showMessage(props.app.commonConst, 'workParam') || '工单参数' ; const getTableBtnState = tableName => { let result = false; @@ -1472,6 +1472,17 @@ const ParamsChooseNewModal = props => { } }; + + const BtnFirst= commonFunc.showMessage(props.app.commonConst, 'BtnFirst') || '首条' ; + + const BtnLast= commonFunc.showMessage(props.app.commonConst, 'Btnlast') || '末条' ; + + const BtnPrior= commonFunc.showMessage(props.app.commonConst, 'BtnPrior') || '上一条' ; + + const BtnNext= commonFunc.showMessage(props.app.commonConst, 'BtnNext') || '下一条' ; + + const BtnSure = commonFunc.showMessage(props.app.commonConst, 'BtnSure') || '确定' ; + return props[modalName] ? ( { props.onSaveState({ [modalName]: false }); }} > - 确定 + {BtnSure} } > @@ -1501,7 +1512,7 @@ const ParamsChooseNewModal = props => { props.onBtnParamPage(props, props.processTableId, "first"); }} > - 首条 + {BtnFirst} {[""].map(() => { @@ -1690,9 +1701,10 @@ const CombinePartsChooseModal = props => { content: props.content, id: new Date().getTime().toString(), }; + const chooseCombinePartsName = commonFunc.showLocalMessage(props, 'chooseCombinePartsName', '选择合版部件名称'); return ( - + ); diff --git a/src/components/Manufacture/WorkOrderPackTableTreeNew/index.js b/src/components/Manufacture/WorkOrderPackTableTreeNew/index.js index a9b360d..54560f9 100644 --- a/src/components/Manufacture/WorkOrderPackTableTreeNew/index.js +++ b/src/components/Manufacture/WorkOrderPackTableTreeNew/index.js @@ -4288,8 +4288,8 @@ const OtherComponent = props => { // const colorInfo = "工艺颜色"; const visionInfo = commonUtils.isNotEmptyObject(commonFunc.showMessage(commonConst, "visionInfo")) ? commonFunc.showMessage(commonConst, "visionInfo") : '改版记录'; - const colorInfo = commonUtils.isNotEmptyObject(colorConfig) && commonUtils.isNotEmptyObject(colorConfig.sChinese ) ? - colorConfig.sChinese : + const colorInfo = commonUtils.isNotEmptyObject(colorConfig) && commonUtils.isNotEmptyObject(colorConfig.showName ) ? + colorConfig.showName : commonUtils.isNotEmptyObject(commonFunc.showMessage(commonConst, "colorInfo")) ? commonFunc.showMessage(commonConst, "colorInfo") : '工艺颜色'; // "工艺颜色"; @@ -4390,13 +4390,13 @@ const OtherComponent = props => { {materialsChildInfoListFilter.map(tablename => { - const { sChinese } = props[`${tablename}Config`]; + const { showName } = props[`${tablename}Config`]; return ( @@ -4467,7 +4467,7 @@ const ProcessComponent = props => { const showLeftConfig = processConfig.gdsconfigformslave.find(item => item.sControlName === "bShowLeft"); if (showLeftConfig) { - const { iColValue, sChinese: processShowTitle } = showLeftConfig; + const { iColValue, showName: processShowTitle } = showLeftConfig; const processTitleWidth = processConfig.gdsconfigformslave.find(item => item.sControlName === "titleWidth")?.sDefault; const commonViewDragableProps = { @@ -4571,7 +4571,7 @@ const MaterialsComponent = props => { materialsChildTableProps = materialsChildTablePropsList[`${item}ChildTableProps`]; sWidth = "58.5%"; sRightWidth = "42%"; - materialsChildTableTitle = materialsChildTableProps.config.sChinese || ""; + materialsChildTableTitle = materialsChildTableProps.config.showName || ""; } } else { sWidth = "100%";