门禁审批人管理、一级口门信息管理、股份车辆审批、股份车辆审批记录、个人车辆管理、股份单位车辆管理、车辆违规管理、车辆黑名单管理

master
LiuJiaNan 2026-03-17 17:57:34 +08:00
parent 16f7adaebe
commit 766d22f3ab
26 changed files with 781 additions and 501 deletions

View File

@ -1,16 +1,16 @@
### 监管端 ### 监管端
#### 一级口门管理 #### 一级口门管理
- 门禁审批人管理 # - 门禁审批人管理 ##
`/primeport/container/supervision/firstLevelDoor/approverUser` `/primeport/container/supervision/firstLevelDoor/approverUser`
- 基本信息管理/一级口门信息管理 # - 基本信息管理/一级口门信息管理 ##
`/primeport/container/supervision/firstLevelDoor/basicInfo/firstLevelDoorInfo/list` `/primeport/container/supervision/firstLevelDoor/basicInfo/firstLevelDoorInfo/list`
- 进港审批管理/人员审批管理/相关方人员进港审批 # - 进港审批管理/人员审批管理/相关方人员进港审批
`/primeport/container/supervision/firstLevelDoor/portEntryApproval/personnelApproval/relatedPersonnel` `/primeport/container/supervision/firstLevelDoor/portEntryApproval/personnelApproval/relatedPersonnel`
- 进港审批管理/人员审批管理/相关方人员进港审批记录 - 进港审批管理/人员审批管理/相关方人员进港审批记录
`/primeport/container/supervision/firstLevelDoor/portEntryApproval/personnelApproval/relatedPersonnelRecords` `/primeport/container/supervision/firstLevelDoor/portEntryApproval/personnelApproval/relatedPersonnelRecords`
- 进港审批管理/长期车辆审批管理/股份车辆审批 # - 进港审批管理/长期车辆审批管理/股份车辆审批 ##
`/primeport/container/supervision/firstLevelDoor/portEntryApproval/longTermVehicleApproval/shareVehicles` `/primeport/container/supervision/firstLevelDoor/portEntryApproval/longTermVehicleApproval/shareVehicles`
- 进港审批管理/长期车辆审批管理/股份车辆审批记录 # - 进港审批管理/长期车辆审批管理/股份车辆审批记录 ##
`/primeport/container/supervision/firstLevelDoor/portEntryApproval/longTermVehicleApproval/shareVehiclesRecords` `/primeport/container/supervision/firstLevelDoor/portEntryApproval/longTermVehicleApproval/shareVehiclesRecords`
- 进港审批管理/长期车辆审批管理/相关方车辆审批 # - 进港审批管理/长期车辆审批管理/相关方车辆审批 #
`/primeport/container/supervision/firstLevelDoor/portEntryApproval/longTermVehicleApproval/relatedVehicles` `/primeport/container/supervision/firstLevelDoor/portEntryApproval/longTermVehicleApproval/relatedVehicles`
@ -26,9 +26,9 @@
`/primeport/container/supervision/firstLevelDoor/portEntryApproval/temporaryVisitor/temporaryVehicleRecords/list` `/primeport/container/supervision/firstLevelDoor/portEntryApproval/temporaryVisitor/temporaryVehicleRecords/list`
- 进出港信息管理/股份人员及车辆管理 - 进出港信息管理/股份人员及车辆管理
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/stockPersonnelAndVehicles/list` `/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/stockPersonnelAndVehicles/list`
- 进出港信息管理/个人车辆管理 # - 进出港信息管理/个人车辆管理 ##
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/personalVehicle/list` `/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/personalVehicle/list`
- 进出港信息管理/股份单位车辆管理 # - 进出港信息管理/股份单位车辆管理 ##
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/stockVehicles/list` `/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/stockVehicles/list`
- 进出港信息管理/分公司人员及车辆管理 - 进出港信息管理/分公司人员及车辆管理
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/branchPersonnelAndVehicles/list` `/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/branchPersonnelAndVehicles/list`
@ -38,7 +38,7 @@
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/portBasedUnitsPersonnelAndVehicles/list` `/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/portBasedUnitsPersonnelAndVehicles/list`
- 进出港信息管理/检查部门车辆管理 - 进出港信息管理/检查部门车辆管理
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/inspectDepartmentVehicles/list` `/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/inspectDepartmentVehicles/list`
- 进出港信息管理/车辆违规管理/车辆违规管理 # - 进出港信息管理/车辆违规管理/车辆违规管理 ##
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/vehiclesViolation/vehiclesViolation/list` `/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/vehiclesViolation/vehiclesViolation/list`
- 进出港信息管理/车辆违规管理/车辆黑名单管理 # - 进出港信息管理/车辆违规管理/车辆黑名单管理 #
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/vehiclesViolation/vehicleBlacklist/list` `/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/vehiclesViolation/vehicleBlacklist/list`

View File

@ -4,6 +4,10 @@ export const firstLevelDoorInfoList = declareRequest(
"firstLevelDoorInfoLoading", "firstLevelDoorInfoLoading",
`Post > @/primeport/mkmj/list`, `Post > @/primeport/mkmj/list`,
); );
export const firstLevelDoorInfoListAll = declareRequest(
"firstLevelDoorInfoLoading",
`Get > /primeport/mkmj/listAll`,
);
export const firstLevelDoorInfoAdd = declareRequest( export const firstLevelDoorInfoAdd = declareRequest(
"firstLevelDoorInfoLoading", "firstLevelDoorInfoLoading",
`Post > @/primeport/mkmj/save`, `Post > @/primeport/mkmj/save`,

View File

@ -40,11 +40,3 @@ export const stockPersonnelAndVehiclesVehicleManagementVehicleRecordsList = decl
"stockPersonnelAndVehiclesLoading", "stockPersonnelAndVehiclesLoading",
`Post > @/primeport/`, `Post > @/primeport/`,
); );
export const stockPersonnelAndVehiclesVehicleManagementVehicleApprovalRecordsList = declareRequest(
"stockPersonnelAndVehiclesLoading",
`Post > @/primeport/`,
);
export const stockPersonnelAndVehiclesVehicleManagementVehicleApprovalRecordsInfo = declareRequest(
"stockPersonnelAndVehiclesLoading",
`Post > @/primeport/`,
);

View File

