import React from "react"; import { Button } from 'antd'; import { useStore } from '@/pages/pms/partPlan/MinRatioPlan'; import _ from 'lodash'; interface Props { length: number } export default function Index({length}: Props) { const { bntLoading, getStep2, current, setCurrent, getSummary, submit, summarySupplier, brandId, parts } = useStore(); // const flag = _.flattenDeep(summarySupplier.map(it => it.parts || [])).length == parts.length; const next = _.throttle(() => { if (current == 1) { getStep2(); } if (current == 2) { getSummary(); } }, 1000); const prev = _.throttle(() => { setCurrent(current - 1); }, 1000); const onSubmit = _.throttle(() => { submit(); }, 1000); return (
{current > 1 && ( )} {current < length && ( )} {current == length && ( )}
); }