提交 082304f0 作者: ZhangLingKun

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

上级 a00daac9
......@@ -360,6 +360,33 @@ const GoodsList = () => {
.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(() => {
getCategoryList();
pagination.pageNo = Number(searchParams.get('pageNo') || 1);
......@@ -390,14 +417,16 @@ const GoodsList = () => {
<SearchBox
search={searchColumns}
child={
<Button
type='primary'
icon={<PlusOutlined />}
onClick={toAddMallGoods}
disabled={!!userInfo.roleInfo.superAdmin}
>
新增商品
</Button>
<>
<Button
type='primary'
icon={<PlusOutlined />}
onClick={toAddMallGoods}
disabled={!!userInfo.roleInfo.superAdmin}
>
新增商品
</Button>
</>
}
searchData={searchSuccess}
baseRef={searchRef}
......
......@@ -313,32 +313,6 @@ const RentList = () => {
const onSelectChange = (newSelectedRowKeys: React.Key[]) => {
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(() => {
pagination.pageNo = Number(searchParams.get('pageNo')) || 1;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论