Commit 9a1a37dc13279574f47ed2d9c8ebea8630b49c42

Authored by Min
1 parent 391e5816

1.处理新报价的多语言翻译

src/components/QuickQuote/index.jsx
@@ -479,9 +479,9 @@ const QuickQuoteEvent = props => { @@ -479,9 +479,9 @@ const QuickQuoteEvent = props => {
479 // 核价按钮 479 // 核价按钮
480 addState.handleCalcPrice = async () => { 480 addState.handleCalcPrice = async () => {
481 const { masterConfig, masterData = {}, slaveConfig, slaveData = [], selectedNode = {}, extraParts = {} } = state; 481 const { masterConfig, masterData = {}, slaveConfig, slaveData = [], selectedNode = {}, extraParts = {} } = state;
482 - 482 + const selectProduct = commonFunc.showLocalMessage(props, 'selectProduct', '请先选择产品');
483 if (commonUtils.isEmptyObject(selectedNode)) { 483 if (commonUtils.isEmptyObject(selectedNode)) {
484 - message.error("请先选择产品", 2); 484 + message.error(selectProduct, 2);
485 return; 485 return;
486 } 486 }
487 487
@@ -1204,12 +1204,13 @@ const TreeComponent = props => { @@ -1204,12 +1204,13 @@ const TreeComponent = props => {
1204 const ContentComponent = props => { 1204 const ContentComponent = props => {
1205 const { selectedNode = {}, extraParts = {} } = props.state; 1205 const { selectedNode = {}, extraParts = {} } = props.state;
1206 const manyqtysInfo = props.getI18nName("manyqtysInfo", "多数量报价"); 1206 const manyqtysInfo = props.getI18nName("manyqtysInfo", "多数量报价");
  1207 + const selectProduct = commonFunc.showLocalMessage(props, 'selectProduct', '请先选择产品');
1207 const { showName } = selectedNode; 1208 const { showName } = selectedNode;
1208 const extraPartsList = extraParts[showName] || []; 1209 const extraPartsList = extraParts[showName] || [];
1209 let { sAllPartsName = "" } = selectedNode; 1210 let { sAllPartsName = "" } = selectedNode;
1210 let bEmpty = false; 1211 let bEmpty = false;
1211 if (commonUtils.isEmptyObject(selectedNode)) { 1212 if (commonUtils.isEmptyObject(selectedNode)) {
1212 - sAllPartsName = "请先选择产品"; 1213 + sAllPartsName = selectProduct;
1213 bEmpty = true; 1214 bEmpty = true;
1214 } else if (!sAllPartsName) { 1215 } else if (!sAllPartsName) {
1215 sAllPartsName = showName; 1216 sAllPartsName = showName;
@@ -1483,6 +1484,9 @@ const BoxComponent = props => { @@ -1483,6 +1484,9 @@ const BoxComponent = props => {
1483 if (selectedNode.sProductType === "不干胶") { 1484 if (selectedNode.sProductType === "不干胶") {
1484 showNameKeyList = ["dZBLB", "dZBJJ", "dYBJJ", "dSBJJ", "dXBJJ"]; 1485 showNameKeyList = ["dZBLB", "dZBJJ", "dYBJJ", "dSBJJ", "dXBJJ"];
1485 } 1486 }
  1487 + const UlToolPosition = commonFunc.showLocalMessage(props, 'UlToolPosition', '上下刀位');
  1488 + const RLToolPosition = commonFunc.showLocalMessage(props, 'RLToolPosition', '左右刀位');
  1489 + const LeftMargin = commonFunc.showLocalMessage(props, 'LeftMargin', '左右刀位');
1486 boxConfigList = boxConfig?.gdsconfigformslave?.filter(item => item.bVisible && showNameKeyList.includes(item.sName)) || []; 1490 boxConfigList = boxConfig?.gdsconfigformslave?.filter(item => item.bVisible && showNameKeyList.includes(item.sName)) || [];
1487 if (selectedNode.sProductType === "不干胶") { 1491 if (selectedNode.sProductType === "不干胶") {
1488 const mappings = { 1492 const mappings = {
@@ -1498,9 +1502,9 @@ const BoxComponent = props => { @@ -1498,9 +1502,9 @@ const BoxComponent = props => {
1498 }); 1502 });
1499 } else { 1503 } else {
1500 const mappings = { 1504 const mappings = {
1501 - dZBLB: "左边留白",  
1502 - dXBJJ: "上下刀位",  
1503 - dYBJJ: "左右刀位", 1505 + dZBLB: LeftMargin,
  1506 + dXBJJ: UlToolPosition,
  1507 + dYBJJ: RLToolPosition,
1504 }; 1508 };
1505 1509
1506 boxConfigList.forEach(item => { 1510 boxConfigList.forEach(item => {
@@ -1976,6 +1980,11 @@ const BoxComponent = props => { @@ -1976,6 +1980,11 @@ const BoxComponent = props => {
1976 }; 1980 };
1977 const isShowImg = boxList.find(x => x.sName === "盒身")?.type !== "" || false; 1981 const isShowImg = boxList.find(x => x.sName === "盒身")?.type !== "" || false;
1978 const PrintingParameters = props.getI18nName("PrintingParameters", "印刷参数"); 1982 const PrintingParameters = props.getI18nName("PrintingParameters", "印刷参数");
  1983 +
  1984 + const BoxInformation = commonFunc.showLocalMessage(props, 'Box-typeInformation', '拼版信息');
  1985 + const ImpositionInformation = commonFunc.showLocalMessage(props, 'ImpositionInformation', '拼版信息');
  1986 +
  1987 +
1979 // props.setState(prevState => ({ 1988 // props.setState(prevState => ({
1980 // ...prevState, 1989 // ...prevState,
1981 // svgBoxList: boxList, 1990 // svgBoxList: boxList,
@@ -1985,7 +1994,7 @@ const BoxComponent = props => { @@ -1985,7 +1994,7 @@ const BoxComponent = props => {
1985 key={boxModel} 1994 key={boxModel}
1986 type="card" 1995 type="card"
1987 className={`noXlyTabs ${styles.tabs} ${!bBox ? styles.hideTab : ""}`} 1996 className={`noXlyTabs ${styles.tabs} ${!bBox ? styles.hideTab : ""}`}
1988 - items={["盒型信息", "拼版信息"].map((title, index) => { 1997 + items={[BoxInformation, ImpositionInformation].map((title, index) => {
1989 return { 1998 return {
1990 label: title, 1999 label: title,
1991 key: index, 2000 key: index,
src/mobile/quotation/detailNew.jsx
@@ -451,11 +451,12 @@ const QuickQuoteEvent = props => { @@ -451,11 +451,12 @@ const QuickQuoteEvent = props => {
451 // 核价按钮 451 // 核价按钮
452 addState.handleCalcPrice = async () => { 452 addState.handleCalcPrice = async () => {
453 const { masterData = {}, slaveData = [], selectedNode = {}, extraParts = {} } = state; 453 const { masterData = {}, slaveData = [], selectedNode = {}, extraParts = {} } = state;
  454 + const selectProduct = commonFunc.showLocalMessage(props, 'selectProduct', '请先选择产品');
454 if (commonUtils.isEmptyObject(selectedNode)) { 455 if (commonUtils.isEmptyObject(selectedNode)) {
455 // message.error("请先选择产品"); 456 // message.error("请先选择产品");
456 Toast.show({ 457 Toast.show({
457 icon: "fail", 458 icon: "fail",
458 - content: "请先选择产品", 459 + content: selectProduct,
459 }); 460 });
460 return; 461 return;
461 } 462 }
@@ -1575,6 +1576,10 @@ const BoxComponent = props => { @@ -1575,6 +1576,10 @@ const BoxComponent = props => {
1575 if (selectedNode.sProductType === "不干胶") { 1576 if (selectedNode.sProductType === "不干胶") {
1576 showNameKeyList = ["dZBLB", "dZBJJ", "dYBJJ", "dSBJJ", "dXBJJ"]; 1577 showNameKeyList = ["dZBLB", "dZBJJ", "dYBJJ", "dSBJJ", "dXBJJ"];
1577 } 1578 }
  1579 + const UlToolPosition = commonFunc.showLocalMessage(props, 'UlToolPosition', '上下刀位');
  1580 + const RLToolPosition = commonFunc.showLocalMessage(props, 'RLToolPosition', '左右刀位');
  1581 + const LeftMargin = commonFunc.showLocalMessage(props, 'LeftMargin', '左右刀位');
  1582 +
1578 boxConfigList = boxConfig?.gdsconfigformslave?.filter(item => item.bVisible && showNameKeyList.includes(item.sName)) || []; 1583 boxConfigList = boxConfig?.gdsconfigformslave?.filter(item => item.bVisible && showNameKeyList.includes(item.sName)) || [];
1579 if (selectedNode.sProductType === "不干胶") { 1584 if (selectedNode.sProductType === "不干胶") {
1580 const mappings = { 1585 const mappings = {
@@ -1590,9 +1595,9 @@ const BoxComponent = props => { @@ -1590,9 +1595,9 @@ const BoxComponent = props => {
1590 }); 1595 });
1591 } else { 1596 } else {
1592 const mappings = { 1597 const mappings = {
1593 - dZBLB: "左边留白",  
1594 - dXBJJ: "上下刀位",  
1595 - dYBJJ: "左右刀位", 1598 + dZBLB: LeftMargin,
  1599 + dXBJJ: UlToolPosition,
  1600 + dYBJJ: RLToolPosition,
1596 }; 1601 };
1597 1602
1598 boxConfigList.forEach(item => { 1603 boxConfigList.forEach(item => {