内测bug修复
parent
bba4445ade
commit
f1ef2c1660
|
|
@ -80,13 +80,16 @@ function Apply(props) {
|
|||
setVehicleTypeList(vehicleTypeData);
|
||||
const licensePlateTypeData = await getDictionary({ dictValue: "LICENSE_PLATE_TYPE" });
|
||||
setLicensePlateTypeList(licensePlateTypeData);
|
||||
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 getApprovalUserList = async (corpId) => {
|
||||
const { data } = await props["approvalUserListAll"]({ temporaryPermissionFlag: 1, corpId });
|
||||
setApprovalUserListAll(data);
|
||||
};
|
||||
|
||||
const getFirstLevelDoorInfoListAll = async (gateLevelAuthArea) => {
|
||||
const { data } = await props["firstLevelDoorInfoListAll"]({ mkmjLevel: 1, hgAuthArea: gateLevelAuthArea });
|
||||
setFirstLevelDoorInfoListAll(data);
|
||||
|
|
@ -247,6 +250,7 @@ function Apply(props) {
|
|||
setFirstLevelDoorInfoListAll([]);
|
||||
setEnclosedAreaList([]);
|
||||
setTwoLevelDoorInfoListAll([]);
|
||||
setApprovalUserListAll([]);
|
||||
}}
|
||||
>
|
||||
{value => value?.[0]?.label || "请选择访问类型"}
|
||||
|
|
@ -266,7 +270,13 @@ function Apply(props) {
|
|||
>
|
||||
<Picker
|
||||
columns={[tmpApplyType === "PERSON_APPLY" ? APPLICATION_GATE_PERSON_TYPE_ENUM : APPLICATION_GATE_CAR_TYPE_ENUM]}
|
||||
onConfirm={() => {
|
||||
onConfirm={(event) => {
|
||||
if (event[0] === "ONE_LEVEL_CAR_APPLY") {
|
||||
getApprovalUserList();
|
||||
}
|
||||
else {
|
||||
setApprovalUserListAll([]);
|
||||
}
|
||||
form.setFieldValue("vehicleTypeName", "");
|
||||
form.setFieldValue("licenceTypeName", "");
|
||||
form.setFieldValue("hgAuthAreaName", "");
|
||||
|
|
@ -373,6 +383,7 @@ function Apply(props) {
|
|||
getTreeLabelName={getTreeLabelName}
|
||||
getEnclosedAreaList={getEnclosedAreaList}
|
||||
enclosedAreaList={enclosedAreaList}
|
||||
getApprovalUserList={getApprovalUserList}
|
||||
form={form}
|
||||
/>
|
||||
<Form.Item
|
||||
|
|
@ -423,6 +434,7 @@ function Apply(props) {
|
|||
getTreeLabelName={getTreeLabelName}
|
||||
getEnclosedAreaList={getEnclosedAreaList}
|
||||
enclosedAreaList={enclosedAreaList}
|
||||
getApprovalUserList={getApprovalUserList}
|
||||
form={form}
|
||||
/>
|
||||
<Form.Item name="facePhoto" label="人脸照片" rules={[{ required: true, message: "请上传人脸照片" }]}>
|
||||
|
|
@ -589,6 +601,7 @@ const LocationFields = ({
|
|||
getTreeLabelName,
|
||||
getEnclosedAreaList,
|
||||
enclosedAreaList,
|
||||
getApprovalUserList,
|
||||
form,
|
||||
}) => (
|
||||
<>
|
||||
|
|
@ -661,6 +674,7 @@ const LocationFields = ({
|
|||
getEnclosedAreaList={getEnclosedAreaList}
|
||||
enclosedAreaList={enclosedAreaList}
|
||||
twoLevelDoorInfoListAll={twoLevelDoorInfoListAll}
|
||||
getApprovalUserList={getApprovalUserList}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
|
|
@ -674,6 +688,7 @@ const EnclosedAreaFields = ({
|
|||
getEnclosedAreaList,
|
||||
enclosedAreaList,
|
||||
twoLevelDoorInfoListAll,
|
||||
getApprovalUserList,
|
||||
}) => (
|
||||
<>
|
||||
<Form.Item
|
||||
|
|
@ -691,6 +706,7 @@ const EnclosedAreaFields = ({
|
|||
form.setFieldValue("jurisdictionalCorpName", getTreeLabelName(departmentList, value.at(-1)));
|
||||
if (value.length > 0) {
|
||||
getEnclosedAreaList(value.at(-1));
|
||||
getApprovalUserList(value.at(-1));
|
||||
}
|
||||
form.setFieldValue("closedAreaId", "");
|
||||
form.setFieldValue("closedAreaName", "");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import dayjs from "dayjs";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
|
|
@ -10,13 +11,13 @@ 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 NeedToKnowModal from "~/components/NeedToKnowModal";
|
||||
import { TRAINING_STATE_ENUM } from "~/enumerate/constant";
|
||||
import {
|
||||
NS_APPROVER_USER,
|
||||
NS_ENCLOSED_AREA_PERSONNEL_APPLY,
|
||||
NS_FIRST_LEVEL_DOOR_INFO,
|
||||
NS_PERSONNEL_APPLICATION,
|
||||
} from "~/enumerate/namespace";
|
||||
import {TRAINING_STATE_ENUM} from "~/enumerate/constant";
|
||||
|
||||
function Add(props) {
|
||||
const [form] = FormBuilder.useForm();
|
||||
|
|
@ -119,9 +120,11 @@ function Add(props) {
|
|||
form.setFieldValue("projectName", item.projectName);
|
||||
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", []);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -149,7 +152,12 @@ function Add(props) {
|
|||
{ 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: "visitTime",
|
||||
label: "时间",
|
||||
render: FORM_ITEM_RENDER_ENUM.DATE_RANGE,
|
||||
componentProps: { disabled: true },
|
||||
},
|
||||
{
|
||||
name: "gateLevelAuthArea",
|
||||
label: "访问港区",
|
||||
|
|
@ -208,9 +216,13 @@ function Add(props) {
|
|||
options={false}
|
||||
disabledResizer={true}
|
||||
columns={[
|
||||
{ title: "姓名", dataIndex: "name" },
|
||||
{ title: "姓名", dataIndex: "userName" },
|
||||
{ title: "部门", dataIndex: "deptName" },
|
||||
{ title: "是否培训", dataIndex: "trainingState",render: (_, record) => getLabelName({ list: TRAINING_STATE_ENUM, status: record.trainingState }) },
|
||||
{
|
||||
title: "是否培训",
|
||||
dataIndex: "trainingState",
|
||||
render: (_, record) => getLabelName({ list: TRAINING_STATE_ENUM, status: record.trainingState }),
|
||||
},
|
||||
// { title: "现口门权限范围", dataIndex: "todo4" },
|
||||
{
|
||||
title: "操作",
|
||||
|
|
@ -338,6 +350,9 @@ const AddPersonnelModalComponent = (props) => {
|
|||
selectedRowsRef.current = selectedRows;
|
||||
},
|
||||
preserveSelectedRowKeys: true,
|
||||
getCheckboxProps: record => ({
|
||||
disabled: record.trainingState === "0",
|
||||
}),
|
||||
}}
|
||||
options={false}
|
||||
disabledResizer={true}
|
||||
|
|
@ -345,7 +360,11 @@ const AddPersonnelModalComponent = (props) => {
|
|||
columns={[
|
||||
{ title: "姓名", dataIndex: "userName" },
|
||||
{ title: "部门", dataIndex: "deptName" },
|
||||
{ title: "是否培训", dataIndex: "trainingState",render: (_, record) => getLabelName({ list: TRAINING_STATE_ENUM, status: record.trainingState }) },
|
||||
{
|
||||
title: "是否培训",
|
||||
dataIndex: "trainingState",
|
||||
render: (_, record) => getLabelName({ list: TRAINING_STATE_ENUM, status: record.trainingState }),
|
||||
},
|
||||
// { title: "现口门权限范围", dataIndex: "todo4" },
|
||||
]}
|
||||
dataSource={props.xgfProjectUser}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import dayjs from "dayjs";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
|
|
@ -13,7 +14,6 @@ import useTable from "zy-react-library/hooks/useTable";
|
|||
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
||||
import NeedToKnowModal from "~/components/NeedToKnowModal";
|
||||
import { NS_APPROVER_USER, NS_ENCLOSED_AREA, NS_ENCLOSED_AREA_PERSONNEL_APPLY } from "~/enumerate/namespace";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
function Add(props) {
|
||||
const [enclosedAreaList, setEnclosedAreaList] = useState([]);
|
||||
|
|
@ -28,8 +28,8 @@ function Add(props) {
|
|||
const [form] = FormBuilder.useForm();
|
||||
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
|
||||
|
||||
const getApprovalUserListAll = async () => {
|
||||
const { data } = await props["approvalUserListAll"]({ personnelPermissionFlag: 1 });
|
||||
const getApprovalUserListAll = async (corpId) => {
|
||||
const { data } = await props["approvalUserListAll"]({ personnelPermissionFlag: 1, corpId });
|
||||
setApprovalUserListAll(data);
|
||||
};
|
||||
|
||||
|
|
@ -44,7 +44,6 @@ function Add(props) {
|
|||
};
|
||||
|
||||
useEffect(() => {
|
||||
getApprovalUserListAll();
|
||||
props.entrance === "stakeholder" && getXgfProjectListAll();
|
||||
}, []);
|
||||
|
||||
|
|
@ -116,7 +115,14 @@ function Add(props) {
|
|||
searchType="inType"
|
||||
params={{ enterpriseType: [2] }}
|
||||
onChange={(value) => {
|
||||
getEnclosedAreaList(value);
|
||||
if (value) {
|
||||
getEnclosedAreaList(value);
|
||||
getApprovalUserListAll(value);
|
||||
}
|
||||
else {
|
||||
setEnclosedAreaList([]);
|
||||
setApprovalUserListAll([]);
|
||||
}
|
||||
form.setFieldValue("closedAreaName", "");
|
||||
}}
|
||||
onGetLabel={label => form.setFieldValue("jurisdictionalCorpName", label)}
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ function Add(props) {
|
|||
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
|
||||
const { getUserInfo } = useGetUserInfo();
|
||||
|
||||
const getApprovalUserListAll = async () => {
|
||||
const { data } = await props["approvalUserListAll"]({ vehiclePermissionFlag: 1 });
|
||||
const getApprovalUserListAll = async (corpId) => {
|
||||
const { data } = await props["approvalUserListAll"]({ vehiclePermissionFlag: 1, corpId });
|
||||
setApprovalUserListAll(data);
|
||||
};
|
||||
|
||||
|
|
@ -65,7 +65,6 @@ function Add(props) {
|
|||
};
|
||||
|
||||
useEffect(() => {
|
||||
getApprovalUserListAll();
|
||||
props.entrance === "stakeholder" && getXgfProjectListAll();
|
||||
}, []);
|
||||
|
||||
|
|
@ -168,12 +167,15 @@ function Add(props) {
|
|||
form.setFieldValue("closedAreaId", "");
|
||||
form.setFieldValue("closedAreaName", "");
|
||||
getEnclosedAreaList(userInfo.corpinfoId);
|
||||
getApprovalUserListAll(userInfo.corpinfoId);
|
||||
}
|
||||
else {
|
||||
form.setFieldValue("jurisdictionalCorpId", "");
|
||||
form.setFieldValue("jurisdictionalCorpName", "");
|
||||
form.setFieldValue("closedAreaId", "");
|
||||
form.setFieldValue("closedAreaName", "");
|
||||
setEnclosedAreaList([]);
|
||||
setApprovalUserListAll([]);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
@ -186,7 +188,14 @@ function Add(props) {
|
|||
searchType="inType"
|
||||
params={{ enterpriseType: [2] }}
|
||||
onChange={(value) => {
|
||||
getEnclosedAreaList(value);
|
||||
if (value) {
|
||||
getEnclosedAreaList(value);
|
||||
getApprovalUserListAll(value);
|
||||
}
|
||||
else {
|
||||
setEnclosedAreaList([]);
|
||||
setApprovalUserListAll([]);
|
||||
}
|
||||
form.setFieldValue("closedAreaName", "");
|
||||
}}
|
||||
onGetLabel={label => form.setFieldValue("jurisdictionalCorpName", label)}
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ function Add(props) {
|
|||
|
||||
const info = useRef([]);
|
||||
|
||||
const getApprovalUserListAll = async () => {
|
||||
const { data } = await props["approvalUserListAll"]({ vehiclePermissionFlag: 1 });
|
||||
const getApprovalUserListAll = async (corpId) => {
|
||||
const { data } = await props["approvalUserListAll"]({ vehiclePermissionFlag: 1, corpId });
|
||||
setApprovalUserListAll(data);
|
||||
};
|
||||
|
||||
|
|
@ -55,6 +55,7 @@ function Add(props) {
|
|||
auditDeptName: data.currentAuditDeptName,
|
||||
});
|
||||
info.current = data;
|
||||
getApprovalUserListAll(data.vehicleCorpId);
|
||||
}
|
||||
else {
|
||||
const userInfo = await getUserInfo();
|
||||
|
|
@ -66,11 +67,11 @@ function Add(props) {
|
|||
vehicleCorpId: userInfo.corpinfoId,
|
||||
vehicleCorpName: userInfo.corpinfoName,
|
||||
});
|
||||
getApprovalUserListAll(userInfo.corpinfoId);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getApprovalUserListAll();
|
||||
getData();
|
||||
}, []);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue