forked from gzzfw/frontEnd/gzDyh

dminyi
2024-08-30 2a165a8e70947fe1a3641ea328d1f6daf7fff459
gz-customerSystem/src/components/personCard/index.jsx
@@ -10,6 +10,7 @@
import PropTypes from 'prop-types';
import { Typography, Row, Col, Space, Tooltip } from 'antd';
import { del, add } from '../../assets/images';
import * as $$ from '@/utils/utility';
const { Link, Text } = Typography;
/**
@@ -22,12 +23,12 @@
    let isAgent = false
    let isAgentFor = false
    const typeList = data.map(item => {
        return item.partyType
    return item.perType
    })//获取有多少申请人和被申请人
    if (typeList.indexOf(0) != -1) {
  if (typeList.indexOf('15_020008-1') != -1) {
        isAgent = true
    }
    if (typeList.indexOf(1) != -1) {
  if (typeList.indexOf('15_020008-2') != -1) {
        isAgentFor = true
    }
    return (
@@ -36,7 +37,7 @@
                <Col span={7} key={t}>
                    <div className="public-personCard" style={{ cursor: 'pointer' }}>
                        <div
                            className={`public-personCard-card public-personCard-card-${(x.partyType === 0 || x.partyType === 2) ? 'blue' : 'orange'}`}
              className={`public-personCard-card public-personCard-card-${(x.perType === '15_020008-1' || x.perType === '24_00006-1') ? 'blue' : 'orange'}`}
                            onClick={() => handleCheckParty(x)}
                        >
                            {x.trueName.substr(0, 1)}
@@ -53,29 +54,29 @@
                                <Text style={{ maxWidth: '80%', paddingRight: '8px' }} ellipsis={{ tooltip: x.trueName }}>
                                    {x.trueName}
                                </Text>
                                <Text onClick={() => { handleEdit(x) }} ellipsis={{ tooltip: x.perClassName }} className={`public-personCard-tag public-personCard-tag-${(x.partyType === 0 || x.partyType === 2) ? 'blue' : 'orange'}`}>
                                    {x.perClassName}
                <Text onClick={() => { handleEdit(x) }} ellipsis={{ tooltip: x.perTypeName }} className={`public-personCard-tag public-personCard-tag-${(x.perType === '15_020008-1' || x.perType === '24_00006-1') ? 'blue' : 'orange'}`}>
                  {x.perTypeName}
                                </Text>
                            </div>
                            {
                                (x.perClass === '09_01001-1' || !x.perClass) &&
                                <>
                                    <div>证件号码:{x.mobile}</div>
                                    <div>联系方式:{x.personNumber}</div>
                  <div>证件号码:{x.certiNo}</div>
                  <div>联系方式:{x.mobile}</div>
                                </>
                            }
                            {
                                x.perClass === '09_01001-2' &&
                                <>
                                    <div>统一社会信用代码:{x.mobile}</div>
                                    <div>法定代表人:{x.companyName}</div>
                  <div>统一社会信用代码:{x.orgaCode}</div>
                  <div>法定代表人:{x.deputy}</div>
                                </>
                            }
                            {
                                x.perClass === '09_01001-3' &&
                                <>
                                    <div>组织机构代码:{x.mobile}</div>
                                    <div>机构代表人:{x.companyName}</div>
                  <div>组织机构代码:{x.orgaCode}</div>
                  <div>机构代表人:{x.deputy}</div>
                                </>
                            }
                            <Space style={{ display: 'flex', flexWrap: 'wrap' }}>
@@ -91,10 +92,10 @@
                <div className="dataSync-addBtn">
                    <Tooltip
                        title={(<Space direction='vertical '>
                            <div className="dataSync-btnApply" style={{ backgroundColor: '#1A6FB8' }} onClick={() => { handleAdd(0) }}>申请方当事人</div>
                            {isAgent && <div className="dataSync-btnApply" style={{ backgroundColor: '#3491FA' }} onClick={() => { handleAdd(2) }}>申请方代理人</div>}
                            <div className="dataSync-btnApply" style={{ backgroundColor: '#EF6C24' }} onClick={() => { handleAdd(1) }}>被申请方当事人</div>
                            {isAgentFor && <div className="dataSync-btnApply" style={{ backgroundColor: '#FA8C16' }} onClick={() => { handleAdd(3) }}>被申请方代理人</div>}
              <div className="dataSync-btnApply" style={{ backgroundColor: '#1A6FB8' }} onClick={() => { handleAdd('15_020008-1') }}>申请方当事人</div>
              {isAgent && <div className="dataSync-btnApply" style={{ backgroundColor: '#3491FA' }} onClick={() => { handleAdd('24_00006-1') }}>申请方代理人</div>}
              <div className="dataSync-btnApply" style={{ backgroundColor: '#EF6C24' }} onClick={() => { handleAdd('15_020008-2') }}>被申请方当事人</div>
              {isAgentFor && <div className="dataSync-btnApply" style={{ backgroundColor: '#FA8C16' }} onClick={() => { handleAdd('24_00006-2') }}>被申请方代理人</div>}
                        </Space>)}
                        placement={data.length !== 0 && data.length % 3 === 0 ? 'left' : "right"}
                        color='#ffff'