feat:是否存在与人资从相关方申请的时候去除掉。
parent
9893d5ed2c
commit
6b31bb3eff
|
|
@ -8,6 +8,10 @@ export const qualificationReviewInfo = declareRequest(
|
|||
"qualificationReviewLoading",
|
||||
`Get > /xgfManager/qualificationsApply/{id}`,
|
||||
);
|
||||
export const qualificationEntrustCorpAuditInfo = declareRequest(
|
||||
"qualificationReviewLoading",
|
||||
`Post > @/xgfManager/qualificationsApply/entrustCorpAudit`,
|
||||
);
|
||||
export const corpInfoDetails = declareRequest(
|
||||
"enterpriseLoading",
|
||||
"Post > @/basicInfo/corpInfo/info/{id}",
|
||||
|
|
|
|||
|
|
@ -1,111 +1,188 @@
|
|||
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||
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 Search from "zy-react-library/components/Search";
|
||||
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 useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_QUALIFICATION_REVIEW } from "~/enumerate/namespace";
|
||||
|
||||
function List(props) {
|
||||
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"], {
|
||||
form,
|
||||
});
|
||||
|
||||
return (
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
labelCol={{ span: 8 }}
|
||||
options={[
|
||||
{ name: "qualificationsName", label: "资质名称" },
|
||||
{
|
||||
name: "qualificationsTypeId",
|
||||
label: "资质类别",
|
||||
render: (<DictionarySelect dictValue="qualificationsType" />),
|
||||
},
|
||||
{ name: "stakeholderLevel", label: "资质等级", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "相关方名称", dataIndex: "corpName" },
|
||||
{
|
||||
title: "所属集团单位",
|
||||
dataIndex: "groupUnitName",
|
||||
render: (_, record) => record.stakeholderLevel === "one-level" ? "-" : record.groupUnitName,
|
||||
},
|
||||
{ title: "资质名称", dataIndex: "qualificationsName" },
|
||||
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
||||
{ title: "资质等级", dataIndex: "stakeholderLevelName" },
|
||||
{ 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: "操作",
|
||||
fixed: "right",
|
||||
width: 100,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
{props.permission("zrzz-jgd-xgfzrzzsh-btn-sh") && (
|
||||
<div>
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
labelCol={{ span: 8 }}
|
||||
options={[
|
||||
{ name: "qualificationsName", label: "资质名称" },
|
||||
{
|
||||
name: "qualificationsTypeId",
|
||||
label: "资质类别",
|
||||
render: (<DictionarySelect dictValue="qualificationsType" />),
|
||||
},
|
||||
{ name: "stakeholderLevel", label: "资质等级", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "相关方名称", dataIndex: "corpName" },
|
||||
{
|
||||
title: "所属集团单位",
|
||||
dataIndex: "groupUnitName",
|
||||
render: (_, record) => record.stakeholderLevel === "one-level" ? "-" : record.groupUnitName,
|
||||
},
|
||||
{ title: "资质名称", dataIndex: "qualificationsName" },
|
||||
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
||||
{ title: "资质等级", dataIndex: "stakeholderLevelName" },
|
||||
{ title: "材料数", dataIndex: "materialNum" },
|
||||
{
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
width: 100,
|
||||
render: (_, record) => (
|
||||
<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>
|
||||
)}
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
{props.permission("zrzz-jgd-xgfzrzzsh-btn-sh") && (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./review?id=${record.id}&qualificationsAuditId=${record.qualificationsAuditId}`);
|
||||
}}
|
||||
>
|
||||
审核
|
||||
</Button>
|
||||
)}
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</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));
|
||||
|
|
|
|||
Loading…
Reference in New Issue