src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
@@ -228,7 +228,7 @@
});
// 打开弹框
const openDialog = async (type, row) => {
const openDialog = async (type, row, defaultCheckResult = "") => {
  operationType.value = type;
  getOptions().then((res) => {
    supplierList.value = res.data;
@@ -241,7 +241,7 @@
    console.error("加载检验员列表失败", e);
    userList.value = [];
  }
  // 先重置表单数据(保持字段完整,避免弹窗首次渲染时触发必填红框“闪一下”)
  // 先重置表单数据(保持字段完整,避免弹窗首次渲染时触发必填红框"闪一下")
   form.value = {
    checkTime: "",
    supplier: "",
@@ -254,7 +254,7 @@
    unit: "",
    quantity: "",
    checkCompany: "",
    checkResult: "",
    checkResult: defaultCheckResult || "",
  }
  testStandardOptions.value = [];
  tableData.value = [];
@@ -264,6 +264,10 @@
    // 先保存 testStandardId,避免被清空
    const savedTestStandardId = row.testStandardId;
    form.value = {...row}
    // 如果传入了默认检测结果,覆盖row中的值
    if (defaultCheckResult) {
      form.value.checkResult = defaultCheckResult;
    }
    currentProductId.value = row.productId || 0
    // 关键:编辑时加载规格型号下拉选项,才能反显 productModelId
    if (currentProductId.value) {