需求变更:将准入资质维护和准入资质审核给“秦港物资中心”和“秦港股份调度指挥中心”两家分公司
parent
9ede5189c4
commit
1aa663fbcb
|
|
@ -41,3 +41,7 @@ export const getQualificationMaintenanceChangeLogByIds = declareRequest(
|
|||
"qualificationMaintenanceLoading",
|
||||
`Get > /xgfManager/qualificationsChangeLog/listByIds?ids={ids}`,
|
||||
);
|
||||
export const getDepartmentList = declareRequest(
|
||||
"qualificationMaintenanceLoading",
|
||||
`Post > @/basicInfo/department/listAllTreeByCorpTypeAndCorpIds`,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
import AddPage from "~/pages/Container/Supervision/Qualification/Maintenance/Add";
|
||||
|
||||
function Add(props) {
|
||||
return (
|
||||
<AddPage {...props} />
|
||||
);
|
||||
}
|
||||
|
||||
export default Add;
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import AddQualificationsPage from "~/pages/Container/Supervision/Qualification/Maintenance/AddQualifications";
|
||||
|
||||
function AddQualifications(props) {
|
||||
return (
|
||||
<AddQualificationsPage {...props} />
|
||||
);
|
||||
}
|
||||
|
||||
export default AddQualifications;
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import ChangeLogListPage from "~/pages/Container/Supervision/Qualification/Maintenance/ChangeLogList";
|
||||
|
||||
function ChangeLogList(props) {
|
||||
return (
|
||||
<ChangeLogListPage {...props} />
|
||||
);
|
||||
}
|
||||
|
||||
export default ChangeLogList;
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import ChangeLogViewPage from "~/pages/Container/Supervision/Qualification/Maintenance/ChangeLogView";
|
||||
|
||||
function ChangeLogView(props) {
|
||||
return (
|
||||
<ChangeLogViewPage {...props} />
|
||||
);
|
||||
}
|
||||
|
||||
export default ChangeLogView;
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
import ListPage from "~/pages/Container/Supervision/Qualification/Maintenance/List";
|
||||
|
||||
function List(props) {
|
||||
return (
|
||||
<ListPage
|
||||
addBtn="zrzz-qyd-zrzzwh-btn-xz"
|
||||
editBtn="zrzz-qyd-zrzzwh-btn-xg"
|
||||
qyjyBtn="zrzz-qyd-zrzzwh-btn-qyjy"
|
||||
bgjlBtn="zrzz-qyd-zrzzwh-btn-bgjl"
|
||||
entrance="branchCompany"
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default List;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function Maintenance(props) {
|
||||
return (<div>{props.children}</div>);
|
||||
}
|
||||
|
||||
export default Maintenance;
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
import ListPage from "~/pages/Container/Supervision/Qualification/Review/List";
|
||||
|
||||
function List(props) {
|
||||
return (
|
||||
<ListPage
|
||||
wtBtn="qyd-zrzzsh-wt"
|
||||
shBtn="zrzz-qyd-xgfzrzzsh-btn-sh"
|
||||
entrance="branchCompany"
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default List;
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import ReviewPage from "~/pages/Container/Supervision/Qualification/Review/Review";
|
||||
|
||||
function Review(props) {
|
||||
return (
|
||||
<ReviewPage {...props} />
|
||||
);
|
||||
}
|
||||
|
||||
export default Review;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function Review(props) {
|
||||
return (<div>{props.children}</div>);
|
||||
}
|
||||
|
||||
export default Review;
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
import InfoPage from "../../../../Supervision/Qualification/ViewInfo";
|
||||
|
||||
function ViewInfo() {
|
||||
return (
|
||||
<InfoPage />
|
||||
);
|
||||
}
|
||||
|
||||
export default ViewInfo;
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
function Access(props) {
|
||||
return (<div>{props.children}</div>);
|
||||
}
|
||||
|
||||
export default Access;
|
||||
|
|
@ -5,6 +5,7 @@ import FormBuilder from "zy-react-library/components/FormBuilder";
|
|||
import Page from "zy-react-library/components/Page";
|
||||
import DictionarySelect from "zy-react-library/components/Select/Dictionary";
|
||||
import PersonnelSelect from "zy-react-library/components/Select/Personnel/Gwj";
|
||||
import BasicSelectTree from "zy-react-library/components/SelectTree/Basic";
|
||||
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
|
|
@ -13,7 +14,8 @@ import { NS_QUALIFICATION_MAINTENANCE } from "~/enumerate/namespace";
|
|||
function Add(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const [form] = Form.useForm();
|
||||
const [corpTypeList, setCorpTypeList] = useState([2]);
|
||||
const [corpTypeList, setCorpTypeList] = useState([]);
|
||||
const [departmentList, setDepartmentList] = useState([]);
|
||||
const managerDept = Form.useWatch("managerDept", form);
|
||||
const shareDeptId = Form.useWatch("shareDeptId", form);
|
||||
|
||||
|
|
@ -24,7 +26,6 @@ function Add(props) {
|
|||
}
|
||||
if (data?.details?.length) {
|
||||
data?.details?.forEach((item) => {
|
||||
|
||||
item.isRequired = item.isRequired ?? 1;
|
||||
});
|
||||
}
|
||||
|
|
@ -41,6 +42,16 @@ function Add(props) {
|
|||
useEffect(() => {
|
||||
query.id && getData();
|
||||
}, []);
|
||||
|
||||
const getDepartmentList = async () => {
|
||||
const { data } = await props.getDepartmentList({ inType: corpTypeList });
|
||||
setDepartmentList(data);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getDepartmentList();
|
||||
}, [JSON.stringify(corpTypeList)]);
|
||||
|
||||
const onSubmit = async (values) => {
|
||||
const { success } = await props[!query.id ? "qualificationMaintenanceAdd" : "qualificationMaintenanceUpdate"]({
|
||||
...values,
|
||||
|
|
@ -67,7 +78,7 @@ function Add(props) {
|
|||
dataTypeName: undefined,
|
||||
dataName: undefined,
|
||||
isValidity: undefined,
|
||||
isRequired:1
|
||||
isRequired: 1,
|
||||
}],
|
||||
}}
|
||||
loading={props.qualificationMaintenance.qualificationMaintenanceLoading}
|
||||
|
|
@ -108,7 +119,7 @@ function Add(props) {
|
|||
setCorpTypeList([2, 6]);
|
||||
}
|
||||
else {
|
||||
setCorpTypeList([2]);
|
||||
setCorpTypeList([]);
|
||||
}
|
||||
form.setFieldValue("managerDept", "");
|
||||
form.setFieldValue("managerDeptName", "");
|
||||
|
|
@ -141,10 +152,10 @@ function Add(props) {
|
|||
name: "managerDept",
|
||||
label: "审核部门",
|
||||
render: (
|
||||
<DepartmentSelectTree
|
||||
<BasicSelectTree
|
||||
treeData={departmentList}
|
||||
childrenKey="childrenList"
|
||||
disabled={query.id}
|
||||
searchType="inType"
|
||||
params={{ inType: corpTypeList }}
|
||||
onGetLabel={(label) => {
|
||||
form.setFieldValue("managerDeptName", label);
|
||||
}}
|
||||
|
|
@ -182,8 +193,6 @@ function Add(props) {
|
|||
},
|
||||
|
||||
{ name: "managerUserName", label: "审核人名称", onlyForLabel: true },
|
||||
|
||||
|
||||
{
|
||||
name: "shareDeptId",
|
||||
label: "股份主管部门",
|
||||
|
|
@ -253,7 +262,7 @@ function Add(props) {
|
|||
),
|
||||
},
|
||||
|
||||
{ label: "资料名称", name: [field.name, "dataName"], span: 6 , labelCol: { span: 6 },},
|
||||
{ label: "资料名称", name: [field.name, "dataName"], span: 6, labelCol: { span: 6 } },
|
||||
{
|
||||
label: "是否涉及有效时间",
|
||||
name: [field.name, "isValidity"],
|
||||
|
|
|
|||
|
|
@ -1,19 +1,36 @@
|
|||
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, message, Modal, Space } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
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 Table from "zy-react-library/components/Table";
|
||||
import useGetUserInfo from "zy-react-library/hooks/useGetUserInfo";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_QUALIFICATION_MAINTENANCE } from "~/enumerate/namespace";
|
||||
|
||||
const authorizedEnterprises = ["1746864895590143510", "2076831356482732032", "2008712261453131776"];
|
||||
function List(props) {
|
||||
const [currentCorpId, setCurrentCorpId] = useState("");
|
||||
const { getUserInfo } = useGetUserInfo();
|
||||
const [form] = Form.useForm();
|
||||
const { tableProps, getData } = useTable(props["qualificationMaintenanceList"], {
|
||||
form,
|
||||
});
|
||||
// 监管端仅校验按钮权限,分公司端还需限制为指定企业。
|
||||
const isAuthorizedEntrance = props.entrance !== "branchCompany" || authorizedEnterprises.includes(currentCorpId);
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
if (props.entrance !== "branchCompany")
|
||||
return;
|
||||
|
||||
const userInfo = await getUserInfo();
|
||||
setCurrentCorpId(userInfo.corpinfoId);
|
||||
})();
|
||||
}, []);
|
||||
|
||||
const onDelete = (id, status) => {
|
||||
const msg = status === 0 ? "启用" : "禁用";
|
||||
|
|
@ -45,7 +62,7 @@ function List(props) {
|
|||
<Table
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
{props.permission("zrzz-jgd-zrzzwh-btn-xz") && (
|
||||
{(isAuthorizedEntrance && props.permission(props.addBtn || "zrzz-jgd-zrzzwh-btn-xz")) && (
|
||||
<Button
|
||||
type="primary"
|
||||
icon={<AddIcon />}
|
||||
|
|
@ -72,7 +89,7 @@ function List(props) {
|
|||
width: 200,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
{props.permission("zrzz-jgd-zrzzwh-btn-xg") && (
|
||||
{(isAuthorizedEntrance && props.permission(props.editBtn || "zrzz-jgd-zrzzwh-btn-xg")) && (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
|
|
@ -82,7 +99,7 @@ function List(props) {
|
|||
编辑
|
||||
</Button>
|
||||
)}
|
||||
{props.permission("zrzz-jgd-zrzzwh-btn-qyjy") && (
|
||||
{(isAuthorizedEntrance && props.permission(props.qyjyBtn || "zrzz-jgd-zrzzwh-btn-qyjy")) && (
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
|
|
@ -91,7 +108,7 @@ function List(props) {
|
|||
{record.status === 0 ? "禁用" : "启用"}
|
||||
</Button>
|
||||
)}
|
||||
{props.permission("zrzz-jgd-zrzzwh-btn-bgjl") && (
|
||||
{(isAuthorizedEntrance && props.permission(props.bgjlBtn || "zrzz-jgd-zrzzwh-btn-bgjl")) && (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import { useEffect, 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";
|
||||
|
|
@ -9,10 +9,14 @@ 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 useGetUserInfo from "zy-react-library/hooks/useGetUserInfo";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import { NS_QUALIFICATION_REVIEW } from "~/enumerate/namespace";
|
||||
|
||||
const authorizedEnterprises = ["1746864895590143510", "2076831356482732032", "2008712261453131776"];
|
||||
function List(props) {
|
||||
const [currentCorpId, setCurrentCorpId] = useState("");
|
||||
const { getUserInfo } = useGetUserInfo();
|
||||
const [form] = Form.useForm();
|
||||
const [entrustModalOpen, setEntrustModalOpen] = useState(false);
|
||||
const [qualificationsApplyId, setQualificationsApplyId] = useState("");
|
||||
|
|
@ -21,6 +25,18 @@ function List(props) {
|
|||
const { tableProps, getData } = useTable(props["qualificationReviewList"], {
|
||||
form,
|
||||
});
|
||||
// 监管端仅校验按钮权限,分公司端还需限制为指定企业。
|
||||
const isAuthorizedEntrance = props.entrance !== "branchCompany" || authorizedEnterprises.includes(currentCorpId);
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
if (props.entrance !== "branchCompany")
|
||||
return;
|
||||
|
||||
const userInfo = await getUserInfo();
|
||||
setCurrentCorpId(userInfo.corpinfoId);
|
||||
})();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
|
@ -69,7 +85,8 @@ function List(props) {
|
|||
查看
|
||||
</Button>
|
||||
{
|
||||
(record.entrustAudit === 200 && props.permission("gfd-zrzzsh-wt")) &&
|
||||
(record.entrustAudit === 200 && isAuthorizedEntrance && props.permission(props.wtBtn || "gfd-zrzzsh-wt"))
|
||||
&& (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
|
|
@ -81,8 +98,9 @@ function List(props) {
|
|||
>
|
||||
委托
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
{props.permission("zrzz-jgd-xgfzrzzsh-btn-sh") && (
|
||||
{(isAuthorizedEntrance && props.permission(props.shBtn || "zrzz-jgd-xgfzrzzsh-btn-sh")) && (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
|
|
@ -103,7 +121,7 @@ function List(props) {
|
|||
<EntrustModal
|
||||
onCancel={() => {
|
||||
setEntrustModalOpen(false);
|
||||
getData()
|
||||
getData();
|
||||
}}
|
||||
qualificationsApplyId={qualificationsApplyId}
|
||||
qualificationsAuditId={qualificationsAuditId}
|
||||
|
|
|
|||
Loading…
Reference in New Issue