feat:是否存在与人资从相关方申请的时候去除掉。
parent
9893d5ed2c
commit
6b31bb3eff
|
|
@ -8,6 +8,10 @@ export const qualificationReviewInfo = declareRequest(
|
||||||
"qualificationReviewLoading",
|
"qualificationReviewLoading",
|
||||||
`Get > /xgfManager/qualificationsApply/{id}`,
|
`Get > /xgfManager/qualificationsApply/{id}`,
|
||||||
);
|
);
|
||||||
|
export const qualificationEntrustCorpAuditInfo = declareRequest(
|
||||||
|
"qualificationReviewLoading",
|
||||||
|
`Post > @/xgfManager/qualificationsApply/entrustCorpAudit`,
|
||||||
|
);
|
||||||
export const corpInfoDetails = declareRequest(
|
export const corpInfoDetails = declareRequest(
|
||||||
"enterpriseLoading",
|
"enterpriseLoading",
|
||||||
"Post > @/basicInfo/corpInfo/info/{id}",
|
"Post > @/basicInfo/corpInfo/info/{id}",
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,29 @@
|
||||||
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button, Form, Space } from "antd";
|
import { Button, Form, message, Modal, Space } from "antd";
|
||||||
|
import { useState } from "react";
|
||||||
|
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 Search from "zy-react-library/components/Search";
|
import Search from "zy-react-library/components/Search";
|
||||||
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 Table from "zy-react-library/components/Table";
|
import Table from "zy-react-library/components/Table";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { NS_QUALIFICATION_REVIEW } from "~/enumerate/namespace";
|
import { NS_QUALIFICATION_REVIEW } from "~/enumerate/namespace";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
const [entrustModalOpen, setEntrustModalOpen] = useState(false);
|
||||||
|
const [qualificationsApplyId, setQualificationsApplyId] = useState("");
|
||||||
|
const [qualificationsAuditId, setQualificationsAuditId] = useState("");
|
||||||
|
const [qualificationsId, setQualificationsIdId] = useState("");
|
||||||
const { tableProps, getData } = useTable(props["qualificationReviewList"], {
|
const { tableProps, getData } = useTable(props["qualificationReviewList"], {
|
||||||
form,
|
form,
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<div>
|
||||||
<Page isShowAllAction={false}>
|
<Page isShowAllAction={false}>
|
||||||
<Search
|
<Search
|
||||||
labelCol={{ span: 8 }}
|
labelCol={{ span: 8 }}
|
||||||
|
|
@ -42,52 +51,33 @@ function List(props) {
|
||||||
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
||||||
{ title: "资质等级", dataIndex: "stakeholderLevelName" },
|
{ title: "资质等级", dataIndex: "stakeholderLevelName" },
|
||||||
{ title: "材料数", dataIndex: "materialNum" },
|
{ title: "材料数", dataIndex: "materialNum" },
|
||||||
// {
|
|
||||||
// title: "资质状态",
|
|
||||||
// dataIndex: "qualificationsStatus",
|
|
||||||
// render: (_, record) => (
|
|
||||||
// <div>
|
|
||||||
// {record.qualificationsStatus === 0 && "正常"}
|
|
||||||
// {record.qualificationsStatus === 1 && "待完善"}
|
|
||||||
// {record.qualificationsStatus === 2 && (
|
|
||||||
// <Tooltip
|
|
||||||
// overlayStyle={{ width: "auto", maxWidth: "700px", whiteSpace: "normal", wordBreak: "break-word" }}
|
|
||||||
// title={
|
|
||||||
// record.expireList
|
|
||||||
// ? (
|
|
||||||
// <div style={{ width: "100%" }}>
|
|
||||||
// {record.expireList.map((item, index) => (
|
|
||||||
// <div key={index}>
|
|
||||||
// {item.dataName}
|
|
||||||
// {" "}
|
|
||||||
// 已于
|
|
||||||
// {item.qualificationsTermEnd}
|
|
||||||
// {" "}
|
|
||||||
// 过期
|
|
||||||
// </div>
|
|
||||||
// ))}
|
|
||||||
// </div>
|
|
||||||
// )
|
|
||||||
// : "部分资料已过期"
|
|
||||||
// }
|
|
||||||
// >
|
|
||||||
// <span style={{ display: "inline-flex", alignItems: "center" }}>
|
|
||||||
// 存在异常
|
|
||||||
// {" "}
|
|
||||||
// <WarningOutlined style={{ color: "#faad14", marginLeft: 4 }} />
|
|
||||||
// </span>
|
|
||||||
// </Tooltip>
|
|
||||||
// )}
|
|
||||||
// {(record.qualificationsStatus === 3 || record.qualificationsStatus === 4) && "资质过期"}
|
|
||||||
// </div>
|
|
||||||
// ),
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
width: 100,
|
width: 100,
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
|
{/* todo recor里entrustAudit 是200 才能委托,
|
||||||
|
*/}
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
setEntrustModalOpen(true);
|
||||||
|
setQualificationsApplyId(record.id);
|
||||||
|
setQualificationsAuditId(record.qualificationsAuditId);
|
||||||
|
setQualificationsIdId(record.qualificationsId);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
委托
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
props.history.push(`./review?id=${record.id}&qualificationsAuditId=${record.qualificationsAuditId}`);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
转交审核
|
||||||
|
</Button>
|
||||||
{props.permission("zrzz-jgd-xgfzrzzsh-btn-sh") && (
|
{props.permission("zrzz-jgd-xgfzrzzsh-btn-sh") && (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
|
|
@ -105,7 +95,94 @@ function List(props) {
|
||||||
{...tableProps}
|
{...tableProps}
|
||||||
/>
|
/>
|
||||||
</Page>
|
</Page>
|
||||||
|
{entrustModalOpen && (
|
||||||
|
<EntrustModal
|
||||||
|
onCancel={() => {
|
||||||
|
setEntrustModalOpen(false);
|
||||||
|
}}
|
||||||
|
qualificationsApplyId={qualificationsApplyId}
|
||||||
|
qualificationsAuditId={qualificationsAuditId}
|
||||||
|
qualificationsId={qualificationsId}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
const EntrustModalComponent = (props) => {
|
||||||
|
const [form] = Form.useForm();
|
||||||
|
const auditCorpDept = Form.useWatch("auditCorpDept", form);
|
||||||
|
const onSubmit = async (values) => {
|
||||||
|
const { success } = await props["qualificationEntrustCorpAuditInfo"]({ ...values, auditUser: values.auditUser.join(","), auditUserName: values.auditUserName.join(","), qualificationsApplyId: props.qualificationsApplyId, qualificationsAuditId: props.qualificationsAuditId, qualificationsId: props.qualificationsId });
|
||||||
|
if (success) {
|
||||||
|
message.success("委托成功");
|
||||||
|
props.onCancel();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Modal
|
||||||
|
title="委托审核"
|
||||||
|
width={600}
|
||||||
|
open
|
||||||
|
maskClosable={false}
|
||||||
|
onCancel={props.onCancel}
|
||||||
|
onOk={form.submit}
|
||||||
|
confirmLoading={props.qualificationReview.userQualificationLoading}
|
||||||
|
>
|
||||||
|
<FormBuilder
|
||||||
|
form={form}
|
||||||
|
span={24}
|
||||||
|
labelCol={{ span: 10 }}
|
||||||
|
showActionButtons={false}
|
||||||
|
onFinish={onSubmit}
|
||||||
|
loading={props.qualificationReview.userQualificationLoading}
|
||||||
|
options={[
|
||||||
|
{ name: "auditCorp", label: "审核部门所属公司", onlyForLabel: true },
|
||||||
|
{ name: "auditCorpName", label: "审核部门所属公司名称", onlyForLabel: true },
|
||||||
|
{
|
||||||
|
name: "auditCorpDept",
|
||||||
|
label: "审核部门",
|
||||||
|
render: (
|
||||||
|
<DepartmentSelectTree
|
||||||
|
searchType="inType"
|
||||||
|
params={{ inType: [0] }}
|
||||||
|
onGetLabel={(label) => {
|
||||||
|
form.setFieldValue("auditCorpDeptName", label);
|
||||||
|
}}
|
||||||
|
onChange={() => {
|
||||||
|
form.setFieldValue("auditUser", []);
|
||||||
|
form.setFieldValue("auditUserName", []);
|
||||||
|
}}
|
||||||
|
onGetNodePaths={(nodes) => {
|
||||||
|
const lastNode = nodes.at(-1);
|
||||||
|
form.setFieldValue("auditCorp", lastNode.corpinfoId);
|
||||||
|
form.setFieldValue("auditCorpName", lastNode.corpinfoName);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{ name: "auditCorpDeptName", label: "审核部门名称", onlyForLabel: true },
|
||||||
|
{
|
||||||
|
name: "auditUser",
|
||||||
|
label: "审核人员",
|
||||||
|
render: (
|
||||||
|
<PersonnelSelect
|
||||||
|
extraParams={{ noMain: 1 }}
|
||||||
|
params={{ departmentId: auditCorpDept }}
|
||||||
|
mode="multiple"
|
||||||
|
onGetLabel={(label) => {
|
||||||
|
form.setFieldValue("auditUserName", label);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{ name: "auditUserName", label: "审核人名称", onlyForLabel: true },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
</Modal>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
const EntrustModal = Connect([NS_QUALIFICATION_REVIEW], true)(EntrustModalComponent);
|
||||||
|
|
||||||
export default Connect([NS_QUALIFICATION_REVIEW], true)(Permission(List));
|
export default Connect([NS_QUALIFICATION_REVIEW], true)(Permission(List));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue