股份人员及车辆管理
parent
766d22f3ab
commit
ec90ba5831
|
|
@ -4,9 +4,9 @@
|
||||||
`/primeport/container/supervision/firstLevelDoor/approverUser`
|
`/primeport/container/supervision/firstLevelDoor/approverUser`
|
||||||
- 基本信息管理/一级口门信息管理 ##
|
- 基本信息管理/一级口门信息管理 ##
|
||||||
`/primeport/container/supervision/firstLevelDoor/basicInfo/firstLevelDoorInfo/list`
|
`/primeport/container/supervision/firstLevelDoor/basicInfo/firstLevelDoorInfo/list`
|
||||||
- 进港审批管理/人员审批管理/相关方人员进港审批
|
- 进港审批管理/人员审批管理/相关方人员进港审批 #
|
||||||
`/primeport/container/supervision/firstLevelDoor/portEntryApproval/personnelApproval/relatedPersonnel`
|
`/primeport/container/supervision/firstLevelDoor/portEntryApproval/personnelApproval/relatedPersonnel`
|
||||||
- 进港审批管理/人员审批管理/相关方人员进港审批记录
|
- 进港审批管理/人员审批管理/相关方人员进港审批记录 #
|
||||||
`/primeport/container/supervision/firstLevelDoor/portEntryApproval/personnelApproval/relatedPersonnelRecords`
|
`/primeport/container/supervision/firstLevelDoor/portEntryApproval/personnelApproval/relatedPersonnelRecords`
|
||||||
- 进港审批管理/长期车辆审批管理/股份车辆审批 ##
|
- 进港审批管理/长期车辆审批管理/股份车辆审批 ##
|
||||||
`/primeport/container/supervision/firstLevelDoor/portEntryApproval/longTermVehicleApproval/shareVehicles`
|
`/primeport/container/supervision/firstLevelDoor/portEntryApproval/longTermVehicleApproval/shareVehicles`
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
`/primeport/container/supervision/firstLevelDoor/portEntryApproval/temporaryVisitor/temporaryVehicle/list`
|
`/primeport/container/supervision/firstLevelDoor/portEntryApproval/temporaryVisitor/temporaryVehicle/list`
|
||||||
- 进港审批管理/临时访客管理/临时车辆管理记录 #
|
- 进港审批管理/临时访客管理/临时车辆管理记录 #
|
||||||
`/primeport/container/supervision/firstLevelDoor/portEntryApproval/temporaryVisitor/temporaryVehicleRecords/list`
|
`/primeport/container/supervision/firstLevelDoor/portEntryApproval/temporaryVisitor/temporaryVehicleRecords/list`
|
||||||
- 进出港信息管理/股份人员及车辆管理
|
- 进出港信息管理/股份人员及车辆管理 #
|
||||||
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/stockPersonnelAndVehicles/list`
|
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/stockPersonnelAndVehicles/list`
|
||||||
- 进出港信息管理/个人车辆管理 ##
|
- 进出港信息管理/个人车辆管理 ##
|
||||||
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/personalVehicle/list`
|
`/primeport/container/supervision/firstLevelDoor/importAndExportPortInfo/personalVehicle/list`
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,9 @@
|
||||||
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
|
||||||
export const relatedPersonnelList = declareRequest(
|
|
||||||
"relatedPersonnelLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
|
||||||
export const relatedPersonnelInfo = declareRequest(
|
|
||||||
"relatedPersonnelLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
|
||||||
export const relatedPersonnelPersonnelList = declareRequest(
|
export const relatedPersonnelPersonnelList = declareRequest(
|
||||||
"relatedPersonnelLoading",
|
"relatedPersonnelLoading",
|
||||||
`Post > @/primeport/`,
|
`Post > @/primeport/`,
|
||||||
);
|
);
|
||||||
export const relatedPersonnelRejectReason = declareRequest(
|
|
||||||
"relatedPersonnelLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
|
||||||
export const relatedPersonnelApproval = declareRequest(
|
export const relatedPersonnelApproval = declareRequest(
|
||||||
"relatedPersonnelLoading",
|
"relatedPersonnelLoading",
|
||||||
`Post > @/primeport/`,
|
`Post > @/primeport/`,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
|
||||||
export const stockPersonnelAndVehiclesList = declareRequest(
|
export const stockPersonnelAndVehiclesList = declareRequest(
|
||||||
"stockPersonnelAndVehiclesLoading",
|
"stockPersonnelAndVehiclesLoading",
|
||||||
`Post > @/primeport/`,
|
`Post > @/primeport/personApply/personnelVehicleManagementList`,
|
||||||
);
|
);
|
||||||
export const stockPersonnelAndVehiclesPersonnelRecordsList = declareRequest(
|
export const stockPersonnelAndVehiclesPersonnelRecordsList = declareRequest(
|
||||||
"stockPersonnelAndVehiclesLoading",
|
"stockPersonnelAndVehiclesLoading",
|
||||||
|
|
@ -10,31 +10,7 @@ export const stockPersonnelAndVehiclesPersonnelRecordsList = declareRequest(
|
||||||
);
|
);
|
||||||
export const stockPersonnelAndVehiclesAuthorization = declareRequest(
|
export const stockPersonnelAndVehiclesAuthorization = declareRequest(
|
||||||
"stockPersonnelAndVehiclesLoading",
|
"stockPersonnelAndVehiclesLoading",
|
||||||
`Post > @/primeport/`,
|
`Post > @/primeport/personApply/authorization`,
|
||||||
);
|
|
||||||
export const stockPersonnelAndVehiclesVehicleManagementList = declareRequest(
|
|
||||||
"stockPersonnelAndVehiclesLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
|
||||||
export const stockPersonnelAndVehiclesVehicleManagementDelete = declareRequest(
|
|
||||||
"stockPersonnelAndVehiclesLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
|
||||||
export const stockPersonnelAndVehiclesVehicleManagementUpdateStatus = declareRequest(
|
|
||||||
"stockPersonnelAndVehiclesLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
|
||||||
export const stockPersonnelAndVehiclesVehicleManagementInfo = declareRequest(
|
|
||||||
"stockPersonnelAndVehiclesLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
|
||||||
export const stockPersonnelAndVehiclesVehicleManagementAdd = declareRequest(
|
|
||||||
"stockPersonnelAndVehiclesLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
|
||||||
export const stockPersonnelAndVehiclesVehicleManagementUpdate = declareRequest(
|
|
||||||
"stockPersonnelAndVehiclesLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
);
|
||||||
export const stockPersonnelAndVehiclesVehicleManagementVehicleRecordsList = declareRequest(
|
export const stockPersonnelAndVehiclesVehicleManagementVehicleRecordsList = declareRequest(
|
||||||
"stockPersonnelAndVehiclesLoading",
|
"stockPersonnelAndVehiclesLoading",
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,3 @@ export const vehicleAuditApproval = declareRequest(
|
||||||
"vehicleAuditLoading",
|
"vehicleAuditLoading",
|
||||||
`Post > @/primeport/vehicleAudit/audit`,
|
`Post > @/primeport/vehicleAudit/audit`,
|
||||||
);
|
);
|
||||||
export const vehicleAuditRejectReason = declareRequest(
|
|
||||||
"vehicleAuditLoading",
|
|
||||||
`Post > @/primeport/`,
|
|
||||||
);
|
|
||||||
|
|
|
||||||
|
|
@ -104,8 +104,8 @@ function Add(props) {
|
||||||
if (!props.vehicleBelongType) {
|
if (!props.vehicleBelongType) {
|
||||||
return [
|
return [
|
||||||
{ name: "vehicleBelongType", label: "车辆所属类型", onlyForLabel: true },
|
{ name: "vehicleBelongType", label: "车辆所属类型", onlyForLabel: true },
|
||||||
{ name: "employeeVehicleUserName", label: "车辆归属人", span: 24, componentProps: { disabled: true } },
|
{ name: "employeeVehicleUserName", label: "车辆所属人", span: 24, componentProps: { disabled: true } },
|
||||||
{ name: "employeeVehicleUserId", label: "车辆归属人ID", onlyForLabel: true },
|
{ name: "employeeVehicleUserId", label: "车辆所属人ID", onlyForLabel: true },
|
||||||
{ name: "vehicleDepartmentName", label: "车辆所属部门", onlyForLabel: true },
|
{ name: "vehicleDepartmentName", label: "车辆所属部门", onlyForLabel: true },
|
||||||
{ name: "vehicleDepartmentId", label: "车辆所属部门ID", onlyForLabel: true },
|
{ name: "vehicleDepartmentId", label: "车辆所属部门ID", onlyForLabel: true },
|
||||||
{ name: "vehicleCorpId", label: "车辆所属企业ID", onlyForLabel: true },
|
{ name: "vehicleCorpId", label: "车辆所属企业ID", onlyForLabel: true },
|
||||||
|
|
@ -127,6 +127,25 @@ function Add(props) {
|
||||||
{ name: "vehicleCorpName", label: "车辆所属企业名称", onlyForLabel: true },
|
{ name: "vehicleCorpName", label: "车辆所属企业名称", onlyForLabel: true },
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
else if (props.vehicleBelongType === 1) {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
name: "vehicleBelongType",
|
||||||
|
label: "车辆所属类型",
|
||||||
|
span: 24,
|
||||||
|
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 },
|
||||||
|
{ name: "employeeVehicleUserName", label: "车辆所属人", componentProps: { disabled: true } },
|
||||||
|
{ name: "employeeVehicleUserId", label: "车辆所属人ID", onlyForLabel: true },
|
||||||
|
{ name: "vehicleCorpId", label: "车辆所属企业ID", onlyForLabel: true },
|
||||||
|
{ name: "vehicleCorpName", label: "车辆所属企业名称", onlyForLabel: true },
|
||||||
|
];
|
||||||
|
}
|
||||||
|
return [];
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ function View(props) {
|
||||||
|
|
||||||
const getVehicleBelongFields = (info) => {
|
const getVehicleBelongFields = (info) => {
|
||||||
if (!props.vehicleBelongType) {
|
if (!props.vehicleBelongType) {
|
||||||
return [{ label: "车辆归属人", children: info.employeeVehicleUserName, span: 24 }];
|
return [{ label: "车辆所属人", children: info.employeeVehicleUserName, span: 24 }];
|
||||||
}
|
}
|
||||||
else if (props.vehicleBelongType === 2) {
|
else if (props.vehicleBelongType === 2) {
|
||||||
return [
|
return [
|
||||||
|
|
@ -44,6 +44,13 @@ function View(props) {
|
||||||
{ label: "车辆所属部门", children: info.vehicleDepartmentName },
|
{ label: "车辆所属部门", children: info.vehicleDepartmentName },
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
else if (props.vehicleBelongType === 1) {
|
||||||
|
return [
|
||||||
|
{ label: "车辆所属类型", children: getLabelName({ list: VEHICLE_TYPE_ENUM, status: info.vehicleBelongType }) },
|
||||||
|
{ label: "车辆所属部门", children: info.vehicleDepartmentName },
|
||||||
|
{ label: "车辆所属人", children: info.employeeVehicleUserName, span: 24 },
|
||||||
|
];
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import { NS_STOCK_PERSONNEL_AND_VEHICLES } from "~/enumerate/namespace";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [authorizationModalVisible, setAuthorizationModalVisible] = useState(false);
|
const [authorizationModalVisible, setAuthorizationModalVisible] = useState(false);
|
||||||
const [currentId, setCurrentId] = useState("");
|
const [currentInfo, setCurrentInfo] = useState("");
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [urlState, setUrlState] = useUrlState({
|
const [urlState, setUrlState] = useUrlState({
|
||||||
departmentId: "",
|
departmentId: "",
|
||||||
|
|
@ -64,7 +64,7 @@ function List(props) {
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div style={{ width: "calc(100% - 300px - 50px)" }}>
|
<div style={{ width: "calc(100% - 300px - 50px)" }}>
|
||||||
<Search labelCol={{ span: 4 }} options={[{ name: "todo1", label: "姓名" }]} onFinish={getData} form={form} />
|
<Search labelCol={{ span: 4 }} options={[{ name: "name", label: "姓名" }]} onFinish={getData} form={form} />
|
||||||
<Table
|
<Table
|
||||||
toolBarRender={() => (
|
toolBarRender={() => (
|
||||||
<>
|
<>
|
||||||
|
|
@ -86,13 +86,13 @@ 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: "门禁权限", dataIndex: "todo6", render: (_, record) => record.todo6 === 1 ? "开启" : "关闭" },
|
{ title: "门禁权限", dataIndex: "mkmjPermission", render: (_, record) => record.mkmjPermission === 1 ? "开启" : "关闭" },
|
||||||
{ title: "是否录入人脸", dataIndex: "todo7", render: (_, record) => record.todo7 === 1 ? "是" : "否" },
|
{ title: "是否录入人脸", dataIndex: "userFaceUrl", render: (_, record) => record.userFaceUrl ? "是" : "否" },
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
width: 200,
|
width: 200,
|
||||||
|
|
@ -102,7 +102,7 @@ function List(props) {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setCurrentId(record.id);
|
setCurrentInfo(record);
|
||||||
setAuthorizationModalVisible(true);
|
setAuthorizationModalVisible(true);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
@ -111,7 +111,8 @@ function List(props) {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push(`./personnelRecords?id=${record.id}`);
|
// TODO
|
||||||
|
props.history.push(`./personnelRecords?id=${record.userId}`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
人员进出记录
|
人员进出记录
|
||||||
|
|
@ -119,7 +120,7 @@ function List(props) {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push(`./vehicleManagement/list?id=${record.id}`);
|
props.history.push(`./vehicleManagement/list?id=${record.userId}`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
车辆管理
|
车辆管理
|
||||||
|
|
@ -137,9 +138,9 @@ function List(props) {
|
||||||
<AuthorizationModalVisible
|
<AuthorizationModalVisible
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
setAuthorizationModalVisible(false);
|
setAuthorizationModalVisible(false);
|
||||||
setCurrentId("");
|
setCurrentInfo("");
|
||||||
}}
|
}}
|
||||||
id={currentId}
|
info={currentInfo}
|
||||||
getData={getData}
|
getData={getData}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
@ -152,9 +153,20 @@ const AuthorizationModalVisibleComponent = (props) => {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
|
||||||
const onSubmit = async (values) => {
|
const onSubmit = async (values) => {
|
||||||
|
const { userId, corpinfoId, corpName, departmentId, departmentName, userName, userFaceUrl, userPhone, userCard } = props.info;
|
||||||
const { success } = await props["stockPersonnelAndVehiclesAuthorization"]({
|
const { success } = await props["stockPersonnelAndVehiclesAuthorization"]({
|
||||||
id: props.id,
|
|
||||||
...values,
|
...values,
|
||||||
|
userId,
|
||||||
|
corpinfoId,
|
||||||
|
corpName,
|
||||||
|
departmentId,
|
||||||
|
departmentName,
|
||||||
|
userName,
|
||||||
|
userFaceUrl,
|
||||||
|
userPhone,
|
||||||
|
userCard,
|
||||||
|
personBelongType: 1,
|
||||||
|
gateLevelAuthArea: JSON.stringify({ area: values.area }),
|
||||||
});
|
});
|
||||||
if (success) {
|
if (success) {
|
||||||
message.success("操作成功");
|
message.success("操作成功");
|
||||||
|
|
@ -181,22 +193,31 @@ const AuthorizationModalVisibleComponent = (props) => {
|
||||||
span={24}
|
span={24}
|
||||||
labelCol={{ span: 8 }}
|
labelCol={{ span: 8 }}
|
||||||
values={{
|
values={{
|
||||||
todo1: "1",
|
mkmjPermission: "1",
|
||||||
}}
|
}}
|
||||||
options={[
|
options={[
|
||||||
{
|
{
|
||||||
name: "todo1",
|
name: "mkmjPermission",
|
||||||
label: "是否授权",
|
label: "是否授权",
|
||||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||||
items: [{ bianma: "1", name: "是" }, { bianma: "0", name: "否" }],
|
items: [{ bianma: "1", name: "是" }, { bianma: "2", name: "否" }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "todo2",
|
name: "gateLevelAuthArea",
|
||||||
label: "授权港区",
|
label: "授权港区",
|
||||||
render: (<DictionarySelect dictValue="HG_AUTH_AREA" />),
|
render: (
|
||||||
dependencies: ["todo1"],
|
<DictionarySelect
|
||||||
hidden: formValues => !(formValues.todo1 === "1"),
|
dictValue="HG_AUTH_AREA"
|
||||||
|
onGetOption={(option) => {
|
||||||
|
const area = { value: option.dictLabel, bianma: option.dictValue };
|
||||||
|
form.setFieldValue("area", area);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
dependencies: ["mkmjPermission"],
|
||||||
|
hidden: formValues => !(formValues.mkmjPermission === "1"),
|
||||||
},
|
},
|
||||||
|
{ name: "area", label: "访问港区", onlyForLabel: true },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
|
||||||
|
|
@ -1,141 +1,7 @@
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import AddPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/PersonalVehicle/Add";
|
||||||
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_PERSONNEL_AND_VEHICLES } from "~/enumerate/namespace";
|
|
||||||
|
|
||||||
function Add(props) {
|
function Add(props) {
|
||||||
const query = useGetUrlQuery();
|
return (<AddPage vehicleBelongType={1} {...props} />);
|
||||||
const { getUserInfo } = useGetUserInfo();
|
|
||||||
const [form] = Form.useForm();
|
|
||||||
|
|
||||||
const getData = async () => {
|
|
||||||
if (query.id) {
|
|
||||||
const { data } = await props["stockPersonnelAndVehiclesVehicleManagementInfo"]({ id: query.id });
|
|
||||||
form.setFieldsValue({
|
|
||||||
...data,
|
|
||||||
area: JSON.parse(data.gateLevelAuthArea).area,
|
|
||||||
gateLevelAuthArea: JSON.parse(data.gateLevelAuthArea).area.map(item => item.bianma),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
const userInfo = await getUserInfo();
|
|
||||||
form.setFieldsValue({
|
|
||||||
todo2: userInfo.departmentName,
|
|
||||||
todo3: userInfo.name,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
getData();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
const onSubmit = async (values) => {
|
|
||||||
const { success } = await props[!query.id ? "stockPersonnelAndVehiclesVehicleManagementAdd" : "stockPersonnelAndVehiclesVehicleManagementUpdate"]({
|
|
||||||
...values,
|
|
||||||
id: query.id,
|
|
||||||
gateLevelAuthArea: JSON.stringify({ area: values.area }),
|
|
||||||
});
|
|
||||||
if (success) {
|
|
||||||
message.success("操作成功");
|
|
||||||
props.history.goBack();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Page headerTitle={query.id ? "重新申请" : "新增"} isShowFooter={false}>
|
|
||||||
<FormBuilder
|
|
||||||
onFinish={onSubmit}
|
|
||||||
values={{
|
|
||||||
todo1: "2",
|
|
||||||
}}
|
|
||||||
loading={props.stockPersonnelAndVehicles.stockPersonnelAndVehiclesLoading}
|
|
||||||
options={[
|
|
||||||
{
|
|
||||||
name: "todo1",
|
|
||||||
label: "车辆所属类型",
|
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
|
||||||
items: VEHICLE_TYPE_ENUM,
|
|
||||||
componentProps: { disabled: true },
|
|
||||||
span: 24,
|
|
||||||
},
|
|
||||||
{ name: "todo2", label: "车辆所属部门", componentProps: { disabled: true } },
|
|
||||||
{ name: "todo3", 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: "gateLevelAuthArea",
|
|
||||||
label: "访问港区",
|
|
||||||
render: (
|
|
||||||
<DictionarySelect
|
|
||||||
dictValue="HG_AUTH_AREA"
|
|
||||||
onGetOption={(option) => {
|
|
||||||
const area = { value: option.dictLabel, bianma: option.dictValue };
|
|
||||||
form.setFieldValue("area", area);
|
|
||||||
}}
|
|
||||||
onChange={() => {
|
|
||||||
form.setFieldValue("mkmjId", "");
|
|
||||||
form.setFieldValue("mkmjName", "");
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{ name: "area", label: "访问港区", onlyForLabel: true },
|
|
||||||
{ name: "todo8", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATETIME },
|
|
||||||
{ name: "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>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_STOCK_PERSONNEL_AND_VEHICLES], true)(Add);
|
export default Add;
|
||||||
|
|
|
||||||
|
|
@ -9,20 +9,20 @@ 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 { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
import { NS_STOCK_PERSONNEL_AND_VEHICLES } from "~/enumerate/namespace";
|
import { NS_STOCK_PERSONNEL_AND_VEHICLES, NS_VEHICLE_APPLY } from "~/enumerate/namespace";
|
||||||
|
|
||||||
const VEHICLE_APPROVAL_STATUS_ENUM = [
|
const VEHICLE_APPROVAL_STATUS_ENUM = [
|
||||||
{ bianma: "1", name: "审批中" },
|
{ name: "审核中", bianma: "1" },
|
||||||
{ bianma: "2", name: "通过" },
|
{ name: "通过", bianma: "2" },
|
||||||
{ bianma: "3", name: "已驳回" },
|
{ name: "不通过", bianma: "3" },
|
||||||
];
|
];
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const query = useGetUrlQuery();
|
const query = useGetUrlQuery();
|
||||||
const { tableProps, getData } = useTable(props["stockPersonnelAndVehiclesVehicleManagementList"], {
|
const { tableProps, getData } = useTable(props["vehicleApplyList"], {
|
||||||
form,
|
form,
|
||||||
params: { id: query.id },
|
params: { employeeVehicleUserId: query.id, vehicleBelongType: 1 },
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDelete = (record) => {
|
const onDelete = (record) => {
|
||||||
|
|
@ -30,7 +30,7 @@ function List(props) {
|
||||||
title: "删除确认",
|
title: "删除确认",
|
||||||
content: "确定要删除吗?",
|
content: "确定要删除吗?",
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
const { success } = await props["stockPersonnelAndVehiclesVehicleManagementDelete"]({ id: record.id });
|
const { success } = await props["vehicleApplyDelete"]({ id: record.id });
|
||||||
if (success) {
|
if (success) {
|
||||||
message.success("删除成功");
|
message.success("删除成功");
|
||||||
getData();
|
getData();
|
||||||
|
|
@ -39,29 +39,14 @@ function List(props) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const onUpdateStatus = (record) => {
|
|
||||||
const message = record.todo9 === 1 ? "停用" : "启用";
|
|
||||||
Modal.confirm({
|
|
||||||
title: `${message}确认`,
|
|
||||||
content: `确定要${message}吗?`,
|
|
||||||
onOk: async () => {
|
|
||||||
const { success } = await props["stockPersonnelAndVehiclesVehicleManagementUpdateStatus"]({ id: record.id });
|
|
||||||
if (success) {
|
|
||||||
message.success(`${message}成功`);
|
|
||||||
getData();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page headerTitle="车辆管理">
|
<Page headerTitle="车辆管理">
|
||||||
<Search
|
<Search
|
||||||
options={[
|
options={[
|
||||||
{ name: "todo1", label: "车牌号" },
|
{ name: "licenceNo", label: "车牌号" },
|
||||||
{ name: "todo2", label: "访问港区范围", render: (<DictionarySelect dictValue="HG_AUTH_AREA" />) },
|
{ name: "gateLevelAuthAreaId", label: "访问港区范围", render: (<DictionarySelect dictValue="HG_AUTH_AREA" />) },
|
||||||
{ name: "todo3", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
{ name: "visitStartTime", label: "访问开始时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||||
{ name: "todo4", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
{ name: "visitEndTime", label: "访问结束时间", render: FORM_ITEM_RENDER_ENUM.DATE },
|
||||||
]}
|
]}
|
||||||
form={form}
|
form={form}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
|
|
@ -82,21 +67,25 @@ function List(props) {
|
||||||
)}
|
)}
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "车辆归属人", dataIndex: "todo1" },
|
{ title: "车辆归属人", dataIndex: "todo1" },
|
||||||
{ 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: "审批状态",
|
title: "审批状态",
|
||||||
dataIndex: "todo8",
|
dataIndex: "auditFlag",
|
||||||
render: (_, record) => getLabelName({ list: VEHICLE_APPROVAL_STATUS_ENUM, status: record.todo8 }),
|
render: (_, record) => getLabelName({ list: VEHICLE_APPROVAL_STATUS_ENUM, status: record.auditFlag }),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "启用状态",
|
title: "车辆开启状态",
|
||||||
dataIndex: "todo9",
|
dataIndex: "blockedFlag",
|
||||||
render: (_, record) => record.todo9 === 1 ? "启用" : "停用",
|
render: (_, record) => record.blockedFlag === 2 ? "正常" : "已拉黑",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
|
|
@ -107,6 +96,7 @@ function List(props) {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
// TODO
|
||||||
props.history.push(`./vehicleRecords?id=${record.id}`);
|
props.history.push(`./vehicleRecords?id=${record.id}`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
@ -120,14 +110,7 @@ function List(props) {
|
||||||
>
|
>
|
||||||
审批记录
|
审批记录
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
{record.auditFlag === 3 && (
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
props.history.push(`./view?id=${record.id}`);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
查看
|
|
||||||
</Button>
|
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -136,13 +119,14 @@ function List(props) {
|
||||||
>
|
>
|
||||||
重新申请
|
重新申请
|
||||||
</Button>
|
</Button>
|
||||||
|
)}
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onUpdateStatus(record);
|
props.history.push(`./view?id=${record.id}`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{record.todo9 === 1 ? "停用" : "启用"}
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
|
|
@ -163,4 +147,4 @@ function List(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_STOCK_PERSONNEL_AND_VEHICLES], true)(List);
|
export default Connect([NS_STOCK_PERSONNEL_AND_VEHICLES, NS_VEHICLE_APPLY], true)(List);
|
||||||
|
|
|
||||||
|
|
@ -1,58 +1,7 @@
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import ViewPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/PersonalVehicle/View";
|
||||||
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_PERSONNEL_AND_VEHICLES } from "~/enumerate/namespace";
|
|
||||||
|
|
||||||
function View(props) {
|
function View(props) {
|
||||||
const query = useGetUrlQuery();
|
return (<ViewPage vehicleBelongType={1} {...props} />);
|
||||||
const [info, setInfo] = useState({});
|
|
||||||
|
|
||||||
const getData = async () => {
|
|
||||||
const { data } = await props["stockPersonnelAndVehiclesVehicleManagementInfo"]({ id: query.id });
|
|
||||||
setInfo(data);
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
getData();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Page headerTitle="查看" contentPadding="0 20px 20px 20px">
|
|
||||||
<Spin spinning={props.stockPersonnelAndVehicles.stockPersonnelAndVehiclesLoading}>
|
|
||||||
<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: 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>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_STOCK_PERSONNEL_AND_VEHICLES], true)(View);
|
export default View;
|
||||||
|
|
|
||||||
|
|
@ -132,8 +132,8 @@ function List(props) {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "车辆开启状态",
|
title: "车辆开启状态",
|
||||||
dataIndex: "statusFlag",
|
dataIndex: "blockedFlag",
|
||||||
render: (_, record) => record.statusFlag === 2 ? "正常" : "已拉黑",
|
render: (_, record) => record.blockedFlag === 2 ? "正常" : "已拉黑",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
|
|
|
||||||
|
|
@ -7,18 +7,29 @@ import PreviewImg from "zy-react-library/components/PreviewImg";
|
||||||
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 { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
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 useTable from "zy-react-library/hooks/useTable";
|
||||||
import { NS_RELATED_PERSONNEL } from "~/enumerate/namespace";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
|
import { NS_RELATED_PERSONNEL, NS_TEMPORARY_PERSONNEL } from "~/enumerate/namespace";
|
||||||
|
|
||||||
|
const STATUS_ENUM = [
|
||||||
|
{ bianma: "1", name: "审核中" },
|
||||||
|
{ bianma: "2", name: "通过" },
|
||||||
|
{ bianma: "3", name: "不通过" },
|
||||||
|
];
|
||||||
|
|
||||||
function RelatedPersonnel(props) {
|
function RelatedPersonnel(props) {
|
||||||
const [currentId, setCurrentId] = useState("");
|
const [currentId, setCurrentId] = useState("");
|
||||||
|
const [reasonsRefusal, setReasonsRefusal] = useState("");
|
||||||
const [reviewModalVisible, setReviewModalVisible] = useState(false);
|
const [reviewModalVisible, setReviewModalVisible] = useState(false);
|
||||||
const [infoModalVisible, setInfoModalVisible] = useState(false);
|
const [infoModalVisible, setInfoModalVisible] = useState(false);
|
||||||
const [viewRejectReasonModalVisible, setViewRejectReasonModalVisible] = useState(false);
|
const [viewRejectReasonModalVisible, setViewRejectReasonModalVisible] = useState(false);
|
||||||
|
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const { tableProps, getData } = useTable(props["relatedPersonnelList"], {
|
const { tableProps, getData } = useTable(props["temporaryPersonnelList"], {
|
||||||
form,
|
form,
|
||||||
|
params: { processOrRecord: !props.isRecords ? 1 : 2 },
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -34,18 +45,30 @@ function RelatedPersonnel(props) {
|
||||||
<Table
|
<Table
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "相关方名称", dataIndex: "todo1" },
|
{ title: "相关方名称", dataIndex: "todo1" },
|
||||||
{ title: "项目名称", dataIndex: "todo2" },
|
{ title: "项目名称", dataIndex: "projectName" },
|
||||||
{ title: "区域范围", dataIndex: "todo3" },
|
{
|
||||||
{ title: "访问期限", dataIndex: "todo4" },
|
title: "区域范围",
|
||||||
|
dataIndex: "gateLevelAuthArea",
|
||||||
|
render: (_, record) => record.gateLevelAuthArea && JSON.parse(record.gateLevelAuthArea).area.map(item => item.value).join("、"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "访问期限",
|
||||||
|
dataIndex: "visitStartTime",
|
||||||
|
render: (_, record) => `${record.visitStartTime}至${record.visitEndTime}`,
|
||||||
|
},
|
||||||
{ title: "项目人员数", dataIndex: "todo5" },
|
{ title: "项目人员数", dataIndex: "todo5" },
|
||||||
{ title: "申请时间", dataIndex: "todo6" },
|
{ title: "申请时间", dataIndex: "todo6" },
|
||||||
{ title: "审核状态", dataIndex: "todo7" },
|
{
|
||||||
|
title: "审批状态",
|
||||||
|
dataIndex: "auditFlag",
|
||||||
|
render: (_, record) => getLabelName({ list: STATUS_ENUM, status: record.auditFlag }),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
width: 150,
|
width: 150,
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{!props.isRecords && (
|
{(!props.isRecords && record.currentUserCanAudit === 1) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -65,15 +88,17 @@ function RelatedPersonnel(props) {
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
|
{record.auditFlag === 3 && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setViewRejectReasonModalVisible(true);
|
setViewRejectReasonModalVisible(true);
|
||||||
setCurrentId(record.id);
|
setReasonsRefusal(record.reasonsRefusal);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
查看原因
|
查看原因
|
||||||
</Button>
|
</Button>
|
||||||
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
@ -106,10 +131,10 @@ function RelatedPersonnel(props) {
|
||||||
{
|
{
|
||||||
viewRejectReasonModalVisible && (
|
viewRejectReasonModalVisible && (
|
||||||
<ViewRejectReasonModal
|
<ViewRejectReasonModal
|
||||||
id={currentId}
|
reasonsRefusal={reasonsRefusal}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
setViewRejectReasonModalVisible(false);
|
setViewRejectReasonModalVisible(false);
|
||||||
setCurrentId("");
|
setReasonsRefusal("");
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
|
@ -122,9 +147,9 @@ const ReviewModalComponent = (props) => {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
|
||||||
const onSubmit = async (values) => {
|
const onSubmit = async (values) => {
|
||||||
const { success } = await props["relatedPersonnelApproval"]({
|
const { success } = await props["temporaryPersonnelReview"]({
|
||||||
id: props.id,
|
|
||||||
...values,
|
...values,
|
||||||
|
id: props.id,
|
||||||
});
|
});
|
||||||
if (success) {
|
if (success) {
|
||||||
message.success("操作成功");
|
message.success("操作成功");
|
||||||
|
|
@ -141,7 +166,7 @@ const ReviewModalComponent = (props) => {
|
||||||
onCancel={props.onCancel}
|
onCancel={props.onCancel}
|
||||||
onOk={form.submit}
|
onOk={form.submit}
|
||||||
width={800}
|
width={800}
|
||||||
confirmLoading={props.relatedPersonnel.relatedPersonnelLoading}
|
confirmLoading={props.temporaryPersonnel.temporaryPersonnelLoading}
|
||||||
>
|
>
|
||||||
<PublicInfoModal id={props.id} />
|
<PublicInfoModal id={props.id} />
|
||||||
<FormBuilder
|
<FormBuilder
|
||||||
|
|
@ -150,22 +175,22 @@ const ReviewModalComponent = (props) => {
|
||||||
labelCol={{ span: 8 }}
|
labelCol={{ span: 8 }}
|
||||||
span={24}
|
span={24}
|
||||||
values={{
|
values={{
|
||||||
todo1: "1",
|
auditFlag: "1",
|
||||||
}}
|
}}
|
||||||
showActionButtons={false}
|
showActionButtons={false}
|
||||||
options={[
|
options={[
|
||||||
{
|
{
|
||||||
name: "todo1",
|
name: "auditFlag",
|
||||||
label: "是否通过审核",
|
label: "是否通过审核",
|
||||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||||
items: [{ bianma: "1", name: "通过" }, { bianma: "0", name: "打回" }],
|
items: [{ bianma: "2", name: "通过" }, { bianma: "3", name: "不通过" }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "todo2",
|
name: "todo2",
|
||||||
label: "驳回原因",
|
label: "驳回原因",
|
||||||
render: FORM_ITEM_RENDER_ENUM.TEXTAREA,
|
render: FORM_ITEM_RENDER_ENUM.TEXTAREA,
|
||||||
dependencies: ["todo1"],
|
dependencies: ["auditFlag"],
|
||||||
hidden: formValues => !(formValues.todo1 === "0"),
|
hidden: formValues => !(formValues.auditFlag === "3"),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
|
@ -176,6 +201,8 @@ const ReviewModalComponent = (props) => {
|
||||||
const InfoModalComponent = (props) => {
|
const InfoModalComponent = (props) => {
|
||||||
const [info, setInfo] = useState({});
|
const [info, setInfo] = useState({});
|
||||||
|
|
||||||
|
const { getFile } = useGetFile();
|
||||||
|
|
||||||
const { tableProps } = useTable(props["relatedPersonnelPersonnelList"], {
|
const { tableProps } = useTable(props["relatedPersonnelPersonnelList"], {
|
||||||
params: {
|
params: {
|
||||||
id: props.id,
|
id: props.id,
|
||||||
|
|
@ -184,8 +211,12 @@ const InfoModalComponent = (props) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
const { data } = await props["relatedPersonnelInfo"]({ id: props.id });
|
const { data } = await props["temporaryPersonnelInfo"]({ id: props.id });
|
||||||
setInfo(data);
|
const informSignFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[606], eqForeignKey: data.informSignId });
|
||||||
|
setInfo({
|
||||||
|
...data,
|
||||||
|
informSignFile,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -201,13 +232,16 @@ const InfoModalComponent = (props) => {
|
||||||
styles={{ label: { width: 200 } }}
|
styles={{ label: { width: 200 } }}
|
||||||
items={[
|
items={[
|
||||||
{ label: "相关方名称", children: info.todo1 },
|
{ label: "相关方名称", children: info.todo1 },
|
||||||
{ label: "项目名称", children: info.todo2 },
|
{ label: "项目名称", children: info.projectName },
|
||||||
{ label: "区域范围", children: info.todo3 },
|
{
|
||||||
{ label: "访问期限", children: info.todo4 },
|
label: "区域范围",
|
||||||
|
children: info.gateLevelAuthArea && JSON.parse(info.gateLevelAuthArea).area.map(item => item.value).join("、"),
|
||||||
|
},
|
||||||
|
{ label: "访问期限", children: `${info.visitStartTime}至${info.visitEndTime}` },
|
||||||
{ label: "项目人员数", children: info.todo5 },
|
{ label: "项目人员数", children: info.todo5 },
|
||||||
{ label: "申请时间", children: info.todo6 },
|
{ label: "申请时间", children: info.todo6 },
|
||||||
{ label: "申请状态", children: info.todo7 },
|
{ label: "申请状态", children: info.todo7 },
|
||||||
{ label: "申请人签字", children: (<PreviewImg files={[info.todo8]} />) },
|
{ label: "申请人签字", children: (<PreviewImg files={info.informSignFile} />) },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
<Divider orientation="left">人员信息</Divider>
|
<Divider orientation="left">人员信息</Divider>
|
||||||
|
|
@ -226,16 +260,6 @@ const InfoModalComponent = (props) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const ViewRejectReasonModalComponent = (props) => {
|
const ViewRejectReasonModalComponent = (props) => {
|
||||||
const [info, setInfo] = useState({});
|
|
||||||
const getData = async () => {
|
|
||||||
const { data } = await props["relatedPersonnelRejectReason"]({ id: props.id });
|
|
||||||
setInfo(data);
|
|
||||||
};
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
getData();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
open
|
open
|
||||||
|
|
@ -246,14 +270,13 @@ const ViewRejectReasonModalComponent = (props) => {
|
||||||
footer={[
|
footer={[
|
||||||
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
|
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
|
||||||
]}
|
]}
|
||||||
loading={props.relatedPersonnel.relatedPersonnelLoading}
|
|
||||||
>
|
>
|
||||||
<Descriptions
|
<Descriptions
|
||||||
column={1}
|
column={1}
|
||||||
bordered
|
bordered
|
||||||
styles={{ label: { width: 200 } }}
|
styles={{ label: { width: 200 } }}
|
||||||
items={[
|
items={[
|
||||||
{ label: "驳回原因", children: info.todo1 },
|
{ label: "驳回原因", children: props.reasonsRefusal },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
@ -277,7 +300,7 @@ function InfoModal(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const ReviewModal = Connect([NS_RELATED_PERSONNEL], true)(ReviewModalComponent);
|
const ReviewModal = Connect([NS_TEMPORARY_PERSONNEL], true)(ReviewModalComponent);
|
||||||
const PublicInfoModal = Connect([NS_RELATED_PERSONNEL], true)(InfoModalComponent);
|
const PublicInfoModal = Connect([NS_RELATED_PERSONNEL, NS_TEMPORARY_PERSONNEL], true)(InfoModalComponent);
|
||||||
const ViewRejectReasonModal = Connect([NS_RELATED_PERSONNEL], true)(ViewRejectReasonModalComponent);
|
const ViewRejectReasonModal = Connect([NS_TEMPORARY_PERSONNEL], true)(ViewRejectReasonModalComponent);
|
||||||
export default Connect([NS_RELATED_PERSONNEL], true)(RelatedPersonnel);
|
export default Connect([NS_TEMPORARY_PERSONNEL], true)(RelatedPersonnel);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue