修改 项目确认 生成重点作业 取值问题

dev
853931625@qq.com 2026-07-02 17:16:19 +08:00
parent 63dfcaeae8
commit 2c37ff1840
4 changed files with 29 additions and 6 deletions

View File

@ -30,8 +30,9 @@ module.exports = {
// 应用Key // 应用Key
appKey: "", appKey: "",
// fileUrl: "https://jpfz.qhdsafety.com/gbsFileTest/", // fileUrl: "https://jpfz.qhdsafety.com/gbsFileTest/",
// fileUrl: "http://192.168.20.240:9787/mnt/", // fileUrl: "https://skqhdg.porthebei.com:9004/file/uploadFiles2/",
fileUrl: "https://skqhdg.porthebei.com:9004/file/uploadFiles2/", fileUrl: "",
}, },
// public/index.html注入全局变量 // public/index.html注入全局变量
windowInject: { windowInject: {

View File

@ -107,3 +107,7 @@ export const keyProjectAdd = declareRequest(
"qualificationStatisticsLoading", "qualificationStatisticsLoading",
"Post > @/keyProject/keyProject/save", "Post > @/keyProject/keyProject/save",
); );
export const userListAll = declareRequest(
"qualificationStatisticsLoading",
"Get > /basicInfo/user/listAll",
);

View File

@ -61,7 +61,7 @@ function List(props) {
onClick={() => { onClick={() => {
props.history.push(`./reView?id=${record.id}&projectStatusLast=2`); props.history.push(`./reView?id=${record.id}&projectStatusLast=2`);
}} }}
disabled={record.projectStatus === 2 && record.currentUserCanAudit === 2} // disabled={record.projectStatus === 2 && record.currentUserCanAudit === 2}
> >
{record.projectStatus === 2 ? "确认" : "查看"} {record.projectStatus === 2 ? "确认" : "查看"}
</Button> </Button>

View File

@ -84,6 +84,7 @@ function Review(props) {
const [keyProjectModalOpen, setKeyProjectModalOpen] = useState(false); const [keyProjectModalOpen, setKeyProjectModalOpen] = useState(false);
const [keyProjectSubmitting, setKeyProjectSubmitting] = useState(false); const [keyProjectSubmitting, setKeyProjectSubmitting] = useState(false);
const [auditPassParams, setAuditPassParams] = useState({}); const [auditPassParams, setAuditPassParams] = useState({});
const [xgfDirectorData, setXgfDirectorData] = useState({});
const { uploadFile, loading: uploadFileLoading } = useUploadFile(); const { uploadFile, loading: uploadFileLoading } = useUploadFile();
const { getUserInfo } = useGetUserInfo(); const { getUserInfo } = useGetUserInfo();
const [userInfo, setUserInfo] = useState({}); const [userInfo, setUserInfo] = useState({});
@ -135,6 +136,20 @@ function Review(props) {
useEffect(() => { useEffect(() => {
getCurrentUserInfo(); getCurrentUserInfo();
}, []); }, []);
const getXgfMasterUserFun = (id, userId) => {
props.userListAll({ corpinfoId: id }).then((res) => {
const list = Array.isArray(res?.data) ? res.data : [];
list.forEach((item) => {
item.bianma = item.id;
item.name = item.userName || item.name;
if ( item.id === userId) {
setXgfDirectorData(item)
}
});
});
};
const getData = async (id = query.id) => { const getData = async (id = query.id) => {
const projectDetailResult = await props["projectDetail"]({ id }); const projectDetailResult = await props["projectDetail"]({ id });
if (!projectDetailResult || !projectDetailResult.data) { if (!projectDetailResult || !projectDetailResult.data) {
@ -172,6 +187,8 @@ function Review(props) {
else { else {
projectData.corpInfo = null; projectData.corpInfo = null;
} }
getXgfMasterUserFun(projectData.corpinfoId, projectData.userId);
setInfo(projectData); setInfo(projectData);
}; };
@ -231,6 +248,7 @@ function Review(props) {
} }
const values = keyProjectForm.getFieldsValue(true); const values = keyProjectForm.getFieldsValue(true);
setKeyProjectSubmitting(true); setKeyProjectSubmitting(true);
try { try {
if (values.projectWorkFlag === 1) { if (values.projectWorkFlag === 1) {
@ -265,9 +283,9 @@ 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.updateId, xgfMasterUserId: xgfDirectorData.id,
xgfMasterPhone: info.corpInfo && info.corpInfo.lrMobile, xgfMasterPhone: xgfDirectorData.phone,
createSource:2,
keyProjectId: agreementFileUuid, keyProjectId: agreementFileUuid,
applyStatus: 1, applyStatus: 1,
}; };