2024-03-13 19:01:21 +08:00
|
|
|
|
import './card-proj-agent.css'
|
2024-03-28 19:35:54 +08:00
|
|
|
|
import {OrderedListOutlined, BarsOutlined, SearchOutlined} from "@ant-design/icons";
|
|
|
|
|
import {Tag} from 'antd';
|
2024-03-27 18:56:48 +08:00
|
|
|
|
import {IAgent} from "../../interfaces/agent/IAgent.ts";
|
2024-03-28 19:35:54 +08:00
|
|
|
|
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">
|
|
|
|
|
<div className="title">
|
|
|
|
|
<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>
|
|
|
|
|
<div className="line">
|
|
|
|
|
<div className="left">
|
|
|
|
|
<span>
|
|
|
|
|
<OrderedListOutlined/>
|
2024-03-28 19:35:54 +08:00
|
|
|
|
<a href="/#" onClick={(e) => {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
nav(`/agent-agreement/${props.orderId}`);
|
|
|
|
|
}}>协议清单</a>
|
2024-03-13 19:01:21 +08:00
|
|
|
|
</span>
|
2024-03-28 19:35:54 +08:00
|
|
|
|
<span style={{marginLeft: '15px'}}>
|
|
|
|
|
<BarsOutlined />
|
|
|
|
|
<a href="/#" onClick={(e) => {
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
nav(`/agent-correction/${props.orderId}`);
|
|
|
|
|
}}>补正数量({props.materialAmendApplyCount})</a>
|
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>
|
|
|
|
|
</div>
|
|
|
|
|
<hr/>
|
|
|
|
|
<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>
|
|
|
|
|
)
|
|
|
|
|
}
|