Commit d4ec8de0 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

🐞 fix(营销活动): 修复商品选择分页输入的问题

parent ab54e95f
......@@ -45,16 +45,18 @@ const ProductListLayout: React.FC<ProductListProps> = (props: any) => {
const [collocation, setCollocation] = useState<any[]>([]);
const [current, setCurrent] = useState<number>(1);
const handleOnShowSizeChange = (current, _size) => {
setCurrent(current)
}
const handlesStFieldsValue = () => {
const params = [...dataSource];
const _pagination = (current - 1) * 10;
params.forEach((_item, _i) => {
const index = Number(_pagination + _i)
form.setFieldsValue({
[`plummetPrice_${index}`]: _item.plummetPrice,
[`activityPrice_${index}`]: _item.activityPrice,
[`restrictNum_${index}`]: _item.restrictNum,
[`restrictTotalNum_${index}`]: _item.restrictTotalNum,
[`plummetPrice_${_i}`]: _item.plummetPrice,
[`activityPrice_${_i}`]: _item.activityPrice,
[`restrictNum_${_i}`]: _item.restrictNum,
[`restrictTotalNum_${_i}`]: _item.restrictTotalNum,
})
})
}
......@@ -183,9 +185,6 @@ const ProductListLayout: React.FC<ProductListProps> = (props: any) => {
setDataSource(fields)
}
const handleOnShowSizeChange = (current, _size) => {
setCurrent(current)
}
return (
<CardLayout
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment