From 025dafb9892a8ff8f8a855343660f837a0f231d3 Mon Sep 17 00:00:00 2001
From: haoyahui <2032914783@qq.com>
Date: 星期一, 20 十一月 2023 16:31:11 +0800
Subject: [PATCH] 库存管理前端

---
 admin-web/src/views/stock/procure/purchaseOrder/index.vue |   30 +++++++++++++++++++++---------
 1 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/admin-web/src/views/stock/procure/purchaseOrder/index.vue b/admin-web/src/views/stock/procure/purchaseOrder/index.vue
index 621f136..33b64a6 100644
--- a/admin-web/src/views/stock/procure/purchaseOrder/index.vue
+++ b/admin-web/src/views/stock/procure/purchaseOrder/index.vue
@@ -120,7 +120,7 @@
 import edit from './edit';
 import detail from './detail';
 import { getBaseUrl } from '@/utils/base';
-import listPage from '../../../mixins/listPage'
+import listPage from '../../../mixins/listPage';
 
 export default {
   name: 'index',
@@ -249,17 +249,29 @@
     },
     // 鍏ュ簱
     handleIncome(row) {
-      this.$confirm(`鎮ㄧ‘瀹� 鍗曞彿锛�${row.businessFormCode}  鍏ュ簱鍚�?`, '閲囪喘鍏ュ簱').then(() => {
-        procureIncome({ id: row.id })
-          .then((res) => {
-            this.$message.success('鍏ュ簱鎴愬姛锛�');
-            this.search();
-          })
-          .catch(() => {});
+      this.$confirm(`鎮ㄧ‘瀹� 鍗曞彿锛�${row.businessFormCode}  鍏ュ簱鍚�?`, '閲囪喘鍏ュ簱', {
+        beforeClose: (action, instance, done) => {
+          if (action == 'confirm') {
+            instance.confirmButtonLoading = true;
+            instance.confirmButtonText = '鎵ц涓�...';
+            procureIncome({ id: row.id })
+              .then((res) => {
+                this.$message.success('鍏ュ簱鎴愬姛锛�');
+                done();
+                instance.confirmButtonLoading = false;
+                this.search();
+              })
+              .catch(() => {
+                done();
+              });
+          } else {
+            done();
+          }
+        },
       });
     },
     del(row) {
-      this.$modal.confirm('鏄惁纭鍒犻櫎鍏ュ簱鍗曞彿涓�"' + row.businessFormCode + '"鐨勬暟鎹悧锛�').then( () => {
+      this.$modal.confirm('鏄惁纭鍒犻櫎鍏ュ簱鍗曞彿涓�"' + row.businessFormCode + '"鐨勬暟鎹悧锛�').then(() => {
         procureDel({ id: row.id })
           .then((res) => {
             this.$message.success('鍒犻櫎鎴愬姛锛�');

--
Gitblit v1.9.1