Bläddra i källkod

Merge branch 'mergeBranch' into orangeUrgent

qymljy 2 år sedan
förälder
incheckning
03a000d79f

+ 1 - 1
src/HDrpManagement/accountsReceivableMag/modules/detailInfo.vue

@@ -11,7 +11,7 @@
         >
       <div class="drawer__panel" style="margin-bottom: 0 !important;">
         <exportFile style="margin-bottom: 20px" :param="param" :columns="param.content.querytype == '0'?tablecolsSaler:tablecolsCustomer" :fileName="param.content.querytype == '0'?'业务员逾期订单明细':'客户逾期订单明细'" :dataid="param.content.dataid"></exportFile>
-        <tableNewLayout :layout="param.content.querytype == '0'?tablecolsSaler:tablecolsCustomer"  height="calc(100vh - 207px)" :data="list" fixedName="operation" :width="true" :custom="true">
+        <tableNewLayout :layout="param.content.querytype == '0'?tablecolsSaler:tablecolsCustomer"  height="calc(100vh - 165px)" :data="list" fixedName="operation" :width="true" :custom="true">
           <template v-slot:customcol="scope">
             <div v-if="scope.column.columnname === 'overdueamount'">
               <span><small>¥</small>{{tool.formatAmount(scope.column.data[scope.column.columnname],2)}}</span>

+ 3 - 3
src/HDrpManagement/collectionRule/index.vue

@@ -4,7 +4,7 @@
     <normalLayout  @onRefresh="inputChange">
       <div slot="titleRight">
         <Add class="inline-16" v-if="tool.checkAuth($route.name,'insert')" @onSuccess="listData()"/>
-        <excel class="inline-16" :tablecols="layout" :param="params" :total="total" :excelTitle="$route.meta.title"></excel>
+       <exportFile :param="params" fileName="收款条件设置"></exportFile>
       </div>
       <div slot="content">
         <div class="normal-card">
@@ -44,7 +44,7 @@
 <script>
 import Table from './modules/table'
 import Add from './components/add'
-import excel from './modules/excel'
+import exportFile from '@/components/export_file/index6'
 import {mapGetters} from "vuex";
 export default {
   data () {
@@ -77,7 +77,7 @@ export default {
       ]
     }
   },
-  components:{Table,Add,excel},
+  components:{Table,Add,exportFile},
   created () {
     this.listData()
   },

+ 1 - 1
src/HDrpManagement/collectionRule/modules/excel.vue

@@ -88,4 +88,4 @@ export default {
 
 </script>
 <style>
-</style>
+</style>

+ 1 - 1
src/SDrpManagement/accountsReceivable/modules/detailInfo.vue

@@ -11,7 +11,7 @@
         >
       <div class="drawer__panel" style="margin-bottom: 0 !important;">
         <exportFile style="margin-bottom: 20px" :param="param" :columns="param.content.querytype == '0'?tablecolsSaler:tablecolsCustomer" :fileName="param.content.querytype == '0'?'业务员逾期订单明细':'客户逾期订单明细'" :dataid="param.content.dataid"></exportFile>
-        <tableNewLayout :layout="param.content.querytype == '0'?tablecolsSaler:tablecolsCustomer"  height="calc(100vh - 207px)" :data="list" fixedName="operation" :width="true" :custom="true">
+        <tableNewLayout :layout="param.content.querytype == '0'?tablecolsSaler:tablecolsCustomer"  height="calc(100vh - 165px)" :data="list" fixedName="operation" :width="true" :custom="true">
           <template v-slot:customcol="scope">
             <div v-if="scope.column.columnname === 'overdueamount'">
               <span><small>¥</small>{{tool.formatAmount(scope.column.data[scope.column.columnname],2)}}</span>

+ 38 - 0
src/components/export_file/index6.vue

@@ -0,0 +1,38 @@
+<template>
+  <el-button type="primary" size="small" @click="exportData" plain>导 出</el-button>
+</template>
+
+<script>
+export default {
+  props:['param','type','columns','columnsIndex','fileName','dataid'],
+  data(){
+    return{
+      columnsData:[]
+    }
+  },
+  methods:{
+    async exportData(){
+      this.param.content.isExport = 1
+      /*导出数据*/
+      const res = await this.$api.requested(this.param)
+      this.downFile(res.data,this.fileName)
+      this.param.content.isExport = 0
+    },
+    downFile(url, fileName) {
+      const x = new XMLHttpRequest()
+      x.open('GET', url, true)
+      x.responseType = 'blob'
+      x.onload = function() {
+        const url = window.URL.createObjectURL(x.response)
+        const a = document.createElement('a')
+        a.href = url
+        a.download = fileName
+        a.click()
+      }
+      x.send()
+    }
+  }
+}
+</script>
+<style>
+</style>