feat:一级口门临时人审批
parent
56aff1816e
commit
82d75f81c6
|
|
@ -20,7 +20,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// 应用唯一标识符
|
// 应用唯一标识符
|
||||||
appIdentifier: "primeport",
|
appIdentifier: "primeport-h5",
|
||||||
// 应用上下文注入全局变量
|
// 应用上下文注入全局变量
|
||||||
contextInject: {
|
contextInject: {
|
||||||
// 应用Key
|
// 应用Key
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
|
||||||
export const temporaryPersonnelList = declareRequest(
|
export const temporaryPersonnelList = declareRequest(
|
||||||
"temporaryPersonnelLoading",
|
"temporaryPersonnelLoading",
|
||||||
`Post > @/primeport/personApply/xgfPersonAuditList`,
|
`Post > @/primeport/personApply/pendingApprovalList`,
|
||||||
);
|
);
|
||||||
export const temporaryPersonnelAdd = declareRequest(
|
export const temporaryPersonnelAdd = declareRequest(
|
||||||
"temporaryPersonnelLoading",
|
"temporaryPersonnelLoading",
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,9 @@ function List(props) {
|
||||||
const [form] = Search.useForm();
|
const [form] = Search.useForm();
|
||||||
const { tableProps, getData } = useTable(props["temporaryPersonnelList"], {
|
const { tableProps, getData } = useTable(props["temporaryPersonnelList"], {
|
||||||
form,
|
form,
|
||||||
params: { processOrRecord: !props.isRecords ? 1 : 2 },
|
params: {
|
||||||
|
personBelongType: 4,
|
||||||
|
processOrRecord: !props.isRecords ? 1 : 2 },
|
||||||
});
|
});
|
||||||
|
|
||||||
const getFirstLevelDoorInfoListAll = async () => {
|
const getFirstLevelDoorInfoListAll = async () => {
|
||||||
|
|
@ -49,12 +51,12 @@ function List(props) {
|
||||||
form={form}
|
form={form}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
options={[
|
options={[
|
||||||
{ name: "todo1", label: "访问人姓名" },
|
{ name: "employeePersonUserName", label: "访问人姓名" },
|
||||||
{ name: "todo2", label: "访问开始时间" },
|
{ name: "visitStartTime", label: "访问开始时间" },
|
||||||
{ name: "todo3", label: "访问结束时间" },
|
{ name: "visitEndTime", label: "访问结束时间" },
|
||||||
{ name: "auditFlag", label: "审批状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: STATUS_ENUM },
|
{ name: "auditFlag", label: "审批状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: STATUS_ENUM },
|
||||||
{
|
{
|
||||||
name: "todo5",
|
name: "mkmjId",
|
||||||
label: "访问口门名称",
|
label: "访问口门名称",
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
items: firstLevelDoorInfoListAll,
|
items: firstLevelDoorInfoListAll,
|
||||||
|
|
@ -90,9 +92,9 @@ function List(props) {
|
||||||
</Space>
|
</Space>
|
||||||
)}
|
)}
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "访问人姓名", dataIndex: "todo1" },
|
{ title: "访问人姓名", dataIndex: "employeePersonUserName" },
|
||||||
{ title: "手机号", dataIndex: "todo2" },
|
{ title: "手机号", dataIndex: "userPhone" },
|
||||||
{ title: "身份证号", dataIndex: "todo3" },
|
{ title: "身份证号", dataIndex: "userCard" },
|
||||||
{ title: "来访事由", dataIndex: "reasonVisit" },
|
{ title: "来访事由", dataIndex: "reasonVisit" },
|
||||||
{ title: "访问开始时间", dataIndex: "visitStartTime" },
|
{ title: "访问开始时间", dataIndex: "visitStartTime" },
|
||||||
{ title: "访问结束时间", dataIndex: "visitEndTime" },
|
{ title: "访问结束时间", dataIndex: "visitEndTime" },
|
||||||
|
|
@ -117,17 +119,17 @@ function List(props) {
|
||||||
查看
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{props.permission(props.auditInfoBtn || "jgd-entry-temp-personnel-audit-info") && (
|
{/*{props.permission(props.auditInfoBtn || "jgd-entry-temp-personnel-audit-info") && (*/}
|
||||||
<Button
|
{/* <Button*/}
|
||||||
type="link"
|
{/* type="link"*/}
|
||||||
onClick={() => {
|
{/* onClick={() => {*/}
|
||||||
setApprovalDetailsModalVisible(true);
|
{/* setApprovalDetailsModalVisible(true);*/}
|
||||||
setCurrentId(record.id);
|
{/* setCurrentId(record.id);*/}
|
||||||
}}
|
{/* }}*/}
|
||||||
>
|
{/* >*/}
|
||||||
审批详情
|
{/* 审批详情*/}
|
||||||
</Button>
|
{/* </Button>*/}
|
||||||
)}
|
{/*)}*/}
|
||||||
{(!props.isRecords && record.currentUserCanAudit === 1 && props.permission(props.auditBtn || "jgd-entry-temp-personnel-audit")) && (
|
{(!props.isRecords && record.currentUserCanAudit === 1 && props.permission(props.auditBtn || "jgd-entry-temp-personnel-audit")) && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
|
|
@ -210,7 +212,7 @@ const ReviewModalComponent = (props) => {
|
||||||
|
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
const { data } = await props["temporaryPersonnelInfo"]({ id: props.id });
|
const { data } = await props["temporaryPersonnelInfo"]({ id: props.id });
|
||||||
const informSignFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[606], eqForeignKey: data.informSignId });
|
const informSignFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[611], eqForeignKey: data.informSignId });
|
||||||
setInfo({
|
setInfo({
|
||||||
...data,
|
...data,
|
||||||
informSignFile,
|
informSignFile,
|
||||||
|
|
@ -250,9 +252,9 @@ const ReviewModalComponent = (props) => {
|
||||||
bordered
|
bordered
|
||||||
styles={{ label: { width: 200 } }}
|
styles={{ label: { width: 200 } }}
|
||||||
items={[
|
items={[
|
||||||
{ label: "访问人姓名", children: info.personApplyList[0].employeePersonUserName },
|
{ label: "访问人姓名", children: info.personApplyList?.[0].employeePersonUserName },
|
||||||
{ label: "手机号", children: info.personApplyList[0].userPhone },
|
{ label: "手机号", children: info.personApplyList?.[0].userPhone },
|
||||||
{ label: "身份证号", children: info.personApplyList[0].userCard },
|
{ label: "身份证号", children: info.personApplyList?.[0].userCard },
|
||||||
{ label: "访问开始时间", children: info.visitStartTime },
|
{ label: "访问开始时间", children: info.visitStartTime },
|
||||||
{ label: "访问结束时间", children: info.visitEndTime },
|
{ label: "访问结束时间", children: info.visitEndTime },
|
||||||
{
|
{
|
||||||
|
|
@ -261,7 +263,7 @@ const ReviewModalComponent = (props) => {
|
||||||
},
|
},
|
||||||
{ label: "访问口门名称", children: info.mkmjName },
|
{ label: "访问口门名称", children: info.mkmjName },
|
||||||
{ label: "来访事由", children: info.reasonVisit },
|
{ label: "来访事由", children: info.reasonVisit },
|
||||||
{ label: "人脸照片", children: (<PreviewImg files={[info.personApplyList[0].userFaceUrl]} />) },
|
{ label: "人脸照片", children: (<PreviewImg files={[info.personApplyList?.[0].userFaceUrl]} />) },
|
||||||
{ label: "申请人安全告知签字", children: (<PreviewImg files={info.informSignFile} />) },
|
{ label: "申请人安全告知签字", children: (<PreviewImg files={info.informSignFile} />) },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -7,16 +7,24 @@ 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 useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import { NS_TEMPORARY_PERSONNEL } from "~/enumerate/namespace";
|
import { NS_TEMPORARY_PERSONNEL } from "~/enumerate/namespace";
|
||||||
|
import {getLabelName} from "zy-react-library/utils";
|
||||||
|
const VEHICLE_APPROVAL_STATUS_ENUM = [
|
||||||
|
{ bianma: 1, name: "审批中" },
|
||||||
|
{ bianma: 2, name: "通过" },
|
||||||
|
{ bianma: 3, name: "已驳回" },
|
||||||
|
];
|
||||||
function View(props) {
|
function View(props) {
|
||||||
const query = useGetUrlQuery();
|
const query = useGetUrlQuery();
|
||||||
const { loading: getFileLoading, getFile } = useGetFile();
|
const { loading: getFileLoading, getFile } = useGetFile();
|
||||||
|
|
||||||
const { info, setInfo } = useState({});
|
const [ info, setInfo ] = useState({});
|
||||||
|
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
|
console.log(".temporaryPersonnel.temporaryPersonnelLoading")
|
||||||
|
console.log(NS_TEMPORARY_PERSONNEL)
|
||||||
const { data } = await props["temporaryPersonnelInfo"]({ id: query.id });
|
const { data } = await props["temporaryPersonnelInfo"]({ id: query.id });
|
||||||
const informSignFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[606], eqForeignKey: data.informSignId });
|
console.log(data)
|
||||||
|
const informSignFile = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM[611], eqForeignKey: data.informSignId });
|
||||||
setInfo({
|
setInfo({
|
||||||
...data,
|
...data,
|
||||||
informSignFile,
|
informSignFile,
|
||||||
|
|
@ -36,15 +44,15 @@ function View(props) {
|
||||||
bordered
|
bordered
|
||||||
styles={{ label: { width: 200 } }}
|
styles={{ label: { width: 200 } }}
|
||||||
items={[
|
items={[
|
||||||
{ label: "访问人姓名", children: info.personApplyList[0].employeePersonUserName, span: 2 },
|
{ label: "访问人姓名", children: info.personApplyList?.[0].employeePersonUserName, span: 2 },
|
||||||
{ label: "手机号", children: info.personApplyList[0].userPhone },
|
{ label: "手机号", children: info.personApplyList?.[0].userPhone },
|
||||||
{ label: "身份证号", children: info.personApplyList[0].userCard },
|
{ label: "身份证号", children: info.personApplyList?.[0].userCard },
|
||||||
{ label: "访问开始时间", children: info.visitStartTime },
|
{ label: "访问开始时间", children: info.visitStartTime },
|
||||||
{ label: "访问结束时间", children: info.visitEndTime },
|
{ label: "访问结束时间", children: info.visitEndTime },
|
||||||
{ label: "访问港区", children: info.gateLevelAuthArea && JSON.parse(info.gateLevelAuthArea).area.map(item => item.value).join("、") },
|
{ label: "访问港区", children: info.gateLevelAuthArea && JSON.parse(info.gateLevelAuthArea).area.map(item => item.value).join("、") },
|
||||||
{ label: "访问口门名称", children: info.mkmjName },
|
{ label: "访问口门名称", children: info.mkmjName },
|
||||||
{ label: "来访事由", children: info.reasonVisit, span: 2 },
|
{ label: "来访事由", children: info.reasonVisit, span: 2 },
|
||||||
{ label: "人脸照片", children: (<PreviewImg files={[info.personApplyList[0].userFaceUrl]} />), span: 2 },
|
{ label: "人脸照片", children: (<PreviewImg files={[info.personApplyList?.[0].userFaceUrl]} />), span: 2 },
|
||||||
{ label: "申请人安全告知签字", children: (<PreviewImg files={info.informSignFile} />) },
|
{ label: "申请人安全告知签字", children: (<PreviewImg files={info.informSignFile} />) },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
|
@ -57,6 +65,8 @@ function View(props) {
|
||||||
{ label: "审批企业", children: info.auditCorpName },
|
{ label: "审批企业", children: info.auditCorpName },
|
||||||
{ label: "审批部门", children: info.auditDeptName },
|
{ label: "审批部门", children: info.auditDeptName },
|
||||||
{ label: "审批人", children: info.auditUserName },
|
{ label: "审批人", children: info.auditUserName },
|
||||||
|
{ label: "审批状态", children: getLabelName({ list: VEHICLE_APPROVAL_STATUS_ENUM, status: info.auditFlag }) },
|
||||||
|
...(info.auditFlag === 1 ? [] : [{ label: "审批时间", children: info.auditTime }, { label: "驳回原因", children: info.reasonsRefusal }]),
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Spin>
|
</Spin>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue