相关方端一级口门

master
LiuJiaNan 2026-03-26 11:39:22 +08:00
parent d1b67ec9e7
commit 7eabe843d3
34 changed files with 563 additions and 611 deletions

View File

@ -134,31 +134,35 @@
### 相关方端 ### 相关方端
#### 一级口门管理 #### 一级口门管理
- 门禁审批人管理 - 门禁审批人管理 ##
`/primeport/container/stakeholder/firstLevelDoor/approverUser` `/primeport/container/stakeholder/firstLevelDoor/approverUser`
- 进港审批管理/长期车辆审批管理/车辆审批 - 进港审批管理/长期车辆审批管理/车辆审批 ##
`/primeport/container/stakeholder/firstLevelDoor/portEntryApproval/longTermVehicleApproval/shareVehicles` `/primeport/container/stakeholder/firstLevelDoor/portEntryApproval/longTermVehicleApproval/shareVehicles`
- 进港审批管理/临时访客管理/临时人员管理 - 进港审批管理/临时访客管理/临时人员管理 ##
`/primeport/container/stakeholder/firstLevelDoor/portEntryApproval/temporaryVisitor/temporaryPersonnel/list` `/primeport/container/stakeholder/firstLevelDoor/portEntryApproval/temporaryVisitor/temporaryPersonnel/list`
- 进港审批管理/临时访客管理/临时车辆管理 - 进港审批管理/临时访客管理/临时人员管理记录 ##
`/primeport/container/stakeholder/firstLevelDoor/portEntryApproval/temporaryVisitor/temporaryPersonnelRecords/list`
- 进港审批管理/临时访客管理/临时车辆管理 ##
`/primeport/container/stakeholder/firstLevelDoor/portEntryApproval/temporaryVisitor/temporaryVehicle/list` `/primeport/container/stakeholder/firstLevelDoor/portEntryApproval/temporaryVisitor/temporaryVehicle/list`
- 进出港信息管理/人员及车辆管理 - 进港审批管理/临时访客管理/临时车辆管理记录 ##
`/primeport/container/stakeholder/firstLevelDoor/portEntryApproval/temporaryVisitor/temporaryVehicleRecords/list`
- 进出港信息管理/人员及车辆管理 ##
`/primeport/container/stakeholder/firstLevelDoor/importAndExportPortInfo/stockPersonnelAndVehicles/list` `/primeport/container/stakeholder/firstLevelDoor/importAndExportPortInfo/stockPersonnelAndVehicles/list`
- 进出港信息管理/个人车辆管理 - 进出港信息管理/个人车辆管理 ##
`/primeport/container/stakeholder/firstLevelDoor/importAndExportPortInfo/personalVehicle/list` `/primeport/container/stakeholder/firstLevelDoor/importAndExportPortInfo/personalVehicle/list`
- 进出港信息管理/车辆违规管理/车辆违规管理 - 进出港信息管理/车辆违规管理/车辆违规管理 ##
`/primeport/container/stakeholder/firstLevelDoor/importAndExportPortInfo/vehiclesViolation/vehiclesViolation/list` `/primeport/container/stakeholder/firstLevelDoor/importAndExportPortInfo/vehiclesViolation/vehiclesViolation/list`
- 进出港信息管理/车辆违规管理/车辆黑名单管理 - 进出港信息管理/车辆违规管理/车辆黑名单管理 ##
`/primeport/container/stakeholder/firstLevelDoor/importAndExportPortInfo/vehiclesViolation/vehicleBlacklist/list` `/primeport/container/stakeholder/firstLevelDoor/importAndExportPortInfo/vehiclesViolation/vehicleBlacklist/list`
- 人员权限记录 - 人员权限记录 ##
`/primeport/container/stakeholder/firstLevelDoor/personnelPermissionRecords/list` `/primeport/container/stakeholder/firstLevelDoor/personnelPermissionRecords/list`
- 人员申请 - 人员申请 ##
`/primeport/container/stakeholder/firstLevelDoor/personnelApplication/list` `/primeport/container/stakeholder/firstLevelDoor/personnelApplication/list`
- 车辆申请 - 车辆申请 ##
`/primeport/container/stakeholder/firstLevelDoor/vehicleApplication/list` `/primeport/container/stakeholder/firstLevelDoor/vehicleApplication/list`
- 人员申请记录 - 人员申请记录 ##
`/primeport/container/stakeholder/firstLevelDoor/personnelApplicationRecords/list` `/primeport/container/stakeholder/firstLevelDoor/personnelApplicationRecords/list`
- 车辆申请记录 - 车辆申请记录 ##
`/primeport/container/stakeholder/firstLevelDoor/vehicleApplicationRecords/list` `/primeport/container/stakeholder/firstLevelDoor/vehicleApplicationRecords/list`
#### 封闭区域管理 #### 封闭区域管理

View File

@ -2,17 +2,13 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const personnelApplicationList = declareRequest( export const personnelApplicationList = declareRequest(
"personnelApplicationLoading", "personnelApplicationLoading",
`Post > @/primeport/`, `Post > @/primeport/personApply/xgfPersonApplyList`,
); );
export const personnelApplicationInfo = declareRequest( export const personnelApplicationInfo = declareRequest(
"personnelApplicationLoading", "personnelApplicationLoading",
`Post > @/primeport/`, `Get > /primeport/personApply/xgfPersonApplyInfoById/{id}`,
);
export const personnelApplicationRejectReason = declareRequest(
"personnelApplicationLoading",
`Post > @/primeport/`,
); );
export const personnelApplicationAdd = declareRequest( export const personnelApplicationAdd = declareRequest(
"personnelApplicationLoading", "personnelApplicationLoading",
`Post > @/primeport/`, `Post > @/primeport/personApply/xgfPersonSave`,
); );

View File

@ -2,9 +2,9 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const personnelPermissionRecordsList = declareRequest( export const personnelPermissionRecordsList = declareRequest(
"personnelPermissionRecordsLoading", "personnelPermissionRecordsLoading",
`Post > @/primeport/`, `Post > @/primeport/personApply/xgfPersonPermissionsList`,
); );
export const personnelPermissionRecordsInfo = declareRequest( export const personnelPermissionRecordsInfo = declareRequest(
"personnelPermissionRecordsLoading", "personnelPermissionRecordsLoading",
`Post > @/primeport/`, `Get > /primeport/personApply/xgfPersonApplyInfoById/{id}`,
); );

View File

@ -1,18 +0,0 @@
import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
export const vehicleApplicationList = declareRequest(
"vehicleApplicationLoading",
`Post > @/primeport/`,
);
export const vehicleApplicationInfo = declareRequest(
"vehicleApplicationLoading",
`Post > @/primeport/`,
);
export const vehicleApplicationRejectReason = declareRequest(
"vehicleApplicationLoading",
`Post > @/primeport/`,
);
export const vehicleApplicationAdd = declareRequest(
"vehicleApplicationLoading",
`Post > @/primeport/`,
);

View File

@ -41,6 +41,8 @@ export const VEHICLE_TYPE_ENUM = [
{ bianma: "5", name: "相关方车辆" }, { bianma: "5", name: "相关方车辆" },
{ bianma: "6", name: "临时车辆" }, { bianma: "6", name: "临时车辆" },
{ bianma: "7", name: "检查部门车辆" }, { bianma: "7", name: "检查部门车辆" },
{ bianma: "8", name: "驻港单位员工车辆" },
{ bianma: "9", name: "驻港单位公车" },
]; ];
// 车辆审核状态 // 车辆审核状态

View File

@ -19,7 +19,6 @@ export const NS_VEHICLES_VIOLATION = defineNamespace("vehiclesViolation");
export const NS_VEHICLE_BLACKLIST = defineNamespace("vehicleBlacklist"); export const NS_VEHICLE_BLACKLIST = defineNamespace("vehicleBlacklist");
export const NS_PERSONNEL_PERMISSION_RECORDS = defineNamespace("personnelPermissionRecords"); export const NS_PERSONNEL_PERMISSION_RECORDS = defineNamespace("personnelPermissionRecords");
export const NS_PERSONNEL_APPLICATION = defineNamespace("personnelApplication"); export const NS_PERSONNEL_APPLICATION = defineNamespace("personnelApplication");
export const NS_VEHICLE_APPLICATION = defineNamespace("vehicleApplication");
export const NS_ENCLOSED_AREA = defineNamespace("enclosedArea"); export const NS_ENCLOSED_AREA = defineNamespace("enclosedArea");
export const NS_ENCLOSED_AREA_PERSONNEL_APPLY = defineNamespace("enclosedAreaPersonnelApply"); export const NS_ENCLOSED_AREA_PERSONNEL_APPLY = defineNamespace("enclosedAreaPersonnelApply");
export const NS_ENCLOSED_AREA_VEHICLE_APPLY = defineNamespace("enclosedAreaVehicleApply"); export const NS_ENCLOSED_AREA_VEHICLE_APPLY = defineNamespace("enclosedAreaVehicleApply");

View File

@ -1,7 +1,7 @@
import AddPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/PersonalVehicle/Add"; import AddPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/PersonalVehicle/Add";
function Add(props) { function Add(props) {
return (<AddPage {...props} />); return (<AddPage vehicleBelongType={8} {...props} />);
} }
export default Add; export default Add;

View File

