封闭区域申请:企业人员权限、长期人员审核、长期人员审核记录、长期车辆审核、长期车辆审核记录

master
LiuJiaNan 2026-03-24 11:37:09 +08:00
parent e7171902b2
commit 928edd66c4
20 changed files with 327 additions and 264 deletions

View File

@ -102,21 +102,21 @@
`/primeport/container/enterprise/enclosedArea/apply/vehicleRecords/list`
- 区域人员及车辆统计
`/primeport/container/enterprise/enclosedArea/personnelAndVehicleStatistics/list`
- 企业人员权限
- 企业人员权限 ##
`/primeport/container/enterprise/enclosedArea/enterprisePersonnelPermissions/list`
- 人员审核/长期人员审核
- 人员审核/长期人员审核 ##
`/primeport/container/enterprise/enclosedArea/personnelReview/longTermPersonnelReview/list`
- 人员审核/临时人员审核
`/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`

View File

@ -4,6 +4,10 @@ export const enclosedAreaPersonnelApplyList = declareRequest(
"enclosedAreaPersonnelApplyLoading",
`Post > @/primeport/closedAreaPersonApply/pendingApprovalRecordList`,
);
export const enclosedAreaPersonnelApplyReviewSubmit = declareRequest(
"enclosedAreaPersonnelApplyLoading",
`Post > @/primeport/closedAreaPersonApply/auditPersonApply`,
);
export const enclosedAreaPersonnelApplyInfo = declareRequest(
"enclosedAreaPersonnelApplyLoading",
`Get > /primeport/closedAreaPersonApply/{id}`,

View File

@ -4,6 +4,10 @@ export const enclosedAreaVehicleApplyList = declareRequest(
"enclosedAreaVehicleApplyLoading",
`Post > @/primeport/closedAreaCarApply/list`,
);
export const enclosedAreaVehicleApplyReviewSubmit = declareRequest(
"enclosedAreaVehicleApplyLoading",
`Post > @/primeport/closedAreaCarApply/auditCarApply`,
);
export const enclosedAreaVehicleApplyInfo = declareRequest(
"enclosedAreaVehicleApplyLoading",
`Get > /primeport/closedAreaCarApply/{id}`,

View File

@ -2,7 +2,7 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const enclosedEnterprisePersonnelPermissionsList = declareRequest(
"enclosedEnterprisePersonnelPermissionsLoading",
`Post > @/primeport/`,
`Post > @/primeport/closedAreaPersonApply/getCorpUserList`,
);
export const enclosedEnterprisePersonnelPermissionsPersonnelRecordsList = declareRequest(
"enclosedEnterprisePersonnelPermissionsLoading",
@ -10,9 +10,9 @@ export const enclosedEnterprisePersonnelPermissionsPersonnelRecordsList = declar
);
export const enclosedEnterprisePersonnelPermissionsInfo = declareRequest(
"enclosedEnterprisePersonnelPermissionsLoading",
`Post > @/primeport/`,
`Get > /primeport/closedAreaPersonApply/getAuthorizationPersonInfo/{id}`,
);
export const enclosedEnterprisePersonnelPermissionsSave = declareRequest(
"enclosedEnterprisePersonnelPermissionsLoading",
`Post > @/primeport/`,
`Post > @/primeport/closedAreaPersonApply/authorizationPerson`,
);

View File

@ -1,18 +0,0 @@
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const enclosedLongTermPersonnelReviewList = declareRequest(
"enclosedLongTermPersonnelReviewLoading",
`Post > @/primeport/`,
);
export const enclosedLongTermPersonnelReviewSubmit = declareRequest(
"enclosedLongTermPersonnelReviewLoading",
`Post > @/primeport/`,
);
export const enclosedLongTermPersonnelReviewRecordsList = declareRequest(
"enclosedLongTermPersonnelReviewLoading",
`Post > @/primeport/`,
);
export const enclosedLongTermPersonnelReviewRecordsRejectReason = declareRequest(
"enclosedLongTermPersonnelReviewLoading",
`Post > @/primeport/`,
);

View File

@ -1,18 +0,0 @@
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/`,
);

View File

@ -55,3 +55,17 @@ export const CURRENT_IN_PORT_STATUS_ENUM = [
{ name: "港内", bianma: "1" },
{ name: "港外", bianma: "2" },
];
// 封闭区域车辆人员审核状态
export const ENCLOSED_AREA_AUDIT_STATUS_ENUM = [
{ name: "审核中", bianma: "1" },
{ name: "审核通过", bianma: "2" },
{ name: "审核驳回", bianma: "3" },
];
// 封闭区域车辆人员申请来源状态
export const ENCLOSED_AREA_BELONGING_END_ENUM = [
{ bianma: "3", name: "相关方端" },
{ bianma: "1", name: "监管端" },
{ bianma: "2", name: "企业端" },
];

View File

@ -27,7 +27,5 @@ export const NS_ENCLOSED_AREA_PERSONNEL_APPLY = defineNamespace("enclosedAreaPer
export const NS_ENCLOSED_AREA_VEHICLE_APPLY = defineNamespace("enclosedAreaVehicleApply");
export const NS_ENCLOSED_PERSONNEL_AND_VEHICLE_STATISTICS = defineNamespace("enclosedPersonnelAndVehicleStatistics");
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");

View File

@ -1,16 +1,17 @@
import useUrlState from "@ahooksjs/use-url-state";
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, message, Modal, Space } from "antd";
import { useEffect, useState } from "react";
import { useEffect, useRef, useState } from "react";
import FormBuilder from "zy-react-library/components/FormBuilder";
import BackIcon from "zy-react-library/components/Icon/BackIcon";
import DepartmentLeftTree from "zy-react-library/components/LeftTree/Department/Gwj";
import Page from "zy-react-library/components/Page";
import Search from "zy-react-library/components/Search";
import BasicSelectTree from "zy-react-library/components/SelectTree/Basic";
import Table from "zy-react-library/components/Table";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useTable from "zy-react-library/hooks/useTable";
import { NS_ENCLOSED_ENTERPRISE_PERSONNEL_PERMISSIONS } from "~/enumerate/namespace";
import { NS_ENCLOSED_AREA, NS_ENCLOSED_ENTERPRISE_PERSONNEL_PERMISSIONS } from "~/enumerate/namespace";
function List(props) {
const [authorizationScopeModalVisible, setAuthorizationScopeModalVisible] = useState(false);
@ -32,7 +33,7 @@ function List(props) {
const { tableProps, getData } = useTable(props["enclosedEnterprisePersonnelPermissionsList"], {
form,
params: () => ({ departmentId: urlState.departmentId }),
params: () => ({ deptId: urlState.departmentId }),
manual: true,
});
@ -64,7 +65,7 @@ function List(props) {
>
</div>
<div style={{ width: "calc(100% - 300px - 50px)" }}>
<Search labelCol={{ span: 4 }} options={[{ name: "todo1", label: "姓名" }]} onFinish={getData} form={form} />
<Search labelCol={{ span: 4 }} options={[{ name: "name", label: "姓名" }]} onFinish={getData} form={form} />
<Table
toolBarRender={() => (
<>
@ -86,13 +87,21 @@ function List(props) {
</>
)}
columns={[
{ title: "部门", dataIndex: "todo1" },
{ title: "姓名", dataIndex: "todo2" },
{ title: "岗位", dataIndex: "todo3" },
{ title: "手机号", dataIndex: "todo4" },
{ title: "车辆数", dataIndex: "todo5" },
{ title: "封闭区域权限", dataIndex: "todo6", render: (_, record) => record.todo6 === 1 ? "开启" : "关闭" },
{ title: "是否录入人脸", dataIndex: "todo7", render: (_, record) => record.todo7 === 1 ? "是" : "否" },
{ title: "部门", dataIndex: "deptName" },
{ title: "姓名", dataIndex: "name" },
{ title: "岗位", dataIndex: "postName" },
{ title: "手机号", dataIndex: "phone" },
{ title: "车辆数", dataIndex: "vehicleCount" },
{
title: "封闭区域权限",
dataIndex: "mkmjPermission",
render: (_, record) => record.mkmjPermission === 1 ? "开启" : "关闭",
},
{
title: "是否录入人脸",
dataIndex: "userFaceUrl",
render: (_, record) => record.userFaceUrl ? "是" : "否",
},
{
title: "操作",
width: 200,
@ -130,7 +139,7 @@ function List(props) {
info={currentInfo}
onCancel={() => {
setAuthorizationScopeModalVisible(false);
setCurrentInfo("");
setCurrentInfo({});
}}
getData={getData}
/>
@ -141,22 +150,72 @@ function List(props) {
}
const AuthorizationScopeModalComponent = (props) => {
const [enclosedAreaList, setEnclosedAreaList] = useState([]);
const closedAreaListTreeRef = useRef([]);
const [form] = FormBuilder.useForm();
const getData = async () => {
const { data } = await props["enclosedEnterprisePersonnelPermissionsInfo"]({ id: props.info.id });
form.setFieldsValue({ ...data });
const { data } = await props["enclosedEnterprisePersonnelPermissionsInfo"]({ id: props.info.userId });
form.setFieldsValue({
...data,
mkmjPermission: data.mkmjPermission || 1,
closedAreaId: (data.areaList || []).map(item => item.closedAreaId),
});
};
const getEnclosedAreaList = async (jurisdictionalCorpId) => {
const { data } = await props["enclosedAreaDetailListTree"]({ jurisdictionalCorpId });
setEnclosedAreaList(data);
};
useEffect(() => {
getData();
getEnclosedAreaList(props.info.corpId);
}, []);
const getAreaList = (areaIds) => {
if (!areaIds || !Array.isArray(areaIds) || areaIds.length === 0) {
return [];
}
const result = [];
// 递归查找树形结构中的节点
const findNodesInTree = (tree, ids) => {
for (const node of tree) {
// 如果当前节点 ID 在选中列表中,添加到结果集
if (ids.includes(node.id)) {
result.push({
fgsPersonAuthId: props.info.userId,
closedAreaId: node.id,
closedAreaName: node.closedAreaName,
});
}
// 如果有子节点,递归查找
if (node.children && node.children.length > 0) {
findNodesInTree(node.children, ids);
}
}
};
// 在树形结构中查找所有选中的节点
findNodesInTree(closedAreaListTreeRef.current, areaIds);
return result;
};
const onSubmit = (values) => {
const performSave = async () => {
const areaList = getAreaList(values.closedAreaId);
const { success } = await props["enclosedEnterprisePersonnelPermissionsSave"]({
...values,
id: props.info.id,
areaList,
userId: props.info.userId,
corpId: props.info.corpId,
departmentId: props.info.deptId,
});
if (success) {
message.success("操作成功");
@ -165,10 +224,10 @@ const AuthorizationScopeModalComponent = (props) => {
}
};
if (values.todo1 === 2) {
if (values.mkmjPermission === 2 && props.info.mkmjPermission === 1) {
Modal.confirm({
title: "提示",
content: `确定要给【${props.info.todo1}】用户关闭门禁权限吗?`,
content: `确定要给【${props.info.name}】用户关闭门禁权限吗?`,
onOk: performSave,
});
}
@ -195,17 +254,32 @@ const AuthorizationScopeModalComponent = (props) => {
onFinish={onSubmit}
options={[
{
name: "todo1",
name: "mkmjPermission",
label: "是否授权",
render: FORM_ITEM_RENDER_ENUM.RADIO,
items: [{ bianma: 1, name: "是" }, { bianma: 2, name: "否" }],
componentProps: {
onChange: () => {
form.setFieldValue("areaList", []);
},
},
},
{
name: "todo2",
name: "closedAreaId",
label: "封闭区域",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: [],
componentProps: { mode: "multiple" },
render: (
<BasicSelectTree
treeData={enclosedAreaList}
placeholder="封闭区域"
nameKey="closedAreaName"
multiple
onGetData={(data) => {
closedAreaListTreeRef.current = data;
}}
/>
),
dependencies: ["mkmjPermission"],
hidden: formValues => !(formValues.mkmjPermission === 1),
},
]}
form={form}
@ -214,6 +288,6 @@ const AuthorizationScopeModalComponent = (props) => {
);
};
const AuthorizationScopeModal = Connect([NS_ENCLOSED_ENTERPRISE_PERSONNEL_PERMISSIONS], true)(AuthorizationScopeModalComponent);
const AuthorizationScopeModal = Connect([NS_ENCLOSED_ENTERPRISE_PERSONNEL_PERMISSIONS, NS_ENCLOSED_AREA], true)(AuthorizationScopeModalComponent);
export default Connect([NS_ENCLOSED_ENTERPRISE_PERSONNEL_PERMISSIONS], true)(List);

View File

@ -1,30 +1,26 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button } from "antd";
import { Button, Space } 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_PERSONNEL_REVIEW } from "~/enumerate/namespace";
export const BELONGING_END_ENUM = [
{ bianma: "stakeholder", name: "相关方端" },
{ bianma: "supervision", name: "监管端" },
{ bianma: "enterprise", name: "企业端" },
];
import { ENCLOSED_AREA_AUDIT_STATUS_ENUM, ENCLOSED_AREA_BELONGING_END_ENUM } from "~/enumerate/constant";
import { NS_ENCLOSED_AREA_PERSONNEL_APPLY } from "~/enumerate/namespace";
function List(props) {
const [form] = Search.useForm();
const { tableProps, getData } = useTable(props["enclosedLongTermPersonnelReviewList"], {
const { tableProps, getData } = useTable(props["enclosedAreaPersonnelApplyList"], {
form,
params: { processOrRecord: 1, personBelongType: -1 },
});
return (
<Page isShowAllAction={false}>
<Search
options={[
{ name: "todo1", label: "人员姓名" },
{ name: "name", label: "人员姓名" },
]}
form={form}
onFinish={getData}
@ -33,31 +29,47 @@ function List(props) {
columns={[
{
title: "申请来源",
dataIndex: "todo1",
render: (_, record) => getLabelName({ list: BELONGING_END_ENUM, status: record.todo1 }),
dataIndex: "personBelongType",
render: (_, record) => getLabelName({ list: ENCLOSED_AREA_BELONGING_END_ENUM, status: record.personBelongType }),
},
{ title: "公司名称", dataIndex: "applyPersonCorpName" },
{ title: "姓名", dataIndex: "applyPersonUserName" },
{ title: "部门", dataIndex: "applyPersonDepartmentName" },
{ title: "手机号", dataIndex: "userPhone" },
{ title: "申请区域", dataIndex: "closedAreaName" },
{
title: "申请时间范围",
dataIndex: "visitStartTime",
render: (_, record) => `${record.visitStartTime}-${record.visitEndTime}`,
},
{
title: "申请人数",
dataIndex: "entourage",
render: (_, record) => record.entourage ? JSON.parse(record.entourage).length : 0,
},
{
title: "审核状态",
dataIndex: "auditFlag",
render: (_, record) => getLabelName({ list: ENCLOSED_AREA_AUDIT_STATUS_ENUM, status: record.auditFlag }),
},
{ title: "公司名称", dataIndex: "todo2" },
{ title: "姓名", dataIndex: "todo3" },
{ title: "部门", dataIndex: "todo4" },
{ title: "手机号", dataIndex: "todo5" },
{ title: "申请区域", dataIndex: "todo6" },
{ title: "申请时间范围", dataIndex: "todo7", render: (_, record) => `${record.todo7}-${record.todo8}` },
{ title: "申请人数", dataIndex: "todo9" },
{ title: "审核状态", dataIndex: "todo10" },
{
title: "操作",
width: 100,
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>
<Space>
{record.currentUserCanAudit === 1 && (
<Button
type="link"
onClick={() => {
const entrance = ENCLOSED_AREA_BELONGING_END_ENUM.find(item => +item.bianma === record.personBelongType).bianma;
props.history.push(`./review?id=${record.id}&entrance=${entrance}`);
}}
>
审核
</Button>
)}
</Space>
),
},
]}
@ -67,4 +79,4 @@ function List(props) {
);
}
export default Connect([NS_ENCLOSED_LONG_TERM_PERSONNEL_REVIEW], true)(List);
export default Connect([NS_ENCLOSED_AREA_PERSONNEL_APPLY], true)(List);

View File

@ -3,7 +3,7 @@ import { 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_PERSONNEL_REVIEW } from "~/enumerate/namespace";
import { NS_ENCLOSED_AREA_PERSONNEL_APPLY } from "~/enumerate/namespace";
import ViewPage from "~/pages/Container/Supervision/EnclosedArea/Apply/Personnel/View";
function Review(props) {
@ -11,7 +11,7 @@ function Review(props) {
const [form] = FormBuilder.useForm();
const onSubmit = async (values) => {
const { success } = await props["enclosedLongTermPersonnelReviewSubmit"]({
const { success } = await props["enclosedAreaPersonnelApplyReviewSubmit"]({
...values,
id: query.id,
});
@ -33,22 +33,22 @@ function Review(props) {
span={24}
onFinish={onSubmit}
values={{
todo1: "1",
auditFlag: "2",
}}
loading={props.enclosedLongTermPersonnelReview.enclosedLongTermPersonnelReviewLoading}
loading={props.enclosedAreaPersonnelApply.enclosedAreaPersonnelApplyLoading}
options={[
{
name: "todo1",
name: "auditFlag",
label: "是否通过审核",
render: FORM_ITEM_RENDER_ENUM.RADIO,
items: [{ bianma: "1", name: "是" }, { bianma: "0", name: "否" }],
items: [{ bianma: "2", name: "是" }, { bianma: "3", name: "否" }],
},
{
name: "todo2",
name: "refusalReason",
label: "驳回原因",
render: FORM_ITEM_RENDER_ENUM.TEXTAREA,
dependencies: ["todo1"],
hidden: formValues => !(formValues.todo1 === "0"),
dependencies: ["auditFlag"],
hidden: formValues => !(formValues.auditFlag === "3"),
},
]}
form={form}
@ -57,4 +57,4 @@ function Review(props) {
);
}
export default Connect([NS_ENCLOSED_LONG_TERM_PERSONNEL_REVIEW], true)(Review);
export default Connect([NS_ENCLOSED_AREA_PERSONNEL_APPLY], true)(Review);

View File

@ -1,29 +1,30 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Descriptions, Modal, Space } from "antd";
import { useEffect, useState } from "react";
import { 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_PERSONNEL_REVIEW } from "~/enumerate/namespace";
import { BELONGING_END_ENUM } from "../../LongTermPersonnelReview/List";
import { ENCLOSED_AREA_AUDIT_STATUS_ENUM, ENCLOSED_AREA_BELONGING_END_ENUM } from "~/enumerate/constant";
import { NS_ENCLOSED_AREA_PERSONNEL_APPLY } from "~/enumerate/namespace";
function List(props) {
const [viewRejectReasonModalVisible, setViewRejectReasonModalVisible] = useState(false);
const [currentId, setCurrentId] = useState("");
const [refusalReason, setCurrentRefusalReason] = useState("");
const [form] = Search.useForm();
const { tableProps, getData } = useTable(props["enclosedLongTermPersonnelReviewRecordsList"], {
const { tableProps, getData } = useTable(props["enclosedAreaPersonnelApplyList"], {
form,
params: { processOrRecord: 2, personBelongType: -1 },
});
return (
<Page isShowAllAction={false}>
<Search
options={[
{ name: "todo1", label: "人员姓名" },
{ name: "name", label: "人员姓名" },
]}
form={form}
onFinish={getData}
@ -32,17 +33,29 @@ function List(props) {
columns={[
{
title: "申请来源",
dataIndex: "todo1",
render: (_, record) => getLabelName({ list: BELONGING_END_ENUM, status: record.todo1 }),
dataIndex: "personBelongType",
render: (_, record) => getLabelName({ list: ENCLOSED_AREA_BELONGING_END_ENUM, status: record.personBelongType }),
},
{ title: "公司名称", dataIndex: "applyPersonCorpName" },
{ title: "姓名", dataIndex: "applyPersonUserName" },
{ title: "部门", dataIndex: "applyPersonDepartmentName" },
{ title: "手机号", dataIndex: "userPhone" },
{ title: "申请区域", dataIndex: "closedAreaName" },
{
title: "申请时间范围",
dataIndex: "visitStartTime",
render: (_, record) => `${record.visitStartTime}-${record.visitEndTime}`,
},
{
title: "申请人数",
dataIndex: "entourage",
render: (_, record) => record.entourage ? JSON.parse(record.entourage).length : 0,
},
{
title: "审核状态",
dataIndex: "auditFlag",
render: (_, record) => getLabelName({ list: ENCLOSED_AREA_AUDIT_STATUS_ENUM, status: record.auditFlag }),
},
{ title: "公司名称", dataIndex: "todo2" },
{ title: "姓名", dataIndex: "todo3" },
{ title: "部门", dataIndex: "todo4" },
{ title: "手机号", dataIndex: "todo5" },
{ title: "申请区域", dataIndex: "todo6" },
{ title: "申请时间范围", dataIndex: "todo7", render: (_, record) => `${record.todo7}-${record.todo8}` },
{ title: "申请人数", dataIndex: "todo9" },
{ title: "审核状态", dataIndex: "todo10" },
{
title: "操作",
width: 150,
@ -52,21 +65,23 @@ function List(props) {
<Button
type="link"
onClick={() => {
const entrance = BELONGING_END_ENUM.find(item => item.bianma === record.todo1).bianma;
const entrance = ENCLOSED_AREA_BELONGING_END_ENUM.find(item => +item.bianma === record.personBelongType).bianma;
props.history.push(`./view?id=${record.id}&entrance=${entrance}`);
}}
>
查看
</Button>
<Button
type="link"
onClick={() => {
setViewRejectReasonModalVisible(true);
setCurrentId(record.id);
}}
>
驳回原因
</Button>
{record.auditFlag === 3 && (
<Button
type="link"
onClick={() => {
setViewRejectReasonModalVisible(true);
setCurrentRefusalReason(record.id);
}}
>
驳回原因
</Button>
)}
</Space>
),
},
@ -76,10 +91,10 @@ function List(props) {
{
viewRejectReasonModalVisible && (
<ViewRejectReasonModal
id={currentId}
refusalReason={refusalReason}
onCancel={() => {
setViewRejectReasonModalVisible(false);
setCurrentId("");
setCurrentRefusalReason("");
}}
/>
)
@ -89,16 +104,6 @@ function List(props) {
}
const ViewRejectReasonModalComponent = (props) => {
const [info, setInfo] = useState({});
const getData = async () => {
const { data } = await props["enclosedLongTermPersonnelReviewRecordsRejectReason"]({ id: props.id });
setInfo(data);
};
useEffect(() => {
getData();
}, []);
return (
<Modal
open
@ -109,20 +114,19 @@ const ViewRejectReasonModalComponent = (props) => {
footer={[
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
]}
loading={props.enclosedLongTermPersonnelReview.enclosedLongTermPersonnelReviewLoading}
>
<Descriptions
column={1}
bordered
styles={{ label: { width: 200 } }}
items={[
{ label: "驳回原因", children: info.todo1 },
{ label: "驳回原因", children: props.refusalReason },
]}
/>
</Modal>
);
};
const ViewRejectReasonModal = Connect([NS_ENCLOSED_LONG_TERM_PERSONNEL_REVIEW], true)(ViewRejectReasonModalComponent);
const ViewRejectReasonModal = Connect([NS_ENCLOSED_AREA_PERSONNEL_APPLY], true)(ViewRejectReasonModalComponent);
export default Connect([NS_ENCLOSED_LONG_TERM_PERSONNEL_REVIEW], true)(List);
export default Connect([NS_ENCLOSED_AREA_PERSONNEL_APPLY], true)(List);

View File

@ -1,31 +1,26 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button } from "antd";
import { Button, Space } 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: "内部车辆" },
];
import { ENCLOSED_AREA_AUDIT_STATUS_ENUM, ENCLOSED_AREA_BELONGING_END_ENUM } from "~/enumerate/constant";
import { NS_ENCLOSED_AREA_VEHICLE_APPLY } from "~/enumerate/namespace";
function List(props) {
const [form] = Search.useForm();
const { tableProps, getData } = useTable(props["enclosedLongTermVehicleReviewList"], {
const { tableProps, getData } = useTable(props["enclosedAreaVehicleApplyList"], {
form,
params: { processOrRecord: 1, carBelongType: -1 },
});
return (
<Page isShowAllAction={false}>
<Search
options={[
{ name: "todo1", label: "人员姓名" },
{ name: "todo2", label: "车牌号" },
{ name: "applyPersonUserName", label: "人员姓名" },
{ name: "licenceLo", label: "车牌号" },
]}
form={form}
onFinish={getData}
@ -34,31 +29,43 @@ function List(props) {
columns={[
{
title: "申请来源",
dataIndex: "todo1",
render: (_, record) => getLabelName({ list: BELONGING_END_ENUM, status: record.todo1 }),
dataIndex: "carBelongType",
render: (_, record) => getLabelName({ list: ENCLOSED_AREA_BELONGING_END_ENUM, status: record.carBelongType }),
},
{ title: "车辆类型", dataIndex: "vehicleTypeName" },
{ title: "车牌号", dataIndex: "licenceNo" },
{ title: "申请人姓名", dataIndex: "applyPersonUserName" },
{ title: "手机号", dataIndex: "userPhone" },
{ title: "部门", dataIndex: "applyPersonDepartmentName" },
{ title: "申请区域", dataIndex: "closedAreaName" },
{
title: "申请时间范围",
dataIndex: "visitStartTime",
render: (_, record) => `${record.visitStartTime} - ${record.visitEndTime}`,
},
{
title: "审核状态",
dataIndex: "auditFlag",
render: (_, record) => getLabelName({ list: ENCLOSED_AREA_AUDIT_STATUS_ENUM, status: record.auditFlag }),
},
{ 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>
<Space>
{record.currentUserCanAudit === 1 && (
<Button
type="link"
onClick={() => {
const entrance = ENCLOSED_AREA_BELONGING_END_ENUM.find(item => +item.bianma === record.carBelongType).bianma;
props.history.push(`./review?id=${record.id}&entrance=${entrance}`);
}}
>
审核
</Button>
)}
</Space>
),
},
]}
@ -68,4 +75,4 @@ function List(props) {
);
}
export default Connect([NS_ENCLOSED_LONG_TERM_VEHICLE_REVIEW], true)(List);
export default Connect([NS_ENCLOSED_AREA_VEHICLE_APPLY], true)(List);

View File

@ -3,7 +3,7 @@ import { 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 { NS_ENCLOSED_AREA_VEHICLE_APPLY } from "~/enumerate/namespace";
import ViewPage from "~/pages/Container/Supervision/EnclosedArea/Apply/Vehicle/View";
function Review(props) {
@ -11,7 +11,7 @@ function Review(props) {
const [form] = FormBuilder.useForm();
const onSubmit = async (values) => {
const { success } = await props["enclosedLongTermVehicleReviewSubmit"]({
const { success } = await props["enclosedAreaVehicleApplyReviewSubmit"]({
...values,
id: query.id,
});
@ -33,22 +33,22 @@ function Review(props) {
span={24}
onFinish={onSubmit}
values={{
todo1: "1",
auditFlag: "2",
}}
loading={props.enclosedLongTermVehicleReview.enclosedLongTermVehicleReviewLoading}
loading={props.enclosedAreaVehicleApply.enclosedAreaVehicleApplyLoading}
options={[
{
name: "todo1",
name: "auditFlag",
label: "是否通过审核",
render: FORM_ITEM_RENDER_ENUM.RADIO,
items: [{ bianma: "1", name: "是" }, { bianma: "0", name: "否" }],
items: [{ bianma: "2", name: "是" }, { bianma: "3", name: "否" }],
},
{
name: "todo2",
name: "refusalReason",
label: "驳回原因",
render: FORM_ITEM_RENDER_ENUM.TEXTAREA,
dependencies: ["todo1"],
hidden: formValues => !(formValues.todo1 === "0"),
dependencies: ["auditFlag"],
hidden: formValues => !(formValues.auditFlag === "3"),
},
]}
form={form}
@ -57,4 +57,4 @@ function Review(props) {
);
}
export default Connect([NS_ENCLOSED_LONG_TERM_VEHICLE_REVIEW], true)(Review);
export default Connect([NS_ENCLOSED_AREA_VEHICLE_APPLY], true)(Review);

View File

@ -1,29 +1,30 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Descriptions, Modal, Space } from "antd";
import { useEffect, useState } from "react";
import { 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";
import { ENCLOSED_AREA_AUDIT_STATUS_ENUM, ENCLOSED_AREA_BELONGING_END_ENUM } from "~/enumerate/constant";
import { NS_ENCLOSED_AREA_VEHICLE_APPLY } from "~/enumerate/namespace";
function List(props) {
const [viewRejectReasonModalVisible, setViewRejectReasonModalVisible] = useState(false);
const [currentId, setCurrentId] = useState("");
const [refusalReason, setCurrentRefusalReason] = useState("");
const [form] = Search.useForm();
const { tableProps, getData } = useTable(props["enclosedLongTermVehicleReviewRecordsList"], {
const { tableProps, getData } = useTable(props["enclosedAreaVehicleApplyList"], {
form,
params: { processOrRecord: 2, carBelongType: -1 },
});
return (
<Page isShowAllAction={false}>
<Search
options={[
{ name: "todo1", label: "人员姓名" },
{ name: "todo2", label: "车牌号" },
{ name: "applyPersonUserName", label: "人员姓名" },
{ name: "licenceLo", label: "车牌号" },
]}
form={form}
onFinish={getData}
@ -32,17 +33,25 @@ function List(props) {
columns={[
{
title: "申请来源",
dataIndex: "todo1",
render: (_, record) => getLabelName({ list: BELONGING_END_ENUM, status: record.todo1 }),
dataIndex: "carBelongType",
render: (_, record) => getLabelName({ list: ENCLOSED_AREA_BELONGING_END_ENUM, status: record.carBelongType }),
},
{ title: "车辆类型", dataIndex: "vehicleTypeName" },
{ title: "车牌号", dataIndex: "licenceNo" },
{ title: "申请人姓名", dataIndex: "applyPersonUserName" },
{ title: "手机号", dataIndex: "userPhone" },
{ title: "部门", dataIndex: "applyPersonDepartmentName" },
{ title: "申请区域", dataIndex: "closedAreaName" },
{
title: "申请时间范围",
dataIndex: "visitStartTime",
render: (_, record) => `${record.visitStartTime} - ${record.visitEndTime}`,
},
{
title: "审核状态",
dataIndex: "auditFlag",
render: (_, record) => getLabelName({ list: ENCLOSED_AREA_AUDIT_STATUS_ENUM, status: record.auditFlag }),
},
{ 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,
@ -52,21 +61,23 @@ function List(props) {
<Button
type="link"
onClick={() => {
const entrance = BELONGING_END_ENUM.find(item => item.bianma === record.todo1).bianma;
const entrance = ENCLOSED_AREA_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>
{record.auditFlag === 3 && (
<Button
type="link"
onClick={() => {
setViewRejectReasonModalVisible(true);
setCurrentRefusalReason(record.id);
}}
>
驳回原因
</Button>
)}
</Space>
),
},
@ -76,10 +87,10 @@ function List(props) {
{
viewRejectReasonModalVisible && (
<ViewRejectReasonModal
id={currentId}
refusalReason={refusalReason}
onCancel={() => {
setViewRejectReasonModalVisible(false);
setCurrentId("");
setCurrentRefusalReason("");
}}
/>
)
@ -89,16 +100,6 @@ function List(props) {
}
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
@ -109,20 +110,19 @@ const ViewRejectReasonModalComponent = (props) => {
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 },
{ label: "驳回原因", children: props.refusalReason },
]}
/>
</Modal>
);
};
const ViewRejectReasonModal = Connect([NS_ENCLOSED_LONG_TERM_VEHICLE_REVIEW], true)(ViewRejectReasonModalComponent);
const ViewRejectReasonModal = Connect([NS_ENCLOSED_AREA_VEHICLE_APPLY], true)(ViewRejectReasonModalComponent);
export default Connect([NS_ENCLOSED_LONG_TERM_VEHICLE_REVIEW], true)(List);
export default Connect([NS_ENCLOSED_AREA_VEHICLE_APPLY], true)(List);

View File

@ -5,8 +5,8 @@ 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 { ENCLOSED_AREA_BELONGING_END_ENUM } from "~/enumerate/constant";
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);
@ -47,7 +47,7 @@ function List(props) {
<Button
type="link"
onClick={() => {
const entrance = BELONGING_END_ENUM.find(item => item.bianma === record.todo1).bianma;
const entrance = ENCLOSED_AREA_BELONGING_END_ENUM.find(item => +item.bianma === record.todo1).bianma;
props.history.push(`./view?id=${record.id}&entrance=${entrance}`);
}}
>

View File

@ -7,14 +7,9 @@ import Table from "zy-react-library/components/Table";
import TooltipPreviewImg from "zy-react-library/components/TooltipPreviewImg";
import useTable from "zy-react-library/hooks/useTable";
import { getLabelName } from "zy-react-library/utils";
import { ENCLOSED_AREA_AUDIT_STATUS_ENUM } from "~/enumerate/constant";
import { NS_ENCLOSED_AREA_PERSONNEL_APPLY } from "~/enumerate/namespace";
const STATUS_ENUM = [
{ name: "审核中", bianma: "1" },
{ name: "审核通过", bianma: "2" },
{ name: "审核驳回", bianma: "3" },
];
function List(props) {
const [form] = Search.useForm();
const { tableProps, getData } = useTable(props["enclosedAreaPersonnelApplyList"], {
@ -69,7 +64,7 @@ function List(props) {
{
title: "申请状态",
dataIndex: "auditFlag",
render: (_, record) => getLabelName({ list: STATUS_ENUM, status: record.auditFlag }),
render: (_, record) => getLabelName({ list: ENCLOSED_AREA_AUDIT_STATUS_ENUM, status: record.auditFlag }),
},
{
title: "操作",

View File

@ -7,13 +7,9 @@ import Table from "zy-react-library/components/Table";
import TooltipPreviewImg from "zy-react-library/components/TooltipPreviewImg";
import useTable from "zy-react-library/hooks/useTable";
import { getLabelName } from "zy-react-library/utils";
import { ENCLOSED_AREA_AUDIT_STATUS_ENUM } from "~/enumerate/constant";
import { NS_ENCLOSED_AREA_PERSONNEL_APPLY } from "~/enumerate/namespace";
const STATUS_ENUM = [
{ name: "审核中", bianma: "1" },
{ name: "审核通过", bianma: "2" },
{ name: "审核驳回", bianma: "3" },
];
function List(props) {
const [refusalReason, setCurrentRefusalReason] = useState("");
const [viewRejectReasonModalVisible, setViewRejectReasonModalVisible] = useState(false);
@ -61,7 +57,7 @@ function List(props) {
{
title: "申请状态",
dataIndex: "auditFlag",
render: (_, record) => getLabelName({ list: STATUS_ENUM, status: record.auditFlag }),
render: (_, record) => getLabelName({ list: ENCLOSED_AREA_AUDIT_STATUS_ENUM, status: record.auditFlag }),
},
{
title: "操作",

View File

@ -10,14 +10,9 @@ import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
import useGetFile from "zy-react-library/hooks/useGetFile";
import useTable from "zy-react-library/hooks/useTable";
import { getLabelName } from "zy-react-library/utils";
import { ENCLOSED_AREA_AUDIT_STATUS_ENUM } from "~/enumerate/constant";
import { NS_ENCLOSED_AREA_VEHICLE_APPLY } from "~/enumerate/namespace";
const STATUS_ENUM = [
{ name: "审核中", bianma: "1" },
{ name: "审核通过", bianma: "2" },
{ name: "审核驳回", bianma: "3" },
];
function List(props) {
const [list, setList] = useState([]);
@ -79,7 +74,7 @@ function List(props) {
{
title: "申请状态",
dataIndex: "auditFlag",
render: (_, record) => getLabelName({ list: STATUS_ENUM, status: record.auditFlag }),
render: (_, record) => getLabelName({ list: ENCLOSED_AREA_AUDIT_STATUS_ENUM, status: record.auditFlag }),
},
{
title: "操作",

View File

@ -9,13 +9,9 @@ import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
import useGetFile from "zy-react-library/hooks/useGetFile";
import useTable from "zy-react-library/hooks/useTable";
import { getLabelName } from "zy-react-library/utils";
import { ENCLOSED_AREA_AUDIT_STATUS_ENUM } from "~/enumerate/constant";
import { NS_ENCLOSED_AREA_VEHICLE_APPLY } from "~/enumerate/namespace";
const STATUS_ENUM = [
{ name: "审核中", bianma: "1" },
{ name: "审核通过", bianma: "2" },
{ name: "审核驳回", bianma: "3" },
];
function List(props) {
const [list, setList] = useState([]);
const [refusalReason, setCurrentRefusalReason] = useState("");
@ -68,7 +64,7 @@ function List(props) {
{
title: "申请状态",
dataIndex: "auditFlag",
render: (_, record) => getLabelName({ list: STATUS_ENUM, status: record.auditFlag }),
render: (_, record) => getLabelName({ list: ENCLOSED_AREA_AUDIT_STATUS_ENUM, status: record.auditFlag }),
},
{
title: "操作",