zlwu před 5 měsíci
rodič
revize
f56e82f9b0

+ 2 - 2
crm/backend/ruoyi-admin/src/main/resources/application.yml

@@ -76,9 +76,9 @@ spring:
   servlet:
   servlet:
     multipart:
     multipart:
       # 单个文件大小
       # 单个文件大小
-      max-file-size: 10MB
+      max-file-size: 500MB
       # 设置总上传的文件大小
       # 设置总上传的文件大小
-      max-request-size: 20MB
+      max-request-size: 1024MB
   mvc:
   mvc:
     # 设置静态资源路径 防止所有请求都去查静态资源
     # 设置静态资源路径 防止所有请求都去查静态资源
     static-path-pattern: /static/**
     static-path-pattern: /static/**

+ 3 - 2
crm/backend/ruoyi-modules/ruoyi-crm/src/main/java/org/dromara/crm/controller/CrmCustomerController.java

@@ -78,8 +78,9 @@ public class CrmCustomerController extends BaseController {
         if (!ok || bo.getId() == null) {
         if (!ok || bo.getId() == null) {
             return R.fail("新增客户失败");
             return R.fail("新增客户失败");
         }
         }
-        // 字符串返回,避免前端 JSON 解析 Long 时超过 Number.MAX_SAFE_INTEGER 丢精度
-        return R.ok(String.valueOf(bo.getId()));
+        // 字符串放入 data,避免前端 JSON 解析 Long 时超过 Number.MAX_SAFE_INTEGER 丢精度
+        // 勿使用 R.ok(String),会与 R.ok(String msg) 重载冲突导致 ID 落到 msg 字段
+        return R.ok("操作成功", String.valueOf(bo.getId()));
     }
     }
 
 
     /**
     /**

+ 0 - 5
crm/backend/ruoyi-modules/ruoyi-crm/src/main/java/org/dromara/crm/controller/CrmPaymentController.java

@@ -198,11 +198,6 @@ public class CrmPaymentController extends BaseController {
                 return R.fail("仅支持PDF、JPG、PNG格式的文件");
                 return R.fail("仅支持PDF、JPG、PNG格式的文件");
             }
             }
 
 
-            // 校验文件大小(不超过5MB)
-            if (file.getSize() > 5 * 1024 * 1024) {
-                return R.fail("文件大小不能超过5MB");
-            }
-
             // 上传文件到OSS
             // 上传文件到OSS
             OssClient ossClient = OssFactory.instance();
             OssClient ossClient = OssFactory.instance();
             String fileName = "payment/voucher/" + System.currentTimeMillis() + extension;
             String fileName = "payment/voucher/" + System.currentTimeMillis() + extension;

+ 2 - 15
crm/backend/ruoyi-modules/ruoyi-crm/src/main/java/org/dromara/crm/service/impl/CrmInvoiceServiceImpl.java

@@ -52,9 +52,6 @@ public class CrmInvoiceServiceImpl implements ICrmInvoiceService {
     private String uploadPath;
     private String uploadPath;
 
 
     private static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd");
     private static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd");
-    private static final long MAX_FILE_SIZE = 10 * 1024 * 1024; // 10MB
-    private static final long MAX_IMAGE_SIZE = 5 * 1024 * 1024; // 5MB
-
     /**
     /**
      * 构建查询条件
      * 构建查询条件
      */
      */
@@ -450,12 +447,7 @@ public class CrmInvoiceServiceImpl implements ICrmInvoiceService {
             throw new ServiceException("只支持PDF格式文件");
             throw new ServiceException("只支持PDF格式文件");
         }
         }
 
 
-        // 4. 校验文件大小(最大10MB)
-        if (file.getSize() > MAX_FILE_SIZE) {
-            throw new ServiceException("文件大小不能超过10MB");
-        }
-
-        // 5. 生成文件名(发票编号_时间戳.pdf)
+        // 4. 生成文件名(发票编号_时间戳.pdf)
         // 将发票编号中的特殊字符替换为下划线,避免文件路径错误
         // 将发票编号中的特殊字符替换为下划线,避免文件路径错误
         String safeInvoiceNo = invoice.getInvoiceNo().replaceAll("[/\\\\:*?\"<>|]", "_");
         String safeInvoiceNo = invoice.getInvoiceNo().replaceAll("[/\\\\:*?\"<>|]", "_");
         String fileName = safeInvoiceNo + "_" + System.currentTimeMillis() + ".pdf";
         String fileName = safeInvoiceNo + "_" + System.currentTimeMillis() + ".pdf";
