提交 063cc352 作者: 龚洪江

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

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