gaoluyang
3 天以前 ca8dfc8a7dd8ba9b84d9a58c3c2a6d52a0c98a74
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))),
  }));