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