ly hai 1 ano
pai
achega
3301d868f7

+ 4 - 4
src/views/business/deduction/fileDialog.vue

@@ -12,9 +12,9 @@
             </div>
         </template>
         <div class="dialog-list-container">
-            <img style="height: 148px; width: 148px" :src="`${baseUrl}/${form}`" class="avatar"
-                @click="openEvidience('form')" />
-            <!-- <el-table ref="dbTable" :data="list" size="small" border header-row-class-name="list-header-row"
+            <!-- <img style="height: 148px; width: 148px" :src="`${baseUrl}/${form}`" class="avatar"
+                @click="openEvidience('form')" /> -->
+            <el-table ref="dbTable" :data="list" size="small" border header-row-class-name="list-header-row"
                 row-class-name="list-row" @selection-change="handleSelectionChange">
                 <el-table-column type="selection" width="40" align="center" />
                 <el-table-column type="index" label="序号" width="46" align="center" />
@@ -25,7 +25,7 @@
                             }}</el-button>
                     </template>
                 </el-table-column>
-            </el-table> -->
+            </el-table>
 
 
 

+ 21 - 6
src/views/business/deduction/index.vue

@@ -151,7 +151,7 @@
           </el-col>
           <el-col :span="24">
             <el-form-item label="凭证附件:" required>
-              <dragUpload :accept="accept" style="width:100%" @file="upload"
+              <!-- <dragUpload :accept="accept" style="width:100%" @file="upload"
                 v-if="form.files == null || form.files == ''" />
               <img v-else style="height: 148px; width: 148px" :src="`${baseUrl}/${form.files[0].fileUrl}`"
                 class="avatar" @click="openEvidience('files[0]')" />
@@ -160,8 +160,8 @@
                   @click="form.files = []" class="delete-button">
                   <Delete />
                 </el-icon>
-              </div>
-              <!-- <div class="details-btns-container" style="display: flex">
+              </div> -->
+              <div class="details-btns-container" style="display: flex">
                 <el-upload action="#" :http-request="upload" :with-credentials="true" :show-file-list="false" multiple>
                   <el-button size="small" type="primary" icon="Upload">点击上传</el-button>
                 </el-upload>
@@ -181,7 +181,7 @@
                     <el-button link size="small" type="danger" @click="handleDelFile(scope.$index)">删除</el-button>
                   </template>
                 </el-table-column>
-              </el-table> -->
+              </el-table>
             </el-form-item>
           </el-col>
         </el-row>
@@ -519,9 +519,25 @@
     });
   }
 
+  // function upload(param) {
+  //   const formData = new FormData();
+  //   formData.append("file", param);
+  //   uploadFile(formData).then((res) => {
+  //     if (res.code === 200) {
+  //       const file = {};
+  //       file.fileName = res.newFileName;
+  //       file.url = res.url;
+  //       file.originalFileName = res.originalFilename;
+  //       file.fileUrl = res.fileName;
+  //       file.masterId = form.value.id;
+  //       file.masterTableName = "biz_deduction";
+  //       form.value.files.push(file);
+  //     }
+  //   });
+  // }
   function upload(param) {
     const formData = new FormData();
-    formData.append("file", param);
+    formData.append("file", param.file);
     uploadFile(formData).then((res) => {
       if (res.code === 200) {
         const file = {};
@@ -535,7 +551,6 @@
       }
     });
   }
-
   function openFollowFile(arg) {
     // console.log(arg)
     const attach = arg;