Commit dc9ce73fa622e7eee7964ed88ee480674b920227

Authored by Min
1 parent 28480e2b

1.去掉工艺巡检

2.去掉生产返工
src/mes/common/buttonComponent/index.js
... ... @@ -158,7 +158,7 @@ const ButtonComponent = props => {
158 158 ["Process Work Instructions", 4, 'Label Reprint'],
159 159 ["Related Documents", 5, 'Label Reprint'],
160 160 ["Historical Tasks", 6, 'Label Reprint'],
161   - ["Production Rework", 2, 'Label Reprint'],
  161 + // ["Production Rework", 2, 'Label Reprint'],
162 162 // null,
163 163 // null,
164 164 // ["工单物料信息", 7],
... ... @@ -178,7 +178,7 @@ const ButtonComponent = props => {
178 178 ["工艺作业指导书", 4],
179 179 ["相关文档", 5],
180 180 ["历史任务", 6],
181   - ["生产返工", 2],
  181 + // ["生产返工", 2],
182 182 // null,
183 183 // null,
184 184 // ["工单物料信息", 7],
... ... @@ -202,10 +202,10 @@ const ButtonComponent = props => {
202 202 // ["班组交接", 18],
203 203 ["工单变更信息", 19],
204 204  
205   - ["班组报工", 16],
  205 + ["班组报工", 16]
206 206 // null,
207 207 // null,
208   - ["工艺巡检", 20]
  208 + // ["工艺巡检", 20]
209 209 ];
210 210  
211 211 const menuOrderListEnglish2 = [
... ... @@ -221,10 +221,10 @@ const ButtonComponent = props => {
221 221 ["Sign-off/Completion", 17],
222 222 // ["Team Handover", 18],
223 223 ["Work Order Change Information", 19],
224   - ["Team Production Reporting", 16],
  224 + ["Team Production Reporting", 16]
225 225 // null,
226 226 // null,
227   - ["Process Inspection", 20]
  227 + // ["Process Inspection", 20]
228 228 ];
229 229  
230 230 const menuOrderList3 = [
... ... @@ -282,9 +282,18 @@ const ButtonComponent = props => {
282 282 });
283 283  
284 284 dataList.forEach(item => {
285   - if (!menuList.some(item1 => item1.name === item.name)) {
  285 + // 增加一个条件:item.name 不能是那两个值
  286 + if (item.name !== 'Production Rework' &&
  287 + item.name !== 'Process Patrol Inspection' &&
  288 + !menuList.some(item1 => item1.name === item.name)) {
286 289 const iIndex = menuList.findIndex(item1 => !item1);
287   - menuList[iIndex] = item;
  290 + // 检查是否找到了可替换的位置
  291 + if (iIndex !== -1) {
  292 + menuList[iIndex] = item;
  293 + } else {
  294 + // 如果 menuList 中没有空位了,可以选择 push 到末尾或者做其他处理
  295 + // menuList.push(item);
  296 + }
288 297 }
289 298 });
290 299  
... ...