Compare commits
2 Commits
e7d79d16a7
...
840952e848
| Author | SHA1 | Date |
|---|---|---|
|
|
840952e848 | |
|
|
25c55071a4 |
|
|
@ -28,3 +28,12 @@ export const qualificationMaintenanceQualificationsList = declareRequest(
|
||||||
"qualificationMaintenanceLoading",
|
"qualificationMaintenanceLoading",
|
||||||
`Post > @/xgfManager/qualificationsDetail/list`,
|
`Post > @/xgfManager/qualificationsDetail/list`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
export const qualificationMaintenanceChangeLogList = declareRequest(
|
||||||
|
"qualificationMaintenanceLoading",
|
||||||
|
`Post > @/xgfManager/qualificationsChangeLog/list`,
|
||||||
|
);export const getQualificationMaintenanceChangeLogByIds = declareRequest(
|
||||||
|
"qualificationMaintenanceLoading",
|
||||||
|
`Get > /xgfManager/qualificationsChangeLog/listByIds?ids={ids}`,
|
||||||
|
);
|
||||||
|
|
@ -8,10 +8,6 @@ export const qualificationReviewInfo = declareRequest(
|
||||||
"qualificationReviewLoading",
|
"qualificationReviewLoading",
|
||||||
`Get > /xgfManager/qualificationsApply/{id}`,
|
`Get > /xgfManager/qualificationsApply/{id}`,
|
||||||
);
|
);
|
||||||
export const qualificationReviewInfoBatchNum = declareRequest(
|
|
||||||
"qualificationReviewLoading",
|
|
||||||
`Get > /xgfManager/qualificationsApply/{id}/{batchNum}`,
|
|
||||||
);
|
|
||||||
export const corpInfoDetails = declareRequest(
|
export const corpInfoDetails = declareRequest(
|
||||||
"enterpriseLoading",
|
"enterpriseLoading",
|
||||||
"Post > @/basicInfo/corpInfo/info/{id}",
|
"Post > @/basicInfo/corpInfo/info/{id}",
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@ import useDeleteFile from "zy-react-library/hooks/useDeleteFile";
|
||||||
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 useUploadFile from "zy-react-library/hooks/useUploadFile";
|
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
||||||
import { getLabelName, validatorEndTime } from "zy-react-library/utils";
|
import { getLabelName,validatorEndTime, validatorTimeGTCurrentDay } from "zy-react-library/utils";
|
||||||
import { NS_QUALIFICATION_APPLY } from "~/enumerate/namespace";
|
import { NS_QUALIFICATION_APPLY, NS_QUALIFICATION_MAINTENANCE } from "~/enumerate/namespace";
|
||||||
|
|
||||||
function Add(props) {
|
function Add(props) {
|
||||||
const query = useGetUrlQuery();
|
const query = useGetUrlQuery();
|
||||||
|
|
@ -25,14 +25,16 @@ function Add(props) {
|
||||||
const [currentStep, setCurrentStep] = useState(1);
|
const [currentStep, setCurrentStep] = useState(1);
|
||||||
const [formValues, setFormValues] = useState({});
|
const [formValues, setFormValues] = useState({});
|
||||||
const [specialList, setSpecialList] = useState([]);
|
const [specialList, setSpecialList] = useState([]);
|
||||||
const [secureList, setSecureList] = useState([]);
|
|
||||||
|
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
const { data } = await props["qualificationApplyInfo"]({ id: query.id });
|
const { data } = await props["qualificationApplyInfo"]({ id: query.id });
|
||||||
|
// 重新提交时,删除id
|
||||||
|
if (query.resubmit) {
|
||||||
|
delete data.id;
|
||||||
|
}
|
||||||
setFormValues(data);
|
setFormValues(data);
|
||||||
form.setFieldsValue(data);
|
form.setFieldsValue(data);
|
||||||
setSpecialList(data.specialList);
|
setSpecialList(data.specialList);
|
||||||
setSecureList(data.secureList);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -41,20 +43,19 @@ function Add(props) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<HeaderBack title={query.id ? "编辑" : "新增"} />
|
<HeaderBack title={query.resubmit ? "重新提交" : (query.id ? "编辑" : "新增")} />
|
||||||
<div style={{ padding: 20 }}>
|
<div style={{ padding: 20 }}>
|
||||||
{currentStep === 1
|
{currentStep === 1
|
||||||
&& <StepOne setFormValues={setFormValues} setCurrentStep={setCurrentStep} formValues={formValues} form={form} />}
|
&&
|
||||||
|
<StepOne setFormValues={setFormValues} setCurrentStep={setCurrentStep} formValues={formValues} form={form} />}
|
||||||
{currentStep === 2
|
{currentStep === 2
|
||||||
&& (
|
&& (
|
||||||
<StepTwo
|
<StepTwo
|
||||||
setCurrentStep={setCurrentStep}
|
setCurrentStep={setCurrentStep}
|
||||||
formValues={formValues}
|
formValues={formValues}
|
||||||
query={query}
|
query={query}
|
||||||
setSecureList={setSecureList}
|
|
||||||
setSpecialList={setSpecialList}
|
setSpecialList={setSpecialList}
|
||||||
specialList={specialList}
|
specialList={specialList}
|
||||||
secureList={secureList}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -120,10 +121,10 @@ const StepOneComponent = (props) => {
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{ name: "qualificationsTypeName", label: "资质类别名称", onlyForLabel: true },
|
{ name: "qualificationsTypeName", label: "资质类别", onlyForLabel: true },
|
||||||
{
|
{
|
||||||
name: "stakeholderLevel",
|
name: "stakeholderLevel",
|
||||||
label: "资质等级",
|
label: "资质级别",
|
||||||
render: (
|
render: (
|
||||||
<DictionarySelect
|
<DictionarySelect
|
||||||
dictValue="stakeholderLevel"
|
dictValue="stakeholderLevel"
|
||||||
|
|
@ -137,7 +138,7 @@ const StepOneComponent = (props) => {
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{ name: "stakeholderLevelName", label: "资质等级名称", onlyForLabel: true },
|
{ name: "stakeholderLevelName", label: "资质级别", onlyForLabel: true },
|
||||||
{
|
{
|
||||||
name: "groupUnitId",
|
name: "groupUnitId",
|
||||||
label: "集团单位",
|
label: "集团单位",
|
||||||
|
|
@ -200,24 +201,23 @@ const StepOneComponent = (props) => {
|
||||||
items: qualificationsListAll,
|
items: qualificationsListAll,
|
||||||
itemsField: { labelKey: "qualificationsName", valueKey: "id" },
|
itemsField: { labelKey: "qualificationsName", valueKey: "id" },
|
||||||
},
|
},
|
||||||
{ name: "qualificationsRemarks", label: "备注", required: false, span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
|
{ name: "remarks", label: "备注", required: false, span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
const StepTwoComponent = (props) => {
|
const StepTwoComponent = (props) => {
|
||||||
const query = props.query;
|
const query = props.query;
|
||||||
const secureList = props.secureList;
|
|
||||||
const specialList = props.specialList;
|
const specialList = props.specialList;
|
||||||
const setSecureList = props.setSecureList;
|
|
||||||
const setSpecialList = props.setSpecialList;
|
const setSpecialList = props.setSpecialList;
|
||||||
|
|
||||||
const [uploadFileModalOpen, setUploadFileModalOpen] = useState(false);
|
const [uploadFileModalOpen, setUploadFileModalOpen] = useState(false);
|
||||||
|
const [typeGroup, setTypeGroup] = useState([]);
|
||||||
const [uploadFileModalData, setUploadFileModalData] = useState({
|
const [uploadFileModalData, setUploadFileModalData] = useState({
|
||||||
title: "",
|
title: "",
|
||||||
index: -1,
|
index: -1,
|
||||||
files: [],
|
files: [],
|
||||||
currentList: "",
|
|
||||||
isValidity: "",
|
isValidity: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -228,33 +228,42 @@ const StepTwoComponent = (props) => {
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
if (!props.formValues.qualificationsId)
|
if (!props.formValues.qualificationsId)
|
||||||
return;
|
return;
|
||||||
if (specialList.length === 0 || secureList.length === 0) {
|
if (specialList.length === 0) {
|
||||||
const { data } = await props["qualificationApplyQualificationListAll"]({ qualificationsId: props.formValues.qualificationsId });
|
const { data } = await props["qualificationMaintenanceInfo"]({ id: props.formValues.qualificationsId });
|
||||||
setSpecialList(data.specialList || []);
|
await getTypeGroup(data.details)
|
||||||
setSecureList(data.secureList || []);
|
setSpecialList(data.details || []);
|
||||||
}
|
} else {
|
||||||
else {
|
await getTypeGroup(specialList)
|
||||||
for (let i = 0; i < specialList.length; i++) {
|
for (let i = 0; i < specialList.length; i++) {
|
||||||
const files = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["148"], eqForeignKey: specialList[i].applyDetailId });
|
specialList[i].files = await getFile({
|
||||||
specialList[i].files = files;
|
eqType: UPLOAD_FILE_TYPE_ENUM["148"],
|
||||||
}
|
eqForeignKey: specialList[i].applyDetailId
|
||||||
for (let i = 0; i < secureList.length; i++) {
|
});
|
||||||
const files = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["149"], eqForeignKey: secureList[i].applyDetailId });
|
|
||||||
secureList[i].files = files;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getTypeGroup = async (details) => {
|
||||||
|
const typeMap = new Map();
|
||||||
|
for (let i = 0; i < details.length; i++) {
|
||||||
|
const { dataType, dataTypeName } = details[i];
|
||||||
|
if (dataType && dataTypeName) {
|
||||||
|
typeMap.set(dataType, { dataType, dataTypeName });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setTypeGroup(Array.from(typeMap.values()));
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getData();
|
getData();
|
||||||
}, [props.formValues.qualificationsId]);
|
}, [props.formValues.qualificationsId]);
|
||||||
|
|
||||||
const onUploadFileOpen = (record, index, files, currentList) => {
|
const onUploadFileOpen = (record, id, files) => {
|
||||||
setUploadFileModalData({
|
setUploadFileModalData({
|
||||||
|
id,
|
||||||
title: record.dataName,
|
title: record.dataName,
|
||||||
index,
|
|
||||||
files,
|
files,
|
||||||
currentList,
|
|
||||||
isValidity: record.isValidity,
|
isValidity: record.isValidity,
|
||||||
qualificationsTermStart: record.qualificationsTermStart,
|
qualificationsTermStart: record.qualificationsTermStart,
|
||||||
qualificationsTermEnd: record.qualificationsTermEnd,
|
qualificationsTermEnd: record.qualificationsTermEnd,
|
||||||
|
|
@ -264,11 +273,12 @@ const StepTwoComponent = (props) => {
|
||||||
|
|
||||||
const onUploadFileConfirm = (values, list) => {
|
const onUploadFileConfirm = (values, list) => {
|
||||||
const newList = cloneDeep(list);
|
const newList = cloneDeep(list);
|
||||||
newList[uploadFileModalData.index].files = values.files;
|
const index = newList.findIndex(item => item.id === uploadFileModalData.id);
|
||||||
newList[uploadFileModalData.index].deleteFiles = values.deleteFiles;
|
newList[index].files = values.files;
|
||||||
newList[uploadFileModalData.index].qualificationsTermStart = values.qualificationsTermStart;
|
newList[index].deleteFiles = values.deleteFiles;
|
||||||
newList[uploadFileModalData.index].qualificationsTermEnd = values.qualificationsTermEnd;
|
newList[index].qualificationsTermStart = values.qualificationsTermStart;
|
||||||
newList[uploadFileModalData.index].uploadedTime = dayjs().format("YYYY-MM-DD HH:mm:ss");
|
newList[index].qualificationsTermEnd = values.qualificationsTermEnd;
|
||||||
|
newList[index].uploadedTime = dayjs().format("YYYY-MM-DD HH:mm:ss");
|
||||||
return newList;
|
return newList;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -285,8 +295,6 @@ const StepTwoComponent = (props) => {
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
if (!validateFileList(specialList))
|
if (!validateFileList(specialList))
|
||||||
return;
|
return;
|
||||||
if (!validateFileList(secureList))
|
|
||||||
return;
|
|
||||||
for (let i = 0; i < specialList.length; i++) {
|
for (let i = 0; i < specialList.length; i++) {
|
||||||
await deleteFile({ single: false, files: specialList[i].deleteFiles });
|
await deleteFile({ single: false, files: specialList[i].deleteFiles });
|
||||||
const { id } = await uploadFile({
|
const { id } = await uploadFile({
|
||||||
|
|
@ -296,19 +304,13 @@ const StepTwoComponent = (props) => {
|
||||||
});
|
});
|
||||||
specialList[i].applyDetailId = id;
|
specialList[i].applyDetailId = id;
|
||||||
}
|
}
|
||||||
for (let i = 0; i < secureList.length; i++) {
|
// 重新提交时,删除id
|
||||||
await deleteFile({ single: false, files: secureList[i].deleteFiles });
|
if (query.resubmit) {
|
||||||
const { id } = await uploadFile({
|
delete query.id;
|
||||||
single: false,
|
|
||||||
files: secureList[i].files,
|
|
||||||
params: { type: UPLOAD_FILE_TYPE_ENUM["149"], foreignKey: secureList[i].applyDetailId },
|
|
||||||
});
|
|
||||||
secureList[i].applyDetailId = id;
|
|
||||||
}
|
}
|
||||||
const data = { ...props.formValues, qualificationsApplyDetailList: [...specialList, ...secureList] };
|
const data = { ...props.formValues, qualificationsApplyDetailList: [...specialList] };
|
||||||
const { success } = await props[!query.id ? "qualificationApplyAdd" : "qualificationApplyUpdate"]({
|
const { success } = await props[!query.id ? "qualificationApplyAdd" : "qualificationApplyUpdate"]({
|
||||||
...data,
|
...data,
|
||||||
batchNum: 1,
|
|
||||||
id: query.id,
|
id: query.id,
|
||||||
});
|
});
|
||||||
if (success) {
|
if (success) {
|
||||||
|
|
@ -322,14 +324,16 @@ const StepTwoComponent = (props) => {
|
||||||
<Spin
|
<Spin
|
||||||
spinning={props.qualificationApply.qualificationApplyLoading || uploadFileLoading || deleteFileLoading || getFileLoading}
|
spinning={props.qualificationApply.qualificationApplyLoading || uploadFileLoading || deleteFileLoading || getFileLoading}
|
||||||
>
|
>
|
||||||
<div>
|
{typeGroup.map((item) => (
|
||||||
<Divider orientation="left">专项资质信息</Divider>
|
<div key={item.dataType}>
|
||||||
|
<Divider orientation="left">{item.dataTypeName}</Divider>
|
||||||
<Table
|
<Table
|
||||||
dataSource={specialList}
|
dataSource={specialList.filter((record) => record.dataType === item.dataType)}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
options={false}
|
options={false}
|
||||||
disabledResizer={true}
|
disabledResizer={true}
|
||||||
columns={[
|
columns={[
|
||||||
|
{ title: "材料名称", dataIndex: "dataName" },
|
||||||
{ title: "材料名称", dataIndex: "dataName" },
|
{ title: "材料名称", dataIndex: "dataName" },
|
||||||
{ title: "上传时间", dataIndex: "uploadedTime", render: (_, record) => record.uploadedTime || "-" },
|
{ title: "上传时间", dataIndex: "uploadedTime", render: (_, record) => record.uploadedTime || "-" },
|
||||||
{
|
{
|
||||||
|
|
@ -340,7 +344,7 @@ const StepTwoComponent = (props) => {
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
width: 150,
|
width: 150,
|
||||||
render: (_, record, index) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
{
|
{
|
||||||
record.files?.length > 0
|
record.files?.length > 0
|
||||||
|
|
@ -348,7 +352,7 @@ const StepTwoComponent = (props) => {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onUploadFileOpen(record, index, record.files, "specialList");
|
onUploadFileOpen(record, record.id, record.files);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
修改
|
修改
|
||||||
|
|
@ -358,7 +362,7 @@ const StepTwoComponent = (props) => {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onUploadFileOpen(record, index, [], "specialList");
|
onUploadFileOpen(record, record.id, []);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
上传
|
上传
|
||||||
|
|
@ -371,55 +375,8 @@ const StepTwoComponent = (props) => {
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
))
|
||||||
<Divider orientation="left">安全资质信息</Divider>
|
|
||||||
<Table
|
|
||||||
dataSource={secureList}
|
|
||||||
pagination={false}
|
|
||||||
options={false}
|
|
||||||
disabledResizer={true}
|
|
||||||
columns={[
|
|
||||||
{ title: "材料名称", dataIndex: "dataName" },
|
|
||||||
{ title: "上传时间", dataIndex: "uploadedTime", render: (_, record) => record.uploadedTime || "-" },
|
|
||||||
{
|
|
||||||
title: "时效性",
|
|
||||||
dataIndex: "qualificationsTermStart",
|
|
||||||
render: (_, record) => record.qualificationsTermStart ? `${record.qualificationsTermStart}至${record.qualificationsTermEnd}` : "-",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "操作",
|
|
||||||
width: 150,
|
|
||||||
render: (_, record, index) => (
|
|
||||||
<Space>
|
|
||||||
{
|
|
||||||
record.files?.length > 0
|
|
||||||
? (
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
onUploadFileOpen(record, index, record.files, "secureList");
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
修改
|
|
||||||
</Button>
|
|
||||||
)
|
|
||||||
: (
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
onUploadFileOpen(record, index, [], "secureList");
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
上传
|
|
||||||
</Button>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div style={{ textAlign: "center", marginTop: 20 }}>
|
<div style={{ textAlign: "center", marginTop: 20 }}>
|
||||||
<Space>
|
<Space>
|
||||||
<Button onClick={() => {
|
<Button onClick={() => {
|
||||||
|
|
@ -444,11 +401,7 @@ const StepTwoComponent = (props) => {
|
||||||
}}
|
}}
|
||||||
onSubmit={(values) => {
|
onSubmit={(values) => {
|
||||||
setUploadFileModalOpen(false);
|
setUploadFileModalOpen(false);
|
||||||
if (uploadFileModalData.currentList === "specialList") {
|
|
||||||
setSpecialList(onUploadFileConfirm(values, specialList));
|
setSpecialList(onUploadFileConfirm(values, specialList));
|
||||||
return;
|
|
||||||
}
|
|
||||||
setSecureList(onUploadFileConfirm(values, secureList));
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
@ -509,7 +462,7 @@ const FileUpload = (props) => {
|
||||||
name: "qualificationsTermEnd",
|
name: "qualificationsTermEnd",
|
||||||
label: "有效期结束时间",
|
label: "有效期结束时间",
|
||||||
render: FORM_ITEM_RENDER_ENUM.DATETIME,
|
render: FORM_ITEM_RENDER_ENUM.DATETIME,
|
||||||
rules: [validatorEndTime(qualificationsTermStart)],
|
rules: [validatorEndTime(qualificationsTermStart), validatorTimeGTCurrentDay()],
|
||||||
hidden: !(props.data.isValidity === 0),
|
hidden: !(props.data.isValidity === 0),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
|
|
@ -519,6 +472,6 @@ const FileUpload = (props) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const StepOne = Connect([NS_QUALIFICATION_APPLY], true)(StepOneComponent);
|
const StepOne = Connect([NS_QUALIFICATION_APPLY], true)(StepOneComponent);
|
||||||
const StepTwo = Connect([NS_QUALIFICATION_APPLY], true)(StepTwoComponent);
|
const StepTwo = Connect([NS_QUALIFICATION_APPLY, NS_QUALIFICATION_MAINTENANCE], true)(StepTwoComponent);
|
||||||
|
|
||||||
export default Connect([NS_QUALIFICATION_APPLY], true)(Add);
|
export default Connect([NS_QUALIFICATION_APPLY], true)(Add);
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,8 @@ function List(props) {
|
||||||
labelCol={{ span: 8 }}
|
labelCol={{ span: 8 }}
|
||||||
options={[
|
options={[
|
||||||
{ name: "qualificationsName", label: "资质名称" },
|
{ name: "qualificationsName", label: "资质名称" },
|
||||||
{ name: "qualificationsTypeId", label: "相关方类别", render: (<DictionarySelect dictValue="qualificationsType" />) },
|
{ name: "qualificationsTypeId", label: "资质类别", render: (<DictionarySelect dictValue="qualificationsType" />) },
|
||||||
{ name: "stakeholderLevel", label: "相关方级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
{ name: "stakeholderLevel", label: "资质级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
||||||
]}
|
]}
|
||||||
form={form}
|
form={form}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
|
|
@ -52,11 +52,10 @@ function List(props) {
|
||||||
)}
|
)}
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "资质名称", dataIndex: "qualificationsName" },
|
{ title: "资质名称", dataIndex: "qualificationsName" },
|
||||||
{ title: "资质类别(相关方类别)", dataIndex: "qualificationsTypeName" },
|
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
||||||
{ title: "相关方等级", dataIndex: "stakeholderLevelName" },
|
{ title: "资质级别", dataIndex: "stakeholderLevelName" },
|
||||||
{ title: "材料数量", dataIndex: "materialNum" },
|
{ title: "材料数量", dataIndex: "materialNum" },
|
||||||
{ title: "审核公司", dataIndex: "groupUnitName" },
|
{ title: "审核公司", dataIndex: "groupUnitName" },
|
||||||
{ title: "备注", dataIndex: "qualificationsRemarks" },
|
|
||||||
{ title: "审核状态", dataIndex: "status", render: (_, record) => (
|
{ title: "审核状态", dataIndex: "status", render: (_, record) => (
|
||||||
<>
|
<>
|
||||||
{record.status === 200 && "审核中"}
|
{record.status === 200 && "审核中"}
|
||||||
|
|
|
||||||
|
|
@ -14,13 +14,14 @@ function View(props) {
|
||||||
const { loading: getFileLoading, getFile } = useGetFile();
|
const { loading: getFileLoading, getFile } = useGetFile();
|
||||||
|
|
||||||
const [info, setInfo] = useState([]);
|
const [info, setInfo] = useState([]);
|
||||||
|
const [typeGroup, setTypeGroup] = useState([]);
|
||||||
const [specialList, setSpecialList] = useState([]);
|
const [specialList, setSpecialList] = useState([]);
|
||||||
const [secureList, setSecureList] = useState([]);
|
|
||||||
const [viewQualificationDetailsModalOpen, setViewQualificationDetailsModalOpen] = useState(false);
|
const [viewQualificationDetailsModalOpen, setViewQualificationDetailsModalOpen] = useState(false);
|
||||||
const [viewQualificationDetailsModalData, setViewQualificationDetailsModalData] = useState({});
|
const [viewQualificationDetailsModalData, setViewQualificationDetailsModalData] = useState({});
|
||||||
|
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
const { data } = await props["qualificationApplyInfo"]({ id: query.id });
|
const { data } = await props["qualificationApplyInfo"]({ id: query.id });
|
||||||
|
await getTypeGroup(data.specialList);
|
||||||
setInfo(data);
|
setInfo(data);
|
||||||
for (let i = 0; i < data.specialList.length; i++) {
|
for (let i = 0; i < data.specialList.length; i++) {
|
||||||
const files = await getFile({
|
const files = await getFile({
|
||||||
|
|
@ -29,17 +30,20 @@ function View(props) {
|
||||||
});
|
});
|
||||||
data.specialList[i].files = files;
|
data.specialList[i].files = files;
|
||||||
}
|
}
|
||||||
for (let i = 0; i < data.secureList.length; i++) {
|
|
||||||
const files = await getFile({
|
|
||||||
eqType: UPLOAD_FILE_TYPE_ENUM["149"],
|
|
||||||
eqForeignKey: data.secureList[i].applyDetailId,
|
|
||||||
});
|
|
||||||
data.secureList[i].files = files;
|
|
||||||
}
|
|
||||||
setSpecialList(data.specialList);
|
setSpecialList(data.specialList);
|
||||||
setSecureList(data.secureList);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getTypeGroup = async (details) => {
|
||||||
|
const typeMap = new Map();
|
||||||
|
for (let i = 0; i < details.length; i++) {
|
||||||
|
const { dataType, dataTypeName } = details[i];
|
||||||
|
if (dataType && dataTypeName) {
|
||||||
|
typeMap.set(dataType, { dataType, dataTypeName });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setTypeGroup(Array.from(typeMap.values()));
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getData();
|
getData();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
@ -59,7 +63,7 @@ function View(props) {
|
||||||
styles={{ label: { width: 200 } }}
|
styles={{ label: { width: 200 } }}
|
||||||
items={[
|
items={[
|
||||||
{ label: "资质类别", children: info.qualificationsTypeName },
|
{ label: "资质类别", children: info.qualificationsTypeName },
|
||||||
{ label: "资质等级", children: info.stakeholderLevelName },
|
{ label: "资质级别", children: info.stakeholderLevelName },
|
||||||
...(info.stakeholderLevel === "two-level"
|
...(info.stakeholderLevel === "two-level"
|
||||||
? [
|
? [
|
||||||
{ label: "集团单位", children: info.groupUnitName },
|
{ label: "集团单位", children: info.groupUnitName },
|
||||||
|
|
@ -68,47 +72,15 @@ function View(props) {
|
||||||
]
|
]
|
||||||
: []),
|
: []),
|
||||||
{ label: "资质名称", children: info.qualificationsName },
|
{ label: "资质名称", children: info.qualificationsName },
|
||||||
{ label: "备注", children: info.qualificationsRemarks },
|
{ label: "备注", children: info.remarks },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
{typeGroup.map((item) => (
|
||||||
<Divider orientation="left">专项资质信息</Divider>
|
<div key={item.dataType}>
|
||||||
|
<Divider orientation="left">{item.dataTypeName}</Divider>
|
||||||
<Table
|
<Table
|
||||||
dataSource={specialList}
|
dataSource={specialList.filter((detail) => detail.dataType === item.dataType)}
|
||||||
pagination={false}
|
|
||||||
options={false}
|
|
||||||
disabledResizer={true}
|
|
||||||
columns={[
|
|
||||||
{ title: "材料名称", dataIndex: "dataName" },
|
|
||||||
{ title: "上传时间", dataIndex: "uploadedTime", render: (_, record) => record.uploadedTime || "-" },
|
|
||||||
{
|
|
||||||
title: "时效性",
|
|
||||||
dataIndex: "qualificationsTermStart",
|
|
||||||
render: (_, record) => record.qualificationsTermStart ? `${record.qualificationsTermStart}至${record.qualificationsTermEnd}` : "-",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "操作",
|
|
||||||
width: 80,
|
|
||||||
render: (_, record) => (
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
setViewQualificationDetailsModalOpen(true);
|
|
||||||
setViewQualificationDetailsModalData(record);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
查看
|
|
||||||
</Button>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<Divider orientation="left">安全资质信息</Divider>
|
|
||||||
<Table
|
|
||||||
dataSource={secureList}
|
|
||||||
pagination={false}
|
pagination={false}
|
||||||
options={false}
|
options={false}
|
||||||
disabledResizer={true}
|
disabledResizer={true}
|
||||||
|
|
@ -138,6 +110,8 @@ function View(props) {
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
))
|
||||||
|
}
|
||||||
</Spin>
|
</Spin>
|
||||||
{viewQualificationDetailsModalOpen
|
{viewQualificationDetailsModalOpen
|
||||||
&& <ViewQualificationDetailsModal onCancel={() => setViewQualificationDetailsModalOpen(false)} data={viewQualificationDetailsModalData} />}
|
&& <ViewQualificationDetailsModal onCancel={() => setViewQualificationDetailsModalOpen(false)} data={viewQualificationDetailsModalData} />}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button, Form, Space } from "antd";
|
import { useState } from "react";
|
||||||
|
import { Button, Form, Space, Tooltip } from "antd";
|
||||||
|
import { WarningOutlined } from "@ant-design/icons";
|
||||||
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";
|
||||||
|
|
@ -8,6 +10,7 @@ import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { NS_QUALIFICATION_RECORDS } from "~/enumerate/namespace";
|
import { NS_QUALIFICATION_RECORDS } from "~/enumerate/namespace";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
|
const [currentTenantId, setCurrentTenantId] = useState("");
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const { tableProps, getData } = useTable(props["qualificationRecordsList"], {
|
const { tableProps, getData } = useTable(props["qualificationRecordsList"], {
|
||||||
form,
|
form,
|
||||||
|
|
@ -18,6 +21,9 @@ function List(props) {
|
||||||
auditStatus: auditStatus[1],
|
auditStatus: auditStatus[1],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onSuccess: (data) => {
|
||||||
|
setCurrentTenantId(data.extValues.currentTenantId);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -28,17 +34,17 @@ function List(props) {
|
||||||
{ name: "qualificationsName", label: "资质名称" },
|
{ name: "qualificationsName", label: "资质名称" },
|
||||||
{
|
{
|
||||||
name: "qualificationsTypeId",
|
name: "qualificationsTypeId",
|
||||||
label: "相关方类别",
|
label: "资质类别",
|
||||||
render: (<DictionarySelect dictValue="qualificationsType" />),
|
render: (<DictionarySelect dictValue="qualificationsType" />),
|
||||||
},
|
},
|
||||||
{ name: "stakeholderLevel", label: "相关方级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
{ name: "stakeholderLevel", label: "资质级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
||||||
{ name: "auditStatus", label: "审核状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [
|
{
|
||||||
|
name: "auditStatus", label: "审核状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [
|
||||||
{ bianma: "200-200", name: "主管部门审核中" },
|
{ bianma: "200-200", name: "主管部门审核中" },
|
||||||
{ bianma: "200-300", name: "主管部门已驳回" },
|
{ bianma: "200-300", name: "主管部门已驳回" },
|
||||||
{ bianma: "300-200", name: "安监部门审核中" },
|
|
||||||
{ bianma: "300-300", name: "安监部门已驳回" },
|
|
||||||
{ bianma: "400", name: "已完成" },
|
{ bianma: "400", name: "已完成" },
|
||||||
] },
|
]
|
||||||
|
},
|
||||||
]}
|
]}
|
||||||
form={form}
|
form={form}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
|
|
@ -48,26 +54,65 @@ function List(props) {
|
||||||
{ title: "相关方名称", dataIndex: "corpName" },
|
{ title: "相关方名称", dataIndex: "corpName" },
|
||||||
{ title: "资质名称", dataIndex: "qualificationsName" },
|
{ title: "资质名称", dataIndex: "qualificationsName" },
|
||||||
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
||||||
{ title: "资质等级", dataIndex: "stakeholderLevelName" },
|
{ title: "资质级别", dataIndex: "stakeholderLevelName" },
|
||||||
|
{ title: "时效属性", dataIndex: "isLongTerm", render: (_, record) => record.isLongTerm ? "长期" : "短期" },
|
||||||
{ title: "材料数", dataIndex: "materialNum" },
|
{ title: "材料数", dataIndex: "materialNum" },
|
||||||
{ title: "备注", dataIndex: "qualificationsRemarks" },
|
{
|
||||||
{ title: "当前状态", dataIndex: "auditProcess", render: (_, record) => (
|
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 && "资质过期"}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "当前状态", dataIndex: "auditProcess", render: (_, record) => (
|
||||||
<div>
|
<div>
|
||||||
{record.auditProcess === "100" && "集团单位"}
|
{record.auditProcess === "100" && "集团单位"}
|
||||||
{record.auditProcess === "200" && "股份主管部门"}
|
|
||||||
{record.auditProcess === "300" && "股份安监部门"}
|
|
||||||
{record.status === 100 && "待审核"}
|
{record.status === 100 && "待审核"}
|
||||||
{record.status === 200 && "审核中"}
|
{record.status === 200 && "审核中"}
|
||||||
{record.status === 300 && "已驳回"}
|
{record.status === 300 && "已驳回"}
|
||||||
{record.status === 400 && "已通过"}
|
{record.status === 400 && "已通过"}
|
||||||
</div>
|
</div>
|
||||||
) },
|
)
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
width: 100,
|
width: 200,
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
|
{record.status === 400 && record.corpId === currentTenantId && (record.qualificationsStatus === 1 || record.qualificationsStatus === 2) && (
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
props.history.push(`../apply/add?id=${record.id}&resubmit=true`);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
重新提交
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,10 @@ function List(props) {
|
||||||
{ name: "qualificationsName", label: "资质名称" },
|
{ name: "qualificationsName", label: "资质名称" },
|
||||||
{
|
{
|
||||||
name: "qualificationsTypeId",
|
name: "qualificationsTypeId",
|
||||||
label: "相关方类别",
|
label: "资质类别",
|
||||||
render: (<DictionarySelect dictValue="qualificationsType" />),
|
render: (<DictionarySelect dictValue="qualificationsType" />),
|
||||||
},
|
},
|
||||||
{ name: "stakeholderLevel", label: "相关方级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
{ name: "stakeholderLevel", label: "资质级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
||||||
]}
|
]}
|
||||||
form={form}
|
form={form}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
|
|
@ -33,9 +33,37 @@ function List(props) {
|
||||||
{ title: "相关方名称", dataIndex: "corpName" },
|
{ title: "相关方名称", dataIndex: "corpName" },
|
||||||
{ title: "资质名称", dataIndex: "qualificationsName" },
|
{ title: "资质名称", dataIndex: "qualificationsName" },
|
||||||
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
||||||
{ title: "相关方等级", dataIndex: "stakeholderLevelName" },
|
{ title: "资质级别", dataIndex: "stakeholderLevelName" },
|
||||||
{ title: "材料数", dataIndex: "materialNum" },
|
{ title: "材料数", dataIndex: "materialNum" },
|
||||||
{ title: "备注", dataIndex: "qualificationsRemarks" },
|
{
|
||||||
|
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 && "资质过期"}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,10 @@ function List(props) {
|
||||||
{ name: "qualificationsName", label: "资质名称" },
|
{ name: "qualificationsName", label: "资质名称" },
|
||||||
{
|
{
|
||||||
name: "qualificationsTypeId",
|
name: "qualificationsTypeId",
|
||||||
label: "相关方类别",
|
label: "资质类别",
|
||||||
render: (<DictionarySelect dictValue="qualificationsType" />),
|
render: (<DictionarySelect dictValue="qualificationsType" />),
|
||||||
},
|
},
|
||||||
{ name: "stakeholderLevel", label: "相关方级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
{ name: "stakeholderLevel", label: "资质级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
||||||
]}
|
]}
|
||||||
form={form}
|
form={form}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
|
|
@ -33,9 +33,37 @@ function List(props) {
|
||||||
{ title: "相关方名称", dataIndex: "corpName" },
|
{ title: "相关方名称", dataIndex: "corpName" },
|
||||||
{ title: "资质名称", dataIndex: "qualificationsName" },
|
{ title: "资质名称", dataIndex: "qualificationsName" },
|
||||||
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
||||||
{ title: "相关方等级", dataIndex: "stakeholderLevelName" },
|
{ title: "资质级别", dataIndex: "stakeholderLevelName" },
|
||||||
{ title: "材料数", dataIndex: "materialNum" },
|
{ title: "材料数", dataIndex: "materialNum" },
|
||||||
{ title: "备注", dataIndex: "qualificationsRemarks" },
|
{
|
||||||
|
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 && "资质过期"}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,8 @@ function List(props) {
|
||||||
labelCol={{ span: 8 }}
|
labelCol={{ span: 8 }}
|
||||||
options={[
|
options={[
|
||||||
{ name: "qualificationsName", label: "资质名称" },
|
{ name: "qualificationsName", label: "资质名称" },
|
||||||
{ name: "qualificationsTypeId", label: "相关方类别", render: (<DictionarySelect dictValue="qualificationsType" />) },
|
{ name: "qualificationsTypeId", label: "资质类别", render: (<DictionarySelect dictValue="qualificationsType" />) },
|
||||||
{ name: "stakeholderLevel", label: "相关方级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
{ name: "stakeholderLevel", label: "资质级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
||||||
]}
|
]}
|
||||||
form={form}
|
form={form}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
|
|
@ -52,11 +52,11 @@ function List(props) {
|
||||||
)}
|
)}
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "资质名称", dataIndex: "qualificationsName" },
|
{ title: "资质名称", dataIndex: "qualificationsName" },
|
||||||
{ title: "资质类别(相关方类别)", dataIndex: "qualificationsTypeName" },
|
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
||||||
{ title: "资质等级", dataIndex: "stakeholderLevelName" },
|
{ title: "资质级别", dataIndex: "stakeholderLevelName" },
|
||||||
{ title: "材料数量", dataIndex: "materialNum" },
|
{ title: "材料数量", dataIndex: "materialNum" },
|
||||||
{ title: "直属审核公司", dataIndex: "groupUnitName" },
|
{ title: "直属审核公司", dataIndex: "groupUnitName" },
|
||||||
{ title: "备注", dataIndex: "qualificationsRemarks" },
|
{ title: "备注", dataIndex: "remarks" },
|
||||||
{ title: "审核状态", dataIndex: "status", render: (_, record) => (
|
{ title: "审核状态", dataIndex: "status", render: (_, record) => (
|
||||||
<>
|
<>
|
||||||
{record.status === 200 && "审核中"}
|
{record.status === 200 && "审核中"}
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,6 @@ function Add(props) {
|
||||||
...data,
|
...data,
|
||||||
managerUser: data.managerUser.split(","),
|
managerUser: data.managerUser.split(","),
|
||||||
managerUserName: data.managerUserName.split(","),
|
managerUserName: data.managerUserName.split(","),
|
||||||
supervisionUser: data.supervisionUser.split(","),
|
|
||||||
supervisionUserName: data.supervisionUserName.split(","),
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -36,8 +34,6 @@ function Add(props) {
|
||||||
...values,
|
...values,
|
||||||
managerUser: values.managerUser.join(","),
|
managerUser: values.managerUser.join(","),
|
||||||
managerUserName: values.managerUserName.join(","),
|
managerUserName: values.managerUserName.join(","),
|
||||||
supervisionUser: values.supervisionUser.join(","),
|
|
||||||
supervisionUserName: values.supervisionUserName.join(","),
|
|
||||||
id: query.id,
|
id: query.id,
|
||||||
});
|
});
|
||||||
if (success) {
|
if (success) {
|
||||||
|
|
@ -54,14 +50,21 @@ function Add(props) {
|
||||||
form={form}
|
form={form}
|
||||||
values={{
|
values={{
|
||||||
status: 0,
|
status: 0,
|
||||||
|
details: [{
|
||||||
|
dataType: undefined,
|
||||||
|
dataTypeName: undefined,
|
||||||
|
dataName: undefined,
|
||||||
|
isValidity: undefined,
|
||||||
|
}],
|
||||||
}}
|
}}
|
||||||
loading={props.qualificationMaintenance.qualificationMaintenanceLoading}
|
loading={props.qualificationMaintenance.qualificationMaintenanceLoading}
|
||||||
onFinish={onSubmit}
|
onFinish={onSubmit}
|
||||||
options={[
|
options={[
|
||||||
|
{ key: "divider-basic", label: "基础信息", render: FORM_ITEM_RENDER_ENUM.DIVIDER },
|
||||||
{ name: "qualificationsName", label: "资质名称", span: 24 },
|
{ name: "qualificationsName", label: "资质名称", span: 24 },
|
||||||
{
|
{
|
||||||
name: "qualificationsTypeId",
|
name: "qualificationsTypeId",
|
||||||
label: "相关方类别",
|
label: "资质类别",
|
||||||
render: (
|
render: (
|
||||||
<DictionarySelect
|
<DictionarySelect
|
||||||
dictValue="qualificationsType"
|
dictValue="qualificationsType"
|
||||||
|
|
@ -71,7 +74,7 @@ function Add(props) {
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{ name: "qualificationsTypeName", label: "相关方类别名称", onlyForLabel: true },
|
{ name: "qualificationsTypeName", label: "资质类别", onlyForLabel: true },
|
||||||
{
|
{
|
||||||
name: "stakeholderLevel",
|
name: "stakeholderLevel",
|
||||||
label: "资质级别",
|
label: "资质级别",
|
||||||
|
|
@ -84,7 +87,7 @@ function Add(props) {
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{ name: "stakeholderLevelName", label: "资质级别名称", onlyForLabel: true },
|
{ name: "stakeholderLevelName", label: "资质级别", onlyForLabel: true },
|
||||||
{
|
{
|
||||||
name: "managerDept",
|
name: "managerDept",
|
||||||
label: "主管部门",
|
label: "主管部门",
|
||||||
|
|
@ -117,42 +120,48 @@ function Add(props) {
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{ name: "managerUserName", label: "主管人员名称", onlyForLabel: true },
|
{ name: "managerUserName", label: "主管人员名称", onlyForLabel: true },
|
||||||
{
|
|
||||||
name: "supervisionDept",
|
|
||||||
label: "安监部门",
|
|
||||||
render: (
|
|
||||||
<DepartmentSelectTree
|
|
||||||
onGetLabel={(label) => {
|
|
||||||
form.setFieldValue("supervisionDeptName", label);
|
|
||||||
}}
|
|
||||||
onChange={() => {
|
|
||||||
form.setFieldValue("supervisionUser", []);
|
|
||||||
form.setFieldValue("supervisionUserName", []);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{ name: "supervisionDeptName", label: "安监部门名称", onlyForLabel: true },
|
|
||||||
{
|
|
||||||
name: "supervisionUser",
|
|
||||||
label: "安监人员",
|
|
||||||
render: (
|
|
||||||
<PersonnelSelect
|
|
||||||
params={{ departmentId: supervisionDept }}
|
|
||||||
mode="multiple"
|
|
||||||
onGetLabel={(label) => {
|
|
||||||
form.setFieldValue("supervisionUserName", label);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{ name: "supervisionUserName", label: "安监人员名称", onlyForLabel: true },
|
|
||||||
{
|
{
|
||||||
name: "status",
|
name: "status",
|
||||||
label: "是否启用",
|
label: "是否启用",
|
||||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||||
items: [{ name: "是", bianma: 0 }, { name: "否", bianma: 1 }],
|
items: [{ name: "是", bianma: 0 }, { name: "否", bianma: 1 }],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ key: "divider-detail", label: "资料信息", render: FORM_ITEM_RENDER_ENUM.DIVIDER },
|
||||||
|
{
|
||||||
|
name: "details",
|
||||||
|
span: 24,
|
||||||
|
render: FORM_ITEM_RENDER_ENUM.FORM_LIST,
|
||||||
|
formListUniqueProps: {
|
||||||
|
options: field => (
|
||||||
|
[
|
||||||
|
{
|
||||||
|
label: "资料属性",
|
||||||
|
name: [field.name, "dataType"],
|
||||||
|
span: 8,
|
||||||
|
render: (
|
||||||
|
<DictionarySelect
|
||||||
|
dictValue="dataType"
|
||||||
|
onGetLabel={(label) => {
|
||||||
|
form.setFieldValue(["details", field.name, "dataTypeName"], label);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{ label: "资料属性名称", name: [field.name, "dataTypeName"], span: 8, onlyForLabel: true },
|
||||||
|
{ label: "资料名称", name: [field.name, "dataName"], span: 8 },
|
||||||
|
{
|
||||||
|
label: "是否涉及有效时间",
|
||||||
|
name: [field.name, "isValidity"],
|
||||||
|
span: 8,
|
||||||
|
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||||
|
items: [{ bianma: 0, name: "是" }, { bianma: 1, name: "否" }],
|
||||||
|
labelCol: { span: 6 },
|
||||||
|
},
|
||||||
|
]
|
||||||
|
),
|
||||||
|
},
|
||||||
|
},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,8 @@ function List(props) {
|
||||||
labelCol={{ span: 8 }}
|
labelCol={{ span: 8 }}
|
||||||
options={[
|
options={[
|
||||||
{ name: "qualificationsName", label: "资质名称" },
|
{ name: "qualificationsName", label: "资质名称" },
|
||||||
{ name: "qualificationsTypeId", label: "相关方类别", render: (<DictionarySelect dictValue="qualificationsType" />) },
|
{ name: "qualificationsTypeId", label: "资质类别", render: (<DictionarySelect dictValue="qualificationsType" />) },
|
||||||
{ name: "stakeholderLevel", label: "相关方级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
{ name: "stakeholderLevel", label: "资质级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
||||||
]}
|
]}
|
||||||
form={form}
|
form={form}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
|
|
@ -56,10 +56,11 @@ function List(props) {
|
||||||
)}
|
)}
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "资质名称", dataIndex: "qualificationsName" },
|
{ title: "资质名称", dataIndex: "qualificationsName" },
|
||||||
{ title: "资质类别(相关方类别)", dataIndex: "qualificationsTypeName" },
|
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
||||||
{ title: "相关方等级", dataIndex: "stakeholderLevelName" },
|
{ title: "资质级别", dataIndex: "stakeholderLevelName" },
|
||||||
{ title: "主管部门", dataIndex: "managerDeptName" },
|
{ title: "主管部门", dataIndex: "managerDeptName" },
|
||||||
{ title: "材料数量", dataIndex: "materialNum" },
|
{ title: "材料数量", dataIndex: "materialNum",render:(_,record) => record.details?.length || 0 },
|
||||||
|
{ title: "状态", dataIndex: "status",render:(_,record) => record.status === 0 ? "启用" : "禁用" },
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
|
|
@ -74,15 +75,6 @@ function List(props) {
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
disabled={record.applyNum > 0}
|
|
||||||
onClick={() => {
|
|
||||||
props.history.push(`./addQualifications?id=${record.id}`);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
添加资质
|
|
||||||
</Button>
|
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
danger
|
danger
|
||||||
|
|
@ -90,6 +82,14 @@ function List(props) {
|
||||||
>
|
>
|
||||||
{record.status === 0 ? "禁用" : "启用"}
|
{record.status === 0 ? "禁用" : "启用"}
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
props.history.push(`./changeLogList?id=${record.id}`);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
变更记录
|
||||||
|
</Button>
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -19,14 +19,40 @@ function History(props) {
|
||||||
{ title: "相关方名称", dataIndex: "corpName" },
|
{ title: "相关方名称", dataIndex: "corpName" },
|
||||||
{ title: "资质名称", dataIndex: "qualificationsName" },
|
{ title: "资质名称", dataIndex: "qualificationsName" },
|
||||||
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
||||||
{ title: "相关方等级", dataIndex: "stakeholderLevelName" },
|
{ title: "资质级别", dataIndex: "stakeholderLevelName" },
|
||||||
{ title: "材料数", dataIndex: "materialNum" },
|
{ title: "材料数", dataIndex: "materialNum" },
|
||||||
{ title: "备注", dataIndex: "qualificationsRemarks" },
|
{
|
||||||
|
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 && "资质过期"}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
},
|
||||||
{ title: "当前状态", dataIndex: "auditProcess", render: (_, record) => (
|
{ title: "当前状态", dataIndex: "auditProcess", render: (_, record) => (
|
||||||
<div>
|
<div>
|
||||||
{record.auditProcess === "100" && "集团单位"}
|
{record.auditProcess === "100" && "集团单位"}
|
||||||
{record.auditProcess === "200" && "股份主管部门"}
|
|
||||||
{record.auditProcess === "300" && "股份安监部门"}
|
|
||||||
{record.status === 100 && "待审核"}
|
{record.status === 100 && "待审核"}
|
||||||
{record.status === 200 && "审核中"}
|
{record.status === 200 && "审核中"}
|
||||||
{record.status === 300 && "已驳回"}
|
{record.status === 300 && "已驳回"}
|
||||||
|
|
@ -43,7 +69,7 @@ function History(props) {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push(`../ViewInfo?id=${record.id}&batchNum=${record.batchNum}`);
|
props.history.push(`../ViewInfo?id=${record.id}`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button, Form, Space } from "antd";
|
import { Button, Form, Space, Tooltip } from "antd";
|
||||||
|
import { WarningOutlined } from "@ant-design/icons";
|
||||||
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";
|
||||||
|
|
@ -28,17 +29,17 @@ function List(props) {
|
||||||
{ name: "qualificationsName", label: "资质名称" },
|
{ name: "qualificationsName", label: "资质名称" },
|
||||||
{
|
{
|
||||||
name: "qualificationsTypeId",
|
name: "qualificationsTypeId",
|
||||||
label: "相关方类别",
|
label: "资质类别",
|
||||||
render: (<DictionarySelect dictValue="qualificationsType" />),
|
render: (<DictionarySelect dictValue="qualificationsType" />),
|
||||||
},
|
},
|
||||||
{ name: "stakeholderLevel", label: "相关方级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
{ name: "stakeholderLevel", label: "资质级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
||||||
{ name: "auditStatus", label: "审核状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [
|
{
|
||||||
|
name: "auditStatus", label: "审核状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: [
|
||||||
{ bianma: "200-200", name: "主管部门审核中" },
|
{ bianma: "200-200", name: "主管部门审核中" },
|
||||||
{ bianma: "200-300", name: "主管部门已驳回" },
|
{ bianma: "200-300", name: "主管部门已驳回" },
|
||||||
{ bianma: "300-200", name: "安监部门审核中" },
|
|
||||||
{ bianma: "300-300", name: "安监部门已驳回" },
|
|
||||||
{ bianma: "400", name: "已完成" },
|
{ bianma: "400", name: "已完成" },
|
||||||
] },
|
]
|
||||||
|
},
|
||||||
]}
|
]}
|
||||||
form={form}
|
form={form}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
|
|
@ -48,20 +49,50 @@ function List(props) {
|
||||||
{ title: "相关方名称", dataIndex: "corpName" },
|
{ title: "相关方名称", dataIndex: "corpName" },
|
||||||
{ title: "资质名称", dataIndex: "qualificationsName" },
|
{ title: "资质名称", dataIndex: "qualificationsName" },
|
||||||
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
||||||
{ title: "相关方等级", dataIndex: "stakeholderLevelName" },
|
{ title: "资质级别", dataIndex: "stakeholderLevelName" },
|
||||||
|
{ title: "时效属性", dataIndex: "isLongTerm", render: (_, record) => record.isLongTerm ? "长期" : "短期" },
|
||||||
{ title: "材料数", dataIndex: "materialNum" },
|
{ title: "材料数", dataIndex: "materialNum" },
|
||||||
{ title: "备注", dataIndex: "qualificationsRemarks" },
|
{
|
||||||
{ title: "当前状态", dataIndex: "auditProcess", render: (_, record) => (
|
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 && "资质过期"}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "审核状态", dataIndex: "auditProcess", render: (_, record) => (
|
||||||
<div>
|
<div>
|
||||||
{record.auditProcess === "100" && "集团单位"}
|
{record.auditProcess === "100" && "集团单位"}
|
||||||
{record.auditProcess === "200" && "股份主管部门"}
|
|
||||||
{record.auditProcess === "300" && "股份安监部门"}
|
|
||||||
{record.status === 100 && "待审核"}
|
{record.status === 100 && "待审核"}
|
||||||
{record.status === 200 && "审核中"}
|
{record.status === 200 && "审核中"}
|
||||||
{record.status === 300 && "已驳回"}
|
{record.status === 300 && "已驳回"}
|
||||||
{record.status === 400 && "已通过"}
|
{record.status === 400 && "已通过"}
|
||||||
</div>
|
</div>
|
||||||
) },
|
)
|
||||||
|
},
|
||||||
|
{ title:"时效性", dataIndex:"qualificationsTermStart", render: (_, record) => record.qualificationsTermStart ? `${record.qualificationsTermStart}至${record.qualificationsTermEnd}` : "-",},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
|
|
@ -76,14 +107,6 @@ function List(props) {
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
props.history.push(`./history?id=${record.id}`);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
过往资料
|
|
||||||
</Button>
|
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,10 @@ function List(props) {
|
||||||
{ name: "qualificationsName", label: "资质名称" },
|
{ name: "qualificationsName", label: "资质名称" },
|
||||||
{
|
{
|
||||||
name: "qualificationsTypeId",
|
name: "qualificationsTypeId",
|
||||||
label: "相关方类别",
|
label: "资质类别",
|
||||||
render: (<DictionarySelect dictValue="qualificationsType" />),
|
render: (<DictionarySelect dictValue="qualificationsType" />),
|
||||||
},
|
},
|
||||||
{ name: "stakeholderLevel", label: "相关方级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
{ name: "stakeholderLevel", label: "资质级别", render: (<DictionarySelect dictValue="stakeholderLevel" />) },
|
||||||
]}
|
]}
|
||||||
form={form}
|
form={form}
|
||||||
onFinish={getData}
|
onFinish={getData}
|
||||||
|
|
@ -38,9 +38,37 @@ function List(props) {
|
||||||
},
|
},
|
||||||
{ title: "资质名称", dataIndex: "qualificationsName" },
|
{ title: "资质名称", dataIndex: "qualificationsName" },
|
||||||
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
{ title: "资质类别", dataIndex: "qualificationsTypeName" },
|
||||||
{ title: "相关方等级", dataIndex: "stakeholderLevelName" },
|
{ title: "资质级别", dataIndex: "stakeholderLevelName" },
|
||||||
{ title: "材料数", dataIndex: "materialNum" },
|
{ title: "材料数", dataIndex: "materialNum" },
|
||||||
{ title: "备注", dataIndex: "qualificationsRemarks" },
|
{
|
||||||
|
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 && "资质过期"}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import TooltipPreviewImg from "zy-react-library/components/TooltipPreviewImg";
|
||||||
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 useTable from "zy-react-library/hooks/useTable";
|
|
||||||
import { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
import ViewQualificationDetailsModal from "~/components/ViewQualificationDetailsModal";
|
import ViewQualificationDetailsModal from "~/components/ViewQualificationDetailsModal";
|
||||||
import { NS_QUALIFICATION_REVIEW } from "~/enumerate/namespace";
|
import { NS_QUALIFICATION_REVIEW } from "~/enumerate/namespace";
|
||||||
|
|
@ -29,41 +28,21 @@ function ViewInfo(props) {
|
||||||
const [info, setInfo] = useState({
|
const [info, setInfo] = useState({
|
||||||
processFlow: [],
|
processFlow: [],
|
||||||
specialList: [],
|
specialList: [],
|
||||||
secureList: [],
|
|
||||||
});
|
});
|
||||||
const [corpInfoData, setCorpInfoData] = useState({});
|
const [corpInfoData, setCorpInfoData] = useState({});
|
||||||
const [list, setList] = useState([]);
|
const [typeGroup, setTypeGroup] = useState([]);
|
||||||
const [viewQualificationDetailsModalOpen, setViewQualificationDetailsModalOpen] = useState(false);
|
const [viewQualificationDetailsModalOpen, setViewQualificationDetailsModalOpen] = useState(false);
|
||||||
const [viewQualificationDetailsModalData, setViewQualificationDetailsModalData] = useState({});
|
const [viewQualificationDetailsModalData, setViewQualificationDetailsModalData] = useState({});
|
||||||
|
|
||||||
const getFiles = async (list) => {
|
|
||||||
for (let i = 0; i < list.length; i++) {
|
|
||||||
const files = await getFile({ eqType: UPLOAD_FILE_TYPE_ENUM["6"], eqForeignKey: list[i].userQualificationinfoId });
|
|
||||||
list[i].files = files;
|
|
||||||
}
|
|
||||||
setList(list);
|
|
||||||
};
|
|
||||||
const { tableProps, getData: run } = useTable(props["userQualificationList"], {
|
|
||||||
useStorageQueryCriteria: false,
|
|
||||||
params: () => ({
|
|
||||||
eqCorpinfoId: info.corpId,
|
|
||||||
eqQualificationinfoType: 1,
|
|
||||||
}),
|
|
||||||
manual: true,
|
|
||||||
defaultPageSize: 10,
|
|
||||||
onSuccess: (data) => {
|
|
||||||
getFiles(data.list);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
const getData = async () => {
|
const getData = async () => {
|
||||||
if (!query.id)
|
if (!query.id)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const { data } = await props[query.batchNum ? "qualificationReviewInfoBatchNum" : "qualificationReviewInfo"]({
|
const { data } = await props["qualificationReviewInfo"]({
|
||||||
id: query.id,
|
id: query.id,
|
||||||
batchNum: query.batchNum,
|
|
||||||
});
|
});
|
||||||
|
await getTypeGroup(data);
|
||||||
for (let i = 0; i < data.specialList.length; i++) {
|
for (let i = 0; i < data.specialList.length; i++) {
|
||||||
const files = await getFile({
|
const files = await getFile({
|
||||||
eqType: UPLOAD_FILE_TYPE_ENUM["148"],
|
eqType: UPLOAD_FILE_TYPE_ENUM["148"],
|
||||||
|
|
@ -71,13 +50,6 @@ function ViewInfo(props) {
|
||||||
});
|
});
|
||||||
data.specialList[i].files = files;
|
data.specialList[i].files = files;
|
||||||
}
|
}
|
||||||
for (let i = 0; i < data.secureList.length; i++) {
|
|
||||||
const files = await getFile({
|
|
||||||
eqType: UPLOAD_FILE_TYPE_ENUM["149"],
|
|
||||||
eqForeignKey: data.secureList[i].applyDetailId,
|
|
||||||
});
|
|
||||||
data.secureList[i].files = files;
|
|
||||||
}
|
|
||||||
setInfo(data);
|
setInfo(data);
|
||||||
props.onGetData?.(data);
|
props.onGetData?.(data);
|
||||||
|
|
||||||
|
|
@ -88,9 +60,17 @@ function ViewInfo(props) {
|
||||||
});
|
});
|
||||||
corpInfoData.licenseFile = licenseFile;
|
corpInfoData.licenseFile = licenseFile;
|
||||||
setCorpInfoData(corpInfoData);
|
setCorpInfoData(corpInfoData);
|
||||||
|
|
||||||
run();
|
|
||||||
};
|
};
|
||||||
|
const getTypeGroup = async (data) => {
|
||||||
|
const typeMap = new Map();
|
||||||
|
for (let i = 0; i < data.specialList.length; i++) {
|
||||||
|
const { dataType, dataTypeName } = data.specialList[i];
|
||||||
|
if (dataType && dataTypeName) {
|
||||||
|
typeMap.set(dataType, { dataType, dataTypeName });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setTypeGroup(Array.from(typeMap.values()));
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getData();
|
getData();
|
||||||
|
|
@ -102,22 +82,7 @@ function ViewInfo(props) {
|
||||||
<div style={{ padding: "0 20px 20px 20px" }}>
|
<div style={{ padding: "0 20px 20px 20px" }}>
|
||||||
<div className="qualification-view">
|
<div className="qualification-view">
|
||||||
<div>
|
<div>
|
||||||
<Divider orientation="left">审核信息及流程</Divider>
|
<Divider orientation="left">流程信息</Divider>
|
||||||
<Spin spinning={props.qualificationReview.qualificationReviewLoading}>
|
|
||||||
<Descriptions
|
|
||||||
column={2}
|
|
||||||
bordered
|
|
||||||
styles={{ label: { width: 200 }, content: { width: 500 } }}
|
|
||||||
items={[
|
|
||||||
{ label: "相关方名称", children: info.corpName },
|
|
||||||
{ label: "所属集团单位", children: info.groupUnitName },
|
|
||||||
{ label: "资质名称", children: info.qualificationsName },
|
|
||||||
{ label: "资质类别", children: info.qualificationsTypeName },
|
|
||||||
{ label: "相关方等级", children: info.stakeholderLevelName },
|
|
||||||
{ label: "材料数", children: info.materialNum },
|
|
||||||
{ label: "备注", children: info.qualificationsRemarks },
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
<div className="flows-container">
|
<div className="flows-container">
|
||||||
<div className="flows">
|
<div className="flows">
|
||||||
{
|
{
|
||||||
|
|
@ -150,6 +115,25 @@ function ViewInfo(props) {
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<Divider orientation="left">审核信息</Divider>
|
||||||
|
<Spin spinning={props.qualificationReview.qualificationReviewLoading}>
|
||||||
|
<Descriptions
|
||||||
|
column={2}
|
||||||
|
bordered
|
||||||
|
styles={{ label: { width: 200 }, content: { width: 500 } }}
|
||||||
|
items={[
|
||||||
|
{ label: "相关方名称", children: info.corpName },
|
||||||
|
{ label: "所属集团单位", children: info.groupUnitName },
|
||||||
|
{ label: "资质名称", children: info.qualificationsName },
|
||||||
|
{ label: "资质类别", children: info.qualificationsTypeName },
|
||||||
|
{ label: "资质级别", children: info.stakeholderLevelName },
|
||||||
|
{ label: "材料数", children: info.materialNum },
|
||||||
|
{ label: "备注", children: info.remarks },
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
|
||||||
</Spin>
|
</Spin>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -189,14 +173,15 @@ function ViewInfo(props) {
|
||||||
/>
|
/>
|
||||||
</Spin>
|
</Spin>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
{typeGroup.map((item) => (
|
||||||
<Divider orientation="left">专项资质信息</Divider>
|
<div key={item.dataType}>
|
||||||
|
<Divider orientation="left">{item.dataTypeName}</Divider>
|
||||||
<Spin spinning={props.qualificationReview.qualificationReviewLoading}>
|
<Spin spinning={props.qualificationReview.qualificationReviewLoading}>
|
||||||
<Table
|
<Table
|
||||||
options={false}
|
options={false}
|
||||||
pagination={false}
|
pagination={false}
|
||||||
disabledResizer={true}
|
disabledResizer={true}
|
||||||
dataSource={info.specialList || []}
|
dataSource={info.specialList.filter((i) => i.dataType === item.dataType) || []}
|
||||||
columns={[
|
columns={[
|
||||||
{ title: "材料名称", dataIndex: "dataName" },
|
{ title: "材料名称", dataIndex: "dataName" },
|
||||||
{ title: "上传时间", dataIndex: "uploadedTime" },
|
{ title: "上传时间", dataIndex: "uploadedTime" },
|
||||||
|
|
@ -223,60 +208,7 @@ function ViewInfo(props) {
|
||||||
/>
|
/>
|
||||||
</Spin>
|
</Spin>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
))}
|
||||||
<Divider orientation="left">安全资质信息</Divider>
|
|
||||||
<Spin spinning={props.qualificationReview.qualificationReviewLoading}>
|
|
||||||
<Table
|
|
||||||
options={false}
|
|
||||||
pagination={false}
|
|
||||||
disabledResizer={true}
|
|
||||||
dataSource={info.secureList || []}
|
|
||||||
columns={[
|
|
||||||
{ title: "材料名称", dataIndex: "dataName" },
|
|
||||||
{ title: "上传时间", dataIndex: "uploadedTime" },
|
|
||||||
{
|
|
||||||
title: "时效性",
|
|
||||||
dataIndex: "qualificationsTermStart",
|
|
||||||
render: (_, record) => record.qualificationsTermStart ? `${record.qualificationsTermStart}至${record.qualificationsTermEnd}` : "-",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "操作",
|
|
||||||
render: (_, record) => (
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
setViewQualificationDetailsModalOpen(true);
|
|
||||||
setViewQualificationDetailsModalData(record);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
查看
|
|
||||||
</Button>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</Spin>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<Divider orientation="left">特证人员列表</Divider>
|
|
||||||
<Table
|
|
||||||
options={false}
|
|
||||||
disabledResizer={true}
|
|
||||||
columns={[
|
|
||||||
{ title: "姓名", dataIndex: "userName" },
|
|
||||||
{ title: "部门", dataIndex: "departmentName" },
|
|
||||||
{ title: "人员类型", dataIndex: "todo" }, // TODO 是否流动人员 没字段
|
|
||||||
{ title: "证书名称", dataIndex: "qualificationName" },
|
|
||||||
{ title: "证书作业类别", dataIndex: "qualificationinfoCategoryName" },
|
|
||||||
{ title: "操作项目", dataIndex: "operatingProjectName" },
|
|
||||||
{ title: "证书编号", dataIndex: "certificateNo" },
|
|
||||||
{ title: "就职状态", dataIndex: "employmentFlagName" },
|
|
||||||
{ title: "图片", dataIndex: "files", render: (_, record) => (<TooltipPreviewImg files={record.files} />) },
|
|
||||||
]}
|
|
||||||
{...tableProps}
|
|
||||||
dataSource={list}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{viewQualificationDetailsModalOpen
|
{viewQualificationDetailsModalOpen
|
||||||
&& (
|
&& (
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue