Commit c5278118dd40c68443581fd44c13e72158dcc95e

Authored by 陈鑫涛
2 parents 3f283919 9463c85b

Merge branch 'main' of http://git.xlyprint.cn/zhangz/xlyUmi into main

src/components/Common/CommonBillEvent.js
... ... @@ -9942,14 +9942,16 @@ export default (ChildComponent) => {
9942 9942  
9943 9943 }else if (type === 'before') {
9944 9944 if(iIndex === 0 || iIndex > len -1) {
9945   - message.error('当前是首条');
  9945 + const currentFirst = commonFunc.showMessage(props.app.commonConst, 'currentFirst') || '当前是首条';
  9946 + message.error(currentFirst);
9946 9947 return;
9947 9948 }
9948 9949 tableDataRow = filterData[iIndex - 1];
9949 9950  
9950 9951 }else if (type === 'next') {
9951 9952 if(iIndex === len-1 || iIndex > len -1) {
9952   - message.error('当前是末条');
  9953 + const currentLast = commonFunc.showMessage(props.app.commonConst, 'currentLast') || '当前是末条';
  9954 + message.error(currentLast);
9953 9955 return;
9954 9956 }
9955 9957 tableDataRow = filterData[iIndex + 1];
... ...
src/components/Common/commonFunc.js
... ... @@ -564,7 +564,16 @@ export function getFilterConditon(sAssignField, allTableData) {
564 564 }
565 565 return returnData;
566 566 }
567   -
  567 +export function showLocalMessage(props, sName, sChineseName) {
  568 + let sTitle = '';
  569 + if(commonUtils.isNotEmptyObject(props) && commonUtils.isNotEmptyObject(props.app) && commonUtils.isNotEmptyArr(props.app.gdsformconst)) {
  570 + const gdsformconst = props.app.gdsformconst;
  571 + sTitle = this.showMessage(gdsformconst, sName)
  572 + } else {
  573 + sTitle = sChineseName;
  574 + }
  575 + return sTitle;
  576 +}
568 577 /** 获取常量数据 */
569 578 export function showMessage(gdsformconst, sName) {
570 579 const iIndex = gdsformconst.findIndex(item => item.sName === sName);
... ...
src/components/Manufacture/CommonPackEvent.js
... ... @@ -1376,7 +1376,7 @@ const ParamsChooseModal = props => {
1376 1376 // 选择工艺参数弹窗(新)
1377 1377 const ParamsChooseNewModal = props => {
1378 1378 const modalName = "sWorkParamsModalVisible"; // commonParamVisible
1379   - const sProcessParams = "工单参数";
  1379 + const sProcessParams = commonFunc.showMessage(props.app.commonConst, 'workParam') || '工单参数' ;
1380 1380  
1381 1381 const getTableBtnState = tableName => {
1382 1382 let result = false;
... ... @@ -1472,6 +1472,17 @@ const ParamsChooseNewModal = props => {
1472 1472 }
1473 1473 };
1474 1474  
  1475 +
  1476 + const BtnFirst= commonFunc.showMessage(props.app.commonConst, 'BtnFirst') || '首条' ;
  1477 +
  1478 + const BtnLast= commonFunc.showMessage(props.app.commonConst, 'Btnlast') || '末条' ;
  1479 +
  1480 + const BtnPrior= commonFunc.showMessage(props.app.commonConst, 'BtnPrior') || '上一条' ;
  1481 +
  1482 + const BtnNext= commonFunc.showMessage(props.app.commonConst, 'BtnNext') || '下一条' ;
  1483 +
  1484 + const BtnSure = commonFunc.showMessage(props.app.commonConst, 'BtnSure') || '确定' ;
  1485 +
1475 1486 return props[modalName] ? (
1476 1487 <AntdDraggableModal
1477 1488 width="80%"
... ... @@ -1489,7 +1500,7 @@ const ParamsChooseNewModal = props =&gt; {
1489 1500 props.onSaveState({ [modalName]: false });
1490 1501 }}
1491 1502 >
1492   - 确定
  1503 + {BtnSure}
1493 1504 </Button>
1494 1505 }
1495 1506 >
... ... @@ -1501,7 +1512,7 @@ const ParamsChooseNewModal = props =&gt; {
1501 1512 props.onBtnParamPage(props, props.processTableId, "first");
1502 1513 }}
1503 1514 >
1504   - 首条
  1515 + {BtnFirst}
1505 1516 </Button>
1506 1517 <Button
1507 1518 type="primary"
... ... @@ -1509,7 +1520,7 @@ const ParamsChooseNewModal = props =&gt; {
1509 1520 props.onBtnParamPage(props, props.processTableId, "before");
1510 1521 }}
1511 1522 >
1512   - 上一条
  1523 + {BtnPrior}
