feat:相关方人员及车辆管理
parent
4ea4964b03
commit
56aff1816e
|
|
@ -15,13 +15,14 @@ import useGetFile from "zy-react-library/hooks/useGetFile";
|
|||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { getLabelName } from "zy-react-library/utils";
|
||||
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) {
|
||||
const [qrCodeModalVisible, setQrCodeModalVisible] = useState(false);
|
||||
const [reviewModalVisible, setReviewModalVisible] = useState(false);
|
||||
const [approvalDetailsModalVisible, setApprovalDetailsModalVisible] = useState(false);
|
||||
const [currentId, setCurrentId] = useState("");
|
||||
const [vehicleApplyId, setCurrentVehicleApplyId] = useState("");
|
||||
const [firstLevelDoorInfoListAll, setFirstLevelDoorInfoListAll] = useState([]);
|
||||
|
||||
const [form] = Search.useForm();
|
||||
|
|
@ -110,29 +111,31 @@ function List(props) {
|
|||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./view?id=${record.id}`);
|
||||
props.history.push(`./view?id=${record.vehicleApplyId}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
)}
|
||||
{props.permission(props.auditInfoBtn || "jgd-entry-temp-vehicle-audit-info") && (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
setApprovalDetailsModalVisible(true);
|
||||
setCurrentId(record.id);
|
||||
}}
|
||||
>
|
||||
审批详情
|
||||
</Button>
|
||||
)}
|
||||
{/*{props.permission(props.auditInfoBtn || "jgd-entry-temp-vehicle-audit-info") && (*/}
|
||||
{/* <Button*/}
|
||||
{/* type="link"*/}
|
||||
{/* onClick={() => {*/}
|
||||
{/* setApprovalDetailsModalVisible(true);*/}
|
||||
{/* setCurrentId(record.id);*/}
|
||||
{/* setCurrentVehicleApplyId(record.vehicleApplyId);*/}
|
||||
{/* }}*/}
|
||||
{/* >*/}
|
||||
{/* 审批详情*/}
|
||||
{/* </Button>*/}
|
||||
{/*)}*/}
|
||||
{(!props.isRecords && record.currentUserCanAudit === 1 && props.permission(props.auditBtn || "jgd-entry-temp-vehicle-audit")) && (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
setReviewModalVisible(true);
|
||||
setCurrentId(record.id);
|
||||
setCurrentVehicleApplyId(record.vehicleApplyId);
|
||||
}}
|
||||
>
|
||||
审核
|
||||
|
|
@ -158,6 +161,7 @@ function List(props) {
|
|||
reviewModalVisible && (
|
||||
<ReviewModal
|
||||
id={currentId}
|
||||
vehicleApplyId={vehicleApplyId}
|
||||
onCancel={() => {
|
||||
setReviewModalVisible(false);
|
||||
setCurrentId("");
|
||||
|
|
@ -170,6 +174,7 @@ function List(props) {
|
|||
approvalDetailsModalVisible && (
|
||||
<ApprovalDetailsModal
|
||||
id={currentId}
|
||||
vehicleApplyId={vehicleApplyId}
|
||||
onCancel={() => {
|
||||
setApprovalDetailsModalVisible(false);
|
||||
setCurrentId("");
|
||||
|
|
@ -208,7 +213,7 @@ const ReviewModalComponent = (props) => {
|
|||
const [info, setInfo] = useState({});
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["vehicleApplyInfo"]({ id: props.id });
|
||||
const { data } = await props["vehicleApplyInfo"]({ id: props.vehicleApplyId });
|
||||
const drivingLicenseFile = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM[601],
|
||||
eqForeignKey: data.drivingLicenseId,
|
||||
|
|
@ -230,6 +235,7 @@ const ReviewModalComponent = (props) => {
|
|||
const onSubmit = async (values) => {
|
||||
const { success } = await props["vehicleAuditApproval"]({
|
||||
...values,
|
||||
vehicleApplyId: props.vehicleApplyId,
|
||||
id: props.id,
|
||||
});
|
||||
if (success) {
|
||||
|
|
@ -257,8 +263,8 @@ const ReviewModalComponent = (props) => {
|
|||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "访问人姓名", children: info.employeeVehicleUserName },
|
||||
{ label: "手机号", children: info.todo2 },
|
||||
{ label: "身份证号", children: info.todo3 },
|
||||
{ label: "手机号", children: info.lsUserPhone },
|
||||
{ label: "身份证号", children: info.lsUserIdcard },
|
||||
{ label: "车牌号", children: info.licenceNo },
|
||||
{ label: "车牌类型", children: info.licenceTypeName },
|
||||
{ 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);
|
||||
|
||||
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));
|
||||
|
|
|
|||
|
|
@ -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 useGetFile from "zy-react-library/hooks/useGetFile";
|
||||
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) {
|
||||
const query = useGetUrlQuery();
|
||||
const { loading: getFileLoading, getFile } = useGetFile();
|
||||
|
||||
const { info, setInfo } = useState({});
|
||||
|
||||
const [ info, setInfo ] = useState({});
|
||||
const getData = async () => {
|
||||
const { data } = await props["vehicleApplyInfo"]({ id: query.id });
|
||||
const drivingLicenseFile = await getFile({
|
||||
|
|
@ -36,7 +37,7 @@ function View(props) {
|
|||
|
||||
return (
|
||||
<Page headerTitle="查看" contentPadding="0 20px 20px 20px">
|
||||
<Spin spinning={props.vehicleAudit.vehicleAuditLoading || getFileLoading}>
|
||||
<Spin spinning={props.vehicleApply.vehicleApplyLoading || getFileLoading}>
|
||||
<Divider orientation="left">申请信息</Divider>
|
||||
<Descriptions
|
||||
column={2}
|
||||
|
|
@ -44,8 +45,8 @@ function View(props) {
|
|||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "访问人姓名", children: info.employeeVehicleUserName },
|
||||
{ label: "手机号", children: info.todo2 },
|
||||
{ label: "身份证号", children: info.todo3 },
|
||||
{ label: "手机号", children: info.lsUserPhone },
|
||||
{ label: "身份证号", children: info.lsUserIdcard },
|
||||
{ label: "车牌号", children: info.licenceNo },
|
||||
{ label: "车牌类型", children: info.licenceTypeName },
|
||||
{ label: "车辆类型", children: info.vehicleTypeName },
|
||||
|
|
@ -60,19 +61,26 @@ function View(props) {
|
|||
]}
|
||||
/>
|
||||
<Divider orientation="left">审批信息</Divider>
|
||||
{
|
||||
info.vehicleAuditLogList && info.vehicleAuditLogList.map((item, index) => (
|
||||
<Descriptions
|
||||
key={index}
|
||||
column={2}
|
||||
bordered
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "审批企业", children: info.auditCorpName },
|
||||
{ label: "审批部门", children: info.auditDeptName },
|
||||
{ label: "审批人", children: info.auditUserName },
|
||||
{ label: "审批企业", children: item.auditCorpName },
|
||||
{ label: "审批部门", children: item.auditDeptName },
|
||||
{ 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>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_VEHICLE_AUDIT], true)(View);
|
||||
export default Connect([NS_VEHICLE_APPLY], true)(View);
|
||||
|
|
|
|||
Loading…
Reference in New Issue