/*
 * @Author: your name
 * @Date: 2022-04-28 10:47:35
 * @LastEditTime: 2023-04-18 10:00:09
 * @LastEditors: zzy 411037547@qq.com
 * @Description: 欠款项目组件 item
 * @FilePath: \cloud-platform\src\pages\busniess\PaymentConfirm\components\ProjectItem.tsx
 */

import moment from "moment";
import numeral from "numeral";
import { QuestionCircleOutlined } from "@ant-design/icons"
import { Col, Row, Space, Tooltip, Typography } from "antd";

import type { AccountReceivablesModel } from "@/pages/busniess/PaymentConfirm/data";

const { Text } = Typography
const ProjectItem = ({ project, selectProject }: { project: AccountReceivablesModel, selectProject: any, }) => {
    return (
        <Row align="middle" style={{ padding: 16 }} className="project-list-item" >
            <Col span={8} >
                <Space size="middle">
                    <span>{project?.SERVERPART_NAME}{project?.SERVERPART_TYPE ? <>【<span className="project-amount"
                        style={{ fontSize: 'X-large', color: '#faad14' }}>{project?.SERVERPART_TYPE}</span>】</> : ''}</span>
                    {project?.SECTIONFLOW_NUM ? <>断面流量<Text className="project-amount" type="warning"
                        style={{ fontSize: 'X-large' }}>{project?.SECTIONFLOW_NUM}</Text></> : ''}
                </Space>
            </Col>
            <Col span={8} >
                <Space size="middle">
                    {/* <a style={{ cursor: "pointer" }} onClick={() => {
                        selectProject(project)
                    }
                    }>{project?.BUSINESSPROJECT_NAME}</a> */}
                    <span>{project?.BUSINESSPROJECT_NAME}</span>
                </Space>
            </Col>
            <Col span={8} >
                <Space align="center">
                    <Text className="project-amount" type="warning"
                        style={{ minWidth: 50, display: "block", textAlign: "right", fontSize: 'X-large' }}>
                        {numeral(project?.PROJECT_AMOUNT).format("0,0.[000000]")}</Text>
                    <span>(万元)【{project?.PROJECT_STARTDATE}-{project?.PROJECT_ENDDATE}】</span>
                </Space>
            </Col>
            <Col span={8} >
                <Space size="middle">
                    <span>{project?.COOPMERCHANTS_NAME}</span>
                </Space>
            </Col>
            <Col span={8} >
                <Space size="middle">
                    <span>{project?.SERVERPARTSHOP_NAME}</span>
                </Space>
            </Col>
        </Row>
    )


}


export default ProjectItem;