封闭区域企业端
parent
ff88e0b621
commit
ab784f4e9f
|
|
@ -55,6 +55,10 @@
|
|||
- `/primeport/container/enterprise/enclosedArea/personnelReview/temporaryPersonnelReview/list` 人员审核/临时人员审核
|
||||
- `/primeport/container/enterprise/enclosedArea/personnelReview/longTermPersonnelReviewRecords/list` 人员审核/长期人员审核记录
|
||||
- `/primeport/container/enterprise/enclosedArea/personnelReview/temporaryPersonnelReviewRecords/list` 人员审核/临时访客人员记录
|
||||
- `/primeport/container/enterprise/enclosedArea/vehicleReview/longTermVehicleReview/list` 车辆审核/长期车辆审核
|
||||
- `/primeport/container/enterprise/enclosedArea/vehicleReview/temporaryVehicleReview/list` 车辆审核/临时车辆审核
|
||||
- `/primeport/container/enterprise/enclosedArea/vehicleReview/longTermVehicleReviewRecords/list` 车辆审核/长期车辆审核记录
|
||||
- `/primeport/container/enterprise/enclosedArea/vehicleReview/temporaryVehicleReviewRecords/list` 车辆审核/临时车辆审核记录
|
||||
|
||||
|
||||
### 相关方端
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const enclosedLongTermVehicleReviewList = declareRequest(
|
||||
"enclosedLongTermVehicleReviewLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const enclosedLongTermVehicleReviewSubmit = declareRequest(
|
||||
"enclosedLongTermVehicleReviewLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const enclosedLongTermVehicleReviewRecordsList = declareRequest(
|
||||
"enclosedLongTermVehicleReviewLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const enclosedLongTermVehicleReviewRecordsRejectReason = declareRequest(
|
||||
"enclosedLongTermVehicleReviewLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const enclosedTemporaryVehicleReviewList = declareRequest(
|
||||
"enclosedTemporaryVehicleReviewLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const enclosedTemporaryVehicleReviewInfo = declareRequest(
|
||||
"enclosedTemporaryVehicleReviewLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const enclosedTemporaryVehicleReviewSubmit = declareRequest(
|
||||
"enclosedTemporaryVehicleReviewLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const enclosedTemporaryVehicleReviewRecordsList = declareRequest(
|
||||
"enclosedTemporaryVehicleReviewLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const enclosedTemporaryVehicleReviewRecordsRejectReason = declareRequest(
|
||||
"enclosedTemporaryVehicleReviewLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
|
|
@ -31,3 +31,5 @@ export const NS_ENCLOSED_PERSONNEL_AND_VEHICLE_STATISTICS = defineNamespace("enc
|
|||
export const NS_ENCLOSED_ENTERPRISE_PERSONNEL_PERMISSIONS = defineNamespace("enclosedEnterprisePersonnelPermissions");
|
||||
export const NS_ENCLOSED_LONG_TERM_PERSONNEL_REVIEW = defineNamespace("enclosedLongTermPersonnelReview");
|
||||
export const NS_ENCLOSED_TEMPORARY_PERSONNEL_REVIEW = defineNamespace("enclosedTemporaryPersonnelReview");
|
||||
export const NS_ENCLOSED_LONG_TERM_VEHICLE_REVIEW = defineNamespace("enclosedLongTermVehicleReview");
|
||||
export const NS_ENCLOSED_TEMPORARY_VEHICLE_REVIEW = defineNamespace("enclosedTemporaryVehicleReview");
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import useTable from "zy-react-library/hooks/useTable";
|
|||
import { getLabelName } from "zy-react-library/utils";
|
||||
import { NS_ENCLOSED_LONG_TERM_PERSONNEL_REVIEW } from "~/enumerate/namespace";
|
||||
|
||||
const BELONGING_END_ENUM = [
|
||||
export const BELONGING_END_ENUM = [
|
||||
{ bianma: "stakeholder", name: "相关方端" },
|
||||
{ bianma: "supervision", name: "监管端" },
|
||||
{ bianma: "enterprise", name: "企业端" },
|
||||
|
|
|
|||
|
|
@ -7,12 +7,7 @@ import Table from "zy-react-library/components/Table";
|
|||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { getLabelName } from "zy-react-library/utils";
|
||||
import { NS_ENCLOSED_LONG_TERM_PERSONNEL_REVIEW } from "~/enumerate/namespace";
|
||||
|
||||
const BELONGING_END_ENUM = [
|
||||
{ bianma: "stakeholder", name: "相关方端" },
|
||||
{ bianma: "supervision", name: "监管端" },
|
||||
{ bianma: "enterprise", name: "企业端" },
|
||||
];
|
||||
import { BELONGING_END_ENUM } from "../../LongTermPersonnelReview/List";
|
||||
|
||||
function List(props) {
|
||||
const [viewRejectReasonModalVisible, setViewRejectReasonModalVisible] = useState(false);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,71 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form } from "antd";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { getLabelName } from "zy-react-library/utils";
|
||||
import { NS_ENCLOSED_LONG_TERM_VEHICLE_REVIEW } from "~/enumerate/namespace";
|
||||
|
||||
export const BELONGING_END_ENUM = [
|
||||
{ bianma: "stakeholder", name: "相关方端" },
|
||||
{ bianma: "supervision", name: "监管端" },
|
||||
{ bianma: "enterprise", name: "企业端" },
|
||||
{ bianma: "internal", name: "内部车辆" },
|
||||
];
|
||||
|
||||
function List(props) {
|
||||
const [form] = Form.useForm();
|
||||
const { tableProps, getData } = useTable(props["enclosedLongTermVehicleReviewList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo1", label: "人员姓名" },
|
||||
{ name: "todo2", label: "车牌号" },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
columns={[
|
||||
{
|
||||
title: "申请来源",
|
||||
dataIndex: "todo1",
|
||||
render: (_, record) => getLabelName({ list: BELONGING_END_ENUM, status: record.todo1 }),
|
||||
},
|
||||
{ title: "车辆类型", dataIndex: "todo2" },
|
||||
{ title: "车牌号", dataIndex: "todo3" },
|
||||
{ title: "驾驶人姓名", dataIndex: "todo4" },
|
||||
{ title: "手机号", dataIndex: "todo5" },
|
||||
{ title: "部门", dataIndex: "todo6" },
|
||||
{ title: "申请区域", dataIndex: "todo7" },
|
||||
{ title: "申请时间范围", dataIndex: "todo8", render: (_, record) => `${record.todo8} - ${record.todo9}` },
|
||||
{ title: "审核状态", dataIndex: "todo10" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 80,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
const entrance = BELONGING_END_ENUM.find(item => item.bianma === record.todo1).bianma;
|
||||
props.history.push(`./review?id=${record.id}&entrance=${entrance}`);
|
||||
}}
|
||||
>
|
||||
审核
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_ENCLOSED_LONG_TERM_VEHICLE_REVIEW], true)(List);
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Form, message } from "antd";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_ENCLOSED_LONG_TERM_VEHICLE_REVIEW } from "~/enumerate/namespace";
|
||||
import ViewPage from "~/pages/Container/Supervision/EnclosedArea/Apply/Vehicle/View";
|
||||
|
||||
function Review(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props["enclosedLongTermVehicleReviewSubmit"]({
|
||||
...values,
|
||||
id: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success("提交成功");
|
||||
props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<ViewPage
|
||||
headerTitle="审核"
|
||||
entrance={query.entrance}
|
||||
isShowFooter={false}
|
||||
{...props}
|
||||
>
|
||||
<FormBuilder
|
||||
style={{ marginTop: 20 }}
|
||||
span={24}
|
||||
onFinish={onSubmit}
|
||||
values={{
|
||||
todo1: "1",
|
||||
}}
|
||||
loading={props.enclosedLongTermVehicleReview.enclosedLongTermVehicleReviewLoading}
|
||||
options={[
|
||||
{
|
||||
name: "todo1",
|
||||
label: "是否通过审核",
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: [{ bianma: "1", name: "是" }, { bianma: "0", name: "否" }],
|
||||
},
|
||||
{
|
||||
name: "todo2",
|
||||
label: "驳回原因",
|
||||
render: FORM_ITEM_RENDER_ENUM.TEXTAREA,
|
||||
dependencies: ["todo1"],
|
||||
hidden: formValues => !(formValues.todo1 === "0"),
|
||||
},
|
||||
]}
|
||||
form={form}
|
||||
/>
|
||||
</ViewPage>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_ENCLOSED_LONG_TERM_VEHICLE_REVIEW], true)(Review);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function longTermVehicleReview(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default longTermVehicleReview;
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, Form, Modal, Space } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { getLabelName } from "zy-react-library/utils";
|
||||
import { NS_ENCLOSED_LONG_TERM_VEHICLE_REVIEW } from "~/enumerate/namespace";
|
||||
import { BELONGING_END_ENUM } from "../../LongTermVehicleReview/List";
|
||||
|
||||
function List(props) {
|
||||
const [viewRejectReasonModalVisible, setViewRejectReasonModalVisible] = useState(false);
|
||||
const [currentId, setCurrentId] = useState("");
|
||||
|
||||
const [form] = Form.useForm();
|
||||
const { tableProps, getData } = useTable(props["enclosedLongTermVehicleReviewRecordsList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo1", label: "人员姓名" },
|
||||
{ name: "todo2", label: "车牌号" },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
columns={[
|
||||
{
|
||||
title: "申请来源",
|
||||
dataIndex: "todo1",
|
||||
render: (_, record) => getLabelName({ list: BELONGING_END_ENUM, status: record.todo1 }),
|
||||
},
|
||||
{ title: "车辆类型", dataIndex: "todo2" },
|
||||
{ title: "车牌号", dataIndex: "todo3" },
|
||||
{ title: "驾驶人姓名", dataIndex: "todo4" },
|
||||
{ title: "手机号", dataIndex: "todo5" },
|
||||
{ title: "部门", dataIndex: "todo6" },
|
||||
{ title: "申请区域", dataIndex: "todo7" },
|
||||
{ title: "申请时间范围", dataIndex: "todo8", render: (_, record) => `${record.todo8} - ${record.todo9}` },
|
||||
{ title: "审核状态", dataIndex: "todo10" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 80,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
const entrance = BELONGING_END_ENUM.find(item => item.bianma === record.todo1).bianma;
|
||||
props.history.push(`./view?id=${record.id}&entrance=${entrance}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
setViewRejectReasonModalVisible(true);
|
||||
setCurrentId(record.id);
|
||||
}}
|
||||
>
|
||||
驳回原因
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
{
|
||||
viewRejectReasonModalVisible && (
|
||||
<ViewRejectReasonModal
|
||||
id={currentId}
|
||||
onCancel={() => {
|
||||
setViewRejectReasonModalVisible(false);
|
||||
setCurrentId("");
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
const ViewRejectReasonModalComponent = (props) => {
|
||||
const [info, setInfo] = useState({});
|
||||
const getData = async () => {
|
||||
const { data } = await props["enclosedLongTermVehicleReviewRecordsRejectReason"]({ id: props.id });
|
||||
setInfo(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
open
|
||||
title="驳回原因"
|
||||
maskClosable={false}
|
||||
onCancel={props.onCancel}
|
||||
width={600}
|
||||
footer={[
|
||||
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
|
||||
]}
|
||||
loading={props.enclosedLongTermVehicleReview.enclosedLongTermVehicleReviewLoading}
|
||||
>
|
||||
<Descriptions
|
||||
column={1}
|
||||
bordered
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "驳回原因", children: info.todo1 },
|
||||
]}
|
||||
/>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
const ViewRejectReasonModal = Connect([NS_ENCLOSED_LONG_TERM_VEHICLE_REVIEW], true)(ViewRejectReasonModalComponent);
|
||||
|
||||
export default Connect([NS_ENCLOSED_LONG_TERM_VEHICLE_REVIEW], true)(List);
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import ViewPage from "~/pages/Container/Supervision/EnclosedArea/Apply/Vehicle/View";
|
||||
|
||||
function View(props) {
|
||||
const query = useGetUrlQuery();
|
||||
|
||||
return (<ViewPage entrance={query.entrance} {...props} />);
|
||||
}
|
||||
|
||||
export default View;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function LongTermVehicleReviewRecords(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default LongTermVehicleReviewRecords;
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form } from "antd";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_ENCLOSED_TEMPORARY_VEHICLE_REVIEW } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
const [form] = Form.useForm();
|
||||
const { tableProps, getData } = useTable(props["enclosedTemporaryVehicleReviewList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo1", label: "姓名" },
|
||||
{ name: "todo2", label: "车牌号" },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "车辆类型", dataIndex: "todo2" },
|
||||
{ title: "车牌号", dataIndex: "todo3" },
|
||||
{ title: "姓名", dataIndex: "todo4" },
|
||||
{ title: "身份证号", dataIndex: "todo5" },
|
||||
{ title: "手机号", dataIndex: "todo6" },
|
||||
{ title: "申请区域", dataIndex: "todo7" },
|
||||
{ title: "口门名称", dataIndex: "todo11" },
|
||||
{ title: "申请时间范围", dataIndex: "todo8", render: (_, record) => `${record.todo8} - ${record.todo9}` },
|
||||
{ title: "审核状态", dataIndex: "todo10" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 80,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./review?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
审核
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_ENCLOSED_TEMPORARY_VEHICLE_REVIEW], true)(List);
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Descriptions, Divider, Form, message, Spin } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import PreviewImg from "zy-react-library/components/PreviewImg";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_ENCLOSED_TEMPORARY_VEHICLE_REVIEW } from "~/enumerate/namespace";
|
||||
|
||||
function Review(props) {
|
||||
const [info, setInfo] = useState({});
|
||||
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["enclosedTemporaryVehicleReviewInfo"]({ id: query.id });
|
||||
setInfo(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props["enclosedTemporaryVehicleReviewSubmit"]({
|
||||
...values,
|
||||
id: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success("提交成功");
|
||||
props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle={props.headerTitle || "审核"} contentPadding="0 20px 20px 20px" isShowFooter={props.isShowFooter || false}>
|
||||
<Spin spinning={props.enclosedTemporaryVehicleReview.enclosedTemporaryVehicleReviewLoading}>
|
||||
<Divider orientation="left">车辆信息</Divider>
|
||||
<Descriptions
|
||||
bordered
|
||||
column={2}
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "车辆类型", children: info.todo1 },
|
||||
{ label: "车牌类型", children: info.todo2 },
|
||||
{ label: "车牌号", children: info.todo3 },
|
||||
{ label: "驾驶人姓名", children: info.todo4 },
|
||||
{ label: "手机号", children: info.todo5 },
|
||||
{ label: "身份证号", children: info.todo6 },
|
||||
{ label: "申请区域", children: info.todo7 },
|
||||
{ label: "口门名称", children: info.todo8 },
|
||||
{ label: "申请时间范围", children: `${info.todo9} - ${info.todo10}` },
|
||||
{ label: "车辆照片", children: (<PreviewImg files={info.todo11} />) },
|
||||
{ label: "行驶证照片", children: (<PreviewImg files={info.todo12} />) },
|
||||
{ label: "申请原因", children: info.todo13 },
|
||||
{ label: "申请人员签字", children: (<PreviewImg files={info.todo14} />) },
|
||||
]}
|
||||
/>
|
||||
{!props.headerTitle && (
|
||||
<FormBuilder
|
||||
style={{ marginTop: 20 }}
|
||||
span={24}
|
||||
onFinish={onSubmit}
|
||||
values={{
|
||||
todo1: "1",
|
||||
}}
|
||||
options={[
|
||||
{
|
||||
name: "todo1",
|
||||
label: "是否通过审核",
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: [{ bianma: "1", name: "是" }, { bianma: "0", name: "否" }],
|
||||
},
|
||||
{
|
||||
name: "todo2",
|
||||
label: "驳回原因",
|
||||
render: FORM_ITEM_RENDER_ENUM.TEXTAREA,
|
||||
dependencies: ["todo1"],
|
||||
hidden: formValues => !(formValues.todo1 === "0"),
|
||||
},
|
||||
]}
|
||||
form={form}
|
||||
/>
|
||||
)}
|
||||
</Spin>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_ENCLOSED_TEMPORARY_VEHICLE_REVIEW], true)(Review);
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function TemporaryVehicleReview(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default TemporaryVehicleReview;
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, Form, Modal, Space } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_ENCLOSED_TEMPORARY_VEHICLE_REVIEW } from "~/enumerate/namespace";
|
||||
import { BELONGING_END_ENUM } from "~/pages/Container/Enterprise/EnclosedArea/VehicleReview/LongTermVehicleReview/List";
|
||||
|
||||
function List(props) {
|
||||
const [viewRejectReasonModalVisible, setViewRejectReasonModalVisible] = useState(false);
|
||||
const [currentId, setCurrentId] = useState("");
|
||||
|
||||
const [form] = Form.useForm();
|
||||
const { tableProps, getData } = useTable(props["enclosedTemporaryVehicleReviewRecordsList"], {
|
||||
form,
|
||||
});
|
||||
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
options={[
|
||||
{ name: "todo1", label: "姓名" },
|
||||
{ name: "todo2", label: "车牌号" },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "车辆类型", dataIndex: "todo2" },
|
||||
{ title: "车牌号", dataIndex: "todo3" },
|
||||
{ title: "姓名", dataIndex: "todo4" },
|
||||
{ title: "身份证号", dataIndex: "todo5" },
|
||||
{ title: "手机号", dataIndex: "todo6" },
|
||||
{ title: "申请区域", dataIndex: "todo7" },
|
||||
{ title: "口门名称", dataIndex: "todo11" },
|
||||
{ title: "申请时间范围", dataIndex: "todo8", render: (_, record) => `${record.todo8} - ${record.todo9}` },
|
||||
{ title: "审核状态", dataIndex: "todo10" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 80,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
const entrance = BELONGING_END_ENUM.find(item => item.bianma === record.todo1).bianma;
|
||||
props.history.push(`./view?id=${record.id}&entrance=${entrance}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
setViewRejectReasonModalVisible(true);
|
||||
setCurrentId(record.id);
|
||||
}}
|
||||
>
|
||||
驳回原因
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
{
|
||||
viewRejectReasonModalVisible && (
|
||||
<ViewRejectReasonModal
|
||||
id={currentId}
|
||||
onCancel={() => {
|
||||
setViewRejectReasonModalVisible(false);
|
||||
setCurrentId("");
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
const ViewRejectReasonModalComponent = (props) => {
|
||||
const [info, setInfo] = useState({});
|
||||
const getData = async () => {
|
||||
const { data } = await props["enclosedTemporaryVehicleReviewRecordsRejectReason"]({ id: props.id });
|
||||
setInfo(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
open
|
||||
title="驳回原因"
|
||||
maskClosable={false}
|
||||
onCancel={props.onCancel}
|
||||
width={600}
|
||||
footer={[
|
||||
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
|
||||
]}
|
||||
loading={props.enclosedTemporaryVehicleReview.enclosedTemporaryVehicleReviewLoading}
|
||||
>
|
||||
<Descriptions
|
||||
column={1}
|
||||
bordered
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "驳回原因", children: info.todo1 },
|
||||
]}
|
||||
/>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
const ViewRejectReasonModal = Connect([NS_ENCLOSED_TEMPORARY_VEHICLE_REVIEW], true)(ViewRejectReasonModalComponent);
|
||||
|
||||
export default Connect([NS_ENCLOSED_TEMPORARY_VEHICLE_REVIEW], true)(List);
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import ViewPage from "../../TemporaryVehicleReview/Review";
|
||||
|
||||
function View(props) {
|
||||
return (<ViewPage headerTitle="查看" isShowFooter {...props} />);
|
||||
}
|
||||
|
||||
export default View;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function TemporaryVehicleReviewRecords(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default TemporaryVehicleReviewRecords;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function VehicleReview(props) {
|
||||
return props.children;
|
||||
}
|
||||
|
||||
export default VehicleReview;
|
||||
|
|
@ -22,7 +22,7 @@ function View(props) {
|
|||
}, []);
|
||||
|
||||
return (
|
||||
<Page headerTitle="查看" contentPadding="0 20px 20px 20px">
|
||||
<Page headerTitle={props.headerTitle || "查看"} contentPadding="0 20px 20px 20px" isShowFooter={props.isShowFooter}>
|
||||
<Spin spinning={props.enclosedAreaVehicleApply.enclosedAreaVehicleApplyLoading}>
|
||||
<Divider orientation="left">车辆信息</Divider>
|
||||
<Descriptions
|
||||
|
|
@ -36,9 +36,14 @@ function View(props) {
|
|||
{ label: "相关方名称", children: info.todo1 },
|
||||
{ label: "所属项目", children: info.todo1 },
|
||||
]
|
||||
: [
|
||||
: []
|
||||
),
|
||||
...(
|
||||
props.entrance === "enterprise" || props.entrance === "supervision" || !props.entrance
|
||||
? [
|
||||
{ label: "所属企业", children: info.todo1 },
|
||||
]
|
||||
: []
|
||||
),
|
||||
{ label: "姓名", children: info.todo2 },
|
||||
{ label: "部门", children: info.todo3 },
|
||||
|
|
|
|||
Loading…
Reference in New Issue