Browse Source

‘个贷模板认领实收款’

wucl 1 year ago
parent
commit
5b72da93d7
2 changed files with 21 additions and 24 deletions
  1. 6 0
      src/components/excelImport.vue
  2. 15 24
      src/views/finance/fundList.vue

+ 6 - 0
src/components/excelImport.vue

@@ -83,7 +83,13 @@
         type:String,
         required:false,
         default:"146x146"
+      },
+      buttonType:{
+        type:String,
+        required:false,
+        default:"primary"
       }
+
     },
     watch: {
       'uploadConfig.loading'(val) {

+ 15 - 24
src/views/finance/fundList.vue

@@ -342,9 +342,18 @@
               </el-button>
               <el-button class="filter-item" style="float: left;" round type="info" @click="downloadTemp()">下载模板
               </el-button>
-              <el-button class="filter-item" style="float: left;" round type="danger" @click="uploadTemp()">模板认领
-              </el-button>
-              <input type="file" ref="fileInput" style="display: none" @change="handleFileChange" />
+              <!-- <el-button class="filter-item" style="float: left;" round type="danger" @click="uploadTemp()">模板认领
+              </el-button> -->
+                <excelImport
+                style="float: left; margin-left: 10px; "
+                  ref="uploadControl" buttonType="danger"
+                  :limit="1"
+                  :flag="'financeClaim/personal/temp/upload/'+financeFundId"
+                  :style-type="2"
+                  title="模板认领"
+                  @fath="getList"
+                />
+              <!-- <input type="file" ref="fileInput" style="display: none" @change="handleFileChange" /> -->
             </template>
             <parentTable  :data="myPersonalPageData.records" slot="table" style="width: 100%;" :selectionChange="handleSelectionChange">
               <el-table-column
@@ -498,13 +507,15 @@
 <script>
 import YPageListLayout from '@/components/YPageListLayout'
 import Breadcrumb from '@/components/Breadcrumb'
+import excelImport from "@/components/excelImport.vue";
 
 
 export default {
   name: 'financeRealFund',
   components: {
     Breadcrumb,
-    YPageListLayout
+    YPageListLayout,
+    excelImport
   },
 
   watch:{
@@ -894,26 +905,6 @@ export default {
     downloadTemp(){
       window.location.href  = "/api/financeClaim/personal/claim/template"
     },
-    uploadTemp(){
-      this.$refs.fileInput.click(); 
-    },
-    handleFileChange(event){
-      const file = event.target.files[0]; // 获取选中的文件
-      if (file) {
-        // 处理文件
-       this.$api.financeClaim.uploadPersonalTemp(file).then(res => {
-          if (res.code ===200 && res.data) {
-            this.$notify({
-                    title: '成功',
-                    message: '模板认领成功',
-                    type: 'success',
-                    duration: 2000
-                  });
-                this.getMyPersonalOrder();
-          }
-        })
-      }
-    }
   },
   
 }