src/views/qualityManagement/finalInspection/components/formDia.vue
@@ -114,7 +114,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>
@@ -134,6 +134,7 @@
const emit = defineEmits(['close'])
const dialogFormVisible = ref(false);
const submitting = ref(false);
const operationType = ref('')
const data = reactive({
  form: {
@@ -343,6 +344,9 @@
}
// 提交产品表单
const submitForm = () => {
  if (submitting.value) {
    return;
  }
  proxy.$refs.formRef.validate(valid => {
    if (valid) {
      form.value.inspectType = 2
@@ -352,15 +356,20 @@
            })
         }
         const data = {...form.value, 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;
        })
      }
    }