Compare commits
No commits in common. "dev" and "master" have entirely different histories.
|
|
@ -20,7 +20,7 @@ module.exports = {
|
||||||
// 应用后端分支名称,部署上线需要
|
// 应用后端分支名称,部署上线需要
|
||||||
javaGitBranch: "<branch-name>",
|
javaGitBranch: "<branch-name>",
|
||||||
// 接口服务地址
|
// 接口服务地址
|
||||||
API_HOST: "",
|
API_HOST: "https://gbs-gateway.qhdsafety.com",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// 应用唯一标识符
|
// 应用唯一标识符
|
||||||
|
|
@ -29,9 +29,8 @@ module.exports = {
|
||||||
contextInject: {
|
contextInject: {
|
||||||
// 应用Key
|
// 应用Key
|
||||||
appKey: "",
|
appKey: "",
|
||||||
// fileUrl: "https://jpfz.qhdsafety.com/gbsFileTest/",
|
fileUrl: "https://jpfz.qhdsafety.com/gbsFileTest/",
|
||||||
// fileUrl: "http://192.168.20.240:9787/mnt/",
|
// fileUrl: "http://192.168.20.240:9787/mnt/",
|
||||||
fileUrl: "https://skqhdg.porthebei.com:9004/file/uploadFiles2/",
|
|
||||||
},
|
},
|
||||||
// public/index.html注入全局变量
|
// public/index.html注入全局变量
|
||||||
windowInject: {
|
windowInject: {
|
||||||
|
|
|
||||||
|
|
@ -98,8 +98,3 @@ export const trainingUserListPage = declareRequest(
|
||||||
"qualificationStatisticsLoading",
|
"qualificationStatisticsLoading",
|
||||||
`Post > @/edu/trainingUser/listEduUserPage`,
|
`Post > @/edu/trainingUser/listEduUserPage`,
|
||||||
);
|
);
|
||||||
|
|
||||||
export const keyProjectAdd = declareRequest(
|
|
||||||
"qualificationStatisticsLoading",
|
|
||||||
"Post > @/keyProject/keyProject/save",
|
|
||||||
);
|
|
||||||
|
|
|
||||||
|
|
@ -19,19 +19,6 @@ import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
||||||
import { getLabelName, validatorEndTime, validatorTimeGECurrentDay } from "zy-react-library/utils";
|
import { getLabelName, validatorEndTime, validatorTimeGECurrentDay } from "zy-react-library/utils";
|
||||||
import { NS_QUALIFICATION_APPLY, NS_QUALIFICATION_MAINTENANCE } from "~/enumerate/namespace";
|
import { NS_QUALIFICATION_APPLY, NS_QUALIFICATION_MAINTENANCE } from "~/enumerate/namespace";
|
||||||
|
|
||||||
const hasSelectedValue = value => Array.isArray(value) ? value.length > 0 : !!value;
|
|
||||||
|
|
||||||
const validateQualificationBusiness = (values) => {
|
|
||||||
if (values.qualificationsTypeId !== "sbl")
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if ([values.maintain, values.detection, values.otherHighRiskName].some(hasSelectedValue))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
message.error("“维修、保养”“检测”“其它高风险业务”,至少选择一项。");
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
function Add(props) {
|
function Add(props) {
|
||||||
const query = useGetUrlQuery();
|
const query = useGetUrlQuery();
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
|
@ -46,14 +33,6 @@ function Add(props) {
|
||||||
|
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
const { data } = await props["qualificationApplyInfo"]({ id: query.id });
|
const { data } = await props["qualificationApplyInfo"]({ id: query.id });
|
||||||
console.log(data);
|
|
||||||
data.maintain = data.maintain && data.maintain.split(",")
|
|
||||||
data.detection = data.detection && data.detection.split(",")
|
|
||||||
data.otherHighRisk = data.otherHighRisk && data.otherHighRisk.split(",")
|
|
||||||
data.detectionName = data.detectionName && data.detectionName.split(",")
|
|
||||||
data.maintainName = data.maintainName && data.maintainName.split(",")
|
|
||||||
data.otherHighRiskName = data.otherHighRiskName && data.otherHighRiskName.split(",")
|
|
||||||
|
|
||||||
// 重新提交时,删除id
|
// 重新提交时,删除id
|
||||||
if (query.resubmit) {
|
if (query.resubmit) {
|
||||||
delete data.id;
|
delete data.id;
|
||||||
|
|
@ -143,8 +122,6 @@ const StepOneComponent = (props) => {
|
||||||
|
|
||||||
const getQualificationsListAll = async () => {
|
const getQualificationsListAll = async () => {
|
||||||
const { data } = await props["qualificationsListAll"]({ qualificationsTypeId, stakeholderLevel, status: 0 });
|
const { data } = await props["qualificationsListAll"]({ qualificationsTypeId, stakeholderLevel, status: 0 });
|
||||||
|
|
||||||
|
|
||||||
setQualificationsListAll(data);
|
setQualificationsListAll(data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -155,7 +132,6 @@ const StepOneComponent = (props) => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getCorpInfoList(1, 0);
|
getCorpInfoList(1, 0);
|
||||||
|
|
||||||
form.setFieldsValue(props.formValues);
|
form.setFieldsValue(props.formValues);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|
@ -185,9 +161,6 @@ const StepOneComponent = (props) => {
|
||||||
form={form}
|
form={form}
|
||||||
loading={props.qualificationApply.qualificationApplyLoading}
|
loading={props.qualificationApply.qualificationApplyLoading}
|
||||||
onFinish={(values) => {
|
onFinish={(values) => {
|
||||||
if (!validateQualificationBusiness(values))
|
|
||||||
return;
|
|
||||||
|
|
||||||
props.setCurrentStep(2);
|
props.setCurrentStep(2);
|
||||||
props.setFormValues(values);
|
props.setFormValues(values);
|
||||||
}}
|
}}
|
||||||
|
|
@ -305,12 +278,10 @@ const StepOneComponent = (props) => {
|
||||||
items: qualificationsListAll,
|
items: qualificationsListAll,
|
||||||
itemsField: { labelKey: "qualificationsName", valueKey: "id" },
|
itemsField: { labelKey: "qualificationsName", valueKey: "id" },
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "maintain",
|
name: "maintain",
|
||||||
label: "维修、保养(多选)",
|
label: "维修、保养",
|
||||||
hidden:qualificationsTypeId !=="sbl",
|
hidden:qualificationsTypeId !=="sbl",
|
||||||
required:false,
|
|
||||||
render: (
|
render: (
|
||||||
<DictionarySelect
|
<DictionarySelect
|
||||||
dictValue="maintain"
|
dictValue="maintain"
|
||||||
|
|
@ -325,9 +296,8 @@ const StepOneComponent = (props) => {
|
||||||
{ name: "maintainName", label: "维修、保养名称", onlyForLabel: true },
|
{ name: "maintainName", label: "维修、保养名称", onlyForLabel: true },
|
||||||
{
|
{
|
||||||
name: "detection",
|
name: "detection",
|
||||||
label: "检测(多选)",
|
label: "检测",
|
||||||
hidden:qualificationsTypeId !=="sbl",
|
hidden:qualificationsTypeId !=="sbl",
|
||||||
required:false,
|
|
||||||
render: (
|
render: (
|
||||||
<DictionarySelect
|
<DictionarySelect
|
||||||
dictValue="detection"
|
dictValue="detection"
|
||||||
|
|
@ -341,8 +311,7 @@ const StepOneComponent = (props) => {
|
||||||
{ name: "detectionName", label: "检测名称", onlyForLabel: true },
|
{ name: "detectionName", label: "检测名称", onlyForLabel: true },
|
||||||
{
|
{
|
||||||
name: "otherHighRisk",
|
name: "otherHighRisk",
|
||||||
label: "其它高风险业务(多选)",
|
label: "其它高风险业务",
|
||||||
required:false,
|
|
||||||
hidden:qualificationsTypeId !=="sbl",
|
hidden:qualificationsTypeId !=="sbl",
|
||||||
render: (
|
render: (
|
||||||
<DictionarySelect
|
<DictionarySelect
|
||||||
|
|
@ -451,20 +420,15 @@ const StepTwoComponent = forwardRef((props, ref) => {
|
||||||
|
|
||||||
const validateFileList = (list) => {
|
const validateFileList = (list) => {
|
||||||
for (let i = 0; i < list.length; i++) {
|
for (let i = 0; i < list.length; i++) {
|
||||||
if(list[i].isRequired == null || list[i].isRequired === 1) {
|
|
||||||
if (!list[i].files || list[i].files.length === 0) {
|
if (!list[i].files || list[i].files.length === 0) {
|
||||||
message.error(`请上传${list[i].dataName}的资质`);
|
message.error(`请上传${list[i].dataName}的资质`);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
if (!validateQualificationBusiness(props.formValues))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!validateFileList(specialList))
|
if (!validateFileList(specialList))
|
||||||
return;
|
return;
|
||||||
for (let i = 0; i < specialList.length; i++) {
|
for (let i = 0; i < specialList.length; i++) {
|
||||||
|
|
@ -529,10 +493,6 @@ const StepTwoComponent = forwardRef((props, ref) => {
|
||||||
dataIndex: "qualificationsTermStart",
|
dataIndex: "qualificationsTermStart",
|
||||||
render: (_, record) => record.qualificationsTermStart ? `${record.qualificationsTermStart}至${record.qualificationsTermEnd}` : "-",
|
render: (_, record) => record.qualificationsTermStart ? `${record.qualificationsTermStart}至${record.qualificationsTermEnd}` : "-",
|
||||||
},
|
},
|
||||||
{ title: "是否必填", dataIndex: "isRequired", render: (_, record) => {
|
|
||||||
if (record.isRequired == null) return "必填";
|
|
||||||
return record.isRequired ? "必填" : "非必填";
|
|
||||||
} },
|
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
width: 150,
|
width: 150,
|
||||||
|
|
|
||||||
|
|
@ -73,9 +73,9 @@ function View(props) {
|
||||||
|
|
||||||
...(
|
...(
|
||||||
info.qualificationsTypeId === "sbl" ? [
|
info.qualificationsTypeId === "sbl" ? [
|
||||||
{label: "维修、保养", children: info.maintainName && info.maintainName},
|
{label: "维修、保养", children: info.maintainName && info.maintainName.join(" , ")},
|
||||||
{label: "检测", children: info.detectionName && info.detectionName},
|
{label: "检测", children: info.detectionName && info.detectionName.join(" , ")},
|
||||||
{label: "其它高风险业务", children: info.otherHighRiskName && info.otherHighRiskName, span: 2},
|
{label: "其它高风险业务", children: info.otherHighRiskName && info.otherHighRiskName.join(" , "), span: 2},
|
||||||
] : []
|
] : []
|
||||||
),
|
),
|
||||||
{ label: "备注", children: info.remarks },
|
{ label: "备注", children: info.remarks },
|
||||||
|
|
@ -104,7 +104,6 @@ function View(props) {
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setViewQualificationDetailsModalOpen(true);
|
setViewQualificationDetailsModalOpen(true);
|
||||||
setViewQualificationDetailsModalData(record);
|
setViewQualificationDetailsModalData(record);
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,16 @@
|
||||||
import { WarningOutlined } from "@ant-design/icons";
|
import { WarningOutlined } from "@ant-design/icons";
|
||||||
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, Descriptions, Form, Modal, Space, Tooltip} from "antd";
|
import { Button, Form, Space, Tooltip } from "antd";
|
||||||
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 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_APPLY, NS_QUALIFICATION_RECORDS} from "~/enumerate/namespace";
|
import { NS_QUALIFICATION_RECORDS } from "~/enumerate/namespace";
|
||||||
import {useState} from "react";
|
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [rejectReasonModalOpen, setRejectReasonModalOpen] = useState(false);
|
|
||||||
const [rejectReason, setRejectReason] = useState(false);
|
|
||||||
const { tableProps, getData } = useTable(props["qualificationRecordsList"], {
|
const { tableProps, getData } = useTable(props["qualificationRecordsList"], {
|
||||||
form,
|
form,
|
||||||
transform: (formData) => {
|
transform: (formData) => {
|
||||||
|
|
@ -24,11 +21,7 @@ function List(props) {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const onViewRejectReason = async (id) => {
|
|
||||||
const { data } = await props["qualificationApplyRejectReason"]({ id });
|
|
||||||
setRejectReason(data);
|
|
||||||
setRejectReasonModalOpen(true);
|
|
||||||
};
|
|
||||||
return (
|
return (
|
||||||
<Page isShowAllAction={false}>
|
<Page isShowAllAction={false}>
|
||||||
<Search
|
<Search
|
||||||
|
|
@ -120,12 +113,10 @@ function List(props) {
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
width: 160,
|
width: 130,
|
||||||
|
hidden: !props.permission("fgs-bwtshjl-ck"),
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{
|
|
||||||
props.permission("fgs-bwtshjl-ck") &&
|
|
||||||
(
|
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -134,49 +125,14 @@ function List(props) {
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
)
|
|
||||||
}
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
danger
|
|
||||||
disabled={record.status !== 300}
|
|
||||||
onClick={() => {
|
|
||||||
onViewRejectReason(record.id);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
查看驳回原因
|
|
||||||
</Button>
|
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
{...tableProps}
|
{...tableProps}
|
||||||
/>
|
/>
|
||||||
{rejectReasonModalOpen && <RejectReason rejectReason={rejectReason} onCancel={() => setRejectReasonModalOpen(false)} />}
|
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const RejectReason = (props) => {
|
|
||||||
return (
|
export default Connect([NS_QUALIFICATION_RECORDS], true)(Permission(List));
|
||||||
<Modal
|
|
||||||
title="查看驳回原因"
|
|
||||||
width={600}
|
|
||||||
open
|
|
||||||
maskClosable={false}
|
|
||||||
onCancel={props.onCancel}
|
|
||||||
footer={[
|
|
||||||
<Button key="cancel" onClick={props.onCancel}>关闭</Button>,
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
<Descriptions
|
|
||||||
bordered
|
|
||||||
column={1}
|
|
||||||
styles={{ label: { width: 200 } }}
|
|
||||||
items={[
|
|
||||||
{ label: "驳回原因", children: props.rejectReason },
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</Modal>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
export default Connect([NS_QUALIFICATION_RECORDS,NS_QUALIFICATION_APPLY], true)(Permission(List));
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ function List(props) {
|
||||||
return {
|
return {
|
||||||
auditProcess: auditStatus[0],
|
auditProcess: auditStatus[0],
|
||||||
auditStatus: 400,
|
auditStatus: 400,
|
||||||
status: 400
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onSuccess: (data) => {
|
onSuccess: (data) => {
|
||||||
|
|
@ -141,7 +140,6 @@ function List(props) {
|
||||||
查看
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ const PassModalComponent = (props) => {
|
||||||
options={[
|
options={[
|
||||||
{
|
{
|
||||||
name: "isLongTerm",
|
name: "isLongTerm",
|
||||||
label: "相关方时效属性",
|
label: "供应商时效属性",
|
||||||
span: 24,
|
span: 24,
|
||||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||||
items: [{ bianma: 1, name: "长期" }, { bianma: 0, name: "短期" }],
|
items: [{ bianma: 1, name: "长期" }, { bianma: 0, name: "短期" }],
|
||||||
|
|
|
||||||
|
|
@ -5,73 +5,21 @@ 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 PreviewImg from "zy-react-library/components/PreviewImg";
|
import PreviewImg from "zy-react-library/components/PreviewImg";
|
||||||
import PreviewPdf from "zy-react-library/components/PreviewPdf";
|
import PreviewPdf from "zy-react-library/components/PreviewPdf";
|
||||||
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 { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
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 useGetUserInfo from "zy-react-library/hooks/useGetUserInfo";
|
import { getFileSuffix, getLabelName } from "zy-react-library/utils";
|
||||||
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
|
||||||
import { getFileName, getFileSuffix, getFileUrl, getLabelName } from "zy-react-library/utils";
|
|
||||||
import ViewProjectReviewDetailsModal from "~/components/ViewProjectReviewDetailsModal";
|
import ViewProjectReviewDetailsModal from "~/components/ViewProjectReviewDetailsModal";
|
||||||
import ViewProjectReviewUserModal from "~/components/ViewProjectReviewUserModal";
|
import ViewProjectReviewUserModal from "~/components/ViewProjectReviewUserModal";
|
||||||
import { PROJECT_STATUS_MAP } from "~/enumerate/constant";
|
import { PROJECT_STATUS_MAP } from "~/enumerate/constant";
|
||||||
import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace";
|
import { NS_QUALIFICATION_STATISTICS } from "~/enumerate/namespace";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
function validatePhone(_, value) {
|
|
||||||
if (!value) {
|
|
||||||
return Promise.resolve();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (/^1\d{10}$/.test(String(value).trim())) {
|
|
||||||
return Promise.resolve();
|
|
||||||
}
|
|
||||||
|
|
||||||
return Promise.reject(new Error("请输入正确的手机号"));
|
|
||||||
}
|
|
||||||
|
|
||||||
const getRemoteFileUrl = (file) => {
|
|
||||||
if (file.url) {
|
|
||||||
return file.url;
|
|
||||||
}
|
|
||||||
if (!file.filePath) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
if (/^https?:\/\//.test(file.filePath)) {
|
|
||||||
return file.filePath;
|
|
||||||
}
|
|
||||||
return `${getFileUrl()}${file.filePath}`;
|
|
||||||
};
|
|
||||||
|
|
||||||
const remoteFileToUploadFile = async (file) => {
|
|
||||||
const url = getRemoteFileUrl(file);
|
|
||||||
if (!url) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
const response = await fetch(url);
|
|
||||||
if (!response.ok) {
|
|
||||||
throw new Error(file.name || file.fileName || url);
|
|
||||||
}
|
|
||||||
|
|
||||||
const blob = await response.blob();
|
|
||||||
const name = file.name || file.fileName || getFileName(file.filePath || url) || "file";
|
|
||||||
return {
|
|
||||||
...file,
|
|
||||||
uid: file.id || file.filePath || name,
|
|
||||||
originFileObj: new File([blob], name, { type: blob.type || "application/octet-stream" }),
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
function Review(props) {
|
function Review(props) {
|
||||||
const query = useGetUrlQuery();
|
const query = useGetUrlQuery();
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [keyProjectForm] = Form.useForm();
|
|
||||||
const projectWorkFlag = Form.useWatch("projectWorkFlag", keyProjectForm);
|
|
||||||
const supervisionUnitFlag = Form.useWatch("supervisionUnitFlag", keyProjectForm);
|
|
||||||
const [viewProjectReviewDetailsModalOpen, setViewProjectReviewDetailsModalOpen] = useState(false);
|
const [viewProjectReviewDetailsModalOpen, setViewProjectReviewDetailsModalOpen] = useState(false);
|
||||||
const [viewProjectReviewDetailsModalData, setViewProjectReviewDetailsModalData] = useState({});
|
const [viewProjectReviewDetailsModalData, setViewProjectReviewDetailsModalData] = useState({});
|
||||||
const [info, setInfo] = useState({});
|
const [info, setInfo] = useState({});
|
||||||
|
|
@ -81,12 +29,6 @@ function Review(props) {
|
||||||
const [viewProjectReviewUserModalOpen, setViewProjectReviewUserModalOpen] = useState(false);
|
const [viewProjectReviewUserModalOpen, setViewProjectReviewUserModalOpen] = useState(false);
|
||||||
const [viewProjectReviewUserModalData, setViewProjectReviewUserModalData] = useState({}); // 查看安全人员证书列表
|
const [viewProjectReviewUserModalData, setViewProjectReviewUserModalData] = useState({}); // 查看安全人员证书列表
|
||||||
const [projectListAll, setProjectListAll] = useState([]);
|
const [projectListAll, setProjectListAll] = useState([]);
|
||||||
const [keyProjectModalOpen, setKeyProjectModalOpen] = useState(false);
|
|
||||||
const [keyProjectSubmitting, setKeyProjectSubmitting] = useState(false);
|
|
||||||
const [auditPassParams, setAuditPassParams] = useState({});
|
|
||||||
const { uploadFile, loading: uploadFileLoading } = useUploadFile();
|
|
||||||
const { getUserInfo } = useGetUserInfo();
|
|
||||||
const [userInfo, setUserInfo] = useState({});
|
|
||||||
const typeList = [
|
const typeList = [
|
||||||
{ bianma: "0", name: "普通企业" },
|
{ bianma: "0", name: "普通企业" },
|
||||||
{ bianma: "1", name: "集团单位" },
|
{ bianma: "1", name: "集团单位" },
|
||||||
|
|
@ -95,59 +37,18 @@ function Review(props) {
|
||||||
{ bianma: "4", name: "货主单位" },
|
{ bianma: "4", name: "货主单位" },
|
||||||
{ bianma: "5", name: "驻港单位" },
|
{ bianma: "5", name: "驻港单位" },
|
||||||
];
|
];
|
||||||
const getProjectTypeInfo = () => {
|
|
||||||
const projectTypeConfig = [
|
|
||||||
{ flag: info.threePeopleFlag, projectType: "more_people", projectTypeName: "三人及以上作业" },
|
|
||||||
{ flag: info.fourNewFlag, projectType: "four_new_homework", projectTypeName: "\"四新\"作业" },
|
|
||||||
{ flag: info.nightWorkFlag, projectType: "night_work", projectTypeName: "夜间作业" },
|
|
||||||
];
|
|
||||||
const selectedProjectType = projectTypeConfig.filter(item => item.flag === 1);
|
|
||||||
|
|
||||||
return {
|
|
||||||
projectType: selectedProjectType.map(item => item.projectType),
|
|
||||||
projectTypeName: selectedProjectType.map(item => item.projectTypeName),
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const getUploadFilesFromRemoteFiles = async (remoteFiles) => {
|
|
||||||
const fileMap = new Map();
|
|
||||||
remoteFiles.filter(Boolean).forEach((file) => {
|
|
||||||
const key = file.id || file.filePath || file.url || file.name || file.fileName;
|
|
||||||
if (!key || !fileMap.has(key)) {
|
|
||||||
fileMap.set(key || `${fileMap.size}`, file);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const files = await Promise.all(
|
|
||||||
[...fileMap.values()].map(file => remoteFileToUploadFile(file)),
|
|
||||||
);
|
|
||||||
return files.filter(Boolean);
|
|
||||||
};
|
|
||||||
|
|
||||||
const getKeyProjectUploadFiles = async () => {
|
|
||||||
return getUploadFilesFromRemoteFiles(info.agreementFiles || []);
|
|
||||||
};
|
|
||||||
|
|
||||||
const getCurrentUserInfo = async () => {
|
|
||||||
const userInfo = await getUserInfo();
|
|
||||||
setUserInfo(userInfo);
|
|
||||||
};
|
|
||||||
useEffect(() => {
|
|
||||||
getCurrentUserInfo();
|
|
||||||
}, []);
|
|
||||||
const getData = async (id = query.id) => {
|
const getData = async (id = query.id) => {
|
||||||
const projectDetailResult = await props["projectDetail"]({ id });
|
const projectDetailResult = await props["projectDetail"]({ id });
|
||||||
if (!projectDetailResult || !projectDetailResult.data) {
|
if (!projectDetailResult || !projectDetailResult.data) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const projectData = projectDetailResult.data;
|
const projectData = projectDetailResult.data;
|
||||||
projectData.agreementFiles = [];
|
|
||||||
if (projectData.agreementFileUuid) {
|
if (projectData.agreementFileUuid) {
|
||||||
const file = await getFile({
|
const file = await getFile({
|
||||||
eqType: UPLOAD_FILE_TYPE_ENUM["156"],
|
eqType: UPLOAD_FILE_TYPE_ENUM["156"],
|
||||||
eqForeignKey: projectData.agreementFileUuid,
|
eqForeignKey: projectData.agreementFileUuid,
|
||||||
});
|
});
|
||||||
projectData.agreementFiles = file;
|
|
||||||
projectData.imgFiles = file.filter(item => getFileSuffix(item.name) !== "pdf");
|
projectData.imgFiles = file.filter(item => getFileSuffix(item.name) !== "pdf");
|
||||||
projectData.pdfFiles = file.filter(item => getFileSuffix(item.name) === "pdf");
|
projectData.pdfFiles = file.filter(item => getFileSuffix(item.name) === "pdf");
|
||||||
}
|
}
|
||||||
|
|
@ -165,6 +66,7 @@ function Review(props) {
|
||||||
corpInfoResult.data.qiyefile = qiyefile;
|
corpInfoResult.data.qiyefile = qiyefile;
|
||||||
projectData.corpInfo = corpInfoResult.data;
|
projectData.corpInfo = corpInfoResult.data;
|
||||||
}
|
}
|
||||||
|
// eslint-disable-next-line no-unused-vars,unused-imports/no-unused-vars
|
||||||
catch (error) {
|
catch (error) {
|
||||||
projectData.corpInfo = null;
|
projectData.corpInfo = null;
|
||||||
}
|
}
|
||||||
|
|
@ -172,6 +74,7 @@ function Review(props) {
|
||||||
else {
|
else {
|
||||||
projectData.corpInfo = null;
|
projectData.corpInfo = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
setInfo(projectData);
|
setInfo(projectData);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -187,112 +90,6 @@ function Review(props) {
|
||||||
const { data } = await props["projectListAll"]({});
|
const { data } = await props["projectListAll"]({});
|
||||||
setProjectListAll(data);
|
setProjectListAll(data);
|
||||||
};
|
};
|
||||||
|
|
||||||
const auditPass = async (params = {}) => {
|
|
||||||
const { success } = await props["projectAudit"]({
|
|
||||||
id: query.id,
|
|
||||||
result: 1,
|
|
||||||
...params,
|
|
||||||
});
|
|
||||||
if (success) {
|
|
||||||
message.success("审核通过");
|
|
||||||
getData();
|
|
||||||
props.history.goBack();
|
|
||||||
}
|
|
||||||
return success;
|
|
||||||
};
|
|
||||||
|
|
||||||
const openKeyProjectModal = (params = {}) => {
|
|
||||||
setAuditPassParams(params);
|
|
||||||
keyProjectForm.resetFields();
|
|
||||||
keyProjectForm.setFieldsValue({
|
|
||||||
projectWorkFlag: 1,
|
|
||||||
projectId: info.id,
|
|
||||||
projectName: info.projectName,
|
|
||||||
planWorkStartDate: info.startProjectTime,
|
|
||||||
planWorkEndDate: info.endProjectTime,
|
|
||||||
jurisdictionCorpinfoId: userInfo.corpinfoId,
|
|
||||||
jurisdictionDepartmentId: userInfo.departmentId,
|
|
||||||
xgfCorpinfoId: info.corpInfo && info.corpInfo.id,
|
|
||||||
xgfMasterUserId: info.corpInfo && info.corpInfo.accountContactId,
|
|
||||||
xgfMasterPhone: info.corpInfo && info.corpInfo.lrMobile,
|
|
||||||
supervisionUnitFlag: 0,
|
|
||||||
});
|
|
||||||
setKeyProjectModalOpen(true);
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleKeyProjectSubmit = async () => {
|
|
||||||
try {
|
|
||||||
await keyProjectForm.validateFields();
|
|
||||||
}
|
|
||||||
catch {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const values = keyProjectForm.getFieldsValue(true);
|
|
||||||
setKeyProjectSubmitting(true);
|
|
||||||
try {
|
|
||||||
if (values.projectWorkFlag === 1) {
|
|
||||||
let agreementFileUuid = "";
|
|
||||||
try {
|
|
||||||
const keyProjectUploadFiles = await getKeyProjectUploadFiles();
|
|
||||||
const { id } = await uploadFile({
|
|
||||||
single: false,
|
|
||||||
files: keyProjectUploadFiles,
|
|
||||||
params: {
|
|
||||||
type: UPLOAD_FILE_TYPE_ENUM["168"],
|
|
||||||
foreignKey: "",
|
|
||||||
},
|
|
||||||
});
|
|
||||||
agreementFileUuid = id;
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
message.error(`附件上传失败${error?.message ? `:${error.message}` : ""}`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const projectTypeInfo = getProjectTypeInfo();
|
|
||||||
const keyProjectValues = {
|
|
||||||
...values,
|
|
||||||
projectWorkFlag: 1,
|
|
||||||
...projectTypeInfo,
|
|
||||||
|
|
||||||
projectId: query.id,
|
|
||||||
projectName: info.projectName,
|
|
||||||
planWorkStartDate: info.startProjectTime,
|
|
||||||
planWorkEndDate: info.endProjectTime,
|
|
||||||
jurisdictionCorpinfoId: userInfo.corpinfoId,
|
|
||||||
jurisdictionDepartmentId: userInfo.departmentId,
|
|
||||||
xgfCorpinfoId: info.corpInfo && info.corpInfo.id,
|
|
||||||
xgfMasterUserId: info.corpInfo && info.corpInfo.accountContactId,
|
|
||||||
xgfMasterPhone: info.corpInfo && info.corpInfo.lrMobile,
|
|
||||||
|
|
||||||
keyProjectId: agreementFileUuid,
|
|
||||||
applyStatus: 1,
|
|
||||||
};
|
|
||||||
|
|
||||||
if (values.supervisionUnitFlag !== 1) {
|
|
||||||
delete keyProjectValues.supervisionUnitCorpName;
|
|
||||||
delete keyProjectValues.supervisionUnitUserName;
|
|
||||||
delete keyProjectValues.supervisionUnitUserPhone;
|
|
||||||
}
|
|
||||||
|
|
||||||
const { success } = await props["keyProjectAdd"](keyProjectValues);
|
|
||||||
if (!success) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const auditSuccess = await auditPass(auditPassParams);
|
|
||||||
if (auditSuccess) {
|
|
||||||
setKeyProjectModalOpen(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
finally {
|
|
||||||
setKeyProjectSubmitting(false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const auditSubmit = (result) => {
|
const auditSubmit = (result) => {
|
||||||
if (result === 1) {
|
if (result === 1) {
|
||||||
if (query.projectStatusLast === "7") {
|
if (query.projectStatusLast === "7") {
|
||||||
|
|
@ -324,9 +121,16 @@ function Review(props) {
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
try {
|
try {
|
||||||
const values = await form.validateFields();
|
const values = await form.validateFields();
|
||||||
await auditPass({
|
const { success } = await props["projectAudit"]({
|
||||||
|
id: query.id,
|
||||||
|
result,
|
||||||
relatedProjectId: values.id,
|
relatedProjectId: values.id,
|
||||||
});
|
});
|
||||||
|
if (success) {
|
||||||
|
message.success("审核通过");
|
||||||
|
getData();
|
||||||
|
props.history.goBack();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
// 表单验证失败,不关闭弹窗
|
// 表单验证失败,不关闭弹窗
|
||||||
|
|
@ -335,21 +139,24 @@ function Review(props) {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
if (query.projectStatusLast === "2") {
|
|
||||||
openKeyProjectModal();
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: "审核确认",
|
title: "审核确认",
|
||||||
content: "确定要通过审核吗?",
|
content: "确定要通过审核吗?",
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
await auditPass();
|
const { success } = await props["projectAudit"]({
|
||||||
|
id: query.id,
|
||||||
|
result,
|
||||||
|
});
|
||||||
|
if (success) {
|
||||||
|
message.success("审核通过");
|
||||||
|
getData();
|
||||||
|
props.history.goBack();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: "审核驳回",
|
title: "审核驳回",
|
||||||
|
|
@ -514,12 +321,8 @@ function Review(props) {
|
||||||
{ label: "资产总额(万元)", children: info.corpInfo?.totalAssets },
|
{ label: "资产总额(万元)", children: info.corpInfo?.totalAssets },
|
||||||
{ label: "注册资金(万元)", children: info.corpInfo?.regcapital },
|
{ label: "注册资金(万元)", children: info.corpInfo?.regcapital },
|
||||||
{ label: "企业类型", children: getLabelName({ list: typeList, status: info.corpInfo?.type }) },
|
{ label: "企业类型", children: getLabelName({ list: typeList, status: info.corpInfo?.type }) },
|
||||||
{
|
|
||||||
label: "经营范围",
|
|
||||||
children: info.corpInfo?.natureBusiness,
|
|
||||||
},
|
|
||||||
{ label: "营业执照", children: <PreviewImg files={info.corpInfo?.qiyefile || []} /> },
|
{ label: "营业执照", children: <PreviewImg files={info.corpInfo?.qiyefile || []} /> },
|
||||||
// { label: "营业执照有效期", children: info.corpInfo?.licenseStart ? `${info.corpInfo?.licenseStart}-${info.corpInfo?.licenseEnd}` : "-" },
|
{ label: "营业执照有效期", children: info.corpInfo?.licenseStart ? `${info.corpInfo?.licenseStart}-${info.corpInfo?.licenseEnd}` : "-" },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -653,113 +456,6 @@ function Review(props) {
|
||||||
data={viewProjectReviewDetailsModalData}
|
data={viewProjectReviewDetailsModalData}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{
|
|
||||||
keyProjectModalOpen && (
|
|
||||||
<Modal
|
|
||||||
title="是否创建重点作业"
|
|
||||||
open={keyProjectModalOpen}
|
|
||||||
width={1200}
|
|
||||||
forceRender
|
|
||||||
maskClosable={false}
|
|
||||||
confirmLoading={keyProjectSubmitting || uploadFileLoading || props.qualificationStatistics?.qualificationStatisticsLoading}
|
|
||||||
onCancel={() => setKeyProjectModalOpen(false)}
|
|
||||||
onOk={handleKeyProjectSubmit}
|
|
||||||
>
|
|
||||||
<FormBuilder
|
|
||||||
form={keyProjectForm}
|
|
||||||
showActionButtons={false}
|
|
||||||
labelCol={{ span: 8 }}
|
|
||||||
values={{ projectWorkFlag: 1, supervisionUnitFlag: 0 }}
|
|
||||||
onValuesChange={(changedValues) => {
|
|
||||||
if ("projectWorkFlag" in changedValues) {
|
|
||||||
keyProjectForm.setFieldsValue({
|
|
||||||
jurisdictionUserId: undefined,
|
|
||||||
masterDepartmentId: undefined,
|
|
||||||
supervisionUnitFlag: 0,
|
|
||||||
supervisionUnitCorpName: undefined,
|
|
||||||
supervisionUnitUserName: undefined,
|
|
||||||
supervisionUnitUserPhone: undefined,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if ("supervisionUnitFlag" in changedValues) {
|
|
||||||
keyProjectForm.setFieldsValue({
|
|
||||||
supervisionUnitCorpName: undefined,
|
|
||||||
supervisionUnitUserName: undefined,
|
|
||||||
supervisionUnitUserPhone: undefined,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
options={[
|
|
||||||
{
|
|
||||||
name: "projectWorkFlag",
|
|
||||||
label: "是否创建重点作业",
|
|
||||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
|
||||||
items: [
|
|
||||||
{ bianma: 1, name: "是" },
|
|
||||||
{ bianma: 0, name: "否" },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
span: 24,
|
|
||||||
customizeRender: true,
|
|
||||||
hidden: projectWorkFlag !== 1,
|
|
||||||
render: (
|
|
||||||
<div style={{ fontSize: 12, color: "red", marginLeft: 96, marginBottom: 16 }}>
|
|
||||||
若不创建,可直接进行相关生产作业、进行创城。
|
|
||||||
</div>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "辖区单位负责人",
|
|
||||||
name: "jurisdictionUserId",
|
|
||||||
hidden: projectWorkFlag !== 1,
|
|
||||||
render: (
|
|
||||||
<PersonnelSelect
|
|
||||||
params={{ departmentId: userInfo.departmentId }}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "重点作业主管部门",
|
|
||||||
name: "masterDepartmentId",
|
|
||||||
hidden: projectWorkFlag !== 1,
|
|
||||||
render: <DepartmentSelectTree />,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "是否设置监理单位",
|
|
||||||
name: "supervisionUnitFlag",
|
|
||||||
hidden: projectWorkFlag !== 1,
|
|
||||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
|
||||||
items: [
|
|
||||||
{ bianma: 1, name: "是" },
|
|
||||||
{ bianma: 0, name: "否" },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "监理单位",
|
|
||||||
name: "supervisionUnitCorpName",
|
|
||||||
hidden: projectWorkFlag !== 1 || supervisionUnitFlag !== 1,
|
|
||||||
required: projectWorkFlag === 1 && supervisionUnitFlag === 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "监理单位工程负责人",
|
|
||||||
name: "supervisionUnitUserName",
|
|
||||||
hidden: projectWorkFlag !== 1 || supervisionUnitFlag !== 1,
|
|
||||||
required: projectWorkFlag === 1 && supervisionUnitFlag === 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "监理单位工程负责人电话",
|
|
||||||
name: "supervisionUnitUserPhone",
|
|
||||||
hidden: projectWorkFlag !== 1 || supervisionUnitFlag !== 1,
|
|
||||||
required: projectWorkFlag === 1 && supervisionUnitFlag === 1,
|
|
||||||
rules: [{ validator: validatePhone }],
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</Modal>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
{props.children}
|
{props.children}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,14 +22,6 @@ function Add(props) {
|
||||||
if (data.qualificationsTypeId === "wzgll") {
|
if (data.qualificationsTypeId === "wzgll") {
|
||||||
setCorpTypeList([2, 6]);
|
setCorpTypeList([2, 6]);
|
||||||
}
|
}
|
||||||
if (data?.details?.length) {
|
|
||||||
data?.details?.forEach((item) => {
|
|
||||||
|
|
||||||
item.isRequired = item.isRequired ?? 1;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(data);
|
|
||||||
form.setFieldsValue({
|
form.setFieldsValue({
|
||||||
...data,
|
...data,
|
||||||
managerUser: data.managerUser.split(","),
|
managerUser: data.managerUser.split(","),
|
||||||
|
|
@ -68,7 +60,6 @@ function Add(props) {
|
||||||
dataTypeName: undefined,
|
dataTypeName: undefined,
|
||||||
dataName: undefined,
|
dataName: undefined,
|
||||||
isValidity: undefined,
|
isValidity: undefined,
|
||||||
isRequired:1
|
|
||||||
}],
|
}],
|
||||||
}}
|
}}
|
||||||
loading={props.qualificationMaintenance.qualificationMaintenanceLoading}
|
loading={props.qualificationMaintenance.qualificationMaintenanceLoading}
|
||||||
|
|
@ -242,8 +233,7 @@ function Add(props) {
|
||||||
{
|
{
|
||||||
label: "资料属性",
|
label: "资料属性",
|
||||||
name: [field.name, "dataType"],
|
name: [field.name, "dataType"],
|
||||||
span: 6,
|
span: 8,
|
||||||
labelCol: { span: 6 },
|
|
||||||
render: (
|
render: (
|
||||||
<DictionarySelect
|
<DictionarySelect
|
||||||
dictValue="dataType"
|
dictValue="dataType"
|
||||||
|
|
@ -253,26 +243,16 @@ function Add(props) {
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
{ label: "资料属性名称", name: [field.name, "dataTypeName"], span: 8, onlyForLabel: true },
|
||||||
{ label: "资料名称", name: [field.name, "dataName"], span: 6 , labelCol: { span: 6 },},
|
{ label: "资料名称", name: [field.name, "dataName"], span: 8 },
|
||||||
{
|
{
|
||||||
label: "是否涉及有效时间",
|
label: "是否涉及有效时间",
|
||||||
name: [field.name, "isValidity"],
|
name: [field.name, "isValidity"],
|
||||||
span: 6,
|
span: 8,
|
||||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||||
items: [{ bianma: 0, name: "是" }, { bianma: 1, name: "否" }],
|
items: [{ bianma: 0, name: "是" }, { bianma: 1, name: "否" }],
|
||||||
labelCol: { span: 10 },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "是否必填",
|
|
||||||
name: [field.name, "isRequired"],
|
|
||||||
span: 6,
|
|
||||||
labelCol: { span: 6 },
|
labelCol: { span: 6 },
|
||||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
|
||||||
items: [{ bianma: 1, name: "是" }, { bianma: 0, name: "否" }],
|
|
||||||
|
|
||||||
},
|
},
|
||||||
{ label: "资料属性名称", name: [field.name, "dataTypeName"], span: 6, onlyForLabel: true },
|
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,16 @@
|
||||||
import { WarningOutlined } from "@ant-design/icons";
|
import { WarningOutlined } from "@ant-design/icons";
|
||||||
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, Descriptions, Form, Modal, Space, Tooltip} from "antd";
|
import { Button, Form, Space, Tooltip } from "antd";
|
||||||
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 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_APPLY, NS_QUALIFICATION_RECORDS} from "~/enumerate/namespace";
|
import { NS_QUALIFICATION_RECORDS } from "~/enumerate/namespace";
|
||||||
import {useState} from "react";
|
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const [rejectReasonModalOpen, setRejectReasonModalOpen] = useState(false);
|
|
||||||
const [rejectReason, setRejectReason] = useState(false);
|
|
||||||
const { tableProps, getData } = useTable(props["qualificationRecordsList"], {
|
const { tableProps, getData } = useTable(props["qualificationRecordsList"], {
|
||||||
form,
|
form,
|
||||||
transform: (formData) => {
|
transform: (formData) => {
|
||||||
|
|
@ -24,11 +21,7 @@ function List(props) {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const onViewRejectReason = async (id) => {
|
|
||||||
const { data } = await props["qualificationApplyRejectReason"]({ id });
|
|
||||||
setRejectReason(data);
|
|
||||||
setRejectReasonModalOpen(true);
|
|
||||||
};
|
|
||||||
return (
|
return (
|
||||||
<Page isShowAllAction={false}>
|
<Page isShowAllAction={false}>
|
||||||
<Search
|
<Search
|
||||||
|
|
@ -120,7 +113,7 @@ function List(props) {
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
width: 180,
|
width: 130,
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{props.permission("zrzz-jgd-zrzzjl-btn-ck") && (
|
{props.permission("zrzz-jgd-zrzzjl-btn-ck") && (
|
||||||
|
|
@ -133,49 +126,14 @@ function List(props) {
|
||||||
查看
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
danger
|
|
||||||
disabled={record.status !== 300}
|
|
||||||
onClick={() => {
|
|
||||||
onViewRejectReason(record.id);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
查看驳回原因
|
|
||||||
</Button>
|
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
{...tableProps}
|
{...tableProps}
|
||||||
/>
|
/>
|
||||||
{rejectReasonModalOpen && <RejectReason rejectReason={rejectReason} onCancel={() => setRejectReasonModalOpen(false)} />}
|
|
||||||
</Page>
|
</Page>
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const RejectReason = (props) => {
|
|
||||||
return (
|
|
||||||
<Modal
|
|
||||||
title="查看驳回原因"
|
|
||||||
width={600}
|
|
||||||
open
|
|
||||||
maskClosable={false}
|
|
||||||
onCancel={props.onCancel}
|
|
||||||
footer={[
|
|
||||||
<Button key="cancel" onClick={props.onCancel}>关闭</Button>,
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
<Descriptions
|
|
||||||
bordered
|
|
||||||
column={1}
|
|
||||||
styles={{ label: { width: 200 } }}
|
|
||||||
items={[
|
|
||||||
{ label: "驳回原因", children: props.rejectReason },
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</Modal>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default Connect([NS_QUALIFICATION_RECORDS,NS_QUALIFICATION_APPLY], true)(Permission(List));
|
export default Connect([NS_QUALIFICATION_RECORDS], true)(Permission(List));
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ const PassModalComponent = (props) => {
|
||||||
options={[
|
options={[
|
||||||
{
|
{
|
||||||
name: "isLongTerm",
|
name: "isLongTerm",
|
||||||
label: "相关方时效属性",
|
label: "供应商时效属性",
|
||||||
span: 24,
|
span: 24,
|
||||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||||
items: [{ bianma: 1, name: "长期" }, { bianma: 0, name: "短期" }],
|
items: [{ bianma: 1, name: "长期" }, { bianma: 0, name: "短期" }],
|
||||||
|
|
|
||||||
|
|
@ -53,16 +53,12 @@ function ViewInfo(props) {
|
||||||
});
|
});
|
||||||
await getTypeGroup(data);
|
await getTypeGroup(data);
|
||||||
for (let i = 0; i < data.specialList.length; i++) {
|
for (let i = 0; i < data.specialList.length; i++) {
|
||||||
if(data.specialList[i].applyDetailId){
|
|
||||||
const files = await getFile({
|
const files = await getFile({
|
||||||
eqType: UPLOAD_FILE_TYPE_ENUM["148"],
|
eqType: UPLOAD_FILE_TYPE_ENUM["148"],
|
||||||
eqForeignKey: data.specialList[i].applyDetailId,
|
eqForeignKey: data.specialList[i].applyDetailId,
|
||||||
});
|
});
|
||||||
data.specialList[i].files = files;
|
data.specialList[i].files = files;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
setInfo(data);
|
setInfo(data);
|
||||||
props.onGetData?.(data);
|
props.onGetData?.(data);
|
||||||
|
|
||||||
|
|
@ -99,9 +95,9 @@ function ViewInfo(props) {
|
||||||
|
|
||||||
...(
|
...(
|
||||||
info.qualificationsTypeId === "sbl" ? [
|
info.qualificationsTypeId === "sbl" ? [
|
||||||
{label: "维修、保养", children: info.maintainName && info.maintainName},
|
{label: "维修、保养", children: info.maintainName && info.maintainName.join(" , ")},
|
||||||
{label: "检测", children: info.detectionName && info.detectionName},
|
{label: "检测", children: info.detectionName && info.detectionName.join(" , ")},
|
||||||
{label: "其它高风险业务", children: info.otherHighRiskName && info.otherHighRiskName, span: 2},
|
{label: "其它高风险业务", children: info.otherHighRiskName && info.otherHighRiskName.join(" , "), span: 2},
|
||||||
] : []
|
] : []
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
@ -178,12 +174,8 @@ function ViewInfo(props) {
|
||||||
label: "企业类型",
|
label: "企业类型",
|
||||||
children: getLabelName({ status: corpInfoData.type, list: ENTERPRISE_TYPE }),
|
children: getLabelName({ status: corpInfoData.type, list: ENTERPRISE_TYPE }),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: "经营范围",
|
|
||||||
children: corpInfoData.natureBusiness,
|
|
||||||
},
|
|
||||||
{ label: "营业执照", children: <PreviewImg files={corpInfoData.licenseFile} /> },
|
{ label: "营业执照", children: <PreviewImg files={corpInfoData.licenseFile} /> },
|
||||||
// { label: "营业执照有效期", children: corpInfoData.licenseStart ? `${corpInfoData.licenseStart} 至 ${corpInfoData.licenseEnd}` : "" },
|
{ label: "营业执照有效期", children: corpInfoData.licenseStart ? `${corpInfoData.licenseStart} 至 ${corpInfoData.licenseEnd}` : "" },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</Spin>
|
</Spin>
|
||||||
|
|
@ -210,7 +202,6 @@ function ViewInfo(props) {
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
disabled={!record.uploadedTime}
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setViewQualificationDetailsModalOpen(true);
|
setViewQualificationDetailsModalOpen(true);
|
||||||
setViewQualificationDetailsModalData(record);
|
setViewQualificationDetailsModalData(record);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue