瀏覽代碼

销售报价单/采购询价单-单行导出名称修改

jingbb 5 月之前
父節點
當前提交
2f022d91f3

+ 16 - 8
src/views/purchase/purchaseInquiryForm/purchaseInquiryFormList.vue

@@ -162,7 +162,7 @@
 </template>
 
 <script lang="ts" name="purchase-purchaseInquiryForm" setup>
-  import { ref, reactive, computed, unref, onMounted } from 'vue';
+  import { ref, reactive, computed, unref, onMounted,watchEffect } from 'vue';
   import { BasicTable, useTable, TableAction } from '/@/components/Table';
   import { useListPage } from '/@/hooks/system/useListPage';
   import { useModal } from '/@/components/Modal';
@@ -192,6 +192,7 @@
   const checkedKeys = ref<Array<string | number>>([]);
   //注册model
   const [registerModal, { openModal }] = useModal();
+ 
   //注册table数据
   const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
     tableProps: {
@@ -222,12 +223,8 @@
       success: handleSuccess,
     },
   });
-
+ 
   const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
-
-  /**
-   * 高级查询事件
-   */
   function handleSuperQuery(params) {
     Object.keys(params).map((k) => {
       queryParam[k] = params[k];
@@ -296,7 +293,6 @@
       {
         label: '导出(export)',
         onClick: onExportXlsNow.bind(null, record),
-        ifShow: record.submit == '1',
       },
       {
         label: '发送(sent)',
@@ -306,7 +302,6 @@
     ];
   }
   function handleSent() {}
-  function handleExportOne() {}
   /**
    * 下拉操作栏
    */
@@ -398,6 +393,19 @@
   }
   async function onExportXlsNow(record) {
     queryParam.id = record.id;
+    const {onExportXls} = useListPage({
+      tableProps: {
+        beforeFetch: async (params) => {
+          let rangerQuery = await setRangeQuery();
+          return Object.assign(params, rangerQuery);
+        },
+      },
+      exportConfig: {
+        name: record.billCode,
+        url: getExportUrl,
+        params: queryParam,
+      },
+    });
     await onExportXls();
     queryParam.id = '';
   }

+ 14 - 1
src/views/saleCode/quotation/quotation.vue

@@ -198,7 +198,7 @@
       canResize: false,
       useSearchForm: false,
       actionColumn: {
-        width: 340,
+        width: 440,
         fixed: 'right',
       },
       scroll: {
@@ -365,6 +365,19 @@
   }
   async function onExportXlsNow(record) {
     queryParam.id = record.id;
+    const {onExportXls} = useListPage({
+      tableProps: {
+        beforeFetch: async (params) => {
+          let rangerQuery = await setRangeQuery();
+          return Object.assign(params, rangerQuery);
+        },
+      },
+      exportConfig: {
+        name: record.billCode,
+        url: getExportUrl,
+        params: queryParam,
+      },
+    });
     await onExportXls();
     queryParam.id = '';
   }