Commit c0a874e8192b9e4dbcdea1987887d2e0d8bde29b

Authored by Min
1 parent 63e8972b

1.完善各类翻译

src/components/Common/CommonComponent/index.js
@@ -749,10 +749,11 @@ export default class CommonComponent extends Component { @@ -749,10 +749,11 @@ export default class CommonComponent extends Component {
749 } 749 }
750 }; 750 };
751 getSelectTableOption = () => { 751 getSelectTableOption = () => {
752 - const { selectTableData } = this.state; 752 + const { selectTableData, selectTableIndex = 0 } = this.state;
753 const { showConfig, app } = this.props; 753 const { showConfig, app } = this.props;
754 const { userinfo } = app; 754 const { userinfo } = app;
755 let { sTableTitleSql } = showConfig; 755 let { sTableTitleSql } = showConfig;
  756 + console.log('222', sTableTitleSql);
756 /* 根据用户配置语言 设置表格标题 */ 757 /* 根据用户配置语言 设置表格标题 */
757 if (commonUtils.isJSON(sTableTitleSql) && sTableTitleSql.includes('Chinese')) { 758 if (commonUtils.isJSON(sTableTitleSql) && sTableTitleSql.includes('Chinese')) {
758 sTableTitleSql = this.getLocalizedString(sTableTitleSql, userinfo.sLanguage); 759 sTableTitleSql = this.getLocalizedString(sTableTitleSql, userinfo.sLanguage);
@@ -771,7 +772,7 @@ export default class CommonComponent extends Component { @@ -771,7 +772,7 @@ export default class CommonComponent extends Component {
771 const totalStringLen = titleStr.length; 772 const totalStringLen = titleStr.length;
772 const otherStrLen = titleStr.replace(/[^\x00-\xff]/g, '').length; // eslint-disable-line 773 const otherStrLen = titleStr.replace(/[^\x00-\xff]/g, '').length; // eslint-disable-line
773 const chineseStrLen = totalStringLen - otherStrLen; 774 const chineseStrLen = totalStringLen - otherStrLen;
774 - const defaultWidth = (chineseStrLen * 20) + (otherStrLen * 12); 775 + const defaultWidth = (chineseStrLen * 12) + (otherStrLen * 8);
775 const maxStrLen = selectTableData.reduce((res, pre) => { 776 const maxStrLen = selectTableData.reduce((res, pre) => {
776 let tempValue = pre[value] !== undefined ? pre[value] : ''; 777 let tempValue = pre[value] !== undefined ? pre[value] : '';
777 if (tempValue === '') { 778 if (tempValue === '') {
@@ -781,7 +782,7 @@ export default class CommonComponent extends Component { @@ -781,7 +782,7 @@ export default class CommonComponent extends Component {
781 const totalStringLen = tempValue.length; 782 const totalStringLen = tempValue.length;
782 const otherStrLen = tempValue.replace(/[^\x00-\xff]/g, '').length; // eslint-disable-line 783 const otherStrLen = tempValue.replace(/[^\x00-\xff]/g, '').length; // eslint-disable-line
783 const chineseStrLen = totalStringLen - otherStrLen; 784 const chineseStrLen = totalStringLen - otherStrLen;
784 - const tempWidth = (chineseStrLen * 20) + (otherStrLen * 12); 785 + const tempWidth = (chineseStrLen * 12) + (otherStrLen * 8);
785 return Math.max(tempWidth, res); 786 return Math.max(tempWidth, res);
786 }, defaultWidth); 787 }, defaultWidth);
787 width = Math.min(maxStrLen + 8, 300); 788 width = Math.min(maxStrLen + 8, 300);
@@ -812,16 +813,25 @@ export default class CommonComponent extends Component { @@ -812,16 +813,25 @@ export default class CommonComponent extends Component {
812 813
813 return ( 814 return (
814 <Option key="" className="select-table-option"> 815 <Option key="" className="select-table-option">
815 - <div style={{ width: scrollX + 8, maxWidth: 'calc(100vw - 16px)', minWidth: '100%' }}> 816 + <div style={{ width: scrollX + 8, maxWidth: 'calc(100vw - 16px)', minWidth: '100%' }} ref={(ref) => { this.selectTableRef1 = ref; }}>
816 <Table 817 <Table
817 size="small" 818 size="small"
818 className="select-table" 819 className="select-table"
  820 + rowClassName={(_, index) => {
  821 + return selectTableIndex === index ? 'selected-record-row' : '';
  822 + }}
819 rowKey="sId" 823 rowKey="sId"
820 - onRow={(record) => { 824 + onRow={(record, index) => {
821 return { 825 return {
  826 + index,
  827 + onMouseEnter: () => {
  828 + this.setState({
  829 + selectTableIndex: index,
  830 + });
  831 + },
822 onClick: () => { 832 onClick: () => {
823 - this.setState({ tempCurrentPage: null });  
824 - this.handleSelectOptionEvent(record.sId); 833 + this.setState({ tempCurrentPage: null, bDropDownOpen: false, bNotFirstEnter: true });
  834 + this.handleSelectOptionEvent(record.sSlaveId || record.sId);
825 }, 835 },
826 }; 836 };
827 }} 837 }}
src/components/Common/CommonTable/index.js
@@ -9206,9 +9206,9 @@ class CommonTableRc extends React.Component { @@ -9206,9 +9206,9 @@ class CommonTableRc extends React.Component {
9206 ? sName === "sCombinedMemo" 9206 ? sName === "sCombinedMemo"
9207 ? "合版信息" 9207 ? "合版信息"
9208 : "请选择" 9208 : "请选择"
9209 - : sValue; 9209 + : 'Plese Select';
9210 9210
9211 - if (sValue === "请选择") { 9211 + if (sValue === "Plese Select") {
9212 linkStyle = ""; 9212 linkStyle = "";
9213 clickEvent = ""; 9213 clickEvent = "";
9214 } 9214 }
src/mes/common/commonModelComponent/index.js
@@ -2406,7 +2406,8 @@ const CommonViewChooseComponent = props =&gt; { @@ -2406,7 +2406,8 @@ const CommonViewChooseComponent = props =&gt; {
2406 // (定制功能)工单参数详情弹窗 2406 // (定制功能)工单参数详情弹窗
2407 const CommonParamsModalComponent = props => { 2407 const CommonParamsModalComponent = props => {
2408 const modalName = "sWorkParamsModalVisible"; // commonParamVisible 2408 const modalName = "sWorkParamsModalVisible"; // commonParamVisible
2409 - const sProcessParams = "工单参数"; 2409 + const workParam = commonFunc.showLocalMessage(props, "workParam", "工单参数");
  2410 + const sProcessParams = workParam;
2410 2411
2411 const handleGetSelectedData = tableName => { 2412 const handleGetSelectedData = tableName => {
2412 const selectedRowKeys = props[`${tableName}SelectedRowKeys`] || []; 2413 const selectedRowKeys = props[`${tableName}SelectedRowKeys`] || [];
@@ -2479,7 +2480,6 @@ const CommonParamsModalComponent = props =&gt; { @@ -2479,7 +2480,6 @@ const CommonParamsModalComponent = props =&gt; {
2479 const BtnPrior = commonFunc.showLocalMessage(props, 'BtnPrior', '上一条'); 2480 const BtnPrior = commonFunc.showLocalMessage(props, 'BtnPrior', '上一条');
2480 const BtnNext = commonFunc.showLocalMessage(props, 'BtnNext', '下一条'); 2481 const BtnNext = commonFunc.showLocalMessage(props, 'BtnNext', '下一条');
2481 const BtnLast = commonFunc.showLocalMessage(props, 'BtnLast', '末条'); 2482 const BtnLast = commonFunc.showLocalMessage(props, 'BtnLast', '末条');
2482 - const workParam = commonFunc.showLocalMessage(props, "workParam", "工单参数");  
2483 2483
2484 return props[modalName] ? ( 2484 return props[modalName] ? (
2485 <Modal 2485 <Modal
src/mes/productionExec/productionExecMain/index.js
@@ -2222,6 +2222,18 @@ const BllbModalComponent = props =&gt; { @@ -2222,6 +2222,18 @@ const BllbModalComponent = props =&gt; {
2222 [refreshTime] 2222 [refreshTime]
2223 ); 2223 );
2224 const defectcategory = commonFunc.showLocalMessage(props, 'defectcategory', '成品不良类别'); 2224 const defectcategory = commonFunc.showLocalMessage(props, 'defectcategory', '成品不良类别');
  2225 +
  2226 + const majorCategory = commonFunc.showLocalMessage(props, 'majorCategory', '不良大类');
  2227 + const defectiveSubcategory = commonFunc.showLocalMessage(props, 'defectiveSubcategory', '不良小类');
  2228 +
  2229 + const btnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消');
  2230 + const btnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确定');
  2231 + const qualified = commonFunc.showLocalMessage(props, 'qualified', '确定');
  2232 + const OKQualified = commonFunc.showLocalMessage(props, 'OKQualified', '确定');
  2233 + const piece = commonFunc.showLocalMessage(props, 'piece', 'Piece') || 'Piece';
  2234 +
  2235 +
  2236 +
2225 const onOk = () => { 2237 const onOk = () => {
2226 props.onExecInstructSet({ 2238 props.onExecInstructSet({
2227 btnConfig: { 2239 btnConfig: {
@@ -2237,7 +2249,7 @@ const BllbModalComponent = props =&gt; { @@ -2237,7 +2249,7 @@ const BllbModalComponent = props =&gt; {
2237 ] 2249 ]
2238 } 2250 }
2239 ]), 2251 ]),
2240 - showName: "确认˝" 2252 + showName: btnSure
2241 }, 2253 },
2242 nextProps: { 2254 nextProps: {
2243 bblbData: data.map(item => ({ ...item, dQty: Number(item.dQty) })), 2255 bblbData: data.map(item => ({ ...item, dQty: Number(item.dQty) })),
@@ -2261,10 +2273,10 @@ const BllbModalComponent = props =&gt; { @@ -2261,10 +2273,10 @@ const BllbModalComponent = props =&gt; {
2261 footer={ 2273 footer={
2262 <Space> 2274 <Space>
2263 <Button size="large" onClick={() => setBllbVisible(false)}> 2275 <Button size="large" onClick={() => setBllbVisible(false)}>
2264 - 取消 2276 + {btnCancel}
2265 </Button> 2277 </Button>
2266 <Button type="primary" size="large" onClick={onOk}> 2278 <Button type="primary" size="large" onClick={onOk}>
2267 - 确定 2279 + {btnSure}
2268 </Button> 2280 </Button>
2269 </Space> 2281 </Space>
2270 } 2282 }
@@ -2274,12 +2286,12 @@ const BllbModalComponent = props =&gt; { @@ -2274,12 +2286,12 @@ const BllbModalComponent = props =&gt; {
2274 <Col flex={"40px"}> 2286 <Col flex={"40px"}>
2275 <div className="redDot" /> 2287 <div className="redDot" />
2276 </Col> 2288 </Col>
2277 - <Col flex={"160px"}>OK合格</Col>  
2278 - <Col flex={"160px"}>合格</Col> 2289 + <Col flex={"160px"}>{OKQualified}</Col>
  2290 + <Col flex={"160px"}>{qualified}</Col>
2279 <Col flex={1}> 2291 <Col flex={1}>
2280 <Input size="large" value={restQty} disabled /> 2292 <Input size="large" value={restQty} disabled />
2281 </Col> 2293 </Col>
2282 - <Col flex={"50px"}></Col> 2294 + <Col flex={"50px"}>Piece</Col>
2283 </Row> 2295 </Row>
2284 {data.map((rowData, index) => { 2296 {data.map((rowData, index) => {
2285 const { sId: lineId } = rowData; 2297 const { sId: lineId } = rowData;
@@ -2325,7 +2337,7 @@ const BllbModalComponent = props =&gt; { @@ -2325,7 +2337,7 @@ const BllbModalComponent = props =&gt; {
2325 <Col flex={"160px"} style={{ maxWidth: "160px" }}> 2337 <Col flex={"160px"} style={{ maxWidth: "160px" }}>
2326 <Select 2338 <Select
2327 showSearch 2339 showSearch
2328 - placeholder="不良大类" 2340 + placeholder={majorCategory}
2329 border={false} 2341 border={false}
2330 size="large" 2342 size="large"
2331 style={{ width: "100%" }} 2343 style={{ width: "100%" }}
@@ -2376,7 +2388,7 @@ const BllbModalComponent = props =&gt; { @@ -2376,7 +2388,7 @@ const BllbModalComponent = props =&gt; {
2376 <Col flex={"160px"} style={{ maxWidth: "160px" }}> 2388 <Col flex={"160px"} style={{ maxWidth: "160px" }}>
2377 <Select 2389 <Select
2378 showSearch 2390 showSearch
2379 - placeholder="不良小类" 2391 + placeholder={defectiveSubcategory}
2380 border={false} 2392 border={false}
2381 size="large" 2393 size="large"
2382 style={{ width: "100%" }} 2394 style={{ width: "100%" }}
@@ -2456,7 +2468,7 @@ const BllbModalComponent = props =&gt; { @@ -2456,7 +2468,7 @@ const BllbModalComponent = props =&gt; {
2456 }} 2468 }}
2457 /> 2469 />
2458 </Col> 2470 </Col>
2459 - <Col flex={"50px"}></Col> 2471 + <Col flex={"50px"}>Piece</Col>
2460 </Row> 2472 </Row>
2461 ); 2473 );
2462 })} 2474 })}
src/mes/productionExec/productionExecMain/index.less
@@ -335,13 +335,14 @@ @@ -335,13 +335,14 @@
335 top: 0; 335 top: 0;
336 .size(120px, 100%); 336 .size(120px, 100%);
337 .flex(center); 337 .flex(center);
338 - font-size: 18px; 338 + font-size: 14px;
339 border-left: 1px solid #AAA; 339 border-left: 1px solid #AAA;
340 padding: 0 0 0 5px; 340 padding: 0 0 0 5px;
341 cursor: default; 341 cursor: default;
342 342
343 span[role="img"] { 343 span[role="img"] {
344 color: #1890FF; 344 color: #1890FF;
  345 +
345 } 346 }
346 347
347 .ant-btn-icon-only[disabled] { 348 .ant-btn-icon-only[disabled] {
@@ -592,4 +593,4 @@ @@ -592,4 +593,4 @@
592 .flex(center, center); 593 .flex(center, center);
593 } 594 }
594 } 595 }
595 -}  
596 \ No newline at end of file 596 \ No newline at end of file
  597 +}