门禁审批人管理、一级口门信息管理、个人车辆管理、股份单位车辆管理、股份车辆审批、相关方车辆审批
parent
ab784f4e9f
commit
b137834fba
|
|
@ -34,7 +34,7 @@
|
|||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-signature-canvas": "^1.1.0-alpha.2",
|
||||
"zy-react-library": "^1.1.45"
|
||||
"zy-react-library": "^1.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^5.4.1",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,12 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
|||
|
||||
export const approvalUserList = declareRequest(
|
||||
"approvalUserLoading",
|
||||
`Get > /primeport/mkmjApprovalUser/list`,
|
||||
`Post > @/primeport/mkmjApprovalUser/list`,
|
||||
);
|
||||
|
||||
export const approvalUserListAll = declareRequest(
|
||||
"approvalUserLoading",
|
||||
`Get > /primeport/mkmjApprovalUser/listAll`,
|
||||
);
|
||||
|
||||
export const approvalUserDelete = declareRequest(
|
||||
|
|
|
|||
|
|
@ -2,43 +2,47 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
|||
|
||||
export const firstLevelDoorInfoList = declareRequest(
|
||||
"firstLevelDoorInfoLoading",
|
||||
`Post > @/primeport/mkmjArea/list`,
|
||||
`Post > @/primeport/mkmj/list`,
|
||||
);
|
||||
export const firstLevelDoorInfoAdd = declareRequest(
|
||||
"firstLevelDoorInfoLoading",
|
||||
`Post > @/primeport/mkmjArea/save`,
|
||||
`Post > @/primeport/mkmj/save`,
|
||||
);
|
||||
export const firstLevelDoorInfoEdit = declareRequest(
|
||||
"firstLevelDoorInfoLoading",
|
||||
`Put > @/primeport/mkmjArea/edit`,
|
||||
`Put > @/primeport/mkmj/edit`,
|
||||
);
|
||||
export const firstLevelDoorInfoDelete = declareRequest(
|
||||
"firstLevelDoorInfoLoading",
|
||||
`Delete > @/primeport/mkmjArea/{id}`,
|
||||
`Delete > @/primeport/mkmj/{id}`,
|
||||
);
|
||||
export const firstLevelDoorInfoInfo = declareRequest(
|
||||
"firstLevelDoorInfoLoading",
|
||||
`Get > /primeport/mkmjArea/{id}`,
|
||||
`Get > /primeport/mkmj/{id}`,
|
||||
);
|
||||
export const firstLevelDoorInfoCheckName = declareRequest(
|
||||
"firstLevelDoorInfoLoading",
|
||||
`Get > /primeport/mkmj/check-name`,
|
||||
);
|
||||
export const firstLevelDoorInfoCameraList = declareRequest(
|
||||
"firstLevelDoorInfoCameraLoading",
|
||||
`Post > @/primeport/`,
|
||||
`Post > @/primeport/video/list`,
|
||||
);
|
||||
export const firstLevelDoorInfoCameraDelete = declareRequest(
|
||||
"firstLevelDoorInfoCameraLoading",
|
||||
`Delete > @/primeport/`,
|
||||
`Delete > @/primeport/video/{id}`,
|
||||
);
|
||||
export const firstLevelDoorInfoCameraAdd = declareRequest(
|
||||
"firstLevelDoorInfoCameraLoading",
|
||||
`Post > @/primeport/`,
|
||||
`Post > @/primeport/video/save`,
|
||||
);
|
||||
export const firstLevelDoorInfoCameraEdit = declareRequest(
|
||||
"firstLevelDoorInfoCameraLoading",
|
||||
`Put > @/primeport/`,
|
||||
`Put > @/primeport/video/edit`,
|
||||
);
|
||||
export const firstLevelDoorInfoCameraInfo = declareRequest(
|
||||
"firstLevelDoorInfoCameraLoading",
|
||||
`Get > /primeport/`,
|
||||
`Get > /primeport/video/{id}`,
|
||||
);
|
||||
export const firstLevelDoorInfoCameraGetRTSPUrl = declareRequest(
|
||||
"firstLevelDoorInfoCameraLoading",
|
||||
|
|
@ -75,23 +79,31 @@ export const firstLevelDoorInfoChannelInfo = declareRequest(
|
|||
"firstLevelDoorInfoChannelLoading",
|
||||
`Get > /primeport/mkmjPassage/{id}`,
|
||||
);
|
||||
export const firstLevelDoorInfoChannelCheckName = declareRequest(
|
||||
"firstLevelDoorInfoChannelLoading",
|
||||
`Get > /primeport/mkmjPassage/check-name`,
|
||||
);
|
||||
export const firstLevelDoorInfoFareGateList = declareRequest(
|
||||
"firstLevelDoorInfoFareGateLoading",
|
||||
`Post > @/primeport/mkmjAreaGate/list`,
|
||||
`Post > @/primeport/mkmjGate/list`,
|
||||
);
|
||||
export const firstLevelDoorInfoFareGateDelete = declareRequest(
|
||||
"firstLevelDoorInfoFareGateLoading",
|
||||
`Delete > @/primeport/mkmjAreaGate/{id}`,
|
||||
`Delete > @/primeport/mkmjGate/{id}`,
|
||||
);
|
||||
export const firstLevelDoorInfoFareGateAdd = declareRequest(
|
||||
"firstLevelDoorInfoFareGateLoading",
|
||||
`Post > @/primeport/mkmjAreaGate/save`,
|
||||
`Post > @/primeport/mkmjGate/save`,
|
||||
);
|
||||
export const firstLevelDoorInfoFareGateEdit = declareRequest(
|
||||
"firstLevelDoorInfoFareGateLoading",
|
||||
`Put > @/primeport/mkmjAreaGate/edit`,
|
||||
`Put > @/primeport/mkmjGate/edit`,
|
||||
);
|
||||
export const firstLevelDoorInfoFareGateInfo = declareRequest(
|
||||
"firstLevelDoorInfoFareGateLoading",
|
||||
`Get > /primeport/mkmjAreaGate/{id}`,
|
||||
`Get > /primeport/mkmjGate/{id}`,
|
||||
);
|
||||
export const firstLevelDoorInfoFareGateCheckName = declareRequest(
|
||||
"firstLevelDoorInfoFareGateLoading",
|
||||
`Get > /primeport/mkmjGate/check-name`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const personalVehicleList = declareRequest(
|
||||
"personalVehicleLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const personalVehicleDelete = declareRequest(
|
||||
"personalVehicleLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const personalVehicleInfo = declareRequest(
|
||||
"personalVehicleLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const personalVehicleAdd = declareRequest(
|
||||
"personalVehicleLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const personalVehicleUpdate = declareRequest(
|
||||
"personalVehicleLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const relatedVehiclesList = declareRequest(
|
||||
"relatedVehiclesLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const relatedVehiclesRejectReason = declareRequest(
|
||||
"relatedVehiclesLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const relatedVehiclesApproval = declareRequest(
|
||||
"relatedVehiclesLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const relatedVehiclesInfo = declareRequest(
|
||||
"relatedVehiclesLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const shareVehiclesList = declareRequest(
|
||||
"shareVehiclesLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const shareVehiclesInfo = declareRequest(
|
||||
"shareVehiclesLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const shareVehiclesApproval = declareRequest(
|
||||
"shareVehiclesLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const stockVehiclesList = declareRequest(
|
||||
"stockVehiclesLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const stockVehiclesUpdateStatus = declareRequest(
|
||||
"stockVehiclesLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const stockVehiclesInfo = declareRequest(
|
||||
"stockVehiclesLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const stockVehiclesAdd = declareRequest(
|
||||
"stockVehiclesLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const stockVehiclesUpdate = declareRequest(
|
||||
"stockVehiclesLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const stockVehiclesVehicleRecordsList = declareRequest(
|
||||
"stockVehiclesLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const vehicleApplyList = declareRequest(
|
||||
"vehicleApplyLoading",
|
||||
`Post > @/primeport/vehicleApply/list`,
|
||||
);
|
||||
export const vehicleApplyDelete = declareRequest(
|
||||
"vehicleApplyLoading",
|
||||
`Delete > @/primeport/vehicleApply/{id}`,
|
||||
);
|
||||
export const vehicleApplyInfo = declareRequest(
|
||||
"vehicleApplyLoading",
|
||||
`Get > /primeport/vehicleApply/{id}`,
|
||||
);
|
||||
export const vehicleApplyAdd = declareRequest(
|
||||
"vehicleApplyLoading",
|
||||
`Post > @/primeport/vehicleApply/save`,
|
||||
);
|
||||
export const vehicleApplyUpdate = declareRequest(
|
||||
"vehicleApplyLoading",
|
||||
`Put > @/primeport/vehicleApply/edit`,
|
||||
);
|
||||
export const vehicleApplyCheckLicenceNo = declareRequest(
|
||||
"vehicleApplyLoading",
|
||||
`Get > /primeport/vehicleApply/check-licence-no`,
|
||||
);
|
||||
export const vehicleApplyUpdateStatus = declareRequest(
|
||||
"vehicleApplyLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
export const vehicleApplyRecordsList = declareRequest(
|
||||
"vehicleApplyLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||
|
||||
export const vehicleAuditList = declareRequest(
|
||||
"vehicleAuditLoading",
|
||||
`Post > @/primeport/vehicleAudit/pendingApprovalList`,
|
||||
);
|
||||
export const vehicleAuditInfo = declareRequest(
|
||||
"vehicleAuditLoading",
|
||||
`Get > /primeport/vehicleAudit/{id}`,
|
||||
);
|
||||
export const vehicleAuditRecordsList = declareRequest(
|
||||
"vehicleAuditLoading",
|
||||
`Post > @/primeport/vehicleAudit/carApprovalLogByvehicleApplyIdList`,
|
||||
);
|
||||
export const vehicleAuditApproval = declareRequest(
|
||||
"vehicleAuditLoading",
|
||||
`Post > @/primeport/vehicleAudit/audit`,
|
||||
);
|
||||
export const vehicleAuditRejectReason = declareRequest(
|
||||
"vehicleAuditLoading",
|
||||
`Post > @/primeport/`,
|
||||
);
|
||||
|
|
@ -4,58 +4,49 @@
|
|||
|
||||
export {};
|
||||
|
||||
// 口门类型
|
||||
export const AREA_TYPE_ENUM = [
|
||||
{ name: "人行口门", bianma: "1" },
|
||||
{ name: "车行口门", bianma: "2" },
|
||||
{ name: "综合口门", bianma: "3" },
|
||||
];
|
||||
// 车辆排放标准 EMISSION_STANDARDS
|
||||
// 车辆违规类型 VEHICLE_VIOLATION_TYPE
|
||||
// 车辆类型 VEHICLE_TYPE
|
||||
// 车牌类型 LICENSE_PLATE_TYPE
|
||||
// 所属区域 HG_AUTH_AREA
|
||||
// 口门类型 HGKM_MKMJ_TYPE
|
||||
// 通道类型 HGKM_MKMJ_PASSAGE_TYPE
|
||||
// 口门闸机类型 HGKM_MKMJ_GATE_TYPE
|
||||
// 口门闸机类别 HGKM_MKMJ_CATEGORY_TYPE
|
||||
|
||||
// 口门状态
|
||||
export const AREA_STATUS_ENUM = [
|
||||
{ name: "停用", bianma: "0" },
|
||||
{ name: "正常", bianma: "1" },
|
||||
{ name: "暂时关闭", bianma: "2" },
|
||||
];
|
||||
|
||||
// 闸机类型
|
||||
export const FARE_GATE_TYPE_ENUM = [
|
||||
{ name: "入", bianma: "1" },
|
||||
{ name: "出", bianma: "2" },
|
||||
];
|
||||
|
||||
// 闸机类别
|
||||
export const FARE_GATE_CATEGORY_ENUM = [
|
||||
{ name: "人行闸机", bianma: "1" },
|
||||
{ name: "车辆闸机", bianma: "2" },
|
||||
{ name: "综合闸机", bianma: "3" },
|
||||
{ name: "正常", bianma: "2" },
|
||||
{ name: "停用", bianma: "1" },
|
||||
];
|
||||
|
||||
// 闸机状态
|
||||
export const FARE_GATE_STATUS_ENUM = [
|
||||
{ name: "停用", bianma: "0" },
|
||||
{ name: "正常", bianma: "1" },
|
||||
{ name: "暂时关闭", bianma: "2" },
|
||||
];
|
||||
|
||||
// 通道类型
|
||||
export const CHANNEL_TYPE_ENUM = [
|
||||
{ name: "人行通道", bianma: "1" },
|
||||
{ name: "车辆通道", bianma: "2" },
|
||||
{ name: "综合通道", bianma: "3" },
|
||||
{ name: "正常", bianma: "2" },
|
||||
{ name: "停用", bianma: "1" },
|
||||
];
|
||||
|
||||
// 通道状态
|
||||
export const CHANNEL_STATUS_ENUM = [
|
||||
{ name: "停用", bianma: "0" },
|
||||
{ name: "正常", bianma: "1" },
|
||||
{ name: "暂时关闭", bianma: "2" },
|
||||
{ name: "正常", bianma: "2" },
|
||||
{ name: "停用", bianma: "1" },
|
||||
];
|
||||
|
||||
// 车辆类型
|
||||
export const VEHICLE_TYPE_ENUM = [
|
||||
{ bianma: "1", name: "单位车辆" },
|
||||
{ bianma: "2", name: "员工车辆" },
|
||||
{ bianma: "1", name: "股份员工车辆" },
|
||||
{ bianma: "2", name: "股份单位车辆" },
|
||||
{ bianma: "3", name: "分公司员工车辆" },
|
||||
{ bianma: "4", name: "分公司单位车辆" },
|
||||
{ bianma: "5", name: "相关方车辆" },
|
||||
{ bianma: "6", name: "临时车辆" },
|
||||
{ bianma: "7", name: "检查部门车辆" },
|
||||
];
|
||||
|
||||
// 车辆审核状态
|
||||
export const VEHICLE_AUDIT_STATUS_ENUM = [
|
||||
{ bianma: "2", name: "通过" },
|
||||
{ bianma: "3", name: "不通过" },
|
||||
];
|
||||
|
||||
// 当前在港状态
|
||||
|
|
|
|||
|
|
@ -8,13 +8,11 @@ export const NS_GLOBAL = defineNamespace("global");
|
|||
export const NS_APPROVER_USER = defineNamespace("approverUser");
|
||||
export const NS_FIRST_LEVEL_DOOR_INFO = defineNamespace("firstLevelDoorInfo");
|
||||
export const NS_RELATED_PERSONNEL = defineNamespace("relatedPersonnel");
|
||||
export const NS_SHARE_VEHICLES = defineNamespace("shareVehicles");
|
||||
export const NS_RELATED_VEHICLES = defineNamespace("relatedVehicles");
|
||||
export const NS_VEHICLE_AUDIT = defineNamespace("vehicleAudit");
|
||||
export const NS_TEMPORARY_PERSONNEL = defineNamespace("temporaryPersonnel");
|
||||
export const NS_TEMPORARY_VEHICLE = defineNamespace("temporaryVehicle");
|
||||
export const NS_STOCK_PERSONNEL_AND_VEHICLES = defineNamespace("stockPersonnelAndVehicles");
|
||||
export const NS_PERSONAL_VEHICLE = defineNamespace("personalVehicle");
|
||||
export const NS_STOCK_VEHICLES = defineNamespace("stockVehicles");
|
||||
export const NS_VEHICLE_APPLY = defineNamespace("vehicleApply");
|
||||
export const NS_BRANCH_PERSONNEL_AND_VEHICLES = defineNamespace("branchPersonnelAndVehicles");
|
||||
export const NS_STAKEHOLDER_PERSONNEL_AND_VEHICLES = defineNamespace("stakeholderPersonnelAndVehicles");
|
||||
export const NS_PORT_BASED_UNITS_PERSONNEL_AND_VEHICLES = defineNamespace("portBasedUnitsPersonnelAndVehicles");
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ function Apply(props) {
|
|||
};
|
||||
|
||||
const getData = async () => {
|
||||
const primeportAreaData = await getDictionary({ dictValue: "primeport_area" });
|
||||
const primeportAreaData = await getDictionary({ dictValue: "HG_AUTH_AREA" });
|
||||
setPrimeportAreaList(primeportAreaData);
|
||||
const vehicleTypeData = await getDictionary({ dictValue: "VEHICLE_TYPE" });
|
||||
setVehicleTypeList(vehicleTypeData);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ function Add(props) {
|
|||
{ name: "todo2", 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: "todo5", label: "访问港区", render: (<DictionarySelect dictValue="primeport_area" />) },
|
||||
{ name: "todo5", label: "访问港区", render: (<DictionarySelect dictValue="HG_AUTH_AREA" />) },
|
||||
{ name: "todo6", label: "访问口门名称", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] },
|
||||
{
|
||||
customizeRender: true,
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ function Add(props) {
|
|||
{ name: "todo2", 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: "todo5", label: "访问港区", render: (<DictionarySelect dictValue="primeport_area" />) },
|
||||
{ name: "todo5", label: "访问港区", render: (<DictionarySelect dictValue="HG_AUTH_AREA" />) },
|
||||
{ name: "todo6", label: "访问口门名称", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] },
|
||||
{ name: "todo7", label: "驾驶人员部门", render: (<DepartmentSelectTree />) },
|
||||
{ name: "todo8", label: "驾驶人员", render: (<PersonnelSelect params={{ departmentId: todo7 }} />) },
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ 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 { getLabelName } from "zy-react-library/utils";
|
||||
import { AREA_STATUS_ENUM, AREA_TYPE_ENUM } from "~/enumerate/constant";
|
||||
import { AREA_STATUS_ENUM } from "~/enumerate/constant";
|
||||
import { NS_ENCLOSED_AREA, NS_FIRST_LEVEL_DOOR_INFO } from "~/enumerate/namespace";
|
||||
|
||||
const areaLevel = 2;
|
||||
|
|
@ -56,8 +56,8 @@ function List(props) {
|
|||
options={[
|
||||
{ name: "likeAreaName", label: "口门名称" },
|
||||
{ name: "eqAreaStatus", label: "口门状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: AREA_STATUS_ENUM },
|
||||
{ name: "eqAreaType", label: "口门类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: AREA_TYPE_ENUM },
|
||||
{ name: "eqAreaParentId", label: "所属区域", render: <DictionarySelect dictValue="primeport_area" /> },
|
||||
{ name: "eqAreaType", label: "口门类型", render: (<DictionarySelect dictValue="HGKM_MKMJ_TYPE" />) },
|
||||
{ name: "eqAreaParentId", label: "所属区域", render: <DictionarySelect dictValue="HG_AUTH_AREA" /> },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
|
|
@ -80,11 +80,7 @@ function List(props) {
|
|||
)}
|
||||
columns={[
|
||||
{ title: "所属区域", dataIndex: "areaParentName" },
|
||||
{
|
||||
title: "口门类型",
|
||||
dataIndex: "areaType",
|
||||
render: (_, record) => getLabelName({ list: AREA_TYPE_ENUM, status: record.areaType }),
|
||||
},
|
||||
{ title: "口门类型", dataIndex: "areaType" },
|
||||
{ title: "管辖公司", dataIndex: "todo3" },
|
||||
{ title: "口门名称", dataIndex: "areaName" },
|
||||
{
|
||||
|
|
@ -237,10 +233,10 @@ const AddModalComponent = (props) => {
|
|||
labelCol={{ span: 8 }}
|
||||
span={24}
|
||||
options={[
|
||||
{ name: "areaParentId", label: "所属区域", render: <DictionarySelect dictValue="primeport_area" /> },
|
||||
{ name: "areaParentId", label: "所属区域", render: <DictionarySelect dictValue="HG_AUTH_AREA" /> },
|
||||
{ name: "areaParentName", label: "所属区域名称", onlyForLabel: true },
|
||||
{ name: "areaName", label: "口门名称" },
|
||||
{ name: "areaType", label: "口门类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: AREA_TYPE_ENUM },
|
||||
{ name: "areaType", label: "口门类型", render: <DictionarySelect dictValue="HGKM_MKMJ_TYPE" /> },
|
||||
{ name: "areaRange", label: "口门位置" },
|
||||
{ customizeRender: true, span: 24, render: <Map type="cesium" /> },
|
||||
{ name: "areaStatus", label: "口门状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: AREA_STATUS_ENUM },
|
||||
|
|
@ -300,7 +296,7 @@ const ViewModalComponent = (props) => {
|
|||
items={[
|
||||
{ label: "所属区域", children: info.areaParentName },
|
||||
{ label: "口门名称", children: info.areaName },
|
||||
{ label: "口门类型", children: getLabelName({ list: AREA_TYPE_ENUM, status: info.areaType }) },
|
||||
{ label: "口门类型", children: info.areaType },
|
||||
{ label: "口门位置", children: info.areaRange },
|
||||
{ label: "口门状态", children: getLabelName({ list: AREA_STATUS_ENUM, status: info.areaStatus }) },
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, message, Modal, Space } from "antd";
|
||||
import { Button, message, Modal, Space } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
|
|
@ -15,7 +15,7 @@ import { NS_APPROVER_USER } from "~/enumerate/namespace";
|
|||
function ApproverUser(props) {
|
||||
const [addModalVisible, setAddModalVisible] = useState(false);
|
||||
const [currentId, setCurrentId] = useState("");
|
||||
const [form] = Form.useForm();
|
||||
const [form] = Search.useForm();
|
||||
const { tableProps, getData } = useTable(props["approvalUserList"], {
|
||||
form,
|
||||
});
|
||||
|
|
@ -38,8 +38,8 @@ function ApproverUser(props) {
|
|||
<Search
|
||||
labelCol={{ span: 4 }}
|
||||
options={[
|
||||
{ name: "eqDeptId", label: "部门", render: (<DepartmentSelectTree />) },
|
||||
{ name: "likeName", label: "姓名" },
|
||||
{ name: "deptId", label: "部门", render: (<DepartmentSelectTree />) },
|
||||
{ name: "userName", label: "姓名" },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
|
|
@ -57,18 +57,18 @@ function ApproverUser(props) {
|
|||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "部门", dataIndex: "departmentName" },
|
||||
{ title: "姓名", dataIndex: "name" },
|
||||
{ title: "部门", dataIndex: "deptName" },
|
||||
{ title: "姓名", dataIndex: "userName" },
|
||||
{ title: "岗位", dataIndex: "postName" },
|
||||
{ title: "审批权限", dataIndex: "approvalPermission", render: (_, record) => {
|
||||
const approvalPermission = [];
|
||||
if (record.isPersonnelPermission === 1) {
|
||||
if (record.personnelPermissionFlag === 1) {
|
||||
approvalPermission.push("人员");
|
||||
}
|
||||
if (record.isVehiclePermission === 1) {
|
||||
if (record.vehiclePermissionFlag === 1) {
|
||||
approvalPermission.push("车辆");
|
||||
}
|
||||
if (record.isTemporaryPermission === 1) {
|
||||
if (record.temporaryPermissionFlag === 1) {
|
||||
approvalPermission.push("临时访客");
|
||||
}
|
||||
return approvalPermission.join(",");
|
||||
|
|
@ -117,18 +117,18 @@ function ApproverUser(props) {
|
|||
}
|
||||
|
||||
function AddModalComponent(props) {
|
||||
const [form] = Form.useForm();
|
||||
const personUnderDepartmentId = Form.useWatch("deptId", form);
|
||||
const [form] = FormBuilder.useForm();
|
||||
const personUnderDepartmentId = FormBuilder.useWatch("deptId", form);
|
||||
|
||||
const [oldApproverType, setOldApproverType] = useState([]);
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["approvalUserInfo"]({ id: props.id });
|
||||
const approverType = [
|
||||
data.isPersonnelPermission === 1 ? 1 : null,
|
||||
data.isVehiclePermission === 1 ? 0 : null,
|
||||
data.isTemporaryPermission === 1 ? 2 : null,
|
||||
].filter(Boolean);
|
||||
data.personnelPermissionFlag === 1 ? 1 : null,
|
||||
data.vehiclePermissionFlag === 1 ? 0 : null,
|
||||
data.temporaryPermissionFlag === 1 ? 2 : null,
|
||||
].filter(item => item !== null);
|
||||
form.setFieldsValue({
|
||||
...data,
|
||||
approverType,
|
||||
|
|
@ -144,11 +144,10 @@ function AddModalComponent(props) {
|
|||
const { approverType, ...rest } = values;
|
||||
const submitData = {
|
||||
...rest,
|
||||
isPersonnelPermission: approverType?.includes(1) ? 1 : 0,
|
||||
isVehiclePermission: approverType?.includes(0) ? 1 : 0,
|
||||
isTemporaryPermission: approverType?.includes(2) ? 1 : 0,
|
||||
personnelPermissionFlag: approverType?.includes(1) ? 1 : 0,
|
||||
vehiclePermissionFlag: approverType?.includes(0) ? 1 : 0,
|
||||
temporaryPermissionFlag: approverType?.includes(2) ? 1 : 0,
|
||||
id: props.id,
|
||||
isRegulatory: 0,
|
||||
};
|
||||
const { success } = await props[!props.id ? "approvalUserAdd" : "approvalUserUpdate"](submitData);
|
||||
if (success) {
|
||||
|
|
@ -186,11 +185,11 @@ function AddModalComponent(props) {
|
|||
}}
|
||||
onChange={() => {
|
||||
form.setFieldValue("userId", "");
|
||||
form.setFieldValue("name", "");
|
||||
form.setFieldValue("userName", "");
|
||||
form.setFieldValue("corpId", "");
|
||||
form.setFieldValue("corpName", "");
|
||||
form.setFieldValue("postId", "");
|
||||
form.setFieldValue("postName", "");
|
||||
form.setFieldValue("corpId", "");
|
||||
}}
|
||||
disabled={!!props.id}
|
||||
/>
|
||||
|
|
@ -204,23 +203,23 @@ function AddModalComponent(props) {
|
|||
<PersonnelSelect
|
||||
params={{ departmentId: personUnderDepartmentId }}
|
||||
onGetLabel={(label) => {
|
||||
form.setFieldValue("name", label);
|
||||
form.setFieldValue("userName", label);
|
||||
}}
|
||||
onGetOption={(option) => {
|
||||
form.setFieldValue("userName", option.username);
|
||||
form.setFieldValue("corpId", option.corpinfoId);
|
||||
form.setFieldValue("corpName", option.corpinfoName);
|
||||
form.setFieldValue("postId", option.postId);
|
||||
form.setFieldValue("postName", option.postName);
|
||||
form.setFieldValue("corpId", option.tenantId);
|
||||
}}
|
||||
disabled={!!props.id}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "name", label: "审批人名称", onlyForLabel: true },
|
||||
{ name: "userName", label: "审批人账号", onlyForLabel: true },
|
||||
{ name: "userName", label: "审批人名称", onlyForLabel: true },
|
||||
{ name: "corpId", label: "企业ID", onlyForLabel: true },
|
||||
{ name: "corpName", label: "企业名称", onlyForLabel: true },
|
||||
{ name: "postId", label: "岗位ID", onlyForLabel: true },
|
||||
{ name: "postName", label: "岗位名称", onlyForLabel: true },
|
||||
{ name: "corpId", label: "租户ID", onlyForLabel: true },
|
||||
{
|
||||
name: "approverType",
|
||||
label: "审批权限",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, Form, message, Modal, Space } from "antd";
|
||||
import { Button, Descriptions, message, Modal, Space } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
|
|
@ -33,10 +33,10 @@ function List(props) {
|
|||
const [location, setLocation] = useState({ longitude: "", latitude: "" });
|
||||
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = Form.useForm();
|
||||
const [form] = Search.useForm();
|
||||
const { tableProps, getData } = useTable(props["firstLevelDoorInfoCameraList"], {
|
||||
form,
|
||||
params: { eqAreaId: query.areaId },
|
||||
params: { eqForeignId: query.id, eqDeviceType: query.deviceType },
|
||||
});
|
||||
|
||||
const onDelete = (id) => {
|
||||
|
|
@ -54,6 +54,7 @@ function List(props) {
|
|||
};
|
||||
|
||||
const onGetRTSPUrl = async (id) => {
|
||||
// TODO
|
||||
const { success } = await props["firstLevelDoorInfoCameraGetRTSPUrl"]({ id });
|
||||
if (success) {
|
||||
message.success("获取成功");
|
||||
|
|
@ -62,6 +63,7 @@ function List(props) {
|
|||
};
|
||||
|
||||
const onGetPlayUrl = async (id) => {
|
||||
// TODO
|
||||
const { data } = await props["firstLevelDoorInfoCameraGetPlayUrl"]({ id });
|
||||
setPlayModalVisible(true);
|
||||
setPlayUrl(data);
|
||||
|
|
@ -115,9 +117,14 @@ function List(props) {
|
|||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ dataIndex: "todo1", title: "视频名称" },
|
||||
{ dataIndex: "videoResourceName", title: "视频名称" },
|
||||
{ dataIndex: "todo2", title: "播放地址" },
|
||||
{ dataIndex: "todo3", title: "视频定位状态", width: 120 },
|
||||
{
|
||||
dataIndex: "todo3",
|
||||
title: "视频定位状态",
|
||||
width: 120,
|
||||
render: (text, record) => (record.longitude && record.latitude ? "已定位" : "未定位"),
|
||||
},
|
||||
{
|
||||
dataIndex: "todo4",
|
||||
title: "是否在线",
|
||||
|
|
@ -204,6 +211,7 @@ function List(props) {
|
|||
}}
|
||||
id={currentId}
|
||||
getData={getData}
|
||||
query={query}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
|
@ -255,7 +263,7 @@ function List(props) {
|
|||
|
||||
const AddModalComponent = (props) => {
|
||||
const [selectFixedCameraModalVisible, setSelectFixedCameraModalVisible] = useState(false);
|
||||
const [form] = Form.useForm();
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["firstLevelDoorInfoCameraInfo"]({ id: props.id });
|
||||
|
|
@ -271,6 +279,8 @@ const AddModalComponent = (props) => {
|
|||
const { success } = await props[!props.id ? "firstLevelDoorInfoCameraAdd" : "firstLevelDoorInfoCameraEdit"]({
|
||||
...values,
|
||||
id: props.id,
|
||||
foreignId: props.query.id,
|
||||
deviceType: props.query.deviceType,
|
||||
});
|
||||
if (success) {
|
||||
props.onCancel();
|
||||
|
|
@ -310,8 +320,9 @@ const AddModalComponent = (props) => {
|
|||
</Button>
|
||||
),
|
||||
},
|
||||
{ name: "todo2", label: "视频名称", componentProps: { disabled: true } },
|
||||
{ name: "todo4", label: "摄像头编号", componentProps: { disabled: true } },
|
||||
{ name: "videoResourceName", label: "视频名称", componentProps: { disabled: true } },
|
||||
{ name: "videoResourceId", label: "视频ID", onlyForLabel: true },
|
||||
{ name: "videoResourceCode", label: "摄像头编号", componentProps: { disabled: true } },
|
||||
]}
|
||||
/>
|
||||
{
|
||||
|
|
@ -321,8 +332,9 @@ const AddModalComponent = (props) => {
|
|||
setSelectFixedCameraModalVisible(false);
|
||||
}}
|
||||
onSubmit={(values) => {
|
||||
form.setFieldValue("todo2", values.todo2);
|
||||
form.setFieldValue("todo4", values.todo4);
|
||||
form.setFieldValue("videoResourceName", values.todo);
|
||||
form.setFieldValue("videoResourceId", values.todo);
|
||||
form.setFieldValue("videoResourceCode", values.todo);
|
||||
}}
|
||||
/>
|
||||
)
|
||||
|
|
@ -332,7 +344,8 @@ const AddModalComponent = (props) => {
|
|||
};
|
||||
|
||||
const SelectFixedCameraModalComponent = (props) => {
|
||||
const [form] = Form.useForm();
|
||||
const [form] = FormBuilder.useForm();
|
||||
// TODO
|
||||
const { tableProps, getData } = useTable(props["firstLevelDoorInfoFixedCameraList"], {
|
||||
form,
|
||||
useStorageQueryCriteria: false,
|
||||
|
|
@ -414,8 +427,8 @@ const InfoModalComponent = (props) => {
|
|||
bordered
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "视频名称", children: info.todo2 },
|
||||
{ label: "摄像头编号", children: info.todo3 },
|
||||
{ label: "视频名称", children: info.videoResourceName },
|
||||
{ label: "摄像头编号", children: info.videoResourceCode },
|
||||
]}
|
||||
/>
|
||||
</Modal>
|
||||
|
|
@ -426,6 +439,7 @@ const BatchPlayModalComponent = (props) => {
|
|||
const [playUrl, setPlayUrl] = useState([]);
|
||||
|
||||
const getData = async () => {
|
||||
// TODO
|
||||
const { data } = await props["firstLevelDoorInfoCameraGetBatchPlayUrl"]({ ids: props.ids });
|
||||
setPlayUrl(data);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, Form, message, Modal, Space } from "antd";
|
||||
import { Button, Descriptions, message, Modal, Space } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
|
|
@ -8,12 +8,13 @@ import Map from "zy-react-library/components/Map";
|
|||
import MapSelector from "zy-react-library/components/Map/MapSelector";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { getLabelName } from "zy-react-library/utils";
|
||||
import { FARE_GATE_CATEGORY_ENUM, FARE_GATE_STATUS_ENUM, FARE_GATE_TYPE_ENUM } from "~/enumerate/constant";
|
||||
import { FARE_GATE_STATUS_ENUM } from "~/enumerate/constant";
|
||||
import { NS_FIRST_LEVEL_DOOR_INFO } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
|
|
@ -22,10 +23,10 @@ function List(props) {
|
|||
const [infoModalVisible, setInfoModalVisible] = useState(false);
|
||||
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = Form.useForm();
|
||||
const [form] = Search.useForm();
|
||||
const { tableProps, getData } = useTable(props["firstLevelDoorInfoFareGateList"], {
|
||||
form,
|
||||
params: { eqAreaId: query.areaId, eqPassageId: query.passageId },
|
||||
params: { mkmjId: query.mkmjId, passageId: query.id },
|
||||
});
|
||||
|
||||
const onDelete = (id) => {
|
||||
|
|
@ -48,10 +49,10 @@ function List(props) {
|
|||
form={form}
|
||||
onFinish={getData}
|
||||
options={[
|
||||
{ name: "likeGateName", label: "闸机名称" },
|
||||
{ name: "eqGateStatus", label: "闸机状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: FARE_GATE_STATUS_ENUM },
|
||||
{ name: "eqGateType", label: "闸机类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: FARE_GATE_TYPE_ENUM },
|
||||
{ name: "eqGateCategory", label: "闸机类别", render: FORM_ITEM_RENDER_ENUM.SELECT, items: FARE_GATE_CATEGORY_ENUM },
|
||||
{ name: "gateName", label: "闸机名称" },
|
||||
{ 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: "todo", label: "闸机类别", render: (<DictionarySelect dictValue="HGKM_MKMJ_CATEGORY_TYPE" />) },
|
||||
]}
|
||||
/>
|
||||
<Table
|
||||
|
|
@ -72,16 +73,11 @@ function List(props) {
|
|||
)}
|
||||
columns={[
|
||||
{ dataIndex: "gateName", title: "闸机名称" },
|
||||
{
|
||||
dataIndex: "gateCategory",
|
||||
title: "闸机类别",
|
||||
width: 100,
|
||||
render: (_, record) => getLabelName({ list: FARE_GATE_CATEGORY_ENUM, status: record.gateCategory }),
|
||||
},
|
||||
{ dataIndex: "gateCategoryName", title: "闸机类别", width: 100 },
|
||||
{
|
||||
dataIndex: "latitude",
|
||||
title: "闸机位置",
|
||||
render: (_, record) => `${record.latitude || ""}--${record.longitude || ""}`,
|
||||
render: (_, record) => `${record.longitude || ""}--${record.latitude || ""}`,
|
||||
},
|
||||
{ dataIndex: "todo4", title: "摄像头个数", width: 100 },
|
||||
{
|
||||
|
|
@ -109,7 +105,7 @@ function List(props) {
|
|||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./camera?id=${record.id}`);
|
||||
props.history.push(`./camera/list?id=${record.id}&deviceType=2`);
|
||||
}}
|
||||
>
|
||||
{props.entrance !== "enterprise" ? "添加摄像头" : "查看摄像头"}
|
||||
|
|
@ -148,8 +144,7 @@ function List(props) {
|
|||
setCurrentId("");
|
||||
}}
|
||||
id={currentId}
|
||||
areaId={query.areaId}
|
||||
passageId={query.passageId}
|
||||
query={query}
|
||||
getData={getData}
|
||||
/>
|
||||
)
|
||||
|
|
@ -170,7 +165,7 @@ function List(props) {
|
|||
}
|
||||
|
||||
const AddModalComponent = (props) => {
|
||||
const [form] = Form.useForm();
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["firstLevelDoorInfoFareGateInfo"]({ id: props.id });
|
||||
|
|
@ -189,8 +184,8 @@ const AddModalComponent = (props) => {
|
|||
const { success } = await props[!props.id ? "firstLevelDoorInfoFareGateAdd" : "firstLevelDoorInfoFareGateEdit"]({
|
||||
...values,
|
||||
id: props.id,
|
||||
areaId: props.areaId,
|
||||
passageId: props.passageId,
|
||||
mkmjId: props.query.mkmjId,
|
||||
passageId: props.query.id,
|
||||
});
|
||||
if (success) {
|
||||
props.onCancel();
|
||||
|
|
@ -216,9 +211,49 @@ const AddModalComponent = (props) => {
|
|||
onFinish={onSubmit}
|
||||
showActionButtons={false}
|
||||
options={[
|
||||
{ name: "gateType", label: "闸机类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: FARE_GATE_TYPE_ENUM },
|
||||
{ name: "gateName", label: "闸机名称" },
|
||||
{ name: "gateCategory", label: "闸机类别", render: FORM_ITEM_RENDER_ENUM.SELECT, items: FARE_GATE_CATEGORY_ENUM },
|
||||
{
|
||||
name: "gateType",
|
||||
label: "闸机类型",
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="HGKM_MKMJ_GATE_TYPE"
|
||||
onGetLabel={label => form.setFieldValue("gateTypeName", label)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "gateTypeName", label: "闸机类型名称", onlyForLabel: true },
|
||||
{
|
||||
name: "gateName",
|
||||
label: "闸机名称",
|
||||
rules: [{
|
||||
validator: async (_, value) => {
|
||||
if (value) {
|
||||
const { data } = await props["firstLevelDoorInfoFareGateCheckName"]({
|
||||
gateName: value,
|
||||
id: props.id,
|
||||
passageId: props.query.id,
|
||||
});
|
||||
return data.available ? Promise.resolve() : Promise.reject(new Error("闸机名称已存在"));
|
||||
}
|
||||
else {
|
||||
Promise.resolve();
|
||||
}
|
||||
},
|
||||
validateTrigger: "onBlur",
|
||||
}],
|
||||
formItemProps: { validateTrigger: ["onChange", "onBlur"] },
|
||||
},
|
||||
{
|
||||
name: "gateCategory",
|
||||
label: "闸机类别",
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="HGKM_MKMJ_CATEGORY_TYPE"
|
||||
onGetLabel={label => form.setFieldValue("gateCategoryName", label)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "gateCategoryName", label: "闸机类别名称", onlyForLabel: true },
|
||||
{ name: "gateModel", label: "闸机型号" },
|
||||
{ name: "gatePosition", label: "闸机位置" },
|
||||
{ key: "map", customizeRender: true, render: <Map type="cesium" /> },
|
||||
|
|
@ -258,9 +293,9 @@ const InfoModalComponent = (props) => {
|
|||
bordered
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "闸机类型", children: getLabelName({ list: FARE_GATE_TYPE_ENUM, status: info.gateType }) },
|
||||
{ label: "闸机类型", children: info.gateTypeName },
|
||||
{ label: "闸机名称", children: info.gateName },
|
||||
{ label: "闸机类别", children: getLabelName({ list: FARE_GATE_CATEGORY_ENUM, status: info.gateCategory }) },
|
||||
{ label: "闸机类别", children: info.gateCategoryName },
|
||||
{ label: "闸机型号", children: info.gateModel },
|
||||
{ label: "闸机位置", children: info.gatePosition },
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, Form, message, Modal, Space } from "antd";
|
||||
import { Button, Descriptions, message, Modal, Space } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
|
|
@ -8,12 +8,13 @@ import Map from "zy-react-library/components/Map";
|
|||
import MapSelector from "zy-react-library/components/Map/MapSelector";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { getLabelName } from "zy-react-library/utils";
|
||||
import { CHANNEL_STATUS_ENUM, CHANNEL_TYPE_ENUM } from "~/enumerate/constant";
|
||||
import { CHANNEL_STATUS_ENUM } from "~/enumerate/constant";
|
||||
import { NS_FIRST_LEVEL_DOOR_INFO } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
|
|
@ -22,10 +23,10 @@ function List(props) {
|
|||
const [infoModalVisible, setInfoModalVisible] = useState(false);
|
||||
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = Form.useForm();
|
||||
const [form] = Search.useForm();
|
||||
const { tableProps, getData } = useTable(props["firstLevelDoorInfoChannelList"], {
|
||||
form,
|
||||
params: { eqAreaId: query.areaId },
|
||||
params: { eqMkmjId: query.id },
|
||||
});
|
||||
|
||||
const onDelete = (id) => {
|
||||
|
|
@ -49,8 +50,13 @@ function List(props) {
|
|||
onFinish={getData}
|
||||
options={[
|
||||
{ name: "likePassageName", label: "通道名称" },
|
||||
{ name: "eqPassageStatus", label: "通道状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: CHANNEL_STATUS_ENUM },
|
||||
{ name: "eqPassageType", label: "通道类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: CHANNEL_TYPE_ENUM },
|
||||
{
|
||||
name: "eqPassageStatus",
|
||||
label: "通道状态",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: CHANNEL_STATUS_ENUM,
|
||||
},
|
||||
{ name: "eqPassageType", label: "通道类型", render: (<DictionarySelect dictValue="HGKM_MKMJ_PASSAGE_TYPE" />) },
|
||||
]}
|
||||
/>
|
||||
<Table
|
||||
|
|
@ -70,14 +76,9 @@ function List(props) {
|
|||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{
|
||||
dataIndex: "passageType",
|
||||
title: "通道类型",
|
||||
width: 100,
|
||||
render: (_, record) => getLabelName({ list: CHANNEL_TYPE_ENUM, status: record.passageType }),
|
||||
},
|
||||
{ dataIndex: "passageTypeName", title: "通道类型", width: 100 },
|
||||
{ dataIndex: "passageName", title: "通道名称" },
|
||||
{ dataIndex: "gateNum", title: "设备数", width: 100 },
|
||||
{ dataIndex: "gateCount", title: "设备数", width: 100 },
|
||||
{
|
||||
title: "操作",
|
||||
width: 240,
|
||||
|
|
@ -117,7 +118,7 @@ function List(props) {
|
|||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./fareGate?passageId=${record.id}&areaId=${query.areaId}`);
|
||||
props.history.push(`./fareGate?id=${record.id}&mkmjId=${query.id}`);
|
||||
}}
|
||||
>
|
||||
{props.entrance !== "enterprise" ? "添加设备" : "查看设备"}
|
||||
|
|
@ -136,7 +137,7 @@ function List(props) {
|
|||
setCurrentId("");
|
||||
}}
|
||||
id={currentId}
|
||||
areaId={query.areaId}
|
||||
query={query}
|
||||
getData={getData}
|
||||
/>
|
||||
)
|
||||
|
|
@ -157,13 +158,12 @@ function List(props) {
|
|||
}
|
||||
|
||||
const AddModalComponent = (props) => {
|
||||
const [form] = Form.useForm();
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["firstLevelDoorInfoChannelInfo"]({ id: props.id });
|
||||
form.setFieldsValue({
|
||||
...data,
|
||||
passageType: data.passageType.toString(),
|
||||
passageStatus: data.passageStatus.toString(),
|
||||
});
|
||||
};
|
||||
|
|
@ -175,7 +175,7 @@ const AddModalComponent = (props) => {
|
|||
const { success } = await props[!props.id ? "firstLevelDoorInfoChannelAdd" : "firstLevelDoorInfoChannelEdit"]({
|
||||
...values,
|
||||
id: props.id,
|
||||
areaId: props.areaId,
|
||||
mkmjId: props.query.id,
|
||||
});
|
||||
if (success) {
|
||||
props.onCancel();
|
||||
|
|
@ -201,8 +201,38 @@ const AddModalComponent = (props) => {
|
|||
onFinish={onSubmit}
|
||||
showActionButtons={false}
|
||||
options={[
|
||||
{ name: "passageName", label: "通道名称" },
|
||||
{ name: "passageType", label: "通道类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: CHANNEL_TYPE_ENUM },
|
||||
{
|
||||
name: "passageName",
|
||||
label: "通道名称",
|
||||
rules: [{
|
||||
validator: async (_, value) => {
|
||||
if (value) {
|
||||
const { data } = await props["firstLevelDoorInfoChannelCheckName"]({
|
||||
passageName: value,
|
||||
id: props.id,
|
||||
mkmjId: props.query.id,
|
||||
});
|
||||
return data.available ? Promise.resolve() : Promise.reject(new Error("通道名称已存在"));
|
||||
}
|
||||
else {
|
||||
Promise.resolve();
|
||||
}
|
||||
},
|
||||
validateTrigger: "onBlur",
|
||||
}],
|
||||
formItemProps: { validateTrigger: ["onChange", "onBlur"] },
|
||||
},
|
||||
{
|
||||
name: "passageType",
|
||||
label: "通道类型",
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="HGKM_MKMJ_PASSAGE_TYPE"
|
||||
onGetLabel={label => form.setFieldValue("passageTypeName", label)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "passageTypeName", label: "通道类型名称", onlyForLabel: true },
|
||||
{ name: "passageStatus", label: "通道状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: CHANNEL_STATUS_ENUM },
|
||||
{ key: "map", customizeRender: true, render: <Map type="cesium" /> },
|
||||
]}
|
||||
|
|
@ -241,7 +271,7 @@ const InfoModalComponent = (props) => {
|
|||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "通道名称", children: info.passageName },
|
||||
{ label: "通道类型", children: getLabelName({ list: CHANNEL_TYPE_ENUM, status: info.passageType }) },
|
||||
{ label: "通道类型", children: info.passageTypeName },
|
||||
{ label: "通道状态", children: getLabelName({ list: CHANNEL_STATUS_ENUM, status: info.passageStatus }) },
|
||||
{
|
||||
label: "地理位置",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, Form, message, Modal, Space } from "antd";
|
||||
import { Button, Descriptions, message, Modal, Space } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
|
|
@ -13,25 +13,23 @@ 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 { getLabelName } from "zy-react-library/utils";
|
||||
import { AREA_STATUS_ENUM, AREA_TYPE_ENUM } from "~/enumerate/constant";
|
||||
import { AREA_STATUS_ENUM } from "~/enumerate/constant";
|
||||
import { NS_FIRST_LEVEL_DOOR_INFO } from "~/enumerate/namespace";
|
||||
|
||||
const areaLevel = 1;
|
||||
const mkmjLevel = 1;
|
||||
|
||||
function List(props) {
|
||||
const [addModalVisible, setAddModalVisible] = useState(false);
|
||||
const [infoModalVisible, setInfoModalVisible] = useState(false);
|
||||
const [currentId, setCurrentId] = useState("");
|
||||
const [form] = Form.useForm();
|
||||
const [form] = Search.useForm();
|
||||
const { tableProps, getData } = useTable(props["firstLevelDoorInfoList"], {
|
||||
form,
|
||||
params: {
|
||||
eqAreaLevel: areaLevel,
|
||||
},
|
||||
params: { mkmjLevel },
|
||||
});
|
||||
|
||||
const onDelete = (record) => {
|
||||
if (record.videoNum > 0 || record.passageNum > 0)
|
||||
if (record.videoCount > 0 || record.passageCount > 0)
|
||||
return message.warning("正在使用中的口门不能删除");
|
||||
|
||||
Modal.confirm({
|
||||
|
|
@ -53,10 +51,10 @@ function List(props) {
|
|||
form={form}
|
||||
onFinish={getData}
|
||||
options={[
|
||||
{ name: "likeAreaName", label: "口门名称" },
|
||||
{ name: "eqAreaStatus", label: "口门状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: AREA_STATUS_ENUM },
|
||||
{ name: "eqAreaType", label: "口门类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: AREA_TYPE_ENUM },
|
||||
{ name: "eqAreaParentId", label: "所属区域", render: <DictionarySelect dictValue="primeport_area" /> },
|
||||
{ name: "likeMkmjName", label: "口门名称" },
|
||||
{ name: "todo2", label: "口门状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: AREA_STATUS_ENUM },
|
||||
{ name: "todo3", label: "口门类型", render: <DictionarySelect dictValue="HGKM_MKMJ_TYPE" /> },
|
||||
{ name: "todo4", label: "所属区域", render: <DictionarySelect dictValue="HG_AUTH_AREA" /> },
|
||||
]}
|
||||
/>
|
||||
<Table
|
||||
|
|
@ -66,30 +64,20 @@ function List(props) {
|
|||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ dataIndex: "areaParentName", title: "所属区域" },
|
||||
{
|
||||
dataIndex: "areaType",
|
||||
title: "口门类型",
|
||||
width: 120,
|
||||
render: (_, record) => getLabelName({ list: AREA_TYPE_ENUM, status: record.areaType }),
|
||||
},
|
||||
{ dataIndex: "areaName", title: "口门名称" },
|
||||
{ dataIndex: "hgAuthAreaName", title: "所属区域" },
|
||||
{ dataIndex: "mkmjTypeName", title: "口门类型", width: 120 },
|
||||
{ dataIndex: "mkmjName", title: "口门名称" },
|
||||
{
|
||||
dataIndex: "location",
|
||||
title: "口门位置",
|
||||
render: (_, record) => `${record.latitude || ""}--${record.longitude || ""}`,
|
||||
render: (_, record) => `${record.longitude || ""}--${record.latitude || ""}`,
|
||||
},
|
||||
{ dataIndex: "videoCount", title: "视频个数", width: 120 },
|
||||
{
|
||||
dataIndex: "videoNum",
|
||||
title: "视频个数",
|
||||
width: 120,
|
||||
render: (_, record) => record.videoNum || 0,
|
||||
},
|
||||
{
|
||||
dataIndex: "areaStatus",
|
||||
dataIndex: "mkmjStatus",
|
||||
title: "口门状态",
|
||||
width: 120,
|
||||
render: (_, record) => getLabelName({ list: AREA_STATUS_ENUM, status: record.areaStatus }),
|
||||
render: (_, record) => getLabelName({ list: AREA_STATUS_ENUM, status: record.mkmjStatus }),
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
|
|
@ -126,7 +114,7 @@ function List(props) {
|
|||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./channel/list?areaId=${record.id}`);
|
||||
props.history.push(`./channel/list?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
添加通道
|
||||
|
|
@ -134,7 +122,7 @@ function List(props) {
|
|||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./camera/list?areaId=${record.id}`);
|
||||
props.history.push(`./camera/list?id=${record.id}&deviceType=1`);
|
||||
}}
|
||||
>
|
||||
添加摄像头
|
||||
|
|
@ -171,14 +159,13 @@ function List(props) {
|
|||
}
|
||||
|
||||
function AddModalComponent(props) {
|
||||
const [form] = Form.useForm();
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["firstLevelDoorInfoInfo"]({ id: props.id });
|
||||
form.setFieldsValue({
|
||||
...data,
|
||||
areaType: data.areaType.toString(),
|
||||
areaStatus: data.areaStatus.toString(),
|
||||
mkmjStatus: data.mkmjStatus.toString(),
|
||||
});
|
||||
};
|
||||
useEffect(() => {
|
||||
|
|
@ -188,7 +175,7 @@ function AddModalComponent(props) {
|
|||
const onSubmit = async (values) => {
|
||||
const { success } = await props[!props.id ? "firstLevelDoorInfoAdd" : "firstLevelDoorInfoEdit"]({
|
||||
...values,
|
||||
areaLevel,
|
||||
mkmjLevel,
|
||||
id: props.id,
|
||||
});
|
||||
if (success) {
|
||||
|
|
@ -216,13 +203,48 @@ function AddModalComponent(props) {
|
|||
onFinish={onSubmit}
|
||||
showActionButtons={false}
|
||||
options={[
|
||||
{ name: "areaParentId", label: "所属区域", render: <DictionarySelect dictValue="primeport_area" onGetLabel={label => form.setFieldValue("areaParentName", label)} /> },
|
||||
{ name: "areaParentName", label: "所属区域名称", onlyForLabel: true },
|
||||
{ name: "areaName", label: "口门名称" },
|
||||
{ name: "areaType", label: "口门类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: AREA_TYPE_ENUM },
|
||||
{ name: "areaRange", label: "口门位置" },
|
||||
{
|
||||
name: "hgAuthArea",
|
||||
label: "所属区域",
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="HG_AUTH_AREA"
|
||||
onGetLabel={label => form.setFieldValue("hgAuthAreaName", label)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "hgAuthAreaName", label: "所属区域名称", onlyForLabel: true },
|
||||
{
|
||||
name: "mkmjName",
|
||||
label: "口门名称",
|
||||
rules: [{
|
||||
validator: async (_, value) => {
|
||||
if (value) {
|
||||
const { data } = await props["firstLevelDoorInfoCheckName"]({ mkmjName: value, id: props.id });
|
||||
return data.available ? Promise.resolve() : Promise.reject(new Error("口门名称已存在"));
|
||||
}
|
||||
else {
|
||||
Promise.resolve();
|
||||
}
|
||||
},
|
||||
validateTrigger: "onBlur",
|
||||
}],
|
||||
formItemProps: { validateTrigger: ["onChange", "onBlur"] },
|
||||
},
|
||||
{
|
||||
name: "mkmjType",
|
||||
label: "口门类型",
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="HGKM_MKMJ_TYPE"
|
||||
onGetLabel={label => form.setFieldValue("mkmjTypeName", label)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "mkmjTypeName", label: "口门类型名称", onlyForLabel: true },
|
||||
{ name: "remarks", label: "口门位置" },
|
||||
{ key: "map", customizeRender: true, render: <Map type="cesium" /> },
|
||||
{ name: "areaStatus", label: "口门状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: AREA_STATUS_ENUM },
|
||||
{ name: "mkmjStatus", label: "口门状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: AREA_STATUS_ENUM },
|
||||
]}
|
||||
/>
|
||||
</Modal>
|
||||
|
|
@ -259,14 +281,19 @@ function InfoModalComponent(props) {
|
|||
column={1}
|
||||
bordered
|
||||
items={[
|
||||
{ label: "所属区域", children: info.areaParentName },
|
||||
{ label: "口门名称", children: info.areaName },
|
||||
{ label: "口门类型", children: getLabelName({ list: AREA_TYPE_ENUM, status: info.areaType }) },
|
||||
{ label: "口门位置", children: info.areaRange },
|
||||
{ label: "区域状态", children: getLabelName({ list: AREA_STATUS_ENUM, status: info.areaStatus }) },
|
||||
{ label: "所属区域", children: info.hgAuthAreaName },
|
||||
{ label: "口门名称", children: info.mkmjName },
|
||||
{ label: "口门类型", children: info.mkmjTypeName },
|
||||
{ label: "口门位置", children: info.remarks },
|
||||
{ label: "口门状态", children: getLabelName({ list: AREA_STATUS_ENUM, status: info.mkmjStatus }) },
|
||||
{
|
||||
label: "位置",
|
||||
children: (<LocationIcon onClick={() => { setMapVisible(true); }} />),
|
||||
children: (
|
||||
<LocationIcon onClick={() => {
|
||||
setMapVisible(true);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ function List(props) {
|
|||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: CURRENT_IN_PORT_STATUS_ENUM,
|
||||
},
|
||||
{ name: "todo3", label: "访问港区范围", render: (<DictionarySelect dictValue="primeport_area" />) },
|
||||
{ name: "todo3", label: "访问港区范围", render: (<DictionarySelect dictValue="HG_AUTH_AREA" />) },
|
||||
{ name: "todo4", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ name: "todo5", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
]}
|
||||
|
|
|
|||
|
|
@ -1,34 +1,87 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Form, message } from "antd";
|
||||
import { useEffect } from "react";
|
||||
import { message } from "antd";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import Upload from "zy-react-library/components/Upload";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||
import useDeleteFile from "zy-react-library/hooks/useDeleteFile";
|
||||
import useGetFile from "zy-react-library/hooks/useGetFile";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import useGetUserInfo from "zy-react-library/hooks/useGetUserInfo";
|
||||
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
||||
import { LICENSE_PLATE_NUMBER } from "zy-react-library/regular";
|
||||
import { NS_PERSONAL_VEHICLE } from "~/enumerate/namespace";
|
||||
import { VEHICLE_TYPE_ENUM } from "~/enumerate/constant";
|
||||
import { NS_APPROVER_USER, NS_VEHICLE_APPLY } from "~/enumerate/namespace";
|
||||
|
||||
function Add(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = Form.useForm();
|
||||
const { getUserInfo } = useGetUserInfo();
|
||||
const [form] = FormBuilder.useForm();
|
||||
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
|
||||
const { loading: deleteFileLoading, deleteFile } = useDeleteFile();
|
||||
const { loading: getFileLoading, getFile } = useGetFile();
|
||||
|
||||
const [approvalUserListAll, setApprovalUserListAll] = useState([]);
|
||||
|
||||
const info = useRef([]);
|
||||
|
||||
const getApprovalUserListAll = async () => {
|
||||
const { data } = await props["approvalUserListAll"]();
|
||||
setApprovalUserListAll(data);
|
||||
};
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["personalVehicleInfo"]({ id: query.id });
|
||||
form.setFieldsValue({
|
||||
...data,
|
||||
});
|
||||
if (query.id) {
|
||||
const { data } = await props["vehicleApplyInfo"]({ id: query.id });
|
||||
const drivingLicenseFile = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM[601],
|
||||
eqForeignKey: data.drivingLicenseId,
|
||||
});
|
||||
const attachmentFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[602], eqForeignKey: data.attachmentId });
|
||||
form.setFieldsValue({
|
||||
...data,
|
||||
drivingLicenseFile,
|
||||
attachmentFile,
|
||||
});
|
||||
info.current = data;
|
||||
}
|
||||
else {
|
||||
if (props.vehicleBelongType === 2) {
|
||||
const userInfo = await getUserInfo();
|
||||
form.setFieldsValue({
|
||||
vehicleDepartmentName: userInfo.departmentName,
|
||||
vehicleDepartmentId: userInfo.departmentId,
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
query.id && getData();
|
||||
getApprovalUserListAll();
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props[!query.id ? "personalVehicleAdd" : "personalVehicleUpdate"]({
|
||||
await deleteFile({ single: false, files: values.drivingLicenseDeleteFile });
|
||||
await deleteFile({ single: false, files: values.attachmentDeleteFile });
|
||||
const { id: drivingLicenseId } = await uploadFile({
|
||||
single: false,
|
||||
files: values.drivingLicenseFile,
|
||||
params: { foreignKey: info.current.drivingLicenseId, type: UPLOAD_FILE_TYPE_ENUM[601] },
|
||||
});
|
||||
const { id: attachmentId } = await uploadFile({
|
||||
single: false,
|
||||
files: values.attachmentFile,
|
||||
params: { foreignKey: info.current.attachmentId, type: UPLOAD_FILE_TYPE_ENUM[602] },
|
||||
});
|
||||
const { success } = await props[!query.id ? "vehicleApplyAdd" : "vehicleApplyUpdate"]({
|
||||
...values,
|
||||
id: query.id,
|
||||
drivingLicenseId,
|
||||
attachmentId,
|
||||
});
|
||||
if (success) {
|
||||
message.success("操作成功");
|
||||
|
|
@ -36,27 +89,96 @@ function Add(props) {
|
|||
}
|
||||
};
|
||||
|
||||
const getVehicleBelongFields = () => {
|
||||
if (!props.vehicleBelongType) {
|
||||
return [
|
||||
{ name: "vehicleBelongType", label: "车辆所属类型", onlyForLabel: true },
|
||||
// TODO 应该是选择的
|
||||
{ name: "employeeVehicleUserId", label: "车辆归属人", span: 24, componentProps: { disabled: !!query.id } },
|
||||
{ name: "employeeVehicleUserName", label: "车辆归属人名称", onlyForLabel: true },
|
||||
{ name: "vehicleDepartmentName", label: "车辆所属部门", onlyForLabel: true },
|
||||
{ name: "vehicleDepartmentId", label: "车辆所属部门ID", onlyForLabel: true },
|
||||
];
|
||||
}
|
||||
else if (props.vehicleBelongType === 2) {
|
||||
return [
|
||||
{
|
||||
name: "vehicleBelongType",
|
||||
label: "车辆所属类型",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: VEHICLE_TYPE_ENUM,
|
||||
componentProps: { disabled: true },
|
||||
},
|
||||
{ name: "vehicleDepartmentName", label: "车辆所属部门", componentProps: { disabled: true } },
|
||||
{ name: "vehicleDepartmentId", label: "车辆所属部门ID", onlyForLabel: true },
|
||||
];
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle={query.id ? "重新申请" : "新增"} isShowFooter={false}>
|
||||
<FormBuilder
|
||||
form={form}
|
||||
loading={props.personalVehicle.personalVehicleLoading}
|
||||
loading={props.vehicleApply.vehicleApplyLoading || uploadFileLoading || deleteFileLoading || getFileLoading}
|
||||
onFinish={onSubmit}
|
||||
values={{
|
||||
vehicleBelongType: props.vehicleBelongType ? props.vehicleBelongType.toString() : "1",
|
||||
}}
|
||||
options={[
|
||||
{ name: "todo1", label: "车辆归属人", span: 24, componentProps: { disabled: !!query.id } },
|
||||
{ name: "todo4", label: "车牌类型", render: (<DictionarySelect dictValue="LICENSE_PLATE_TYPE" disabled={!!query.id} />) },
|
||||
...getVehicleBelongFields(),
|
||||
{
|
||||
name: "todo5",
|
||||
name: "licenceType",
|
||||
label: "车牌类型",
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="LICENSE_PLATE_TYPE"
|
||||
disabled={!!query.id}
|
||||
onGetLabel={label => form.setFieldValue("licenceTypeName", label)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "licenceTypeName", label: "车牌类型名称", onlyForLabel: true },
|
||||
{
|
||||
name: "licenceNo",
|
||||
label: "车牌号",
|
||||
rules: [{ pattern: LICENSE_PLATE_NUMBER, message: "请输入正确的车牌号" }],
|
||||
rules: [
|
||||
{ pattern: LICENSE_PLATE_NUMBER, message: "请输入正确的车牌号" },
|
||||
{
|
||||
validator: async (_, value) => {
|
||||
if (value) {
|
||||
const { data } = await props["vehicleApplyCheckLicenceNo"]({
|
||||
licenceNo: value,
|
||||
id: query.id,
|
||||
});
|
||||
return data.available ? Promise.resolve() : Promise.reject(new Error("车牌号已存在"));
|
||||
}
|
||||
else {
|
||||
Promise.resolve();
|
||||
}
|
||||
},
|
||||
validateTrigger: "onBlur",
|
||||
},
|
||||
],
|
||||
formItemProps: { validateTrigger: ["onChange", "onBlur"] },
|
||||
componentProps: { disabled: !!query.id },
|
||||
},
|
||||
{ name: "todo6", label: "车辆类型", render: (<DictionarySelect dictValue="VEHICLE_TYPE" disabled={!!query.id} />) },
|
||||
{ name: "todo7", label: "访问港区", render: (<DictionarySelect dictValue="primeport_area" />) },
|
||||
{ name: "todo8", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATETIME },
|
||||
{ name: "todo9", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATETIME },
|
||||
{
|
||||
name: "todo10",
|
||||
name: "vehicleType",
|
||||
label: "车辆类型",
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="VEHICLE_TYPE"
|
||||
disabled={!!query.id}
|
||||
onGetLabel={label => form.setFieldValue("vehicleTypeName", label)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "vehicleTypeName", label: "车辆类型名称", onlyForLabel: true },
|
||||
{ name: "gateLevelAuthArea", label: "访问港区", render: (<DictionarySelect dictValue="HG_AUTH_AREA" />) },
|
||||
{ name: "visitStartTime", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATETIME },
|
||||
{ name: "visitEndTime", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATETIME },
|
||||
{
|
||||
name: "drivingLicenseFile",
|
||||
label: "行驶证照片",
|
||||
span: 24,
|
||||
render: (
|
||||
|
|
@ -70,11 +192,13 @@ function Add(props) {
|
|||
<div>3. 支持格式:.jpg/.jpeg/.png,单张5MB</div>
|
||||
</div>
|
||||
)}
|
||||
onGetRemoveFile={file => form.setFieldValue("drivingLicenseDeleteFile", file)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "drivingLicenseDeleteFile", label: "删除的行驶证照片", onlyForLabel: true },
|
||||
{
|
||||
name: "todo11",
|
||||
name: "attachmentFile",
|
||||
label: "车辆图片",
|
||||
span: 24,
|
||||
render: (
|
||||
|
|
@ -89,14 +213,38 @@ function Add(props) {
|
|||
<div>4. 支持格式:.jpg/.jpeg/.png,单张5MB</div>
|
||||
</div>
|
||||
)}
|
||||
onGetRemoveFile={file => form.setFieldValue("attachmentDeleteFile", file)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "todo12", label: "审批人", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [], span: 24 },
|
||||
{ name: "attachmentDeleteFile", label: "删除的车辆图片", onlyForLabel: true },
|
||||
{
|
||||
name: "auditUserId",
|
||||
label: "审批人",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: approvalUserListAll,
|
||||
itemsField: { labelKey: "userName", valueKey: "userId" },
|
||||
span: 24,
|
||||
componentProps: {
|
||||
onChange: (value) => {
|
||||
const item = approvalUserListAll.find(item => item.userId === value);
|
||||
form.setFieldValue("auditUserName", item.userName);
|
||||
form.setFieldValue("auditCorpId", item.corpId);
|
||||
form.setFieldValue("auditCorpName", item.corpName);
|
||||
form.setFieldValue("auditDeptId", item.deptId);
|
||||
form.setFieldValue("auditDeptName", item.deptName);
|
||||
},
|
||||
},
|
||||
},
|
||||
{ name: "auditUserName", label: "审批人名称", onlyForLabel: true },
|
||||
{ name: "auditCorpId", label: "审核企业ID", onlyForLabel: true },
|
||||
{ name: "auditCorpName", label: "审核企业名称", onlyForLabel: true },
|
||||
{ name: "auditDeptId", label: "审核部门ID", onlyForLabel: true },
|
||||
{ name: "auditDeptName", label: "审核部门名称", onlyForLabel: true },
|
||||
]}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_PERSONAL_VEHICLE], true)(Add);
|
||||
export default Connect([NS_VEHICLE_APPLY, NS_APPROVER_USER], true)(Add);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import Page from "zy-react-library/components/Page";
|
|||
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_PERSONAL_VEHICLE } from "~/enumerate/namespace";
|
||||
import { NS_VEHICLE_APPLY } from "~/enumerate/namespace";
|
||||
|
||||
const VEHICLE_APPROVAL_STATUS_ENUM = [
|
||||
{ value: "1", label: "审批中" },
|
||||
|
|
@ -14,14 +14,16 @@ const VEHICLE_APPROVAL_STATUS_ENUM = [
|
|||
];
|
||||
|
||||
function List(props) {
|
||||
const { tableProps, getData } = useTable(props["personalVehicleList"]);
|
||||
const { tableProps, getData } = useTable(props["vehicleApplyList"], {
|
||||
params: { vehicleBelongType: 1 },
|
||||
});
|
||||
|
||||
const onDelete = (record) => {
|
||||
Modal.confirm({
|
||||
title: "删除确认",
|
||||
content: "确定要删除吗?",
|
||||
onOk: async () => {
|
||||
const { success } = await props["personalVehicleDelete"]({ id: record.id });
|
||||
const { success } = await props["vehicleApplyDelete"]({ id: record.id });
|
||||
if (success) {
|
||||
message.success("删除成功");
|
||||
getData();
|
||||
|
|
@ -47,31 +49,36 @@ function List(props) {
|
|||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
{ title: "车牌号", dataIndex: "todo1" },
|
||||
{ title: "车牌类型", dataIndex: "todo2" },
|
||||
{ title: "车辆类型", dataIndex: "todo3" },
|
||||
{ title: "访问港区范围", dataIndex: "todo4" },
|
||||
{ title: "访问开始时间", dataIndex: "todo" },
|
||||
{ title: "访问结束时间", dataIndex: "todo6" },
|
||||
{ title: "车牌号", dataIndex: "licenceNo" },
|
||||
{ title: "车牌类型", dataIndex: "licenceTypeName" },
|
||||
{ title: "车辆类型", dataIndex: "vehicleTypeName" },
|
||||
{
|
||||
title: "访问港区范围",
|
||||
dataIndex: "gateLevelAuthArea",
|
||||
render: (_, record) => JSON.parse(record.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、"),
|
||||
},
|
||||
{ title: "访问开始时间", dataIndex: "visitStartTime" },
|
||||
{ title: "访问结束时间", dataIndex: "visitEndTime" },
|
||||
{
|
||||
title: "审批状态",
|
||||
dataIndex: "todo7",
|
||||
render: (_, record) => getLabelName({ list: VEHICLE_APPROVAL_STATUS_ENUM, status: record.todo7 }),
|
||||
dataIndex: "auditFlag",
|
||||
render: (_, record) => getLabelName({ list: VEHICLE_APPROVAL_STATUS_ENUM, status: record.auditFlag }),
|
||||
},
|
||||
{
|
||||
title: "启用状态",
|
||||
dataIndex: "todo8",
|
||||
render: (_, record) => record.todo8 === 1 ? "启用" : "停用",
|
||||
dataIndex: "statusFlag",
|
||||
render: (_, record) => record.statusFlag === 2 ? "启用" : "停用",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
width: 300,
|
||||
width: 350,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
// TODO
|
||||
props.history.push(`./vehicleRecords?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
|
|
@ -80,6 +87,7 @@ function List(props) {
|
|||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
// TODO
|
||||
props.history.push(`./approvalRecord?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
|
|
@ -93,14 +101,16 @@ function List(props) {
|
|||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
重新申请
|
||||
</Button>
|
||||
{record.auditFlag === 3 && (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
重新申请
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
|
|
@ -120,4 +130,4 @@ function List(props) {
|
|||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_PERSONAL_VEHICLE], true)(List);
|
||||
export default Connect([NS_VEHICLE_APPLY], true)(List);
|
||||
|
|
|
|||
|
|
@ -3,40 +3,67 @@ import { Descriptions, Divider, Spin } from "antd";
|
|||
import { useEffect, useState } from "react";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import PreviewImg from "zy-react-library/components/PreviewImg";
|
||||
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||
import useGetFile from "zy-react-library/hooks/useGetFile";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_PERSONAL_VEHICLE } from "~/enumerate/namespace";
|
||||
import { getLabelName } from "zy-react-library/utils";
|
||||
import { VEHICLE_TYPE_ENUM } from "~/enumerate/constant";
|
||||
import { NS_VEHICLE_APPLY } from "~/enumerate/namespace";
|
||||
|
||||
function View(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const { loading: getFileLoading, getFile } = useGetFile();
|
||||
|
||||
const [info, setInfo] = useState({});
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["personalVehicleInfo"]({ id: query.id });
|
||||
setInfo(data);
|
||||
const { data } = await props["vehicleApplyInfo"]({ id: query.id });
|
||||
const drivingLicenseFile = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM[601],
|
||||
eqForeignKey: data.drivingLicenseId,
|
||||
});
|
||||
const attachmentFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[602], eqForeignKey: data.attachmentId });
|
||||
setInfo({
|
||||
...data,
|
||||
drivingLicenseFile,
|
||||
attachmentFile,
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
const getVehicleBelongFields = (info) => {
|
||||
if (!props.vehicleBelongType) {
|
||||
return [{ label: "车辆归属人", children: info.employeeVehicleUserName, span: 24 }];
|
||||
}
|
||||
else if (props.vehicleBelongType === 2) {
|
||||
return [
|
||||
{ label: "车辆所属类型", children: getLabelName({ list: VEHICLE_TYPE_ENUM, status: info.vehicleBelongType }) },
|
||||
{ label: "车辆所属部门", children: info.vehicleDepartmentName },
|
||||
];
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle="查看" contentPadding="0 20px 20px 20px">
|
||||
<Spin spinning={props.personalVehicle.personalVehicleLoading}>
|
||||
<Spin spinning={props.vehicleApply.vehicleApplyLoading || getFileLoading}>
|
||||
<Divider orientation="left">申请信息</Divider>
|
||||
<Descriptions
|
||||
column={2}
|
||||
bordered
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "车辆归属人", children: info.todo1, span: 24 },
|
||||
{ label: "车牌类型", children: info.todo2 },
|
||||
{ label: "车牌号", children: info.todo3 },
|
||||
{ label: "车辆类型", children: info.todo4 },
|
||||
{ label: "访问港区", children: info.todo5 },
|
||||
{ label: "访问开始时间", children: info.todo6 },
|
||||
{ label: "访问结束时间", children: info.todo7 },
|
||||
{ label: "行驶证照片", children: (<PreviewImg files={[info.todo8]} />), span: 24 },
|
||||
{ label: "车辆图片", children: (<PreviewImg files={[info.todo9]} />), span: 24 },
|
||||
...getVehicleBelongFields(info),
|
||||
{ label: "车牌类型", children: info.licenceTypeName },
|
||||
{ label: "车牌号", children: info.licenceNo },
|
||||
{ label: "车辆类型", children: info.vehicleTypeName },
|
||||
{ label: "访问港区", children: JSON.parse(info.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、") },
|
||||
{ label: "访问开始时间", children: info.visitStartTime },
|
||||
{ label: "访问结束时间", children: info.visitEndTime },
|
||||
{ label: "行驶证照片", children: (<PreviewImg files={info.drivingLicenseFile} />), span: 24 },
|
||||
{ label: "车辆图片", children: (<PreviewImg files={info.attachmentFile} />), span: 24 },
|
||||
]}
|
||||
/>
|
||||
<Divider orientation="left">审批信息</Divider>
|
||||
|
|
@ -45,7 +72,7 @@ function View(props) {
|
|||
bordered
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "审批人", children: info.todo10 },
|
||||
{ label: "审批人", children: info.auditUserName },
|
||||
]}
|
||||
/>
|
||||
</Spin>
|
||||
|
|
@ -53,4 +80,4 @@ function View(props) {
|
|||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_PERSONAL_VEHICLE], true)(View);
|
||||
export default Connect([NS_VEHICLE_APPLY], true)(View);
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ const AuthorizationModalVisibleComponent = (props) => {
|
|||
{
|
||||
name: "todo2",
|
||||
label: "授权港区",
|
||||
render: (<DictionarySelect dictValue="primeport_area" />),
|
||||
render: (<DictionarySelect dictValue="HG_AUTH_AREA" />),
|
||||
dependencies: ["todo1"],
|
||||
hidden: formValues => !(formValues.todo1 === "1"),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ function Add(props) {
|
|||
{ name: "todo4", label: "车牌类型", render: (<DictionarySelect dictValue="LICENSE_PLATE_TYPE" />) },
|
||||
{ name: "todo5", label: "车牌号", rules: [{ pattern: LICENSE_PLATE_NUMBER, message: "请输入正确的车牌号" }] },
|
||||
{ name: "todo6", label: "车辆类型", render: (<DictionarySelect dictValue="VEHICLE_TYPE" />) },
|
||||
{ name: "todo7", label: "访问港区", render: (<DictionarySelect dictValue="primeport_area" />) },
|
||||
{ name: "todo7", label: "访问港区", render: (<DictionarySelect dictValue="HG_AUTH_AREA" />) },
|
||||
{ name: "todo8", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATETIME },
|
||||
{ name: "todo9", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATETIME },
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ function List(props) {
|
|||
<Search
|
||||
options={[
|
||||
{ name: "todo1", label: "车牌号" },
|
||||
{ name: "todo2", label: "访问港区范围", render: (<DictionarySelect dictValue="primeport_area" />) },
|
||||
{ name: "todo2", label: "访问港区范围", render: (<DictionarySelect dictValue="HG_AUTH_AREA" />) },
|
||||
{ name: "todo3", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ name: "todo4", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
]}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ function VehicleRecords(props) {
|
|||
<Search
|
||||
options={[
|
||||
{ name: "todo1", label: "口门名称" },
|
||||
{ name: "todo2", label: "所属港区", render: (<DictionarySelect dictValue="primeport_area" />) },
|
||||
{ name: "todo2", label: "所属港区", render: (<DictionarySelect dictValue="HG_AUTH_AREA" />) },
|
||||
{ name: "todo3", label: "进港时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
]}
|
||||
onFinish={getData}
|
||||
|
|
|
|||
|
|
@ -1,118 +1,7 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Form, message } from "antd";
|
||||
import { useEffect } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import Upload from "zy-react-library/components/Upload";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import useGetUserInfo from "zy-react-library/hooks/useGetUserInfo";
|
||||
import { LICENSE_PLATE_NUMBER } from "zy-react-library/regular";
|
||||
import { VEHICLE_TYPE_ENUM } from "~/enumerate/constant";
|
||||
import { NS_STOCK_VEHICLES } from "~/enumerate/namespace";
|
||||
import AddPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/PersonalVehicle/Add";
|
||||
|
||||
function Add(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const { getUserInfo } = useGetUserInfo();
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const getData = async () => {
|
||||
if (query.id) {
|
||||
const { data } = await props["stockVehiclesInfo"]({ id: query.id });
|
||||
form.setFieldsValue({
|
||||
...data,
|
||||
});
|
||||
}
|
||||
else {
|
||||
const userInfo = await getUserInfo();
|
||||
form.setFieldsValue({
|
||||
todo2: userInfo.departmentName,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props[!query.id ? "stockVehiclesAdd" : "stockVehiclesUpdate"]({
|
||||
...values,
|
||||
id: query.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success("操作成功");
|
||||
props.history.goBack();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Page headerTitle={query.id ? "重新申请" : "新增"} isShowFooter={false}>
|
||||
<FormBuilder
|
||||
onFinish={onSubmit}
|
||||
values={{
|
||||
todo1: "1",
|
||||
}}
|
||||
loading={props.stockVehicles.stockVehiclesLoading}
|
||||
options={[
|
||||
{
|
||||
name: "todo1",
|
||||
label: "车辆所属类型",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: VEHICLE_TYPE_ENUM,
|
||||
componentProps: { disabled: true },
|
||||
},
|
||||
{ name: "todo2", label: "车辆所属部门", componentProps: { disabled: true } },
|
||||
{ name: "todo4", label: "车牌类型", render: (<DictionarySelect dictValue="LICENSE_PLATE_TYPE" />) },
|
||||
{ name: "todo5", label: "车牌号", rules: [{ pattern: LICENSE_PLATE_NUMBER, message: "请输入正确的车牌号" }] },
|
||||
{ name: "todo6", label: "车辆类型", render: (<DictionarySelect dictValue="VEHICLE_TYPE" />) },
|
||||
{ name: "todo7", label: "访问港区", render: (<DictionarySelect dictValue="primeport_area" />) },
|
||||
{ name: "todo8", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATETIME },
|
||||
{ name: "todo9", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATETIME },
|
||||
{
|
||||
name: "todo10",
|
||||
label: "行驶证照片",
|
||||
span: 24,
|
||||
render: (
|
||||
<Upload
|
||||
maxCount={1}
|
||||
size={5}
|
||||
tipContent={(
|
||||
<div style={{ color: "red", fontSize: 12 }}>
|
||||
<div>1. 请拍摄行驶证正本和副本,确保四角完整、无遮挡</div>
|
||||
<div>2. 文字、印章清晰可见,避免反光</div>
|
||||
<div>3. 支持格式:.jpg/.jpeg/.png,单张5MB</div>
|
||||
</div>
|
||||
)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "todo11",
|
||||
label: "车辆图片",
|
||||
span: 24,
|
||||
render: (
|
||||
<Upload
|
||||
maxCount={4}
|
||||
size={5}
|
||||
tipContent={(
|
||||
<div style={{ color: "red", fontSize: 12 }}>
|
||||
<div>1.上限4张</div>
|
||||
<div>2. 请从车辆左前侧45°拍摄,车牌清晰可见</div>
|
||||
<div>3. 背景简洁,避免逆光或阴影</div>
|
||||
<div>4. 支持格式:.jpg/.jpeg/.png,单张5MB</div>
|
||||
</div>
|
||||
)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: "todo12", label: "审批人", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [], span: 24 },
|
||||
]}
|
||||
form={form}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
return (<AddPage vehicleBelongType={2} {...props} />);
|
||||
}
|
||||
|
||||
export default Connect([NS_STOCK_VEHICLES], true)(Add);
|
||||
export default Add;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import useUrlState from "@ahooksjs/use-url-state";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, Modal, Space } from "antd";
|
||||
import { Button, Modal, Space } from "antd";
|
||||
import { useEffect } from "react";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import BackIcon from "zy-react-library/components/Icon/BackIcon";
|
||||
|
|
@ -11,16 +11,18 @@ import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
|||
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 { getLabelName } from "zy-react-library/utils";
|
||||
import { CURRENT_IN_PORT_STATUS_ENUM } from "~/enumerate/constant";
|
||||
import { NS_STOCK_VEHICLES } from "~/enumerate/namespace";
|
||||
import { NS_VEHICLE_APPLY } from "~/enumerate/namespace";
|
||||
|
||||
const APPROVAL_STATUS_ENUM = [
|
||||
{ name: "通过", bianma: "1" },
|
||||
{ name: "不通过", bianma: "2" },
|
||||
{ name: "审核中", bianma: "3" },
|
||||
{ name: "审核中", bianma: "1" },
|
||||
{ name: "通过", bianma: "2" },
|
||||
{ name: "不通过", bianma: "3" },
|
||||
];
|
||||
|
||||
function List(props) {
|
||||
const [form] = Form.useForm();
|
||||
const [form] = Search.useForm();
|
||||
const [urlState, setUrlState] = useUrlState({
|
||||
departmentId: "",
|
||||
backDepartmentIds: [],
|
||||
|
|
@ -34,9 +36,9 @@ function List(props) {
|
|||
},
|
||||
});
|
||||
|
||||
const { tableProps, getData } = useTable(props["stockVehiclesList"], {
|
||||
const { tableProps, getData } = useTable(props["vehicleApplyList"], {
|
||||
form,
|
||||
params: () => ({ departmentId: urlState.departmentId }),
|
||||
params: () => ({ departmentId: urlState.departmentId, vehicleBelongType: 2 }),
|
||||
manual: true,
|
||||
});
|
||||
|
||||
|
|
@ -45,12 +47,13 @@ function List(props) {
|
|||
}, [urlState.departmentId]);
|
||||
|
||||
const onUpdateStatus = (record) => {
|
||||
const message = record.todo6 === 1 ? "关闭" : "开启";
|
||||
const message = record.statusFlag === 2 ? "关闭" : "开启";
|
||||
Modal.confirm({
|
||||
title: `${message}确认`,
|
||||
content: `确定要${message}吗?`,
|
||||
onOk: async () => {
|
||||
const { success } = await props["stockVehiclesUpdateStatus"]({ id: record.id });
|
||||
// TODO
|
||||
const { success } = await props["vehicleApplyUpdateStatus"]({ id: record.id });
|
||||
if (success) {
|
||||
message.success(`${message}成功`);
|
||||
getData();
|
||||
|
|
@ -86,12 +89,21 @@ function List(props) {
|
|||
<Search
|
||||
labelCol={{ span: 8 }}
|
||||
options={[
|
||||
{ name: "todo1", label: "车牌号" },
|
||||
{ name: "todo2", label: "当前在港状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: CURRENT_IN_PORT_STATUS_ENUM },
|
||||
{ name: "todo3", label: "审批状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: APPROVAL_STATUS_ENUM },
|
||||
{ name: "todo4", label: "访问港区范围", render: (<DictionarySelect dictValue="primeport_area" />) },
|
||||
{ name: "todo5", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ name: "todo6", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ 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: "gateLevelAuthAreaId",
|
||||
label: "访问港区范围",
|
||||
render: (<DictionarySelect dictValue="HG_AUTH_AREA" />),
|
||||
},
|
||||
{ name: "visitStartTime", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ name: "visitEndTime", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
]}
|
||||
onFinish={getData}
|
||||
form={form}
|
||||
|
|
@ -126,16 +138,29 @@ function List(props) {
|
|||
</Space>
|
||||
)}
|
||||
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: "licenceNo" },
|
||||
{ title: "车牌类型", dataIndex: "licenceTypeName" },
|
||||
{ title: "车辆类型", dataIndex: "vehicleTypeName" },
|
||||
{
|
||||
title: "访问港区范围",
|
||||
dataIndex: "gateLevelAuthArea",
|
||||
render: (_, record) => JSON.parse(record.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、"),
|
||||
},
|
||||
{ title: "访问起始时间", dataIndex: "visitStartTime" },
|
||||
{ title: "访问结束时间", dataIndex: "visitEndTime" },
|
||||
{
|
||||
title: "审批状态",
|
||||
dataIndex: "auditFlag",
|
||||
render: (_, record) => getLabelName({ list: APPROVAL_STATUS_ENUM, status: record.auditFlag }),
|
||||
},
|
||||
{
|
||||
title: "车辆开启状态",
|
||||
dataIndex: "statusFlag",
|
||||
render: (_, record) => record.statusFlag === 2 ? "启用" : "停用",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 200,
|
||||
width: 350,
|
||||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
|
|
@ -161,16 +186,18 @@ function List(props) {
|
|||
onUpdateStatus(record.id);
|
||||
}}
|
||||
>
|
||||
{record.todo6 === 1 ? "关闭" : "开启"}
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
重新申请
|
||||
{record.statusFlag === 2 ? "关闭" : "开启"}
|
||||
</Button>
|
||||
{record.auditFlag === 3 && (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
重新申请
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
|
|
@ -191,4 +218,4 @@ function List(props) {
|
|||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_STOCK_VEHICLES], true)(List);
|
||||
export default Connect([NS_VEHICLE_APPLY], true)(List);
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
|||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { getLabelName } from "zy-react-library/utils";
|
||||
import { CURRENT_IN_PORT_STATUS_ENUM } from "~/enumerate/constant";
|
||||
import { NS_STOCK_VEHICLES } from "~/enumerate/namespace";
|
||||
import { NS_VEHICLE_APPLY } from "~/enumerate/namespace";
|
||||
|
||||
function VehicleRecords(props) {
|
||||
const [form] = Form.useForm();
|
||||
const query = useGetUrlQuery();
|
||||
const { tableProps, getData } = useTable(props["stockVehiclesVehicleRecordsList"], {
|
||||
const { tableProps, getData } = useTable(props["vehicleApplyRecordsList"], {
|
||||
form,
|
||||
params: { id: query.id },
|
||||
});
|
||||
|
|
@ -24,7 +24,7 @@ function VehicleRecords(props) {
|
|||
<Search
|
||||
options={[
|
||||
{ name: "todo1", label: "口门名称" },
|
||||
{ name: "todo2", label: "所属区域", render: (<DictionarySelect dictValue="primeport_area" />) },
|
||||
{ name: "todo2", label: "所属区域", render: (<DictionarySelect dictValue="HG_AUTH_AREA" />) },
|
||||
{ name: "todo3", label: "进港时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
]}
|
||||
onFinish={getData}
|
||||
|
|
@ -53,4 +53,4 @@ function VehicleRecords(props) {
|
|||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_STOCK_VEHICLES], true)(VehicleRecords);
|
||||
export default Connect([NS_VEHICLE_APPLY], true)(VehicleRecords);
|
||||
|
|
|
|||
|
|
@ -1,57 +1,7 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Descriptions, Divider, Spin } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import PreviewImg from "zy-react-library/components/PreviewImg";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_STOCK_VEHICLES } from "~/enumerate/namespace";
|
||||
import ViewPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/PersonalVehicle/View";
|
||||
|
||||
function View(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const [info, setInfo] = useState({});
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["stockVehiclesInfo"]({ id: query.id });
|
||||
setInfo(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Page headerTitle="查看" contentPadding="0 20px 20px 20px">
|
||||
<Spin spinning={props.stockVehicles.stockVehiclesLoading}>
|
||||
<Divider orientation="left">申请信息</Divider>
|
||||
<Descriptions
|
||||
column={2}
|
||||
bordered
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "车辆所属类型", children: info.todo1 },
|
||||
{ label: "车辆所属部门", children: info.todo2 },
|
||||
{ label: "车牌类型", children: info.todo4 },
|
||||
{ label: "车牌号", children: info.todo5 },
|
||||
{ label: "车辆类型", children: info.todo6 },
|
||||
{ label: "访问港区", children: info.todo7 },
|
||||
{ label: "访问开始时间", children: info.todo8 },
|
||||
{ label: "访问结束时间", children: info.todo9 },
|
||||
{ label: "行驶证照片", children: (<PreviewImg files={[info.todo10]} />), span: 24 },
|
||||
{ label: "车辆图片", children: (<PreviewImg files={[info.todo11]} />), span: 24 },
|
||||
]}
|
||||
/>
|
||||
<Divider orientation="left">审批信息</Divider>
|
||||
<Descriptions
|
||||
column={1}
|
||||
bordered
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "审批人", children: info.todo12 },
|
||||
]}
|
||||
/>
|
||||
</Spin>
|
||||
</Page>
|
||||
);
|
||||
return (<ViewPage vehicleBelongType={2} {...props} />);
|
||||
}
|
||||
|
||||
export default Connect([NS_STOCK_VEHICLES], true)(View);
|
||||
export default View;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, Divider, Form, message, Modal, Space } from "antd";
|
||||
import { Button, Descriptions, Divider, message, Modal, Space } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
|
|
@ -7,8 +7,12 @@ import PreviewImg from "zy-react-library/components/PreviewImg";
|
|||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
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 { NS_RELATED_VEHICLES } from "~/enumerate/namespace";
|
||||
import { getLabelName } from "zy-react-library/utils";
|
||||
import { VEHICLE_AUDIT_STATUS_ENUM } from "~/enumerate/constant";
|
||||
import { NS_VEHICLE_AUDIT } from "~/enumerate/namespace";
|
||||
|
||||
function RelatedVehicles(props) {
|
||||
const [currentId, setCurrentId] = useState("");
|
||||
|
|
@ -16,9 +20,10 @@ function RelatedVehicles(props) {
|
|||
const [infoModalVisible, setInfoModalVisible] = useState(false);
|
||||
const [viewRejectReasonModalVisible, setViewRejectReasonModalVisible] = useState(false);
|
||||
|
||||
const [form] = Form.useForm();
|
||||
const { tableProps, getData } = useTable(props["relatedVehiclesList"], {
|
||||
const [form] = Search.useForm();
|
||||
const { tableProps, getData } = useTable(props["vehicleAuditList"], {
|
||||
form,
|
||||
params: { vehicleBelongTypeArr: "5" },
|
||||
});
|
||||
|
||||
return (
|
||||
|
|
@ -27,19 +32,31 @@ function RelatedVehicles(props) {
|
|||
form={form}
|
||||
onFinish={getData}
|
||||
options={[
|
||||
{ name: "todo1", label: "车牌号" },
|
||||
{ name: "todo2", label: "项目名称" },
|
||||
{ name: "licenceNo", label: "车牌号" },
|
||||
{ name: "projectName", label: "项目名称" },
|
||||
]}
|
||||
/>
|
||||
<Table
|
||||
columns={[
|
||||
{ dataIndex: "todo1", title: "项目名称" },
|
||||
{ dataIndex: "todo2", title: "区域范围" },
|
||||
{ dataIndex: "todo3", title: "访问期限" },
|
||||
{ dataIndex: "todo4", title: "车辆类型" },
|
||||
{ dataIndex: "todo5", title: "车牌类型" },
|
||||
{ dataIndex: "todo6", title: "车牌号" },
|
||||
{ dataIndex: "todo7", title: "审核状态" },
|
||||
{ dataIndex: "projectName", title: "项目名称" },
|
||||
{
|
||||
dataIndex: "gateLevelAuthArea",
|
||||
title: "区域范围",
|
||||
render: (_, record) => JSON.parse(record.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、"),
|
||||
},
|
||||
{
|
||||
dataIndex: "visitStartTime",
|
||||
title: "访问期限",
|
||||
render: (_, record) => record.visitStartTime + record.visitEndTime,
|
||||
},
|
||||
{ dataIndex: "vehicleTypeName", title: "车辆类型" },
|
||||
{ dataIndex: "licenceTypeName", title: "车牌类型" },
|
||||
{ dataIndex: "licenceNo", title: "车牌号" },
|
||||
{
|
||||
dataIndex: "auditStatus",
|
||||
title: "审核状态",
|
||||
render: (_, record) => getLabelName({ list: VEHICLE_AUDIT_STATUS_ENUM, status: record.auditStatus }),
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 150,
|
||||
|
|
@ -63,15 +80,17 @@ function RelatedVehicles(props) {
|
|||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
setViewRejectReasonModalVisible(true);
|
||||
setCurrentId(record.id);
|
||||
}}
|
||||
>
|
||||
查看原因
|
||||
</Button>
|
||||
{record.auditStatus === 3 && (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
setViewRejectReasonModalVisible(true);
|
||||
setCurrentId(record.id);
|
||||
}}
|
||||
>
|
||||
查看原因
|
||||
</Button>
|
||||
)}
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
|
|
@ -110,7 +129,7 @@ function RelatedVehicles(props) {
|
|||
取消
|
||||
</Button>,
|
||||
]}
|
||||
loading={props.relatedVehicles.relatedVehiclesLoading}
|
||||
loading={props.vehicleAudit.vehicleAuditLoading}
|
||||
>
|
||||
<InfoModal id={currentId} />
|
||||
</Modal>
|
||||
|
|
@ -132,10 +151,10 @@ function RelatedVehicles(props) {
|
|||
}
|
||||
|
||||
const ReviewModalComponent = (props) => {
|
||||
const [form] = Form.useForm();
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props["relatedVehiclesApproval"]({
|
||||
const { success } = await props["vehicleAuditApproval"]({
|
||||
id: props.id,
|
||||
...values,
|
||||
});
|
||||
|
|
@ -154,7 +173,7 @@ const ReviewModalComponent = (props) => {
|
|||
onCancel={props.onCancel}
|
||||
onOk={form.submit}
|
||||
width={800}
|
||||
confirmLoading={props.relatedVehicles.relatedVehiclesLoading}
|
||||
confirmLoading={props.vehicleAudit.vehicleAuditLoading}
|
||||
>
|
||||
<InfoModal id={props.id} />
|
||||
<FormBuilder
|
||||
|
|
@ -163,22 +182,22 @@ const ReviewModalComponent = (props) => {
|
|||
labelCol={{ span: 8 }}
|
||||
span={24}
|
||||
values={{
|
||||
todo1: "1",
|
||||
auditStatus: "2",
|
||||
}}
|
||||
showActionButtons={false}
|
||||
options={[
|
||||
{
|
||||
name: "todo1",
|
||||
name: "auditStatus",
|
||||
label: "是否通过审核",
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: [{ bianma: "1", name: "通过" }, { bianma: "0", name: "打回" }],
|
||||
items: VEHICLE_AUDIT_STATUS_ENUM,
|
||||
},
|
||||
{
|
||||
name: "todo2",
|
||||
name: "remarks",
|
||||
label: "驳回原因",
|
||||
render: FORM_ITEM_RENDER_ENUM.TEXTAREA,
|
||||
dependencies: ["todo1"],
|
||||
hidden: formValues => !(formValues.todo1 === "0"),
|
||||
dependencies: ["auditStatus"],
|
||||
hidden: formValues => !(formValues.auditStatus === "3"),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
|
|
@ -189,7 +208,8 @@ const ReviewModalComponent = (props) => {
|
|||
const ViewRejectReasonModalComponent = (props) => {
|
||||
const [info, setInfo] = useState({});
|
||||
const getData = async () => {
|
||||
const { data } = await props["relatedVehiclesRejectReason"]({ id: props.id });
|
||||
// TODO
|
||||
const { data } = await props["vehicleAuditRejectReason"]({ id: props.id });
|
||||
setInfo(data);
|
||||
};
|
||||
|
||||
|
|
@ -207,7 +227,7 @@ const ViewRejectReasonModalComponent = (props) => {
|
|||
footer={[
|
||||
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
|
||||
]}
|
||||
loading={props.relatedVehicles.relatedVehiclesLoading}
|
||||
loading={props.vehicleAudit.vehicleAuditLoading}
|
||||
>
|
||||
<Descriptions
|
||||
column={1}
|
||||
|
|
@ -224,9 +244,20 @@ const ViewRejectReasonModalComponent = (props) => {
|
|||
const InfoModalComponent = (props) => {
|
||||
const [info, setInfo] = useState({});
|
||||
|
||||
const { getFile } = useGetFile();
|
||||
|
||||
const getData = async () => {
|
||||
const { data } = await props["relatedVehiclesInfo"]({ id: props.id });
|
||||
setInfo(data);
|
||||
const { data } = await props["vehicleAuditInfo"]({ id: props.id });
|
||||
const drivingLicenseFile = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM[601],
|
||||
eqForeignKey: data.drivingLicenseId,
|
||||
});
|
||||
const attachmentFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[602], eqForeignKey: data.attachmentId });
|
||||
setInfo({
|
||||
...data,
|
||||
drivingLicenseFile,
|
||||
attachmentFile,
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -242,25 +273,25 @@ const InfoModalComponent = (props) => {
|
|||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "相关方名称", children: info.todo1 },
|
||||
{ label: "项目名称", children: info.todo2 },
|
||||
{ label: "审核人员", children: info.todo3 },
|
||||
{ label: "时间范围", children: info.todo4 },
|
||||
{ label: "地域范围", children: info.todo5 },
|
||||
{ label: "驾驶人员", children: info.todo6 },
|
||||
{ label: "车辆类型", children: info.todo7 },
|
||||
{ label: "车牌类型", children: info.todo8 },
|
||||
{ label: "车牌号", children: info.todo9 },
|
||||
{ label: "审核状态", children: info.todo10 },
|
||||
{ label: "车辆照片", children: (<PreviewImg files={[info.todo11]} />) },
|
||||
{ label: "车辆行驶证照片", children: (<PreviewImg files={[info.todo12]} />) },
|
||||
{ label: "申请人签字", children: (<PreviewImg files={[info.todo13]} />) },
|
||||
{ label: "项目名称", children: info.projectName },
|
||||
{ label: "审核人员", children: info.auditUserName },
|
||||
{ label: "时间范围", children: info.visitStartTime + info.visitEndTime },
|
||||
{ label: "地域范围", children: JSON.parse(info.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、") },
|
||||
{ label: "驾驶人员", children: info.employeeVehicleUserName },
|
||||
{ label: "车辆类型", children: info.vehicleTypeName },
|
||||
{ label: "车牌类型", children: info.licenceTypeName },
|
||||
{ label: "车牌号", children: info.licenceNo },
|
||||
{ label: "审核状态", children: getLabelName({ list: VEHICLE_AUDIT_STATUS_ENUM, status: info.auditStatus }) },
|
||||
{ label: "车辆照片", children: (<PreviewImg files={info.attachmentFile} />) },
|
||||
{ label: "车辆行驶证照片", children: (<PreviewImg files={info.drivingLicenseFile} />) },
|
||||
{ label: "申请人签字", children: (<PreviewImg files={[info.informSignId]} />) }, // todo
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const ReviewModal = Connect([NS_RELATED_VEHICLES], true)(ReviewModalComponent);
|
||||
const InfoModal = Connect([NS_RELATED_VEHICLES], true)(InfoModalComponent);
|
||||
const ViewRejectReasonModal = Connect([NS_RELATED_VEHICLES], true)(ViewRejectReasonModalComponent);
|
||||
export default Connect([NS_RELATED_VEHICLES], true)(RelatedVehicles);
|
||||
const ReviewModal = Connect([NS_VEHICLE_AUDIT], true)(ReviewModalComponent);
|
||||
const InfoModal = Connect([NS_VEHICLE_AUDIT], true)(InfoModalComponent);
|
||||
const ViewRejectReasonModal = Connect([NS_VEHICLE_AUDIT], true)(ViewRejectReasonModalComponent);
|
||||
export default Connect([NS_VEHICLE_AUDIT], true)(RelatedVehicles);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, Divider, Form, message, Modal } from "antd";
|
||||
import { Button, Descriptions, Divider, message, Modal, Spin } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
|
|
@ -9,19 +9,21 @@ import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
|||
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
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 { VEHICLE_TYPE_ENUM } from "~/enumerate/constant";
|
||||
import { NS_SHARE_VEHICLES } from "~/enumerate/namespace";
|
||||
import { VEHICLE_AUDIT_STATUS_ENUM, VEHICLE_TYPE_ENUM } from "~/enumerate/constant";
|
||||
import { NS_VEHICLE_AUDIT } from "~/enumerate/namespace";
|
||||
|
||||
function ShareVehicles(props) {
|
||||
const [reviewModalVisible, setReviewModalVisible] = useState(false);
|
||||
const [currentId, setCurrentId] = useState("");
|
||||
const [reviewModalType, setReviewModalType] = useState("");
|
||||
|
||||
const [form] = Form.useForm();
|
||||
const { tableProps, getData } = useTable(props["shareVehiclesList"], {
|
||||
const [form] = Search.useForm();
|
||||
const { tableProps, getData } = useTable(props["vehicleAuditList"], {
|
||||
form,
|
||||
params: { vehicleBelongTypeArr: "1,2" },
|
||||
});
|
||||
|
||||
return (
|
||||
|
|
@ -30,30 +32,33 @@ function ShareVehicles(props) {
|
|||
form={form}
|
||||
onFinish={getData}
|
||||
options={[
|
||||
{ name: "todo1", label: "车辆所属人" },
|
||||
{ name: "todo2", label: "车牌号" },
|
||||
{ name: "todo3", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ name: "todo4", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ name: "todo5", label: "车辆所属部门", render: (<DepartmentSelectTree />) },
|
||||
{ name: "todo6", label: "访问港区范围", render: (<DictionarySelect dictValue="primeport_area" />) },
|
||||
{ name: "todo7", label: "车辆所属类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: VEHICLE_TYPE_ENUM },
|
||||
{ name: "employeeVehicleUserName", label: "车辆所属人" },
|
||||
{ name: "licenceNo", label: "车牌号" },
|
||||
{ name: "visitStartTime", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ name: "visitEndTime", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ name: "vehicleDepartmentId", label: "车辆所属部门", render: (<DepartmentSelectTree />) },
|
||||
{ name: "gateLevelAuthAreaId", label: "访问港区范围", render: (<DictionarySelect dictValue="HG_AUTH_AREA" />) },
|
||||
]}
|
||||
/>
|
||||
<Table
|
||||
columns={[
|
||||
{
|
||||
dataIndex: "todo1",
|
||||
dataIndex: "vehicleBelongType",
|
||||
title: "车辆所属类型",
|
||||
render: (_, record) => getLabelName({ list: VEHICLE_TYPE_ENUM, status: record.todo1 }),
|
||||
render: (_, record) => getLabelName({ list: VEHICLE_TYPE_ENUM, status: record.vehicleBelongType }),
|
||||
},
|
||||
{ dataIndex: "todo2", title: "车辆所属部门" },
|
||||
{ dataIndex: "todo3", title: "车辆归属人" },
|
||||
{ dataIndex: "todo4", title: "车牌号" },
|
||||
{ dataIndex: "todo5", title: "车牌类型" },
|
||||
{ dataIndex: "todo6", title: "车辆类型" },
|
||||
{ dataIndex: "todo7", title: "访问港区范围" },
|
||||
{ dataIndex: "todo8", title: "访问开始时间" },
|
||||
{ dataIndex: "todo9", title: "访问结束时间" },
|
||||
{ dataIndex: "vehicleDepartmentName", title: "车辆所属部门" },
|
||||
{ dataIndex: "employeeVehicleUserName", title: "车辆归属人" },
|
||||
{ dataIndex: "licenceNo", title: "车牌号" },
|
||||
{ dataIndex: "licenceTypeName", title: "车牌类型" },
|
||||
{ dataIndex: "vehicleTypeName", title: "车辆类型" },
|
||||
{
|
||||
dataIndex: "gateLevelAuthArea",
|
||||
title: "访问港区范围",
|
||||
render: (_, record) => JSON.parse(record.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、"),
|
||||
},
|
||||
{ dataIndex: "visitStartTime", title: "访问开始时间" },
|
||||
{ dataIndex: "visitEndTime", title: "访问结束时间" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 100,
|
||||
|
|
@ -63,7 +68,6 @@ function ShareVehicles(props) {
|
|||
onClick={() => {
|
||||
setReviewModalVisible(true);
|
||||
setCurrentId(record.id);
|
||||
setReviewModalType("first");
|
||||
}}
|
||||
>
|
||||
审核
|
||||
|
|
@ -77,10 +81,8 @@ function ShareVehicles(props) {
|
|||
reviewModalVisible && (
|
||||
<ReviewModal
|
||||
id={currentId}
|
||||
type={reviewModalType}
|
||||
onCancel={() => {
|
||||
setReviewModalVisible(false);
|
||||
setReviewModalType("");
|
||||
setCurrentId("");
|
||||
}}
|
||||
getData={getData}
|
||||
|
|
@ -92,21 +94,55 @@ function ShareVehicles(props) {
|
|||
}
|
||||
|
||||
function ReviewModalComponent(props) {
|
||||
const [form] = Form.useForm();
|
||||
const [form] = FormBuilder.useForm();
|
||||
const { loading: getFileLoading, getFile } = useGetFile();
|
||||
|
||||
const [changeAfter, setChangeAfter] = useState({});
|
||||
const [changeBefore, setChangeBefore] = useState({});
|
||||
const [batchState, setBatchState] = useState(1);
|
||||
const [recordsList, setRecordsList] = useState([]);
|
||||
|
||||
const [info, setInfo] = useState({});
|
||||
const getData = async () => {
|
||||
const { data } = await props["shareVehiclesInfo"]({ id: props.id });
|
||||
setInfo(data);
|
||||
const { data } = await props["vehicleAuditInfo"]({ id: props.id });
|
||||
const changeAfterDrivingLicenseFile = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM[601],
|
||||
eqForeignKey: data.changeAfter.drivingLicenseId,
|
||||
});
|
||||
const changeAfterAttachmentFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[602], eqForeignKey: data.changeAfter.attachmentId });
|
||||
setChangeAfter({
|
||||
...data.changeAfter,
|
||||
drivingLicenseFile: changeAfterDrivingLicenseFile,
|
||||
attachmentFile: changeAfterAttachmentFile,
|
||||
});
|
||||
if (data.changeBefore && Object.keys(data.changeBefore).length > 0) {
|
||||
const changeBeforeDrivingLicenseFile = await getFile({
|
||||
eqType: UPLOAD_FILE_TYPE_ENUM[601],
|
||||
eqForeignKey: data.changeBefore.drivingLicenseId,
|
||||
});
|
||||
const changeBeforeAttachmentFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[602], eqForeignKey: data.changeBefore.attachmentId });
|
||||
setChangeBefore({
|
||||
...data.changeBefore,
|
||||
drivingLicenseFile: changeBeforeDrivingLicenseFile,
|
||||
attachmentFile: changeBeforeAttachmentFile,
|
||||
});
|
||||
}
|
||||
setBatchState(data.batchState);
|
||||
};
|
||||
|
||||
const getRecordsList = async () => {
|
||||
const { data } = await props["vehicleAuditRecordsList"]({ id: props.id });
|
||||
setRecordsList(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getData();
|
||||
getRecordsList();
|
||||
}, []);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props["shareVehiclesApproval"]({
|
||||
id: props.id,
|
||||
const { success } = await props["vehicleAuditApproval"]({
|
||||
...values,
|
||||
id: props.id,
|
||||
});
|
||||
if (success) {
|
||||
message.success("操作成功");
|
||||
|
|
@ -123,36 +159,37 @@ function ReviewModalComponent(props) {
|
|||
onCancel={props.onCancel}
|
||||
onOk={form.submit}
|
||||
width={800}
|
||||
confirmLoading={props.shareVehicles.shareVehiclesLoading}
|
||||
confirmLoading={props.vehicleAudit.vehicleAuditLoading || getFileLoading}
|
||||
>
|
||||
<Divider orientation="left">申请信息</Divider>
|
||||
{
|
||||
props.type === "first"
|
||||
? (
|
||||
<Descriptions
|
||||
column={1}
|
||||
bordered
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "车辆所属类型", children: getLabelName({ list: VEHICLE_TYPE_ENUM, status: info.todo1 }) },
|
||||
{ label: "车辆所属部门", children: info.todo2 },
|
||||
...(info.todo1 !== 1 ? [{ label: "车辆归属人", children: info.todo3 }] : []),
|
||||
{ label: "车牌号", children: info.todo4 },
|
||||
{ label: "车牌类型", children: info.todo5 },
|
||||
{ label: "车辆类型", children: info.todo6 },
|
||||
{ label: "访问港区范围", children: info.todo7 },
|
||||
{ label: "访问开始时间", children: info.todo8 },
|
||||
{ label: "访问结束时间", children: info.todo9 },
|
||||
{ label: "行驶证照片", children: (<PreviewImg files={[info.todo10]} />) },
|
||||
{ label: "车辆照片", children: (<PreviewImg files={[info.todo11]} />) },
|
||||
{ label: "审批人", children: info.todo12 },
|
||||
]}
|
||||
/>
|
||||
)
|
||||
: (
|
||||
<div>
|
||||
<style>
|
||||
{`
|
||||
<Spin spinning={props.vehicleAudit.vehicleAuditLoading || getFileLoading}>
|
||||
<Divider orientation="left">申请信息</Divider>
|
||||
{
|
||||
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: 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>
|
||||
<style>
|
||||
{`
|
||||
.comparison-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
|
|
@ -176,126 +213,127 @@ function ReviewModalComponent(props) {
|
|||
width: 40%;
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
<table className="comparison-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th className="name-col">名称</th>
|
||||
<th className="before-col">变更前</th>
|
||||
<th className="after-col">变更后</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>车辆所属类型</th>
|
||||
<td>{getLabelName({ list: VEHICLE_TYPE_ENUM, status: info.todo1 })}</td>
|
||||
<td>{getLabelName({ list: VEHICLE_TYPE_ENUM, status: info.newTodo1 })}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>车辆所属部门</th>
|
||||
<td>{info.todo2}</td>
|
||||
<td>{info.newTodo2}</td>
|
||||
</tr>
|
||||
{info.todo1 !== 1 && (
|
||||
</style>
|
||||
<table className="comparison-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>车辆归属人</th>
|
||||
<td>{info.todo3}</td>
|
||||
<td>{info.newTodo3}</td>
|
||||
<th className="name-col">名称</th>
|
||||
<th className="before-col">变更前</th>
|
||||
<th className="after-col">变更后</th>
|
||||
</tr>
|
||||
)}
|
||||
<tr>
|
||||
<th>车牌号</th>
|
||||
<td>{info.todo4}</td>
|
||||
<td>{info.newTodo4}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>车牌类型</th>
|
||||
<td>{info.todo5}</td>
|
||||
<td>{info.newTodo5}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>车辆类型</th>
|
||||
<td>{info.todo6}</td>
|
||||
<td>{info.newTodo6}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>访问港区范围</th>
|
||||
<td>{info.todo7}</td>
|
||||
<td>{info.newTodo7}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>访问开始时间</th>
|
||||
<td>{info.todo8}</td>
|
||||
<td>{info.newTodo8}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>访问结束时间</th>
|
||||
<td>{info.todo9}</td>
|
||||
<td>{info.newTodo9}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>行驶证照片</th>
|
||||
<td><PreviewImg files={[info.todo10]} /></td>
|
||||
<td><PreviewImg files={[info.newTodo10]} /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>车辆照片</th>
|
||||
<td><PreviewImg files={[info.todo11]} /></td>
|
||||
<td><PreviewImg files={[info.newTodo11]} /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>审批人</th>
|
||||
<td>{info.todo12}</td>
|
||||
<td>{info.newTodo12}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
<Divider orientation="left">审批信息</Divider>
|
||||
{info?.approvalRecords?.map((record, index) => (
|
||||
<Descriptions
|
||||
key={index}
|
||||
column={1}
|
||||
bordered
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "审批人", children: record.approver },
|
||||
{ label: "审批时间", children: record.approveTime },
|
||||
{ label: "审批状态", children: record.status },
|
||||
...(record.status === 0 ? [{ label: "打回意见", children: record.comment }] : []),
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>车辆所属类型</th>
|
||||
<td>{getLabelName({ list: VEHICLE_TYPE_ENUM, status: changeBefore.vehicleBelongType })}</td>
|
||||
<td>{getLabelName({ list: VEHICLE_TYPE_ENUM, status: changeAfter.vehicleBelongType })}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>车辆所属部门</th>
|
||||
<td>{changeBefore.vehicleDepartmentName}</td>
|
||||
<td>{changeAfter.vehicleDepartmentName}</td>
|
||||
</tr>
|
||||
{changeBefore.vehicleBelongType === 1 && (
|
||||
<tr>
|
||||
<th>车辆归属人</th>
|
||||
<td>{changeBefore.employeeVehicleUserName}</td>
|
||||
<td>{changeAfter.employeeVehicleUserName}</td>
|
||||
</tr>
|
||||
)}
|
||||
<tr>
|
||||
<th>车牌号</th>
|
||||
<td>{changeBefore.licenceNo}</td>
|
||||
<td>{changeAfter.licenceNo}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>车牌类型</th>
|
||||
<td>{changeBefore.licenceTypeName}</td>
|
||||
<td>{changeAfter.licenceTypeName}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>车辆类型</th>
|
||||
<td>{changeBefore.vehicleTypeName}</td>
|
||||
<td>{changeAfter.vehicleTypeName}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>访问港区范围</th>
|
||||
<td>{JSON.parse(changeBefore.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、")}</td>
|
||||
<td>{JSON.parse(changeAfter.gateLevelAuthArea)?.area?.map(item => item.value)?.join("、")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>访问开始时间</th>
|
||||
<td>{changeBefore.visitStartTime}</td>
|
||||
<td>{changeAfter.visitStartTime}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>访问结束时间</th>
|
||||
<td>{changeBefore.visitEndTime}</td>
|
||||
<td>{changeAfter.visitEndTime}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>行驶证照片</th>
|
||||
<td><PreviewImg files={changeBefore.drivingLicenseFile} /></td>
|
||||
<td><PreviewImg files={changeAfter.drivingLicenseFile} /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>车辆照片</th>
|
||||
<td><PreviewImg files={changeBefore.attachmentFile} /></td>
|
||||
<td><PreviewImg files={changeAfter.attachmentFile} /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>审批人</th>
|
||||
<td>{changeBefore.auditUserName}</td>
|
||||
<td>{changeAfter.auditUserName}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
<Divider orientation="left">审批信息</Divider>
|
||||
{recordsList.map((record, index) => (
|
||||
<Descriptions
|
||||
key={index}
|
||||
column={1}
|
||||
bordered
|
||||
styles={{ label: { width: 200 } }}
|
||||
items={[
|
||||
{ label: "审批人", children: record.auditUserName },
|
||||
{ label: "审批时间", children: record.todo },
|
||||
{ label: "审批状态", children: getLabelName({ list: VEHICLE_AUDIT_STATUS_ENUM, status: record.auditStatus }) },
|
||||
...(record.auditStatus === 3 ? [{ label: "打回意见", children: record.remarks }] : []),
|
||||
]}
|
||||
/>
|
||||
))}
|
||||
<FormBuilder
|
||||
form={form}
|
||||
showActionButtons={false}
|
||||
span={24}
|
||||
onFinish={onSubmit}
|
||||
labelCol={{ span: 8 }}
|
||||
values={{
|
||||
auditStatus: "2",
|
||||
}}
|
||||
options={[
|
||||
{
|
||||
name: "auditStatus",
|
||||
label: "是否通过",
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: VEHICLE_AUDIT_STATUS_ENUM,
|
||||
},
|
||||
{
|
||||
name: "remarks",
|
||||
label: "打回意见",
|
||||
render: FORM_ITEM_RENDER_ENUM.TEXTAREA,
|
||||
dependencies: ["auditStatus"],
|
||||
hidden: formValues => !(formValues.auditStatus === "3"),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
))}
|
||||
<FormBuilder
|
||||
form={form}
|
||||
showActionButtons={false}
|
||||
span={24}
|
||||
onFinish={onSubmit}
|
||||
labelCol={{ span: 8 }}
|
||||
values={{
|
||||
todo1: 1,
|
||||
}}
|
||||
options={[
|
||||
{
|
||||
name: "todo1",
|
||||
label: "是否通过",
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }],
|
||||
},
|
||||
{
|
||||
name: "todo2",
|
||||
label: "打回意见",
|
||||
render: FORM_ITEM_RENDER_ENUM.TEXTAREA,
|
||||
dependencies: ["todo1"],
|
||||
hidden: formValues => !(formValues.todo1 === 0),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Spin>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
||||
const ReviewModal = Connect([NS_SHARE_VEHICLES], true)(ReviewModalComponent);
|
||||
export default Connect([NS_SHARE_VEHICLES], true)(ShareVehicles);
|
||||
const ReviewModal = Connect([NS_VEHICLE_AUDIT], true)(ReviewModalComponent);
|
||||
export default Connect([NS_VEHICLE_AUDIT], true)(ShareVehicles);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ function Add(props) {
|
|||
{ name: "todo3", label: "身份证号", rules: [{ pattern: ID_NUMBER, message: "请输入正确的身份证号" }] },
|
||||
{ name: "todo4", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ name: "todo5", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ name: "todo6", label: "访问港区", render: <DictionarySelect dictValue="primeport_area" /> },
|
||||
{ name: "todo6", label: "访问港区", render: <DictionarySelect dictValue="HG_AUTH_AREA" /> },
|
||||
{ name: "todo7", label: "访问口门名称" },
|
||||
{ name: "todo8", label: "来访事由", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
|
||||
{
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ function Add(props) {
|
|||
{ name: "todo6", label: "车辆类型", render: (<DictionarySelect dictValue="VEHICLE_TYPE" />) },
|
||||
{ name: "todo7", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ name: "todo8", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||
{ name: "todo9", label: "访问港区", render: <DictionarySelect dictValue="primeport_area" /> },
|
||||
{ name: "todo9", label: "访问港区", render: <DictionarySelect dictValue="HG_AUTH_AREA" /> },
|
||||
{ name: "todo10", label: "访问口门名称" },
|
||||
{ name: "todo11", label: "来访事由", span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue