Commit 9e90294786f533c5ab341da9e39fb1c342b166b2

Authored by Min
1 parent a7340844

1.翻译mes按钮

src/components/Common/CommonComponent/index.js
... ... @@ -754,6 +754,7 @@ export default class CommonComponent extends Component {
754 754 const { userinfo } = app;
755 755 let { sTableTitleSql } = showConfig;
756 756 /* 根据用户配置语言 设置表格标题 */
  757 + console.log('2122', showConfig);
757 758 if (commonUtils.isJSON(sTableTitleSql) && sTableTitleSql.includes('Chinese')) {
758 759 sTableTitleSql = this.getLocalizedString(sTableTitleSql, userinfo.sLanguage);
759 760 }
... ...
src/mes/common/commonOperationBarComponent/index.js
... ... @@ -10,7 +10,7 @@ import costomPageFun from "@/mes/costomPageFun";
10 10 import * as commonConfig from "@/utils/config";
11 11  
12 12 import styles from "./index.less";
13   -import { Button, Space, Input, Modal, Dropdown } from "antd";
  13 +import {Button, Space, Input, Modal, Dropdown, Tooltip} from "antd";
14 14 import { ScanOutlined } from "@ant-design/icons";
15 15  
16 16 const useCommonOperationBarComponentEvent = props => {
... ... @@ -1021,8 +1021,17 @@ const CommonOperationBarComponent = basProps => {
1021 1021 <div className="leftBar">
1022 1022 <Space>
1023 1023 {btnLeftConfig.map(item => {
  1024 + console.log('ssss', item);
  1025 + let sTooltip = item.showName +'-'+ item.sChinese || item.showName ;
  1026 + if(item.showName === 'Proofreading/revision Complete'){
  1027 + sTooltip = item.showName + '-装校版结束';
  1028 + } else if(item.showName === 'All'){
  1029 + sTooltip = item.showName + '-全部';
  1030 + }
  1031 +
1024 1032 if (item.showName === "扫码上料") {
1025 1033 return (
  1034 + <Tooltip title='扫码上料'>
1026 1035 <Button
1027 1036 {...props.onGetBtnPropps(item, searchField)}
1028 1037 type="link"
... ... @@ -1034,6 +1043,7 @@ const CommonOperationBarComponent = basProps =&gt; {
1034 1043 />
1035 1044 }
1036 1045 />
  1046 + </Tooltip>
1037 1047 );
1038 1048 } else if (item.showName === "重新发版" && item.iTag === 100) {
1039 1049 return (
... ... @@ -1060,9 +1070,11 @@ const CommonOperationBarComponent = basProps =&gt; {
1060 1070 );
1061 1071 }
1062 1072 return (
1063   - <Button {...props.onGetBtnPropps(item, searchField)}>
  1073 + <Tooltip title={sTooltip}>
  1074 + <Button {...props.onGetBtnPropps(item, searchField)}>
1064 1075 {item.showName}
1065   - </Button>
  1076 + </Button>
  1077 + </Tooltip>
1066 1078 );
1067 1079 })}
1068 1080 <BarcodeComponent {...props} />
... ... @@ -1076,19 +1088,29 @@ const CommonOperationBarComponent = basProps =&gt; {
1076 1088 ""
1077 1089 )}
1078 1090 {btnRightConfig.map(item => {
  1091 + let sTooltip = item.showName +'-'+ item.sChinese || item.showName ;
  1092 + if(item.showName === 'Proofreading/revision Complete'){
  1093 + sTooltip = item.showName + '-装校版结束';
  1094 + } else if(item.showName === 'All'){
  1095 + sTooltip = item.showName + '-全部';
  1096 + }
1079 1097 return (
1080   - <Button {...props.onGetBtnPropps(item, searchField)}>
1081   - {item.showName}
1082   - </Button>
  1098 + <Tooltip title={sTooltip}>
  1099 + <Button {...props.onGetBtnPropps(item, searchField)}>
  1100 + {item.showName}
  1101 + </Button>
  1102 + </Tooltip>
1083 1103 );
1084 1104 })}
1085 1105 {!belongsToForm &&
1086 1106 commonUtils.isNotEmptyObject(searchField) && (
1087 1107 <>
1088 1108 <ShowType {...showTypeProps} />
1089   - <Button type="primary" size="large" onClick={handleBtnSearch}>
  1109 + <Tooltip title='搜索'>
  1110 + <Button type="primary" size="large" onClick={handleBtnSearch} >
1090 1111 {btnSearch}
1091   - </Button>
  1112 + </Button>
  1113 + </Tooltip>
1092 1114 </>
1093 1115 )}
1094 1116 </Space>
... ...
src/mes/productionExec/noticeModal/index.js
... ... @@ -269,7 +269,7 @@ const firstNoticeModal = _props =&gt; {
269 269 const firstNotice = commonFunc.showLocalMessage(props, 'firstNotice', '首签样通知');
270 270 const firstNoticeList = commonFunc.showLocalMessage(props, 'firstNoticeList', '版材消耗登记');
271 271 const employeeNameIdTitle = commonFunc.showLocalMessage(props, 'employeeName', '员工名称/工号');
272   - const btnAll = commonFunc.showLocalMessage(props, 'btnAll', '全部');
  272 + const btnAll = 22222;
273 273 const btnSearch = commonFunc.showLocalMessage(props, 'BtnSearch', '查询');
274 274 const BtnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消');
275 275 const selectRecipient = commonFunc.showLocalMessage(props, 'selectRecipient', '请先选择接收人!');
... ...
src/mes/productionExec/productionExecMain/index.js
1 1 import React, { useEffect, useState, useRef, useMemo } from "react";
2   -import { Button, Spin, Row, Col } from "antd";
  2 +import { Button, Spin, Row, Col, Tooltip } from "antd";
3 3 import { operationFetch } from "./operationFetch";
4 4  
5 5 import * as commonUtils from "@/utils/utils";
... ... @@ -685,13 +685,19 @@ const ProductionExecContent = props =&gt; {
685 685 config.gdsconfigformslave.find(
686 686 item => item.sControlName === sControlName
687 687 ) || {};
  688 +
  689 + // 从配置中解构出 tooltip(如果有)
  690 + const { tooltip, ...restConfig } = btnConfig;
  691 + console.log('btnConfig', btnConfig);
  692 +
688 693 return {
689   - ...btnConfig,
  694 + ...restConfig,
690 695 disabled: props.onGetBtnStatus(tableName, btnConfig),
691 696 onClick: async () => {
692 697 if (!props.onGetBtnContinue()) return;
693 698 await props.awaitPromiseReturn();
694 699 const { sButtonParam, sInstruct } = btnConfig;
  700 +
695 701 // 调用指令集
696 702 if (sInstruct) {
697 703 props.onExecInstructSet({
... ... @@ -705,6 +711,7 @@ const ProductionExecContent = props =&gt; {
705 711 });
706 712 return;
707 713 }
  714 +
708 715 // 调用存储过程
709 716 if (sButtonParam) {
710 717 props.onProcedureCall({
... ... @@ -717,7 +724,11 @@ const ProductionExecContent = props =&gt; {
717 724 });
718 725 return;
719 726 }
720   - }
  727 + },
  728 + // 如果有 tooltip,返回一个带 Tooltip 的按钮渲染函数
  729 + ...(tooltip ? {
  730 + children: (button) => <Tooltip title={tooltip}>{button}</Tooltip>
  731 + } : {})
721 732 };
722 733 };
723 734  
... ... @@ -864,6 +875,7 @@ const ProductionExecContent = props =&gt; {
864 875 </div>
865 876 <div className="btnPart">
866 877 <Space>
  878 + <Tooltip title='物料消耗登记'>
867 879 <Button
868 880 type="primary"
869 881 size="large"
... ... @@ -871,13 +883,16 @@ const ProductionExecContent = props =&gt; {
871 883 >
872 884 {MCR}
873 885 </Button>
874   - <Button
  886 + </Tooltip>
  887 + <Tooltip title='版材消耗登记'>
  888 + <Button
875 889 type="primary"
876 890 size="large"
877 891 onClick={changeTab.bind(this, 2)}
878 892 >
879 893 {PMCR}
880 894 </Button>
  895 + </Tooltip>
881 896 </Space>
882 897 </div>
883 898 </div>
... ... @@ -1135,13 +1150,16 @@ const ProductionExecContent0 = props =&gt; {
1135 1150 </div>
1136 1151 <div className="btnPart">
1137 1152 <Space>
1138   - <Button
  1153 + <Tooltip title='Material Consumption Registration-物料消耗登记'>
  1154 + <Button
1139 1155 type="primary"
1140 1156 size="large"
1141 1157 onClick={changeTab.bind(this, 0)}
1142 1158 >
1143 1159 {MCR}
1144 1160 </Button>
  1161 + </Tooltip>
  1162 + <Tooltip title='Plate Material Consumption Registration-版材消耗登记'>
1145 1163 <Button
1146 1164 type="primary"
1147 1165 size="large"
... ... @@ -1149,6 +1167,7 @@ const ProductionExecContent0 = props =&gt; {
1149 1167 >
1150 1168 {PMCR}
1151 1169 </Button>
  1170 + </Tooltip>
1152 1171 </Space>
1153 1172 </div>
1154 1173 </div>
... ...
src/mes/scheduledTasks/machineTasks/index.js
... ... @@ -706,7 +706,7 @@
706 706 });
707 707 const feedbackIssues = commonFunc.showLocalMessage(props, 'feedbackIssues', '前期生产或反馈问题');
708 708 const btnsearch = commonFunc.showLocalMessage(props, 'BtnSearch', '查询');
709   - const btnAll = commonFunc.showLocalMessage(props, 'btnAll', '全部');
  709 + const btnAll = 111111;
710 710 const sWorkOrderNo = commonFunc.showLocalMessage(props, 'sWorkOrderNo', '工单编号');
711 711 const deviceInfo = commonFunc.showLocalMessage(props, 'deviceInfo', '设备信息');
712 712 const TasksQty = commonFunc.showLocalMessage(props, 'TasksQty', '今日完成任务批次/产量(个)');
... ...