Commit 9a1a37dc13279574f47ed2d9c8ebea8630b49c42

Authored by Min
1 parent 391e5816

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

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