diff --git a/src/components/UsePlanCard/index.jsx b/src/components/UsePlanCard/index.jsx index 33d26ec8..ebf2bd49 100644 --- a/src/components/UsePlanCard/index.jsx +++ b/src/components/UsePlanCard/index.jsx @@ -14,6 +14,7 @@ import { RadioButton, RadioGroup, Notify, + Checkbox, } from "zent"; import Ipt from "../../components/input/main"; import Form from "../../components/form/main"; @@ -267,6 +268,11 @@ function reducerPlanKey(state, action) { ...state, white_visible: action.payload, }; + case "batch_name": + return { + ...state, + batch_name: action.payload, + }; default: throw new Error(); } @@ -280,6 +286,12 @@ const UsePlanCardStep02 = forwardRef((props, ref) => { }; const [model, dispatch] = useReducer(reducerPlanKey, initPlanKey); // form 表单数据 + const [checkedList, setCheckedList] = useState([]); + const form2 = useRef(null); + + useImperativeHandle(ref, () => ({ + submit: submit, + })); const onStyleChange = (e) => { if (props.name === 0) { @@ -303,9 +315,24 @@ const UsePlanCardStep02 = forwardRef((props, ref) => { } }; + const onCheckChange = () => {}; + + const submit = () => { + let valide = false; + if (form2.current.validator()) { + let data = {}; + data.style = model.style; + console.log("step 2 =>", data); + + valide = true; + } + + return valide; + }; + return (