| | |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="库位" min-width="180" align="center" prop="stockLocation"> |
| | | <template #default="{ row }"> |
| | | <el-input |
| | | v-model="row.stockLocation" |
| | | placeholder="请输入库位" |
| | | clearable |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="picking-footer-info"> |
| | | <span>已选 {{ inputSelectedRows.length }} 条</span> |
| | |
| | | <!-- 领料弹框 --> |
| | | <el-dialog v-model="pickingDialogVisible" |
| | | title="工单领料" |
| | | width="1200px" |
| | | width="70%" |
| | | :close-on-click-modal="false"> |
| | | |
| | | <el-table |
| | |
| | | size="small" |
| | | style="width: 160px" |
| | | @change="(val) => handlePickingQuantityChange(val, row)" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="库位" min-width="180" align="center" prop="stockLocation"> |
| | | <template #default="{ row }"> |
| | | <el-input |
| | | v-model="row.stockLocation" |
| | | placeholder="请输入库位" |
| | | clearable |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | inputTableData.value = res.data.records.map(item => ({ |
| | | ...item, |
| | | currentReturnQuantity: 0, |
| | | stockLocation: item.stockLocation || "", |
| | | })); |
| | | inputPage.total = res.data.total; |
| | | }) |
| | |
| | | pickingTableData.value = materials.map(item => ({ |
| | | ...item, |
| | | quantity: 0, |
| | | stockLocation: item.stockLocation || "", |
| | | unpickedQuantity: (item.demandedQuantity || 0) - (item.completedQuantity || 0), |
| | | })); |
| | | } catch (e) { |
| | |
| | | proxy.$modal.msgWarning(`${row.productName} 的领料数量必须大于0`); |
| | | return; |
| | | } |
| | | if (!row.stockLocation || !String(row.stockLocation).trim()) { |
| | | proxy.$modal.msgWarning(`${row.productName} 的库位不能为空`); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | // 提交领料数据 |
| | |
| | | productStructureRecordId: row.id, |
| | | productModelId: row.productModelId, |
| | | quantity: row.quantity, |
| | | stockLocation: String(row.stockLocation).trim(), |
| | | })); |
| | | await pickMaterial(pickData); |
| | | proxy.$modal.msgSuccess("领料成功"); |
| | |
| | | proxy.$modal.msgWarning("请填写本次退料数量"); |
| | | return; |
| | | } |
| | | const invalidLocationRows = inputSelectedRows.value.filter( |
| | | row => !row.stockLocation || !String(row.stockLocation).trim() |
| | | ); |
| | | if (invalidLocationRows.length > 0) { |
| | | proxy.$modal.msgWarning("请填写库位"); |
| | | return; |
| | | } |
| | | |
| | | const returnData = inputSelectedRows.value.map(row => ({ |
| | | ...row, |
| | | returnQuantity: row.currentReturnQuantity, |
| | | stockLocation: String(row.stockLocation).trim(), |
| | | })); |
| | | |
| | | try { |