@ -24,10 +24,6 @@ export const vehicleApplyCheckLicenceNo = declareRequest(
"vehicleApplyLoading", "vehicleApplyLoading",
`Get > /primeport/vehicleApply/check-licence-no`, `Get > /primeport/vehicleApply/check-licence-no`,
); );
export const vehicleApplyUpdateStatus = declareRequest(
"vehicleApplyLoading",
`Post > @/primeport/`,
);
export const vehicleApplyRecordsList = declareRequest( export const vehicleApplyRecordsList = declareRequest(
"vehicleApplyLoading", "vehicleApplyLoading",
`Post > @/primeport/`, `Post > @/primeport/`,

View File

@ -45,6 +45,7 @@ export const VEHICLE_TYPE_ENUM = [
// 车辆审核状态 // 车辆审核状态
export const VEHICLE_AUDIT_STATUS_ENUM = [ export const VEHICLE_AUDIT_STATUS_ENUM = [
{ bianma: "1", name: "正在审核" },
{ bianma: "2", name: "通过" }, { bianma: "2", name: "通过" },
{ bianma: "3", name: "不通过" }, { bianma: "3", name: "不通过" },
]; ];

View File

@ -1,29 +1,46 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Form, message, Modal } from "antd"; import { Button, Form, message, Modal } from "antd";
import { useRef, useState } from "react"; import { useEffect, useRef, useState } from "react";
import FormBuilder from "zy-react-library/components/FormBuilder"; import FormBuilder from "zy-react-library/components/FormBuilder";
import Page from "zy-react-library/components/Page"; import Page from "zy-react-library/components/Page";
import DictionarySelect from "zy-react-library/components/Select/Dictionary"; import DictionarySelect from "zy-react-library/components/Select/Dictionary";
import Table from "zy-react-library/components/Table"; import Table from "zy-react-library/components/Table";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import { getLabelName } from "zy-react-library/utils";
import NeedToKnowModal from "~/components/NeedToKnowModal"; import NeedToKnowModal from "~/components/NeedToKnowModal";
import { NS_PERSONNEL_APPLICATION } from "~/enumerate/namespace"; import { NS_FIRST_LEVEL_DOOR_INFO, NS_PERSONNEL_APPLICATION } from "~/enumerate/namespace";
function Add(props) { function Add(props) {
const [form] = Form.useForm();
const gateLevelAuthArea = FormBuilder.useWatch("gateLevelAuthArea", form);
const [personnelList, setPersonnelList] = useState([]); const [personnelList, setPersonnelList] = useState([]);
const [addPersonnelModalVisible, setAddPersonnelModalVisible] = useState(false); const [addPersonnelModalVisible, setAddPersonnelModalVisible] = useState(false);
const [needToKnowModalVisible, setNeedToKnowModalVisible] = useState(false); const [needToKnowModalVisible, setNeedToKnowModalVisible] = useState(false);
const [firstLevelDoorInfoListAll, setFirstLevelDoorInfoListAll] = useState([]);
const signatureUrl = useRef(""); const signatureUrl = useRef("");
const [form] = Form.useForm(); const getFirstLevelDoorInfoListAll = async () => {
const { data } = await props["firstLevelDoorInfoListAll"]({ hgAuthArea: gateLevelAuthArea });
setFirstLevelDoorInfoListAll(data);
};
useEffect(() => {
if (gateLevelAuthArea) {
getFirstLevelDoorInfoListAll();
}
}, [gateLevelAuthArea]);
const onSubmit = async (values) => { const onSubmit = async (values) => {
if (!values.todo8) { if (!values.todo8) {
message.warning("请勾选《安全进港须知》并签字"); message.warning("请勾选《安全进港须知》并签字");
return; return;
} }
const { success } = await props["personnelApplicationAdd"]({ ...values }); const { success } = await props["personnelApplicationAdd"]({
...values,
gateLevelAuthArea: JSON.stringify({ area: values.area }),
});
if (success) { if (success) {
message.success("操作成功"); message.success("操作成功");
props.history.goBack(); props.history.goBack();
@ -41,8 +58,41 @@ function Add(props) {
{ name: "todo2", label: "审核部门", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] }, { name: "todo2", label: "审核部门", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] },
{ name: "todo3", label: "审核人员", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] }, { name: "todo3", label: "审核人员", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] },
{ name: "todo4", label: "时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE }, { name: "todo4", label: "时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
{ name: "todo5", label: "访问港区", render: (<DictionarySelect dictValue="HG_AUTH_AREA" />) }, {
{ name: "todo6", label: "访问口门名称", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] }, name: "gateLevelAuthArea",
label: "访问港区",
render: (
<DictionarySelect
dictValue="HG_AUTH_AREA"
onGetOption={(option) => {
const area = { value: option.dictLabel, bianma: option.dictValue };
form.setFieldValue("area", area);
}}
onChange={() => {
form.setFieldValue("mkmjId", "");
form.setFieldValue("mkmjName", "");
}}
/>
),
},
{ name: "area", label: "访问港区", onlyForLabel: true },
{
name: "mkmjId",
label: "访问口门名称",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: firstLevelDoorInfoListAll,
itemsField: { labelKey: "mkmjName", valueKey: "id" },
componentProps: {
onChange: event =>
form.setFieldValue("mkmjName", getLabelName({
list: firstLevelDoorInfoListAll,
status: event,
idKey: "id",
nameKey: "mkmjName",
})),
},
},
{ name: "mkmjName", label: "访问口门名称", onlyForLabel: true },
{ {
customizeRender: true, customizeRender: true,
span: 24, span: 24,
@ -202,4 +252,4 @@ const AddPersonnelModalComponent = (props) => {
const AddPersonnelModal = Connect([NS_PERSONNEL_APPLICATION], true)(AddPersonnelModalComponent); const AddPersonnelModal = Connect([NS_PERSONNEL_APPLICATION], true)(AddPersonnelModalComponent);
export default Connect([NS_PERSONNEL_APPLICATION], true)(Add); export default Connect([NS_PERSONNEL_APPLICATION, NS_FIRST_LEVEL_DOOR_INFO], true)(Add);

View File

@ -1,6 +1,6 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Form, message } from "antd"; import { Button, Form, message } from "antd";
import { useRef, useState } from "react"; import { useEffect, useRef, useState } from "react";
import FormBuilder from "zy-react-library/components/FormBuilder"; import FormBuilder from "zy-react-library/components/FormBuilder";
import Page from "zy-react-library/components/Page"; import Page from "zy-react-library/components/Page";
import DictionarySelect from "zy-react-library/components/Select/Dictionary"; import DictionarySelect from "zy-react-library/components/Select/Dictionary";
@ -9,22 +9,40 @@ import DepartmentSelectTree from "zy-react-library/components/SelectTree/Departm
import Upload from "zy-react-library/components/Upload"; import Upload from "zy-react-library/components/Upload";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import { LICENSE_PLATE_NUMBER } from "zy-react-library/regular"; import { LICENSE_PLATE_NUMBER } from "zy-react-library/regular";
import { getLabelName } from "zy-react-library/utils";
import NeedToKnowModal from "~/components/NeedToKnowModal"; import NeedToKnowModal from "~/components/NeedToKnowModal";
import { NS_VEHICLE_APPLICATION } from "~/enumerate/namespace"; import { NS_FIRST_LEVEL_DOOR_INFO, NS_VEHICLE_APPLICATION } from "~/enumerate/namespace";
function Add(props) { function Add(props) {
const [needToKnowModalVisible, setNeedToKnowModalVisible] = useState(false);
const signatureUrl = useRef("");
const [form] = Form.useForm(); const [form] = Form.useForm();
const todo7 = Form.useWatch("todo7", form); const todo7 = Form.useWatch("todo7", form);
const gateLevelAuthArea = FormBuilder.useWatch("gateLevelAuthArea", form);
const [needToKnowModalVisible, setNeedToKnowModalVisible] = useState(false);
const [firstLevelDoorInfoListAll, setFirstLevelDoorInfoListAll] = useState([]);
const signatureUrl = useRef("");
const getFirstLevelDoorInfoListAll = async () => {
const { data } = await props["firstLevelDoorInfoListAll"]({ hgAuthArea: gateLevelAuthArea });
setFirstLevelDoorInfoListAll(data);
};
useEffect(() => {
if (gateLevelAuthArea) {
getFirstLevelDoorInfoListAll();
}
}, [gateLevelAuthArea]);
const onSubmit = async (values) => { const onSubmit = async (values) => {
if (!values.todo15) { if (!values.todo15) {
message.warning("请勾选《安全进港须知》并签字"); message.warning("请勾选《安全进港须知》并签字");
return; return;
} }
const { success } = await props["vehicleApplicationAdd"]({ ...values }); const { success } = await props["vehicleApplicationAdd"]({
...values,
gateLevelAuthArea: JSON.stringify({ area: values.area }),
});
if (success) { if (success) {
message.success("操作成功"); message.success("操作成功");
props.history.goBack(); props.history.goBack();
@ -42,8 +60,41 @@ function Add(props) {
{ name: "todo2", label: "审核部门", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] }, { name: "todo2", label: "审核部门", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] },
{ name: "todo3", label: "审核人员", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] }, { name: "todo3", label: "审核人员", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] },
{ name: "todo4", label: "时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE }, { name: "todo4", label: "时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
{ name: "todo5", label: "访问港区", render: (<DictionarySelect dictValue="HG_AUTH_AREA" />) }, {
{ name: "todo6", label: "访问口门名称", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] }, name: "gateLevelAuthArea",
label: "访问港区",
render: (
<DictionarySelect
dictValue="HG_AUTH_AREA"
onGetOption={(option) => {
const area = { value: option.dictLabel, bianma: option.dictValue };
form.setFieldValue("area", area);
}}
onChange={() => {
form.setFieldValue("mkmjId", "");
form.setFieldValue("mkmjName", "");
}}
/>
),
},
{ name: "area", label: "访问港区", onlyForLabel: true },
{
name: "mkmjId",
label: "访问口门名称",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: firstLevelDoorInfoListAll,
itemsField: { labelKey: "mkmjName", valueKey: "id" },
componentProps: {
onChange: event =>
form.setFieldValue("mkmjName", getLabelName({
list: firstLevelDoorInfoListAll,
status: event,
idKey: "id",
nameKey: "mkmjName",
})),
},
},
{ name: "mkmjName", label: "访问口门名称", onlyForLabel: true },
{ name: "todo7", label: "驾驶人员部门", render: (<DepartmentSelectTree />) }, { name: "todo7", label: "驾驶人员部门", render: (<DepartmentSelectTree />) },
{ name: "todo8", label: "驾驶人员", render: (<PersonnelSelect params={{ departmentId: todo7 }} />) }, { name: "todo8", label: "驾驶人员", render: (<PersonnelSelect params={{ departmentId: todo7 }} />) },
{ name: "todo9", label: "车牌类型", render: (<DictionarySelect dictValue="LICENSE_PLATE_TYPE" />) }, { name: "todo9", label: "车牌类型", render: (<DictionarySelect dictValue="LICENSE_PLATE_TYPE" />) },
@ -99,4 +150,4 @@ function Add(props) {
); );
} }
export default Connect([NS_VEHICLE_APPLICATION], true)(Add); export default Connect([NS_VEHICLE_APPLICATION, NS_FIRST_LEVEL_DOOR_INFO], true)(Add);

View File

@ -52,7 +52,7 @@ function List(props) {
{ name: "gateName", label: "闸机名称" }, { name: "gateName", label: "闸机名称" },
{ name: "gateStatus", label: "闸机状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: FARE_GATE_STATUS_ENUM }, { name: "gateStatus", label: "闸机状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: FARE_GATE_STATUS_ENUM },
{ name: "gateType", label: "闸机类型", render: (<DictionarySelect dictValue="HGKM_MKMJ_GATE_TYPE" />) }, { name: "gateType", label: "闸机类型", render: (<DictionarySelect dictValue="HGKM_MKMJ_GATE_TYPE" />) },
{ name: "todo", label: "闸机类别", render: (<DictionarySelect dictValue="HGKM_MKMJ_CATEGORY_TYPE" />) }, { name: "gateCategory", label: "闸机类别", render: (<DictionarySelect dictValue="HGKM_MKMJ_CATEGORY_TYPE" />) },
]} ]}
/> />
<Table <Table
@ -79,7 +79,7 @@ function List(props) {
title: "闸机位置", title: "闸机位置",
render: (_, record) => `${record.longitude || ""}--${record.latitude || ""}`, render: (_, record) => `${record.longitude || ""}--${record.latitude || ""}`,
}, },
{ dataIndex: "todo4", title: "摄像头个数", width: 100 }, { dataIndex: "videoCount", title: "摄像头个数", width: 100 },
{ {
dataIndex: "gateStatus", dataIndex: "gateStatus",
title: "闸机状态", title: "闸机状态",

View File

@ -29,7 +29,7 @@ function Add(props) {
const info = useRef([]); const info = useRef([]);
const getApprovalUserListAll = async () => { const getApprovalUserListAll = async () => {
const { data } = await props["approvalUserListAll"](); const { data } = await props["approvalUserListAll"]({ vehiclePermissionFlag: 1 });
setApprovalUserListAll(data); setApprovalUserListAll(data);
}; };
@ -45,18 +45,28 @@ function Add(props) {
...data, ...data,
drivingLicenseFile, drivingLicenseFile,
attachmentFile, attachmentFile,
area: JSON.parse(data.gateLevelAuthArea).area,
gateLevelAuthArea: JSON.parse(data.gateLevelAuthArea).area.map(item => item.bianma),
auditUserId: data.currentAuditUserId,
auditUserName: data.currentAuditUserName,
auditCorpId: data.currentAuditCorpId,
auditCorpName: data.currentAuditCorpName,
auditDeptId: data.currentAuditDeptId,
auditDeptName: data.currentAuditDeptName,
}); });
info.current = data; info.current = data;
} }
else { else {
if (props.vehicleBelongType === 2) {
const userInfo = await getUserInfo(); const userInfo = await getUserInfo();
form.setFieldsValue({ form.setFieldsValue({
employeeVehicleUserId: userInfo.id,
employeeVehicleUserName: userInfo.name,
vehicleDepartmentName: userInfo.departmentName, vehicleDepartmentName: userInfo.departmentName,
vehicleDepartmentId: userInfo.departmentId, vehicleDepartmentId: userInfo.departmentId,
vehicleCorpId: userInfo.corpinfoId,
vehicleCorpName: userInfo.corpinfoName,
}); });
} }
}
}; };
useEffect(() => { useEffect(() => {
@ -82,6 +92,7 @@ function Add(props) {
id: query.id, id: query.id,
drivingLicenseId, drivingLicenseId,
attachmentId, attachmentId,
gateLevelAuthArea: JSON.stringify({ area: values.area }),
}); });
if (success) { if (success) {
message.success("操作成功"); message.success("操作成功");
@ -93,11 +104,12 @@ function Add(props) {
if (!props.vehicleBelongType) { if (!props.vehicleBelongType) {
return [ return [
{ name: "vehicleBelongType", label: "车辆所属类型", onlyForLabel: true }, { name: "vehicleBelongType", label: "车辆所属类型", onlyForLabel: true },
// TODO 应该是选择的 { name: "employeeVehicleUserName", label: "车辆归属人", span: 24, componentProps: { disabled: true } },
{ name: "employeeVehicleUserId", label: "车辆归属人", span: 24, componentProps: { disabled: !!query.id } }, { name: "employeeVehicleUserId", label: "车辆归属人ID", onlyForLabel: true },
{ name: "employeeVehicleUserName", label: "车辆归属人名称", onlyForLabel: true },
{ name: "vehicleDepartmentName", label: "车辆所属部门", onlyForLabel: true }, { name: "vehicleDepartmentName", label: "车辆所属部门", onlyForLabel: true },
{ name: "vehicleDepartmentId", label: "车辆所属部门ID", onlyForLabel: true }, { name: "vehicleDepartmentId", label: "车辆所属部门ID", onlyForLabel: true },
{ name: "vehicleCorpId", label: "车辆所属企业ID", onlyForLabel: true },
{ name: "vehicleCorpName", label: "车辆所属企业名称", onlyForLabel: true },
]; ];
} }
else if (props.vehicleBelongType === 2) { else if (props.vehicleBelongType === 2) {
@ -111,6 +123,8 @@ function Add(props) {
}, },
{ name: "vehicleDepartmentName", label: "车辆所属部门", componentProps: { disabled: true } }, { name: "vehicleDepartmentName", label: "车辆所属部门", componentProps: { disabled: true } },
{ name: "vehicleDepartmentId", label: "车辆所属部门ID", onlyForLabel: true }, { name: "vehicleDepartmentId", label: "车辆所属部门ID", onlyForLabel: true },
{ name: "vehicleCorpId", label: "车辆所属企业ID", onlyForLabel: true },
{ name: "vehicleCorpName", label: "车辆所属企业名称", onlyForLabel: true },
]; ];
} }
}; };
@ -174,7 +188,21 @@ function Add(props) {
), ),
}, },
{ name: "vehicleTypeName", label: "车辆类型名称", onlyForLabel: true }, { name: "vehicleTypeName", label: "车辆类型名称", onlyForLabel: true },
{ name: "gateLevelAuthArea", label: "访问港区", render: (<DictionarySelect dictValue="HG_AUTH_AREA" />) }, {
name: "gateLevelAuthArea",
label: "访问港区",
render: (
<DictionarySelect
dictValue="HG_AUTH_AREA"
mode="multiple"
onGetOption={(option) => {
const area = option.map(item => ({ value: item.dictLabel, bianma: item.dictValue }));
form.setFieldValue("area", area);
}}
/>
),
},
{ name: "area", label: "访问港区", onlyForLabel: true },
{ name: "visitStartTime", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATETIME }, { name: "visitStartTime", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATETIME },
{ name: "visitEndTime", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATETIME }, { name: "visitEndTime", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATETIME },
{ {

View File

@ -8,9 +8,9 @@ import { getLabelName } from "zy-react-library/utils";
import { NS_VEHICLE_APPLY } from "~/enumerate/namespace"; import { NS_VEHICLE_APPLY } from "~/enumerate/namespace";
const VEHICLE_APPROVAL_STATUS_ENUM = [ const VEHICLE_APPROVAL_STATUS_ENUM = [
{ value: "1", label: "审批中" }, { bianma: "1", name: "审批中" },
{ value: "2", label: "通过" }, { bianma: "2", name: "通过" },
{ value: "3", label: "已驳回" }, { bianma: "3", name: "已驳回" },
]; ];
function List(props) { function List(props) {
@ -18,12 +18,12 @@ function List(props) {
params: { vehicleBelongType: 1 }, params: { vehicleBelongType: 1 },
}); });
const onDelete = (record) => { const onDelete = (id) => {
Modal.confirm({ Modal.confirm({
title: "删除确认", title: "删除确认",
content: "确定要删除吗?", content: "确定要删除吗?",
onOk: async () => { onOk: async () => {
const { success } = await props["vehicleApplyDelete"]({ id: record.id }); const { success } = await props["vehicleApplyDelete"]({ id });
if (success) { if (success) {
message.success("删除成功"); message.success("删除成功");
getData(); getData();
@ -55,7 +55,7 @@ function List(props) {
{ {
title: "访问港区范围", title: "访问港区范围",
dataIndex: "gateLevelAuthArea", dataIndex: "gateLevelAuthArea",
render: (_, record) => JSON.parse(record.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、"), render: (_, record) => record.gateLevelAuthArea && JSON.parse(record.gateLevelAuthArea).area.map(item => item.value).join("、"),
}, },
{ title: "访问开始时间", dataIndex: "visitStartTime" }, { title: "访问开始时间", dataIndex: "visitStartTime" },
{ title: "访问结束时间", dataIndex: "visitEndTime" }, { title: "访问结束时间", dataIndex: "visitEndTime" },
@ -65,9 +65,9 @@ function List(props) {
render: (_, record) => getLabelName({ list: VEHICLE_APPROVAL_STATUS_ENUM, status: record.auditFlag }), render: (_, record) => getLabelName({ list: VEHICLE_APPROVAL_STATUS_ENUM, status: record.auditFlag }),
}, },
{ {
title: "启用状态", title: "车辆状态",
dataIndex: "statusFlag", dataIndex: "statusFlag",
render: (_, record) => record.statusFlag === 2 ? "启用" : "停用", render: (_, record) => record.statusFlag === 2 ? "正常" : "已拉黑",
}, },
{ {
title: "操作", title: "操作",
@ -87,8 +87,7 @@ function List(props) {
<Button <Button
type="link" type="link"
onClick={() => { onClick={() => {
// TODO props.history.push(`./approvalRecords?id=${record.id}`);
props.history.push(`./approvalRecord?id=${record.id}`);
}} }}
> >
审批记录 审批记录

View File

@ -59,7 +59,7 @@ function View(props) {
{ label: "车牌类型", children: info.licenceTypeName }, { label: "车牌类型", children: info.licenceTypeName },
{ label: "车牌号", children: info.licenceNo }, { label: "车牌号", children: info.licenceNo },
{ label: "车辆类型", children: info.vehicleTypeName }, { label: "车辆类型", children: info.vehicleTypeName },
{ label: "访问港区", children: JSON.parse(info.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、") }, { label: "访问港区", children: info.gateLevelAuthArea && JSON.parse(info.gateLevelAuthArea).area.map(item => item.value).join("、") },
{ label: "访问开始时间", children: info.visitStartTime }, { label: "访问开始时间", children: info.visitStartTime },
{ label: "访问结束时间", children: info.visitEndTime }, { label: "访问结束时间", children: info.visitEndTime },
{ label: "行驶证照片", children: (<PreviewImg files={info.drivingLicenseFile} />), span: 24 }, { label: "行驶证照片", children: (<PreviewImg files={info.drivingLicenseFile} />), span: 24 },
@ -72,7 +72,7 @@ function View(props) {
bordered bordered
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "审批人", children: info.auditUserName }, { label: "审批人", children: info.currentAuditUserName },
]} ]}
/> />
</Spin> </Spin>

View File

@ -22,6 +22,8 @@ function Add(props) {
const { data } = await props["stockPersonnelAndVehiclesVehicleManagementInfo"]({ id: query.id }); const { data } = await props["stockPersonnelAndVehiclesVehicleManagementInfo"]({ id: query.id });
form.setFieldsValue({ form.setFieldsValue({
...data, ...data,
area: JSON.parse(data.gateLevelAuthArea).area,
gateLevelAuthArea: JSON.parse(data.gateLevelAuthArea).area.map(item => item.bianma),
}); });
} }
else { else {
@ -41,6 +43,7 @@ function Add(props) {
const { success } = await props[!query.id ? "stockPersonnelAndVehiclesVehicleManagementAdd" : "stockPersonnelAndVehiclesVehicleManagementUpdate"]({ const { success } = await props[!query.id ? "stockPersonnelAndVehiclesVehicleManagementAdd" : "stockPersonnelAndVehiclesVehicleManagementUpdate"]({
...values, ...values,
id: query.id, id: query.id,
gateLevelAuthArea: JSON.stringify({ area: values.area }),
}); });
if (success) { if (success) {
message.success("操作成功"); message.success("操作成功");
@ -70,7 +73,24 @@ function Add(props) {
{ name: "todo4", label: "车牌类型", render: (<DictionarySelect dictValue="LICENSE_PLATE_TYPE" />) }, { name: "todo4", label: "车牌类型", render: (<DictionarySelect dictValue="LICENSE_PLATE_TYPE" />) },
{ name: "todo5", label: "车牌号", rules: [{ pattern: LICENSE_PLATE_NUMBER, message: "请输入正确的车牌号" }] }, { name: "todo5", label: "车牌号", rules: [{ pattern: LICENSE_PLATE_NUMBER, message: "请输入正确的车牌号" }] },
{ name: "todo6", label: "车辆类型", render: (<DictionarySelect dictValue="VEHICLE_TYPE" />) }, { name: "todo6", label: "车辆类型", render: (<DictionarySelect dictValue="VEHICLE_TYPE" />) },
{ name: "todo7", label: "访问港区", render: (<DictionarySelect dictValue="HG_AUTH_AREA" />) }, {
name: "gateLevelAuthArea",
label: "访问港区",
render: (
<DictionarySelect
dictValue="HG_AUTH_AREA"
onGetOption={(option) => {
const area = { value: option.dictLabel, bianma: option.dictValue };
form.setFieldValue("area", area);
}}
onChange={() => {
form.setFieldValue("mkmjId", "");
form.setFieldValue("mkmjName", "");
}}
/>
),
},
{ name: "area", label: "访问港区", onlyForLabel: true },
{ name: "todo8", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATETIME }, { name: "todo8", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATETIME },
{ name: "todo9", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATETIME }, { name: "todo9", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATETIME },
{ {

View File

@ -1,35 +1,41 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Modal } from "antd"; import { Button, Descriptions, Modal } from "antd";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import Page from "zy-react-library/components/Page"; import Page from "zy-react-library/components/Page";
import PreviewImg from "zy-react-library/components/PreviewImg"; import PreviewImg from "zy-react-library/components/PreviewImg";
import Table from "zy-react-library/components/Table"; import Table from "zy-react-library/components/Table";
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 useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
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_TYPE_ENUM } from "~/enumerate/constant"; import { VEHICLE_AUDIT_STATUS_ENUM, VEHICLE_TYPE_ENUM } from "~/enumerate/constant";
import { NS_STOCK_PERSONNEL_AND_VEHICLES } from "~/enumerate/namespace"; import { NS_VEHICLE_AUDIT } from "~/enumerate/namespace";
function ApprovalRecords(props) { function ApprovalRecords(props) {
const [currentId, setCurrentId] = useState(""); const [currentId, setCurrentId] = useState("");
const [infoModalVisible, setInfoModalVisible] = useState(false); const [infoModalVisible, setInfoModalVisible] = useState(false);
const query = useGetUrlQuery(); const query = useGetUrlQuery();
const { tableProps } = useTable(props["stockPersonnelAndVehiclesVehicleManagementVehicleApprovalRecordsList"], { const { tableProps } = useTable(props["vehicleAuditRecordsList"], {
params: { id: query.id }, params: { vehicleApplyId: query.id },
}); });
return ( return (
<Page headerTitle="审批记录"> <Page headerTitle="审批记录">
<Table <Table
columns={[ columns={[
{ title: "发起人", dataIndex: "todo1" }, { title: "发起人", dataIndex: "employeeVehicleUserName" },
{ title: "发起时间", dataIndex: "todo2" }, { title: "发起时间", dataIndex: "applyTime" },
{ title: "审批人", dataIndex: "todo3" }, { title: "审批人", dataIndex: "auditUserName" },
{ title: "审批时间", dataIndex: "todo4" }, { title: "审批时间", dataIndex: "auditTime" },
{ title: "审批状态", dataIndex: "todo5" }, {
{ title: "打回原因", dataIndex: "todo6" }, title: "审批状态",
{ title: "类型", dataIndex: "todo7" }, dataIndex: "auditStatus",
render: (_, record) => getLabelName({ list: VEHICLE_AUDIT_STATUS_ENUM, status: record.auditStatus }),
},
{ title: "打回原因", dataIndex: "remarks" },
{ title: "类型", dataIndex: "batchState", render: (_, record) => record.batchState === 1 ? "申请" : "更新" },
{ {
title: "操作", title: "操作",
fixed: "right", fixed: "right",
@ -65,11 +71,39 @@ function ApprovalRecords(props) {
} }
const InfoModalComponent = (props) => { const InfoModalComponent = (props) => {
const [info, setInfo] = useState({}); const { getFile } = useGetFile();
const [changeAfter, setChangeAfter] = useState({});
const [changeBefore, setChangeBefore] = useState({});
const [batchState, setBatchState] = useState(1);
const getData = async () => { const getData = async () => {
const { data } = await props["stockPersonnelAndVehiclesVehicleManagementVehicleApprovalRecordsInfo"]({ id: props.id }); const { data } = await props["vehicleAuditInfo"]({ id: props.id });
setInfo(data); const changeAfter = data.changeAfter ? JSON.parse(data.changeAfter) : {};
const changeBefore = data.changeBefore ? JSON.parse(data.changeBefore) : {};
const changeAfterDrivingLicenseFile = await getFile({
eqType: UPLOAD_FILE_TYPE_ENUM[601],
eqForeignKey: changeAfter.drivingLicenseId,
});
const changeAfterAttachmentFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[602], eqForeignKey: changeAfter.attachmentId });
setChangeAfter({
...changeAfter,
drivingLicenseFile: changeAfterDrivingLicenseFile,
attachmentFile: changeAfterAttachmentFile,
});
if (changeBefore && Object.keys(changeBefore).length > 0) {
const changeBeforeDrivingLicenseFile = await getFile({
eqType: UPLOAD_FILE_TYPE_ENUM[601],
eqForeignKey: changeBefore.drivingLicenseId,
});
const changeBeforeAttachmentFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[602], eqForeignKey: changeBefore.attachmentId });
setChangeBefore({
...changeBefore,
drivingLicenseFile: changeBeforeDrivingLicenseFile,
attachmentFile: changeBeforeAttachmentFile,
});
}
setBatchState(data.batchState);
}; };
useEffect(() => { useEffect(() => {
@ -86,8 +120,31 @@ const InfoModalComponent = (props) => {
footer={[ footer={[
<Button key="cancel" onClick={props.onCancel}>取消</Button>, <Button key="cancel" onClick={props.onCancel}>取消</Button>,
]} ]}
loading={props.stockPersonnelAndVehicles.stockPersonnelAndVehiclesLoading}
> >
{
batchState === 1
? (
<Descriptions
column={1}
bordered
styles={{ label: { width: 200 } }}
items={[
{ label: "车辆所属类型", children: getLabelName({ list: VEHICLE_TYPE_ENUM, status: changeAfter.vehicleBelongType }) },
{ label: "车辆所属部门", children: changeAfter.vehicleDepartmentName },
...(changeAfter.vehicleBelongType === 1 ? [{ label: "车辆归属人", children: changeAfter.employeeVehicleUserName }] : []),
{ label: "车牌号", children: changeAfter.licenceNo },
{ label: "车牌类型", children: changeAfter.licenceTypeName },
{ label: "车辆类型", children: changeAfter.vehicleTypeName },
{ label: "访问港区范围", children: changeAfter.gateLevelAuthArea && JSON.parse(changeAfter.gateLevelAuthArea).area.map(item => item.value).join("、") },
{ label: "访问开始时间", children: changeAfter.visitStartTime },
{ label: "访问结束时间", children: changeAfter.visitEndTime },
{ label: "行驶证照片", children: (<PreviewImg files={changeAfter.drivingLicenseFile} />) },
{ label: "车辆照片", children: (<PreviewImg files={changeAfter.attachmentFile} />) },
{ label: "审批人", children: changeAfter.auditUserName },
]}
/>
)
: (
<div> <div>
<style> <style>
{` {`
@ -126,73 +183,75 @@ const InfoModalComponent = (props) => {
<tbody> <tbody>
<tr> <tr>
<th>车辆所属类型</th> <th>车辆所属类型</th>
<td>{getLabelName({ list: VEHICLE_TYPE_ENUM, status: info.todo1 })}</td> <td>{getLabelName({ list: VEHICLE_TYPE_ENUM, status: changeBefore.vehicleBelongType })}</td>
<td>{getLabelName({ list: VEHICLE_TYPE_ENUM, status: info.newTodo1 })}</td> <td>{getLabelName({ list: VEHICLE_TYPE_ENUM, status: changeAfter.vehicleBelongType })}</td>
</tr> </tr>
<tr> <tr>
<th>车辆所属部门</th> <th>车辆所属部门</th>
<td>{info.todo2}</td> <td>{changeBefore.vehicleDepartmentName}</td>
<td>{info.newTodo2}</td> <td>{changeAfter.vehicleDepartmentName}</td>
</tr> </tr>
{info.todo1 !== 1 && ( {changeBefore.vehicleBelongType === 1 && (
<tr> <tr>
<th>车辆归属人</th> <th>车辆归属人</th>
<td>{info.todo3}</td> <td>{changeBefore.employeeVehicleUserName}</td>
<td>{info.newTodo3}</td> <td>{changeAfter.employeeVehicleUserName}</td>
</tr> </tr>
)} )}
<tr> <tr>
<th>车牌号</th> <th>车牌号</th>
<td>{info.todo4}</td> <td>{changeBefore.licenceNo}</td>
<td>{info.newTodo4}</td> <td>{changeAfter.licenceNo}</td>
</tr> </tr>
<tr> <tr>
<th>车牌类型</th> <th>车牌类型</th>
<td>{info.todo5}</td> <td>{changeBefore.licenceTypeName}</td>
<td>{info.newTodo5}</td> <td>{changeAfter.licenceTypeName}</td>
</tr> </tr>
<tr> <tr>
<th>车辆类型</th> <th>车辆类型</th>
<td>{info.todo6}</td> <td>{changeBefore.vehicleTypeName}</td>
<td>{info.newTodo6}</td> <td>{changeAfter.vehicleTypeName}</td>
</tr> </tr>
<tr> <tr>
<th>访问港区范围</th> <th>访问港区范围</th>
<td>{info.todo7}</td> <td>{changeBefore.gateLevelAuthArea && JSON.parse(changeBefore.gateLevelAuthArea).area.map(item => item.value).join("、")}</td>
<td>{info.newTodo7}</td> <td>{changeAfter.gateLevelAuthArea && JSON.parse(changeAfter.gateLevelAuthArea).area.map(item => item.value).join("、")}</td>
</tr> </tr>
<tr> <tr>
<th>访问开始时间</th> <th>访问开始时间</th>
<td>{info.todo8}</td> <td>{changeBefore.visitStartTime}</td>
<td>{info.newTodo8}</td> <td>{changeAfter.visitStartTime}</td>
</tr> </tr>
<tr> <tr>
<th>访问结束时间</th> <th>访问结束时间</th>
<td>{info.todo9}</td> <td>{changeBefore.visitEndTime}</td>
<td>{info.newTodo9}</td> <td>{changeAfter.visitEndTime}</td>
</tr> </tr>
<tr> <tr>
<th>行驶证照片</th> <th>行驶证照片</th>
<td><PreviewImg files={[info.todo10]} /></td> <td><PreviewImg files={changeBefore.drivingLicenseFile} /></td>
<td><PreviewImg files={[info.newTodo10]} /></td> <td><PreviewImg files={changeAfter.drivingLicenseFile} /></td>
</tr> </tr>
<tr> <tr>
<th>车辆照片</th> <th>车辆照片</th>
<td><PreviewImg files={[info.todo11]} /></td> <td><PreviewImg files={changeBefore.attachmentFile} /></td>
<td><PreviewImg files={[info.newTodo11]} /></td> <td><PreviewImg files={changeAfter.attachmentFile} /></td>
</tr> </tr>
<tr> <tr>
<th>审批人</th> <th>审批人</th>
<td>{info.todo12}</td> <td>{changeBefore.auditUserName}</td>
<td>{info.newTodo12}</td> <td>{changeAfter.auditUserName}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
)
}
</Modal> </Modal>
); );
}; };
const InfoModal = Connect([NS_STOCK_PERSONNEL_AND_VEHICLES], true)(InfoModalComponent); const InfoModal = Connect([NS_VEHICLE_AUDIT], true)(InfoModalComponent);
export default Connect([NS_STOCK_PERSONNEL_AND_VEHICLES], true)(ApprovalRecords); export default Connect([NS_VEHICLE_AUDIT], true)(ApprovalRecords);

View File

@ -12,9 +12,9 @@ import { getLabelName } from "zy-react-library/utils";
import { NS_STOCK_PERSONNEL_AND_VEHICLES } from "~/enumerate/namespace"; import { NS_STOCK_PERSONNEL_AND_VEHICLES } from "~/enumerate/namespace";
const VEHICLE_APPROVAL_STATUS_ENUM = [ const VEHICLE_APPROVAL_STATUS_ENUM = [
{ value: "1", label: "审批中" }, { bianma: "1", name: "审批中" },
{ value: "2", label: "通过" }, { bianma: "2", name: "通过" },
{ value: "3", label: "已驳回" }, { bianma: "3", name: "已驳回" },
]; ];
function List(props) { function List(props) {

View File

@ -1,6 +1,6 @@
import useUrlState from "@ahooksjs/use-url-state"; import useUrlState from "@ahooksjs/use-url-state";
import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Modal, Space } from "antd"; import { Button, Space } from "antd";
import { useEffect } from "react"; import { useEffect } from "react";
import AddIcon from "zy-react-library/components/Icon/AddIcon"; import AddIcon from "zy-react-library/components/Icon/AddIcon";
import BackIcon from "zy-react-library/components/Icon/BackIcon"; import BackIcon from "zy-react-library/components/Icon/BackIcon";
@ -12,7 +12,6 @@ import Table from "zy-react-library/components/Table";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
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 { CURRENT_IN_PORT_STATUS_ENUM } from "~/enumerate/constant";
import { NS_VEHICLE_APPLY } from "~/enumerate/namespace"; import { NS_VEHICLE_APPLY } from "~/enumerate/namespace";
const APPROVAL_STATUS_ENUM = [ const APPROVAL_STATUS_ENUM = [
@ -46,22 +45,6 @@ function List(props) {
getData(); getData();
}, [urlState.departmentId]); }, [urlState.departmentId]);
const onUpdateStatus = (record) => {
const message = record.statusFlag === 2 ? "关闭" : "开启";
Modal.confirm({
title: `${message}确认`,
content: `确定要${message}吗?`,
onOk: async () => {
// TODO
const { success } = await props["vehicleApplyUpdateStatus"]({ id: record.id });
if (success) {
message.success(`${message}成功`);
getData();
}
},
});
};
return ( return (
<Page isShowAllAction={false}> <Page isShowAllAction={false}>
<div style={{ display: "flex", gap: 20 }}> <div style={{ display: "flex", gap: 20 }}>
@ -90,12 +73,6 @@ function List(props) {
labelCol={{ span: 8 }} labelCol={{ span: 8 }}
options={[ options={[
{ name: "licenceNo", label: "车牌号" }, { name: "licenceNo", label: "车牌号" },
{
name: "todo2",
label: "当前在港状态",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: CURRENT_IN_PORT_STATUS_ENUM,
},
{ name: "auditFlag", label: "审批状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: APPROVAL_STATUS_ENUM }, { name: "auditFlag", label: "审批状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: APPROVAL_STATUS_ENUM },
{ {
name: "gateLevelAuthAreaId", name: "gateLevelAuthAreaId",
@ -144,7 +121,7 @@ function List(props) {
{ {
title: "访问港区范围", title: "访问港区范围",
dataIndex: "gateLevelAuthArea", dataIndex: "gateLevelAuthArea",
render: (_, record) => JSON.parse(record.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、"), render: (_, record) => record.gateLevelAuthArea && JSON.parse(record.gateLevelAuthArea).area.map(item => item.value).join("、"),
}, },
{ title: "访问起始时间", dataIndex: "visitStartTime" }, { title: "访问起始时间", dataIndex: "visitStartTime" },
{ title: "访问结束时间", dataIndex: "visitEndTime" }, { title: "访问结束时间", dataIndex: "visitEndTime" },
@ -156,7 +133,7 @@ function List(props) {
{ {
title: "车辆开启状态", title: "车辆开启状态",
dataIndex: "statusFlag", dataIndex: "statusFlag",
render: (_, record) => record.statusFlag === 2 ? "启用" : "停用", render: (_, record) => record.statusFlag === 2 ? "正常" : "已拉黑",
}, },
{ {
title: "操作", title: "操作",
@ -175,19 +152,12 @@ function List(props) {
<Button <Button
type="link" type="link"
onClick={() => { onClick={() => {
// TODO
props.history.push(`./vehicleRecords?id=${record.id}`); props.history.push(`./vehicleRecords?id=${record.id}`);
}} }}
> >
车辆进出记录 车辆进出记录
</Button> </Button>
<Button
type="link"
onClick={() => {
onUpdateStatus(record.id);
}}
>
{record.statusFlag === 2 ? "关闭" : "开启"}
</Button>
{record.auditFlag === 3 && ( {record.auditFlag === 3 && (
<Button <Button
type="link" type="link"

View File

@ -1,6 +1,5 @@
import useUrlState from "@ahooksjs/use-url-state";
import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Descriptions, message, Modal, Space, Tabs } from "antd"; import { Button, Descriptions, message, Modal, Space } from "antd";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import FormBuilder from "zy-react-library/components/FormBuilder"; import FormBuilder from "zy-react-library/components/FormBuilder";
import AddIcon from "zy-react-library/components/Icon/AddIcon"; import AddIcon from "zy-react-library/components/Icon/AddIcon";
@ -16,26 +15,15 @@ import useTable from "zy-react-library/hooks/useTable";
import { LICENSE_PLATE_NUMBER } from "zy-react-library/regular"; import { LICENSE_PLATE_NUMBER } from "zy-react-library/regular";
import { NS_VEHICLE_BLACKLIST } from "~/enumerate/namespace"; import { NS_VEHICLE_BLACKLIST } from "~/enumerate/namespace";
const TABS_ENUM = [
{ key: "1", label: "股份公司" },
{ key: "2", label: "分公司" },
{ key: "3", label: "相关方" },
];
function List(props) { function List(props) {
const [addModalVisible, setAddModalVisible] = useState(false); const [addModalVisible, setAddModalVisible] = useState(false);
const [viewModalVisible, setViewModalVisible] = useState(false); const [viewModalVisible, setViewModalVisible] = useState(false);
const [currentId, setCurrentId] = useState(""); const [currentId, setCurrentId] = useState("");
const [form] = Search.useForm(); const [form] = Search.useForm();
const [urlState, setUrlState] = useUrlState({
platform: props.platform || TABS_ENUM[0].key,
}, {
navigateMode: "replace",
});
const { tableProps, getData } = useTable(props["vehicleBlacklistList"], { const { tableProps, getData } = useTable(props["vehicleBlacklistList"], {
form, form,
params: { platform: urlState.platform },
}); });
const onDelete = (record) => { const onDelete = (record) => {
@ -59,7 +47,7 @@ function List(props) {
{ {
name: "vehicleDepartmentId", name: "vehicleDepartmentId",
label: "车辆所属部门", label: "车辆所属部门",
render: (<DepartmentSelectTree searchType="inType" params={{ enterpriseType: [+urlState.platform] }} />), render: (<DepartmentSelectTree searchType="inType" params={{ enterpriseType: [1, 2, 3] }} />),
}, },
{ name: "employeeVehicleUserName", label: "车辆所属人" }, { name: "employeeVehicleUserName", label: "车辆所属人" },
{ name: "licenceNo", label: "车牌号" }, { name: "licenceNo", label: "车牌号" },
@ -69,19 +57,6 @@ function List(props) {
onFinish={getData} onFinish={getData}
/> />
<Table <Table
headerTitle={(
!props.platform && (
<Tabs
activeKey={urlState.platform}
items={TABS_ENUM}
onChange={(event) => {
setUrlState({ platform: event });
form.setFieldValue("vehicleDepartmentId", "");
getData();
}}
/>
)
)}
toolBarRender={() => ( toolBarRender={() => (
<Button <Button
type="primary" type="primary"
@ -102,7 +77,7 @@ function List(props) {
{ title: "车辆类型", dataIndex: "vehicleTypeName" }, { title: "车辆类型", dataIndex: "vehicleTypeName" },
{ {
title: "操作", title: "操作",
width: 120, width: 150,
fixed: "right", fixed: "right",
render: (_, record) => ( render: (_, record) => (
<Space> <Space>
@ -220,8 +195,12 @@ const ViewModalComponent = (props) => {
const getData = async () => { const getData = async () => {
const { data } = await props["vehicleBlacklistInfo"]({ id: props.id }); const { data } = await props["vehicleBlacklistInfo"]({ id: props.id });
const drivingLicenseFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[601], eqForeignKey: data.drivingLicenseId }); let drivingLicenseFile = [];
const attachmentFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[602], eqForeignKey: data.attachmentId }); let attachmentFile = [];
if (data.drivingLicenseId)
drivingLicenseFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[601], eqForeignKey: data.drivingLicenseId });
if (data.attachmentId)
attachmentFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[602], eqForeignKey: data.attachmentId });
setInfo({ setInfo({
...data, ...data,
drivingLicenseFile, drivingLicenseFile,
@ -256,7 +235,7 @@ const ViewModalComponent = (props) => {
{ label: "车牌号", children: info.licenceNo }, { label: "车牌号", children: info.licenceNo },
{ label: "车牌类型", children: info.licenceTypeName }, { label: "车牌类型", children: info.licenceTypeName },
{ label: "车辆类型", children: info.vehicleTypeName }, { label: "车辆类型", children: info.vehicleTypeName },
{ label: "访问港区范围", children: JSON.parse(info.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、") }, { label: "访问港区范围", children: info.gateLevelAuthArea && JSON.parse(info.gateLevelAuthArea).area.map(item => item.value).join("、") },
{ label: "车辆照片", children: (<PreviewImg files={info.attachmentFile} />) }, { label: "车辆照片", children: (<PreviewImg files={info.attachmentFile} />) },
{ label: "行驶证照片", children: (<PreviewImg files={info.drivingLicenseFile} />) }, { label: "行驶证照片", children: (<PreviewImg files={info.drivingLicenseFile} />) },
]} ]}

View File

@ -1,6 +1,5 @@
import useUrlState from "@ahooksjs/use-url-state";
import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, message, Modal, Tabs } from "antd"; import { Button, message, Modal } from "antd";
import { useState } from "react"; import { useState } from "react";
import FormBuilder from "zy-react-library/components/FormBuilder"; import FormBuilder from "zy-react-library/components/FormBuilder";
import AddIcon from "zy-react-library/components/Icon/AddIcon"; import AddIcon from "zy-react-library/components/Icon/AddIcon";
@ -17,24 +16,13 @@ import useUploadFile from "zy-react-library/hooks/useUploadFile";
import { LICENSE_PLATE_NUMBER } from "zy-react-library/regular"; import { LICENSE_PLATE_NUMBER } from "zy-react-library/regular";
import { NS_VEHICLES_VIOLATION } from "~/enumerate/namespace"; import { NS_VEHICLES_VIOLATION } from "~/enumerate/namespace";
const TABS_ENUM = [
{ key: "1", label: "股份公司" },
{ key: "2", label: "分公司" },
{ key: "3", label: "相关方" },
];
function List(props) { function List(props) {
const [addModalVisible, setAddModalVisible] = useState(false); const [addModalVisible, setAddModalVisible] = useState(false);
const [form] = Search.useForm(); const [form] = Search.useForm();
const [urlState, setUrlState] = useUrlState({
platform: props.platform || TABS_ENUM[0].key,
}, {
navigateMode: "replace",
});
const { tableProps, getData } = useTable(props["vehiclesViolationList"], { const { tableProps, getData } = useTable(props["vehiclesViolationList"], {
form, form,
params: { platform: urlState.platform },
}); });
return ( return (
@ -44,7 +32,7 @@ function List(props) {
{ {
name: "vehicleDepartmentId", name: "vehicleDepartmentId",
label: "车辆所属部门", label: "车辆所属部门",
render: (<DepartmentSelectTree searchType="inType" params={{ enterpriseType: [+urlState.platform] }} />), render: (<DepartmentSelectTree searchType="inType" params={{ enterpriseType: [1, 2, 3] }} />),
}, },
{ name: "employeeVehicleUserName", label: "车辆所属人" }, { name: "employeeVehicleUserName", label: "车辆所属人" },
{ name: "licenceNo", label: "车牌号" }, { name: "licenceNo", label: "车牌号" },
@ -54,19 +42,6 @@ function List(props) {
onFinish={getData} onFinish={getData}
/> />
<Table <Table
headerTitle={(
!props.platform && (
<Tabs
activeKey={urlState.platform}
items={TABS_ENUM}
onChange={(event) => {
setUrlState({ platform: event });
form.setFieldValue("vehicleDepartmentId", "");
getData();
}}
/>
)
)}
toolBarRender={() => ( toolBarRender={() => (
<Button <Button
type="primary" type="primary"
@ -196,7 +171,7 @@ const AddModalComponent = (props) => {
placeholder: "违规区域需明确车辆在港口内的具体违规位置如某一口门附近、某一码头区域、某一仓库通道等..", placeholder: "违规区域需明确车辆在港口内的具体违规位置如某一口门附近、某一码头区域、某一仓库通道等..",
}, },
{ name: "illegalImages", label: "违规照片", render: (<Upload />) }, { name: "illegalImages", label: "违规照片", render: (<Upload />) },
{ name: "describeMessage", label: " 违规说明", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, required: false }, { name: "describeMessage", label: " 违规说明", render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
]} ]}
/> />
</Modal> </Modal>

View File

@ -10,7 +10,7 @@ import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
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 useTable from "zy-react-library/hooks/useTable"; import useTable from "zy-react-library/hooks/useTable";
import { getLabelName } from "zy-react-library/utils"; import { getLabelName, getMatchedItems } from "zy-react-library/utils";
import { VEHICLE_AUDIT_STATUS_ENUM } from "~/enumerate/constant"; import { VEHICLE_AUDIT_STATUS_ENUM } from "~/enumerate/constant";
import { NS_VEHICLE_AUDIT } from "~/enumerate/namespace"; import { NS_VEHICLE_AUDIT } from "~/enumerate/namespace";
@ -43,7 +43,7 @@ function RelatedVehicles(props) {
{ {
dataIndex: "gateLevelAuthArea", dataIndex: "gateLevelAuthArea",
title: "区域范围", title: "区域范围",
render: (_, record) => JSON.parse(record.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、"), render: (_, record) => record.gateLevelAuthArea && JSON.parse(record.gateLevelAuthArea).area.map(item => item.value).join("、"),
}, },
{ {
dataIndex: "visitStartTime", dataIndex: "visitStartTime",
@ -114,28 +114,13 @@ function RelatedVehicles(props) {
} }
{ {
infoModalVisible && ( infoModalVisible && (
<Modal <InfoModal
open id={currentId}
title="查看"
maskClosable={false}
onCancel={() => { onCancel={() => {
setInfoModalVisible(false); setInfoModalVisible(false);
setCurrentId("");
}} }}
width={600} />
footer={[
<Button
key="cancel"
onClick={() => {
setInfoModalVisible(false);
}}
>
取消
</Button>,
]}
loading={props.vehicleAudit.vehicleAuditLoading}
>
<InfoModal id={currentId} />
</Modal>
) )
} }
{ {
@ -179,7 +164,7 @@ const ReviewModalComponent = (props) => {
confirmLoading={props.vehicleAudit.vehicleAuditLoading} confirmLoading={props.vehicleAudit.vehicleAuditLoading}
> >
<Spin spinning={props.vehicleAudit.vehicleAuditLoading}> <Spin spinning={props.vehicleAudit.vehicleAuditLoading}>
<InfoModal id={props.id} /> <PublicInfoModal id={props.id} />
<FormBuilder <FormBuilder
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}
@ -194,7 +179,7 @@ const ReviewModalComponent = (props) => {
name: "auditStatus", name: "auditStatus",
label: "是否通过审核", label: "是否通过审核",
render: FORM_ITEM_RENDER_ENUM.RADIO, render: FORM_ITEM_RENDER_ENUM.RADIO,
items: VEHICLE_AUDIT_STATUS_ENUM, items: getMatchedItems({ list: VEHICLE_AUDIT_STATUS_ENUM, value: ["2", "3"] }),
}, },
{ {
name: "remarks", name: "remarks",
@ -269,7 +254,7 @@ const InfoModalComponent = (props) => {
{ label: "项目名称", children: info.projectName }, { label: "项目名称", children: info.projectName },
{ label: "审核人员", children: info.auditUserName }, { label: "审核人员", children: info.auditUserName },
{ label: "时间范围", children: info.visitStartTime + info.visitEndTime }, { label: "时间范围", children: info.visitStartTime + info.visitEndTime },
{ label: "地域范围", children: JSON.parse(info.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、") }, { label: "地域范围", children: info.gateLevelAuthArea && JSON.parse(info.gateLevelAuthArea).area.map(item => item.value).join("、") },
{ label: "驾驶人员", children: info.employeeVehicleUserName }, { label: "驾驶人员", children: info.employeeVehicleUserName },
{ label: "车辆类型", children: info.vehicleTypeName }, { label: "车辆类型", children: info.vehicleTypeName },
{ label: "车牌类型", children: info.licenceTypeName }, { label: "车牌类型", children: info.licenceTypeName },
@ -284,7 +269,24 @@ const InfoModalComponent = (props) => {
); );
}; };
function InfoModal(props) {
return (
<Modal
open
title="查看"
maskClosable={false}
onCancel={props.onCancel}
width={600}
footer={[
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
]}
>
<PublicInfoModal id={props.id} />
</Modal>
);
}
const ReviewModal = Connect([NS_VEHICLE_AUDIT], true)(ReviewModalComponent); const ReviewModal = Connect([NS_VEHICLE_AUDIT], true)(ReviewModalComponent);
const InfoModal = Connect([NS_VEHICLE_AUDIT], true)(InfoModalComponent); const PublicInfoModal = Connect([NS_VEHICLE_AUDIT], true)(InfoModalComponent);
const ViewRejectReasonModal = Connect([NS_VEHICLE_AUDIT], true)(ViewRejectReasonModalComponent); const ViewRejectReasonModal = Connect([NS_VEHICLE_AUDIT], true)(ViewRejectReasonModalComponent);
export default Connect([NS_VEHICLE_AUDIT], true)(RelatedVehicles); export default Connect([NS_VEHICLE_AUDIT], true)(RelatedVehicles);

View File

@ -12,7 +12,7 @@ import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
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 useTable from "zy-react-library/hooks/useTable"; import useTable from "zy-react-library/hooks/useTable";
import { getLabelName } from "zy-react-library/utils"; import { getLabelName, getMatchedItems } from "zy-react-library/utils";
import { VEHICLE_AUDIT_STATUS_ENUM, VEHICLE_TYPE_ENUM } from "~/enumerate/constant"; import { VEHICLE_AUDIT_STATUS_ENUM, VEHICLE_TYPE_ENUM } from "~/enumerate/constant";
import { NS_VEHICLE_AUDIT } from "~/enumerate/namespace"; import { NS_VEHICLE_AUDIT } from "~/enumerate/namespace";
@ -20,6 +20,7 @@ function ShareVehicles(props) {
const [reviewModalVisible, setReviewModalVisible] = useState(false); const [reviewModalVisible, setReviewModalVisible] = useState(false);
const [infoModalVisible, setInfoModalVisible] = useState(false); const [infoModalVisible, setInfoModalVisible] = useState(false);
const [currentId, setCurrentId] = useState(""); const [currentId, setCurrentId] = useState("");
const [currentVehicleApplyId, setCurrentVehicleApplyId] = useState("");
const [form] = Search.useForm(); const [form] = Search.useForm();
const { tableProps, getData } = useTable(props["vehicleAuditList"], { const { tableProps, getData } = useTable(props["vehicleAuditList"], {
@ -56,10 +57,11 @@ function ShareVehicles(props) {
{ {
dataIndex: "gateLevelAuthArea", dataIndex: "gateLevelAuthArea",
title: "访问港区范围", title: "访问港区范围",
render: (_, record) => JSON.parse(record.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、"), render: (_, record) => record.gateLevelAuthArea && JSON.parse(record.gateLevelAuthArea).area.map(item => item.value).join("、"),
}, },
{ dataIndex: "visitStartTime", title: "访问开始时间" }, { dataIndex: "visitStartTime", title: "访问开始时间" },
{ dataIndex: "visitEndTime", title: "访问结束时间" }, { dataIndex: "visitEndTime", title: "访问结束时间" },
{ dataIndex: "auditStatus", title: "审批状态", render: (_, record) => getLabelName({ list: VEHICLE_AUDIT_STATUS_ENUM, status: record.auditStatus }), hidden: !props.isRecords },
{ {
title: "操作", title: "操作",
width: 100, width: 100,
@ -71,6 +73,7 @@ function ShareVehicles(props) {
onClick={() => { onClick={() => {
setReviewModalVisible(true); setReviewModalVisible(true);
setCurrentId(record.id); setCurrentId(record.id);
setCurrentVehicleApplyId(record.vehicleApplyId);
}} }}
> >
审核 审核
@ -81,6 +84,7 @@ function ShareVehicles(props) {
onClick={() => { onClick={() => {
setInfoModalVisible(true); setInfoModalVisible(true);
setCurrentId(record.id); setCurrentId(record.id);
setCurrentVehicleApplyId(record.vehicleApplyId);
}} }}
> >
查看 查看
@ -95,9 +99,11 @@ function ShareVehicles(props) {
reviewModalVisible && ( reviewModalVisible && (
<ReviewModal <ReviewModal
id={currentId} id={currentId}
vehicleApplyId={currentVehicleApplyId}
onCancel={() => { onCancel={() => {
setReviewModalVisible(false); setReviewModalVisible(false);
setCurrentId(""); setCurrentId("");
setCurrentVehicleApplyId("");
}} }}
getData={getData} getData={getData}
/> />
@ -105,28 +111,16 @@ function ShareVehicles(props) {
} }
{ {
infoModalVisible && ( infoModalVisible && (
<Modal <InfoModal
open id={currentId}
title="查看" vehicleApplyId={currentVehicleApplyId}
maskClosable={false} isRecords={props.isRecords}
onCancel={() => { onCancel={() => {
setInfoModalVisible(false); setInfoModalVisible(false);
setCurrentId("");
setCurrentVehicleApplyId("");
}} }}
width={600} />
footer={[
<Button
key="cancel"
onClick={() => {
setInfoModalVisible(false);
}}
>
取消
</Button>,
]}
loading={props.vehicleAudit.vehicleAuditLoading}
>
<InfoModal id={currentId} />
</Modal>
) )
} }
</Page> </Page>
@ -140,6 +134,7 @@ function ReviewModalComponent(props) {
const { success } = await props["vehicleAuditApproval"]({ const { success } = await props["vehicleAuditApproval"]({
...values, ...values,
id: props.id, id: props.id,
vehicleApplyId: props.vehicleApplyId,
}); });
if (success) { if (success) {
message.success("操作成功"); message.success("操作成功");
@ -159,13 +154,14 @@ function ReviewModalComponent(props) {
confirmLoading={props.vehicleAudit.vehicleAuditLoading} confirmLoading={props.vehicleAudit.vehicleAuditLoading}
> >
<Spin spinning={props.vehicleAudit.vehicleAuditLoading}> <Spin spinning={props.vehicleAudit.vehicleAuditLoading}>
<InfoModal id={props.id} /> <PublicInfoModal id={props.id} vehicleApplyId={props.vehicleApplyId} />
<FormBuilder <FormBuilder
style={{ marginTop: 10 }}
form={form} form={form}
showActionButtons={false} showActionButtons={false}
span={24} span={24}
onFinish={onSubmit} onFinish={onSubmit}
labelCol={{ span: 8 }} labelCol={{ span: 6 }}
values={{ values={{
auditStatus: "2", auditStatus: "2",
}} }}
@ -174,7 +170,7 @@ function ReviewModalComponent(props) {
name: "auditStatus", name: "auditStatus",
label: "是否通过", label: "是否通过",
render: FORM_ITEM_RENDER_ENUM.RADIO, render: FORM_ITEM_RENDER_ENUM.RADIO,
items: VEHICLE_AUDIT_STATUS_ENUM, items: getMatchedItems({ list: VEHICLE_AUDIT_STATUS_ENUM, value: ["2", "3"] }),
}, },
{ {
name: "remarks", name: "remarks",
@ -200,24 +196,26 @@ function InfoModalComponent(props) {
const getData = async () => { const getData = async () => {
const { data } = await props["vehicleAuditInfo"]({ id: props.id }); const { data } = await props["vehicleAuditInfo"]({ id: props.id });
const changeAfter = data.changeAfter ? JSON.parse(data.changeAfter) : {};
const changeBefore = data.changeBefore ? JSON.parse(data.changeBefore) : {};
const changeAfterDrivingLicenseFile = await getFile({ const changeAfterDrivingLicenseFile = await getFile({
eqType: UPLOAD_FILE_TYPE_ENUM[601], eqType: UPLOAD_FILE_TYPE_ENUM[601],
eqForeignKey: data.changeAfter.drivingLicenseId, eqForeignKey: changeAfter.drivingLicenseId,
}); });
const changeAfterAttachmentFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[602], eqForeignKey: data.changeAfter.attachmentId }); const changeAfterAttachmentFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[602], eqForeignKey: changeAfter.attachmentId });
setChangeAfter({ setChangeAfter({
...data.changeAfter, ...changeAfter,
drivingLicenseFile: changeAfterDrivingLicenseFile, drivingLicenseFile: changeAfterDrivingLicenseFile,
attachmentFile: changeAfterAttachmentFile, attachmentFile: changeAfterAttachmentFile,
}); });
if (data.changeBefore && Object.keys(data.changeBefore).length > 0) { if (changeBefore && Object.keys(changeBefore).length > 0) {
const changeBeforeDrivingLicenseFile = await getFile({ const changeBeforeDrivingLicenseFile = await getFile({
eqType: UPLOAD_FILE_TYPE_ENUM[601], eqType: UPLOAD_FILE_TYPE_ENUM[601],
eqForeignKey: data.changeBefore.drivingLicenseId, eqForeignKey: changeBefore.drivingLicenseId,
}); });
const changeBeforeAttachmentFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[602], eqForeignKey: data.changeBefore.attachmentId }); const changeBeforeAttachmentFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[602], eqForeignKey: changeBefore.attachmentId });
setChangeBefore({ setChangeBefore({
...data.changeBefore, ...changeBefore,
drivingLicenseFile: changeBeforeDrivingLicenseFile, drivingLicenseFile: changeBeforeDrivingLicenseFile,
attachmentFile: changeBeforeAttachmentFile, attachmentFile: changeBeforeAttachmentFile,
}); });
@ -226,7 +224,7 @@ function InfoModalComponent(props) {
}; };
const getRecordsList = async () => { const getRecordsList = async () => {
const { data } = await props["vehicleAuditRecordsList"]({ id: props.id }); const { data } = await props["vehicleAuditRecordsList"]({ vehicleApplyId: props.vehicleApplyId });
setRecordsList(data); setRecordsList(data);
}; };
@ -237,6 +235,7 @@ function InfoModalComponent(props) {
return ( return (
<div> <div>
<Spin spinning={props.vehicleAudit.vehicleAuditLoading}>
<Divider orientation="left">申请信息</Divider> <Divider orientation="left">申请信息</Divider>
{ {
batchState === 1 batchState === 1
@ -252,7 +251,7 @@ function InfoModalComponent(props) {
{ label: "车牌号", children: changeAfter.licenceNo }, { label: "车牌号", children: changeAfter.licenceNo },
{ label: "车牌类型", children: changeAfter.licenceTypeName }, { label: "车牌类型", children: changeAfter.licenceTypeName },
{ label: "车辆类型", children: changeAfter.vehicleTypeName }, { label: "车辆类型", children: changeAfter.vehicleTypeName },
{ label: "访问港区范围", children: JSON.parse(changeAfter.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、") }, { label: "访问港区范围", children: changeAfter.gateLevelAuthArea && JSON.parse(changeAfter.gateLevelAuthArea).area.map(item => item.value).join("、") },
{ label: "访问开始时间", children: changeAfter.visitStartTime }, { label: "访问开始时间", children: changeAfter.visitStartTime },
{ label: "访问结束时间", children: changeAfter.visitEndTime }, { label: "访问结束时间", children: changeAfter.visitEndTime },
{ label: "行驶证照片", children: (<PreviewImg files={changeAfter.drivingLicenseFile} />) }, { label: "行驶证照片", children: (<PreviewImg files={changeAfter.drivingLicenseFile} />) },
@ -332,8 +331,8 @@ function InfoModalComponent(props) {
</tr> </tr>
<tr> <tr>
<th>访问港区范围</th> <th>访问港区范围</th>
<td>{JSON.parse(changeBefore.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、")}</td> <td>{changeBefore.gateLevelAuthArea && JSON.parse(changeBefore.gateLevelAuthArea).area.map(item => item.value).join("、")}</td>
<td>{JSON.parse(changeAfter.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、")}</td> <td>{changeAfter.gateLevelAuthArea && JSON.parse(changeAfter.gateLevelAuthArea).area.map(item => item.value).join("、")}</td>
</tr> </tr>
<tr> <tr>
<th>访问开始时间</th> <th>访问开始时间</th>
@ -365,25 +364,50 @@ function InfoModalComponent(props) {
</div> </div>
) )
} }
{!props.isRecords
&& (
<>
<Divider orientation="left">审批信息</Divider> <Divider orientation="left">审批信息</Divider>
{recordsList.map((record, index) => ( {recordsList.map((record, index) => (
<div key={index} style={{ marginTop: 10 }}>
<Descriptions <Descriptions
key={index}
column={1} column={1}
bordered bordered
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "审批人", children: record.auditUserName }, { label: "审批人", children: record.auditUserName },
{ label: "审批时间", children: record.todo }, { label: "审批时间", children: record.auditTime },
{ label: "审批状态", children: getLabelName({ list: VEHICLE_AUDIT_STATUS_ENUM, status: record.auditStatus }) }, { label: "审批状态", children: getLabelName({ list: VEHICLE_AUDIT_STATUS_ENUM, status: record.auditStatus }) },
...(record.auditStatus === 3 ? [{ label: "打回意见", children: record.remarks }] : []), ...(record.auditStatus === 3 ? [{ label: "打回意见", children: record.remarks }] : []),
]} ]}
/> />
))} </div>
),
)}
</>
)}
</Spin>
</div> </div>
); );
} }
function InfoModal(props) {
return (
<Modal
open
title="查看"
maskClosable={false}
onCancel={props.onCancel}
width={800}
footer={[
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
]}
>
<PublicInfoModal id={props.id} vehicleApplyId={props.vehicleApplyId} isRecords={props.isRecords} />
</Modal>
);
}
const ReviewModal = Connect([NS_VEHICLE_AUDIT], true)(ReviewModalComponent); const ReviewModal = Connect([NS_VEHICLE_AUDIT], true)(ReviewModalComponent);
const InfoModal = Connect([NS_VEHICLE_AUDIT], true)(InfoModalComponent); const PublicInfoModal = Connect([NS_VEHICLE_AUDIT], true)(InfoModalComponent);
export default Connect([NS_VEHICLE_AUDIT], true)(ShareVehicles); export default Connect([NS_VEHICLE_AUDIT], true)(ShareVehicles);

View File

@ -94,28 +94,13 @@ function RelatedPersonnel(props) {
} }
{ {
infoModalVisible && ( infoModalVisible && (
<Modal <InfoModal
open id={currentId}
title="查看"
maskClosable={false}
onCancel={() => { onCancel={() => {
setInfoModalVisible(false); setInfoModalVisible(false);
setCurrentId("");
}} }}
width={600} />
footer={[
<Button
key="cancel"
onClick={() => {
setInfoModalVisible(false);
}}
>
取消
</Button>,
]}
loading={props.relatedPersonnel.relatedPersonnelLoading}
>
<InfoModal id={currentId} />
</Modal>
) )
} }
{ {
@ -158,7 +143,7 @@ const ReviewModalComponent = (props) => {
width={800} width={800}
confirmLoading={props.relatedPersonnel.relatedPersonnelLoading} confirmLoading={props.relatedPersonnel.relatedPersonnelLoading}
> >
<InfoModal id={props.id} /> <PublicInfoModal id={props.id} />
<FormBuilder <FormBuilder
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}
@ -275,7 +260,24 @@ const ViewRejectReasonModalComponent = (props) => {
); );
}; };
function InfoModal(props) {
return (
<Modal
open
title="查看"
maskClosable={false}
onCancel={props.onCancel}
width={600}
footer={[
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
]}
>
<PublicInfoModal id={props.id} />
</Modal>
);
}
const ReviewModal = Connect([NS_RELATED_PERSONNEL], true)(ReviewModalComponent); const ReviewModal = Connect([NS_RELATED_PERSONNEL], true)(ReviewModalComponent);
const InfoModal = Connect([NS_RELATED_PERSONNEL], true)(InfoModalComponent); const PublicInfoModal = Connect([NS_RELATED_PERSONNEL], true)(InfoModalComponent);
const ViewRejectReasonModal = Connect([NS_RELATED_PERSONNEL], true)(ViewRejectReasonModalComponent); const ViewRejectReasonModal = Connect([NS_RELATED_PERSONNEL], true)(ViewRejectReasonModalComponent);
export default Connect([NS_RELATED_PERSONNEL], true)(RelatedPersonnel); export default Connect([NS_RELATED_PERSONNEL], true)(RelatedPersonnel);

View File

@ -9,23 +9,36 @@ import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
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 useUploadFile from "zy-react-library/hooks/useUploadFile"; import useUploadFile from "zy-react-library/hooks/useUploadFile";
import { ID_NUMBER, PHONE } from "zy-react-library/regular"; import { ID_NUMBER, PHONE } from "zy-react-library/regular";
import { NS_APPROVER_USER, NS_TEMPORARY_PERSONNEL } from "~/enumerate/namespace"; import { getLabelName } from "zy-react-library/utils";
import { NS_APPROVER_USER, NS_FIRST_LEVEL_DOOR_INFO, NS_TEMPORARY_PERSONNEL } from "~/enumerate/namespace";
function Add(props) { function Add(props) {
const [form] = FormBuilder.useForm(); const [form] = FormBuilder.useForm();
const gateLevelAuthArea = FormBuilder.useWatch("gateLevelAuthArea", form);
const { loading: uploadFileLoading, uploadFile } = useUploadFile(); const { loading: uploadFileLoading, uploadFile } = useUploadFile();
const [approvalUserListAll, setApprovalUserListAll] = useState([]); const [approvalUserListAll, setApprovalUserListAll] = useState([]);
const [firstLevelDoorInfoListAll, setFirstLevelDoorInfoListAll] = useState([]);
const getApprovalUserListAll = async () => { const getApprovalUserListAll = async () => {
const { data } = await props["approvalUserListAll"](); const { data } = await props["approvalUserListAll"]();
setApprovalUserListAll(data); setApprovalUserListAll(data);
}; };
const getFirstLevelDoorInfoListAll = async () => {
const { data } = await props["firstLevelDoorInfoListAll"]({ hgAuthArea: gateLevelAuthArea });
setFirstLevelDoorInfoListAll(data);
};
useEffect(() => { useEffect(() => {
getApprovalUserListAll(); getApprovalUserListAll();
}, []); }, []);
useEffect(() => {
if (gateLevelAuthArea) {
getFirstLevelDoorInfoListAll();
}
}, [gateLevelAuthArea]);
const onSubmit = async (values) => { const onSubmit = async (values) => {
const { filePath: userFaceUrl } = await uploadFile({ const { filePath: userFaceUrl } = await uploadFile({
files: values.userFace, files: values.userFace,
@ -40,6 +53,7 @@ function Add(props) {
{ userPhone: values.userPhone }, { userPhone: values.userPhone },
{ userCard: values.userCard }, { userCard: values.userCard },
], ],
gateLevelAuthArea: JSON.stringify({ area: values.area }),
}); });
if (success) { if (success) {
message.success("新增成功"); message.success("新增成功");
@ -60,8 +74,40 @@ function Add(props) {
{ name: "userCard", label: "身份证号", rules: [{ pattern: ID_NUMBER, message: "请输入正确的身份证号" }] }, { name: "userCard", label: "身份证号", rules: [{ pattern: ID_NUMBER, message: "请输入正确的身份证号" }] },
{ name: "visitStartTime", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATE }, { name: "visitStartTime", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATE },
{ name: "visitEndTime", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATE }, { name: "visitEndTime", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATE },
{ name: "gateLevelAuthArea", label: "访问港区", render: <DictionarySelect dictValue="HG_AUTH_AREA" /> }, {
{ name: "mkmjId", label: "访问口门名称", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] }, // todo name: "gateLevelAuthArea",
label: "访问港区",
render: (
<DictionarySelect
dictValue="HG_AUTH_AREA"
onGetOption={(option) => {
const area = { value: option.dictLabel, bianma: option.dictValue };
form.setFieldValue("area", area);
}}
onChange={() => {
form.setFieldValue("mkmjId", "");
form.setFieldValue("mkmjName", "");
}}
/>
),
},
{ name: "area", label: "访问港区", onlyForLabel: true },
{
name: "mkmjId",
label: "访问口门名称",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: firstLevelDoorInfoListAll,
itemsField: { labelKey: "mkmjName", valueKey: "id" },
componentProps: {
onChange: event =>
form.setFieldValue("mkmjName", getLabelName({
list: firstLevelDoorInfoListAll,
status: event,
idKey: "id",
nameKey: "mkmjName",
})),
},
},
{ name: "mkmjName", label: "访问口门名称", onlyForLabel: true }, { name: "mkmjName", label: "访问口门名称", onlyForLabel: true },
{ name: "reasonVisit", label: "来访事由", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA }, { name: "reasonVisit", label: "来访事由", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
{ {
@ -138,4 +184,4 @@ function Add(props) {
); );
} }
export default Connect([NS_TEMPORARY_PERSONNEL, NS_APPROVER_USER], true)(Add); export default Connect([NS_TEMPORARY_PERSONNEL, NS_APPROVER_USER, NS_FIRST_LEVEL_DOOR_INFO], true)(Add);

View File

@ -13,7 +13,7 @@ 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 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 { NS_TEMPORARY_PERSONNEL } from "~/enumerate/namespace"; import { NS_FIRST_LEVEL_DOOR_INFO, NS_TEMPORARY_PERSONNEL } from "~/enumerate/namespace";
const STATUS_ENUM = [ const STATUS_ENUM = [
{ bianma: "1", name: "审核中" }, { bianma: "1", name: "审核中" },
@ -26,6 +26,7 @@ function List(props) {
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 [firstLevelDoorInfoListAll, setFirstLevelDoorInfoListAll] = useState([]);
const [form] = Search.useForm(); const [form] = Search.useForm();
const { tableProps, getData } = useTable(props["temporaryPersonnelList"], { const { tableProps, getData } = useTable(props["temporaryPersonnelList"], {
@ -33,6 +34,14 @@ function List(props) {
params: { processOrRecord: !props.isRecords ? 1 : 2 }, params: { processOrRecord: !props.isRecords ? 1 : 2 },
}); });
const getFirstLevelDoorInfoListAll = async () => {
const { data } = await props["firstLevelDoorInfoListAll"]();
setFirstLevelDoorInfoListAll(data);
};
useEffect(() => {
getFirstLevelDoorInfoListAll();
}, []);
return ( return (
<Page isShowAllAction={false}> <Page isShowAllAction={false}>
<Search <Search
@ -43,7 +52,13 @@ function List(props) {
{ name: "todo2", label: "访问开始时间" }, { name: "todo2", label: "访问开始时间" },
{ name: "todo3", label: "访问结束时间" }, { name: "todo3", label: "访问结束时间" },
{ name: "auditFlag", label: "审批状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: STATUS_ENUM }, { name: "auditFlag", label: "审批状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: STATUS_ENUM },
{ name: "todo5", label: "访问口门名称", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] }, {
name: "todo5",
label: "访问口门名称",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: firstLevelDoorInfoListAll,
itemsField: { labelKey: "mkmjName", valueKey: "id" },
},
]} ]}
/> />
<Table <Table
@ -235,7 +250,10 @@ const ReviewModalComponent = (props) => {
{ label: "身份证号", children: info.personApplyList[0].userCard }, { label: "身份证号", children: info.personApplyList[0].userCard },
{ label: "访问开始时间", children: info.visitStartTime }, { label: "访问开始时间", children: info.visitStartTime },
{ label: "访问结束时间", children: info.visitEndTime }, { label: "访问结束时间", children: info.visitEndTime },
{ label: "访问港区", children: JSON.parse(info.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、") }, {
label: "访问港区",
children: info.gateLevelAuthArea && JSON.parse(info.gateLevelAuthArea).area.map(item => item.value).join("、"),
},
{ label: "访问口门名称", children: info.mkmjName }, { label: "访问口门名称", children: info.mkmjName },
{ label: "来访事由", children: info.reasonVisit }, { label: "来访事由", children: info.reasonVisit },
{ label: "人脸照片", children: (<PreviewImg files={[info.personApplyList[0].userFaceUrl]} />) }, { label: "人脸照片", children: (<PreviewImg files={[info.personApplyList[0].userFaceUrl]} />) },
@ -356,4 +374,4 @@ const ApprovalDetailsModalComponent = (props) => {
const ReviewModal = Connect([NS_TEMPORARY_PERSONNEL], true)(ReviewModalComponent); const ReviewModal = Connect([NS_TEMPORARY_PERSONNEL], true)(ReviewModalComponent);
const ApprovalDetailsModal = Connect([NS_TEMPORARY_PERSONNEL], true)(ApprovalDetailsModalComponent); const ApprovalDetailsModal = Connect([NS_TEMPORARY_PERSONNEL], true)(ApprovalDetailsModalComponent);
export default Connect([NS_TEMPORARY_PERSONNEL], true)(List); export default Connect([NS_TEMPORARY_PERSONNEL, NS_FIRST_LEVEL_DOOR_INFO], true)(List);

View File

@ -41,7 +41,7 @@ function View(props) {
{ label: "身份证号", children: info.personApplyList[0].userCard }, { label: "身份证号", children: info.personApplyList[0].userCard },
{ label: "访问开始时间", children: info.visitStartTime }, { label: "访问开始时间", children: info.visitStartTime },
{ label: "访问结束时间", children: info.visitEndTime }, { label: "访问结束时间", children: info.visitEndTime },
{ label: "访问港区", children: JSON.parse(info.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、") }, { label: "访问港区", children: info.gateLevelAuthArea && JSON.parse(info.gateLevelAuthArea).area.map(item => item.value).join("、") },
{ label: "访问口门名称", children: info.mkmjName }, { label: "访问口门名称", children: info.mkmjName },
{ label: "来访事由", children: info.reasonVisit, span: 2 }, { label: "来访事由", children: info.reasonVisit, span: 2 },
{ label: "人脸照片", children: (<PreviewImg files={[info.personApplyList[0].userFaceUrl]} />), span: 2 }, { label: "人脸照片", children: (<PreviewImg files={[info.personApplyList[0].userFaceUrl]} />), span: 2 },

View File

@ -9,23 +9,36 @@ import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
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 useUploadFile from "zy-react-library/hooks/useUploadFile"; import useUploadFile from "zy-react-library/hooks/useUploadFile";
import { ID_NUMBER, LICENSE_PLATE_NUMBER, PHONE } from "zy-react-library/regular"; import { ID_NUMBER, LICENSE_PLATE_NUMBER, PHONE } from "zy-react-library/regular";
import { NS_APPROVER_USER, NS_TEMPORARY_VEHICLE } from "~/enumerate/namespace"; import { getLabelName } from "zy-react-library/utils";
import { NS_APPROVER_USER, NS_FIRST_LEVEL_DOOR_INFO, NS_TEMPORARY_VEHICLE } from "~/enumerate/namespace";
function Add(props) { function Add(props) {
const [form] = FormBuilder.useForm(); const [form] = FormBuilder.useForm();
const gateLevelAuthArea = FormBuilder.useWatch("gateLevelAuthArea", form);
const { loading: uploadFileLoading, uploadFile } = useUploadFile(); const { loading: uploadFileLoading, uploadFile } = useUploadFile();
const [approvalUserListAll, setApprovalUserListAll] = useState([]); const [approvalUserListAll, setApprovalUserListAll] = useState([]);
const [firstLevelDoorInfoListAll, setFirstLevelDoorInfoListAll] = useState([]);
const getApprovalUserListAll = async () => { const getApprovalUserListAll = async () => {
const { data } = await props["approvalUserListAll"](); const { data } = await props["approvalUserListAll"]();
setApprovalUserListAll(data); setApprovalUserListAll(data);
}; };
const getFirstLevelDoorInfoListAll = async () => {
const { data } = await props["firstLevelDoorInfoListAll"]({ hgAuthArea: gateLevelAuthArea });
setFirstLevelDoorInfoListAll(data);
};
useEffect(() => { useEffect(() => {
getApprovalUserListAll(); getApprovalUserListAll();
}, []); }, []);
useEffect(() => {
if (gateLevelAuthArea) {
getFirstLevelDoorInfoListAll();
}
}, [gateLevelAuthArea]);
const onSubmit = async (values) => { const onSubmit = async (values) => {
const { id: drivingLicenseId } = await uploadFile({ const { id: drivingLicenseId } = await uploadFile({
single: false, single: false,
@ -41,6 +54,7 @@ function Add(props) {
...values, ...values,
drivingLicenseId, drivingLicenseId,
attachmentId, attachmentId,
gateLevelAuthArea: JSON.stringify({ area: values.area }),
}); });
if (success) { if (success) {
message.success("新增成功"); message.success("新增成功");
@ -57,8 +71,8 @@ function Add(props) {
options={[ options={[
{ label: "申请信息", render: FORM_ITEM_RENDER_ENUM.DIVIDER }, { label: "申请信息", render: FORM_ITEM_RENDER_ENUM.DIVIDER },
{ name: "employeeVehicleUserName", label: "访问人姓名" }, { name: "employeeVehicleUserName", label: "访问人姓名" },
{ name: "todo2", label: "手机号", rules: [{ pattern: PHONE, message: "请输入正确的手机号" }] }, { name: "lsUserPhone", label: "手机号", rules: [{ pattern: PHONE, message: "请输入正确的手机号" }] },
{ name: "todo3", label: "身份证号", rules: [{ pattern: ID_NUMBER, message: "请输入正确的身份证号" }] }, { name: "lsUserIdcard", label: "身份证号", rules: [{ pattern: ID_NUMBER, message: "请输入正确的身份证号" }] },
{ name: "licenceNo", label: "车牌号", rules: [{ pattern: LICENSE_PLATE_NUMBER, message: "请输入正确的车牌号" }] }, { name: "licenceNo", label: "车牌号", rules: [{ pattern: LICENSE_PLATE_NUMBER, message: "请输入正确的车牌号" }] },
{ {
name: "licenceType", name: "licenceType",
@ -84,8 +98,40 @@ function Add(props) {
{ name: "vehicleTypeName", label: "车辆类型", onlyForLabel: true }, { name: "vehicleTypeName", label: "车辆类型", onlyForLabel: true },
{ name: "visitStartTime", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATE }, { name: "visitStartTime", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATE },
{ name: "visitEndTime", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATE }, { name: "visitEndTime", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATE },
{ name: "gateLevelAuthArea", label: "访问港区", render: <DictionarySelect dictValue="HG_AUTH_AREA" /> }, {
{ name: "mkmjId", label: "访问口门名称", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] }, // todo name: "gateLevelAuthArea",
label: "访问港区",
render: (
<DictionarySelect
dictValue="HG_AUTH_AREA"
onGetOption={(option) => {
const area = { value: option.dictLabel, bianma: option.dictValue };
form.setFieldValue("area", area);
}}
onChange={() => {
form.setFieldValue("mkmjId", "");
form.setFieldValue("mkmjName", "");
}}
/>
),
},
{ name: "area", label: "访问港区", onlyForLabel: true },
{
name: "mkmjId",
label: "访问口门名称",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: firstLevelDoorInfoListAll,
itemsField: { labelKey: "mkmjName", valueKey: "id" },
componentProps: {
onChange: event =>
form.setFieldValue("mkmjName", getLabelName({
list: firstLevelDoorInfoListAll,
status: event,
idKey: "id",
nameKey: "mkmjName",
})),
},
},
{ name: "mkmjName", label: "访问口门名称", onlyForLabel: true }, { name: "mkmjName", label: "访问口门名称", onlyForLabel: true },
{ name: "reasonVisit", label: "来访事由", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA }, { name: "reasonVisit", label: "来访事由", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
{ {
@ -173,4 +219,4 @@ function Add(props) {
); );
} }
export default Connect([NS_TEMPORARY_VEHICLE, NS_APPROVER_USER], true)(Add); export default Connect([NS_TEMPORARY_VEHICLE, NS_APPROVER_USER, NS_FIRST_LEVEL_DOOR_INFO], true)(Add);

View File

@ -13,7 +13,7 @@ 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 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 { NS_TEMPORARY_VEHICLE, NS_VEHICLE_AUDIT } from "~/enumerate/namespace"; import { NS_FIRST_LEVEL_DOOR_INFO, NS_TEMPORARY_VEHICLE, NS_VEHICLE_AUDIT } from "~/enumerate/namespace";
const STATUS_ENUM = [ const STATUS_ENUM = [
{ bianma: "1", name: "审核中" }, { bianma: "1", name: "审核中" },
@ -26,6 +26,7 @@ function List(props) {
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 [firstLevelDoorInfoListAll, setFirstLevelDoorInfoListAll] = useState([]);
const [form] = Search.useForm(); const [form] = Search.useForm();
const { tableProps, getData } = useTable(props["vehicleAuditList"], { const { tableProps, getData } = useTable(props["vehicleAuditList"], {
@ -33,6 +34,14 @@ function List(props) {
params: { vehicleBelongTypeArr: "6", processOrRecord: !props.isRecords ? 1 : 2 }, params: { vehicleBelongTypeArr: "6", processOrRecord: !props.isRecords ? 1 : 2 },
}); });
const getFirstLevelDoorInfoListAll = async () => {
const { data } = await props["firstLevelDoorInfoListAll"]();
setFirstLevelDoorInfoListAll(data);
};
useEffect(() => {
getFirstLevelDoorInfoListAll();
}, []);
return ( return (
<Page isShowAllAction={false}> <Page isShowAllAction={false}>
<Search <Search
@ -44,7 +53,13 @@ function List(props) {
{ name: "visitStartTime", label: "访问开始时间" }, { name: "visitStartTime", label: "访问开始时间" },
{ name: "visitEndTime", label: "访问结束时间" }, { name: "visitEndTime", label: "访问结束时间" },
{ name: "auditStatus", label: "审批状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: STATUS_ENUM }, { name: "auditStatus", label: "审批状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: STATUS_ENUM },
{ name: "todo6", label: "访问口门名称" }, {
name: "todo6",
label: "访问口门名称",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: firstLevelDoorInfoListAll,
itemsField: { labelKey: "mkmjName", valueKey: "id" },
},
]} ]}
/> />
<Table <Table
@ -76,15 +91,15 @@ function List(props) {
)} )}
columns={[ columns={[
{ title: "访问人姓名", dataIndex: "employeeVehicleUserName" }, { title: "访问人姓名", dataIndex: "employeeVehicleUserName" },
{ title: "手机号", dataIndex: "todo2" }, { title: "手机号", dataIndex: "lsUserPhone" },
{ title: "身份证号", dataIndex: "todo3" }, { title: "身份证号", dataIndex: "lsUserIdcard" },
{ title: "车牌号", dataIndex: "licenceNo" }, { title: "车牌号", dataIndex: "licenceNo" },
{ title: "车牌类型", dataIndex: "licenceTypeName" }, { title: "车牌类型", dataIndex: "licenceTypeName" },
{ title: "车辆类型", dataIndex: "vehicleTypeName" }, { title: "车辆类型", dataIndex: "vehicleTypeName" },
{ title: "来访事由", dataIndex: "todo7" }, { title: "来访事由", dataIndex: "reasonVisit" },
{ title: "访问起始时间", dataIndex: "visitStartTime" }, { title: "访问起始时间", dataIndex: "visitStartTime" },
{ title: "访问结束时间", dataIndex: "visitEndTime" }, { title: "访问结束时间", dataIndex: "visitEndTime" },
{ title: "访问口门名称", dataIndex: "todo10" }, { title: "访问口门名称", dataIndex: "mkmjName" },
{ {
title: "审批状态", title: "审批状态",
dataIndex: "auditStatus", dataIndex: "auditStatus",
@ -249,7 +264,10 @@ const ReviewModalComponent = (props) => {
{ label: "车辆类型", children: info.vehicleTypeName }, { label: "车辆类型", children: info.vehicleTypeName },
{ label: "访问开始时间", children: info.visitStartTime }, { label: "访问开始时间", children: info.visitStartTime },
{ label: "访问结束时间", children: info.visitEndTime }, { label: "访问结束时间", children: info.visitEndTime },
{ label: "访问港区", children: JSON.parse(info.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、") }, {
label: "访问港区",
children: info.gateLevelAuthArea && JSON.parse(info.gateLevelAuthArea).area.map(item => item.value).join("、"),
},
{ label: "访问口门名称", children: info.mkmjName }, { label: "访问口门名称", children: info.mkmjName },
{ label: "来访事由", children: info.reasonVisit }, { label: "来访事由", children: info.reasonVisit },
{ label: "行驶证照片", children: (<PreviewImg files={info.drivingLicenseFile} />) }, { label: "行驶证照片", children: (<PreviewImg files={info.drivingLicenseFile} />) },
@ -371,4 +389,4 @@ const ApprovalDetailsModalComponent = (props) => {
const ReviewModal = Connect([NS_VEHICLE_AUDIT], true)(ReviewModalComponent); const ReviewModal = Connect([NS_VEHICLE_AUDIT], true)(ReviewModalComponent);
const ApprovalDetailsModal = Connect([NS_TEMPORARY_VEHICLE], true)(ApprovalDetailsModalComponent); const ApprovalDetailsModal = Connect([NS_TEMPORARY_VEHICLE], true)(ApprovalDetailsModalComponent);
export default Connect([NS_VEHICLE_AUDIT], true)(List); export default Connect([NS_VEHICLE_AUDIT, NS_FIRST_LEVEL_DOOR_INFO], true)(List);

View File

@ -51,7 +51,7 @@ function View(props) {
{ label: "车辆类型", children: info.vehicleTypeName }, { label: "车辆类型", children: info.vehicleTypeName },
{ label: "访问开始时间", children: info.visitStartTime }, { label: "访问开始时间", children: info.visitStartTime },
{ label: "访问结束时间", children: info.visitEndTime }, { label: "访问结束时间", children: info.visitEndTime },
{ label: "访问港区", children: JSON.parse(info.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、") }, { label: "访问港区", children: info.gateLevelAuthArea && JSON.parse(info.gateLevelAuthArea).area.map(item => item.value).join("、") },
{ label: "访问口门名称", children: info.mkmjName }, { label: "访问口门名称", children: info.mkmjName },
{ label: "来访事由", children: info.reasonVisit, span: 2 }, { label: "来访事由", children: info.reasonVisit, span: 2 },
{ label: "行驶证照片", children: (<PreviewImg files={info.drivingLicenseFile} />), span: 2 }, { label: "行驶证照片", children: (<PreviewImg files={info.drivingLicenseFile} />), span: 2 },