From 8fb21c6343dcb703fb504fac6d5b2a0b7a584c36 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期六, 08 八月 2026 11:05:24 +0800
Subject: [PATCH] fix: 添加loading
---
src/views/productionManagement/workOrderManagement/index.vue | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/views/productionManagement/workOrderManagement/index.vue b/src/views/productionManagement/workOrderManagement/index.vue
index 1082f08..9a76761 100644
--- a/src/views/productionManagement/workOrderManagement/index.vue
+++ b/src/views/productionManagement/workOrderManagement/index.vue
@@ -172,6 +172,7 @@
<template #footer>
<span class="dialog-footer">
<el-button type="primary"
+ :loading="reportSubmitting"
@click="handleReport">纭畾</el-button>
<el-button @click="reportDialogVisible = false">鍙栨秷</el-button>
</span>
@@ -316,6 +317,7 @@
const transferCardQrUrl = ref("");
const transferCardRowData = ref(null);
const reportDialogVisible = ref(false);
+ const reportSubmitting = ref(false);
const workOrderFilesRef = ref(null);
const reportFormRef = ref(null);
const userOptions = ref([]);
@@ -575,6 +577,9 @@
};
const handleReport = () => {
+ if (reportSubmitting.value) {
+ return;
+ }
reportFormRef.value?.validate(valid => {
if (!valid) {
return false;
@@ -642,6 +647,8 @@
productMainId: reportForm.productMainId,
};
+ reportSubmitting.value = true;
+
addProductMain(params)
.then(res => {
proxy.$modal.msgSuccess("鎶ュ伐鎴愬姛");
@@ -652,6 +659,9 @@
// ElMessageBox.alert("鎶ュ伐澶辫触", "鎻愮ず", {
// confirmButtonText: "纭畾",
// });
+ })
+ .finally(() => {
+ reportSubmitting.value = false;
});
});
};
--
Gitblit v1.9.3