feat:相关方人员及车辆管理

master
dearLin 2026-03-27 17:01:40 +08:00
parent 4ea4964b03
commit 56aff1816e
2 changed files with 49 additions and 35 deletions

View File

@ -15,13 +15,14 @@ import useGetFile from "zy-react-library/hooks/useGetFile";
import useTable from "zy-react-library/hooks/useTable"; import useTable from "zy-react-library/hooks/useTable";
import { getLabelName } from "zy-react-library/utils"; import { getLabelName } from "zy-react-library/utils";
import { VEHICLE_AUDIT_STATUS_ENUM } from "~/enumerate/constant"; import { VEHICLE_AUDIT_STATUS_ENUM } from "~/enumerate/constant";
import { NS_FIRST_LEVEL_DOOR_INFO, NS_TEMPORARY_VEHICLE, NS_VEHICLE_AUDIT } from "~/enumerate/namespace"; import { NS_FIRST_LEVEL_DOOR_INFO, NS_TEMPORARY_VEHICLE, NS_VEHICLE_AUDIT,NS_VEHICLE_APPLY } from "~/enumerate/namespace";
function List(props) { function List(props) {
const [qrCodeModalVisible, setQrCodeModalVisible] = useState(false); const [qrCodeModalVisible, setQrCodeModalVisible] = useState(false);
const [reviewModalVisible, setReviewModalVisible] = useState(false); const [reviewModalVisible, setReviewModalVisible] = useState(false);
const [approvalDetailsModalVisible, setApprovalDetailsModalVisible] = useState(false); const [approvalDetailsModalVisible, setApprovalDetailsModalVisible] = useState(false);
const [currentId, setCurrentId] = useState(""); const [currentId, setCurrentId] = useState("");
const [vehicleApplyId, setCurrentVehicleApplyId] = useState("");
const [firstLevelDoorInfoListAll, setFirstLevelDoorInfoListAll] = useState([]); const [firstLevelDoorInfoListAll, setFirstLevelDoorInfoListAll] = useState([]);
const [form] = Search.useForm(); const [form] = Search.useForm();
@ -110,29 +111,31 @@ function List(props) {
<Button <Button
type="link" type="link"
onClick={() => { onClick={() => {
props.history.push(`./view?id=${record.id}`); props.history.push(`./view?id=${record.vehicleApplyId}`);
}} }}
> >
查看 查看
</Button> </Button>
)} )}
{props.permission(props.auditInfoBtn || "jgd-entry-temp-vehicle-audit-info") && ( {/*{props.permission(props.auditInfoBtn || "jgd-entry-temp-vehicle-audit-info") && (*/}
<Button {/* <Button*/}
type="link" {/* type="link"*/}
onClick={() => { {/* onClick={() => {*/}
setApprovalDetailsModalVisible(true); {/* setApprovalDetailsModalVisible(true);*/}
setCurrentId(record.id); {/* setCurrentId(record.id);*/}
}} {/* setCurrentVehicleApplyId(record.vehicleApplyId);*/}
> {/* }}*/}
审批详情 {/* >*/}
</Button> {/* 审批详情*/}
)} {/* </Button>*/}
{/*)}*/}
{(!props.isRecords && record.currentUserCanAudit === 1 && props.permission(props.auditBtn || "jgd-entry-temp-vehicle-audit")) && ( {(!props.isRecords && record.currentUserCanAudit === 1 && props.permission(props.auditBtn || "jgd-entry-temp-vehicle-audit")) && (
<Button <Button
type="link" type="link"
onClick={() => { onClick={() => {
setReviewModalVisible(true); setReviewModalVisible(true);
setCurrentId(record.id); setCurrentId(record.id);
setCurrentVehicleApplyId(record.vehicleApplyId);
}} }}
> >
审核 审核
@ -158,6 +161,7 @@ function List(props) {
reviewModalVisible && ( reviewModalVisible && (
<ReviewModal <ReviewModal
id={currentId} id={currentId}
vehicleApplyId={vehicleApplyId}
onCancel={() => { onCancel={() => {
setReviewModalVisible(false); setReviewModalVisible(false);
setCurrentId(""); setCurrentId("");
@ -170,6 +174,7 @@ function List(props) {
approvalDetailsModalVisible && ( approvalDetailsModalVisible && (
<ApprovalDetailsModal <ApprovalDetailsModal
id={currentId} id={currentId}
vehicleApplyId={vehicleApplyId}
onCancel={() => { onCancel={() => {
setApprovalDetailsModalVisible(false); setApprovalDetailsModalVisible(false);
setCurrentId(""); setCurrentId("");
@ -208,7 +213,7 @@ const ReviewModalComponent = (props) => {
const [info, setInfo] = useState({}); const [info, setInfo] = useState({});
const getData = async () => { const getData = async () => {
const { data } = await props["vehicleApplyInfo"]({ id: props.id }); const { data } = await props["vehicleApplyInfo"]({ id: props.vehicleApplyId });
const drivingLicenseFile = await getFile({ const drivingLicenseFile = await getFile({
eqType: UPLOAD_FILE_TYPE_ENUM[601], eqType: UPLOAD_FILE_TYPE_ENUM[601],
eqForeignKey: data.drivingLicenseId, eqForeignKey: data.drivingLicenseId,
@ -230,6 +235,7 @@ const ReviewModalComponent = (props) => {
const onSubmit = async (values) => { const onSubmit = async (values) => {
const { success } = await props["vehicleAuditApproval"]({ const { success } = await props["vehicleAuditApproval"]({
...values, ...values,
vehicleApplyId: props.vehicleApplyId,
id: props.id, id: props.id,
}); });
if (success) { if (success) {
@ -257,8 +263,8 @@ const ReviewModalComponent = (props) => {
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "访问人姓名", children: info.employeeVehicleUserName }, { label: "访问人姓名", children: info.employeeVehicleUserName },
{ label: "手机号", children: info.todo2 }, { label: "手机号", children: info.lsUserPhone },
{ label: "身份证号", children: info.todo3 }, { label: "身份证号", children: info.lsUserIdcard },
{ label: "车牌号", children: info.licenceNo }, { label: "车牌号", children: info.licenceNo },
{ label: "车牌类型", children: info.licenceTypeName }, { label: "车牌类型", children: info.licenceTypeName },
{ label: "车辆类型", children: info.vehicleTypeName }, { label: "车辆类型", children: info.vehicleTypeName },
@ -386,7 +392,7 @@ const ApprovalDetailsModalComponent = (props) => {
); );
}; };
const ReviewModal = Connect([NS_VEHICLE_AUDIT], true)(ReviewModalComponent); const ReviewModal = Connect([NS_VEHICLE_AUDIT,NS_VEHICLE_APPLY], true)(ReviewModalComponent);
const ApprovalDetailsModal = Connect([NS_TEMPORARY_VEHICLE], true)(ApprovalDetailsModalComponent); const ApprovalDetailsModal = Connect([NS_TEMPORARY_VEHICLE], true)(ApprovalDetailsModalComponent);
export default Connect([NS_VEHICLE_AUDIT, NS_FIRST_LEVEL_DOOR_INFO], true)(Permission(List)); export default Connect([NS_VEHICLE_AUDIT,NS_VEHICLE_APPLY, NS_FIRST_LEVEL_DOOR_INFO], true)(Permission(List));

View File

@ -6,14 +6,15 @@ import PreviewImg from "zy-react-library/components/PreviewImg";
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj"; import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
import useGetFile from "zy-react-library/hooks/useGetFile"; import useGetFile from "zy-react-library/hooks/useGetFile";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import { NS_VEHICLE_AUDIT } from "~/enumerate/namespace"; import { NS_VEHICLE_APPLY } from "~/enumerate/namespace";
import {getLabelName} from "zy-react-library/utils";
import {VEHICLE_AUDIT_STATUS_ENUM} from "~/enumerate/constant";
function View(props) { function View(props) {
const query = useGetUrlQuery(); const query = useGetUrlQuery();
const { loading: getFileLoading, getFile } = useGetFile(); const { loading: getFileLoading, getFile } = useGetFile();
const { info, setInfo } = useState({}); const [ info, setInfo ] = useState({});
const getData = async () => { const getData = async () => {
const { data } = await props["vehicleApplyInfo"]({ id: query.id }); const { data } = await props["vehicleApplyInfo"]({ id: query.id });
const drivingLicenseFile = await getFile({ const drivingLicenseFile = await getFile({
@ -36,7 +37,7 @@ function View(props) {
return ( return (
<Page headerTitle="查看" contentPadding="0 20px 20px 20px"> <Page headerTitle="查看" contentPadding="0 20px 20px 20px">
<Spin spinning={props.vehicleAudit.vehicleAuditLoading || getFileLoading}> <Spin spinning={props.vehicleApply.vehicleApplyLoading || getFileLoading}>
<Divider orientation="left">申请信息</Divider> <Divider orientation="left">申请信息</Divider>
<Descriptions <Descriptions
column={2} column={2}
@ -44,8 +45,8 @@ function View(props) {
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "访问人姓名", children: info.employeeVehicleUserName }, { label: "访问人姓名", children: info.employeeVehicleUserName },
{ label: "手机号", children: info.todo2 }, { label: "手机号", children: info.lsUserPhone },
{ label: "身份证号", children: info.todo3 }, { label: "身份证号", children: info.lsUserIdcard },
{ label: "车牌号", children: info.licenceNo }, { label: "车牌号", children: info.licenceNo },
{ label: "车牌类型", children: info.licenceTypeName }, { label: "车牌类型", children: info.licenceTypeName },
{ label: "车辆类型", children: info.vehicleTypeName }, { label: "车辆类型", children: info.vehicleTypeName },
@ -60,19 +61,26 @@ function View(props) {
]} ]}
/> />
<Divider orientation="left">审批信息</Divider> <Divider orientation="left">审批信息</Divider>
{
info.vehicleAuditLogList && info.vehicleAuditLogList.map((item, index) => (
<Descriptions <Descriptions
key={index}
column={2} column={2}
bordered bordered
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "审批企业", children: info.auditCorpName }, { label: "审批企业", children: item.auditCorpName },
{ label: "审批部门", children: info.auditDeptName }, { label: "审批部门", children: item.auditDeptName },
{ label: "审批人", children: info.auditUserName }, { label: "审批人", children: item.auditUserName },
{ label: "审批状态", children: getLabelName({ list: VEHICLE_AUDIT_STATUS_ENUM, status: item.auditStatus+'' }) },
...(item.auditStatus === 0 ? [] : [{ label: "审批时间", children: item.auditTime }, { label: "驳回原因", children: item.remarks }]),
]} ]}
/> />
))
}
</Spin> </Spin>
</Page> </Page>
); );
} }
export default Connect([NS_VEHICLE_AUDIT], true)(View); export default Connect([NS_VEHICLE_APPLY], true)(View);