src/views/qualityManagement/processInspection/components/formDia.vue
@@ -33,7 +33,7 @@
        </el-row>
        <el-row :gutter="30">
          <el-col :span="12">
            <el-form-item label="规格型号:" prop="productModelId">
            <el-form-item label="尺寸:" prop="productModelId">
              <el-select v-model="form.productModelId" placeholder="请选择" clearable :disabled="operationType === 'edit'"
                         filterable readonly @change="handleChangeModel">
                <el-option v-for="item in modelOptions" :key="item.id" :label="item.model" :value="item.id" />
@@ -248,7 +248,7 @@
   }
   testStandardOptions.value = [];
   tableData.value = [];
   // 先确保产品树已加载,否则编辑时产品/规格型号无法反显
   // 先确保产品树已加载,否则编辑时产品/尺寸无法反显
   await getProductOptions();
   if (operationType.value === 'edit') {
      // 先保存 testStandardId,避免被清空
@@ -256,7 +256,7 @@
      // 先设置表单数据,但暂时清空 testStandardId,等选项加载完成后再设置
      form.value = {...row, testStandardId: ''}
      currentProductId.value = row.productId || 0
      // 关键:编辑时加载规格型号下拉选项,才能反显 productModelId
      // 关键:编辑时加载尺寸下拉选项,才能反显 productModelId
      if (currentProductId.value) {
         try {
            const res = await modelList({ id: currentProductId.value });
@@ -266,7 +266,7 @@
               handleChangeModel(form.value.productModelId);
            }
         } catch (e) {
            console.error("加载规格型号失败", e);
            console.error("加载尺寸失败", e);
            modelOptions.value = [];
         }
      }