Commit dc9ce73fa622e7eee7964ed88ee480674b920227
1 parent
28480e2b
1.去掉工艺巡检
2.去掉生产返工
Showing
1 changed file
with
17 additions
and
8 deletions
src/mes/common/buttonComponent/index.js
| @@ -158,7 +158,7 @@ const ButtonComponent = props => { | @@ -158,7 +158,7 @@ const ButtonComponent = props => { | ||
| 158 | ["Process Work Instructions", 4, 'Label Reprint'], | 158 | ["Process Work Instructions", 4, 'Label Reprint'], |
| 159 | ["Related Documents", 5, 'Label Reprint'], | 159 | ["Related Documents", 5, 'Label Reprint'], |
| 160 | ["Historical Tasks", 6, 'Label Reprint'], | 160 | ["Historical Tasks", 6, 'Label Reprint'], |
| 161 | - ["Production Rework", 2, 'Label Reprint'], | 161 | + // ["Production Rework", 2, 'Label Reprint'], |
| 162 | // null, | 162 | // null, |
| 163 | // null, | 163 | // null, |
| 164 | // ["工单物料信息", 7], | 164 | // ["工单物料信息", 7], |
| @@ -178,7 +178,7 @@ const ButtonComponent = props => { | @@ -178,7 +178,7 @@ const ButtonComponent = props => { | ||
| 178 | ["工艺作业指导书", 4], | 178 | ["工艺作业指导书", 4], |
| 179 | ["相关文档", 5], | 179 | ["相关文档", 5], |
| 180 | ["历史任务", 6], | 180 | ["历史任务", 6], |
| 181 | - ["生产返工", 2], | 181 | + // ["生产返工", 2], |
| 182 | // null, | 182 | // null, |
| 183 | // null, | 183 | // null, |
| 184 | // ["工单物料信息", 7], | 184 | // ["工单物料信息", 7], |
| @@ -202,10 +202,10 @@ const ButtonComponent = props => { | @@ -202,10 +202,10 @@ const ButtonComponent = props => { | ||
| 202 | // ["班组交接", 18], | 202 | // ["班组交接", 18], |
| 203 | ["工单变更信息", 19], | 203 | ["工单变更信息", 19], |
| 204 | 204 | ||
| 205 | - ["班组报工", 16], | 205 | + ["班组报工", 16] |
| 206 | // null, | 206 | // null, |
| 207 | // null, | 207 | // null, |
| 208 | - ["工艺巡检", 20] | 208 | + // ["工艺巡检", 20] |
| 209 | ]; | 209 | ]; |
| 210 | 210 | ||
| 211 | const menuOrderListEnglish2 = [ | 211 | const menuOrderListEnglish2 = [ |
| @@ -221,10 +221,10 @@ const ButtonComponent = props => { | @@ -221,10 +221,10 @@ const ButtonComponent = props => { | ||
| 221 | ["Sign-off/Completion", 17], | 221 | ["Sign-off/Completion", 17], |
| 222 | // ["Team Handover", 18], | 222 | // ["Team Handover", 18], |
| 223 | ["Work Order Change Information", 19], | 223 | ["Work Order Change Information", 19], |
| 224 | - ["Team Production Reporting", 16], | 224 | + ["Team Production Reporting", 16] |
| 225 | // null, | 225 | // null, |
| 226 | // null, | 226 | // null, |
| 227 | - ["Process Inspection", 20] | 227 | + // ["Process Inspection", 20] |
| 228 | ]; | 228 | ]; |
| 229 | 229 | ||
| 230 | const menuOrderList3 = [ | 230 | const menuOrderList3 = [ |
| @@ -282,9 +282,18 @@ const ButtonComponent = props => { | @@ -282,9 +282,18 @@ const ButtonComponent = props => { | ||
| 282 | }); | 282 | }); |
| 283 | 283 | ||
| 284 | dataList.forEach(item => { | 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 | const iIndex = menuList.findIndex(item1 => !item1); | 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 |