瀏覽代碼

销售数据,出货未开票分析,明细导出暂存

qymljy 2 月之前
父節點
當前提交
f664cc129a
共有 2 個文件被更改,包括 65 次插入2 次删除
  1. 46 0
      src/components/export_file/index7.vue
  2. 19 2
      src/views/salesData/modules/shippingUninvoiceAnalysis.vue

+ 46 - 0
src/components/export_file/index7.vue

@@ -0,0 +1,46 @@
+<template>
+  <div>
+    <el-button type="primary" size="small" @click="exportData" plain>{{$t(btnTitle)}}</el-button>
+  </div>
+</template>
+
+<script>
+export default {
+  props: ["btnTitle","param", "type", "columns", "columnsIndex", "fileName", "dataid","oldParam"],
+  data() {
+    return {
+      columnsData: [],
+    };
+  },
+  methods: {
+    async exportData() {
+      if (this.oldParam){
+        this.param.content.type = this.oldParam.content.type
+        this.param.content.dataid = this.oldParam.content.dataid
+        this.param.content.where.uninvicetype = this.oldParam.content.where.uninvicetype
+        this.param.content.where.isleave = this.oldParam.content.where.isleave
+      }
+      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>

+ 19 - 2
src/views/salesData/modules/shippingUninvoiceAnalysis.vue

@@ -17,6 +17,9 @@
               <el-option :label="$t('离职')" value="2"></el-option>
             </el-select>
           </div>
+<!--          <div class="inline-15 mt-10">-->
+<!--            <exportFileInfo  :param="exportParam" :oldParam="param"  fileName="出货未开票分析明细" btnTitle="导出明细"></exportFileInfo>-->
+<!--          </div>-->
           <div class="inline-15 mt-10">
             <exportFile  :param="param" :columns="tablecols" fileName="出货未开票分析" :dataid="param.content.dataid"></exportFile>
           </div>
@@ -91,11 +94,12 @@ import tableTemplate from '@/views/salesData/components/table';
 import shippingUninvoiceDetail from "@/views/salesData/components/shippingUninvoiceDetail";
 import fullScreen from "@/views/salesData/components/fullScreen";
 import exportFile from '@/components/export_file/index'
+import exportFileInfo from '@/components/export_file/index7'
 import {Bar} from "@antv/g2plot";
 export default {
   name: "shippingUninvoiceAnalysis",
   props:['scrollHeight','windowWidth'],
-  components:{tableTemplate,departmentSalesperson,shippingUninvoiceDetail,fullScreen,exportFile},
+  components:{tableTemplate,departmentSalesperson,shippingUninvoiceDetail,fullScreen,exportFile,exportFileInfo},
   data(){
     return {
       chartBar:null,
@@ -121,7 +125,20 @@ export default {
       heightChart:'98%',
       heightTable:'403px',
       height:'356px',
-      isFull:false
+      isFull:false,
+      exportParam:{
+        "id": 2025033114030502,
+        "content": {
+          "type": 1,
+          "dataid": 58,
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "uninvicetype": "",
+            "isleave": "1"
+          }
+        },
+      }
     }
   },
   methods:{