The file /home/project/src/pages/purchaser/WarehouseManage.tsx has been updated. Made 1 replacement.

Here's the result of running `cat -n` on a snippet of the edited file:
 182→      alert(`产品码 "${productData.fabric_code}" 已存在，请使用其他产品码`);
 183→      return;
 184→    }
 185→
 186→    // 校验2：色号在"成品名称-克重-颜色"组合中唯一
 187→    // 即：同一个"成品名称-克重-颜色"下，色号不能重复
 188→    const { data: existingColorCode } = await supabase
 189→      .from('products')
 190→      .select('id, fabric_code, color_code')
 191→      .eq('company_id', auth.company.id)
 192→      .eq('product_name', productData.product_name)
 193→      .eq('total_weight', productData.total_weight || 0)
 194→      .eq('color', productData.color)
 195→      .neq('id', editingProduct?.id || '00000000-0000-0000-0000-000000000000')
 196→      .maybeSingle();
 197→
 198→    if (existingColorCode) {
 199→      alert(`"${productData.product_name}-${productData.total_weight}g-${productData.color}" 组合中已存在色号 "${existingColorCode.color_code}"，请使用其他色号`);
 200→      return;
 201→    }
 202→
 203→    let productId: string;
 204→
 205→    if (editingProduct) {
 206→      // 更新产品