@ -1,7 +1,7 @@
import ListPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/PersonalVehicle/List"; import ListPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/PersonalVehicle/List";
function List(props) { function List(props) {
return (<ListPage {...props} />); return (<ListPage vehicleBelongType={8} {...props} />);
} }
export default List; export default List;

View File

@ -1,7 +1,7 @@
import ViewPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/PersonalVehicle/View"; import ViewPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/PersonalVehicle/View";
function View(props) { function View(props) {
return (<ViewPage {...props} />); return (<ViewPage vehicleBelongType={8} {...props} />);
} }
export default View; export default View;

View File

@ -1,7 +1,7 @@
import AddPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/StockPersonnelAndVehicles/VehicleManagement/Add"; import AddPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/StockPersonnelAndVehicles/VehicleManagement/Add";
function Add(props) { function Add(props) {
return (<AddPage {...props} />); return (<AddPage vehicleBelongType={8} {...props} />);
} }
export default Add; export default Add;

View File

@ -1,7 +1,7 @@
import ListPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/StockPersonnelAndVehicles/VehicleManagement/List"; import ListPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/StockPersonnelAndVehicles/VehicleManagement/List";
function List(props) { function List(props) {
return (<ListPage {...props} />); return (<ListPage vehicleBelongType={8} {...props} />);
} }
export default List; export default List;

View File

@ -1,7 +1,7 @@
import ViewPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/StockPersonnelAndVehicles/VehicleManagement/View"; import ViewPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/StockPersonnelAndVehicles/VehicleManagement/View";
function View(props) { function View(props) {
return (<ViewPage {...props} />); return (<ViewPage vehicleBelongType={8} {...props} />);
} }
export default View; export default View;

View File

@ -1,7 +1,7 @@
import ListPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/VehiclesViolation/VehicleBlacklist/List"; import ListPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/VehiclesViolation/VehicleBlacklist/List";
function List(props) { function List(props) {
return (<ListPage platform="3" {...props} />); return (<ListPage {...props} />);
} }
export default List; export default List;

View File

@ -1,7 +1,7 @@
import ListPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/VehiclesViolation/VehiclesViolation/List"; import ListPage from "~/pages/Container/Supervision/FirstLevelDoor/ImportAndExportPortInfo/VehiclesViolation/VehiclesViolation/List";
function List(props) { function List(props) {
return (<ListPage platform="3" {...props} />); return (<ListPage {...props} />);
} }
export default List; export default List;

View File

