Commit 1fb9e7c3c74342ad5696f409f70e4065613d9f34
1 parent
1d49b31a
生产执行给表格第一行品检 和糊盒赋值
Showing
1 changed file
with
22 additions
and
0 deletions
src/mes/productionExec/productionExecMain/index.js
| ... | ... | @@ -1074,7 +1074,29 @@ const ProductionExecContent0 = props => { |
| 1074 | 1074 | if (!oNavList) return; |
| 1075 | 1075 | oNavList.childNodes[index].click(); |
| 1076 | 1076 | }; |
| 1077 | + const { | |
| 1078 | + deviceTargetInfoConfig = {}, | |
| 1079 | + changeExecInfo = {}, | |
| 1077 | 1080 | |
| 1081 | + } = props; | |
| 1082 | + const viewRowOld = {...workOrderInfoData[0], ...changeExecInfo,}; | |
| 1083 | + | |
| 1084 | + const newTableProps = { | |
| 1085 | + ...tableProps, | |
| 1086 | + data: tableProps.data.map((item, index) => { | |
| 1087 | + if (index === 0) { | |
| 1088 | + // 只修改第一行 | |
| 1089 | + return { | |
| 1090 | + ...item, | |
| 1091 | + dReportQty: viewRowOld.dReportQty || 0, | |
| 1092 | + dPieceDefectAQty: viewRowOld.dPieceDefectAQty || 0, | |
| 1093 | + dPieceDefectBQty: viewRowOld.dPieceDefectBQty || 0, | |
| 1094 | + }; | |
| 1095 | + } | |
| 1096 | + // 其他行原样返回 | |
| 1097 | + return item; | |
| 1098 | + }) | |
| 1099 | + } | |
| 1078 | 1100 | return ( |
| 1079 | 1101 | <div className={styles.type1}> |
| 1080 | 1102 | <div className="topPart"> | ... | ... |