7.6 保存校验专家照片是否上传

This commit is contained in:
jl-zhoujl2
2023-07-06 13:36:40 +08:00
parent 48b39daad1
commit dce6a1514c
3 changed files with 38 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import React, { useEffect, useState } from "react";
import './judgList.less';
import '@/assets/xsy_style.less';
import { saveAssistPeople } from "./service";
import { isEmpty } from "@/utils/CommonUtils";
interface OutsourcingManageProps {
modalVisible: boolean,
@ -124,6 +125,17 @@ const OutsourcingManage: React.FC<OutsourcingManageProps> = (props) => {
// }}
onOk={() => {
if (Number(assistNumber) == dataSource.length) {
let count = 0
for (let i = 0, length = dataSource.length; i < length; i++) {
const item = dataSource[i];
if (isEmpty(item.faceId)) {
count += 1;
}
}
if (count > 0) {
message.error(`请上传专家照片`);
return;
}
const params = {
juryId,
assistList: [...dataSource],

View File

@ -4,7 +4,7 @@ import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
import { getList, getSecs, saveGroup, delOne, saveMember, changeEx, queryVoList, changeMember, applyFor, roomStatus, juryTem, rePassWord, getUserPhoto, unlockAccount } from './service';
import moment from 'moment';
import { getDefId, getProId, getProMethod, getSessionProjectData, getSessionUserData } from '@/utils/session';
import { getURLInformation } from '@/utils/CommonUtils';
import { getURLInformation, isEmpty } from '@/utils/CommonUtils';
import './judgList.less';
import '@/assets/xsy_style.less';
import FileDown from '@/utils/Download';
@ -1824,6 +1824,18 @@ const JudgingPanel: React.FC<{}> = () => {
// qita != undefined && qita.extractNumber==qita.juryMemberList.length ? params.push(...qita.juryMemberList) : null;
if (chackNum) {
let count = 0
for (let i = 0, length = params.length; i < length; i++) {
const item = params[i];
if (isEmpty(item.faceId)) {
count += 1;
}
}
if (count > 0) {
message.error(`请上传专家照片`);
loadingSet(false);
return;
}
const success = await saveMember({ juryMemberDTOList: params }).then((res) => {
return res.success
});

View File

@ -17,6 +17,7 @@ import { getUserPhoto, unlockAccount } from '@/pages/Tender/ProjectManager/Judgi
import BidEvalAppointment from '@/components/ElecBidEvaluation/BidEvalAppointment';
import OutsourcingManage from '@/pages/Tender/ProjectManager/JudgingPanel/List/OutsourcingManage';
import { dateTimeFormatter } from '@/utils/DateUtils';
import { isEmpty } from '@/utils/CommonUtils';
const JudgingPanel: React.FC<{}> = (props: any) => {
const modalHeight = window.innerHeight * 96 / 100;
@ -1692,6 +1693,18 @@ const JudgingPanel: React.FC<{}> = (props: any) => {
// qita != undefined && qita.extractNumber==qita.juryMemberList.length ? params.push(...qita.juryMemberList) : null;
if (chackNum) {
let count = 0
for (let i = 0, length = params.length; i < length; i++) {
const item = params[i];
if (isEmpty(item.faceId)) {
count += 1;
}
}
if (count > 0) {
message.error(`请上传专家照片`);
loadingSet(false);
return;
}
const success = await saveMember({ juryMemberDTOList: params, roomId: roomId }).then((res) => {
return res.success
});