2024-03-13 19:01:21 +08:00
|
|
|
|
import './card-proj-agent.css'
|
2024-05-10 11:33:40 +08:00
|
|
|
|
import { OrderedListOutlined, BarsOutlined, SearchOutlined } from "@ant-design/icons";
|
|
|
|
|
import { Badge, Tag } from 'antd';
|
|
|
|
|
import { IAgent } from "../../interfaces/agent/IAgent.ts";
|
|
|
|
|
import { useNavigate } from "react-router-dom";
|
2024-03-27 18:56:48 +08:00
|
|
|
|
|
|
|
|
|
export default function CardProjAgent(props: IAgent) {
|
|
|
|
|
|
2024-03-28 19:35:54 +08:00
|
|
|
|
const nav = useNavigate();
|
|
|
|
|
|
2024-03-27 18:56:48 +08:00
|
|
|
|
/**
|
|
|
|
|
* 接单状态
|
|
|
|
|
*/
|
|
|
|
|
const renderTakeStatus = () => {
|
2024-03-28 19:35:54 +08:00
|
|
|
|
if (props.isTake == 0) {
|
2024-03-27 18:56:48 +08:00
|
|
|
|
return <Tag color="default">待结单</Tag>;
|
|
|
|
|
}
|
2024-03-28 19:35:54 +08:00
|
|
|
|
if (props.isTake == 1) {
|
2024-03-27 18:56:48 +08:00
|
|
|
|
return <Tag color="success">已接单</Tag>;
|
|
|
|
|
}
|
2024-03-28 19:35:54 +08:00
|
|
|
|
if (props.isTake == 2) {
|
2024-03-27 18:56:48 +08:00
|
|
|
|
return <Tag color="error">未接单</Tag>;
|
|
|
|
|
}
|
|
|
|
|
return <></>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 签订状态
|
|
|
|
|
*/
|
|
|
|
|
const renderAgreementStatus = () => {
|
2024-03-28 19:35:54 +08:00
|
|
|
|
if (props.isAgreement == 0) {
|
2024-03-27 18:56:48 +08:00
|
|
|
|
return <Tag color="error">未签署协议</Tag>;
|
|
|
|
|
}
|
2024-03-28 19:35:54 +08:00
|
|
|
|
if (props.isAgreement == 1) {
|
2024-03-27 18:56:48 +08:00
|
|
|
|
return <Tag color="success">已签署协议</Tag>;
|
|
|
|
|
}
|
|
|
|
|
return <></>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 结束状态
|
|
|
|
|
*/
|
|
|
|
|
const renderOverStatus = () => {
|
2024-03-28 19:35:54 +08:00
|
|
|
|
if (props.isOver == 0) {
|
2024-03-27 18:56:48 +08:00
|
|
|
|
return <Tag color="default">进行中</Tag>;
|
|
|
|
|
}
|
2024-03-28 19:35:54 +08:00
|
|
|
|
if (props.isOver == 1) {
|
2024-03-27 18:56:48 +08:00
|
|
|
|
return <Tag color="success">完成</Tag>;
|
|
|
|
|
}
|
2024-03-28 19:35:54 +08:00
|
|
|
|
if (props.isOver == 2) {
|
2024-03-27 18:56:48 +08:00
|
|
|
|
return <Tag color="error">终止</Tag>
|
|
|
|
|
}
|
|
|
|
|
return <></>;
|
|
|
|
|
}
|
2024-03-13 19:01:21 +08:00
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="card-proj-agent">
|
2024-05-10 11:33:40 +08:00
|
|
|
|
<div className='cardpro-agent-top'>
|
|
|
|
|
<div className='cardpro-agent-tlift'>
|
|
|
|
|
<a href="/#">{props.projName}</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div className='cardpro-agent-tright'>
|
|
|
|
|
<span className="agent">代理商:{props.basicsName}</span>
|
|
|
|
|
<span className="orderNo">订单号:{props.orderNumber}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<hr />
|
|
|
|
|
<div className='cardpro-agent-center'>
|
|
|
|
|
<div className='cardpro-agent-cTop'>
|
|
|
|
|
<div><span>金额¥:{props.orderShoppingAmount / 100}</span></div>
|
|
|
|
|
<div><span>{props.gmtCreate}</span></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className='cardpro-agent-cBot'>
|
|
|
|
|
<div className='cardpro-agent-cBot-left'>
|
|
|
|
|
<span>
|
|
|
|
|
<OrderedListOutlined />
|
|
|
|
|
<Badge dot count={props.orderAgreementStatus == 'AWAIT_SURE' ? 1 : 0}>
|
|
|
|
|
<a href="/#" onClick={(e) => {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
nav(`/agent-agreement/${props.orderId}`);
|
|
|
|
|
}}>协议清单</a>
|
|
|
|
|
</Badge>
|
|
|
|
|
</span>
|
|
|
|
|
<span style={{ marginLeft: '15px' }}>
|
|
|
|
|
<BarsOutlined />
|
|
|
|
|
<Badge size="small" count={props.isOver == 0 && props.materialAmendApplyCount ? props.materialAmendApplyCount : 0}>
|
|
|
|
|
<a href="/#" onClick={(e) => {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
nav(`/agent-correction/${props.orderId}`);
|
|
|
|
|
}}>代办列表</a>
|
|
|
|
|
</Badge>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div className='cardpro-agent-cBot-right'>
|
|
|
|
|
{
|
|
|
|
|
props.isResult ? (
|
|
|
|
|
<div >
|
|
|
|
|
<span>
|
|
|
|
|
<SearchOutlined />
|
|
|
|
|
<a href="/#" onClick={(e) => {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
nav(`/agent-result/${props.orderId}`);
|
|
|
|
|
}}>查看结果</a>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
) : <></>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{/* <div className="title">
|
2024-03-13 19:01:21 +08:00
|
|
|
|
<div className="left">
|
2024-03-27 18:56:48 +08:00
|
|
|
|
<a href="/#">{props.projName}</a>
|
2024-03-13 19:01:21 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div className="right">
|
2024-03-27 18:56:48 +08:00
|
|
|
|
<span className="agent">代理商:{props.basicsName}</span>
|
|
|
|
|
<span className="orderNo">订单号:{props.orderNumber}</span>
|
2024-03-13 19:01:21 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<hr/>
|
|
|
|
|
<div className="body">
|
|
|
|
|
<div className="line">
|
|
|
|
|
<div className="left">
|
2024-03-27 18:56:48 +08:00
|
|
|
|
<span>金额¥:{props.orderShoppingAmount / 100}</span>
|
2024-03-13 19:01:21 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div className="right">
|
2024-03-27 18:56:48 +08:00
|
|
|
|
<span>{props.gmtCreate}</span>
|
2024-03-13 19:01:21 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-04-12 14:12:38 +08:00
|
|
|
|
<div className="line" style={{height: '30px', lineHeight: '30px'}}>
|
2024-03-13 19:01:21 +08:00
|
|
|
|
<div className="left">
|
|
|
|
|
<span>
|
|
|
|
|
<OrderedListOutlined/>
|
2024-04-12 14:12:38 +08:00
|
|
|
|
<Badge dot count={props.orderAgreementStatus == 'AWAIT_SURE' ? 1 : 0}>
|
|
|
|
|
<a href="/#" onClick={(e) => {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
nav(`/agent-agreement/${props.orderId}`);
|
|
|
|
|
}}>协议清单</a>
|
|
|
|
|
</Badge>
|
2024-03-13 19:01:21 +08:00
|
|
|
|
</span>
|
2024-03-28 19:35:54 +08:00
|
|
|
|
<span style={{marginLeft: '15px'}}>
|
2024-04-12 14:12:38 +08:00
|
|
|
|
<BarsOutlined/>
|
|
|
|
|
<Badge size="small" count={props.isOver == 0 && props.materialAmendApplyCount ? props.materialAmendApplyCount : 0}>
|
|
|
|
|
<a href="/#" onClick={(e) => {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
nav(`/agent-correction/${props.orderId}`);
|
|
|
|
|
}}>代办列表</a>
|
|
|
|
|
</Badge>
|
2024-03-13 19:01:21 +08:00
|
|
|
|
</span>
|
|
|
|
|
</div>
|
2024-03-28 19:35:54 +08:00
|
|
|
|
{
|
|
|
|
|
props.isResult ? (
|
|
|
|
|
<div className="right">
|
|
|
|
|
<span>
|
|
|
|
|
<SearchOutlined/>
|
|
|
|
|
<a href="/#" onClick={(e) => {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
nav(`/agent-result/${props.orderId}`);
|
|
|
|
|
}}>查看结果</a>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
) : <></>
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-13 19:01:21 +08:00
|
|
|
|
</div>
|
2024-05-10 11:33:40 +08:00
|
|
|
|
</div> */}
|
|
|
|
|
<hr />
|
2024-03-13 19:01:21 +08:00
|
|
|
|
<div className="tail">
|
2024-03-28 19:35:54 +08:00
|
|
|
|
<div className="tail-left">
|
|
|
|
|
<span className="status order-status">{renderTakeStatus()}</span>
|
|
|
|
|
<span className="status agreement-status">{renderAgreementStatus()}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="tail-left">
|
|
|
|
|
<span className="status process-status">{renderOverStatus()}</span>
|
|
|
|
|
</div>
|
2024-03-13 19:01:21 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|