Browse Source

销售数据,出货未开票分析、财务回款分析,增加【导出明细】功能

qymljy 2 months ago
parent
commit
6f7ccd1e7b

+ 17 - 5
src/components/export_file/index7.vue

@@ -14,16 +14,28 @@ export default {
   },
   methods: {
     async exportData() {
+      let rs = [];
       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.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 = this.oldParam.content
       }
+      this.columnsData = JSON.parse(JSON.stringify(this.columns));
+      if (this.columnsData) {
+        this.columns.filter((p) => {
+          rs.push({
+            fieldlabel: p.title,
+            fieldname: p.columnname,
+          });
+        });
+      }
+      this.param.content.exportFields = rs;
       this.param.content.isExport = 1;
       /*导出数据*/
       const res = await this.$api.requested(this.param);
-      this.downFile(res.data, this.fileName);
+      this.downFile(res.data[0].url, this.fileName);
       this.param.content.isExport = 0;
     },
     downFile(url, fileName) {

+ 20 - 2
src/views/salesData/modules/financialCollectionAnalysis.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" :columns="tool.tabelCol(this.$route.name).financialCollectioDetailTable.tablecols" fileName="财务回款分析明细" btnTitle="导出明细"></exportFileInfo>
+          </div>
           <div class="inline-15 mt-10">
             <exportFile  :param="tableParam" :columns="tablecols" fileName="财务回款分析" :dataid="tableParam.content.dataid"></exportFile>
           </div>
@@ -77,6 +80,7 @@ import financialCollectionDetail from "@/views/salesData/components/financialCol
 import fullScreen from "@/views/salesData/components/fullScreen";
 import tableTemplate from '@/views/salesData/components/table';
 import exportFile from '@/components/export_file/index'
+import exportFileInfo from '@/components/export_file/index7'
 import {Bar, G2} from "@antv/g2plot";
 const G = G2.getEngine('canvas');
 export default {
@@ -87,7 +91,8 @@ export default {
     tableTemplate,
     financialCollectionDetail,
     fullScreen,
-    exportFile
+    exportFile,
+    exportFileInfo
   },
   data(){
     return {
@@ -124,7 +129,20 @@ export default {
       heightChart:'98%',
       heightTable:'403px',
       height:'356px',
-      isFull:false
+      isFull:false,
+      exportParam:{
+        "id": 2025033114042802,
+        "content": {
+          "type": 1,
+          "dataid": 58,
+          "unwriteoffamounttype": "订单",
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "isleave": "1"
+          }
+        },
+      }
     }
   },
   methods:{

+ 4 - 4
src/views/salesData/modules/shippingUninvoiceAnalysis.vue

@@ -17,9 +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">
+            <exportFileInfo  :param="exportParam" :oldParam="param" :columns="tool.tabelCol(this.$route.name).shipmentUninvoicedDetailTable.tablecols" fileName="出货未开票分析明细" btnTitle="导出明细"></exportFileInfo>
+          </div>
           <div class="inline-15 mt-10">
             <exportFile  :param="param" :columns="tablecols" fileName="出货未开票分析" :dataid="param.content.dataid"></exportFile>
           </div>
@@ -66,7 +66,7 @@
             <p v-else>{{scope.column.data[scope.column.columnname]?$t(scope.column.data[scope.column.columnname]):'--'}}</p>
           </template>
           <template v-slot:opreation="scope">
-            <shippingUninvoiceDetail :dataid="param.content.dataid" :type="param.content.type" :sys_enterpriseid="scope.data.sys_enterpriseid" :data="scope.data" :isFull="isFull"></shippingUninvoiceDetail>
+            <shippingUninvoiceDetail ref="shippingUninvoiceDetail" :dataid="param.content.dataid" :type="param.content.type" :sys_enterpriseid="scope.data.sys_enterpriseid" :data="scope.data" :isFull="isFull"></shippingUninvoiceDetail>
           </template>
         </tableTemplate>
         <div  class="container normal-panel" style="text-align:right;float: right;">