@@ -495,12 +487,7 @@ public class CrmInvoiceServiceImpl implements ICrmInvoiceService {
             throw new ServiceException("只支持JPG/PNG格式图片");
             throw new ServiceException("只支持JPG/PNG格式图片");
         }
         }
 
 
-        // 4. 校验文件大小(最大5MB)
-        if (file.getSize() > MAX_IMAGE_SIZE) {
-            throw new ServiceException("图片大小不能超过5MB");
-        }
-
-        // 5. 生成文件名(发票编号_时间戳.扩展名)
+        // 4. 生成文件名(发票编号_时间戳.扩展名)
         String extension = lowerFilename.substring(lowerFilename.lastIndexOf("."));
         String extension = lowerFilename.substring(lowerFilename.lastIndexOf("."));
         // 将发票编号中的特殊字符替换为下划线,避免文件路径错误
         // 将发票编号中的特殊字符替换为下划线,避免文件路径错误
         String safeInvoiceNo = invoice.getInvoiceNo().replaceAll("[/\\\\:*?\"<>|]", "_");
         String safeInvoiceNo = invoice.getInvoiceNo().replaceAll("[/\\\\:*?\"<>|]", "_");

+ 4 - 4
crm/web/src/components/FileUpload/index.vue

@@ -22,7 +22,7 @@
     <!-- 上传提示 -->
     <!-- 上传提示 -->
     <div v-if="showTip && !disabled" class="el-upload__tip">
     <div v-if="showTip && !disabled" class="el-upload__tip">
       请上传
       请上传
-      <template v-if="fileSize">
+      <template v-if="fileSize > 0">
         大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
         大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
       </template>
       </template>
       <template v-if="fileType">
       <template v-if="fileType">
@@ -59,8 +59,8 @@ const props = defineProps({
   },
   },
   // 数量限制
   // 数量限制
   limit: propTypes.number.def(5),
   limit: propTypes.number.def(5),
