From dad8ee5b2c6d2359d2821653baee2847f97d542e Mon Sep 17 00:00:00 2001
From: zhangyongtian <1181606322@qq.com>
Date: Mon, 19 Aug 2024 17:43:11 +0800
Subject: [PATCH] feat: 添加当事人信息逻辑

---
 gz-customerSystem/src/components/personCard/index.jsx |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/gz-customerSystem/src/components/personCard/index.jsx b/gz-customerSystem/src/components/personCard/index.jsx
index 19113f0..fbc1e78 100644
--- a/gz-customerSystem/src/components/personCard/index.jsx
+++ b/gz-customerSystem/src/components/personCard/index.jsx
@@ -19,7 +19,13 @@
  * handleDeleteParty, // 删除当事人
  */
 const PersonCard = ({ isCheck, data, handleCheckParty, handleDeleteParty, handleAdd }) => {
-
+    let isAgent = false
+    const typeList = data.map(item => {
+        return item.partyType
+    })//获取有多少申请人和被申请人
+    if (typeList.indexOf(0) != -1 && typeList.indexOf(1) != -1) {
+        isAgent = true
+    }
     return (
         <Row gutter={[24, 16]}>
             {data.map((x, t) => (
@@ -31,7 +37,12 @@
                         >
                             {x.trueName.substr(0, 1)}
                             <div className="public-personCard-card-check">查看</div>
-                            <img src={del} alt='' style={{ width: '16px', height: '16px', position: 'absolute', top: '-8px', left: '56px' }} />
+                            <img
+                                src={del}
+                                alt=''
+                                style={{ width: '16px', height: '16px', position: 'absolute', top: '-8px', left: '56px' }}
+                                onClick={(event) => { handleDeleteParty(event, x) }}
+                            />
                         </div>
                         <div className="public-personCard-content">
                             <div className="public-personCard-title">
@@ -56,6 +67,13 @@
                                     <div>法定代表人:{x.companyName}</div>
                                 </>
                             }
+                            {
+                                x.perClass === '09_01001-3' &&
+                                <>
+                                    <div>组织机构代码:{x.mobile}</div>
+                                    <div>机构代表人:{x.companyName}</div>
+                                </>
+                            }
                             <Space style={{ display: 'flex', flexWrap: 'wrap' }}>
                                 {x.remark?.map((item, index) => (
                                     <div key={index} style={{ lineHeight: '22px', padding: '0px 8px', backgroundColor: `${item.color}`, width: 'fit-content', borderRadius: '4px', marginTop: '4px', color: '#fff' }}>{item.label}</div>
@@ -71,7 +89,7 @@
                         title={(<Space direction='vertical '>
                             <div className="dataSync-btnApply" style={{ backgroundColor: '#1A6FB8' }} onClick={() => { handleAdd(0) }}>申请方</div>
                             <div className="dataSync-btnApply" style={{ backgroundColor: '#FA8C16' }} onClick={() => { handleAdd(1) }}>被申请方</div>
-                            <div className="dataSync-btnApply" style={{ backgroundColor: '#3491FA' }} onClick={() => { handleAdd(2) }}>代理人</div>
+                            {isAgent && <div className="dataSync-btnApply" style={{ backgroundColor: '#3491FA' }} onClick={() => { handleAdd(2) }}>代理人</div>}
                         </Space>)}
                         placement={data.length !== 0 && data.length % 3 === 0 ? 'left' : "right"}
                         color='#ffff'

--
Gitblit v1.8.0