diff --git a/src/components/Common/CommonHooks/useCommonBase.js b/src/components/Common/CommonHooks/useCommonBase.js index 7274af1..248a827 100644 --- a/src/components/Common/CommonHooks/useCommonBase.js +++ b/src/components/Common/CommonHooks/useCommonBase.js @@ -2393,6 +2393,8 @@ const useCommonBase = props => { } } + console.log('3333', result); + return result; }; diff --git a/src/mes/common/buttonComponent/index.js b/src/mes/common/buttonComponent/index.js index 725fb5e..28c98d0 100644 --- a/src/mes/common/buttonComponent/index.js +++ b/src/mes/common/buttonComponent/index.js @@ -104,14 +104,14 @@ const ButtonComponent = props => { const newList = btnList .filter( item => - item.sName && + item.sName?.trim() && !item.sName.includes("Modal") && - item.sMenuName !== "工单物料信息" + ( item.sMenuName !== "工单物料信息" || item.sMenuName !== "Work Order Material Information") ) .map(item => { const { sId, sMenuName, sName } = item; return { - name: sMenuName, + name: sMenuName?.trim(), id: sId, sName, badeg: 0, @@ -134,6 +134,27 @@ const ButtonComponent = props => { }, [JSON.stringify(managementData)] ); + const language = props.app.userinfo?.sLanguage; + + const menuOrderListEnglish1 = [ + ["Machine Task", 1], + null, + ["Label Reprint", 2], + null, + ["Work Order Information", 2, 'Label Reprint'], + ["Product Quality Record", 3, 'Label Reprint'], + ["Process Work Instructions", 4, 'Label Reprint'], + ["Related Documents", 5, 'Label Reprint'], + ["Historical Tasks", 6, 'Label Reprint'], + ["Production Rework", 2, 'Label Reprint'], + null, + null, + // ["工单物料信息", 7], + ["Pre-production Reminder Information", 7, 'Label Reprint'], + ["Work Order WIP List", 8, 'Label Reprint'], + null, + null + ]; const menuOrderList1 = [ ["机台任务", 1], @@ -174,6 +195,25 @@ const ButtonComponent = props => { ["工艺巡检", 20] ]; + const menuOrderListEnglish2 = [ + ["Production Execution", 10], + ["First Approval Sample Notice", 11], + ["Exception/Assistance Reporting", 12], + ["Completion & Clearance", 13], + ["Plate Splitting/Combining", 14], + null, + null, + ["Quality Patrol Inspection List", 15], + ["Team Production Reporting", 16], + ["Sign-off/Completion", 17], + ["Team Handover", 18], + ["Work Order Change Information", 19], + ["Other Machine Daily Report", 16], + null, + null, + ["Process Inspection", 20] + ]; + const menuOrderList3 = [ ["设备保养", 21], ["设备点检", 22], @@ -181,17 +221,30 @@ const ButtonComponent = props => { ["设备资料", 24] ]; + const menuOrderListEnglish3 = [ + ["Equipment Maintenance", 21], + ["Equipment Check", 22], + ["Equipment Repair", 23], + ["Equipment Documentation", 24] + ]; + + const menuOrderListLocal1 = language === 'sEnglish' ? menuOrderListEnglish1 : menuOrderList1; + + const menuOrderListLocal2 = language === 'sEnglish' ? menuOrderListEnglish2 : menuOrderList2; + + const menuOrderListLocal3 = language === 'sEnglish' ? menuOrderListEnglish3 : menuOrderList3; + const menuList = []; new Array(16).fill("").forEach((_, index) => { const itemName = [ - menuOrderList1[index]?.[0], - menuOrderList2[index]?.[0], - menuOrderList3[index]?.[0] + menuOrderListLocal1[index]?.[0], + menuOrderListLocal2[index]?.[0], + menuOrderListLocal3[index]?.[0] ]; const icon = [ - menuOrderList1[index]?.[1], - menuOrderList2[index]?.[1], - menuOrderList3[index]?.[1] + menuOrderListLocal1[index]?.[1], + menuOrderListLocal2[index]?.[1], + menuOrderListLocal3[index]?.[1] ]; const item = dataList.find(item => itemName.includes(item.name)); let result = ""; @@ -217,7 +270,7 @@ const ButtonComponent = props => { const { id, disabled, sName } = e; if (id == sModelsId || disabled) return; - if (e.name !== "首签样通知") { + if (e.name !== "首签样通知" || e.name !== "First Approval Sample Notice") { props.onChangeRouter({ routerPath: [currentContent], sModelsId: id, @@ -243,7 +296,9 @@ const ButtonComponent = props => { let bHideTab = false; // 【踢废,拼接,倒卷,读码】完工清场记录不可点击 - if ([5, 6, 7, 8].includes(iInterface) && e.name === "完工清场/确认") { + if ([5, 6, 7, 8].includes(iInterface) && ( + e.name === "完工清场/确认" || e.name ==='Post-Completion Clearance/Confirmation' + )) { bHideTab = true; } @@ -253,7 +308,8 @@ const ButtonComponent = props => { if ( props.currentContent === "productionExec" && !bStartWork && - !["生产执行", "班组报工", "其它机台日报"].includes(e.name) + ( !["生产执行", "班组报工", "其它机台日报"].includes(e.name) || + !["Production Execution", "Team Production Reporting ", "Other Machine Daily Report"].includes(e.name) ) ) { bStartWorkLimit = true; } @@ -265,13 +321,13 @@ const ButtonComponent = props => { } let count = e.disabled ? 0 : e.badeg; - if (e.name === "机台任务") { + if (e.name === "机台任务" || e.name ==='Machine Task') { count = table0; - } else if (e.name === "历史任务") { + } else if (e.name === "历史任务" || e.name ==='Historical Tasks') { count = table1; - } else if (e.name === "工序任务") { + } else if (e.name === "工序任务" || e.name ==='Process Task') { count = table2; - } else if (e.name === "其它机台日报") { + } else if (e.name === "其它机台日报" || e.name === "Other Machine Daily Report") { count = table3; } const workFirst = commonFunc.showLocalMessage(props, 'workFirst', '请先上班后再操作'); @@ -327,7 +383,7 @@ const ButtonComponent = props => { ); }; - console.log(menuList, '1menuList '); + console.log(menuList, '1menuLis111t '); return (
{ const { tabConfig = [], level, modelStyle, app } = props; const { userinfo } = app; const sLanguage = userinfo.sLanguage; + console.log('vvv', sLanguage); const getComponent = (config, index = 0) => { const { sName, @@ -1280,11 +1281,13 @@ const CommonModelComponent = props => { sEntireTabName, sEnglishEntireTabName, sBig5EntireTabName, + sEnglishTabName, mode, width = "100%", height = "100%" } = item; - const sEntireTabNameNew = sLanguage === 'sEnglish' ? sEnglishEntireTabName : + console.log('ssconfigLists', configList); + const sEntireTabNameNew = sLanguage === 'sEnglish' ? sEnglishEntireTabName + '1111' : sLanguage === 'sBig5EntireTabName' ? sBig5EntireTabName : sEntireTabName; const advancedStyle = mode === "advanced" @@ -1381,10 +1384,13 @@ const CommonModelComponent = props => { ) .map((config, index) => { const { sName, sEnglishTabName, sBig5TabName, sTabName } = config; - const sTabNewName = sLanguage ==='sEnglish' ? sEnglishTabName : sLanguage ==='sBig5' ? + console.log('32323', config, sLanguage); + const sTabNewName = sLanguage === 'sEnglish' ? sEnglishTabName : sLanguage ==='sBig5' ? sBig5TabName : sTabName; let disabled = false; + console.log('32323', sTabNewName); + if (sTabName === "拼接列表" && sName === "slaveWypj3") { // 特殊处理:拼接详情可保存时,拼接列表tab不可点击 disabled = @@ -1476,7 +1482,7 @@ const TabTitleComponent = props => { // 表单组件 const CommonViewTableComponent = props => { - const { sTabName, showType, sName } = props; + const { sTabName, showType, sName, sEnglishTabName, } = props; if (showType !== "form") return ""; const { @@ -1551,7 +1557,11 @@ const CommonViewTableComponent = props => { } } - const groupList = sTabName.split(","); + const sLanguage = props.app.userinfo?.sLanguage; + + const sTabLocalName = sLanguage === 'sEnglish' ? sEnglishTabName : sTabName; + + const groupList = sTabLocalName?.split(",") || []; const viewConfigsList = groupList.map((tabName, index) => { if (tabName === "隐藏") { return []; diff --git a/src/mes/scheduledTasks/machineTasks/index.js b/src/mes/scheduledTasks/machineTasks/index.js index d7e2ecb..011353a 100644 --- a/src/mes/scheduledTasks/machineTasks/index.js +++ b/src/mes/scheduledTasks/machineTasks/index.js @@ -340,17 +340,24 @@ }; const itemClickRef = useRef(); + const finishConstruction = commonFunc.showLocalMessage(props, 'finishConstruction', '完工'); + const confirmCompletion = commonFunc.showLocalMessage(props, 'confirmCompletion', '确认完工'); + const FriendlyReminder = commonFunc.showLocalMessage(props, 'FriendlyReminder', '温馨提示'); + const btnSure = commonFunc.showLocalMessage(props, 'BtnSure', '确认'); + const btnCancel = commonFunc.showLocalMessage(props, 'BtnCancel', '取消'); + const pause = commonFunc.showLocalMessage(props, 'pause', '暂停'); + const pausingReason = commonFunc.showLocalMessage(props, 'pausingReason', '请选择暂停原因'); // 开工、暂停事件 const handleTableBtnClick = async item => { const { tableName, index, record, tableData, config, iFlag } = item; - const { showName } = config; - if (showName === "完工") { + const { showName, sChinese } = config; + if (sChinese === "完工") { Modal.confirm({ - title: "温馨提示:", - content:
确认完工?
, - okText: "确认", - cancelText: "取消", + title: FriendlyReminder, + content:
{confirmCompletion}?
, + okText: btnSure, + cancelText: btnCancel, onOk() { handleUpdateProductionplan({ item, iFlag: 4 }); } @@ -365,10 +372,10 @@ if (tableData.length === 1) { const result = await new Promise(resolve => { Modal.confirm({ - title: "温馨提示:", + title: FriendlyReminder, content:
请选择要变更的状态
, - okText: "完工", - cancelText: "暂停", + okText: finishConstruction, + cancelText: pause, onOk() { resolve(true); }, @@ -387,7 +394,7 @@ // 开工中,走暂停接口 props.onSaveState({ taskConfirmModalVisible: true, - taskConfirmModalMsg: "请选择暂停原因", + taskConfirmModalMsg: pausingReason, tempTaskId: record.sId, bPauseOnly: true, pauseCallback: pauseValue => {