修改 bug 项目申请添加 服务企业字段
parent
2584cb5653
commit
63dfcaeae8
|
|
@ -3,6 +3,10 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||||
export const corpInfoList = declareRequest(
|
export const corpInfoList = declareRequest(
|
||||||
`Post > @/basicInfo/corpInfo/list`,
|
`Post > @/basicInfo/corpInfo/list`,
|
||||||
);
|
);
|
||||||
|
export const corpInfoListAll = declareRequest(
|
||||||
|
"domainGroupLoading",
|
||||||
|
"Get > /basicInfo/corpInfo/listAll",
|
||||||
|
);
|
||||||
export const qualificationsListAll = declareRequest(
|
export const qualificationsListAll = declareRequest(
|
||||||
`Post > @/xgfManager/qualifications/listAll`,
|
`Post > @/xgfManager/qualifications/listAll`,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,10 @@ import { declareRequest } from "@cqsjjb/jjb-dva-runtime";
|
||||||
export const corpInfoList = declareRequest(
|
export const corpInfoList = declareRequest(
|
||||||
`Post > @/basicInfo/corpInfo/list`,
|
`Post > @/basicInfo/corpInfo/list`,
|
||||||
);
|
);
|
||||||
|
export const corpInfoListAll = declareRequest(
|
||||||
|
"domainGroupLoading",
|
||||||
|
"Get > /basicInfo/corpInfo/listAll",
|
||||||
|
);
|
||||||
export const qualificationStatistics = declareRequest(
|
export const qualificationStatistics = declareRequest(
|
||||||
"qualificationStatisticsLoading",
|
"qualificationStatisticsLoading",
|
||||||
`Get > /xgfManager/qualificationsApply/statistics`,
|
`Get > /xgfManager/qualificationsApply/statistics`,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ const validateQualificationBusiness = (values) => {
|
||||||
if (values.qualificationsTypeId !== "sbl")
|
if (values.qualificationsTypeId !== "sbl")
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if ([values.maintain, values.detection, values.otherHighRiskName].some(hasSelectedValue))
|
if ([values.maintain, values.detection, values.otherHighRisk].some(hasSelectedValue))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
message.error("“维修、保养”“检测”“其它高风险业务”,至少选择一项。");
|
message.error("“维修、保养”“检测”“其它高风险业务”,至少选择一项。");
|
||||||
|
|
@ -46,14 +46,14 @@ 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.maintain = data.maintain && data.maintain.split(",")
|
||||||
data.detection = data.detection && data.detection.split(",")
|
data.detection = data.detection && data.detection.split(",")
|
||||||
data.otherHighRisk = data.otherHighRisk && data.otherHighRisk.split(",")
|
data.otherHighRisk = data.otherHighRisk && data.otherHighRisk.split(",")
|
||||||
|
data.serviceEnterprise = data.serviceEnterprise && data.serviceEnterprise.split(",")
|
||||||
data.detectionName = data.detectionName && data.detectionName.split(",")
|
data.detectionName = data.detectionName && data.detectionName.split(",")
|
||||||
data.maintainName = data.maintainName && data.maintainName.split(",")
|
data.maintainName = data.maintainName && data.maintainName.split(",")
|
||||||
data.otherHighRiskName = data.otherHighRiskName && data.otherHighRiskName.split(",")
|
data.otherHighRiskName = data.otherHighRiskName && data.otherHighRiskName.split(",")
|
||||||
|
data.serviceEnterpriseName = data.serviceEnterpriseName && data.serviceEnterpriseName.split(",")
|
||||||
// 重新提交时,删除id
|
// 重新提交时,删除id
|
||||||
if (query.resubmit) {
|
if (query.resubmit) {
|
||||||
delete data.id;
|
delete data.id;
|
||||||
|
|
@ -66,9 +66,6 @@ function Add(props) {
|
||||||
setSpecialList(data.specialList);
|
setSpecialList(data.specialList);
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(()=>{
|
|
||||||
console.log(qualificationsTypeId);
|
|
||||||
},[qualificationsTypeId])
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
query.id && getData();
|
query.id && getData();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
@ -139,6 +136,7 @@ const StepOneComponent = (props) => {
|
||||||
// const [corpTypeList, setCorpTypeList] = useState([2]);
|
// const [corpTypeList, setCorpTypeList] = useState([2]);
|
||||||
|
|
||||||
const [corpInfoList, setCorpInfoList] = useState([]);
|
const [corpInfoList, setCorpInfoList] = useState([]);
|
||||||
|
const [fgsCorpInfoList, setFgsCorpInfoList] = useState([]);
|
||||||
const [qualificationsListAll, setQualificationsListAll] = useState([]);
|
const [qualificationsListAll, setQualificationsListAll] = useState([]);
|
||||||
|
|
||||||
const getQualificationsListAll = async () => {
|
const getQualificationsListAll = async () => {
|
||||||
|
|
@ -152,9 +150,15 @@ const StepOneComponent = (props) => {
|
||||||
const { data } = await props["corpInfoList"]({ pageIndex: 1, pageSize: 1000, eqType: type || 1, exCludeSelf: exCludeSelf ?? 1 });
|
const { data } = await props["corpInfoList"]({ pageIndex: 1, pageSize: 1000, eqType: type || 1, exCludeSelf: exCludeSelf ?? 1 });
|
||||||
setCorpInfoList(data);
|
setCorpInfoList(data);
|
||||||
};
|
};
|
||||||
|
const getFgscorpFun = async () => {
|
||||||
|
const { data } = await props["corpInfoListAll"]({inType:[0,6]});
|
||||||
|
setFgsCorpInfoList(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getCorpInfoList(1, 0);
|
getCorpInfoList(1, 0);
|
||||||
|
getFgscorpFun()
|
||||||
|
|
||||||
form.setFieldsValue(props.formValues);
|
form.setFieldsValue(props.formValues);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
@ -356,6 +360,32 @@ const StepOneComponent = (props) => {
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{ name: "otherHighRiskName", label: "其它高风险业务名称", onlyForLabel: true },
|
{ name: "otherHighRiskName", label: "其它高风险业务名称", onlyForLabel: true },
|
||||||
|
{
|
||||||
|
name: "serviceEnterprise",
|
||||||
|
label: "服务企业(多选)",
|
||||||
|
hidden:qualificationsTypeId !=="sbl",
|
||||||
|
items: fgsCorpInfoList,
|
||||||
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
|
itemsField: { valueKey: "id", labelKey: "corpName" },
|
||||||
|
componentProps: {
|
||||||
|
mode:"multiple",
|
||||||
|
onChange: (event) => {
|
||||||
|
const arr = []
|
||||||
|
if(event.length >0){
|
||||||
|
event.forEach(item => {
|
||||||
|
arr.push(getLabelName({
|
||||||
|
list: fgsCorpInfoList,
|
||||||
|
status: item,
|
||||||
|
idKey: "id",
|
||||||
|
nameKey: "corpName",
|
||||||
|
}));
|
||||||
|
})
|
||||||
|
}
|
||||||
|
form.setFieldValue("serviceEnterpriseName", arr);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ name: "serviceEnterpriseName", label: "服务企业名称", onlyForLabel: true },
|
||||||
{ name: "remarks", label: "备注", required: false, span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
|
{ name: "remarks", label: "备注", required: false, span: 24, render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,9 @@ function View(props) {
|
||||||
info.qualificationsTypeId === "sbl" ? [
|
info.qualificationsTypeId === "sbl" ? [
|
||||||
{label: "维修、保养", children: info.maintainName && info.maintainName},
|
{label: "维修、保养", children: info.maintainName && info.maintainName},
|
||||||
{label: "检测", children: info.detectionName && info.detectionName},
|
{label: "检测", children: info.detectionName && info.detectionName},
|
||||||
{label: "其它高风险业务", children: info.otherHighRiskName && info.otherHighRiskName, span: 2},
|
{label: "其它高风险业务", children: info.otherHighRiskName && info.otherHighRiskName, },
|
||||||
|
{label: "服务企业", children: info.serviceEnterpriseName && info.serviceEnterpriseName, },
|
||||||
|
|
||||||
] : []
|
] : []
|
||||||
),
|
),
|
||||||
{ label: "备注", children: info.remarks },
|
{ label: "备注", children: info.remarks },
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ function Add(props) {
|
||||||
}
|
}
|
||||||
setProjectFileAddCmdList(data.projectFileAddCmdList);
|
setProjectFileAddCmdList(data.projectFileAddCmdList);
|
||||||
setUsercontentAddCmdList(projectUserAddCmdList);
|
setUsercontentAddCmdList(projectUserAddCmdList);
|
||||||
console.log(projectUserAddCmdList);
|
|
||||||
setProjectLocalCompanyAddCmdList(data.projectLocalCompanyAddCmdList);
|
setProjectLocalCompanyAddCmdList(data.projectLocalCompanyAddCmdList);
|
||||||
setProjectApprovalUserAddCmdList(data.projectApprovalUserAddCmdList);
|
setProjectApprovalUserAddCmdList(data.projectApprovalUserAddCmdList);
|
||||||
setProjectApprovalFlowAddCmdList(data.projectApprovalFlowAddCmdList);
|
setProjectApprovalFlowAddCmdList(data.projectApprovalFlowAddCmdList);
|
||||||
|
|
@ -298,7 +298,6 @@ const StepOneComponent = (props) => {
|
||||||
isNeedDepartmentId={false}
|
isNeedDepartmentId={false}
|
||||||
onGetLabel={(label) => {
|
onGetLabel={(label) => {
|
||||||
form.setFieldValue("userName", label);
|
form.setFieldValue("userName", label);
|
||||||
console.log(label);
|
|
||||||
}}
|
}}
|
||||||
onGetOption={(option) => {
|
onGetOption={(option) => {
|
||||||
if (option) {
|
if (option) {
|
||||||
|
|
@ -699,7 +698,6 @@ const StepTwoComponent = forwardRef((props, ref) => {
|
||||||
const projectApprovalUserAddCmdList = props.projectApprovalUserAddCmdList || []; // 项目审核人员
|
const projectApprovalUserAddCmdList = props.projectApprovalUserAddCmdList || []; // 项目审核人员
|
||||||
const projectApprovalFlowAddCmdList = props.projectApprovalFlowAddCmdList || []; // 项目审核流程
|
const projectApprovalFlowAddCmdList = props.projectApprovalFlowAddCmdList || []; // 项目审核流程
|
||||||
const corpinfoId = props.corpinfoId; // 公司id
|
const corpinfoId = props.corpinfoId; // 公司id
|
||||||
console.log(usercontentList);
|
|
||||||
const [uploadFileModalOpen, setUploadFileModalOpen] = useState(false); // 上传文件弹窗显示
|
const [uploadFileModalOpen, setUploadFileModalOpen] = useState(false); // 上传文件弹窗显示
|
||||||
const [usercontentOpen, setUsercontentOpen] = useState(false); // 选择项目审核人员弹窗显示
|
const [usercontentOpen, setUsercontentOpen] = useState(false); // 选择项目审核人员弹窗显示
|
||||||
const [uploadFileModalData, setUploadFileModalData] = useState({ // 上传文件弹窗数据
|
const [uploadFileModalData, setUploadFileModalData] = useState({ // 上传文件弹窗数据
|
||||||
|
|
|
||||||
|
|
@ -203,6 +203,7 @@ function Review(props) {
|
||||||
};
|
};
|
||||||
|
|
||||||
const openKeyProjectModal = (params = {}) => {
|
const openKeyProjectModal = (params = {}) => {
|
||||||
|
|
||||||
setAuditPassParams(params);
|
setAuditPassParams(params);
|
||||||
keyProjectForm.resetFields();
|
keyProjectForm.resetFields();
|
||||||
keyProjectForm.setFieldsValue({
|
keyProjectForm.setFieldsValue({
|
||||||
|
|
@ -214,7 +215,7 @@ function Review(props) {
|
||||||
jurisdictionCorpinfoId: userInfo.corpinfoId,
|
jurisdictionCorpinfoId: userInfo.corpinfoId,
|
||||||
jurisdictionDepartmentId: userInfo.departmentId,
|
jurisdictionDepartmentId: userInfo.departmentId,
|
||||||
xgfCorpinfoId: info.corpInfo && info.corpInfo.id,
|
xgfCorpinfoId: info.corpInfo && info.corpInfo.id,
|
||||||
xgfMasterUserId: info.corpInfo && info.corpInfo.accountContactId,
|
xgfMasterUserId: info.corpInfo && info.corpInfo.updateId,
|
||||||
xgfMasterPhone: info.corpInfo && info.corpInfo.lrMobile,
|
xgfMasterPhone: info.corpInfo && info.corpInfo.lrMobile,
|
||||||
supervisionUnitFlag: 0,
|
supervisionUnitFlag: 0,
|
||||||
});
|
});
|
||||||
|
|
@ -264,7 +265,7 @@ function Review(props) {
|
||||||
jurisdictionCorpinfoId: userInfo.corpinfoId,
|
jurisdictionCorpinfoId: userInfo.corpinfoId,
|
||||||
jurisdictionDepartmentId: userInfo.departmentId,
|
jurisdictionDepartmentId: userInfo.departmentId,
|
||||||
xgfCorpinfoId: info.corpInfo && info.corpInfo.id,
|
xgfCorpinfoId: info.corpInfo && info.corpInfo.id,
|
||||||
xgfMasterUserId: info.corpInfo && info.corpInfo.accountContactId,
|
xgfMasterUserId: info.corpInfo && info.corpInfo.updateId,
|
||||||
xgfMasterPhone: info.corpInfo && info.corpInfo.lrMobile,
|
xgfMasterPhone: info.corpInfo && info.corpInfo.lrMobile,
|
||||||
|
|
||||||
keyProjectId: agreementFileUuid,
|
keyProjectId: agreementFileUuid,
|
||||||
|
|
@ -669,7 +670,7 @@ function Review(props) {
|
||||||
form={keyProjectForm}
|
form={keyProjectForm}
|
||||||
showActionButtons={false}
|
showActionButtons={false}
|
||||||
labelCol={{ span: 8 }}
|
labelCol={{ span: 8 }}
|
||||||
values={{ projectWorkFlag: 1, supervisionUnitFlag: 0 }}
|
values={{ projectWorkFlag: 1, supervisionUnitFlag: 0,masterDepartmentId: userInfo.departmentId }}
|
||||||
onValuesChange={(changedValues) => {
|
onValuesChange={(changedValues) => {
|
||||||
if ("projectWorkFlag" in changedValues) {
|
if ("projectWorkFlag" in changedValues) {
|
||||||
keyProjectForm.setFieldsValue({
|
keyProjectForm.setFieldsValue({
|
||||||
|
|
@ -705,7 +706,7 @@ function Review(props) {
|
||||||
hidden: projectWorkFlag !== 1,
|
hidden: projectWorkFlag !== 1,
|
||||||
render: (
|
render: (
|
||||||
<div style={{ fontSize: 12, color: "red", marginLeft: 96, marginBottom: 16 }}>
|
<div style={{ fontSize: 12, color: "red", marginLeft: 96, marginBottom: 16 }}>
|
||||||
若不创建,可直接进行相关生产作业、进行创城。
|
若不创建,可在重点作业管理栏目中,进行创建。
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -156,9 +156,6 @@ function List(props) {
|
||||||
function AddModalComponent(props) {
|
function AddModalComponent(props) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
console.log(props);
|
|
||||||
},[])
|
|
||||||
const splitYearMonth =(dateStr)=> {
|
const splitYearMonth =(dateStr)=> {
|
||||||
const [year, month] = dateStr.split('-');
|
const [year, month] = dateStr.split('-');
|
||||||
return { year, month };
|
return { year, month };
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@ function UserChange(props) {
|
||||||
|
|
||||||
// 点击新增项目人员
|
// 点击新增项目人员
|
||||||
const OnUsercontentOpen = () => {
|
const OnUsercontentOpen = () => {
|
||||||
console.log(allData.dataSource);
|
|
||||||
// 保存已存在的项目人员数据,用于弹窗回显
|
// 保存已存在的项目人员数据,用于弹窗回显
|
||||||
if (allData.dataSource && Array.isArray(allData.dataSource)) {
|
if (allData.dataSource && Array.isArray(allData.dataSource)) {
|
||||||
setFetchUserList(allData.dataSource.map(item => ({
|
setFetchUserList(allData.dataSource.map(item => ({
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ function Add(props) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(data);
|
|
||||||
form.setFieldsValue({
|
form.setFieldsValue({
|
||||||
...data,
|
...data,
|
||||||
managerUser: data.managerUser.split(","),
|
managerUser: data.managerUser.split(","),
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,8 @@ function ViewInfo(props) {
|
||||||
info.qualificationsTypeId === "sbl" ? [
|
info.qualificationsTypeId === "sbl" ? [
|
||||||
{label: "维修、保养", children: info.maintainName && info.maintainName},
|
{label: "维修、保养", children: info.maintainName && info.maintainName},
|
||||||
{label: "检测", children: info.detectionName && info.detectionName},
|
{label: "检测", children: info.detectionName && info.detectionName},
|
||||||
{label: "其它高风险业务", children: info.otherHighRiskName && info.otherHighRiskName, span: 2},
|
{label: "其它高风险业务", children: info.otherHighRiskName && info.otherHighRiskName},
|
||||||
|
{label: "服务企业", children: info.serviceEnterpriseName && info.serviceEnterpriseName, },
|
||||||
] : []
|
] : []
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue