From 9a1a37dc13279574f47ed2d9c8ebea8630b49c42 Mon Sep 17 00:00:00 2001 From: pengm <674192343@qq.com> Date: Fri, 27 Jun 2025 16:48:08 +0800 Subject: [PATCH] 1.处理新报价的多语言翻译 --- src/components/QuickQuote/index.jsx | 23 ++++++++++++++++------- src/mobile/quotation/detailNew.jsx | 13 +++++++++---- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/components/QuickQuote/index.jsx b/src/components/QuickQuote/index.jsx index 4b6b264..7de22b5 100644 --- a/src/components/QuickQuote/index.jsx +++ b/src/components/QuickQuote/index.jsx @@ -479,9 +479,9 @@ const QuickQuoteEvent = props => { // 核价按钮 addState.handleCalcPrice = async () => { const { masterConfig, masterData = {}, slaveConfig, slaveData = [], selectedNode = {}, extraParts = {} } = state; - + const selectProduct = commonFunc.showLocalMessage(props, 'selectProduct', '请先选择产品'); if (commonUtils.isEmptyObject(selectedNode)) { - message.error("请先选择产品", 2); + message.error(selectProduct, 2); return; } @@ -1204,12 +1204,13 @@ const TreeComponent = props => { const ContentComponent = props => { const { selectedNode = {}, extraParts = {} } = props.state; const manyqtysInfo = props.getI18nName("manyqtysInfo", "多数量报价"); + const selectProduct = commonFunc.showLocalMessage(props, 'selectProduct', '请先选择产品'); const { showName } = selectedNode; const extraPartsList = extraParts[showName] || []; let { sAllPartsName = "" } = selectedNode; let bEmpty = false; if (commonUtils.isEmptyObject(selectedNode)) { - sAllPartsName = "请先选择产品"; + sAllPartsName = selectProduct; bEmpty = true; } else if (!sAllPartsName) { sAllPartsName = showName; @@ -1483,6 +1484,9 @@ const BoxComponent = props => { if (selectedNode.sProductType === "不干胶") { showNameKeyList = ["dZBLB", "dZBJJ", "dYBJJ", "dSBJJ", "dXBJJ"]; } + const UlToolPosition = commonFunc.showLocalMessage(props, 'UlToolPosition', '上下刀位'); + const RLToolPosition = commonFunc.showLocalMessage(props, 'RLToolPosition', '左右刀位'); + const LeftMargin = commonFunc.showLocalMessage(props, 'LeftMargin', '左右刀位'); boxConfigList = boxConfig?.gdsconfigformslave?.filter(item => item.bVisible && showNameKeyList.includes(item.sName)) || []; if (selectedNode.sProductType === "不干胶") { const mappings = { @@ -1498,9 +1502,9 @@ const BoxComponent = props => { }); } else { const mappings = { - dZBLB: "左边留白", - dXBJJ: "上下刀位", - dYBJJ: "左右刀位", + dZBLB: LeftMargin, + dXBJJ: UlToolPosition, + dYBJJ: RLToolPosition, }; boxConfigList.forEach(item => { @@ -1976,6 +1980,11 @@ const BoxComponent = props => { }; const isShowImg = boxList.find(x => x.sName === "盒身")?.type !== "" || false; const PrintingParameters = props.getI18nName("PrintingParameters", "印刷参数"); + + const BoxInformation = commonFunc.showLocalMessage(props, 'Box-typeInformation', '拼版信息'); + const ImpositionInformation = commonFunc.showLocalMessage(props, 'ImpositionInformation', '拼版信息'); + + // props.setState(prevState => ({ // ...prevState, // svgBoxList: boxList, @@ -1985,7 +1994,7 @@ const BoxComponent = props => { key={boxModel} type="card" className={`noXlyTabs ${styles.tabs} ${!bBox ? styles.hideTab : ""}`} - items={["盒型信息", "拼版信息"].map((title, index) => { + items={[BoxInformation, ImpositionInformation].map((title, index) => { return { label: title, key: index, diff --git a/src/mobile/quotation/detailNew.jsx b/src/mobile/quotation/detailNew.jsx index 5d71934..97ac8f2 100644 --- a/src/mobile/quotation/detailNew.jsx +++ b/src/mobile/quotation/detailNew.jsx @@ -451,11 +451,12 @@ const QuickQuoteEvent = props => { // 核价按钮 addState.handleCalcPrice = async () => { const { masterData = {}, slaveData = [], selectedNode = {}, extraParts = {} } = state; + const selectProduct = commonFunc.showLocalMessage(props, 'selectProduct', '请先选择产品'); if (commonUtils.isEmptyObject(selectedNode)) { // message.error("请先选择产品"); Toast.show({ icon: "fail", - content: "请先选择产品", + content: selectProduct, }); return; } @@ -1575,6 +1576,10 @@ const BoxComponent = props => { if (selectedNode.sProductType === "不干胶") { showNameKeyList = ["dZBLB", "dZBJJ", "dYBJJ", "dSBJJ", "dXBJJ"]; } + const UlToolPosition = commonFunc.showLocalMessage(props, 'UlToolPosition', '上下刀位'); + const RLToolPosition = commonFunc.showLocalMessage(props, 'RLToolPosition', '左右刀位'); + const LeftMargin = commonFunc.showLocalMessage(props, 'LeftMargin', '左右刀位'); + boxConfigList = boxConfig?.gdsconfigformslave?.filter(item => item.bVisible && showNameKeyList.includes(item.sName)) || []; if (selectedNode.sProductType === "不干胶") { const mappings = { @@ -1590,9 +1595,9 @@ const BoxComponent = props => { }); } else { const mappings = { - dZBLB: "左边留白", - dXBJJ: "上下刀位", - dYBJJ: "左右刀位", + dZBLB: LeftMargin, + dXBJJ: UlToolPosition, + dYBJJ: RLToolPosition, }; boxConfigList.forEach(item => { -- libgit2 0.22.2