From 536dd41739f6dcdc50862d169568428320b75582 Mon Sep 17 00:00:00 2001
From: dminyi <1301963064@qq.com>
Date: Wed, 28 Aug 2024 09:33:25 +0800
Subject: [PATCH] 自行受理
---
gz-customerSystem/src/views/register/visit/component/agentDialog.jsx | 31 +++++++++++++++++++++++--------
1 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/gz-customerSystem/src/views/register/visit/component/agentDialog.jsx b/gz-customerSystem/src/views/register/visit/component/agentDialog.jsx
index 0f92863..5dfe16e 100644
--- a/gz-customerSystem/src/views/register/visit/component/agentDialog.jsx
+++ b/gz-customerSystem/src/views/register/visit/component/agentDialog.jsx
@@ -14,21 +14,36 @@
export default function AgentDialog(props) {
const formRef = useRef();
+ const [visitList, setVisitList] = useState([])
+
+ useEffect(() => {
+ //过滤代理人
+ setVisitList(props.fakeData.filter(item => {
+ console.log(item,props.dialogType);
+ if (props.dialogType === 2) {
+ return item.partyType === 0
+ } else {
+ return item.partyType === 1
+ }
+ }))
+ }, [props.fakeData])
//保存信息
const handleSave = () => {
if (formRef.current) {
formRef.current.validate(undefined, (errors, values) => {
- props.handleAddParty({
- ...values,
- // partyType: props.dialogType,
- // perClass: perClass,
- // perClassName: props.dialogType === 0 ? '申请方代理人' : '被申请方当事人'
- })
- props.onClose()
+ if (!errors) {
+ props.handleAddParty({
+ ...values,
+ partyType: props.dialogType,
+ perClassName: props.dialogType === 2 ? '申请方代理人' : '被申请方代理人',
+ })
+ props.onClose()
+ }
});
}
}
+
return (
<div className="applyDialog">
<div style={{ height: '590px', overflowY: 'scroll' }}>
@@ -217,7 +232,7 @@
>
<CheckboxGroup
direction='vertical'
- options={props.fakeData.map(x => ({
+ options={visitList.map(x => ({
label: <span>{x.trueName} <span style={{ color: '#86909c' }}>({x.perClassName})</span></span>,
value: x.id,
}))}
--
Gitblit v1.8.0