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