| | |
| | | }, |
| | | { |
| | | label: "已下发数量", |
| | | prop: "assignedQuantity", |
| | | prop: "quantityIssued", |
| | | width: "120px", |
| | | className: "spec-cell", |
| | | // formatData: (cell, row) => (cell ? `${cell}${row.unit || "方"}` : 0), |
| | |
| | | }; |
| | | } |
| | | summary[category].totalAssignedQuantity += Number( |
| | | ( |
| | | Number(row.qtyRequired || 0) - Number(row.assignedQuantity || 0) |
| | | ).toFixed(4) |
| | | (Number(row.qtyRequired || 0) - Number(row.quantityIssued || 0)).toFixed( |
| | | 4 |
| | | ) |
| | | ); |
| | | }); |
| | | |
| | |
| | | // 判断行是否可选择 |
| | | const isSelectable = row => { |
| | | // 计算剩余数量 |
| | | const remainingQty = (row.qtyRequired || 0) - (row.assignedQuantity || 0); |
| | | const remainingQty = (row.qtyRequired || 0) - (row.quantityIssued || 0); |
| | | // 如果剩余数量小于等于0,禁止选择 |
| | | if (remainingQty <= 0) { |
| | | return false; |