src/views/qualityManagement/processInspection/components/formDia.vue
@@ -123,7 +123,7 @@
         </PIMTable>
      <template #footer>
        <div class="dialog-footer">
          <el-button type="primary" @click="submitForm">确认</el-button>
          <el-button type="primary" :loading="submitting" @click="submitForm">确认</el-button>
          <el-button @click="closeDia">取消</el-button>
        </div>
      </template>
@@ -146,6 +146,7 @@
const dialogFormVisible = ref(false);
const submitting = ref(false);
const operationType = ref('')
const data = reactive({
  form: {
@@ -373,6 +374,9 @@
// 工序变化处理
// 提交产品表单
const submitForm = () => {
  if (submitting.value) {
    return;
  }
  proxy.$refs.formRef.validate(valid => {
    if (valid) {
      form.value.inspectType = 1
@@ -387,15 +391,20 @@
            process: processName, // 保留 process 字段以兼容后端
            qualityInspectParams: tableData.value
         }
      submitting.value = true;
      if (operationType.value === "add") {
        qualityInspectAdd(data).then(res => {
          proxy.$modal.msgSuccess("提交成功");
          closeDia();
        }).catch(() => {}).finally(() => {
          submitting.value = false;
        })
      } else {
        qualityInspectUpdate(data).then(res => {
          proxy.$modal.msgSuccess("提交成功");
          closeDia();
        }).catch(() => {}).finally(() => {
          submitting.value = false;
        })
      }
    }