Commit 78e9e2f1c443016c8affd5cfa999c6fd7b54e480
1 parent
8f57504f
1.印品pom单据中添加的工序无法调整顺序,上下拖动都不生效,也无法修改序号
Showing
1 changed file
with
13 additions
and
1 deletions
src/components/Manufacture/CommonPackEvent.js
| @@ -1161,11 +1161,23 @@ const CommonPackEvent = props => { | @@ -1161,11 +1161,23 @@ const CommonPackEvent = props => { | ||
| 1161 | }); | 1161 | }); |
| 1162 | } | 1162 | } |
| 1163 | 1163 | ||
| 1164 | + const filterProductData = data.filter(item => item.sType === '3'); | ||
| 1165 | + | ||
| 1166 | + if (commonUtils.isNotEmptyArr(filterProductData)) { | ||
| 1167 | + filterProductData.forEach((item, iIndex) => { | ||
| 1168 | + item.iOrder = iIndex + 1; | ||
| 1169 | + const iFilterIndex = commonUtils.isNotEmptyArr(allData) ? allData.findIndex(row => item.sId === row.sId) : -1; | ||
| 1170 | + if (iFilterIndex > -1) { | ||
| 1171 | + allData[iFilterIndex] = { ...item, iOrder: iIndex + 20000 }; | ||
| 1172 | + } | ||
| 1173 | + }); | ||
| 1174 | + } | ||
| 1175 | + | ||
| 1164 | /* 找到所属控制表的iOrder * 10000 */ | 1176 | /* 找到所属控制表的iOrder * 10000 */ |
| 1165 | allData.forEach((item, iIndex) => { | 1177 | allData.forEach((item, iIndex) => { |
| 1166 | const iControlIndex = commonUtils.isNotEmptyArr(controlData) ? controlData.findIndex(row => item.sControlId === row.sId) : -1; | 1178 | const iControlIndex = commonUtils.isNotEmptyArr(controlData) ? controlData.findIndex(row => item.sControlId === row.sId) : -1; |
| 1167 | if (iControlIndex > -1) { | 1179 | if (iControlIndex > -1) { |
| 1168 | - const iControlOrder = controlData[iControlIndex].iOrder * 10000; | 1180 | + const iControlOrder = controlData[iControlIndex].iOrder * 100; |
| 1169 | allData[iIndex].iControlOrder = iControlOrder; | 1181 | allData[iIndex].iControlOrder = iControlOrder; |
| 1170 | allData[iIndex].iOrder = iControlOrder + item.iOrder; | 1182 | allData[iIndex].iOrder = iControlOrder + item.iOrder; |
| 1171 | } | 1183 | } |