Commit da5a20a781a7654e37b7ee252abd9e781789f790
1 parent
a41bfe08
1.完善MES英文翻译
Showing
3 changed files
with
22 additions
and
14 deletions
src/mes/common/buttonComponent/index.js
| @@ -274,25 +274,29 @@ const ButtonComponent = props => { | @@ -274,25 +274,29 @@ const ButtonComponent = props => { | ||
| 274 | } else if (e.name === "其它机台日报") { | 274 | } else if (e.name === "其它机台日报") { |
| 275 | count = table3; | 275 | count = table3; |
| 276 | } | 276 | } |
| 277 | - const workFirst = commonFunc.showLocalMessage(props, 'workFirst!', '请先上班后再操作'); | 277 | + const workFirst = commonFunc.showLocalMessage(props, 'workFirst', '请先上班后再操作'); |
| 278 | + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示'); | ||
| 279 | + const BtnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认'); | ||
| 280 | + const NotAllowedBoards = commonFunc.showLocalMessage(props, 'NotAllowedBoards', '当前工序不允许拆合板!'); | ||
| 281 | + | ||
| 278 | return ( | 282 | return ( |
| 279 | <div | 283 | <div |
| 280 | key={e.id} | 284 | key={e.id} |
| 281 | onClick={() => { | 285 | onClick={() => { |
| 282 | if (bStartWorkLimit) { | 286 | if (bStartWorkLimit) { |
| 283 | Modal.warning({ | 287 | Modal.warning({ |
| 284 | - title: "温馨提示:", | 288 | + title: FriendlyReminder, |
| 285 | content: <div>{workFirst}</div>, | 289 | content: <div>{workFirst}</div>, |
| 286 | - okText: "确认" | 290 | + okText: BtnSure |
| 287 | }); | 291 | }); |
| 288 | return; | 292 | return; |
| 289 | } | 293 | } |
| 290 | 294 | ||
| 291 | if (bChaihebanLimit) { | 295 | if (bChaihebanLimit) { |
| 292 | Modal.warning({ | 296 | Modal.warning({ |
| 293 | - title: "温馨提示:", | ||
| 294 | - content: <div>当前工序不允许拆合板!</div>, | ||
| 295 | - okText: "确认" | 297 | + title: FriendlyReminder, |
| 298 | + content: <div>{NotAllowedBoards}</div>, | ||
| 299 | + okText: BtnSure | ||
| 296 | }); | 300 | }); |
| 297 | return; | 301 | return; |
| 298 | } | 302 | } |
src/mes/common/commonModelComponent/index.js
| @@ -1726,16 +1726,20 @@ const CommonTableComponent = props => { | @@ -1726,16 +1726,20 @@ const CommonTableComponent = props => { | ||
| 1726 | const handleTableBtnClick = async item => { | 1726 | const handleTableBtnClick = async item => { |
| 1727 | const { record, tableData } = item; | 1727 | const { record, tableData } = item; |
| 1728 | const { iStar, bOKStartWorking } = record; | 1728 | const { iStar, bOKStartWorking } = record; |
| 1729 | - | 1729 | + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示'); |
| 1730 | + const selectStatus = commonFunc.showLocalMessage(props, 'selectStatus', '请选择要变更的状态'); | ||
| 1731 | + const finishConstruction = commonFunc.showLocalMessage(props, 'finishConstruction', '完工'); | ||
| 1732 | + const pause = commonFunc.showLocalMessage(props, 'pause', '暂停'); | ||
| 1733 | + const productionCanotResumed = commonFunc.showLocalMessage(props, 'productionCanotResumed', '存在开工任务,无法恢复生产'); | ||
| 1730 | if (iStar === 1) { | 1734 | if (iStar === 1) { |
| 1731 | // 如果只剩一条数据,询问是暂停还是完工 | 1735 | // 如果只剩一条数据,询问是暂停还是完工 |
| 1732 | if (tableData.length === 1) { | 1736 | if (tableData.length === 1) { |
| 1733 | const result = await new Promise(resolve => { | 1737 | const result = await new Promise(resolve => { |
| 1734 | Modal.confirm({ | 1738 | Modal.confirm({ |
| 1735 | - title: "温馨提示:", | ||
| 1736 | - content: <div>请选择要变更的状态</div>, | ||
| 1737 | - okText: "完工", | ||
| 1738 | - cancelText: "暂停", | 1739 | + title: FriendlyReminder, |
| 1740 | + content: <div>{selectStatus}</div>, | ||
| 1741 | + okText: finishConstruction, | ||
| 1742 | + cancelText: pause, | ||
| 1739 | onOk() { | 1743 | onOk() { |
| 1740 | resolve(true); | 1744 | resolve(true); |
| 1741 | }, | 1745 | }, |
| @@ -1756,7 +1760,7 @@ const CommonTableComponent = props => { | @@ -1756,7 +1760,7 @@ const CommonTableComponent = props => { | ||
| 1756 | } else if (iStar === 2 || iStar === 3 || iStar === 4) { | 1760 | } else if (iStar === 2 || iStar === 3 || iStar === 4) { |
| 1757 | // 暂停中,走开工、完工接口 | 1761 | // 暂停中,走开工、完工接口 |
| 1758 | if (bOKStartWorking === 1) { | 1762 | if (bOKStartWorking === 1) { |
| 1759 | - return message.error("存在开工任务,无法恢复生产", 3); | 1763 | + return message.error(productionCanotResumed, 3); |
| 1760 | } | 1764 | } |
| 1761 | const dataReturn = await props.handleStartWork(item); | 1765 | const dataReturn = await props.handleStartWork(item); |
| 1762 | const { code, msg } = dataReturn; | 1766 | const { code, msg } = dataReturn; |
src/mes/login/index.js
| @@ -142,8 +142,8 @@ const useLoginEvent = props => { | @@ -142,8 +142,8 @@ const useLoginEvent = props => { | ||
| 142 | // 新增方法:根据sName过滤configs | 142 | // 新增方法:根据sName过滤configs |
| 143 | const getConfigByName = (name, configs, sLanguage) => { | 143 | const getConfigByName = (name, configs, sLanguage) => { |
| 144 | const configObj = configs.find(item => item.sName === name); | 144 | const configObj = configs.find(item => item.sName === name); |
| 145 | - const showName = sLanguage === 'sChinese' ? configObj.sChinese : sLanguage ==='sEnglish' ? configObj.sEnglish : | ||
| 146 | - sLanguage === 'sBig5' ? configObj.sBig5 : configObj.sChinese; | 145 | + const showName = sLanguage === 'sChinese' ? configObj?.sChinese : sLanguage ==='sEnglish' ? configObj?.sEnglish : |
| 146 | + sLanguage === 'sBig5' ? configObj?.sBig5 : configObj?.sChinese; | ||
| 147 | return showName; | 147 | return showName; |
| 148 | }; | 148 | }; |
| 149 | const sLanguage = commonUtils.isNotEmptyArr(companys) ? companys[0].sLanguage : 'sEnglish'; | 149 | const sLanguage = commonUtils.isNotEmptyArr(companys) ? companys[0].sLanguage : 'sEnglish'; |