diff --git a/package.json b/package.json
index 182f8dd..d0c2fd0 100644
--- a/package.json
+++ b/package.json
@@ -34,7 +34,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-signature-canvas": "^1.1.0-alpha.2",
- "zy-react-library": "^1.2.8"
+ "zy-react-library": "^1.2.9"
},
"devDependencies": {
"@antfu/eslint-config": "^5.4.1",
diff --git a/router.md b/router.md
index bd5835e..c3cd03f 100644
--- a/router.md
+++ b/router.md
@@ -163,7 +163,7 @@
### H5 端
-- 人员申请/申请
+- 人员申请/申请 ##
`/primeport/container/mobile/firstLevelDoor/personnelApplication/apply`
-- 人员申请/申请记录
+- 人员申请/申请记录 ##
`/primeport/container/mobile/firstLevelDoor/personnelApplication/applyList`
diff --git a/src/api/global/index.js b/src/api/global/index.js
index 444a64f..cb0ff5c 100644
--- a/src/api/global/index.js
+++ b/src/api/global/index.js
@@ -1,7 +1 @@
-import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
-
export {};
-
-export const getDepartmentListTree = declareRequest(
- "Post > @/basicInfo/department/listAllTreeByCorpType",
-);
diff --git a/src/api/mobile/index.js b/src/api/mobile/index.js
new file mode 100644
index 0000000..9f18e7d
--- /dev/null
+++ b/src/api/mobile/index.js
@@ -0,0 +1,13 @@
+import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
+
+export const getDepartmentListTree = declareRequest(
+ "Post > @/basicInfo/department/listAllTreeByCorpType",
+);
+export const temporaryVisitorApplySave = declareRequest(
+ "temporaryVisitorLoading",
+ "Post > @/primeport/closedTmpApply/save",
+);
+export const temporaryVisitorApplyInfo = declareRequest(
+ "temporaryVisitorLoading",
+ "Get > /primeport/closedTmpApply/getInfoById",
+);
diff --git a/src/enumerate/namespace/index.js b/src/enumerate/namespace/index.js
index 81a951e..db1fca1 100644
--- a/src/enumerate/namespace/index.js
+++ b/src/enumerate/namespace/index.js
@@ -29,3 +29,4 @@ export const NS_ENCLOSED_PERSONNEL_AND_VEHICLE_STATISTICS = defineNamespace("enc
export const NS_ENCLOSED_ENTERPRISE_PERSONNEL_PERMISSIONS = defineNamespace("enclosedEnterprisePersonnelPermissions");
export const NS_ENCLOSED_TEMPORARY_PERSONNEL_REVIEW = defineNamespace("enclosedTemporaryPersonnelReview");
export const NS_ENCLOSED_TEMPORARY_VEHICLE_REVIEW = defineNamespace("enclosedTemporaryVehicleReview");
+export const NS_MOBILE = defineNamespace("mobile");
diff --git a/src/pages/Container/Mobile/firstLevelDoor/PersonnelApplication/Apply/index.js b/src/pages/Container/Mobile/firstLevelDoor/PersonnelApplication/Apply/index.js
index 4010894..c790410 100644
--- a/src/pages/Container/Mobile/firstLevelDoor/PersonnelApplication/Apply/index.js
+++ b/src/pages/Container/Mobile/firstLevelDoor/PersonnelApplication/Apply/index.js
@@ -4,28 +4,55 @@ import {
Cascader,
Checkbox,
DatePicker,
+ DotLoading,
Form,
Image,
ImageUploader,
Input,
+ Mask,
Picker,
Popup,
+ TextArea,
Toast,
} from "antd-mobile";
import dayjs from "dayjs";
import { useEffect, useRef, useState } from "react";
+import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
import useDictionary from "zy-react-library/hooks/useDictionary";
+import useUploadFile from "zy-react-library/hooks/useUploadFile";
import { ID_NUMBER, LICENSE_PLATE_NUMBER, PHONE } from "zy-react-library/regular";
-import { validatorEndTime } from "zy-react-library/utils";
+import { getLabelName, validatorEndTime } from "zy-react-library/utils";
import SignatureH5 from "~/components/SignatureH5";
-import { NS_GLOBAL } from "~/enumerate/namespace";
+import {
+ NS_APPROVER_USER,
+ NS_ENCLOSED_AREA,
+ NS_FIRST_LEVEL_DOOR_INFO,
+ NS_MOBILE,
+} from "~/enumerate/namespace";
import "../../../index.less";
+export const ACCESS_TYPE_ENUM = [
+ { label: "车辆", value: "CAR_APPLY" },
+ { label: "人员", value: "PERSON_APPLY" },
+];
+export const APPLICATION_GATE_PERSON_TYPE_ENUM = [
+ { label: "一级口门", value: "ONE_LEVEL_PERSON_APPLY" },
+ { label: "封闭区域口门", value: "TWO_LEVEL_PERSON_APPLY" },
+];
+export const APPLICATION_GATE_CAR_TYPE_ENUM = [
+ { label: "一级口门", value: "ONE_LEVEL_CAR_APPLY" },
+ { label: "封闭区域口门", value: "TWO_LEVEL_CAR_APPLY" },
+];
+
function Apply(props) {
const [primeportAreaList, setPrimeportAreaList] = useState([]);
const [vehicleTypeList, setVehicleTypeList] = useState([]);
const [licensePlateTypeList, setLicensePlateTypeList] = useState([]);
+ const [firstLevelDoorInfoListAll, setFirstLevelDoorInfoListAll] = useState([]);
+ const [twoLevelDoorInfoListAll, setTwoLevelDoorInfoListAll] = useState([]);
+ const [approvalUserListAll, setApprovalUserListAll] = useState([]);
const [departmentList, setDepartmentList] = useState([]);
+ const [enclosedAreaList, setEnclosedAreaList] = useState([]);
const [noticePopupVisible, setNoticePopupVisible] = useState(false);
const [signatureUrl, setSignatureUrl] = useState("");
@@ -33,15 +60,16 @@ function Apply(props) {
const checkboxRef = useRef(null);
const [form] = Form.useForm();
- const accessType = Form.useWatch("accessType", form);
- const doorType = Form.useWatch("doorType", form);
+ const tmpApplyType = Form.useWatch("tmpApplyType", form);
+ const tmpMkmjType = Form.useWatch("tmpMkmjType", form);
const { getDictionary } = useDictionary();
+ const { loading: uploadFileLoading, uploadFile } = useUploadFile();
- const transformDepartmentList = (list) => {
+ const transformTreeList = (list, nameKey, idKey) => {
return list.map(item => ({
- label: item.name,
- value: item.id,
- children: item.childrenList ? transformDepartmentList(item.childrenList) : undefined,
+ label: item[nameKey],
+ value: item[idKey],
+ children: item.childrenList ? transformTreeList(item.childrenList) : undefined,
}));
};
@@ -52,16 +80,61 @@ function Apply(props) {
setVehicleTypeList(vehicleTypeData);
const licensePlateTypeData = await getDictionary({ dictValue: "LICENSE_PLATE_TYPE" });
setLicensePlateTypeList(licensePlateTypeData);
- const { data: departmentList } = await props["getDepartmentListTree"]({ enterpriseType: [1, 2] });
- const transformedDepartmentList = transformDepartmentList(departmentList);
+ const { data: approvalUserListAll } = await props["approvalUserListAll"]({ temporaryPermissionFlag: 1 });
+ setApprovalUserListAll(approvalUserListAll);
+ const { data: departmentList } = await props["getDepartmentListTree"]({ enterpriseType: [2] });
+ const transformedDepartmentList = transformTreeList(departmentList, "name", "id");
setDepartmentList(transformedDepartmentList);
};
+ const getFirstLevelDoorInfoListAll = async (gateLevelAuthArea) => {
+ const { data } = await props["firstLevelDoorInfoListAll"]({ mkmjLevel: 1, hgAuthArea: gateLevelAuthArea });
+ setFirstLevelDoorInfoListAll(data);
+ };
+
+ const getTwoLevelDoorInfoListAll = async (gateLevelAuthArea) => {
+ const { data } = await props["firstLevelDoorInfoListAll"]({ mkmjLevel: 2, hgAuthArea: gateLevelAuthArea });
+ setTwoLevelDoorInfoListAll(data);
+ };
+
+ const getEnclosedAreaList = async (jurisdictionalCorpId) => {
+ const { data } = await props["enclosedAreaDetailListTree"]({ jurisdictionalCorpId });
+ const transformedEnclosedAreaList = transformTreeList(data, "closedAreaName", "id");
+ setEnclosedAreaList(transformedEnclosedAreaList);
+ };
+
useEffect(() => {
getData();
}, []);
- const onFinish = (values) => {
+ const getTreeLabelName = (treeList, value, idKey = "value", nameKey = "label") => {
+ if (!treeList || !Array.isArray(treeList) || !value) {
+ return "";
+ }
+
+ let result = "";
+
+ const findNodeInTree = (tree, targetValue) => {
+ for (const node of tree) {
+ if (node[idKey] === targetValue) {
+ result = node[nameKey];
+ return true;
+ }
+ if (node.children && node.children.length > 0) {
+ const found = findNodeInTree(node.children, targetValue);
+ if (found) {
+ return true;
+ }
+ }
+ }
+ return false;
+ };
+
+ findNodeInTree(treeList, value);
+ return result;
+ };
+
+ const onFinish = async (values) => {
if (!values.safetyNoticeAgreed || !values.signature) {
Toast.show({
icon: "fail",
@@ -69,19 +142,66 @@ function Apply(props) {
});
return;
}
- if (values.accessType === "1" && values.vehicleLicensePhoto.length !== 2) {
+ if (values.tmpApplyType === "CAR_APPLY" && values.vehicleLicensePhoto.length !== 2) {
Toast.show({
icon: "fail",
content: "请上传两张行驶证照片",
});
return;
}
- console.log(values);
- props.history.push(`./success?accessType=${values.accessType}&text=${values.accessType === "1" ? values.licensePlateNumber : values.phoneNumber}`);
+ const tmpMkmjType = values.tmpMkmjType;
+ const informSignType = {
+ ONE_LEVEL_PERSON_APPLY: 611,
+ TWO_LEVEL_PERSON_APPLY: 609,
+ ONE_LEVEL_CAR_APPLY: 606,
+ TWO_LEVEL_CAR_APPLY: 610,
+ }[tmpMkmjType];
+ const { id: drivingLicenseId } = await uploadFile({
+ single: false,
+ files: (values.vehicleLicensePhoto || []).map(item => ({ ...item, originFileObj: item.file })),
+ params: { type: UPLOAD_FILE_TYPE_ENUM[601], foreignKey: "" },
+ });
+ const { id: attachmentId } = await uploadFile({
+ single: false,
+ files: (values.vehiclePhoto || []).map(item => ({ ...item, originFileObj: item.file })),
+ params: { type: UPLOAD_FILE_TYPE_ENUM[602], foreignKey: "" },
+ });
+ const { filePath: userFaceUrl } = await uploadFile({
+ files: (values.facePhoto || []).map(item => ({ ...item, originFileObj: item.file })),
+ params: { type: UPLOAD_FILE_TYPE_ENUM[608], foreignKey: "" },
+ });
+ const { id: informSignId } = await uploadFile({
+ single: false,
+ files: [{ originFileObj: values.signature }],
+ params: { type: informSignType, foreignKey: "" },
+ });
+ const { success, data } = await props["temporaryVisitorApplySave"]({
+ ...values,
+ drivingLicenseId,
+ attachmentId,
+ userFaceUrl,
+ informSignId,
+ });
+ if (success) {
+ props.history.push(`./success?id=${data.id}&tmpApplyType=${values.tmpApplyType}&tmpMkmjType=${values.tmpMkmjType}`);
+ }
};
return (
+
+
+
[value]}
>
{
+ form.setFieldValue("tmpMkmjType", "");
+ form.setFieldValue("vehicleTypeName", "");
+ form.setFieldValue("licenceTypeName", "");
+ form.setFieldValue("hgAuthAreaName", "");
+ form.setFieldValue("levelOneMkmjName", "");
+ form.setFieldValue("auditPersonUserName", "");
+ form.setFieldValue("auditPersonCorpId", "");
+ form.setFieldValue("auditPersonCorpName", "");
+ form.setFieldValue("auditPersonDepartmentId", "");
+ form.setFieldValue("auditPersonDepartmentName", "");
+ form.setFieldValue("jurisdictionalCorpName", "");
+ form.setFieldValue("closedAreaId", "");
+ form.setFieldValue("closedAreaName", "");
+ form.setFieldValue("levelTwoMkmjId", "");
+ form.setFieldValue("levelTwoMkmjName", "");
+ setFirstLevelDoorInfoListAll([]);
+ setEnclosedAreaList([]);
+ setTwoLevelDoorInfoListAll([]);
+ }}
>
{value => value?.[0]?.label || "请选择访问类型"}
-
{
- pickerRef.current?.open();
- }}
- getValueFromEvent={value => value[0]}
- getValueProps={value => [value]}
- >
- {
+ pickerRef.current?.open();
+ }}
+ getValueFromEvent={value => value[0]}
+ getValueProps={value => [value]}
>
- {value => value?.[0]?.label || "请选择选择申请口门"}
-
-
+
{
+ form.setFieldValue("vehicleTypeName", "");
+ form.setFieldValue("licenceTypeName", "");
+ form.setFieldValue("hgAuthAreaName", "");
+ form.setFieldValue("levelOneMkmjName", "");
+ form.setFieldValue("auditPersonUserName", "");
+ form.setFieldValue("auditPersonCorpId", "");
+ form.setFieldValue("auditPersonCorpName", "");
+ form.setFieldValue("auditPersonDepartmentId", "");
+ form.setFieldValue("auditPersonDepartmentName", "");
+ form.setFieldValue("jurisdictionalCorpName", "");
+ form.setFieldValue("closedAreaId", "");
+ form.setFieldValue("closedAreaName", "");
+ form.setFieldValue("levelTwoMkmjId", "");
+ form.setFieldValue("levelTwoMkmjName", "");
+ setFirstLevelDoorInfoListAll([]);
+ setEnclosedAreaList([]);
+ setTwoLevelDoorInfoListAll([]);
+ }}
+ >
+ {value => value?.[0]?.label || "请选择选择申请口门"}
+
+
+ )}
{
- accessType === "1"
+ tmpApplyType === "CAR_APPLY"
&& (
<>
-
+
@@ -154,12 +309,23 @@ function Apply(props) {
>
({ label: item.dictLabel, value: item.dictValue }))]}
+ onConfirm={(value) => {
+ form.setFieldValue("vehicleTypeName", getLabelName({
+ list: vehicleTypeList,
+ status: value[0],
+ idKey: "dictValue",
+ nameKey: "dictLabel",
+ }));
+ }}
>
{value => value?.[0]?.label || "请选择车辆类型"}
+
+
+
({ label: item.dictLabel, value: item.dictValue }))]}
+ onConfirm={(value) => {
+ form.setFieldValue("licenceTypeName", getLabelName({
+ list: licensePlateTypeList,
+ status: value[0],
+ idKey: "dictValue",
+ nameKey: "dictLabel",
+ }));
+ }}
>
{value => value?.[0]?.label || "请选择车牌类型"}
-
+
+
+
+
-
-
+
+
({ url: URL.createObjectURL(file), file })}
maxCount={2}
@@ -192,7 +389,10 @@ function Apply(props) {
maxCount={4}
/>
-
+
+
+
+
-
+
-
+
({ url: URL.createObjectURL(file), file })}
maxCount={1}
/>
-
+
+
+
+
-
欢迎您到访秦皇岛港。为保障您的人身安全及港口生产作业秩序,请注意港口属于重点安全监管区域,存在大型机械作业、货物装卸、车辆往来等生产场景,可能面临机械伤害、物体打击、车辆碰撞等安全风险。请您认真阅读以下须知内容,确认遵守后签字:
-
1. 入港时请主动出示有效身份证件,配合安保人员进行身份核验与信息登记,凭港口核发的《临时访客证》入港,自觉接受出港查验;不转借、冒用访客凭证,不将无关人员带入港口。
-
2. 入港后请严格在指定区域活动,未经陪同人员及港口负责人许可,绝不擅自进入标有"禁止入内""危险区域"等标识的场所,不靠近起重机械、输送设备、危险品存储点等高危部位,不跨越安全护栏、警戒线,不在作业区域逗留围观。
-
3. 遵守港口生产秩序,不干扰装卸、运输、检修等正常工作;不随意触摸、操作生产设备、仪器仪表及安全设施,不移动、遮挡安全警示标识;如需拍摄港口场景,须提前征得港口方同意,不拍摄涉及安全、商业秘密的内容。
-
4. 严格遵守消防安全规定,不在港口内吸烟,不携带火种、易燃易爆物品、管制器具等违禁物品入港;发现火灾、设备故障等隐患或突发情况,第一时间告知陪同人员或港口工作人员,配合应急处置,不擅自行动引发次生风险。
-
5. 注意自身安全防护,行走时主动避让作业车辆与机械,不擅自横穿作业通道;雨天、雾天等恶劣天气下,听从陪同人员安排,加强安全防范。
-
6. 已知晓港口所去区域应急逃生路线,遇紧急情况按港口指引有序疏散。
+
+ 欢迎您到访秦皇岛港。为保障您的人身安全及港口生产作业秩序,请注意港口属于重点安全监管区域,存在大型机械作业、货物装卸、车辆往来等生产场景,可能面临机械伤害、物体打击、车辆碰撞等安全风险。请您认真阅读以下须知内容,确认遵守后签字:
+
+
+ 1.
+ 入港时请主动出示有效身份证件,配合安保人员进行身份核验与信息登记,凭港口核发的《临时访客证》入港,自觉接受出港查验;不转借、冒用访客凭证,不将无关人员带入港口。
+
+
+ 2.
+ 入港后请严格在指定区域活动,未经陪同人员及港口负责人许可,绝不擅自进入标有"禁止入内""危险区域"等标识的场所,不靠近起重机械、输送设备、危险品存储点等高危部位,不跨越安全护栏、警戒线,不在作业区域逗留围观。
+
+
+ 3.
+ 遵守港口生产秩序,不干扰装卸、运输、检修等正常工作;不随意触摸、操作生产设备、仪器仪表及安全设施,不移动、遮挡安全警示标识;如需拍摄港口场景,须提前征得港口方同意,不拍摄涉及安全、商业秘密的内容。
+
+
+ 4.
+ 严格遵守消防安全规定,不在港口内吸烟,不携带火种、易燃易爆物品、管制器具等违禁物品入港;发现火灾、设备故障等隐患或突发情况,第一时间告知陪同人员或港口工作人员,配合应急处置,不擅自行动引发次生风险。
+
+
+ 5.
+ 注意自身安全防护,行走时主动避让作业车辆与机械,不擅自横穿作业通道;雨天、雾天等恶劣天气下,听从陪同人员安排,加强安全防范。
+
+
+ 6.
+ 已知晓港口所去区域应急逃生路线,遇紧急情况按港口指引有序疏散。
+
本人确认已完整阅读并理解以上须知,承诺严格遵守。如因违反本须知及港口安全规定导致自身人身伤害或港口、他人财产损失,自愿承担全部责任。
{
@@ -280,10 +519,18 @@ function Apply(props) {
// 公共基础信息字段组件
const BasicInfoFields = () => (
<>
-
+
-
+
>
@@ -310,7 +557,10 @@ const VisitTime = ({ form }) => (
validatorEndTime(form.getFieldValue("visitStartTime")))()]}
+ rules={[{
+ required: true,
+ message: "请选择访问结束时间",
+ }, (() => validatorEndTime(form.getFieldValue("visitStartTime")))()]}
trigger="onConfirm"
onClick={(_, pickerRef) => {
pickerRef.current?.open();
@@ -326,10 +576,22 @@ const VisitTime = ({ form }) => (
);
// 公共地点字段组件
-const LocationFields = ({ primeportAreaList, doorType }) => (
+const LocationFields = ({
+ primeportAreaList,
+ tmpMkmjType,
+ firstLevelDoorInfoListAll,
+ twoLevelDoorInfoListAll,
+ getFirstLevelDoorInfoListAll,
+ getTwoLevelDoorInfoListAll,
+ departmentList,
+ getTreeLabelName,
+ getEnclosedAreaList,
+ enclosedAreaList,
+ form,
+}) => (
<>
(
>
({ label: item.dictLabel, value: item.dictValue }))]}
+ onConfirm={(value) => {
+ form.setFieldValue("hgAuthAreaName", getLabelName({
+ list: primeportAreaList,
+ status: value[0],
+ idKey: "dictValue",
+ nameKey: "dictLabel",
+ }));
+ form.setFieldValue("levelOneMkmjId", "");
+ form.setFieldValue("levelOneMkmjName", "");
+ getFirstLevelDoorInfoListAll(value[0]);
+ getTwoLevelDoorInfoListAll(value[0]);
+ }}
>
{value => value?.[0]?.label || "请选择港区"}
+
+
+
(
getValueProps={value => [value]}
>
({ label: item.mkmjName, value: item.id }))]}
+ onConfirm={(value) => {
+ form.setFieldValue("levelOneMkmjName", getLabelName({
+ list: firstLevelDoorInfoListAll,
+ status: value[0],
+ idKey: "id",
+ nameKey: "mkmjName",
+ }));
+ }}
>
{value => value?.[0]?.label || "请选择一级口门"}
- {doorType === "2" && }
+
+
+
+ {(tmpMkmjType === "TWO_LEVEL_CAR_APPLY" || tmpMkmjType === "TWO_LEVEL_PERSON_APPLY")
+ && (
+
+ )}
>
);
// 封闭区域相关字段组件
-const EnclosedAreaFields = () => (
+const EnclosedAreaFields = ({
+ form,
+ departmentList,
+ getTreeLabelName,
+ getEnclosedAreaList,
+ enclosedAreaList,
+ twoLevelDoorInfoListAll,
+}) => (
<>
{
pickerRef.current?.open();
}}
- getValueFromEvent={value => value[0]}
- getValueProps={value => [value]}
>
- {
+ form.setFieldValue("jurisdictionalCorpName", getTreeLabelName(departmentList, value.at(-1)));
+ if (value.length > 0) {
+ getEnclosedAreaList(value.at(-1));
+ }
+ form.setFieldValue("closedAreaId", "");
+ form.setFieldValue("closedAreaName", "");
+ form.setFieldValue("levelTwoMkmjId", "");
+ form.setFieldValue("levelTwoMkmjName", "");
+ }}
>
- {value => value?.[0]?.label || "请选择区域所属公司"}
-
+ {value => value.length > 0 ? value.map(item => item?.label).filter(Boolean).join("-") : "请选择区域所属公司"}
+
+
+
+
(
getValueFromEvent={value => value[0]}
getValueProps={value => [value]}
>
- {
+ form.setFieldValue("closedAreaName", getTreeLabelName(enclosedAreaList, value.at(-1)));
+ form.setFieldValue("levelTwoMkmjId", "");
+ form.setFieldValue("levelTwoMkmjName", "");
+ }}
>
- {value => value?.[0]?.label || "请选择封闭区域"}
-
+ {value => value.length > 0 ? value.map(item => item?.label).filter(Boolean).join("-") : "请选择封闭区域"}
+
+
+
+
(
getValueProps={value => [value]}
>
({ label: item.mkmjName, value: item.id }))]}
+ onConfirm={(value) => {
+ form.setFieldValue("levelTwoMkmjName", getLabelName({
+ list: twoLevelDoorInfoListAll,
+ status: value[0],
+ idKey: "id",
+ nameKey: "mkmjName",
+ }));
+ }}
>
{value => value?.[0]?.label || "请选择口门"}
+
+
+
>
);
// 公共审批字段组件
-const Approval = ({ departmentList }) => (
+const Approval = ({ form, approvalUserListAll }) => (
<>
{
- pickerRef.current?.open();
- }}
- >
-
- {value => value.length > 0 ? value.map(item => item?.label).filter(Boolean).join("-") : "请选择审批企业"}
-
-
- (
getValueProps={value => [value]}
>
({
+ label: `${item.userName}(${item.corpName})(${item.deptName})`,
+ value: item.userId,
+ }))]}
+ onConfirm={(value) => {
+ const item = approvalUserListAll.find(item => item.userId === value[0]);
+ form.setFieldValue("auditPersonUserName", item.userName);
+ form.setFieldValue("auditPersonCorpId", item.corpId);
+ form.setFieldValue("auditPersonCorpName", item.corpName);
+ form.setFieldValue("auditPersonDepartmentId", item.deptId);
+ form.setFieldValue("auditPersonDepartmentName", item.deptName);
+ }}
>
{value => value?.[0]?.label || "请选择审批人"}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
>
);
@@ -518,4 +851,4 @@ const SafetyNoticeAndSignature = ({ checkboxRef, signatureUrl, setNoticePopupVis
>
);
-export default Connect([NS_GLOBAL], true)(Apply);
+export default Connect([NS_MOBILE, NS_FIRST_LEVEL_DOOR_INFO, NS_APPROVER_USER, NS_ENCLOSED_AREA], true)(Apply);
diff --git a/src/pages/Container/Mobile/firstLevelDoor/PersonnelApplication/ApplyList/index.js b/src/pages/Container/Mobile/firstLevelDoor/PersonnelApplication/ApplyList/index.js
index 3fb3291..bb715ef 100644
--- a/src/pages/Container/Mobile/firstLevelDoor/PersonnelApplication/ApplyList/index.js
+++ b/src/pages/Container/Mobile/firstLevelDoor/PersonnelApplication/ApplyList/index.js
@@ -1,127 +1,122 @@
-import { DotLoading, InfiniteScroll } from "antd-mobile";
-import { useState } from "react";
+import { Connect } from "@cqsjjb/jjb-dva-runtime";
+import { useEffect, useState } from "react";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
+import { getLabelName } from "zy-react-library/utils";
+import { ENCLOSED_AREA_AUDIT_STATUS_ENUM } from "~/enumerate/constant";
+import { NS_MOBILE } from "~/enumerate/namespace";
-function ApplyList() {
+function ApplyList(props) {
const query = useGetUrlQuery();
- const [data, setData] = useState([]);
- const [hasMore, setHasMore] = useState(true);
+ const [info, setInfo] = useState({});
- const loadMore = async () => {
- const data = [
- { name: "张三", phone: "12345678901", area: "A区", doorTypeName: "1号门", startTime: "2021-01-01 00:00:00", endTime: "2021-01-01 01:00:00", status: "通过", reason: "" },
- ];
- setData(val => [...val, ...data]);
- setHasMore(data.length > 0);
+ const getData = async () => {
+ const { data } = await props["temporaryVisitorApplyInfo"]({
+ id: query.id,
+ tmpApplyType: query.tmpApplyType,
+ tmpMkmjType: query.tmpMkmjType,
+ });
+ setInfo(data);
};
+ useEffect(() => {
+ getData();
+ }, []);
+
return (
- {data.map((item, index) => (
-
- {
- query.accessType === "2" && (
+
+ {
+ query.tmpApplyType === "PERSON_APPLY" && (
+
+
临时访客申请
-
临时访客申请
-
- 申请人:
- {item.name}
-
-
- 手机号:
- {item.phone}
-
-
- 申请区域:
- {item.area}
-
-
- 申请口门:
- {item.doorTypeName}
-
-
- 时间范围:
- {item.startTime}
- 至
- {item.endTime}
-
-
- 审核状态:
- {item.status}
-
+ 申请人:
+ {info.applyPersonUserName}
+
+
+ 手机号:
+ {info.userPhone}
+
+
+ 申请区域:
+ {info.closedAreaName}
+
+
+ 申请口门:
+ {info.levelOneMkmjName}
+
+
+ 时间范围:
+ {info.visitStartTime}
+ 至
+ {info.visitEndTime}
+
+
+ 审核状态:
+ {getLabelName({ list: ENCLOSED_AREA_AUDIT_STATUS_ENUM, status: info.auditFlag })}
+
+ {info.auditFlag === 3 && (
驳回原因:
- {item.reason}
+ {info.refusalReason}
-
- )
- }
- {
- query.accessType === "1" && (
+ )}
+
+ )
+ }
+ {
+ query.tmpApplyType === "CAR_APPLY" && (
+
+
临时访客车辆申请
-
临时访客车辆申请
-
- 申请人:
- {item.name}
-
-
- 手机号:
- {item.phone}
-
-
- 申请区域:
- {item.area}
-
-
- 申请口门:
- {item.doorTypeName}
-
-
- 时间范围:
- {item.startTime}
- 至
- {item.endTime}
-
-
- 车辆类型:
- {item.carType}
-
-
- 车牌号:
- {item.carNo}
-
-
- 审核状态:
- {item.status}
-
+ 申请人:
+ {info.drivingUserName}
+
+
+ 手机号:
+ {info.userPhone}
+
+
+ 申请区域:
+ {info.closedAreaName}
+
+
+ 申请口门:
+ {info.levelOneMkmjName}
+
+
+ 时间范围:
+ {info.visitStartTime}
+ 至
+ {info.visitEndTime}
+
+
+ 车辆类型:
+ {info.vehicleTypeName}
+
+
+ 车牌号:
+ {info.licenceNo}
+
+
+ 审核状态:
+ {getLabelName({ list: ENCLOSED_AREA_AUDIT_STATUS_ENUM, status: info.auditFlag })}
+
+ {info.auditFlag === 3 && (
驳回原因:
- {item.reason}
+ {info.refusalReason}
-
- )
- }
-
- ))}
+ )}
+
+ )
+ }
+
-
- {
- hasMore
- ? (
- <>
- Loading
-
- >
- )
- : (
- --- 我是有底线的 ---
- )
- }
-
);
}
-export default ApplyList;
+export default Connect([NS_MOBILE], true)(ApplyList);
diff --git a/src/pages/Container/Mobile/firstLevelDoor/PersonnelApplication/Success/index.js b/src/pages/Container/Mobile/firstLevelDoor/PersonnelApplication/Success/index.js
index f7fa7f1..1840f8d 100644
--- a/src/pages/Container/Mobile/firstLevelDoor/PersonnelApplication/Success/index.js
+++ b/src/pages/Container/Mobile/firstLevelDoor/PersonnelApplication/Success/index.js
@@ -12,7 +12,7 @@ function Success() {
信息提交成功!
-
+
扫描识别二维码获取审批进度。
请长按或截屏保存二维码,关闭页面后将无法再获取二维码