-  // 大小限制(MB)
-  fileSize: propTypes.number.def(5),
+  // 大小限制(MB),0 表示不限制
+  fileSize: propTypes.number.def(0),
   // 文件类型, 例如['png', 'jpg', 'jpeg']
   // 文件类型, 例如['png', 'jpg', 'jpeg']
   fileType: propTypes.array.def(['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'pdf']),
   fileType: propTypes.array.def(['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'pdf']),
   // 是否显示提示
   // 是否显示提示
@@ -200,7 +200,7 @@ const handleBeforeUpload = (file: any) => {
     return false;
     return false;
   }
   }
   // 校检文件大小
   // 校检文件大小
-  if (props.fileSize) {
+  if (props.fileSize > 0) {
     const isLt = file.size / 1024 / 1024 < props.fileSize;
     const isLt = file.size / 1024 / 1024 < props.fileSize;
     if (!isLt) {
     if (!isLt) {
       proxy?.$modal.msgError(`上传文件大小不能超过 ${props.fileSize} MB!`);
       proxy?.$modal.msgError(`上传文件大小不能超过 ${props.fileSize} MB!`);

+ 4 - 4
crm/web/src/components/ImageUpload/index.vue

@@ -25,7 +25,7 @@
     <!-- 上传提示 -->
     <!-- 上传提示 -->
     <div v-if="showTip" class="el-upload__tip">
     <div v-if="showTip" class="el-upload__tip">
       请上传
       请上传
-      <template v-if="fileSize">
+      <template v-if="fileSize > 0">
         大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
         大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
       </template>
       </template>
       <template v-if="fileType">
       <template v-if="fileType">
@@ -69,8 +69,8 @@ const props = defineProps({
   },
   },
   // 图片数量限制
   // 图片数量限制
   limit: propTypes.number.def(15),
   limit: propTypes.number.def(15),
-  // 大小限制(MB)
-  fileSize: propTypes.number.def(10),
+  // 大小限制(MB),0 表示不限制
+  fileSize: propTypes.number.def(0),
   // 文件类型, 例如['png', 'jpg', 'jpeg']
   // 文件类型, 例如['png', 'jpg', 'jpeg']
   fileType: propTypes.array.def(['png', 'jpg', 'jpeg']),
   fileType: propTypes.array.def(['png', 'jpg', 'jpeg']),
   // 是否显示提示
   // 是否显示提示
@@ -447,7 +447,7 @@ const handleBeforeUpload = (file: any) => {
     (proxy as any)?.$modal.msgError('文件名不正确,不能包含英文逗号!');
     (proxy as any)?.$modal.msgError('文件名不正确,不能包含英文逗号!');
     return false;
     return false;
   }
   }
-  if (props.fileSize) {
+  if (props.fileSize > 0) {
     const isLt = file.size / 1024 / 1024 < props.fileSize;
     const isLt = file.size / 1024 / 1024 < props.fileSize;
     if (!isLt) {
     if (!isLt) {
       (proxy as any)?.$modal.msgError(`上传头像图片大小不能超过 ${props.fileSize} MB!`);
       (proxy as any)?.$modal.msgError(`上传头像图片大小不能超过 ${props.fileSize} MB!`);

+ 1 - 8
crm/web/src/views/crm/clue/followForm.vue

@@ -45,7 +45,7 @@
           >
           >
             <template #tip>
             <template #tip>
               <div class="el-upload__tip">
               <div class="el-upload__tip">
-                支持图片、视频、PDF、Word文档等格式,单个文件大小不超过10MB,最多上传15个文件。
+                支持图片、视频、PDF、Word文档等格式,最多上传15个文件。
                 <span class="el-upload__tip" style="color: #ff0000">(文件会立即上传并关联到当前跟进记录)</span>
                 <span class="el-upload__tip" style="color: #ff0000">(文件会立即上传并关联到当前跟进记录)</span>
               </div>
               </div>
             </template>
             </template>
@@ -331,7 +331,6 @@ const getShortFileName = (fileName: string) => {
 /** 上传前检查 */
 /** 上传前检查 */
 const handleBeforeUpload = (file: any) => {
 const handleBeforeUpload = (file: any) => {
   const isValidType = /\.(jpg|jpeg|png|gif|bmp|webp|pdf|doc|docx|txt|mp4|avi|mov)$/i.test(file.name);
   const isValidType = /\.(jpg|jpeg|png|gif|bmp|webp|pdf|doc|docx|txt|mp4|avi|mov)$/i.test(file.name);
-  const isLt10M = file.size / 1024 / 1024 < 10;
 
 
   if (!isValidType) {
   if (!isValidType) {
     if (window.ElMessage) {
     if (window.ElMessage) {
@@ -339,12 +338,6 @@ const handleBeforeUpload = (file: any) => {
     }
     }
     return false;
     return false;
   }
   }
-  if (!isLt10M) {
-    if (window.ElMessage) {
-      window.ElMessage.error('上传文件大小不能超过 10MB!');
-    }
-    return false;
-  }
   return true;
   return true;
 };
 };
 
 

+ 1 - 6
crm/web/src/views/crm/contract/components/UploadDialog.vue

@@ -23,7 +23,7 @@
         accept="image/*,.pdf,.doc,.docx"
         accept="image/*,.pdf,.doc,.docx"
       >
       >
         <template #tip>
         <template #tip>
-          <div class="el-upload__tip">支持图片、PDF、Word文档等格式,单个文件大小不超过10MB,最多上传10个文件。</div>
+          <div class="el-upload__tip">支持图片、PDF、Word文档等格式,最多上传10个文件。</div>
         </template>
         </template>
 
 
         <!-- 调整拖拽上传图标与文字在同一行、居中对齐 -->
         <!-- 调整拖拽上传图标与文字在同一行、居中对齐 -->
@@ -332,16 +332,11 @@ const getShortFileName = (fileName: string) => {
 /** 上传前检查 */
 /** 上传前检查 */
 const handleBeforeUpload = (file: any) => {
 const handleBeforeUpload = (file: any) => {
   const isValidType = /\.(jpg|jpeg|png|gif|bmp|webp|pdf|doc|docx|txt)$/i.test(file.name);
   const isValidType = /\.(jpg|jpeg|png|gif|bmp|webp|pdf|doc|docx|txt)$/i.test(file.name);
-  const isLt10M = file.size / 1024 / 1024 < 10;
 
 
   if (!isValidType) {
   if (!isValidType) {
     proxy?.$modal.msgError('上传文件格式不正确!');
     proxy?.$modal.msgError('上传文件格式不正确!');
     return false;
     return false;
   }
   }
-  if (!isLt10M) {
-    proxy?.$modal.msgError('上传文件大小不能超过 10MB!');
-    return false;
-  }
   return true;
   return true;
 };
 };
 
 

+ 2 - 7
crm/web/src/views/crm/contract/form.vue

@@ -422,7 +422,7 @@
                     >
                     >
                       <el-icon><Plus /></el-icon>
                       <el-icon><Plus /></el-icon>
                     </el-upload>
                     </el-upload>
-                    <div class="text-muted" style="font-size: 11px; margin-top: 4px">支持多张图片,单图建议不超过 5MB</div>
+                    <div class="text-muted" style="font-size: 11px; margin-top: 4px">支持多张图片</div>
                   </template>
                   </template>
                 </el-table-column>
                 </el-table-column>
                 <el-table-column label="操作" width="70" align="center" fixed="right">
                 <el-table-column label="操作" width="70" align="center" fixed="right">
@@ -525,7 +525,7 @@
                   </div>
                   </div>
                 </template>
                 </template>
                 <template #tip>
                 <template #tip>
-                  <div class="el-upload__tip">支持上传图片、PDF、Word文档等,单个文件不超过10MB,最多10个文件</div>
+                  <div class="el-upload__tip">支持上传图片、PDF、Word文档等,最多10个文件</div>
                 </template>
                 </template>
               </el-upload>
               </el-upload>
             </div>
             </div>
@@ -2131,16 +2131,11 @@ const getFileExtension = (fileName: string) => {
 /** 上传前检查 */
 /** 上传前检查 */
 const handleBeforeUpload = (file: any) => {
 const handleBeforeUpload = (file: any) => {
   const isValidType = /\.(jpg|jpeg|png|gif|bmp|webp|pdf|doc|docx|txt|mp4|avi|mov)$/i.test(file.name);
   const isValidType = /\.(jpg|jpeg|png|gif|bmp|webp|pdf|doc|docx|txt|mp4|avi|mov)$/i.test(file.name);
-  const isLt10M = file.size / 1024 / 1024 < 10;
 
 
   if (!isValidType) {
   if (!isValidType) {
     proxy?.$modal.msgError('上传文件格式不正确!');
     proxy?.$modal.msgError('上传文件格式不正确!');
     return false;
     return false;
   }
   }
-  if (!isLt10M) {
-    proxy?.$modal.msgError('上传文件大小不能超过 10MB!');
-    return false;
-  }
   return true;
   return true;
 };
 };
 
 

+ 0 - 3
crm/web/src/views/crm/customer/detail.vue

@@ -58,7 +58,6 @@
                   <ImageUpload
                   <ImageUpload
                     :modelValue="customerInfo.businessLicenseImages"
                     :modelValue="customerInfo.businessLicenseImages"
                     :limit="5"
                     :limit="5"
-                    :file-size="10"
                     :file-type="['jpg', 'jpeg', 'png', 'pdf']"
                     :file-type="['jpg', 'jpeg', 'png', 'pdf']"
                     :disabled="true"
                     :disabled="true"
                     placeholder="暂无营业执照"
                     placeholder="暂无营业执照"
@@ -71,7 +70,6 @@
                   <ImageUpload
                   <ImageUpload
                     :modelValue="customerInfo.businessPermitImages"
                     :modelValue="customerInfo.businessPermitImages"
                     :limit="5"
                     :limit="5"
-                    :file-size="10"
                     :file-type="['jpg', 'jpeg', 'png', 'pdf']"
                     :file-type="['jpg', 'jpeg', 'png', 'pdf']"
                     :disabled="true"
                     :disabled="true"
                     placeholder="暂无经营许可证"
                     placeholder="暂无经营许可证"
@@ -84,7 +82,6 @@
                   <ImageUpload
                   <ImageUpload
                     :modelValue="customerInfo.otherCertImages"
                     :modelValue="customerInfo.otherCertImages"
                     :limit="10"
                     :limit="10"
-                    :file-size="10"
                     :file-type="['jpg', 'jpeg', 'png', 'pdf']"
                     :file-type="['jpg', 'jpeg', 'png', 'pdf']"
                     :disabled="true"
                     :disabled="true"
                     placeholder="暂无其他证件"
                     placeholder="暂无其他证件"

+ 1 - 8
crm/web/src/views/crm/customer/followForm.vue

@@ -54,7 +54,7 @@
           >
           >
             <template #tip>
             <template #tip>
               <div class="el-upload__tip">
               <div class="el-upload__tip">
-                支持图片、视频、PDF、Word文档等格式,单个文件大小不超过10MB,最多上传15个文件。
+                支持图片、视频、PDF、Word文档等格式,最多上传15个文件。
                 <span class="el-upload__tip" style="color: #ff0000">(文件会立即上传并关联到当前跟进记录)</span>
                 <span class="el-upload__tip" style="color: #ff0000">(文件会立即上传并关联到当前跟进记录)</span>
               </div>
               </div>
             </template>
             </template>
@@ -335,7 +335,6 @@ const getShortFileName = (fileName: string) => {
 /** 上传前检查 */
 /** 上传前检查 */
 const handleBeforeUpload = (file: any) => {
 const handleBeforeUpload = (file: any) => {
   const isValidType = /\.(jpg|jpeg|png|gif|bmp|webp|pdf|doc|docx|txt|mp4|avi|mov)$/i.test(file.name);
   const isValidType = /\.(jpg|jpeg|png|gif|bmp|webp|pdf|doc|docx|txt|mp4|avi|mov)$/i.test(file.name);
-  const isLt10M = file.size / 1024 / 1024 < 10;
 
 
   if (!isValidType) {
   if (!isValidType) {
     if (window.ElMessage) {
     if (window.ElMessage) {
@@ -343,12 +342,6 @@ const handleBeforeUpload = (file: any) => {
     }
     }
     return false;
     return false;
   }
   }
-  if (!isLt10M) {
-    if (window.ElMessage) {
-      window.ElMessage.error('上传文件大小不能超过 10MB!');
-    }
-    return false;
-  }
   return true;
   return true;
 };
 };
 
 

+ 14 - 5
crm/web/src/views/crm/customer/form.vue

@@ -142,7 +142,6 @@
             <ImageUpload
             <ImageUpload
               v-model="form.businessLicenseImages"
               v-model="form.businessLicenseImages"
               :limit="5"
               :limit="5"
-              :file-size="10"
               :file-type="['jpg', 'jpeg', 'png', 'pdf']"
               :file-type="['jpg', 'jpeg', 'png', 'pdf']"
               :isShowTip="false"
               :isShowTip="false"
               placeholder="请上传营业执照图片或PDF"
               placeholder="请上传营业执照图片或PDF"
@@ -156,7 +155,6 @@
             <ImageUpload
             <ImageUpload
               v-model="form.businessPermitImages"
               v-model="form.businessPermitImages"
               :limit="5"
               :limit="5"
-              :file-size="10"
               :file-type="['jpg', 'jpeg', 'png', 'pdf']"
               :file-type="['jpg', 'jpeg', 'png', 'pdf']"
               :isShowTip="false"
               :isShowTip="false"
               placeholder="请上传经营许可证图片或PDF"
               placeholder="请上传经营许可证图片或PDF"
@@ -170,7 +168,6 @@
             <ImageUpload
             <ImageUpload
               v-model="form.otherCertImages"
               v-model="form.otherCertImages"
               :limit="10"
               :limit="10"
-              :file-size="10"
               :file-type="['jpg', 'jpeg', 'png', 'pdf']"
               :file-type="['jpg', 'jpeg', 'png', 'pdf']"
               placeholder="请上传其他相关证件图片或PDF"
               placeholder="请上传其他相关证件图片或PDF"
             />
             />
@@ -346,6 +343,18 @@ function isInvoiceBlockFilled(): boolean {
   });
   });
 }
 }
 
 
+/** 解析新增客户接口返回的客户 ID(data 优先;兼容旧版误将 ID 放在 msg) */
+function resolveNewCustomerId(res: { data?: string | number | null; msg?: string }): string | null {
+  const { data, msg } = res;
+  if (data != null && String(data).trim() !== '') {
+    return String(data);
+  }
+  if (msg != null && /^\d+$/.test(String(msg).trim())) {
+    return String(msg).trim();
+  }
+  return null;
+}
+
 function buildInvoicePayload(customerId: number | string): InvoiceInfoForm {
 function buildInvoicePayload(customerId: number | string): InvoiceInfoForm {
   const f = invoiceForm.value;
   const f = invoiceForm.value;
   // 必须字符串提交:JS Number 无法安全表示雪花 Long,JSON 会变成错误数值
   // 必须字符串提交:JS Number 无法安全表示雪花 Long,JSON 会变成错误数值
@@ -501,9 +510,9 @@ const submitForm = () => {
         proxy?.$modal.msgSuccess('修改成功');
         proxy?.$modal.msgSuccess('修改成功');
       } else {
       } else {
         const res = await addCustomer(form.value);
         const res = await addCustomer(form.value);
-        const newId = (res as { data?: string | number }).data;
+        const newId = resolveNewCustomerId(res as { data?: string | number | null; msg?: string });
         if (newId != null && isInvoiceBlockFilled()) {
         if (newId != null && isInvoiceBlockFilled()) {
-          await syncInvoiceAfterCustomerSave(String(newId));
+          await syncInvoiceAfterCustomerSave(newId);
         }
         }
         proxy?.$modal.msgSuccess('新增成功');
         proxy?.$modal.msgSuccess('新增成功');
       }
       }

+ 2 - 12
crm/web/src/views/crm/invoice/index.vue

@@ -429,7 +429,7 @@
                 >
                 >
                   <el-button size="small" type="primary" icon="Upload">上传PDF</el-button>
                   <el-button size="small" type="primary" icon="Upload">上传PDF</el-button>
                   <template #tip>
                   <template #tip>
-                    <div class="el-upload__tip">只能上传PDF文件,且不超过10MB</div>
+                    <div class="el-upload__tip">只能上传PDF文件</div>
                   </template>
                   </template>
                 </el-upload>
                 </el-upload>
                 <div v-if="form.invoiceFile" class="file-preview">
                 <div v-if="form.invoiceFile" class="file-preview">
@@ -456,7 +456,7 @@
                 >
                 >
                   <el-icon><Plus /></el-icon>
                   <el-icon><Plus /></el-icon>
                   <template #tip>
                   <template #tip>
-                    <div class="el-upload__tip">只能上传JPG/PNG格式,且不超过5MB</div>
+                    <div class="el-upload__tip">只能上传JPG/PNG格式</div>
                   </template>
                   </template>
                 </el-upload>
                 </el-upload>
                 <div v-if="form.invoiceImage" class="image-preview">
                 <div v-if="form.invoiceImage" class="image-preview">
@@ -1133,32 +1133,22 @@ const handlePaymentChange = (paymentId: number) => {
 /** 文件上传前校验 */
 /** 文件上传前校验 */
 const beforeUploadFile = (file: File): boolean => {
 const beforeUploadFile = (file: File): boolean => {
   const isPDF = file.type === 'application/pdf';
   const isPDF = file.type === 'application/pdf';
-  const isLt10M = file.size / 1024 / 1024 < 10;
 
 
   if (!isPDF) {
   if (!isPDF) {
     proxy?.$modal.msgError('只能上传PDF文件!');
     proxy?.$modal.msgError('只能上传PDF文件!');
     return false;
     return false;
   }
   }
-  if (!isLt10M) {
-    proxy?.$modal.msgError('文件大小不能超过10MB!');
-    return false;
-  }
   return true;
   return true;
 };
 };
 
 
 /** 图片上传前校验 */
 /** 图片上传前校验 */
 const beforeUploadImage = (file: File): boolean => {
 const beforeUploadImage = (file: File): boolean => {
   const isImage = ['image/jpeg', 'image/png', 'image/jpg'].includes(file.type);
   const isImage = ['image/jpeg', 'image/png', 'image/jpg'].includes(file.type);
-  const isLt5M = file.size / 1024 / 1024 < 5;
 
 
   if (!isImage) {
   if (!isImage) {
     proxy?.$modal.msgError('只能上传JPG/PNG格式的图片!');
     proxy?.$modal.msgError('只能上传JPG/PNG格式的图片!');
     return false;
     return false;
   }
   }
-  if (!isLt5M) {
-    proxy?.$modal.msgError('图片大小不能超过5MB!');
-    return false;
-  }
   return true;
   return true;
 };
 };
 
 

+ 1 - 6
crm/web/src/views/crm/opportunity/components/FollowDialog.vue

@@ -82,7 +82,7 @@
           >
           >
             <template #tip>
             <template #tip>
               <div class="el-upload__tip">
               <div class="el-upload__tip">
-                支持图片、视频、PDF、Word文档等格式,单个文件大小不超过10MB,最多上传15个文件。
+                支持图片、视频、PDF、Word文档等格式,最多上传15个文件。
                 <span class="el-upload__tip" style="color: #ff0000">(文件会立即上传并关联到当前跟进记录)</span>
                 <span class="el-upload__tip" style="color: #ff0000">(文件会立即上传并关联到当前跟进记录)</span>
               </div>
               </div>
             </template>
             </template>
@@ -411,16 +411,11 @@ const getShortFileName = (fileName: string) => {
 /** 上传前检查 */
 /** 上传前检查 */
 const handleBeforeUpload = (file: any) => {
 const handleBeforeUpload = (file: any) => {
   const isValidType = /\.(jpg|jpeg|png|gif|bmp|webp|pdf|doc|docx|txt|mp4|avi|mov)$/i.test(file.name);
   const isValidType = /\.(jpg|jpeg|png|gif|bmp|webp|pdf|doc|docx|txt|mp4|avi|mov)$/i.test(file.name);
-  const isLt10M = file.size / 1024 / 1024 < 10;
 
 
   if (!isValidType) {
   if (!isValidType) {
     ElMessage.error('上传文件格式不正确!');
     ElMessage.error('上传文件格式不正确!');
     return false;
     return false;
   }
   }
-  if (!isLt10M) {
-    ElMessage.error('上传文件大小不能超过 10MB!');
-    return false;
-  }
   return true;
   return true;
 };
 };
 
 

+ 1 - 6
crm/web/src/views/crm/payment/index.vue

@@ -285,7 +285,7 @@
           >
           >
             <el-button type="primary" icon="Upload">上传凭证</el-button>
             <el-button type="primary" icon="Upload">上传凭证</el-button>
             <template #tip>
             <template #tip>
-              <div class="el-upload__tip">支持PDF、JPG、PNG格式,单个文件不超过10MB,最多3个文件</div>
+              <div class="el-upload__tip">支持PDF、JPG、PNG格式,最多3个文件</div>
             </template>
             </template>
           </el-upload>
           </el-upload>
         </el-form-item>
         </el-form-item>
@@ -561,16 +561,11 @@ const handleFileRemove = (file: any, uploadFileList: any[]) => {
 /** 上传前校验 */
 /** 上传前校验 */
 const beforeUpload = (file: any) => {
 const beforeUpload = (file: any) => {
   const isValidType = ['application/pdf', 'image/jpeg', 'image/jpg', 'image/png'].includes(file.type);
   const isValidType = ['application/pdf', 'image/jpeg', 'image/jpg', 'image/png'].includes(file.type);
-  const isLt10M = file.size / 1024 / 1024 < 10;
 
 
   if (!isValidType) {
   if (!isValidType) {
     proxy?.$modal.msgError('只能上传 PDF/JPG/PNG 格式的文件!');
     proxy?.$modal.msgError('只能上传 PDF/JPG/PNG 格式的文件!');
     return false;
     return false;
   }
   }
-  if (!isLt10M) {
-    proxy?.$modal.msgError('上传文件大小不能超过 10MB!');
-    return false;
-  }
   return true;
   return true;
 };
 };
 
 

+ 2 - 7
crm/web/src/views/crm/product/index.vue

@@ -283,7 +283,7 @@
           <el-input v-model="form.description" type="textarea" :rows="4" placeholder="请输入产品描述" />
           <el-input v-model="form.description" type="textarea" :rows="4" placeholder="请输入产品描述" />
         </el-form-item>
         </el-form-item>
         <el-form-item label="产品图片" prop="images">
         <el-form-item label="产品图片" prop="images">
-          <ImageUpload v-model="form.images" :limit="5" :file-size="5" />
+          <ImageUpload v-model="form.images" :limit="5" />
         </el-form-item> -->
         </el-form-item> -->
         <!-- <el-form-item label="备注" prop="remark">
         <!-- <el-form-item label="备注" prop="remark">
           <el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
           <el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
@@ -361,7 +361,7 @@
               <el-button size="small" type="primary">选择文件</el-button>
               <el-button size="small" type="primary">选择文件</el-button>
             </template>
             </template>
             <template v-slot:tip>
             <template v-slot:tip>
-              <div class="el-upload__tip">只能上传.xlsx/.xls文件,且不超过10MB</div>
+              <div class="el-upload__tip">只能上传.xlsx/.xls文件</div>
             </template>
             </template>
           </el-upload>
           </el-upload>
         </el-form-item>
         </el-form-item>
@@ -695,11 +695,6 @@ const handleBeforeImport = (file: File) => {
     proxy?.$modal.msgError('请选择Excel文件');
     proxy?.$modal.msgError('请选择Excel文件');
     return false;
     return false;
   }
   }
-  const isLt10M = file.size / 1024 / 1024 < 10;
-  if (!isLt10M) {
-    proxy?.$modal.msgError('文件大小不能超过10MB');
-    return false;
-  }
   return true;
   return true;
 };
 };
 
 

+ 1 - 6
crm/web/src/views/crm/quote/form.vue

@@ -269,7 +269,7 @@
               >
               >
                 <template #tip>
                 <template #tip>
                   <div class="el-upload__tip">
                   <div class="el-upload__tip">
-                    支持图片、视频、PDF、Word文档等格式,单个文件大小不超过10MB,最多上传15个文件。
+                    支持图片、视频、PDF、Word文档等格式,最多上传15个文件。
                     <span class="el-upload__tip" style="color: #ff0000">(文件会立即上传)</span>
                     <span class="el-upload__tip" style="color: #ff0000">(文件会立即上传)</span>
                   </div>
                   </div>
                 </template>
                 </template>
@@ -1158,16 +1158,11 @@ const getShortFileName = (fileName: string) => {
 /** 上传前检查 */
 /** 上传前检查 */
 const handleBeforeUpload = (file: any) => {
 const handleBeforeUpload = (file: any) => {
   const isValidType = /\.(jpg|jpeg|png|gif|bmp|webp|pdf|doc|docx|txt|mp4|avi|mov)$/i.test(file.name);
   const isValidType = /\.(jpg|jpeg|png|gif|bmp|webp|pdf|doc|docx|txt|mp4|avi|mov)$/i.test(file.name);
-  const isLt10M = file.size / 1024 / 1024 < 10;
 
 
   if (!isValidType) {
   if (!isValidType) {
     proxy?.$modal.msgError('上传文件格式不正确!');
     proxy?.$modal.msgError('上传文件格式不正确!');
     return false;
     return false;
   }
   }
-  if (!isLt10M) {
-    proxy?.$modal.msgError('上传文件大小不能超过 10MB!');
-    return false;
-  }
   return true;
   return true;
 };
 };
 
 

+ 1 - 2
crm/web/src/views/crm/visit/components/VisitForm.vue

@@ -225,12 +225,11 @@
       <file-upload
       <file-upload
         v-model="form.attachments"
         v-model="form.attachments"
         :limit="10"
         :limit="10"
-        :fileSize="50"
         :fileType="['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'pdf', 'txt', 'jpg', 'jpeg', 'png', 'gif', 'mp3', 'mp4', 'avi']"
         :fileType="['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'pdf', 'txt', 'jpg', 'jpeg', 'png', 'gif', 'mp3', 'mp4', 'avi']"
       />
       />
       <div class="el-upload__tip">
       <div class="el-upload__tip">
         <i class="el-icon-info"></i>
         <i class="el-icon-info"></i>
-        支持上传图片、文档、音频、视频等格式,单个文件最大50MB,最多10个文件
+        支持上传图片、文档、音频、视频等格式,最多10个文件
       </div>
       </div>
     </el-form-item>
     </el-form-item>