2026-06-11 ac02e562a1dadfa2a0f7b8e6f2d0a066522d7d3b
src/views/productionManagement/productionOrder/components/PurchaseRequestDialog.vue
@@ -144,11 +144,12 @@
  form.value.ccUserName = "";
  // 将库存不足的产品填充到表格
  // 兼容领料和补料的数据结构
  tableData.value = props.insufficientItems.map((item) => ({
    tempId: generateTempId(),
    productModelId: item.materialModelId,
    productName: item.materialName,
    model: item.materialModel,
    productModelId: item.materialModelId || item.productModelId,
    productName: item.materialName || item.productName,
    model: item.materialModel || item.model,
    unit: item.unit,
    quantity: Math.max(1, Math.ceil((item.demandedQuantity || 0) - (item.stockQuantity || 0))),
  }));