dev_1.2
tangjie 2026-07-31 09:52:32 +08:00
parent b9936cf368
commit eeb34c722a
3 changed files with 22 additions and 1 deletions

View File

@ -99,6 +99,12 @@ const ContractContent = ({ readOnly, ...props }) => {
try { try {
const values = await form.validateFields(); const values = await form.validateFields();
const { contractStartDate, contractEndDate, ...rest } = values; const { contractStartDate, contractEndDate, ...rest } = values;
// 检查是否有文件正在上传中
const fileList = rest.scanFileUrl || [];
if (fileList.some((f) => f.status === "uploading")) {
message.warning("文件上传中,请稍后再保存");
return;
}
const res = await evalContractSave({ const res = await evalContractSave({
...rest, ...rest,
projectId, projectId,

View File

@ -90,6 +90,12 @@ const RiskAnalysisContent = ({ readOnly, ...props }) => {
const values = await form.validateFields(); const values = await form.validateFields();
const { analysisDate, ...rest } = values; const { analysisDate, ...rest } = values;
// 检查是否有文件正在上传中
const fileList = rest.riskFileUrl || [];
if (fileList.some((f) => f.status === "uploading")) {
message.warning("文件上传中,请稍后再保存");
return;
}
// if (!rest.participants?.length) { // if (!rest.participants?.length) {
// message.warning("请选择风险分析人员"); // message.warning("请选择风险分析人员");
// return; // return;

View File

@ -21,7 +21,7 @@ const STAGES = [
const downloadTemplate = async () => { const downloadTemplate = async () => {
try { try {
const res = await fetch("https://test-dragon-yf-pub.oss-cn-hangzhou.aliyuncs.com/jjb/6a6726510dc57d9450a911be.docx"); const res = await fetch("https://test-dragon-yf-pub.oss-cn-hangzhou.aliyuncs.com/jjb/6a6bff3ee4b021a75404adfb.docx");
const blob = await res.blob(); const blob = await res.blob();
const url = URL.createObjectURL(blob); const url = URL.createObjectURL(blob);
const a = document.createElement("a"); const a = document.createElement("a");
@ -263,6 +263,15 @@ const SurveyContent = ({ readOnly, ...props }) => {
const handleSave = async () => { const handleSave = async () => {
const values = form.getFieldsValue(); const values = form.getFieldsValue();
// 检查是否有文件正在上传中
const hasUploading = STAGES.some((s) => {
const fileList = values[s.key] || [];
return fileList.some((f) => f.status === "uploading");
});
if (hasUploading) {
message.warning("文件上传中,请稍后再保存");
return;
}
const payload = []; const payload = [];
for (const s of STAGES) { for (const s of STAGES) {
const fileList = values[s.key] || []; const fileList = values[s.key] || [];