提交 082304f0 作者: ZhangLingKun

功能:张金平张金平张金平

上级 a00daac9
...@@ -360,6 +360,33 @@ const GoodsList = () => { ...@@ -360,6 +360,33 @@ const GoodsList = () => {
.join('/'); .join('/');
}; };
// 刘才力
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment
// @ts-ignore
const handleLiuCaiLiFn = async () => {
const res = await GoodsAPI.getListPageGoodsInfo({
pageNo: 1,
pageSize: 999,
});
if (res && res.code === '200') {
const list = res.result.list || [];
// const list = DataList; // 导入json 导入json 导入json
// console.log('刘才力 --->', list);
for (const i of list) {
const j = list.indexOf(i);
const { result } = await GoodsAPI.getMallGoodsDetails({ id: i?.id });
await GoodsAPI.addMallGoods({
...result,
tradeName: `${i.tradeName}【复制】${j + 1}`,
shelfStatus: 0,
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
id: undefined,
});
}
}
};
useEffect(() => { useEffect(() => {
getCategoryList(); getCategoryList();
pagination.pageNo = Number(searchParams.get('pageNo') || 1); pagination.pageNo = Number(searchParams.get('pageNo') || 1);
...@@ -390,14 +417,16 @@ const GoodsList = () => { ...@@ -390,14 +417,16 @@ const GoodsList = () => {
<SearchBox <SearchBox
search={searchColumns} search={searchColumns}
child={ child={
<Button <>
type='primary' <Button
icon={<PlusOutlined />} type='primary'
onClick={toAddMallGoods} icon={<PlusOutlined />}
disabled={!!userInfo.roleInfo.superAdmin} onClick={toAddMallGoods}
> disabled={!!userInfo.roleInfo.superAdmin}
新增商品 >
</Button> 新增商品
</Button>
</>
} }
searchData={searchSuccess} searchData={searchSuccess}
baseRef={searchRef} baseRef={searchRef}
......
...@@ -313,32 +313,6 @@ const RentList = () => { ...@@ -313,32 +313,6 @@ const RentList = () => {
const onSelectChange = (newSelectedRowKeys: React.Key[]) => { const onSelectChange = (newSelectedRowKeys: React.Key[]) => {
setSelectedRowKeys(newSelectedRowKeys); setSelectedRowKeys(newSelectedRowKeys);
}; };
// 刘才力
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/ban-ts-comment
// @ts-ignore
const handleLiuCaiLiFn = async () => {
const res = await RentManageAPI.getLeaseGoodsList({
pageNo: 1,
pageSize: 999,
});
if (res && res.code === '200') {
const list = res.result.list || [];
// const list = dataList; // 导入json 导入json 导入json
// console.log('刘才力 --->', list);
for (const i of list) {
const j = list.indexOf(i);
const { result } = await RentManageAPI.getLeaseGoodsDetails({ id: i?.id });
await RentManageAPI.addRentGoods({
...result,
tradeName: `${i.tradeName}【复制】${j + 1}`,
shelfStatus: 0,
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
id: undefined,
});
}
}
};
useEffect(() => { useEffect(() => {
pagination.pageNo = Number(searchParams.get('pageNo')) || 1; pagination.pageNo = Number(searchParams.get('pageNo')) || 1;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论