From 3e04c2102a31ea3306277203449097cb027215ae Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 13 二月 2025 15:23:11 +0800
Subject: [PATCH] 客户管理页面联调

---
 src/views/system/customer/index.vue |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/views/system/customer/index.vue b/src/views/system/customer/index.vue
index bdd5b8f..169b755 100644
--- a/src/views/system/customer/index.vue
+++ b/src/views/system/customer/index.vue
@@ -105,9 +105,7 @@
       formTitle: '',
       addDia: false,
       addPower: true,
-      user: {
-        name: null
-      },
+      user: {},
       userRules: {
         company: [{ required: true, message: '璇疯緭鍏ュ鎴峰悕绉�', trigger: 'blur' }],
         companyEn: [{ required: true, message: '璇疯緭鍏ュ鎴峰悕绉癊N', trigger: 'blur' }],
@@ -153,19 +151,23 @@
           this.loading = true
           if (this.operationType === 'add') {
             addCustom(this.user).then(res => {
-              if (res.code === 201) return
+              this.loading = false
+              if (res.code !== 200) return
               this.$message.success('鏂板鎴愬姛')
               this.getList()
-              this.loading = false
               this.reset()
+            }).catch(err => {
+              this.loading = false
             })
           } else {
             upCustom(this.user).then(res => {
-              if (res.code === 201) return
+              this.loading = false
+              if (res.code !== 200) return
               this.$message.success('淇敼鎴愬姛')
               this.getList()
-              this.loading = false
               this.reset()
+            }).catch(err => {
+              this.loading = false
             })
           }
         }

--
Gitblit v1.9.3