diff --git a/jjb.config.js b/jjb.config.js index e8953a4..c574148 100644 --- a/jjb.config.js +++ b/jjb.config.js @@ -20,7 +20,7 @@ module.exports = { // 应用后端分支名称,部署上线需要 javaGitBranch: "", // 接口服务地址 - API_HOST: "https://gbs-gateway.qhdsafety.com", + API_HOST: "", }, }, // 应用唯一标识符 @@ -29,8 +29,9 @@ module.exports = { contextInject: { // 应用Key appKey: "", - fileUrl: "https://jpfz.qhdsafety.com/gbsFileTest/", + // fileUrl: "https://jpfz.qhdsafety.com/gbsFileTest/", // fileUrl: "http://192.168.20.240:9787/mnt/", + fileUrl: "https://skqhdg.porthebei.com:9004/file/uploadFiles2/", }, // public/index.html注入全局变量 windowInject: { diff --git a/src/pages/Container/BranchCompany/Qualification/Apply/Add/index.js b/src/pages/Container/BranchCompany/Qualification/Apply/Add/index.js index b7baa40..029e31e 100644 --- a/src/pages/Container/BranchCompany/Qualification/Apply/Add/index.js +++ b/src/pages/Container/BranchCompany/Qualification/Apply/Add/index.js @@ -19,6 +19,19 @@ import useUploadFile from "zy-react-library/hooks/useUploadFile"; import { getLabelName, validatorEndTime, validatorTimeGECurrentDay } from "zy-react-library/utils"; 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) { const query = useGetUrlQuery(); const [form] = Form.useForm(); @@ -33,6 +46,11 @@ function Add(props) { const getData = async () => { 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(",") + // 重新提交时,删除id if (query.resubmit) { delete data.id; @@ -122,6 +140,8 @@ const StepOneComponent = (props) => { const getQualificationsListAll = async () => { const { data } = await props["qualificationsListAll"]({ qualificationsTypeId, stakeholderLevel, status: 0 }); + + setQualificationsListAll(data); }; @@ -161,6 +181,9 @@ const StepOneComponent = (props) => { form={form} loading={props.qualificationApply.qualificationApplyLoading} onFinish={(values) => { + if (!validateQualificationBusiness(values)) + return; + props.setCurrentStep(2); props.setFormValues(values); }} @@ -278,10 +301,12 @@ const StepOneComponent = (props) => { items: qualificationsListAll, itemsField: { labelKey: "qualificationsName", valueKey: "id" }, }, + { name: "maintain", label: "维修、保养", hidden:qualificationsTypeId !=="sbl", + required:false, render: ( { name: "detection", label: "检测", hidden:qualificationsTypeId !=="sbl", + required:false, render: ( { { name: "otherHighRisk", label: "其它高风险业务", + required:false, hidden:qualificationsTypeId !=="sbl", render: ( { }; const onSubmit = async () => { + if (!validateQualificationBusiness(props.formValues)) + return; + if (!validateFileList(specialList)) return; for (let i = 0; i < specialList.length; i++) { diff --git a/src/pages/Container/BranchCompany/Qualification/Apply/View/index.js b/src/pages/Container/BranchCompany/Qualification/Apply/View/index.js index 828420c..f341b7b 100644 --- a/src/pages/Container/BranchCompany/Qualification/Apply/View/index.js +++ b/src/pages/Container/BranchCompany/Qualification/Apply/View/index.js @@ -73,9 +73,9 @@ function View(props) { ...( info.qualificationsTypeId === "sbl" ? [ - {label: "维修、保养", children: info.maintainName && info.maintainName.join(" , ")}, - {label: "检测", children: info.detectionName && info.detectionName.join(" , ")}, - {label: "其它高风险业务", children: info.otherHighRiskName && info.otherHighRiskName.join(" , "), span: 2}, + {label: "维修、保养", children: info.maintainName && info.maintainName}, + {label: "检测", children: info.detectionName && info.detectionName}, + {label: "其它高风险业务", children: info.otherHighRiskName && info.otherHighRiskName, span: 2}, ] : [] ), { label: "备注", children: info.remarks }, diff --git a/src/pages/Container/BranchCompany/Qualification/ExpertProjectReviewRecord/List/index.js b/src/pages/Container/BranchCompany/Qualification/ExpertProjectReviewRecord/List/index.js index 8f5d6d1..cc89072 100644 --- a/src/pages/Container/BranchCompany/Qualification/ExpertProjectReviewRecord/List/index.js +++ b/src/pages/Container/BranchCompany/Qualification/ExpertProjectReviewRecord/List/index.js @@ -1,16 +1,19 @@ import { WarningOutlined } from "@ant-design/icons"; import { Permission } from "@cqsjjb/jjb-common-decorator/permission"; import { Connect } from "@cqsjjb/jjb-dva-runtime"; -import { Button, Form, Space, Tooltip } from "antd"; +import {Button, Descriptions, Form, Modal, Space, Tooltip} from "antd"; import Page from "zy-react-library/components/Page"; import Search from "zy-react-library/components/Search"; import DictionarySelect from "zy-react-library/components/Select/Dictionary"; import Table from "zy-react-library/components/Table"; import useTable from "zy-react-library/hooks/useTable"; -import { NS_QUALIFICATION_RECORDS } from "~/enumerate/namespace"; +import {NS_QUALIFICATION_APPLY, NS_QUALIFICATION_RECORDS} from "~/enumerate/namespace"; +import {useState} from "react"; function List(props) { const [form] = Form.useForm(); + const [rejectReasonModalOpen, setRejectReasonModalOpen] = useState(false); + const [rejectReason, setRejectReason] = useState(false); const { tableProps, getData } = useTable(props["qualificationRecordsList"], { form, transform: (formData) => { @@ -21,7 +24,11 @@ function List(props) { }; }, }); - + const onViewRejectReason = async (id) => { + const { data } = await props["qualificationApplyRejectReason"]({ id }); + setRejectReason(data); + setRejectReasonModalOpen(true); + }; return ( ( - + { + props.permission("fgs-bwtshjl-ck") && + ( + + ) + } + ), }, ]} {...tableProps} /> + {rejectReasonModalOpen && setRejectReasonModalOpen(false)} />} ); } - -export default Connect([NS_QUALIFICATION_RECORDS], true)(Permission(List)); +const RejectReason = (props) => { + return ( + 关闭, + ]} + > + + + ); +}; +export default Connect([NS_QUALIFICATION_RECORDS,NS_QUALIFICATION_APPLY], true)(Permission(List)); diff --git a/src/pages/Container/BranchCompany/Qualification/Records/List/index.js b/src/pages/Container/BranchCompany/Qualification/Records/List/index.js index 82f9b21..d4fac5c 100644 --- a/src/pages/Container/BranchCompany/Qualification/Records/List/index.js +++ b/src/pages/Container/BranchCompany/Qualification/Records/List/index.js @@ -21,6 +21,7 @@ function List(props) { return { auditProcess: auditStatus[0], auditStatus: 400, + status: 400 }; }, onSuccess: (data) => { @@ -140,6 +141,7 @@ function List(props) { 查看 )} + ), }, diff --git a/src/pages/Container/Local/Qualification/Review/Review/index.js b/src/pages/Container/Local/Qualification/Review/Review/index.js index ed55ca9..cc72c14 100644 --- a/src/pages/Container/Local/Qualification/Review/Review/index.js +++ b/src/pages/Container/Local/Qualification/Review/Review/index.js @@ -123,7 +123,7 @@ const PassModalComponent = (props) => { options={[ { name: "isLongTerm", - label: "供应商时效属性", + label: "相关方时效属性", span: 24, render: FORM_ITEM_RENDER_ENUM.RADIO, items: [{ bianma: 1, name: "长期" }, { bianma: 0, name: "短期" }], diff --git a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView/index.js b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView/index.js index ccd72bb..4041b7c 100644 --- a/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView/index.js +++ b/src/pages/Container/Stakeholder/ProjectReview/ProjectFilingApplication/ReView/index.js @@ -322,7 +322,7 @@ function Review(props) { { label: "注册资金(万元)", children: info.corpInfo?.regcapital }, { label: "企业类型", children: getLabelName({ list: typeList, status: info.corpInfo?.type }) }, { label: "营业执照", children: }, - { label: "营业执照有效期", children: info.corpInfo?.licenseStart ? `${info.corpInfo?.licenseStart}-${info.corpInfo?.licenseEnd}` : "-" }, + // { label: "营业执照有效期", children: info.corpInfo?.licenseStart ? `${info.corpInfo?.licenseStart}-${info.corpInfo?.licenseEnd}` : "-" }, ]} /> diff --git a/src/pages/Container/Supervision/Qualification/Records/List/index.js b/src/pages/Container/Supervision/Qualification/Records/List/index.js index 2ccee52..88694a0 100644 --- a/src/pages/Container/Supervision/Qualification/Records/List/index.js +++ b/src/pages/Container/Supervision/Qualification/Records/List/index.js @@ -1,16 +1,19 @@ import { WarningOutlined } from "@ant-design/icons"; import { Permission } from "@cqsjjb/jjb-common-decorator/permission"; import { Connect } from "@cqsjjb/jjb-dva-runtime"; -import { Button, Form, Space, Tooltip } from "antd"; +import {Button, Descriptions, Form, Modal, Space, Tooltip} from "antd"; import Page from "zy-react-library/components/Page"; import Search from "zy-react-library/components/Search"; import DictionarySelect from "zy-react-library/components/Select/Dictionary"; import Table from "zy-react-library/components/Table"; import useTable from "zy-react-library/hooks/useTable"; -import { NS_QUALIFICATION_RECORDS } from "~/enumerate/namespace"; +import {NS_QUALIFICATION_APPLY, NS_QUALIFICATION_RECORDS} from "~/enumerate/namespace"; +import {useState} from "react"; function List(props) { const [form] = Form.useForm(); + const [rejectReasonModalOpen, setRejectReasonModalOpen] = useState(false); + const [rejectReason, setRejectReason] = useState(false); const { tableProps, getData } = useTable(props["qualificationRecordsList"], { form, transform: (formData) => { @@ -21,7 +24,11 @@ function List(props) { }; }, }); - + const onViewRejectReason = async (id) => { + const { data } = await props["qualificationApplyRejectReason"]({ id }); + setRejectReason(data); + setRejectReasonModalOpen(true); + }; return ( ( {props.permission("zrzz-jgd-zrzzjl-btn-ck") && ( @@ -126,14 +133,49 @@ function List(props) { 查看 )} + ), }, ]} {...tableProps} /> + {rejectReasonModalOpen && setRejectReasonModalOpen(false)} />} + ); } +const RejectReason = (props) => { + return ( + 关闭, + ]} + > + + + ); +}; -export default Connect([NS_QUALIFICATION_RECORDS], true)(Permission(List)); +export default Connect([NS_QUALIFICATION_RECORDS,NS_QUALIFICATION_APPLY], true)(Permission(List)); diff --git a/src/pages/Container/Supervision/Qualification/Review/Review/index.js b/src/pages/Container/Supervision/Qualification/Review/Review/index.js index 8504ce5..9d7d31d 100644 --- a/src/pages/Container/Supervision/Qualification/Review/Review/index.js +++ b/src/pages/Container/Supervision/Qualification/Review/Review/index.js @@ -137,7 +137,7 @@ const PassModalComponent = (props) => { options={[ { name: "isLongTerm", - label: "供应商时效属性", + label: "相关方时效属性", span: 24, render: FORM_ITEM_RENDER_ENUM.RADIO, items: [{ bianma: 1, name: "长期" }, { bianma: 0, name: "短期" }], diff --git a/src/pages/Container/Supervision/Qualification/ViewInfo/index.js b/src/pages/Container/Supervision/Qualification/ViewInfo/index.js index 67cd787..fd1eb0a 100644 --- a/src/pages/Container/Supervision/Qualification/ViewInfo/index.js +++ b/src/pages/Container/Supervision/Qualification/ViewInfo/index.js @@ -95,9 +95,9 @@ function ViewInfo(props) { ...( info.qualificationsTypeId === "sbl" ? [ - {label: "维修、保养", children: info.maintainName && info.maintainName.join(" , ")}, - {label: "检测", children: info.detectionName && info.detectionName.join(" , ")}, - {label: "其它高风险业务", children: info.otherHighRiskName && info.otherHighRiskName.join(" , "), span: 2}, + {label: "维修、保养", children: info.maintainName && info.maintainName}, + {label: "检测", children: info.detectionName && info.detectionName}, + {label: "其它高风险业务", children: info.otherHighRiskName && info.otherHighRiskName, span: 2}, ] : [] ), @@ -175,7 +175,7 @@ function ViewInfo(props) { children: getLabelName({ status: corpInfoData.type, list: ENTERPRISE_TYPE }), }, { label: "营业执照", children: }, - { label: "营业执照有效期", children: corpInfoData.licenseStart ? `${corpInfoData.licenseStart} 至 ${corpInfoData.licenseEnd}` : "" }, + // { label: "营业执照有效期", children: corpInfoData.licenseStart ? `${corpInfoData.licenseStart} 至 ${corpInfoData.licenseEnd}` : "" }, ]} />