From a7a6b5d7ed7b6e5b96866b24fd1cb7ba3dcc19d1 Mon Sep 17 00:00:00 2001
From: cy <1664593601@qq.com>
Date: 星期三, 22 十一月 2023 14:24:47 +0800
Subject: [PATCH] feat: 物品统计前后端

---
 admin-web/src/views/stock/transfer/transferApplication/index.vue |   24 +++++++++++++++++++-----
 1 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/admin-web/src/views/stock/transfer/transferApplication/index.vue b/admin-web/src/views/stock/transfer/transferApplication/index.vue
index 497b784..6720ce6 100644
--- a/admin-web/src/views/stock/transfer/transferApplication/index.vue
+++ b/admin-web/src/views/stock/transfer/transferApplication/index.vue
@@ -220,11 +220,25 @@
 
     // 鍏ュ簱
     handleIncome(row) {
-      this.$confirm(`鎮ㄧ‘瀹� 鍗曞彿锛�${row.businessFormCode}  鎺ユ敹鍏ュ簱鍚�?`, '鎺ユ敹鍏ュ簱').then(() => {
-        transfeIncome({ id: row.id }).then((res) => {
-          this.$message.success('鎺ユ敹鍏ュ簱鎴愬姛锛�');
-          this.search(1);
-        });
+      this.$confirm(`鎮ㄧ‘瀹� 鍗曞彿锛�${row.businessFormCode}  鎺ユ敹鍏ュ簱鍚�?`, '鎺ユ敹鍏ュ簱', {
+        beforeClose: (action, instance, done) => {
+          if (action == 'confirm') {
+            instance.confirmButtonLoading = true;
+            instance.confirmButtonText = '鎵ц涓�...';
+            transfeIncome({ id: row.id })
+              .then((res) => {
+                this.$message.success('鎺ユ敹鍏ュ簱鎴愬姛锛�');
+                done();
+                instance.confirmButtonLoading = false;
+                this.search(1);
+              })
+              .catch(() => {
+                done();
+              });
+          } else {
+            done();
+          }
+        },
       });
     },
 

--
Gitblit v1.9.1