From 8d322f025a9483030a47d4671c5fa7502bbcb930 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 18 九月 2023 15:56:32 +0800
Subject: [PATCH] 休bug

---
 platform/src/views/system/user.vue                                             |    1 +
 server/platform/src/main/java/com/doumee/api/business/BaseGoodsController.java |    6 +++---
 platform/src/components/business/OperaGoodsWindow.vue                          |    8 ++++----
 platform/src/api/business/goods.js                                             |    8 ++++----
 platform/src/views/business/goods.vue                                          |   15 +++++++++------
 5 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/platform/src/api/business/goods.js b/platform/src/api/business/goods.js
index 8477252..b8f9191 100644
--- a/platform/src/api/business/goods.js
+++ b/platform/src/api/business/goods.js
@@ -48,12 +48,12 @@
 }
 
 // 淇敼鐘舵��
-export function updateStatusById (data) {
-  return request.post('/business/baseGoods/updateStatusById', data)
+export function updateStatus (data) {
+  return request.post('/business/baseGoods/updateStatus', data)
 }
-export function updateStatusById (data) {
+/*export function updateStatusById (data) {
   return request.post('/business/baseGoods/updateStatusById', data)
-}
+}*/
 
 // 鍒楄〃 - 鍟嗗搧閫夋嫨
 export function findListForbaseGoodsId (goodsId) {
diff --git a/platform/src/components/business/OperaGoodsWindow.vue b/platform/src/components/business/OperaGoodsWindow.vue
index 440f444..d2d1ef9 100644
--- a/platform/src/components/business/OperaGoodsWindow.vue
+++ b/platform/src/components/business/OperaGoodsWindow.vue
@@ -98,8 +98,8 @@
 <script>
 import BaseOpera from '@/components/base/BaseOpera'
 import GlobalWindow from '@/components/common/GlobalWindow'
-import { brand } from '@/api/system/common.js'
-import { findListForGoodsId, create, updateById, companyCreate, companyUpdateById } from '@/api/business/goods.js'
+import { baseCategory,brand } from '@/api/system/common.js'
+import {  create, updateById, companyCreate, companyUpdateById } from '@/api/business/goods.js'
 export default {
   name: 'OperaGoodsWindow',
   extends: BaseOpera,
@@ -315,13 +315,13 @@
       this.form.imgurl = ''
     },
       getbrand() {
-        brand({})
+        brand({status:0})
           .then(res => {
             this.brandList = res
           })
       },
       getcategory(type) {
-        findListForGoodsId(this.form.id || '')
+        baseCategory({status:0 , type:1})
           .then(res => {
             this.categoryList = res
             if (type === 1) {
diff --git a/platform/src/views/business/goods.vue b/platform/src/views/business/goods.vue
index 64023b5..8992e61 100644
--- a/platform/src/views/business/goods.vue
+++ b/platform/src/views/business/goods.vue
@@ -105,7 +105,7 @@
 import OperaGoodsWindow from '@/components/business/OperaGoodsWindow'
 import selectProduct from '@/components/business/selectProduct'
 import { brand, baseCategory, importExcel } from '@/api/system/common.js'
-import { updateStatusById, queryById, exportDoc, batchUpdateDisableById } from '@/api/business/goods.js'
+import { updateStatus, queryById, exportDoc } from '@/api/business/goods.js'
 export default {
   name: 'Goods',
   extends: BaseTable,
@@ -121,6 +121,7 @@
         brandId: ''
       },
       ids: '',
+      idList: [],
       categoryList: [],
       brandList: [],
       statusList: [
@@ -144,6 +145,7 @@
     handleSelectionChange(e) {
       let arr = e.map(item => item.id)
       this.ids = arr.join(',')
+      this.idList = arr;
       console.log(this.ids)
     },
     // 鎵归噺涓婁笅鏋�
@@ -152,11 +154,12 @@
         this.$message.warning({ message: '鑷冲皯閫夋嫨涓�椤瑰唴瀹�' })
         return
       }
-      batchUpdateDisableById({
-        ids: this.ids,
+      updateStatus({
+        idList: this.idList,
         status: type
       }).then(res => {
-        this.$message.success({ message: res })
+        this.$tip.apiSuccess('鎿嶄綔鎴愬姛');
+        // this.$message.success({ message:res.message })
         this.search()
       })
     },
@@ -221,8 +224,8 @@
         })
     },
     changeStatus(item) {
-      updateDisableById({
-        id: item.id,
+      updateStatus({
+        idList: [item.id],
         status: item.status
       }).then(res => {
         this.$tip.apiSuccess('鏇存柊鎴愬姛')
diff --git a/platform/src/views/system/user.vue b/platform/src/views/system/user.vue
index 7180d8d..7a2711d 100644
--- a/platform/src/views/system/user.vue
+++ b/platform/src/views/system/user.vue
@@ -125,6 +125,7 @@
     return {
       // 鎼滅储
       searchForm: {
+        type:0,
         username: '', // 鍚嶅瓧
         realname: '', // 濮撳悕
         rootDeptId: null, // 閮ㄩ棬ID
diff --git a/server/platform/src/main/java/com/doumee/api/business/BaseGoodsController.java b/server/platform/src/main/java/com/doumee/api/business/BaseGoodsController.java
index ddf51c0..fcda94f 100644
--- a/server/platform/src/main/java/com/doumee/api/business/BaseGoodsController.java
+++ b/server/platform/src/main/java/com/doumee/api/business/BaseGoodsController.java
@@ -96,12 +96,12 @@
      * 涓婚敭涓婁笅鏋�
      *
      */
-    @ApiOperation("鏍规嵁ID鏌ヨ")
+    @ApiOperation("鏍规嵁ID鏌ヨ鎵归噺涓婃灦涓嬫灦")
     @PostMapping("/updateStatus")
-    @RequiresPermissions("business:basegoods:query")
+    @RequiresPermissions("business:basegoods:update")
     public ApiResponse updateStatusByIds(@RequestBody   BaseGoods param ){
         baseGoodsService.updateStatusByIds(param);
-        return ApiResponse.success(null);
+        return ApiResponse.success("鎿嶄綔鎴愬姛锛�");
     }
 
 

--
Gitblit v1.9.3