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 (