Browse Source

销售询价单 新增”导出明细“

zhouying 5 days ago
parent
commit
f4433ad949

+ 3 - 0
src/views/saleCode/saleInquiryForm/SaleInquiryForm.api.ts

@@ -21,6 +21,7 @@ enum Api {
   classOption='baseCode/baseProductClass/list',
   salemanOption = 'sys/user/list',
   linkOption = '/cuspCode/cuspCustomerProfile/queryCuspCustomerProfileManByMainId',
+  exportXls2 = '/saleCode/saleInquiryForm/exportXls2',
 }
 /**
  * 导出api
@@ -28,6 +29,8 @@ enum Api {
  */
 export const getExportUrl = Api.exportXls;
 
+export const getExportUrlDetail = Api.exportXls2;
+
 /**
  * 导入api
  */

+ 33 - 1
src/views/saleCode/saleInquiryForm/SaleInquiryFormList.vue

@@ -182,6 +182,9 @@
         <a-button type="primary" v-auth="'saleCode:sale_inquiry_form:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls">
           导出(export)</a-button
         >
+        <a-button type="primary" v-auth="'saleCode:sale_inquiry_form:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls2">
+          导出明细(export detail)</a-button
+        >
         <a-button type="primary" @click="setStatus" v-auth="'saleCode:sale_inquiry_form:other'"> 设置其他状态(set other status)</a-button>
         <a-button type="primary" @click="SubmitBatch" v-auth="'saleCode:sale_inquiry_form:submitBatch'"> 提交(batch submit)</a-button>
         <a-button type="primary" @click="cancelSubmit" v-auth="'saleCode:sale_inquiry_form:returnSubmitBatch'"> 取消提交(cancelSubmit)</a-button>
@@ -232,7 +235,8 @@
     ProjectOption,
     CustomerOption,
     ClassOption,
-    SaleManOption
+    SaleManOption,
+    getExportUrlDetail,
   } from './SaleInquiryForm.api';
   import { cloneDeep } from 'lodash-es';
   import { defHttp } from '/@/utils/http/axios';
@@ -284,6 +288,34 @@
     },
   });
 
+  //注册table数据
+  const { onExportXls: onExportXls2 } = useListPage({
+    tableProps: {
+      title: '销售询价单明细',
+      api: list,
+      columns,
+      canResize: false,
+      useSearchForm: false,
+      actionColumn: {
+        width: 300,
+        fixed: 'right',
+      },
+      scroll: {
+        x: '4000px',
+        y:'calc(100vh - 400px)',
+      },
+      beforeFetch: async (params) => {
+        let rangerQuery = await setRangeQuery();
+        return Object.assign(params, rangerQuery);
+      },
+    },
+    exportConfig: {
+      name: '销售询价单明细',
+      url: getExportUrlDetail,
+      params: queryParam,
+    }
+  });
+
   const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
 
   // 高级查询配置