@ -6,26 +6,57 @@ import Page from "zy-react-library/components/Page";
import DictionarySelect from "zy-react-library/components/Select/Dictionary"; import DictionarySelect from "zy-react-library/components/Select/Dictionary";
import Table from "zy-react-library/components/Table"; import Table from "zy-react-library/components/Table";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
import useUploadFile from "zy-react-library/hooks/useUploadFile";
import { getLabelName } from "zy-react-library/utils"; import { getLabelName } from "zy-react-library/utils";
import NeedToKnowModal from "~/components/NeedToKnowModal"; import NeedToKnowModal from "~/components/NeedToKnowModal";
import { NS_FIRST_LEVEL_DOOR_INFO, NS_PERSONNEL_APPLICATION } from "~/enumerate/namespace"; import {
NS_APPROVER_USER,
NS_ENCLOSED_AREA_PERSONNEL_APPLY,
NS_FIRST_LEVEL_DOOR_INFO,
NS_PERSONNEL_APPLICATION,
} from "~/enumerate/namespace";
function Add(props) { function Add(props) {
const [form] = FormBuilder.useForm(); const [form] = FormBuilder.useForm();
const gateLevelAuthArea = FormBuilder.useWatch("gateLevelAuthArea", form); const gateLevelAuthArea = FormBuilder.useWatch("gateLevelAuthArea", form);
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
const [personnelList, setPersonnelList] = useState([]); const [personnelList, setPersonnelList] = useState([]);
const [addPersonnelModalVisible, setAddPersonnelModalVisible] = useState(false); const [addPersonnelModalVisible, setAddPersonnelModalVisible] = useState(false);
const [needToKnowModalVisible, setNeedToKnowModalVisible] = useState(false); const [needToKnowModalVisible, setNeedToKnowModalVisible] = useState(false);
const [firstLevelDoorInfoListAll, setFirstLevelDoorInfoListAll] = useState([]); const [firstLevelDoorInfoListAll, setFirstLevelDoorInfoListAll] = useState([]);
const [xgfProjectListAll, setXgfProjectListAll] = useState([]);
const [approvalUserListAll, setApprovalUserListAll] = useState([]);
const [xgfProjectUser, setXgfProjectUser] = useState([]);
const signatureUrl = useRef(""); const signatureUrl = useRef("");
const getXgfProjectListAll = async () => {
const { data } = await props["xgfProjectListAll"]();
setXgfProjectListAll(data);
};
const getApprovalUserListAll = async () => {
const { data } = await props["approvalUserListAll"]({ personnelPermissionFlag: 1 });
setApprovalUserListAll(data);
};
const getXgfProjectUserGetPeopleProject = async (id) => {
const { data } = await props["xgfProjectUserGetPeopleProject"]({ id });
setXgfProjectUser(data);
};
const getFirstLevelDoorInfoListAll = async () => { const getFirstLevelDoorInfoListAll = async () => {
const { data } = await props["firstLevelDoorInfoListAll"]({ mkmjLevel: 1, hgAuthArea: gateLevelAuthArea }); const { data } = await props["firstLevelDoorInfoListAll"]({ mkmjLevel: 1, hgAuthArea: gateLevelAuthArea });
setFirstLevelDoorInfoListAll(data); setFirstLevelDoorInfoListAll(data);
}; };
useEffect(() => {
getXgfProjectListAll();
getApprovalUserListAll();
}, []);
useEffect(() => { useEffect(() => {
if (gateLevelAuthArea) { if (gateLevelAuthArea) {
getFirstLevelDoorInfoListAll(); getFirstLevelDoorInfoListAll();
@ -33,13 +64,34 @@ function Add(props) {
}, [gateLevelAuthArea]); }, [gateLevelAuthArea]);
const onSubmit = async (values) => { const onSubmit = async (values) => {
if (!values.todo8) { if (!values.informSignFile) {
message.warning("请勾选《安全进港须知》并签字"); message.warning("请勾选《安全进港须知》并签字");
return; return;
} }
const { id: informSignId } = await uploadFile({
files: [{ originFileObj: values.informSignFile }],
single: false,
params: { foreignKey: "", type: UPLOAD_FILE_TYPE_ENUM[611] },
});
const { success } = await props["personnelApplicationAdd"]({ const { success } = await props["personnelApplicationAdd"]({
...values, ...values,
gateLevelAuthArea: JSON.stringify({ area: values.area }), gateLevelAuthArea: JSON.stringify({ area: values.area }),
visitStartTime: values.visitTime[0],
visitEndTime: values.visitTime[1],
personApplyList: personnelList.map(item => ({
personCorpId: item.corpId,
personCorpName: item.corpName,
personDepartmentId: item.deptId,
personDepartmentName: item.deptName,
employeePersonUserId: item.userId,
employeePersonUserName: item.userName,
userFaceUrl: item.userFaceUrl,
userPhone: item.phone,
userCard: item.userCard,
...item,
})),
informSignId,
personBelongType: 3,
}); });
if (success) { if (success) {
message.success("操作成功"); message.success("操作成功");
@ -52,12 +104,51 @@ function Add(props) {
<FormBuilder <FormBuilder
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}
loading={props.personnelApplication.personnelApplicationLoading} loading={props.personnelApplication.personnelApplicationLoading || uploadFileLoading}
options={[ options={[
{ name: "todo1", label: "项目", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] }, {
{ name: "todo2", label: "审核部门", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] }, name: "projectId",
{ name: "todo3", label: "审核人员", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] }, label: "项目",
{ name: "todo4", label: "时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE }, render: FORM_ITEM_RENDER_ENUM.SELECT,
items: xgfProjectListAll,
itemsField: { labelKey: "projectName", valueKey: "id" },
componentProps: {
onChange: (value) => {
const item = xgfProjectListAll.find(i => i.id === value) || {};
form.setFieldValue("projectName", item.projectName);
if (value) {
getXgfProjectUserGetPeopleProject(value);
}
else {
setXgfProjectUser([]);
}
},
},
},
{ name: "projectName", label: "项目名称", onlyForLabel: true },
{
name: "auditUserId",
label: "审核人员",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: approvalUserListAll,
itemsField: { labelKey: item => `${item.userName}${item.corpName}${item.deptName}`, valueKey: "userId" },
componentProps: {
onChange: (value) => {
const item = approvalUserListAll.find(item => item.userId === value);
form.setFieldValue("auditUserName", item.userName);
form.setFieldValue("auditCorpId", item.corpId);
form.setFieldValue("auditCorpName", item.corpName);
form.setFieldValue("auditDeptId", item.deptId);
form.setFieldValue("auditDeptName", item.deptName);
},
},
},
{ name: "auditUserName", label: "审核人员名称", onlyForLabel: true },
{ name: "auditCorpId", label: "审核企业ID", onlyForLabel: true },
{ name: "auditCorpName", label: "审核企业名称", onlyForLabel: true },
{ name: "auditDeptId", label: "审核部门ID", onlyForLabel: true },
{ name: "auditDeptName", label: "审核部门名称", onlyForLabel: true },
{ name: "visitTime", label: "时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
{ {
name: "gateLevelAuthArea", name: "gateLevelAuthArea",
label: "访问港区", label: "访问港区",
@ -65,7 +156,7 @@ function Add(props) {
<DictionarySelect <DictionarySelect
dictValue="HG_AUTH_AREA" dictValue="HG_AUTH_AREA"
onGetOption={(option) => { onGetOption={(option) => {
const area = { value: option.dictLabel, bianma: option.dictValue }; const area = [{ value: option.dictLabel, bianma: option.dictValue }];
form.setFieldValue("area", area); form.setFieldValue("area", area);
}} }}
onChange={() => { onChange={() => {
@ -102,7 +193,12 @@ function Add(props) {
<Button <Button
type="primary" type="primary"
onClick={() => { onClick={() => {
if (!form.getFieldValue("projectId")) {
message.warning("请先选择项目");
}
else {
setAddPersonnelModalVisible(true); setAddPersonnelModalVisible(true);
}
}} }}
> >
添加人员 添加人员
@ -111,8 +207,8 @@ function Add(props) {
options={false} options={false}
disabledResizer={true} disabledResizer={true}
columns={[ columns={[
{ title: "姓名", dataIndex: "todo1" }, { title: "姓名", dataIndex: "name" },
{ title: "部门", dataIndex: "todo2" }, { title: "部门", dataIndex: "deptName" },
{ title: "是否培训", dataIndex: "todo3" }, { title: "是否培训", dataIndex: "todo3" },
{ title: "现口门权限范围", dataIndex: "todo4" }, { title: "现口门权限范围", dataIndex: "todo4" },
{ {
@ -128,7 +224,7 @@ function Add(props) {
title: "删除确认", title: "删除确认",
content: "确定删除吗?", content: "确定删除吗?",
onOk: () => { onOk: () => {
setPersonnelList(personnelList.filter(item => item.id !== record.id)); setPersonnelList(personnelList.filter(item => item.userId !== record.userId));
}, },
}); });
}} }}
@ -144,12 +240,18 @@ function Add(props) {
), ),
}, },
{ {
name: "todo7", name: "securityProtocol",
label: " ", label: " ",
span: 24, span: 24,
required: false, required: false,
rules: [{ required: true, message: "请勾选" }], rules: [{ required: true, message: "请勾选" }],
formItemProps: { colon: false, required: false, style: { textAlign: "center" }, labelCol: { span: 0 }, wrapperCol: { span: 24 } }, formItemProps: {
colon: false,
required: false,
style: { textAlign: "center" },
labelCol: { span: 0 },
wrapperCol: { span: 24 },
},
render: FORM_ITEM_RENDER_ENUM.CHECKBOX, render: FORM_ITEM_RENDER_ENUM.CHECKBOX,
items: [{ items: [{
bianma: "1", bianma: "1",
@ -169,13 +271,14 @@ function Add(props) {
), ),
}], }],
}, },
{ name: "todo8", label: "签字", onlyForLabel: true }, { name: "informSignFile", label: "签字", onlyForLabel: true },
]} ]}
/> />
{ {
addPersonnelModalVisible && ( addPersonnelModalVisible && (
<AddPersonnelModal <AddPersonnelModal
personnelList={personnelList} personnelList={personnelList}
xgfProjectUser={xgfProjectUser}
onCancel={() => { onCancel={() => {
setAddPersonnelModalVisible(false); setAddPersonnelModalVisible(false);
}} }}
@ -194,7 +297,7 @@ function Add(props) {
setNeedToKnowModalVisible(false); setNeedToKnowModalVisible(false);
}} }}
onOk={(values) => { onOk={(values) => {
form.setFieldValue("todo8", values); form.setFieldValue("informSignFile", values.file);
signatureUrl.current = values.base64; signatureUrl.current = values.base64;
setNeedToKnowModalVisible(false); setNeedToKnowModalVisible(false);
}} }}
@ -206,7 +309,7 @@ function Add(props) {
} }
const AddPersonnelModalComponent = (props) => { const AddPersonnelModalComponent = (props) => {
const [selectedRowKeys, setSelectedRowKeys] = useState(props.personnelList.map(item => item.id)); const [selectedRowKeys, setSelectedRowKeys] = useState(props.personnelList.map(item => item.userId));
const selectedRowsRef = useRef(props.personnelList || []); const selectedRowsRef = useRef(props.personnelList || []);
@ -237,13 +340,14 @@ const AddPersonnelModalComponent = (props) => {
}} }}
options={false} options={false}
disabledResizer={true} disabledResizer={true}
rowKey="userId"
columns={[ columns={[
{ title: "姓名", dataIndex: "todo1" }, { title: "姓名", dataIndex: "userName" },
{ title: "部门", dataIndex: "todo2" }, { title: "部门", dataIndex: "deptName" },
{ title: "是否培训", dataIndex: "todo3" }, { title: "是否培训", dataIndex: "todo3" },
{ title: "现口门权限范围", dataIndex: "todo4" }, { title: "现口门权限范围", dataIndex: "todo4" },
]} ]}
dataSource={[]} dataSource={props.xgfProjectUser}
pagination={false} pagination={false}
/> />
</Modal> </Modal>
@ -252,4 +356,4 @@ const AddPersonnelModalComponent = (props) => {
const AddPersonnelModal = Connect([NS_PERSONNEL_APPLICATION], true)(AddPersonnelModalComponent); const AddPersonnelModal = Connect([NS_PERSONNEL_APPLICATION], true)(AddPersonnelModalComponent);
export default Connect([NS_PERSONNEL_APPLICATION, NS_FIRST_LEVEL_DOOR_INFO], true)(Add); export default Connect([NS_PERSONNEL_APPLICATION, NS_FIRST_LEVEL_DOOR_INFO, NS_ENCLOSED_AREA_PERSONNEL_APPLY, NS_APPROVER_USER], true)(Add);

View File

@ -6,17 +6,24 @@ import Page from "zy-react-library/components/Page";
import PreviewImg from "zy-react-library/components/PreviewImg"; 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 { 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 { getLabelName } from "zy-react-library/utils";
import { ENCLOSED_AREA_AUDIT_STATUS_ENUM } from "~/enumerate/constant";
import { NS_PERSONNEL_APPLICATION } from "~/enumerate/namespace"; import { NS_PERSONNEL_APPLICATION } from "~/enumerate/namespace";
function List(props) { function List(props) {
const [currentId, setCurrentId] = useState(""); const [currentId, setCurrentId] = useState("");
const [reasonsRefusal, setCurrentReasonsRefusal] = useState("");
const [viewRejectReasonModalVisible, setViewRejectReasonModalVisible] = useState(false); const [viewRejectReasonModalVisible, setViewRejectReasonModalVisible] = useState(false);
const [viewModalVisible, setViewModalVisible] = useState(false); const [viewModalVisible, setViewModalVisible] = useState(false);
const [form] = Search.useForm(); const [form] = Search.useForm();
const { tableProps, getData } = useTable(props["personnelApplicationList"], { const { tableProps, getData } = useTable(props["personnelApplicationList"], {
form, form,
params: { processOrRecord: !props.isRecords ? 1 : 2 },
}); });
return ( return (
@ -25,13 +32,22 @@ function List(props) {
labelCol={{ span: 4 }} labelCol={{ span: 4 }}
options={[ options={[
{ name: "todo1", label: "姓名" }, { name: "todo1", label: "姓名" },
{ name: "todo2", label: "项目名称" }, { name: "projectName", label: "项目名称" },
{
name: "auditFlag",
label: "审核状态",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: ENCLOSED_AREA_AUDIT_STATUS_ENUM,
hidden: !props.isRecords,
},
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
/> />
<Table <Table
toolBarRender={() => ( toolBarRender={() => (
<Space>
{!props.isRecords && (
<Button <Button
type="primary" type="primary"
icon={(<AddIcon />)} icon={(<AddIcon />)}
@ -42,16 +58,30 @@ function List(props) {
新增申请 新增申请
</Button> </Button>
)} )}
</Space>
)}
columns={[ columns={[
{ title: "项目名称", dataIndex: "todo1" }, { title: "项目名称", dataIndex: "projectName" },
{ title: "区域范围", dataIndex: "todo2" }, {
{ title: "访问期限", dataIndex: "todo3" }, title: "区域范围",
{ title: "项目人员数", dataIndex: "todo4" }, 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: "personApplyCount" },
{ title: "申请时间", dataIndex: "todo5" }, { title: "申请时间", dataIndex: "todo5" },
{ title: "审核状态", dataIndex: "todo6" }, {
title: "审核状态",
dataIndex: "auditFlag",
render: (_, record) => getLabelName({ list: ENCLOSED_AREA_AUDIT_STATUS_ENUM, status: record.auditFlag }),
},
{ {
title: "操作", title: "操作",
width: 100, width: 150,
fixed: "right", fixed: "right",
render: (_, record) => ( render: (_, record) => (
<Space> <Space>
@ -64,15 +94,17 @@ function List(props) {
> >
查看 查看
</Button> </Button>
{record.auditFlag === 3 && (
<Button <Button
type="link" type="link"
onClick={() => { onClick={() => {
setViewRejectReasonModalVisible(true); setViewRejectReasonModalVisible(true);
setCurrentId(record.id); setCurrentReasonsRefusal(record.reasonsRefusal);
}} }}
> >
查看原因 查看原因
</Button> </Button>
)}
</Space> </Space>
), ),
}, },
@ -82,10 +114,10 @@ function List(props) {
{ {
viewRejectReasonModalVisible && ( viewRejectReasonModalVisible && (
<ViewRejectReasonModal <ViewRejectReasonModal
id={currentId} reasonsRefusal={reasonsRefusal}
onCancel={() => { onCancel={() => {
setViewRejectReasonModalVisible(false); setViewRejectReasonModalVisible(false);
setCurrentId(""); setCurrentReasonsRefusal("");
}} }}
/> />
) )
@ -105,17 +137,7 @@ function List(props) {
); );
} }
const ViewRejectReasonModalComponent = (props) => { const ViewRejectReasonModal = (props) => {
const [info, setInfo] = useState({});
const getData = async () => {
const { data } = await props["personnelApplicationRejectReason"]({ id: props.id });
setInfo(data);
};
useEffect(() => {
getData();
}, []);
return ( return (
<Modal <Modal
open open
@ -126,14 +148,13 @@ const ViewRejectReasonModalComponent = (props) => {
footer={[ footer={[
<Button key="cancel" onClick={props.onCancel}>取消</Button>, <Button key="cancel" onClick={props.onCancel}>取消</Button>,
]} ]}
loading={props.personnelApplication.personnelApplicationLoading}
> >
<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>
@ -142,9 +163,16 @@ const ViewRejectReasonModalComponent = (props) => {
const ViewModalComponent = (props) => { const ViewModalComponent = (props) => {
const [info, setInfo] = useState({}); const [info, setInfo] = useState({});
const { loading: getFileLoading, getFile } = useGetFile();
const getData = async () => { const getData = async () => {
const { data } = await props["personnelApplicationInfo"]({ id: props.id }); const { data } = await props["personnelApplicationInfo"]({ id: props.id });
setInfo(data); const informSignFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[611], eqForeignKey: data.informSignId });
setInfo({
...data,
informSignFile,
});
}; };
useEffect(() => { useEffect(() => {
@ -161,7 +189,7 @@ const ViewModalComponent = (props) => {
footer={[ footer={[
<Button key="cancel" onClick={props.onCancel}>取消</Button>, <Button key="cancel" onClick={props.onCancel}>取消</Button>,
]} ]}
loading={props.personnelApplication.personnelApplicationLoading} loading={props.personnelApplication.personnelApplicationLoading || getFileLoading}
> >
<Divider orientation="left">申请信息</Divider> <Divider orientation="left">申请信息</Divider>
<Descriptions <Descriptions
@ -169,13 +197,16 @@ const ViewModalComponent = (props) => {
bordered bordered
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "项目名称", children: info.todo1 }, { label: "项目名称", children: info.projectName },
{ label: "区域范围", children: info.todo2 }, {
{ label: "访问期限", children: `${info.todo3}-${info.todo4}` }, label: "区域范围",
{ label: "项目人员数", children: info.todo5 }, children: info.gateLevelAuthArea && JSON.parse(info.gateLevelAuthArea).area.map(item => item.value).join("、"),
},
{ label: "访问期限", children: `${info.visitStartTime}-${info.visitEndTime}` },
{ label: "项目人员数", children: info.personApplyList?.length },
{ label: "申请时间", children: info.todo6 }, { label: "申请时间", children: info.todo6 },
{ label: "申请状态", children: info.todo7 }, { label: "申请状态", children: getLabelName({ list: ENCLOSED_AREA_AUDIT_STATUS_ENUM, status: info.auditFlag }) },
{ label: "申请人签字", children: (<PreviewImg files={info.todo8} />) }, { label: "申请人签字", children: (<PreviewImg files={info.informSignFile} />) },
]} ]}
/> />
<Divider orientation="left">人员信息</Divider> <Divider orientation="left">人员信息</Divider>
@ -183,19 +214,18 @@ const ViewModalComponent = (props) => {
options={false} options={false}
disabledResizer={true} disabledResizer={true}
columns={[ columns={[
{ title: "姓名", dataIndex: "todo1" }, { title: "姓名", dataIndex: "employeePersonUserName" },
{ title: "部门", dataIndex: "todo2" }, { title: "部门", dataIndex: "personDepartmentName" },
{ title: "是否培训", dataIndex: "todo3" }, { title: "是否培训", dataIndex: "todo3" },
{ title: "现口门权限范围", dataIndex: "todo4" }, { title: "现口门权限范围", dataIndex: "todo4" },
]} ]}
dataSource={info.todo9} dataSource={info.personApplyList}
pagination={false} pagination={false}
/> />
</Modal> </Modal>
); );
}; };
const ViewRejectReasonModal = Connect([NS_PERSONNEL_APPLICATION], true)(ViewRejectReasonModalComponent);
const ViewModal = Connect([NS_PERSONNEL_APPLICATION], true)(ViewModalComponent); const ViewModal = Connect([NS_PERSONNEL_APPLICATION], true)(ViewModalComponent);
export default Connect([NS_PERSONNEL_APPLICATION], true)(List); export default Connect([NS_PERSONNEL_APPLICATION], true)(List);

View File

@ -1,196 +1,7 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime"; import ListPage from "../../PersonnelApplication/List";
import { Button, Descriptions, Divider, Modal, Space } from "antd";
import { useEffect, useState } from "react";
import Page from "zy-react-library/components/Page";
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 useTable from "zy-react-library/hooks/useTable";
import { NS_PERSONNEL_APPLICATION } from "~/enumerate/namespace";
const REVIEW_STATUS_ENUM = [
{ bianma: "todo1", name: "已完成" },
{ bianma: "todo2", name: "待审核" },
{ bianma: "todo3", name: "已驳回" },
];
function List(props) { function List(props) {
const [currentId, setCurrentId] = useState(""); return (<ListPage isRecords={true} {...props} />);
const [viewRejectReasonModalVisible, setViewRejectReasonModalVisible] = useState(false);
const [viewModalVisible, setViewModalVisible] = useState(false);
const [form] = Search.useForm();
const { tableProps, getData } = useTable(props["personnelApplicationList"], {
form,
});
return (
<Page isShowAllAction={false}>
<Search
labelCol={{ span: 4 }}
options={[
{ name: "todo1", label: "姓名" },
{ name: "todo2", label: "项目名称" },
{ name: "todo3", label: "审核状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: REVIEW_STATUS_ENUM },
]}
form={form}
onFinish={getData}
/>
<Table
columns={[
{ title: "项目名称", dataIndex: "todo1" },
{ title: "区域范围", dataIndex: "todo2" },
{ title: "访问期限", dataIndex: "todo3" },
{ title: "项目人员数", dataIndex: "todo4" },
{ title: "申请时间", dataIndex: "todo5" },
{ title: "审核状态", dataIndex: "todo6" },
{
title: "操作",
width: 100,
fixed: "right",
render: (_, record) => (
<Space>
<Button
type="link"
onClick={() => {
setViewModalVisible(true);
setCurrentId(record.id);
}}
>
查看
</Button>
<Button
type="link"
onClick={() => {
setViewRejectReasonModalVisible(true);
setCurrentId(record.id);
}}
>
查看原因
</Button>
</Space>
),
},
]}
{...tableProps}
/>
{
viewRejectReasonModalVisible && (
<ViewRejectReasonModal
id={currentId}
onCancel={() => {
setViewRejectReasonModalVisible(false);
setCurrentId("");
}}
/>
)
}
{
viewModalVisible && (
<ViewModal
id={currentId}
onCancel={() => {
setViewModalVisible(false);
setCurrentId("");
}}
/>
)
}
</Page>
);
}
const ViewRejectReasonModalComponent = (props) => {
const [info, setInfo] = useState({});
const getData = async () => {
const { data } = await props["personnelApplicationRejectReason"]({ id: props.id });
setInfo(data);
}; };
useEffect(() => { export default List;
getData();
}, []);
return (
<Modal
open
title="驳回原因"
maskClosable={false}
onCancel={props.onCancel}
width={600}
footer={[
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
]}
loading={props.personnelApplication.personnelApplicationLoading}
>
<Descriptions
column={1}
bordered
styles={{ label: { width: 200 } }}
items={[
{ label: "驳回原因", children: info.todo1 },
]}
/>
</Modal>
);
};
const ViewModalComponent = (props) => {
const [info, setInfo] = useState({});
const getData = async () => {
const { data } = await props["personnelApplicationInfo"]({ id: props.id });
setInfo(data);
};
useEffect(() => {
getData();
}, []);
return (
<Modal
open
title="查看"
maskClosable={false}
onCancel={props.onCancel}
width={600}
footer={[
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
]}
loading={props.personnelApplication.personnelApplicationLoading}
>
<Divider orientation="left">申请信息</Divider>
<Descriptions
column={1}
bordered
styles={{ label: { width: 200 } }}
items={[
{ label: "项目名称", children: info.todo1 },
{ label: "区域范围", children: info.todo2 },
{ label: "访问期限", children: `${info.todo3}-${info.todo4}` },
{ label: "项目人员数", children: info.todo5 },
{ label: "申请时间", children: info.todo6 },
{ label: "申请状态", children: info.todo7 },
{ label: "申请人签字", children: (<PreviewImg files={info.todo8} />) },
]}
/>
<Divider orientation="left">人员信息</Divider>
<Table
options={false}
disabledResizer={true}
columns={[
{ title: "姓名", dataIndex: "todo1" },
{ title: "部门", dataIndex: "todo2" },
{ title: "是否培训", dataIndex: "todo3" },
{ title: "现口门权限范围", dataIndex: "todo4" },
]}
dataSource={info.todo9}
pagination={false}
/>
</Modal>
);
};
const ViewRejectReasonModal = Connect([NS_PERSONNEL_APPLICATION], true)(ViewRejectReasonModalComponent);
const ViewModal = Connect([NS_PERSONNEL_APPLICATION], true)(ViewModalComponent);
export default Connect([NS_PERSONNEL_APPLICATION], true)(List);

View File

@ -22,18 +22,18 @@ function List(props) {
<Search <Search
labelCol={{ span: 4 }} labelCol={{ span: 4 }}
options={[ options={[
{ name: "todo1", label: "姓名" }, { name: "employeePersonUserName", label: "姓名" },
{ name: "todo2", label: "项目名称" }, { name: "projectName", label: "项目名称" },
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
/> />
<Table <Table
columns={[ columns={[
{ title: "姓名", dataIndex: "todo1" }, { title: "姓名", dataIndex: "employeePersonUserName" },
{ title: "部门", dataIndex: "todo2" }, { title: "部门", dataIndex: "personDepartmentName" },
{ title: "是否培训", dataIndex: "todo3" }, { title: "是否培训", dataIndex: "todo3" },
{ title: "涉及项目", dataIndex: "todo4" }, { title: "涉及项目", dataIndex: "projectName" },
{ title: "口门权限范围", dataIndex: "todo5" }, { title: "口门权限范围", dataIndex: "todo5" },
{ {
title: "操作", title: "操作",
@ -99,14 +99,14 @@ const InfoModalComponent = (props) => {
column={1} column={1}
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "姓名", children: info.todo1 }, { label: "姓名", children: info.applyPersonUserName },
{ label: "手机号", children: info.todo2 }, { label: "手机号", children: info.userPhone },
{ label: "身份证号", children: info.todo3 }, { label: "身份证号", children: info.userCard },
{ label: "访问起始时间", children: info.todo4 }, { label: "访问起始时间", children: info.visitStartTime },
{ label: "访问结束时间", children: info.todo5 }, { label: "访问结束时间", children: info.visitEndTime },
{ label: "口门权限范围", children: info.todo6 }, { label: "口门权限范围", children: info.todo6 },
{ label: "涉及项目", children: info.todo7 }, { label: "涉及项目", children: info.projectName },
{ label: "人脸照片", children: (<PreviewImg files={info.todo8} />) }, { label: "人脸照片", children: (<PreviewImg files={[info.userFaceUrl]} />) },
{ label: "申请时间", children: info.todo9 }, { label: "申请时间", children: info.todo9 },
{ label: "审核人", children: info.todo10 }, { label: "审核人", children: info.todo10 },
{ label: "审核时间", children: info.todo11 }, { label: "审核时间", children: info.todo11 },

View File

@ -1,7 +1,7 @@
import ShareVehiclesPage from "~/pages/Container/Supervision/FirstLevelDoor/PortEntryApproval/LongTermVehicleApproval/ShareVehicles"; import ShareVehiclesPage from "~/pages/Container/Supervision/FirstLevelDoor/PortEntryApproval/LongTermVehicleApproval/ShareVehicles";
function ShareVehicles(props) { function ShareVehicles(props) {
return (<ShareVehiclesPage {...props} />); return (<ShareVehiclesPage vehicleBelongTypeArr="8" {...props} />);
} }
export default ShareVehicles; export default ShareVehicles;

View File

@ -0,0 +1,7 @@
import ListPage from "~/pages/Container/Supervision/FirstLevelDoor/PortEntryApproval/TemporaryVisitor/TemporaryPersonnelRecords/List";
function List(props) {
return (<ListPage {...props} />);
}
export default List;

View File

@ -0,0 +1,7 @@
import ViewPage from "~/pages/Container/Supervision/FirstLevelDoor/PortEntryApproval/TemporaryVisitor/TemporaryPersonnelRecords/View";
function View(props) {
return (<ViewPage {...props} />);
}
export default View;

View File

@ -0,0 +1,5 @@
function TemporaryPersonnelRecords(props) {
return props.children;
}
export default TemporaryPersonnelRecords;

View File

@ -0,0 +1,7 @@
import ListPage from "~/pages/Container/Supervision/FirstLevelDoor/PortEntryApproval/TemporaryVisitor/TemporaryVehicleRecords/List";
function List(props) {
return (<ListPage {...props} />);
}
export default List;

View File

@ -0,0 +1,7 @@
import ViewPage from "~/pages/Container/Supervision/FirstLevelDoor/PortEntryApproval/TemporaryVisitor/TemporaryVehicleRecords/View";
function View(props) {
return (<ViewPage {...props} />);
}
export default View;

View File

@ -0,0 +1,5 @@
function TemporaryVehicleRecords(props) {
return props.children;
}
export default TemporaryVehicleRecords;

View File

@ -1,33 +1,62 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, message } from "antd"; import { Button, message } from "antd";
import dayjs from "dayjs";
import { useEffect, useRef, useState } from "react"; import { useEffect, useRef, useState } from "react";
import FormBuilder from "zy-react-library/components/FormBuilder"; import FormBuilder from "zy-react-library/components/FormBuilder";
import Page from "zy-react-library/components/Page"; import Page from "zy-react-library/components/Page";
import DictionarySelect from "zy-react-library/components/Select/Dictionary"; import DictionarySelect from "zy-react-library/components/Select/Dictionary";
import PersonnelSelect from "zy-react-library/components/Select/Personnel/Gwj";
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
import Upload from "zy-react-library/components/Upload"; import Upload from "zy-react-library/components/Upload";
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 useUploadFile from "zy-react-library/hooks/useUploadFile";
import { LICENSE_PLATE_NUMBER } from "zy-react-library/regular"; import { LICENSE_PLATE_NUMBER } from "zy-react-library/regular";
import { getLabelName } from "zy-react-library/utils"; import { getLabelName } from "zy-react-library/utils";
import NeedToKnowModal from "~/components/NeedToKnowModal"; import NeedToKnowModal from "~/components/NeedToKnowModal";
import { NS_FIRST_LEVEL_DOOR_INFO, NS_VEHICLE_APPLICATION } from "~/enumerate/namespace"; import {
NS_APPROVER_USER,
NS_ENCLOSED_AREA_PERSONNEL_APPLY,
NS_FIRST_LEVEL_DOOR_INFO,
NS_VEHICLE_APPLY,
} from "~/enumerate/namespace";
function Add(props) { function Add(props) {
const [form] = FormBuilder.useForm(); const [form] = FormBuilder.useForm();
const todo7 = FormBuilder.useWatch("todo7", form);
const gateLevelAuthArea = FormBuilder.useWatch("gateLevelAuthArea", form); const gateLevelAuthArea = FormBuilder.useWatch("gateLevelAuthArea", form);
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
const [needToKnowModalVisible, setNeedToKnowModalVisible] = useState(false); const [needToKnowModalVisible, setNeedToKnowModalVisible] = useState(false);
const [firstLevelDoorInfoListAll, setFirstLevelDoorInfoListAll] = useState([]); const [firstLevelDoorInfoListAll, setFirstLevelDoorInfoListAll] = useState([]);
const [xgfProjectListAll, setXgfProjectListAll] = useState([]);
const [approvalUserListAll, setApprovalUserListAll] = useState([]);
const [xgfProjectUser, setXgfProjectUser] = useState([]);
const signatureUrl = useRef(""); const signatureUrl = useRef("");
const getXgfProjectListAll = async () => {
const { data } = await props["xgfProjectListAll"]();
setXgfProjectListAll(data);
};
const getApprovalUserListAll = async () => {
const { data } = await props["approvalUserListAll"]({ vehiclePermissionFlag: 1 });
setApprovalUserListAll(data);
};
const getXgfProjectUserGetPeopleProject = async (id) => {
const { data } = await props["xgfProjectUserGetPeopleProject"]({ id });
setXgfProjectUser(data);
};
const getFirstLevelDoorInfoListAll = async () => { const getFirstLevelDoorInfoListAll = async () => {
const { data } = await props["firstLevelDoorInfoListAll"]({ mkmjLevel: 1, hgAuthArea: gateLevelAuthArea }); const { data } = await props["firstLevelDoorInfoListAll"]({ mkmjLevel: 1, hgAuthArea: gateLevelAuthArea });
setFirstLevelDoorInfoListAll(data); setFirstLevelDoorInfoListAll(data);
}; };
useEffect(() => {
getXgfProjectListAll();
getApprovalUserListAll();
}, []);
useEffect(() => { useEffect(() => {
if (gateLevelAuthArea) { if (gateLevelAuthArea) {
getFirstLevelDoorInfoListAll(); getFirstLevelDoorInfoListAll();
@ -35,13 +64,34 @@ function Add(props) {
}, [gateLevelAuthArea]); }, [gateLevelAuthArea]);
const onSubmit = async (values) => { const onSubmit = async (values) => {
if (!values.todo15) { if (!values.informSignFile) {
message.warning("请勾选《安全进港须知》并签字"); message.warning("请勾选《安全进港须知》并签字");
return; return;
} }
const { success } = await props["vehicleApplicationAdd"]({ const { id: informSignId } = await uploadFile({
files: [{ originFileObj: values.informSignFile }],
single: false,
params: { foreignKey: "", type: UPLOAD_FILE_TYPE_ENUM[606] },
});
const { id: drivingLicenseId } = await uploadFile({
files: values.drivingLicenseFile,
single: false,
params: { foreignKey: "", type: UPLOAD_FILE_TYPE_ENUM[601] },
});
const { id: attachmentId } = await uploadFile({
files: values.attachmentFile,
single: false,
params: { foreignKey: "", type: UPLOAD_FILE_TYPE_ENUM[602] },
});
const { success } = await props["vehicleApplyAdd"]({
...values, ...values,
gateLevelAuthArea: JSON.stringify({ area: values.area }), gateLevelAuthArea: JSON.stringify({ area: values.area }),
visitStartTime: values.visitTime[0],
visitEndTime: values.visitTime[1],
informSignId,
drivingLicenseId,
attachmentId,
vehicleBelongType: 5,
}); });
if (success) { if (success) {
message.success("操作成功"); message.success("操作成功");
@ -54,12 +104,55 @@ function Add(props) {
<FormBuilder <FormBuilder
form={form} form={form}
onFinish={onSubmit} onFinish={onSubmit}
loading={props.vehicleApplication.vehicleApplicationLoading} loading={props.vehicleApply.vehicleApplyLoading || uploadFileLoading}
options={[ options={[
{ name: "todo1", label: "项目", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] }, {
{ name: "todo2", label: "审核部门", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] }, name: "projectId",
{ name: "todo3", label: "审核人员", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [] }, label: "项目",
{ name: "todo4", label: "时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE }, render: FORM_ITEM_RENDER_ENUM.SELECT,
items: xgfProjectListAll,
itemsField: { labelKey: "projectName", valueKey: "id" },
componentProps: {
onChange: (value) => {
const item = xgfProjectListAll.find(i => i.id === value) || {};
form.setFieldValue("projectName", item.projectName);
form.setFieldValue("drivingUserId", "");
form.setFieldValue("drivingUserName", "");
if (value) {
getXgfProjectUserGetPeopleProject(value);
form.setFieldValue("visitTime", [dayjs(item.startProjectTime).format("YYYY-MM-DD"), dayjs(item.endProjectTime).format("YYYY-MM-DD")]);
}
else {
setXgfProjectUser([]);
form.setFieldValue("visitTime", []);
}
},
},
},
{ name: "projectName", label: "项目名称", onlyForLabel: true },
{
name: "auditUserId",
label: "审核人员",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: approvalUserListAll,
itemsField: { labelKey: item => `${item.userName}${item.corpName}${item.deptName}`, valueKey: "userId" },
componentProps: {
onChange: (value) => {
const item = approvalUserListAll.find(item => item.userId === value);
form.setFieldValue("auditUserName", item.userName);
form.setFieldValue("auditCorpId", item.corpId);
form.setFieldValue("auditCorpName", item.corpName);
form.setFieldValue("auditDeptId", item.deptId);
form.setFieldValue("auditDeptName", item.deptName);
},
},
},
{ name: "auditUserName", label: "审核人员名称", onlyForLabel: true },
{ name: "auditCorpId", label: "审核企业ID", onlyForLabel: true },
{ name: "auditCorpName", label: "审核企业名称", onlyForLabel: true },
{ name: "auditDeptId", label: "审核部门ID", onlyForLabel: true },
{ name: "auditDeptName", label: "审核部门名称", onlyForLabel: true },
{ name: "visitTime", label: "时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE, componentProps: { disabled: true } },
{ {
name: "gateLevelAuthArea", name: "gateLevelAuthArea",
label: "访问港区", label: "访问港区",
@ -67,7 +160,7 @@ function Add(props) {
<DictionarySelect <DictionarySelect
dictValue="HG_AUTH_AREA" dictValue="HG_AUTH_AREA"
onGetOption={(option) => { onGetOption={(option) => {
const area = { value: option.dictLabel, bianma: option.dictValue }; const area = [{ value: option.dictLabel, bianma: option.dictValue }];
form.setFieldValue("area", area); form.setFieldValue("area", area);
}} }}
onChange={() => { onChange={() => {
@ -95,20 +188,62 @@ function Add(props) {
}, },
}, },
{ name: "mkmjName", label: "访问口门名称", onlyForLabel: true }, { name: "mkmjName", label: "访问口门名称", onlyForLabel: true },
{ name: "todo7", label: "驾驶人员部门", render: (<DepartmentSelectTree />) },
{ name: "todo8", label: "驾驶人员", render: (<PersonnelSelect params={{ departmentId: todo7 }} />) },
{ name: "todo9", label: "车牌类型", render: (<DictionarySelect dictValue="LICENSE_PLATE_TYPE" />) },
{ name: "todo10", label: "车辆类型", render: (<DictionarySelect dictValue="VEHICLE_TYPE" />) },
{ name: "todo11", label: "车牌号", rules: [{ pattern: LICENSE_PLATE_NUMBER, message: "请输入正确的车牌号" }] },
{ name: "todo12", label: "车辆照片", span: 24, render: (<Upload />) },
{ name: "todo13", label: "行驶证照片", span: 24, render: (<Upload />) },
{ {
name: "todo15", name: "drivingUserId",
label: "驾驶人员",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: xgfProjectUser,
itemsField: { labelKey: "userName", valueKey: "userId" },
componentProps: {
onChange: (value) => {
form.setFieldValue("drivingUserName", getLabelName({
list: xgfProjectUser,
status: value,
idKey: "userId",
nameKey: "userName",
}));
},
},
},
{ name: "drivingUserName", label: "驾驶人员名称", onlyForLabel: true },
{
name: "licenceType",
label: "车牌类型",
render: (
<DictionarySelect
dictValue="LICENSE_PLATE_TYPE"
onGetLabel={label => form.setFieldValue("licenceTypeName", label)}
/>
),
},
{ name: "licenceTypeName", label: "车牌类型名称", onlyForLabel: true },
{
name: "vehicleType",
label: "车辆类型",
render: (
<DictionarySelect
dictValue="VEHICLE_TYPE"
onGetLabel={label => form.setFieldValue("vehicleTypeName", label)}
/>
),
},
{ name: "vehicleTypeName", label: "车辆类型名称", onlyForLabel: true },
{ name: "licenceNo", label: "车牌号", rules: [{ pattern: LICENSE_PLATE_NUMBER, message: "请输入正确的车牌号" }] },
{ name: "attachmentFile", label: "车辆照片", span: 24, render: (<Upload />) },
{ name: "drivingLicenseFile", label: "行驶证照片", span: 24, render: (<Upload />) },
{
name: "securityProtocol",
label: " ", label: " ",
span: 24, span: 24,
required: false, required: false,
rules: [{ required: true, message: "请勾选" }], rules: [{ required: true, message: "请勾选" }],
formItemProps: { colon: false, required: false, style: { textAlign: "center" }, labelCol: { span: 0 }, wrapperCol: { span: 24 } }, formItemProps: {
colon: false,
required: false,
style: { textAlign: "center" },
labelCol: { span: 0 },
wrapperCol: { span: 24 },
},
render: FORM_ITEM_RENDER_ENUM.CHECKBOX, render: FORM_ITEM_RENDER_ENUM.CHECKBOX,
items: [{ items: [{
bianma: "1", bianma: "1",
@ -128,7 +263,7 @@ function Add(props) {
), ),
}], }],
}, },
{ name: "todo8", label: "签字", onlyForLabel: true }, { name: "informSignFile", label: "签字", onlyForLabel: true },
]} ]}
/> />
{ {
@ -139,7 +274,7 @@ function Add(props) {
setNeedToKnowModalVisible(false); setNeedToKnowModalVisible(false);
}} }}
onOk={(values) => { onOk={(values) => {
form.setFieldValue("todo8", values.file); form.setFieldValue("informSignFile", values.file);
signatureUrl.current = values.base64; signatureUrl.current = values.base64;
setNeedToKnowModalVisible(false); setNeedToKnowModalVisible(false);
}} }}
@ -150,4 +285,4 @@ function Add(props) {
); );
} }
export default Connect([NS_VEHICLE_APPLICATION, NS_FIRST_LEVEL_DOOR_INFO], true)(Add); export default Connect([NS_FIRST_LEVEL_DOOR_INFO, NS_ENCLOSED_AREA_PERSONNEL_APPLY, NS_APPROVER_USER, NS_VEHICLE_APPLY], true)(Add);

View File

@ -6,17 +6,24 @@ import Page from "zy-react-library/components/Page";
import PreviewImg from "zy-react-library/components/PreviewImg"; 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 { 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_VEHICLE_APPLICATION } from "~/enumerate/namespace"; import { getLabelName } from "zy-react-library/utils";
import { VEHICLE_AUDIT_STATUS_ENUM } from "~/enumerate/constant";
import { NS_VEHICLE_APPLY, NS_VEHICLE_AUDIT } from "~/enumerate/namespace";
function List(props) { function List(props) {
const [currentId, setCurrentId] = useState(""); const [currentId, setCurrentId] = useState("");
const [currentRemarks, setCurrentRemarks] = useState("");
const [viewRejectReasonModalVisible, setViewRejectReasonModalVisible] = useState(false); const [viewRejectReasonModalVisible, setViewRejectReasonModalVisible] = useState(false);
const [viewModalVisible, setViewModalVisible] = useState(false); const [viewModalVisible, setViewModalVisible] = useState(false);
const [form] = Search.useForm(); const [form] = Search.useForm();
const { tableProps, getData } = useTable(props["vehicleApplicationList"], { const { tableProps, getData } = useTable(props["vehicleAuditList"], {
form, form,
params: { vehicleBelongTypeArr: "5", processOrRecord: !props.isRecords ? 1 : 2 },
}); });
return ( return (
@ -24,14 +31,23 @@ function List(props) {
<Search <Search
labelCol={{ span: 4 }} labelCol={{ span: 4 }}
options={[ options={[
{ name: "todo1", label: "车牌号" }, { name: "licenceNo", label: "车牌号" },
{ name: "todo2", label: "项目名称" }, { name: "projectName", label: "项目名称" },
{
name: "auditStatus",
label: "审核状态",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: VEHICLE_AUDIT_STATUS_ENUM,
hidden: !props.isRecords,
},
]} ]}
form={form} form={form}
onFinish={getData} onFinish={getData}
/> />
<Table <Table
toolBarRender={() => ( toolBarRender={() => (
<Space>
{!props.isRecords && (
<Button <Button
type="primary" type="primary"
icon={(<AddIcon />)} icon={(<AddIcon />)}
@ -42,17 +58,31 @@ function List(props) {
新增申请 新增申请
</Button> </Button>
)} )}
</Space>
)}
columns={[ columns={[
{ title: "项目名称", dataIndex: "todo1" }, { title: "项目名称", dataIndex: "projectName" },
{ title: "区域范围", dataIndex: "todo2" }, {
{ title: "访问期限", dataIndex: "todo3" }, title: "区域范围",
{ title: "车辆类型", dataIndex: "todo4" }, dataIndex: "gateLevelAuthArea",
{ title: "车牌类型", dataIndex: "todo5" }, render: (_, record) => record.gateLevelAuthArea && JSON.parse(record.gateLevelAuthArea).area.map(item => item.value).join("、"),
{ title: "车牌号", dataIndex: "todo7" }, },
{ title: "审核状态", dataIndex: "todo6" }, {
title: "访问期限",
dataIndex: "visitStartTime",
render: (_, record) => `${record.visitStartTime}-${record.visitEndTime}`,
},
{ title: "车辆类型", dataIndex: "vehicleTypeName" },
{ title: "车牌类型", dataIndex: "licenceTypeName" },
{ title: "车牌号", dataIndex: "licenceNo" },
{
title: "审批状态",
dataIndex: "auditStatus",
render: (_, record) => getLabelName({ list: VEHICLE_AUDIT_STATUS_ENUM, status: record.auditStatus }),
},
{ {
title: "操作", title: "操作",
width: 100, width: 150,
fixed: "right", fixed: "right",
render: (_, record) => ( render: (_, record) => (
<Space> <Space>
@ -65,15 +95,17 @@ function List(props) {
> >
查看 查看
</Button> </Button>
{record.auditStatus === 3 && (
<Button <Button
type="link" type="link"
onClick={() => { onClick={() => {
setViewRejectReasonModalVisible(true); setViewRejectReasonModalVisible(true);
setCurrentId(record.id); setCurrentRemarks(record.remarks);
}} }}
> >
查看原因 查看原因
</Button> </Button>
)}
</Space> </Space>
), ),
}, },
@ -83,10 +115,10 @@ function List(props) {
{ {
viewRejectReasonModalVisible && ( viewRejectReasonModalVisible && (
<ViewRejectReasonModal <ViewRejectReasonModal
id={currentId} remarks={currentRemarks}
onCancel={() => { onCancel={() => {
setViewRejectReasonModalVisible(false); setViewRejectReasonModalVisible(false);
setCurrentId(""); setCurrentRemarks("");
}} }}
/> />
) )
@ -106,17 +138,7 @@ function List(props) {
); );
} }
const ViewRejectReasonModalComponent = (props) => { const ViewRejectReasonModal = (props) => {
const [info, setInfo] = useState({});
const getData = async () => {
const { data } = await props["vehicleApplicationRejectReason"]({ id: props.id });
setInfo(data);
};
useEffect(() => {
getData();
}, []);
return ( return (
<Modal <Modal
open open
@ -127,14 +149,13 @@ const ViewRejectReasonModalComponent = (props) => {
footer={[ footer={[
<Button key="cancel" onClick={props.onCancel}>取消</Button>, <Button key="cancel" onClick={props.onCancel}>取消</Button>,
]} ]}
loading={props.vehicleApplication.vehicleApplicationLoading}
> >
<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.remarks },
]} ]}
/> />
</Modal> </Modal>
@ -143,9 +164,23 @@ const ViewRejectReasonModalComponent = (props) => {
const ViewModalComponent = (props) => { const ViewModalComponent = (props) => {
const [info, setInfo] = useState({}); const [info, setInfo] = useState({});
const { loading: getFileLoading, getFile } = useGetFile();
const getData = async () => { const getData = async () => {
const { data } = await props["vehicleApplicationInfo"]({ id: props.id }); const { data } = await props["vehicleApplyInfo"]({ id: props.id });
setInfo(data); const drivingLicenseFile = await getFile({
eqType: UPLOAD_FILE_TYPE_ENUM[601],
eqForeignKey: data.drivingLicenseId,
});
const attachmentFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[602], eqForeignKey: data.attachmentId });
const informSignFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[606], eqForeignKey: data.informSignId });
setInfo({
...data,
drivingLicenseFile,
attachmentFile,
informSignFile,
});
}; };
useEffect(() => { useEffect(() => {
@ -162,7 +197,7 @@ const ViewModalComponent = (props) => {
footer={[ footer={[
<Button key="cancel" onClick={props.onCancel}>取消</Button>, <Button key="cancel" onClick={props.onCancel}>取消</Button>,
]} ]}
loading={props.vehicleApplication.vehicleApplicationLoading} loading={props.vehicleApply.vehicleApplyLoading || getFileLoading}
> >
<Divider orientation="left">申请信息</Divider> <Divider orientation="left">申请信息</Divider>
<Descriptions <Descriptions
@ -170,24 +205,26 @@ const ViewModalComponent = (props) => {
bordered bordered
styles={{ label: { width: 200 } }} styles={{ label: { width: 200 } }}
items={[ items={[
{ label: "项目名称", children: info.todo1 }, { label: "项目名称", children: info.projectName },
{ label: "时间范围", children: info.todo2 }, { label: "时间范围", children: `${info.visitStartTime}-${info.visitStartTime}` },
{ label: "地域范围", children: `${info.todo3}-${info.todo4}` }, {
{ label: "驾驶人员", children: info.todo5 }, label: "地域范围",
{ label: "车辆类型", children: info.todo6 }, children: info.gateLevelAuthArea && JSON.parse(info.gateLevelAuthArea).area.map(item => item.value).join("、"),
{ label: "车牌类型", children: info.todo7 }, },
{ label: "车牌号", children: info.todo8 }, { label: "驾驶人员", children: info.drivingUserName },
{ label: "审核人员", children: info.todo9 }, { label: "车辆类型", children: info.vehicleTypeName },
{ label: "车辆照片", children: (<PreviewImg files={info.todo10} />) }, { label: "车牌类型", children: info.licenceTypeName },
{ label: "车辆行驶证照片", children: (<PreviewImg files={info.todo11} />) }, { label: "车牌号", children: info.licenceNo },
{ label: "申请人签字", children: (<PreviewImg files={info.todo12} />) }, { label: "审核人员", children: info.auditUserName },
{ label: "车辆照片", children: (<PreviewImg files={info.drivingLicenseFile} />) },
{ label: "车辆行驶证照片", children: (<PreviewImg files={info.attachmentFile} />) },
{ label: "申请人签字", children: (<PreviewImg files={info.informSignFile} />) },
]} ]}
/> />
</Modal> </Modal>
); );
}; };
const ViewRejectReasonModal = Connect([NS_VEHICLE_APPLICATION], true)(ViewRejectReasonModalComponent); const ViewModal = Connect([NS_VEHICLE_APPLY], true)(ViewModalComponent);
const ViewModal = Connect([NS_VEHICLE_APPLICATION], true)(ViewModalComponent);
export default Connect([NS_VEHICLE_APPLICATION], true)(List); export default Connect([NS_VEHICLE_AUDIT], true)(List);

View File

@ -1,188 +1,7 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime"; import ListPage from "../../VehicleApplication/List";
import { Button, Descriptions, Divider, Modal, Space } from "antd";
import { useEffect, useState } from "react";
import Page from "zy-react-library/components/Page";
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 useTable from "zy-react-library/hooks/useTable";
import { NS_VEHICLE_APPLICATION } from "~/enumerate/namespace";
const REVIEW_STATUS_ENUM = [
{ bianma: "todo1", name: "已完成" },
{ bianma: "todo2", name: "待审核" },
{ bianma: "todo3", name: "已驳回" },
];
function List(props) { function List(props) {
const [currentId, setCurrentId] = useState(""); return (<ListPage isRecords={true} {...props} />);
const [viewRejectReasonModalVisible, setViewRejectReasonModalVisible] = useState(false);
const [viewModalVisible, setViewModalVisible] = useState(false);
const [form] = Search.useForm();
const { tableProps, getData } = useTable(props["vehicleApplicationList"], {
form,
});
return (
<Page isShowAllAction={false}>
<Search
labelCol={{ span: 4 }}
options={[
{ name: "todo1", label: "车牌号" },
{ name: "todo2", label: "项目名称" },
{ name: "todo3", label: "审核状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: REVIEW_STATUS_ENUM },
]}
form={form}
onFinish={getData}
/>
<Table
columns={[
{ title: "项目名称", dataIndex: "todo1" },
{ title: "区域范围", dataIndex: "todo2" },
{ title: "访问期限", dataIndex: "todo3" },
{ title: "车辆类型", dataIndex: "todo4" },
{ title: "车牌类型", dataIndex: "todo5" },
{ title: "车牌号", dataIndex: "todo7" },
{ title: "审核状态", dataIndex: "todo6" },
{
title: "操作",
width: 100,
fixed: "right",
render: (_, record) => (
<Space>
<Button
type="link"
onClick={() => {
setViewModalVisible(true);
setCurrentId(record.id);
}}
>
查看
</Button>
<Button
type="link"
onClick={() => {
setViewRejectReasonModalVisible(true);
setCurrentId(record.id);
}}
>
查看原因
</Button>
</Space>
),
},
]}
{...tableProps}
/>
{
viewRejectReasonModalVisible && (
<ViewRejectReasonModal
id={currentId}
onCancel={() => {
setViewRejectReasonModalVisible(false);
setCurrentId("");
}}
/>
)
}
{
viewModalVisible && (
<ViewModal
id={currentId}
onCancel={() => {
setViewModalVisible(false);
setCurrentId("");
}}
/>
)
}
</Page>
);
} }
const ViewRejectReasonModalComponent = (props) => { export default List;
const [info, setInfo] = useState({});
const getData = async () => {
const { data } = await props["vehicleApplicationRejectReason"]({ id: props.id });
setInfo(data);
};
useEffect(() => {
getData();
}, []);
return (
<Modal
open
title="驳回原因"
maskClosable={false}
onCancel={props.onCancel}
width={600}
footer={[
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
]}
loading={props.vehicleApplication.vehicleApplicationLoading}
>
<Descriptions
column={1}
bordered
styles={{ label: { width: 200 } }}
items={[
{ label: "驳回原因", children: info.todo1 },
]}
/>
</Modal>
);
};
const ViewModalComponent = (props) => {
const [info, setInfo] = useState({});
const getData = async () => {
const { data } = await props["vehicleApplicationInfo"]({ id: props.id });
setInfo(data);
};
useEffect(() => {
getData();
}, []);
return (
<Modal
open
title="查看"
maskClosable={false}
onCancel={props.onCancel}
width={600}
footer={[
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
]}
loading={props.vehicleApplication.vehicleApplicationLoading}
>
<Divider orientation="left">申请信息</Divider>
<Descriptions
column={1}
bordered
styles={{ label: { width: 200 } }}
items={[
{ label: "项目名称", children: info.todo1 },
{ label: "时间范围", children: info.todo2 },
{ label: "地域范围", children: `${info.todo3}-${info.todo4}` },
{ label: "驾驶人员", children: info.todo5 },
{ label: "车辆类型", children: info.todo6 },
{ label: "车牌类型", children: info.todo7 },
{ label: "车牌号", children: info.todo8 },
{ label: "审核人员", children: info.todo9 },
{ label: "车辆照片", children: (<PreviewImg files={info.todo10} />) },
{ label: "车辆行驶证照片", children: (<PreviewImg files={info.todo11} />) },
{ label: "申请人签字", children: (<PreviewImg files={info.todo12} />) },
]}
/>
</Modal>
);
};
const ViewRejectReasonModal = Connect([NS_VEHICLE_APPLICATION], true)(ViewRejectReasonModalComponent);
const ViewModal = Connect([NS_VEHICLE_APPLICATION], true)(ViewModalComponent);
export default Connect([NS_VEHICLE_APPLICATION], true)(List);

View File

@ -127,7 +127,7 @@ function Add(props) {
{ name: "vehicleCorpName", label: "车辆所属企业名称", onlyForLabel: true }, { name: "vehicleCorpName", label: "车辆所属企业名称", onlyForLabel: true },
]; ];
} }
else if (props.vehicleBelongType === 1 || props.vehicleBelongType === 3) { else if (props.vehicleBelongType === 1 || props.vehicleBelongType === 3 || props.vehicleBelongType === 8) {
return [ return [
{ {
name: "vehicleBelongType", name: "vehicleBelongType",

View File

@ -44,7 +44,7 @@ function View(props) {
{ label: "车辆所属部门", children: info.vehicleDepartmentName }, { label: "车辆所属部门", children: info.vehicleDepartmentName },
]; ];
} }
else if (props.vehicleBelongType === 1 || props.vehicleBelongType === 3) { else if (props.vehicleBelongType === 1 || props.vehicleBelongType === 3 || props.vehicleBelongType === 8) {
return [ return [
{ label: "车辆所属类型", children: getLabelName({ list: VEHICLE_TYPE_ENUM, status: info.vehicleBelongType }) }, { label: "车辆所属类型", children: getLabelName({ list: VEHICLE_TYPE_ENUM, status: info.vehicleBelongType }) },
{ label: "车辆所属部门", children: info.vehicleDepartmentName }, { label: "车辆所属部门", children: info.vehicleDepartmentName },

View File

@ -210,7 +210,7 @@ const AuthorizationModalVisibleComponent = (props) => {
<DictionarySelect <DictionarySelect
dictValue="HG_AUTH_AREA" dictValue="HG_AUTH_AREA"
onGetOption={(option) => { onGetOption={(option) => {
const area = { value: option.dictLabel, bianma: option.dictValue }; const area = [{ value: option.dictLabel, bianma: option.dictValue }];
form.setFieldValue("area", area); form.setFieldValue("area", area);
}} }}
/> />

View File

@ -81,7 +81,7 @@ function Add(props) {
<DictionarySelect <DictionarySelect
dictValue="HG_AUTH_AREA" dictValue="HG_AUTH_AREA"
onGetOption={(option) => { onGetOption={(option) => {
const area = { value: option.dictLabel, bianma: option.dictValue }; const area = [{ value: option.dictLabel, bianma: option.dictValue }];
form.setFieldValue("area", area); form.setFieldValue("area", area);
}} }}
onChange={() => { onChange={() => {

View File

@ -105,7 +105,7 @@ function Add(props) {
<DictionarySelect <DictionarySelect
dictValue="HG_AUTH_AREA" dictValue="HG_AUTH_AREA"
onGetOption={(option) => { onGetOption={(option) => {
const area = { value: option.dictLabel, bianma: option.dictValue }; const area = [{ value: option.dictLabel, bianma: option.dictValue }];
form.setFieldValue("area", area); form.setFieldValue("area", area);
}} }}
onChange={() => { onChange={() => {

View File

@ -13,14 +13,9 @@ import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
import useGetFile from "zy-react-library/hooks/useGetFile"; 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 { getLabelName } from "zy-react-library/utils"; import { getLabelName } from "zy-react-library/utils";
import { VEHICLE_AUDIT_STATUS_ENUM } from "~/enumerate/constant";
import { NS_FIRST_LEVEL_DOOR_INFO, NS_TEMPORARY_VEHICLE, NS_VEHICLE_AUDIT } from "~/enumerate/namespace"; import { NS_FIRST_LEVEL_DOOR_INFO, NS_TEMPORARY_VEHICLE, NS_VEHICLE_AUDIT } from "~/enumerate/namespace";
const STATUS_ENUM = [
{ bianma: "1", name: "审核中" },
{ bianma: "2", name: "通过" },
{ bianma: "3", name: "不通过" },
];
function List(props) { function List(props) {
const [qrCodeModalVisible, setQrCodeModalVisible] = useState(false); const [qrCodeModalVisible, setQrCodeModalVisible] = useState(false);
const [reviewModalVisible, setReviewModalVisible] = useState(false); const [reviewModalVisible, setReviewModalVisible] = useState(false);
@ -52,7 +47,7 @@ function List(props) {
{ name: "licenceNo", label: "车牌号" }, { name: "licenceNo", label: "车牌号" },
{ name: "visitStartTime", label: "访问开始时间" }, { name: "visitStartTime", label: "访问开始时间" },
{ name: "visitEndTime", label: "访问结束时间" }, { name: "visitEndTime", label: "访问结束时间" },
{ name: "auditStatus", label: "审批状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: STATUS_ENUM }, { name: "auditStatus", label: "审批状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: VEHICLE_AUDIT_STATUS_ENUM },
{ {
name: "todo6", name: "todo6",
label: "访问口门名称", label: "访问口门名称",
@ -103,7 +98,7 @@ function List(props) {
{ {
title: "审批状态", title: "审批状态",
dataIndex: "auditStatus", dataIndex: "auditStatus",
render: (_, record) => getLabelName({ list: STATUS_ENUM, status: record.auditStatus }), render: (_, record) => getLabelName({ list: VEHICLE_AUDIT_STATUS_ENUM, status: record.auditStatus }),
}, },
{ {
title: "操作", title: "操作",
@ -375,7 +370,7 @@ const ApprovalDetailsModalComponent = (props) => {
</div> </div>
<div> <div>
<span>审批状态</span> <span>审批状态</span>
<span>{getLabelName({ list: STATUS_ENUM, status: item.status })}</span> <span>{getLabelName({ list: VEHICLE_AUDIT_STATUS_ENUM, status: item.status })}</span>
</div> </div>
</div> </div>
</div> </div>