xiaodai2022 2 年之前
父節點
當前提交
8041c72e0c

文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/0.js


+ 14 - 2
src/views/sellOut/zixunOrder/components/addEditGoodModal.vue

@@ -364,9 +364,10 @@
                       <div class="activity-upload" v-else>
                         <div class="btnupload" style="position: relative">
                           <i class="el-icon-plus avatar-uploader-icon"></i>
+
                           <file-upload-pdf
                             class="Upload"
-                            :accept="'.zip,.rar,.7z'"
+                            :accept="'.zip,.rar,.7z,.doc,.docx,.xlsx,.xls,.pdf'"
                             :multiple="false"
                             :uploadcondition="beforeOtherUpload"
                             @UploadErrorEvent="UploadErrorOtherenclosure_file"
@@ -378,6 +379,7 @@
                         <div class="txt-tips fl">
                           <p>建议大小:小于5MB</p>
                           <p>文件格式:.zip,.rar,.7z</p>
+                          <p>.doc,.docx,.xlsx,.xls,.pdf</p>
                         </div>
                       </div>
                     </el-form-item>
@@ -853,8 +855,18 @@ export default {
 
     //判断其他文件规格
     beforeOtherUpload(file) {
+      console.log(file.type);
       let isJPG = false;
-      if (file.type === "application/x-zip-compressed") {
+      if (
+        file.type === "application/msword" ||
+        file.type ===
+          "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ||
+        file.type === "application/vnd.ms-excel" ||
+        file.type ===
+          "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
+        file.type === "application/pdf" ||
+        file.type === "application/x-zip-compressed"
+      ) {
         isJPG = true;
       }
       let name = file.name;

+ 12 - 2
src/views/sellOut/zixunOrder/components/editForm.vue

@@ -584,7 +584,7 @@
                           <i class="el-icon-plus avatar-uploader-icon"></i>
                           <file-upload-pdf
                             class="Upload"
-                            :accept="'.zip,.rar,.7z'"
+                            :accept="'.zip,.rar,.7z,.doc,.docx,.xlsx,.xls,.pdf'"
                             :multiple="false"
                             :uploadcondition="beforeOtherUpload"
                             @UploadErrorEvent="UploadErrorOtherenclosure_file"
@@ -596,6 +596,7 @@
                         <div class="txt-tips fl">
                           <p>建议大小:小于5MB</p>
                           <p>文件格式:.zip,.rar,.7z</p>
+                          <p>.doc,.docx,.xlsx,.xls,.pdf</p>
                         </div>
                       </div>
                     </el-form-item>
@@ -1292,7 +1293,16 @@ export default {
     //判断其他文件规格
     beforeOtherUpload(file) {
       let isJPG = false;
-      if (file.type === "application/x-zip-compressed") {
+      if (
+        file.type === "application/msword" ||
+        file.type ===
+          "application/vnd.openxmlformats-officedocument.wordprocessingml.document" ||
+        file.type === "application/vnd.ms-excel" ||
+        file.type ===
+          "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
+        file.type === "application/pdf" ||
+        file.type === "application/x-zip-compressed"
+      ) {
         isJPG = true;
       }
       let name = file.name;

部分文件因文件數量過多而無法顯示