From 56d3c42f224262d25dae0a59414cc85a564ad1d6 Mon Sep 17 00:00:00 2001 From: pengm <674192343@qq.com> Date: Fri, 24 Jul 2026 15:34:19 +0800 Subject: [PATCH] 1.文版生产工单单据合版信息翻译 --- src/components/Common/CommonComponent/index.js | 14 +++++++++++--- src/components/Common/CommonTable/index.js | 21 +++++++++++++++++---- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/src/components/Common/CommonComponent/index.js b/src/components/Common/CommonComponent/index.js index 55735c5..97b7482 100644 --- a/src/components/Common/CommonComponent/index.js +++ b/src/components/Common/CommonComponent/index.js @@ -3501,6 +3501,10 @@ export default class CommonComponent extends Component { commonUtils.isNotEmptyObject(this.props) && commonUtils.isNotEmptyObject(this.props.app) ? commonFunc.showMessage(this.props.app.commonConst, "CombinedInfo") : "合版信息"; + const arrange = commonFunc.showLocalMessage(this.props, 'arrange', '排'); + const bEnglish = this.props?.app?.userinfo?.sLanguage !== 'sChinese'; + const an = commonFunc.showLocalMessage(this.props, 'an', ''); + let bParamColor = false; if (this.props && sName === "sParamValue" && this.props.dataValue) { if (this.props.dataValue === "选择色序" || this.props.record.sParamKey === "sParam1001") { @@ -3532,10 +3536,14 @@ export default class CommonComponent extends Component { } } if (commonUtils.isNotEmptyArr(JsonData)) { - JsonData.forEach(item => { - sValue += `${item.sProductNo}:排${item.dCombineQty}个,`; + JsonData.forEach((item) => { + if (bEnglish) { + sValue += `${item.sProductNo}:${item.dCombineQty}${arrange},`; + } else { + sValue += `${item.sProductNo}:${arrange}${item.dCombineQty}${an},`; + } }); - sValue = commonUtils.isNotEmptyObject(sValue) ? sValue.substr(0, sValue.length - 1) : ""; + sValue = commonUtils.isNotEmptyObject(sValue) ? sValue.substr(0, sValue.length - 1) : ''; } } else if (sName === "sColorSerialMemo" || bSColorSerialMemo || sName === "sPositiveColor" || sName === "sOppositeColor" || bParamColor) { let JsonData = []; diff --git a/src/components/Common/CommonTable/index.js b/src/components/Common/CommonTable/index.js index 29557c8..c8566ad 100644 --- a/src/components/Common/CommonTable/index.js +++ b/src/components/Common/CommonTable/index.js @@ -5914,9 +5914,18 @@ class CommonTableRc extends React.Component { let clickEvent = ''; /* 选择合版产品弹窗 */ const sModelsType = commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyObject(props.app) ? props.app.currentPane.sModelsType : ''; - const combinedInfo = commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyObject(props.app) ? commonFunc.showMessage(props.app.commonConst, 'CombinedInfo') : '合版信息'; - - const pleaseSelect = commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyObject(props.app) ? commonFunc.showMessage(this.props.app.commonConst, 'pleaseSelect') : '请选择'; + const pleaseSelect = + commonUtils.isNotEmptyObject(this.props) && commonUtils.isNotEmptyObject(this.props.app) + ? commonFunc.showMessage(this.props.app.commonConst, "pleaseSelect") + : "请选择"; + const combinedInfo = + commonUtils.isNotEmptyObject(this.props) && commonUtils.isNotEmptyObject(this.props.app) + ? commonFunc.showMessage(this.props.app.commonConst, "CombinedInfo") + : "合版信息"; + + const arrange = commonFunc.showLocalMessage(props, 'arrange', '排'); + const an = commonFunc.showLocalMessage(props, 'an', ''); + const bEnglish = props.app.userinfo?.sLanguage !== 'sChinese'; if (commonUtils.isNotEmptyObject(sName) && (sName === 'sCombinedMemo' || sName === 'sCombineProductNameNew' || sName === 'sColorSerialMemo' || sName === 'sPositiveColor' || sName === 'sOppositeColor' || sName === 'sParams' || sName === 'sParamsNew' || sName === 'sQuoParams' || (commonUtils.isNotEmptyObject(sModelsType) && !sModelsType.includes('Set') && sName === 'sCombinePartsNameNew'))) { linkStyle = 'linksActiveIdStyle'; @@ -5934,7 +5943,11 @@ class CommonTableRc extends React.Component { let sCombinedMemo = ''; if (commonUtils.isNotEmptyArr(JsonData)) { JsonData.forEach((item) => { - sCombinedMemo += `${item.sProductNo}:排${item.dCombineQty}个,`; + if (bEnglish) { + sCombinedMemo += `${item.sProductNo}:${item.dCombineQty}${arrange},`; + }else { + sCombinedMemo += `${item.sProductNo}:${arrange}${item.dCombineQty}${an},`; + } }); sCombinedMemo = commonUtils.isNotEmptyObject(sCombinedMemo) ? sCombinedMemo.substr(0, sCombinedMemo.length - 1) : ''; sValue = sCombinedMemo; -- libgit2 0.22.2