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/procure/purchaseOrder/edit.vue |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/admin-web/src/views/stock/procure/purchaseOrder/edit.vue b/admin-web/src/views/stock/procure/purchaseOrder/edit.vue
index 7d8cc0c..6b4a2a1 100644
--- a/admin-web/src/views/stock/procure/purchaseOrder/edit.vue
+++ b/admin-web/src/views/stock/procure/purchaseOrder/edit.vue
@@ -1,5 +1,5 @@
 <template>
-  <win-md class="stock-edit" :title="`${setting.title}閲囪喘鍏ュ簱`" @close="close" :width="'800px'">
+  <win-md class="stock-edit" :title="`${setting.title}閲囪喘鍏ュ簱`" @close="close" :width="'800px'" :loading="loading">
     <el-form class="form" ref="ruleForm" :model="formData" :rules="rules" label-width="120px">
       <div class="main-w">
         <el-row :gutter="24" class="headerHeight">
@@ -256,7 +256,7 @@
       callback();
     };
     return {
-      loading: false,
+      loading: true,
       buyTypeOptions: [
         {
           label: '闆嗛噰',
@@ -361,6 +361,7 @@
           return item;
         });
       }
+      this.loading = false;
     },
 
     // 鑾峰彇鍏ュ簱浠撳簱鍒楄〃
@@ -502,8 +503,8 @@
     handleSubmit() {
       this.$refs['ruleForm'].validate((valid) => {
         if (valid) {
+          this.loading = true;
           console.log('formData', this.formData);
-          debugger;
           if (!this.setting.id) {
             procureAdd(this.formData)
               .then((res) => {
@@ -513,6 +514,7 @@
               })
               .catch((err) => {
                 console.log('create err', err);
+                this.loading = false;
                 this.$message.error('淇濆瓨澶辫触');
               });
           } else {
@@ -524,6 +526,7 @@
               })
               .catch((err) => {
                 console.log('edit err', err);
+                this.loading = false;
                 this.$message.error('淇濆瓨澶辫触');
               });
           }

--
Gitblit v1.9.1