From 32cf8d2d30b26c5937796395fb03078371359aa0 Mon Sep 17 00:00:00 2001
From: Mr.Shi <1878285526@qq.com>
Date: 星期二, 19 九月 2023 20:02:34 +0800
Subject: [PATCH] 企业端

---
 company_admin/src/components/business/OperaCategoryWindow.vue |   16 ++++++++++++++--
 company_admin/src/views/business/goods.vue                    |    4 +++-
 company_admin/src/utils/request.js                            |    2 ++
 3 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/company_admin/src/components/business/OperaCategoryWindow.vue b/company_admin/src/components/business/OperaCategoryWindow.vue
index eff1478..16bdce6 100644
--- a/company_admin/src/components/business/OperaCategoryWindow.vue
+++ b/company_admin/src/components/business/OperaCategoryWindow.vue
@@ -225,6 +225,12 @@
           // 璋冪敤鏂板缓鎺ュ彛
           this.isWorking = true
           if (!this.form.id) {
+            let arr = []
+            this.form.budgetList.forEach(item => {
+              if (item.maxamount || item.minamount) {
+                arr.push(item)
+              }
+            })
             companyCreate({
               paramList: this.form.tableData,
               type: this.form.type,
@@ -232,7 +238,7 @@
               platCateId: this.form.platCateId,
               name: this.form.name,
               imgurl: this.form.imgurl,
-              budgetList: this.form.budgetList
+              budgetList: arr
             })
               .then(() => {
                 this.visible = false
@@ -246,6 +252,12 @@
                 this.isWorking = false
               })
           } else {
+            let arr = []
+            this.form.budgetList.forEach(item => {
+              if (item.maxamount || item.minamount) {
+                arr.push(item)
+              }
+            })
             companyUpdateById({
               id: this.form.id,
               paramList: this.form.tableData,
@@ -254,7 +266,7 @@
               platCateId: this.form.platCateId,
               name: this.form.name,
               imgurl: this.form.imgurl,
-              budgetList: this.form.budgetList
+              budgetList: arr
             })
               .then(() => {
                 this.visible = false
diff --git a/company_admin/src/utils/request.js b/company_admin/src/utils/request.js
index bb715e1..51dae67 100644
--- a/company_admin/src/utils/request.js
+++ b/company_admin/src/utils/request.js
@@ -3,6 +3,7 @@
 import pkg from '../../package'
 import { trim } from './util'
 import cache from '../plugins/cache'
+import { Message } from 'element-ui'
 
 axios.defaults.headers.common['Content-Type'] = 'application/json;charset=UTF-8'
 const axiosInstance = axios.create({
@@ -40,6 +41,7 @@
 
 // 鏂板缓鍝嶅簲鎷︽埅鍣�
 axiosInstance.interceptors.response.use((response) => {
+  console.log(response.status)
   // 璇锋眰澶辫触
   if (response.status !== 200) {
     return Promise.reject(new Error('鏈嶅姟鍣ㄧ箒蹇欙紝璇风◢鍚庡啀璇�'))
diff --git a/company_admin/src/views/business/goods.vue b/company_admin/src/views/business/goods.vue
index 1b081e2..e08df42 100644
--- a/company_admin/src/views/business/goods.vue
+++ b/company_admin/src/views/business/goods.vue
@@ -286,7 +286,9 @@
         }).then(res => {
           this.$tip.apiSuccess('鏇存柊鎴愬姛')
         }).finally(() => {
-          // this.search()
+          this.search()
+        }).catch(err => {
+          this.$message.warning({ message: err.message })
         })
       },
       turnNum (nums) {

--
Gitblit v1.9.3