1513 1524 </Button>
1514 1525 <Button
1515 1526 type="primary"
... ... @@ -1517,7 +1528,7 @@ const ParamsChooseNewModal = props =&gt; {
1517 1528 props.onBtnParamPage(props, props.processTableId, "next");
1518 1529 }}
1519 1530 >
1520   - 下一条
  1531 + {BtnNext}
1521 1532 </Button>
1522 1533 <Button
1523 1534 type="primary"
... ... @@ -1525,7 +1536,7 @@ const ParamsChooseNewModal = props =&gt; {
1525 1536 props.onBtnParamPage(props, props.processTableId, "last");
1526 1537 }}
1527 1538 >
1528   - 末条
  1539 + {BtnLast}
1529 1540 </Button>
1530 1541 </div>
1531 1542 {[""].map(() => {
... ... @@ -1690,9 +1701,10 @@ const CombinePartsChooseModal = props =&gt; {
1690 1701 content: props.content,
1691 1702 id: new Date().getTime().toString(),
1692 1703 };
  1704 + const chooseCombinePartsName = commonFunc.showLocalMessage(props, 'chooseCombinePartsName', '选择合版部件名称');
1693 1705  
1694 1706 return (
1695   - <AntdDraggableModal width={1150} title="选择合版部件名称" visible={combinePartsChooseVisible} onCancel={onCancel} footer={null}>
  1707 + <AntdDraggableModal width={1150} title={chooseCombinePartsName} visible={combinePartsChooseVisible} onCancel={onCancel} footer={null}>
1696 1708 <CommonListSelect {...combinePartsTableProps} />
1697 1709 </AntdDraggableModal>
1698 1710 );
... ...
src/components/Manufacture/WorkOrderPackTableTreeNew/index.js
... ... @@ -4288,8 +4288,8 @@ const OtherComponent = props =&gt; {
4288 4288 // const colorInfo = "工艺颜色";
4289 4289 const visionInfo = commonUtils.isNotEmptyObject(commonFunc.showMessage(commonConst, "visionInfo")) ?
4290 4290 commonFunc.showMessage(commonConst, "visionInfo") : '改版记录';
4291   - const colorInfo = commonUtils.isNotEmptyObject(colorConfig) && commonUtils.isNotEmptyObject(colorConfig.sChinese ) ?
4292   - colorConfig.sChinese :
  4291 + const colorInfo = commonUtils.isNotEmptyObject(colorConfig) && commonUtils.isNotEmptyObject(colorConfig.showName ) ?
  4292 + colorConfig.showName :
4293 4293 commonUtils.isNotEmptyObject(commonFunc.showMessage(commonConst, "colorInfo")) ?
4294 4294 commonFunc.showMessage(commonConst, "colorInfo") : '工艺颜色'; // "工艺颜色";
4295 4295  
... ... @@ -4390,13 +4390,13 @@ const OtherComponent = props =&gt; {
4390 4390 <MaterialsComponent {...props} materialsTabValue={materialsTabValue} />
4391 4391 </Panel>
4392 4392 {materialsChildInfoListFilter.map(tablename => {
4393   - const { sChinese } = props[`${tablename}Config`];
  4393 + const { showName } = props[`${tablename}Config`];
4394 4394 return (
4395 4395 <Panel
4396 4396 collapsible="header"
4397 4397 header={getHeaderIcon(tablename)}
4398 4398 showArrow={false}
4399   - extra={panelExtra("", { selfName: sChinese, selfId: tablename })}
  4399 + extra={panelExtra("", { selfName: showName, selfId: tablename })}
4400 4400 key={tablename}
4401 4401 >
4402 4402 <MaterialsChildComponent {...props} materialsChildName={tablename} />
... ... @@ -4467,7 +4467,7 @@ const ProcessComponent = props =&gt; {
4467 4467 const showLeftConfig = processConfig.gdsconfigformslave.find(item => item.sControlName === "bShowLeft");
4468 4468  
4469 4469 if (showLeftConfig) {
4470   - const { iColValue, sChinese: processShowTitle } = showLeftConfig;
  4470 + const { iColValue, showName: processShowTitle } = showLeftConfig;
4471 4471  
4472 4472 const processTitleWidth = processConfig.gdsconfigformslave.find(item => item.sControlName === "titleWidth")?.sDefault;
4473 4473 const commonViewDragableProps = {
... ... @@ -4571,7 +4571,7 @@ const MaterialsComponent = props =&gt; {
4571 4571 materialsChildTableProps = materialsChildTablePropsList[`${item}ChildTableProps`];
4572 4572 sWidth = "58.5%";
4573 4573 sRightWidth = "42%";
4574   - materialsChildTableTitle = materialsChildTableProps.config.sChinese || "";
  4574 + materialsChildTableTitle = materialsChildTableProps.config.showName || "";
4575 4575 }
4576 4576 } else {
4577 4577 sWidth = "100%";
... ...