封闭区域申请:分公司人员及车辆管理、相关方人员及车辆管理、驻港单位人员及车辆管理、检查部门车辆管理
parent
3b00108330
commit
98cf2e32c3
10
router.md
10
router.md
|
|
@ -30,17 +30,17 @@
|
||||||
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/personalVehicle/list`
|
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/personalVehicle/list`
|
||||||
- 进出港信息管理/股份单位车辆管理 ##
|
- 进出港信息管理/股份单位车辆管理 ##
|
||||||
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/stockVehicles/list`
|
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/stockVehicles/list`
|
||||||
- 进出港信息管理/分公司人员及车辆管理
|
- 进出港信息管理/分公司人员及车辆管理 #
|
||||||
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/branchPersonnelAndVehicles/list`
|
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/branchPersonnelAndVehicles/list`
|
||||||
- 进出港信息管理/相关方人员及车辆管理
|
- 进出港信息管理/相关方人员及车辆管理 #
|
||||||
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/stakeholderPersonnelAndVehicles/list`
|
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/stakeholderPersonnelAndVehicles/list`
|
||||||
- 进出港信息管理/驻港单位人员及车辆管理
|
- 进出港信息管理/驻港单位人员及车辆管理 #
|
||||||
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/portBasedUnitsPersonnelAndVehicles/list`
|
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/portBasedUnitsPersonnelAndVehicles/list`
|
||||||
- 进出港信息管理/检查部门车辆管理
|
- 进出港信息管理/检查部门车辆管理 #
|
||||||
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/inspectDepartmentVehicles/list`
|
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/inspectDepartmentVehicles/list`
|
||||||
- 进出港信息管理/车辆违规管理/车辆违规管理 ##
|
- 进出港信息管理/车辆违规管理/车辆违规管理 ##
|
||||||
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/vehiclesViolation/vehiclesViolation/list`
|
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/vehiclesViolation/vehiclesViolation/list`
|
||||||
- 进出港信息管理/车辆违规管理/车辆黑名单管理 #
|
- 进出港信息管理/车辆违规管理/车辆黑名单管理 ##
|
||||||
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/vehiclesViolation/vehicleBlacklist/list`
|
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/vehiclesViolation/vehicleBlacklist/list`
|
||||||
|
|
||||||
#### 封闭区域管理
|
#### 封闭区域管理
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,5 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
|
||||||
export const branchPersonnelAndVehiclesList = declareRequest(
|
export const branchPersonnelAndVehiclesList = declareRequest(
|
||||||
"branchPersonnelAndVehiclesLoading",
|
"branchPersonnelAndVehiclesLoading",
|
||||||
`Post > @/primeport/`,
|
`Get > /primeport/vehicleApply/fgsCount`,
|
||||||
);
|
|
||||||
export const branchPersonnelAndVehiclesPersonnelAndVehicleList = declareRequest(
|
|
||||||
"branchPersonnelAndVehiclesLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
|
||||||
export const branchPersonnelAndVehiclesVehicleManagementList = declareRequest(
|
|
||||||
"branchPersonnelAndVehiclesLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
|
||||||
|
|
||||||
export const inspectDepartmentVehiclesList = declareRequest(
|
|
||||||
"inspectDepartmentVehiclesLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
|
||||||
export const inspectDepartmentVehiclesDelete = declareRequest(
|
|
||||||
"inspectDepartmentVehiclesLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
|
||||||
export const inspectDepartmentVehiclesInfo = declareRequest(
|
|
||||||
"inspectDepartmentVehiclesLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
|
||||||
export const inspectDepartmentVehiclesAdd = declareRequest(
|
|
||||||
"inspectDepartmentVehiclesLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
|
||||||
export const inspectDepartmentVehiclesUpdate = declareRequest(
|
|
||||||
"inspectDepartmentVehiclesLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
|
||||||
|
|
||||||
export const portBasedUnitsPersonnelAndVehiclesList = declareRequest(
|
|
||||||
"portBasedUnitsPersonnelAndVehiclesLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
|
||||||
export const portBasedUnitsPersonnelAndVehiclesPersonnelAndVehicleList = declareRequest(
|
|
||||||
"portBasedUnitsPersonnelAndVehiclesLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
|
||||||
|
|
@ -2,21 +2,5 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
|
||||||
export const stakeholderPersonnelAndVehiclesList = declareRequest(
|
export const stakeholderPersonnelAndVehiclesList = declareRequest(
|
||||||
"stakeholderPersonnelAndVehiclesLoading",
|
"stakeholderPersonnelAndVehiclesLoading",
|
||||||
`Post > @/primeport/`,
|
`Get > /primeport/personApply/xgfPersonnelVehicleManagementList`,
|
||||||
);
|
|
||||||
export const stakeholderPersonnelAndVehiclesPersonnelList = declareRequest(
|
|
||||||
"stakeholderPersonnelAndVehiclesLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
|
||||||
export const stakeholderPersonnelAndVehiclesPersonnelUpdateStatus = declareRequest(
|
|
||||||
"stakeholderPersonnelAndVehiclesLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
|
||||||
export const stakeholderPersonnelAndVehiclesVehicleList = declareRequest(
|
|
||||||
"stakeholderPersonnelAndVehiclesLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
|
||||||
export const stakeholderPersonnelAndVehiclesVehicleUpdateStatus = declareRequest(
|
|
||||||
"stakeholderPersonnelAndVehiclesLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -28,3 +28,11 @@ export const vehicleApplyRecordsList = declareRequest(
|
||||||
"vehicleApplyLoading",
|
"vehicleApplyLoading",
|
||||||
`Post > @/primeport/`,
|
`Post > @/primeport/`,
|
||||||
);
|
);
|
||||||
|
export const inspectDepartmentVehiclesAdd = declareRequest(
|
||||||
|
"vehicleApplyLoading",
|
||||||
|
`Post > @/primeport/vehicleApply/inspectCarSave`,
|
||||||
|
);
|
||||||
|
export const inspectDepartmentVehiclesUpdate = declareRequest(
|
||||||
|
"vehicleApplyLoading",
|
||||||
|
`Put > @/primeport/vehicleApply/inspectCarEdit`,
|
||||||
|
);
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,6 @@ export const NS_STOCK_PERSONNEL_AND_VEHICLES = defineNamespace("stockPersonnelAn
|
||||||
export const NS_VEHICLE_APPLY = defineNamespace("vehicleApply");
|
export const NS_VEHICLE_APPLY = defineNamespace("vehicleApply");
|
||||||
export const NS_BRANCH_PERSONNEL_AND_VEHICLES = defineNamespace("branchPersonnelAndVehicles");
|
export const NS_BRANCH_PERSONNEL_AND_VEHICLES = defineNamespace("branchPersonnelAndVehicles");
|
||||||
export const NS_STAKEHOLDER_PERSONNEL_AND_VEHICLES = defineNamespace("stakeholderPersonnelAndVehicles");
|
export const NS_STAKEHOLDER_PERSONNEL_AND_VEHICLES = defineNamespace("stakeholderPersonnelAndVehicles");
|
||||||
export const NS_PORT_BASED_UNITS_PERSONNEL_AND_VEHICLES = defineNamespace("portBasedUnitsPersonnelAndVehicles");
|
|
||||||
export const NS_INSPECT_DEPARTMENT_VEHICLES = defineNamespace("inspectDepartmentVehicles");
|
|
||||||
export const NS_VEHICLES_VIOLATION = defineNamespace("vehiclesViolation");
|
export const NS_VEHICLES_VIOLATION = defineNamespace("vehiclesViolation");
|
||||||
export const NS_VEHICLE_BLACKLIST = defineNamespace("vehicleBlacklist");
|
export const NS_VEHICLE_BLACKLIST = defineNamespace("vehicleBlacklist");
|
||||||
export const NS_PERSONNEL_PERMISSION_RECORDS = defineNamespace("personnelPermissionRecords");
|
export const NS_PERSONNEL_PERMISSION_RECORDS = defineNamespace("personnelPermissionRecords");
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ function List(props) {
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
const { tableProps, getData } = useTable(props["branchPersonnelAndVehiclesList"], {
|
const { tableProps, getData } = useTable(props["branchPersonnelAndVehiclesList"], {
|
||||||
form,
|
form,
|
||||||
|
params: { corpType: 1 },
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -19,15 +20,15 @@ function List(props) {
|
||||||
labelCol={{ span: 4 }}
|
labelCol={{ span: 4 }}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
options={[
|
options={[
|
||||||
{ name: "todo1", label: "企业名称" },
|
{ name: "corpName", label: "企业名称" },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
<Table
|
<Table
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "企业名称", dataIndex: "todo1" },
|
{ title: "企业名称", dataIndex: "corpName" },
|
||||||
{ title: "人员数", dataIndex: "todo2" },
|
{ title: "人员数", dataIndex: "userCount" },
|
||||||
{ title: "人员车辆数", dataIndex: "todo3" },
|
{ title: "人员车辆数", dataIndex: "priCarCount" },
|
||||||
{ title: "单位车辆数", dataIndex: "todo4" },
|
{ title: "单位车辆数", dataIndex: "pubCarCount" },
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
|
|
@ -37,12 +38,19 @@ function List(props) {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push(`./personnelAndVehicle/list?id=${record.id}`);
|
props.history.push(`./personnelAndVehicle/list?id=${record.corpId}`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
人员及车辆详情
|
人员及车辆详情
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="link">单位车辆详情</Button>
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
props.history.push(`./unitVehicle/list?id=${record.corpId}`);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
单位车辆详情
|
||||||
|
</Button>
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,14 @@ import Table from "zy-react-library/components/Table";
|
||||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { NS_BRANCH_PERSONNEL_AND_VEHICLES } from "~/enumerate/namespace";
|
import { NS_STOCK_PERSONNEL_AND_VEHICLES } from "~/enumerate/namespace";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const query = useGetUrlQuery();
|
const query = useGetUrlQuery();
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
const { tableProps, getData } = useTable(props["branchPersonnelAndVehiclesPersonnelAndVehicleList"], {
|
const { tableProps, getData } = useTable(props["stockPersonnelAndVehiclesList"], {
|
||||||
form,
|
form,
|
||||||
params: { id: query.id },
|
params: { corpId: query.id },
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -22,19 +22,19 @@ function List(props) {
|
||||||
form={form}
|
form={form}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
options={[
|
options={[
|
||||||
{ name: "todo1", label: "姓名" },
|
{ name: "name", label: "姓名" },
|
||||||
{ name: "todo2", label: "进出港时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
|
{ name: "todo2", label: "进出港时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
<Table
|
<Table
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "部门", dataIndex: "todo1" },
|
{ title: "部门", dataIndex: "userName" },
|
||||||
{ title: "姓名", dataIndex: "todo2" },
|
{ title: "姓名", dataIndex: "departmentName" },
|
||||||
{ title: "岗位", dataIndex: "todo3" },
|
{ title: "岗位", dataIndex: "postName" },
|
||||||
{ title: "手机号", dataIndex: "todo4" },
|
{ title: "手机号", dataIndex: "userPhone" },
|
||||||
{ title: "证件号码", dataIndex: "todo5" },
|
{ title: "证件号码", dataIndex: "userCard" },
|
||||||
{ title: "人员编号", dataIndex: "todo6" },
|
{ title: "人员编号", dataIndex: "todo6" },
|
||||||
{ title: "车辆数", dataIndex: "todo7" },
|
{ title: "车辆数", dataIndex: "vehicleCount" },
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
|
|
@ -67,4 +67,4 @@ function List(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_BRANCH_PERSONNEL_AND_VEHICLES], true)(List);
|
export default Connect([NS_STOCK_PERSONNEL_AND_VEHICLES], true)(List);
|
||||||
|
|
|
||||||
|
|
@ -8,14 +8,14 @@ import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { CURRENT_IN_PORT_STATUS_ENUM } from "~/enumerate/constant";
|
import { CURRENT_IN_PORT_STATUS_ENUM } from "~/enumerate/constant";
|
||||||
import { NS_BRANCH_PERSONNEL_AND_VEHICLES } from "~/enumerate/namespace";
|
import { NS_VEHICLE_APPLY } from "~/enumerate/namespace";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const query = useGetUrlQuery();
|
const query = useGetUrlQuery();
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
const { tableProps, getData } = useTable(props["branchPersonnelAndVehiclesVehicleManagementList"], {
|
const { tableProps, getData } = useTable(props["vehicleApplyList"], {
|
||||||
form,
|
form,
|
||||||
params: { id: query.id },
|
params: { employeeVehicleUserId: query.id, vehicleBelongType: 3 },
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -24,27 +24,31 @@ function List(props) {
|
||||||
form={form}
|
form={form}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
options={[
|
options={[
|
||||||
{ name: "todo1", label: "车牌号" },
|
{ name: "licenceNo", label: "车牌号" },
|
||||||
{
|
{
|
||||||
name: "todo2",
|
name: "todo2",
|
||||||
label: "当前在港状态",
|
label: "当前在港状态",
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
items: CURRENT_IN_PORT_STATUS_ENUM,
|
items: CURRENT_IN_PORT_STATUS_ENUM,
|
||||||
},
|
},
|
||||||
{ name: "todo3", label: "访问港区范围", render: (<DictionarySelect dictValue="HG_AUTH_AREA" />) },
|
{ name: "gateLevelAuthArea", label: "访问港区范围", render: (<DictionarySelect dictValue="HG_AUTH_AREA" />) },
|
||||||
{ name: "todo4", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
{ name: "visitStartTime", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||||
{ name: "todo5", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
{ name: "visitEndTime", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
<Table
|
<Table
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "车辆归属人", dataIndex: "todo1" },
|
{ title: "车辆归属人", dataIndex: "employeeVehicleUserName" },
|
||||||
{ title: "车牌号", dataIndex: "todo2" },
|
{ title: "车牌号", dataIndex: "licenceNo" },
|
||||||
{ title: "车牌类型", dataIndex: "todo3" },
|
{ title: "车牌类型", dataIndex: "licenceTypeName" },
|
||||||
{ title: "车辆类型", dataIndex: "todo4" },
|
{ title: "车辆类型", dataIndex: "vehicleTypeName" },
|
||||||
{ title: "访问港区范围", dataIndex: "todo5" },
|
{
|
||||||
{ title: "访问起始时间", dataIndex: "todo6" },
|
title: "访问港区范围",
|
||||||
{ title: "访问结束时间", dataIndex: "todo7" },
|
dataIndex: "gateLevelAuthArea",
|
||||||
|
render: (_, record) => record.gateLevelAuthArea && JSON.parse(record.gateLevelAuthArea).area.map(item => item.value).join("、"),
|
||||||
|
},
|
||||||
|
{ title: "访问起始时间", dataIndex: "visitStartTime" },
|
||||||
|
{ title: "访问结束时间", dataIndex: "visitEndTime" },
|
||||||
{ title: "当前在港状态", dataIndex: "todo8" },
|
{ title: "当前在港状态", dataIndex: "todo8" },
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
|
|
@ -86,4 +90,4 @@ function List(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_BRANCH_PERSONNEL_AND_VEHICLES], true)(List);
|
export default Connect([NS_VEHICLE_APPLY], true)(List);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import ViewPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/StockPersonnelAndVehicles/VehicleManagement/View";
|
import ViewPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/StockPersonnelAndVehicles/VehicleManagement/View";
|
||||||
|
|
||||||
function View(props) {
|
function View(props) {
|
||||||
return (<ViewPage {...props} />);
|
return (<ViewPage vehicleBelongType={1} {...props} />);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default View;
|
export default View;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import ListPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/StockVehicles/List";
|
||||||
|
|
||||||
|
function List(props) {
|
||||||
|
return <ListPage type="view" {...props} />;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default List;
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import VehicleRecordsPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/StockVehicles/VehicleRecords";
|
||||||
|
|
||||||
|
function VehicleRecords(props) {
|
||||||
|
return <VehicleRecordsPage {...props} />;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default VehicleRecords;
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import ViewPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/StockVehicles/View";
|
||||||
|
|
||||||
|
function View(props) {
|
||||||
|
return <ViewPage {...props} />;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default View;
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
function UnitVehicle(props) {
|
||||||
|
return props.children;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default UnitVehicle;
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button, Descriptions, Divider, message, Modal, Space } from "antd";
|
import { Button, Descriptions, Divider, message, Modal, Space } from "antd";
|
||||||
import { useEffect, useState } from "react";
|
import { useState } from "react";
|
||||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
|
|
@ -10,16 +10,17 @@ import Table from "zy-react-library/components/Table";
|
||||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { LICENSE_PLATE_NUMBER } from "zy-react-library/regular";
|
import { LICENSE_PLATE_NUMBER } from "zy-react-library/regular";
|
||||||
import { NS_INSPECT_DEPARTMENT_VEHICLES } from "~/enumerate/namespace";
|
import { NS_VEHICLE_APPLY } from "~/enumerate/namespace";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [currentId, setCurrentId] = useState("");
|
const [currentInfo, setCurrentInfo] = useState("");
|
||||||
const [addModalVisible, setAddModalVisible] = useState(false);
|
const [addModalVisible, setAddModalVisible] = useState(false);
|
||||||
const [viewModalVisible, setViewModalVisible] = useState(false);
|
const [viewModalVisible, setViewModalVisible] = useState(false);
|
||||||
|
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
const { tableProps, getData } = useTable(props["inspectDepartmentVehiclesList"], {
|
const { tableProps, getData } = useTable(props["vehicleApplyList"], {
|
||||||
form,
|
form,
|
||||||
|
params: { vehicleBelongType: 7 },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (id) => {
|
const onDelete = (id) => {
|
||||||
|
|
@ -27,7 +28,7 @@ function List(props) {
|
||||||
title: "删除确认",
|
title: "删除确认",
|
||||||
content: "确定要删除吗?",
|
content: "确定要删除吗?",
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
const { success } = await props["inspectDepartmentVehiclesDelete"]({ id });
|
const { success } = await props["vehicleApplyDelete"]({ id });
|
||||||
if (success) {
|
if (success) {
|
||||||
message.success("删除成功");
|
message.success("删除成功");
|
||||||
getData();
|
getData();
|
||||||
|
|
@ -40,8 +41,8 @@ function List(props) {
|
||||||
<Page isShowAllAction={false}>
|
<Page isShowAllAction={false}>
|
||||||
<Search
|
<Search
|
||||||
options={[
|
options={[
|
||||||
{ name: "todo1", label: "名称" },
|
{ name: "remarks", label: "名称" },
|
||||||
{ name: "todo2", label: "车牌号" },
|
{ name: "licenceNo", label: "车牌号" },
|
||||||
]}
|
]}
|
||||||
form={form}
|
form={form}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
|
|
@ -61,13 +62,13 @@ function List(props) {
|
||||||
</Space>
|
</Space>
|
||||||
)}
|
)}
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "名称", dataIndex: "todo1" },
|
{ title: "名称", dataIndex: "remarks" },
|
||||||
{ title: "车牌号", dataIndex: "todo2" },
|
{ title: "车牌号", dataIndex: "licenceNo" },
|
||||||
{ title: "车牌类型", dataIndex: "todo3" },
|
{ title: "车牌类型", dataIndex: "licenceTypeName" },
|
||||||
{ title: "车辆类型", dataIndex: "todo4" },
|
{ title: "车辆类型", dataIndex: "vehicleTypeName" },
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
width: 200,
|
width: 250,
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
|
|
@ -75,7 +76,7 @@ function List(props) {
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setViewModalVisible(true);
|
setViewModalVisible(true);
|
||||||
setCurrentId(record.id);
|
setCurrentInfo(record);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
|
|
@ -84,7 +85,7 @@ function List(props) {
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setAddModalVisible(true);
|
setAddModalVisible(true);
|
||||||
setCurrentId(record.id);
|
setCurrentInfo(record);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
|
|
@ -115,11 +116,11 @@ function List(props) {
|
||||||
{
|
{
|
||||||
addModalVisible && (
|
addModalVisible && (
|
||||||
<AddModal
|
<AddModal
|
||||||
id={currentId}
|
info={currentInfo}
|
||||||
getData={getData}
|
getData={getData}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
setAddModalVisible(false);
|
setAddModalVisible(false);
|
||||||
setCurrentId("");
|
setCurrentInfo({});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
@ -127,10 +128,10 @@ function List(props) {
|
||||||
{
|
{
|
||||||
viewModalVisible && (
|
viewModalVisible && (
|
||||||
<ViewModal
|
<ViewModal
|
||||||
id={currentId}
|
info={currentInfo}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
setViewModalVisible(false);
|
setViewModalVisible(false);
|
||||||
setCurrentId("");
|
setCurrentInfo({});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
@ -140,23 +141,29 @@ function List(props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const AddModalComponent = (props) => {
|
const AddModalComponent = (props) => {
|
||||||
|
const { info } = props;
|
||||||
|
const isEdit = !!info.id;
|
||||||
const [form] = FormBuilder.useForm();
|
const [form] = FormBuilder.useForm();
|
||||||
|
|
||||||
const getData = async () => {
|
|
||||||
const { data } = await props["inspectDepartmentVehiclesInfo"]({ id: props.id });
|
|
||||||
form.setFieldsValue(data);
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
props.id && getData();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const onSubmit = async (values) => {
|
const onSubmit = async (values) => {
|
||||||
const { success } = await props[!props.id ? "inspectDepartmentVehiclesAdd" : "inspectDepartmentVehiclesUpdate"]({
|
let outsideSuccess = false;
|
||||||
id: props.id,
|
if (!isEdit) {
|
||||||
|
const { success } = await props["inspectDepartmentVehiclesAdd"]({
|
||||||
...values,
|
...values,
|
||||||
|
vehicleBelongType: 7,
|
||||||
});
|
});
|
||||||
if (success) {
|
outsideSuccess = success;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
const { success } = await props["inspectDepartmentVehiclesUpdate"]({
|
||||||
|
id: info.id,
|
||||||
|
...values,
|
||||||
|
...values.inspectCarList[0],
|
||||||
|
vehicleBelongType: 7,
|
||||||
|
});
|
||||||
|
outsideSuccess = success;
|
||||||
|
}
|
||||||
|
if (outsideSuccess) {
|
||||||
message.success("保存成功");
|
message.success("保存成功");
|
||||||
props.getData();
|
props.getData();
|
||||||
props.onCancel();
|
props.onCancel();
|
||||||
|
|
@ -166,33 +173,74 @@ const AddModalComponent = (props) => {
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
open
|
open
|
||||||
title={props.id ? "编辑" : "新增"}
|
title={isEdit ? "编辑" : "新增"}
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
width={600}
|
width={600}
|
||||||
onCancel={props.onCancel}
|
onCancel={props.onCancel}
|
||||||
onOk={form.submit}
|
onOk={form.submit}
|
||||||
confirmLoading={props.inspectDepartmentVehicles.inspectDepartmentVehiclesLoading}
|
confirmLoading={props.vehicleApply.vehicleApplyLoading}
|
||||||
>
|
>
|
||||||
<FormBuilder
|
<FormBuilder
|
||||||
form={form}
|
form={form}
|
||||||
loading={props.inspectDepartmentVehicles.inspectDepartmentVehiclesLoading}
|
loading={props.vehicleApply.vehicleApplyLoading}
|
||||||
showActionButtons={false}
|
showActionButtons={false}
|
||||||
onFinish={onSubmit}
|
onFinish={onSubmit}
|
||||||
span={24}
|
span={24}
|
||||||
labelCol={{ span: 10 }}
|
labelCol={{ span: 10 }}
|
||||||
values={{
|
values={{
|
||||||
todo2: [{}],
|
remarks: info.remarks,
|
||||||
|
inspectCarList: [{
|
||||||
|
licenceType: info.licenceType,
|
||||||
|
licenceTypeName: info.licenceTypeName,
|
||||||
|
licenceNo: info.licenceNo,
|
||||||
|
vehicleType: info.vehicleType,
|
||||||
|
vehicleTypeName: info.vehicleTypeName,
|
||||||
|
}],
|
||||||
}}
|
}}
|
||||||
options={[
|
options={[
|
||||||
{ name: "todo1", label: "名称" },
|
{ name: "remarks", label: "名称" },
|
||||||
{ label: "车辆信息", render: FORM_ITEM_RENDER_ENUM.DIVIDER },
|
{ label: "车辆信息", render: FORM_ITEM_RENDER_ENUM.DIVIDER },
|
||||||
{ name: "todo2", render: FORM_ITEM_RENDER_ENUM.FORM_LIST, formListUniqueProps: {
|
{
|
||||||
|
name: "inspectCarList",
|
||||||
|
render: FORM_ITEM_RENDER_ENUM.FORM_LIST,
|
||||||
|
formListUniqueProps: {
|
||||||
|
showAddButton: !isEdit,
|
||||||
|
showRemoveButton: !isEdit,
|
||||||
options: field => ([
|
options: field => ([
|
||||||
{ name: [field, "todo1"], label: "车牌类型", render: (<DictionarySelect dictValue="LICENSE_PLATE_TYPE" />) },
|
{
|
||||||
{ name: [field, "todo2"], label: "车牌号", rules: [{ pattern: LICENSE_PLATE_NUMBER, message: "请输入正确的车牌号" }] },
|
name: [field.name, "licenceType"],
|
||||||
{ name: [field, "todo3"], label: "车辆类型", render: (<DictionarySelect dictValue="VEHICLE_TYPE" />) },
|
label: "车牌类型",
|
||||||
|
render: (
|
||||||
|
<DictionarySelect
|
||||||
|
dictValue="LICENSE_PLATE_TYPE"
|
||||||
|
onGetLabel={(label) => {
|
||||||
|
form.setFieldValue(["inspectCarList", field.name, "licenceTypeName"], label);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{ name: [field.name, "licenceTypeName"], label: "车牌类型名称", onlyForLabel: true },
|
||||||
|
{
|
||||||
|
name: [field.name, "licenceNo"],
|
||||||
|
label: "车牌号",
|
||||||
|
rules: [{ pattern: LICENSE_PLATE_NUMBER, message: "请输入正确的车牌号" }],
|
||||||
|
},
|
||||||
|
{ name: [field.name, "vehicleTypeName"], label: "车辆类型名称", onlyForLabel: true },
|
||||||
|
{
|
||||||
|
name: [field.name, "vehicleType"],
|
||||||
|
label: "车辆类型",
|
||||||
|
render: (
|
||||||
|
<DictionarySelect
|
||||||
|
dictValue="VEHICLE_TYPE"
|
||||||
|
onGetLabel={(label) => {
|
||||||
|
form.setFieldValue(["inspectCarList", field.name, "vehicleTypeName"], label);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
},
|
||||||
]),
|
]),
|
||||||
} },
|
},
|
||||||
|
},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
@ -200,16 +248,7 @@ const AddModalComponent = (props) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const ViewModalComponent = (props) => {
|
const ViewModalComponent = (props) => {
|
||||||
const [info, setInfo] = useState({});
|
const { info } = props;
|
||||||
|
|
||||||
const getData = async () => {
|
|
||||||
const { data } = await props["inspectDepartmentVehiclesInfo"]({ id: props.id });
|
|
||||||
setInfo(data);
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
props.id && getData();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
|
|
@ -221,37 +260,32 @@ const ViewModalComponent = (props) => {
|
||||||
footer={[
|
footer={[
|
||||||
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
|
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
|
||||||
]}
|
]}
|
||||||
loading={props.inspectDepartmentVehicles.inspectDepartmentVehiclesLoading}
|
loading={props.vehicleApply.vehicleApplyLoading}
|
||||||
>
|
>
|
||||||
<Descriptions
|
<Descriptions
|
||||||
bordered
|
bordered
|
||||||
column={1}
|
column={1}
|
||||||
styles={{ label: { width: 200 } }}
|
styles={{ label: { width: 200 } }}
|
||||||
items={[
|
items={[
|
||||||
{ label: "名称", children: info.todo1 },
|
{ label: "名称", children: info.remarks },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
<Divider orientation="left">车辆信息</Divider>
|
<Divider orientation="left">车辆信息</Divider>
|
||||||
{
|
|
||||||
info.todo2.map((item, index) => (
|
|
||||||
<Descriptions
|
<Descriptions
|
||||||
key={index}
|
|
||||||
bordered
|
bordered
|
||||||
column={1}
|
column={1}
|
||||||
styles={{ label: { width: 200 } }}
|
styles={{ label: { width: 200 } }}
|
||||||
items={[
|
items={[
|
||||||
{ label: "车牌类型", children: item.todo1 },
|
{ label: "车牌类型", children: info.licenceTypeName },
|
||||||
{ label: "车牌号", children: item.todo2 },
|
{ label: "车牌号", children: info.licenceNo },
|
||||||
{ label: "车辆类型", children: item.todo3 },
|
{ label: "车辆类型", children: info.vehicleTypeName },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
))
|
|
||||||
}
|
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const AddModal = Connect([NS_INSPECT_DEPARTMENT_VEHICLES], true)(AddModalComponent);
|
const AddModal = Connect([NS_VEHICLE_APPLY], true)(AddModalComponent);
|
||||||
const ViewModal = Connect([NS_INSPECT_DEPARTMENT_VEHICLES], true)(ViewModalComponent);
|
const ViewModal = Connect([NS_VEHICLE_APPLY], true)(ViewModalComponent);
|
||||||
|
|
||||||
export default Connect([NS_INSPECT_DEPARTMENT_VEHICLES], true)(List);
|
export default Connect([NS_VEHICLE_APPLY], true)(List);
|
||||||
|
|
|
||||||
|
|
@ -4,28 +4,29 @@ import Page from "zy-react-library/components/Page";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { NS_PORT_BASED_UNITS_PERSONNEL_AND_VEHICLES } from "~/enumerate/namespace";
|
import { NS_BRANCH_PERSONNEL_AND_VEHICLES } from "~/enumerate/namespace";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
const { tableProps, getData } = useTable(props["portBasedUnitsPersonnelAndVehiclesList"], {
|
const { tableProps, getData } = useTable(props["branchPersonnelAndVehiclesList"], {
|
||||||
form,
|
form,
|
||||||
|
params: { corpType: 2 },
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page isShowAllAction={false}>
|
<Page isShowAllAction={false}>
|
||||||
<Search
|
<Search
|
||||||
options={[
|
options={[
|
||||||
{ name: "todo1", label: "驻港单位名称" },
|
{ name: "corpName", label: "驻港单位名称" },
|
||||||
]}
|
]}
|
||||||
form={form}
|
form={form}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
/>
|
/>
|
||||||
<Table
|
<Table
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "驻港单位名称", dataIndex: "todo1" },
|
{ title: "驻港单位名称", dataIndex: "corpName" },
|
||||||
{ title: "人员进出数", dataIndex: "todo2" },
|
{ title: "人员进出数", dataIndex: "userCount" },
|
||||||
{ title: "人员车辆进出数", dataIndex: "todo3" },
|
{ title: "人员车辆进出数", dataIndex: "priCarCount" },
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
width: 150,
|
width: 150,
|
||||||
|
|
@ -34,7 +35,7 @@ function List(props) {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push(`./personnelAndVehicle/list?id=${record.id}`);
|
props.history.push(`./personnelAndVehicle/list?id=${record.corpId}`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
人员及车辆详情
|
人员及车辆详情
|
||||||
|
|
@ -48,4 +49,4 @@ function List(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_PORT_BASED_UNITS_PERSONNEL_AND_VEHICLES], true)(List);
|
export default Connect([NS_BRANCH_PERSONNEL_AND_VEHICLES], true)(List);
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import Table from "zy-react-library/components/Table";
|
||||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { NS_PORT_BASED_UNITS_PERSONNEL_AND_VEHICLES } from "~/enumerate/namespace";
|
import { NS_STOCK_PERSONNEL_AND_VEHICLES } from "~/enumerate/namespace";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const query = useGetUrlQuery();
|
const query = useGetUrlQuery();
|
||||||
|
|
@ -28,9 +28,9 @@ function List(props) {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["portBasedUnitsPersonnelAndVehiclesPersonnelAndVehicleList"], {
|
const { tableProps, getData } = useTable(props["stockPersonnelAndVehiclesList"], {
|
||||||
form,
|
form,
|
||||||
params: () => ({ departmentId: urlState.departmentId, id: query.id }),
|
params: () => ({ departmentId: urlState.departmentId, corpId: query.id }),
|
||||||
manual: true,
|
manual: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -66,7 +66,7 @@ function List(props) {
|
||||||
<div style={{ width: "calc(100% - 300px - 50px)" }}>
|
<div style={{ width: "calc(100% - 300px - 50px)" }}>
|
||||||
<Search
|
<Search
|
||||||
options={[
|
options={[
|
||||||
{ name: "todo1", label: "姓名" },
|
{ name: "name", label: "姓名" },
|
||||||
{ name: "todo2", label: "进出港时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
|
{ name: "todo2", label: "进出港时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
|
||||||
]}
|
]}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
|
|
@ -93,11 +93,11 @@ function List(props) {
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "部门", dataIndex: "todo1" },
|
{ title: "部门", dataIndex: "departmentName" },
|
||||||
{ title: "姓名", dataIndex: "todo2" },
|
{ title: "姓名", dataIndex: "userName" },
|
||||||
{ title: "岗位", dataIndex: "todo3" },
|
{ title: "岗位", dataIndex: "postName" },
|
||||||
{ title: "手机号", dataIndex: "todo4" },
|
{ title: "手机号", dataIndex: "userPhone" },
|
||||||
{ title: "车辆数", dataIndex: "todo5" },
|
{ title: "车辆数", dataIndex: "vehicleCount" },
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
width: 200,
|
width: 200,
|
||||||
|
|
@ -132,4 +132,4 @@ function List(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_PORT_BASED_UNITS_PERSONNEL_AND_VEHICLES], true)(List);
|
export default Connect([NS_STOCK_PERSONNEL_AND_VEHICLES], true)(List);
|
||||||
|
|
|
||||||
|
|
@ -17,16 +17,16 @@ function List(props) {
|
||||||
<Search
|
<Search
|
||||||
labelCol={{ span: 4 }}
|
labelCol={{ span: 4 }}
|
||||||
options={[
|
options={[
|
||||||
{ name: "todo1", label: "姓名" },
|
{ name: "name", label: "姓名" },
|
||||||
{ name: "todo2", label: "项目名称" },
|
{ name: "projectName", label: "项目名称" },
|
||||||
]}
|
]}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
form={form}
|
form={form}
|
||||||
/>
|
/>
|
||||||
<Table
|
<Table
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "相关方名称", dataIndex: "todo1" },
|
{ title: "相关方名称", dataIndex: "applyCorpName" },
|
||||||
{ title: "项目数", dataIndex: "todo2" },
|
{ title: "项目数", dataIndex: "projectCount" },
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
width: 200,
|
width: 200,
|
||||||
|
|
@ -36,7 +36,7 @@ function List(props) {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push(`./personnel/list?id=${record.id}`);
|
props.history.push(`./personnel/list?id=${record.applyCorpId}`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
人员列表
|
人员列表
|
||||||
|
|
@ -44,7 +44,7 @@ function List(props) {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push(`./vehicle/list?id=${record.id}`);
|
props.history.push(`./vehicle/list?id=${record.applyCorpId}`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
车辆列表
|
车辆列表
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import Table from "zy-react-library/components/Table";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
import { NS_STAKEHOLDER_PERSONNEL_AND_VEHICLES } from "~/enumerate/namespace";
|
import { NS_STAKEHOLDER_PERSONNEL_AND_VEHICLES, NS_STOCK_PERSONNEL_AND_VEHICLES } from "~/enumerate/namespace";
|
||||||
|
|
||||||
const STATUS_ENUM = [
|
const STATUS_ENUM = [
|
||||||
{ bianme: "1", name: "开启" },
|
{ bianme: "1", name: "开启" },
|
||||||
|
|
@ -16,16 +16,17 @@ const STATUS_ENUM = [
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const query = useGetUrlQuery();
|
const query = useGetUrlQuery();
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
const { tableProps, getData } = useTable(props["stakeholderPersonnelAndVehiclesPersonnelList"], {
|
const { tableProps, getData } = useTable(props["stockPersonnelAndVehiclesList"], {
|
||||||
form,
|
form,
|
||||||
params: { id: query.query },
|
params: { corpId: query.query, personBelongType: 3 },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onUpdateStatus = (record) => {
|
const onUpdateStatus = (record) => {
|
||||||
const message = record.todo7 === 1 ? "关闭" : "开启";
|
const { userId, corpinfoId, corpName, departmentId, departmentName, userName, userFaceUrl, userPhone, userCard } = props.info;
|
||||||
|
const message = record.mkmjPermission === 1 ? "关闭" : "开启";
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: `${message}口门权限`,
|
title: `${message}口门权限`,
|
||||||
content: record.todo7 === 1
|
content: record.mkmjPermission === 1
|
||||||
? (
|
? (
|
||||||
<>
|
<>
|
||||||
<div>该人员涉及其他单位项目,是否关闭本单位涉及项目的口门权限?</div>
|
<div>该人员涉及其他单位项目,是否关闭本单位涉及项目的口门权限?</div>
|
||||||
|
|
@ -34,7 +35,19 @@ function List(props) {
|
||||||
)
|
)
|
||||||
: "该人员涉及其他单位项目,是否开启本单位涉及项目的口门权限?",
|
: "该人员涉及其他单位项目,是否开启本单位涉及项目的口门权限?",
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
const { success } = await props["stakeholderPersonnelAndVehiclesPersonnelUpdateStatus"]({ id: record.id });
|
const { success } = await props["stockPersonnelAndVehiclesAuthorization"]({
|
||||||
|
mkmjPermission: record.mkmjPermission === 1 ? 2 : 1,
|
||||||
|
personBelongType: 3,
|
||||||
|
userId,
|
||||||
|
corpinfoId,
|
||||||
|
corpName,
|
||||||
|
departmentId,
|
||||||
|
departmentName,
|
||||||
|
userName,
|
||||||
|
userFaceUrl,
|
||||||
|
userPhone,
|
||||||
|
userCard,
|
||||||
|
});
|
||||||
if (success) {
|
if (success) {
|
||||||
message.success(`${message}成功`);
|
message.success(`${message}成功`);
|
||||||
getData();
|
getData();
|
||||||
|
|
@ -48,23 +61,27 @@ function List(props) {
|
||||||
<Search
|
<Search
|
||||||
labelCol={{ span: 4 }}
|
labelCol={{ span: 4 }}
|
||||||
options={[
|
options={[
|
||||||
{ name: "todo1", label: "姓名" },
|
{ name: "name", label: "姓名" },
|
||||||
{ name: "todo2", label: "项目名称" },
|
{ name: "projectName", label: "项目名称" },
|
||||||
]}
|
]}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
form={form}
|
form={form}
|
||||||
/>
|
/>
|
||||||
<Table
|
<Table
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "项目名称", dataIndex: "todo1" },
|
{ title: "项目名称", dataIndex: "projectName" },
|
||||||
{ title: "姓名", dataIndex: "todo2" },
|
{ title: "姓名", dataIndex: "userName" },
|
||||||
{ title: "部门", dataIndex: "todo3" },
|
{ title: "部门", dataIndex: "departmentName" },
|
||||||
{ title: "手机号", dataIndex: "todo4" },
|
{ title: "手机号", dataIndex: "userPhone" },
|
||||||
{ title: "时间范围", dataIndex: "todo5", render: (_, record) => `${record.todo5}-${record.todo6}` },
|
{
|
||||||
|
title: "时间范围",
|
||||||
|
dataIndex: "visitStartTime",
|
||||||
|
render: (_, record) => `${record.visitStartTime}-${record.visitEndTime}`,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "口门权限",
|
title: "口门权限",
|
||||||
dataIndex: "todo7",
|
dataIndex: "mkmjPermission",
|
||||||
render: (_, record) => getLabelName({ list: STATUS_ENUM, status: record.todo7 }),
|
render: (_, record) => getLabelName({ list: STATUS_ENUM, status: record.mkmjPermission }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
|
|
@ -78,7 +95,7 @@ function List(props) {
|
||||||
onUpdateStatus(record);
|
onUpdateStatus(record);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{record.todo7 === 1 ? "关闭" : "开启"}
|
{record.mkmjPermission === 1 ? "关闭" : "开启"}
|
||||||
口门权限
|
口门权限
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -99,4 +116,4 @@ function List(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_STAKEHOLDER_PERSONNEL_AND_VEHICLES], true)(List);
|
export default Connect([NS_STAKEHOLDER_PERSONNEL_AND_VEHICLES, NS_STOCK_PERSONNEL_AND_VEHICLES], true)(List);
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button, Modal, Space } from "antd";
|
import { Button, Space } from "antd";
|
||||||
import Page from "zy-react-library/components/Page";
|
import Page from "zy-react-library/components/Page";
|
||||||
import Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
import { NS_STAKEHOLDER_PERSONNEL_AND_VEHICLES } from "~/enumerate/namespace";
|
import { NS_VEHICLE_APPLY } from "~/enumerate/namespace";
|
||||||
|
|
||||||
const STATUS_ENUM = [
|
const STATUS_ENUM = [
|
||||||
{ bianme: "1", name: "开启" },
|
{ bianme: "1", name: "开启" },
|
||||||
|
|
@ -16,55 +16,32 @@ const STATUS_ENUM = [
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const query = useGetUrlQuery();
|
const query = useGetUrlQuery();
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
const { tableProps, getData } = useTable(props["stakeholderPersonnelAndVehiclesVehicleList"], {
|
const { tableProps, getData } = useTable(props["vehicleApplyList"], {
|
||||||
form,
|
form,
|
||||||
params: { id: query.id },
|
params: { vehicleCorpId: query.id, vehicleBelongType: 5 },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onUpdateStatus = (record) => {
|
|
||||||
const message = record.todo7 === 1 ? "关闭" : "开启";
|
|
||||||
Modal.confirm({
|
|
||||||
title: `${message}口门权限`,
|
|
||||||
content: record.todo7 === 1
|
|
||||||
? (
|
|
||||||
<>
|
|
||||||
<div>该车辆涉及其他单位项目,是否关闭本单位涉及项目的口门权限?</div>
|
|
||||||
<div style={{ color: "red" }}>若该车辆在其他单位的项目中保持口门进出权限,则仍可进入港区。</div>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
: "该车辆涉及其他单位项目,是否开启本单位涉及项目的口门权限?",
|
|
||||||
onOk: async () => {
|
|
||||||
const { success } = await props["stakeholderPersonnelAndVehiclesVehicleUpdateStatus"]({ id: record.id });
|
|
||||||
if (success) {
|
|
||||||
message.success(`${message}成功`);
|
|
||||||
getData();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page headerTitle="车辆列表">
|
<Page headerTitle="车辆列表">
|
||||||
<Search
|
<Search
|
||||||
labelCol={{ span: 4 }}
|
labelCol={{ span: 4 }}
|
||||||
options={[
|
options={[
|
||||||
{ name: "todo1", label: "车牌号" },
|
{ name: "licenceNo", label: "车牌号" },
|
||||||
]}
|
]}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
form={form}
|
form={form}
|
||||||
/>
|
/>
|
||||||
<Table
|
<Table
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "车辆类型", dataIndex: "todo1" },
|
{ title: "车辆类型", dataIndex: "vehicleBelongType" },
|
||||||
{ title: "车牌类型", dataIndex: "todo2" },
|
{ title: "车牌类型", dataIndex: "licenceTypeName" },
|
||||||
{ title: "车牌号", dataIndex: "todo3" },
|
{ title: "车牌号", dataIndex: "licenceNo" },
|
||||||
{ title: "驾驶人姓名", dataIndex: "todo4" },
|
{ title: "驾驶人姓名", dataIndex: "employeeVehicleUserName" },
|
||||||
{ title: "驾驶人手机号", dataIndex: "todo5" },
|
{ title: "驾驶人手机号", dataIndex: "todo5" },
|
||||||
{ title: "包含项目数", dataIndex: "todo6" },
|
|
||||||
{
|
{
|
||||||
title: "口门权限",
|
title: "口门权限",
|
||||||
dataIndex: "todo7",
|
dataIndex: "mkmjPermission",
|
||||||
render: (_, record) => getLabelName({ list: STATUS_ENUM, status: record.todo7 }),
|
render: (_, record) => getLabelName({ list: STATUS_ENUM, status: record.mkmjPermission }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
|
|
@ -72,15 +49,6 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
onUpdateStatus(record);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{record.todo7 === 1 ? "关闭" : "开启"}
|
|
||||||
口门权限
|
|
||||||
</Button>
|
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -99,4 +67,4 @@ function List(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_STAKEHOLDER_PERSONNEL_AND_VEHICLES], true)(List);
|
export default Connect([NS_VEHICLE_APPLY], true)(List);
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import Search from "zy-react-library/components/Search";
|
||||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||||
import Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
import { NS_VEHICLE_APPLY } from "~/enumerate/namespace";
|
import { NS_VEHICLE_APPLY } from "~/enumerate/namespace";
|
||||||
|
|
@ -21,6 +22,7 @@ const APPROVAL_STATUS_ENUM = [
|
||||||
];
|
];
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
|
const query = useGetUrlQuery();
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
const [urlState, setUrlState] = useUrlState({
|
const [urlState, setUrlState] = useUrlState({
|
||||||
departmentId: "",
|
departmentId: "",
|
||||||
|
|
@ -37,7 +39,7 @@ function List(props) {
|
||||||
|
|
||||||
const { tableProps, getData } = useTable(props["vehicleApplyList"], {
|
const { tableProps, getData } = useTable(props["vehicleApplyList"], {
|
||||||
form,
|
form,
|
||||||
params: () => ({ departmentId: urlState.departmentId, vehicleBelongType: 2 }),
|
params: () => ({ departmentId: urlState.departmentId, vehicleBelongType: 2, corpId: query.id }),
|
||||||
manual: true,
|
manual: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -88,6 +90,7 @@ function List(props) {
|
||||||
<Table
|
<Table
|
||||||
toolBarRender={() => (
|
toolBarRender={() => (
|
||||||
<Space>
|
<Space>
|
||||||
|
{props.type !== "view" && (
|
||||||
<Button
|
<Button
|
||||||
icon={<AddIcon />}
|
icon={<AddIcon />}
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|
@ -97,6 +100,7 @@ function List(props) {
|
||||||
>
|
>
|
||||||
新增
|
新增
|
||||||
</Button>
|
</Button>
|
||||||
|
)}
|
||||||
{
|
{
|
||||||
urlState.departmentId !== "" && (
|
urlState.departmentId !== "" && (
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -141,6 +145,7 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
|
{props.type !== "view" && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -149,6 +154,7 @@ function List(props) {
|
||||||
>
|
>
|
||||||
审核记录
|
审核记录
|
||||||
</Button>
|
</Button>
|
||||||
|
)}
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -158,7 +164,7 @@ function List(props) {
|
||||||
>
|
>
|
||||||
车辆进出记录
|
车辆进出记录
|
||||||
</Button>
|
</Button>
|
||||||
{record.auditFlag === 3 && (
|
{(props.type !== "view" && record.auditFlag === 3) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue