提交 063cc352 作者: 龚洪江

修复:超级管理员商品上下移禁用,单位删除警示语

上级 fb8eed2c
...@@ -12,6 +12,7 @@ import qs from 'query-string'; ...@@ -12,6 +12,7 @@ import qs from 'query-string';
import { CategoryManageAPI } from '~/api'; import { CategoryManageAPI } from '~/api';
import { categoryListRespType } from '~/api/interface/categoryManage'; import { categoryListRespType } from '~/api/interface/categoryManage';
import { useSelector } from 'react-redux'; import { useSelector } from 'react-redux';
import _ from 'lodash';
//商品返回类型 //商品返回类型
type goodsType = InterDataType<listPageGoodsInfoType>['list']; type goodsType = InterDataType<listPageGoodsInfoType>['list'];
...@@ -255,7 +256,7 @@ const GoodsList = () => { ...@@ -255,7 +256,7 @@ const GoodsList = () => {
}); });
}; };
//上移 //上移
const upGoodsClick = () => { const upGoodsClick = _.debounce(() => {
if (selectedRowKeys.length === 0) { if (selectedRowKeys.length === 0) {
message.warning('请选择商品'); message.warning('请选择商品');
} else { } else {
...@@ -294,9 +295,9 @@ const GoodsList = () => { ...@@ -294,9 +295,9 @@ const GoodsList = () => {
); );
} }
} }
}; }, 500);
//下移 //下移
const downGoodsClick = () => { const downGoodsClick = _.debounce(() => {
if (selectedRowKeys.length === 0) { if (selectedRowKeys.length === 0) {
message.warning('请选择商品'); message.warning('请选择商品');
} else { } else {
...@@ -335,7 +336,7 @@ const GoodsList = () => { ...@@ -335,7 +336,7 @@ const GoodsList = () => {
); );
} }
} }
}; }, 500);
//分类列表 //分类列表
const getCategoryList = () => { const getCategoryList = () => {
CategoryManageAPI.getCategoryRespList({ pageNo: 1, pageSize: 99999 }).then(({ result }) => { CategoryManageAPI.getCategoryRespList({ pageNo: 1, pageSize: 99999 }).then(({ result }) => {
...@@ -408,6 +409,7 @@ const GoodsList = () => { ...@@ -408,6 +409,7 @@ const GoodsList = () => {
style={{ marginRight: '10px' }} style={{ marginRight: '10px' }}
icon={<ArrowUpOutlined />} icon={<ArrowUpOutlined />}
onClick={upGoodsClick} onClick={upGoodsClick}
disabled={!!userInfo.roleInfo.superAdmin}
> >
上移 上移
</Button> </Button>
...@@ -416,6 +418,7 @@ const GoodsList = () => { ...@@ -416,6 +418,7 @@ const GoodsList = () => {
style={{ marginRight: '10px' }} style={{ marginRight: '10px' }}
icon={<ArrowDownOutlined />} icon={<ArrowDownOutlined />}
onClick={downGoodsClick} onClick={downGoodsClick}
disabled={!!userInfo.roleInfo.superAdmin}
> >
下移 下移
</Button> </Button>
......
...@@ -65,7 +65,7 @@ const CompanyManageView = () => { ...@@ -65,7 +65,7 @@ const CompanyManageView = () => {
// 删除单位 // 删除单位
const handleDelete = (value: TableType[0]) => { const handleDelete = (value: TableType[0]) => {
confirm({ confirm({
title: '提示', title: '提示(删除会造成该单位下的商品全部删除)',
content: '是否删除该单位?', content: '是否删除该单位?',
onOk: async () => { onOk: async () => {
const res = await SystemManageAPI.listCompanyRemove({ id: value.id }); const res = await SystemManageAPI.listCompanyRemove({ id: value.id });
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论