From d3eefcaf3762ca97483e1517697b6941bd9a58d8 Mon Sep 17 00:00:00 2001 From: dminyi <1301963064@qq.com> Date: Wed, 28 Aug 2024 09:51:50 +0800 Subject: [PATCH] Merge branch 'master' of http://120.79.193.119:9090/r/gzzfw/frontEnd/gzDyh into master --- gz-customerSystem/src/views/register/visit/component/applyDialog.jsx | 31 ++++++++++++++++++++++++------- 1 files changed, 24 insertions(+), 7 deletions(-) diff --git a/gz-customerSystem/src/views/register/visit/component/applyDialog.jsx b/gz-customerSystem/src/views/register/visit/component/applyDialog.jsx index bca0bab..3d31adb 100644 --- a/gz-customerSystem/src/views/register/visit/component/applyDialog.jsx +++ b/gz-customerSystem/src/views/register/visit/component/applyDialog.jsx @@ -29,6 +29,15 @@ const [perClass, setPerClass] = useState('09_01001-1'); const [visible, setVisible] = useState(false); + useEffect(() => { + if (props.editData) { + //编辑 + formRef.current.setFieldsValue({ + ...props.editData + }) + } + }, []) + const personIconType = (v) => { switch (v) { @@ -271,12 +280,19 @@ if (formRef.current) { formRef.current.validate(undefined, (errors, values) => { if (!errors) { - props.handleAddParty({ - ...values, - partyType: props.dialogType, - perClass: perClass, - perClassName: props.dialogType === 0 ? '申请方当事人' : '被申请方当事人' - }) + if (props.editData) { + props.handleAddParty({ + ...props.editData, + ...values + }) + } else { + props.handleAddParty({ + ...values, + partyType: props.dialogType, + perClass: perClass, + perClassName: props.dialogType === 0 ? '申请方当事人' : '被申请方当事人' + }) + } props.onClose() } }); @@ -319,6 +335,7 @@ requiredSymbol={false} initialValues={{ }}//默认值 + scrollToFirstError > <Row gutter={[32, 0]} style={{ margin: '0 -10px' }}>{formType(perClass)}</Row> </Form> @@ -336,7 +353,7 @@ className="dialogPrimary" onClick={handleSave} > - 保存信息 + 保存 </Button> <Button className="dialogBack"> 重置 -- Gitblit v1.8.0