diff --git a/src/mes/scheduledTasks/machineTasks/index.js b/src/mes/scheduledTasks/machineTasks/index.js index 8384324..d7e2ecb 100644 --- a/src/mes/scheduledTasks/machineTasks/index.js +++ b/src/mes/scheduledTasks/machineTasks/index.js @@ -508,6 +508,9 @@ slave0Config?.gdsconfigformslave?.find( item => item.sControlName === "BtnTableCopyTo.pauseWork" ) || {}; + const beginConstruction = commonFunc.showLocalMessage(props, 'beginConstruction', '开工'); + const finishConstruction = commonFunc.showLocalMessage(props, 'finishConstruction', '完工'); + const pause = commonFunc.showLocalMessage(props, 'pause', '暂停'); // 表格业务 const [sSrcNo, setSSrcNo] = useState(""); @@ -533,13 +536,13 @@ let showName, btnBgColor, sDefault; if (iStar === 1) { - showName = "暂停"; + showName = pause; btnBgColor = "#FAAD14"; } else if (iStar === 2 || iStar === 3) { - showName = "开工"; + showName = beginConstruction; btnBgColor = "#1890FF"; } else { - showName = "完工"; + showName = finishConstruction; btnBgColor = "#AAA"; sDefault = "${false}"; } diff --git a/src/mes/scheduledTasks/prenatalReminderInfo/index.js b/src/mes/scheduledTasks/prenatalReminderInfo/index.js index 97aaed4..d79e424 100644 --- a/src/mes/scheduledTasks/prenatalReminderInfo/index.js +++ b/src/mes/scheduledTasks/prenatalReminderInfo/index.js @@ -5,7 +5,41 @@ import useCommonBase from "@/components/Common/CommonHooks/useCommonBase"; import ShowType from "@/components/Common/CommonComponent"; import styles from "./index.less"; - +const titleTranslations = { + sChinese: { + '技术评审汇签': '技术评审汇签', + '客户投诉': '客户投诉', + '本批生产注意事项': '本批生产注意事项', + '不合格报告': '不合格报告', + '车间产前提醒(品管)': '车间产前提醒(品管)', + '制程异常': '制程异常', + '质检反馈': '质检反馈', + '二维码提醒': '二维码提醒', + '车间产前提醒': '车间产前提醒' + }, + sEnglish: { + '技术评审汇签': 'Technical Review', + '客户投诉': 'Customer Complaint', + '本批生产注意事项': 'Production Notes', + '不合格报告': 'Nonconformance Report', + '车间产前提醒(品管)': 'Pre-production Reminder(QC)', + '制程异常': 'Process Exception', + '质检反馈': 'Quality Feedback', + '二维码提醒': 'QR Code Reminder', + '车间产前提醒': 'Pre-production Reminder' + }, + sBig5: { + '技术评审汇签': '技術評審匯簽', + '客户投诉': '客戶投訴', + '本批生产注意事项': '本批生產注意事項', + '不合格报告': '不合格報告', + '车间产前提醒(品管)': '車間產前提醒(品管)', + '制程异常': '製程異常', + '质检反馈': '質檢反饋', + '二维码提醒': '二維碼提醒', + '车间产前提醒': '車間產前提醒' + } +}; const usePrenatalReminderInfoEvent = props => { const { formData } = props; @@ -60,7 +94,11 @@ const usePrenatalReminderInfoEvent = props => { ...props }; }; - +// 封装多语言处理方法 +const getTranslatedTitle = (app, originalTitle) => { + const language = app?.userinfo?.sLanguage || 'sChinese'; + return titleTranslations[language]?.[originalTitle] || originalTitle; +}; const PrenatalReminderInfo = baseProps => { const props = usePrenatalReminderInfoEvent(useCommonBase(baseProps)); const { bFinish } = props; @@ -97,6 +135,8 @@ const PrenatalReminderInfo = baseProps => { "二维码提醒", "车间产前提醒" ].map((title, index) => { + const translatedTitle = getTranslatedTitle(app, title); + let dataValueNew = ""; const child = { sId: commonUtils.createSid(), @@ -192,7 +232,7 @@ const PrenatalReminderInfo = baseProps => { return (