7月28日需求变更,准入资质申请 增加暂存
parent
6842d0dde2
commit
a5e239da7e
|
|
@ -31,7 +31,7 @@
|
|||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-pdf": "^10.4.1",
|
||||
"zy-react-library": "^1.3.26"
|
||||
"zy-react-library": "^1.3.28"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^5.4.1",
|
||||
|
|
|
|||
|
|
@ -46,14 +46,14 @@ function Add(props) {
|
|||
|
||||
const getData = async () => {
|
||||
const { data } = await props["qualificationApplyInfo"]({ id: query.id });
|
||||
data.maintain = data.maintain && data.maintain.split(",")
|
||||
data.detection = data.detection && data.detection.split(",")
|
||||
data.otherHighRisk = data.otherHighRisk && data.otherHighRisk.split(",")
|
||||
data.serviceEnterprise = data.serviceEnterprise && data.serviceEnterprise.split(",")
|
||||
data.detectionName = data.detectionName && data.detectionName.split(",")
|
||||
data.maintainName = data.maintainName && data.maintainName.split(",")
|
||||
data.otherHighRiskName = data.otherHighRiskName && data.otherHighRiskName.split(",")
|
||||
data.serviceEnterpriseName = data.serviceEnterpriseName && data.serviceEnterpriseName.split(",")
|
||||
data.maintain = data.maintain && data.maintain.split(",");
|
||||
data.detection = data.detection && data.detection.split(",");
|
||||
data.otherHighRisk = data.otherHighRisk && data.otherHighRisk.split(",");
|
||||
data.serviceEnterprise = data.serviceEnterprise && data.serviceEnterprise.split(",");
|
||||
data.detectionName = data.detectionName && data.detectionName.split(",");
|
||||
data.maintainName = data.maintainName && data.maintainName.split(",");
|
||||
data.otherHighRiskName = data.otherHighRiskName && data.otherHighRiskName.split(",");
|
||||
data.serviceEnterpriseName = data.serviceEnterpriseName && data.serviceEnterpriseName.split(",");
|
||||
// 重新提交时,删除id
|
||||
if (query.resubmit) {
|
||||
delete data.id;
|
||||
|
|
@ -92,7 +92,16 @@ function Add(props) {
|
|||
type="primary"
|
||||
loading={stepTwoLoading}
|
||||
onClick={() => {
|
||||
stepTwoRef.current?.onSubmit();
|
||||
stepTwoRef.current?.onSubmit(0);
|
||||
}}
|
||||
>
|
||||
暂存
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
loading={stepTwoLoading}
|
||||
onClick={() => {
|
||||
stepTwoRef.current?.onSubmit(1);
|
||||
}}
|
||||
>
|
||||
提交审核
|
||||
|
|
@ -142,7 +151,6 @@ const StepOneComponent = (props) => {
|
|||
const getQualificationsListAll = async () => {
|
||||
const { data } = await props["qualificationsListAll"]({ qualificationsTypeId, stakeholderLevel, status: 0 });
|
||||
|
||||
|
||||
setQualificationsListAll(data);
|
||||
};
|
||||
|
||||
|
|
@ -151,14 +159,13 @@ const StepOneComponent = (props) => {
|
|||
setCorpInfoList(data);
|
||||
};
|
||||
const getFgscorpFun = async () => {
|
||||
const { data } = await props["corpInfoListAll"]({inType:[0,6]});
|
||||
const { data } = await props["corpInfoListAll"]({ inType: [0, 6] });
|
||||
setFgsCorpInfoList(data);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
getCorpInfoList(1, 0);
|
||||
getFgscorpFun()
|
||||
getFgscorpFun();
|
||||
|
||||
form.setFieldsValue(props.formValues);
|
||||
}, []);
|
||||
|
|
@ -313,8 +320,8 @@ const StepOneComponent = (props) => {
|
|||
{
|
||||
name: "maintain",
|
||||
label: "维修、保养(多选)",
|
||||
hidden:qualificationsTypeId !=="sbl",
|
||||
required:false,
|
||||
hidden: qualificationsTypeId !== "sbl",
|
||||
required: false,
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="maintain"
|
||||
|
|
@ -330,8 +337,8 @@ const StepOneComponent = (props) => {
|
|||
{
|
||||
name: "detection",
|
||||
label: "检测(多选)",
|
||||
hidden:qualificationsTypeId !=="sbl",
|
||||
required:false,
|
||||
hidden: qualificationsTypeId !== "sbl",
|
||||
required: false,
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="detection"
|
||||
|
|
@ -346,8 +353,8 @@ const StepOneComponent = (props) => {
|
|||
{
|
||||
name: "otherHighRisk",
|
||||
label: "其它高风险业务(多选)",
|
||||
required:false,
|
||||
hidden:qualificationsTypeId !=="sbl",
|
||||
required: false,
|
||||
hidden: qualificationsTypeId !== "sbl",
|
||||
render: (
|
||||
<DictionarySelect
|
||||
dictValue="otherHighRisk"
|
||||
|
|
@ -363,23 +370,23 @@ const StepOneComponent = (props) => {
|
|||
{
|
||||
name: "serviceEnterprise",
|
||||
label: "服务企业(多选)",
|
||||
hidden:qualificationsTypeId !=="sbl",
|
||||
hidden: qualificationsTypeId !== "sbl",
|
||||
items: fgsCorpInfoList,
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
itemsField: { valueKey: "id", labelKey: "corpName" },
|
||||
componentProps: {
|
||||
mode:"multiple",
|
||||
mode: "multiple",
|
||||
onChange: (event) => {
|
||||
const arr = []
|
||||
if(event.length >0){
|
||||
event.forEach(item => {
|
||||
const arr = [];
|
||||
if (event.length > 0) {
|
||||
event.forEach((item) => {
|
||||
arr.push(getLabelName({
|
||||
list: fgsCorpInfoList,
|
||||
status: item,
|
||||
idKey: "id",
|
||||
nameKey: "corpName",
|
||||
}));
|
||||
})
|
||||
});
|
||||
}
|
||||
form.setFieldValue("serviceEnterpriseName", arr);
|
||||
},
|
||||
|
|
@ -464,7 +471,7 @@ const StepTwoComponent = forwardRef((props, ref) => {
|
|||
isValidity: record.isValidity,
|
||||
qualificationsTermStart: record.qualificationsTermStart,
|
||||
qualificationsTermEnd: record.qualificationsTermEnd,
|
||||
isRequired:record.isRequired,
|
||||
isRequired: record.isRequired,
|
||||
});
|
||||
setUploadFileModalOpen(true);
|
||||
};
|
||||
|
|
@ -482,7 +489,7 @@ const StepTwoComponent = forwardRef((props, ref) => {
|
|||
|
||||
const validateFileList = (list) => {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if(list[i].isRequired == null || list[i].isRequired === 1) {
|
||||
if (list[i].isRequired == null || list[i].isRequired === 1) {
|
||||
if (!list[i].files || list[i].files.length === 0) {
|
||||
message.error(`请上传${list[i].dataName}的资质`);
|
||||
return false;
|
||||
|
|
@ -492,11 +499,11 @@ const StepTwoComponent = forwardRef((props, ref) => {
|
|||
return true;
|
||||
};
|
||||
|
||||
const onSubmit = async () => {
|
||||
if (!validateQualificationBusiness(props.formValues))
|
||||
const onSubmit = async (saveType) => {
|
||||
if (saveType === 1 && !validateQualificationBusiness(props.formValues))
|
||||
return;
|
||||
|
||||
if (!validateFileList(specialList))
|
||||
if (saveType === 1 && !validateFileList(specialList))
|
||||
return;
|
||||
for (let i = 0; i < specialList.length; i++) {
|
||||
await deleteFile({ single: false, files: specialList[i].deleteFiles });
|
||||
|
|
@ -524,6 +531,7 @@ const StepTwoComponent = forwardRef((props, ref) => {
|
|||
...data,
|
||||
resubmitId,
|
||||
id: query.id,
|
||||
saveType,
|
||||
});
|
||||
if (success) {
|
||||
message.success("提交成功,请等待审核");
|
||||
|
|
@ -561,7 +569,8 @@ const StepTwoComponent = forwardRef((props, ref) => {
|
|||
render: (_, record) => record.qualificationsTermStart ? `${record.qualificationsTermStart}至${record.qualificationsTermEnd}` : "-",
|
||||
},
|
||||
{ title: "是否必填", dataIndex: "isRequired", render: (_, record) => {
|
||||
if (record.isRequired == null) return "必填";
|
||||
if (record.isRequired == null)
|
||||
return "必填";
|
||||
return record.isRequired ? "必填" : "非必填";
|
||||
} },
|
||||
{
|
||||
|
|
@ -648,7 +657,7 @@ const FileUpload = (props) => {
|
|||
{
|
||||
name: "files",
|
||||
label: "资质",
|
||||
required:props.data.isRequired,
|
||||
required: props.data.isRequired,
|
||||
render: (
|
||||
<Upload
|
||||
fileType="image"
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ function List(props) {
|
|||
// { title: "备注", dataIndex: "remarks" },
|
||||
{ title: "审核状态", dataIndex: "status", render: (_, record) => (
|
||||
<>
|
||||
{record.status === 100 && `暂存`}
|
||||
{record.status === 200 && `${record.auditProcess === 100 ? "集团单位" : "审核部门"}审核中`}
|
||||
{record.status === 300 && `${record.auditProcess === 100 ? "集团单位" : "审核部门"}已驳回`}
|
||||
{record.status === 400 && "已通过"}
|
||||
|
|
@ -90,7 +91,7 @@ function List(props) {
|
|||
{props.permission("zrzz-xgf-zrzzsq-btn-xg") && (
|
||||
<Button
|
||||
type="link"
|
||||
disabled={record.status !== 300}
|
||||
disabled={![100, 300].includes(record.status)}
|
||||
onClick={() => {
|
||||
props.history.push(`./add?id=${record.id}`);
|
||||
}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue