From a2d9fcb259621829bf4ec9680b5dbeac95ab5805 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 15 十月 2026 16:19:54 +0800
Subject: [PATCH] fix(crm): 销售目标达成分析默认查当前季度

---
 src/views/crm/saleQuotation/index.vue |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/src/views/crm/saleQuotation/index.vue b/src/views/crm/saleQuotation/index.vue
index 9a221d3..cf01246 100644
--- a/src/views/crm/saleQuotation/index.vue
+++ b/src/views/crm/saleQuotation/index.vue
@@ -15,6 +15,7 @@
   getSaleQuotationPage,
 } from '#/api/crm/saleQuotation';
 import { $t } from '#/locales';
+import { downloadContractWord } from '#/utils/contract-document';
 
 import type { CrmSaleQuotationAiApi } from '#/api/crm/saleQuotation/ai';
 
@@ -107,6 +108,12 @@
     async onOk() {
       const contractId = await convertSaleQuotationToContract(row.id!);
       message.success('杞悎鍚屾垚鍔�');
+      gridApi.query();
+      try {
+        await downloadContractWord(contractId);
+      } catch {
+        message.warning('鍚堝悓宸插垱寤猴紝鏂囦欢涓嬭浇澶辫触锛屽彲鍦ㄥ悎鍚岃鎯呬腑閲嶆柊涓嬭浇');
+      }
       push({ name: 'CrmContractDetail', params: { id: contractId } });
     },
   });
@@ -218,6 +225,13 @@
               ifShow: !!row.contractId,
             },
             {
+              label: '涓嬭浇鍚堝悓',
+              type: 'link',
+              auth: ['crm:contract:query'],
+              onClick: () => downloadContractWord(row.contractId!, row.contractNo),
+              ifShow: !!row.contractId,
+            },
+            {
               label: $t('common.delete'),
               type: 'link',
               danger: true,
@@ -233,4 +247,4 @@
       </template>
     </Grid>
   </Page>
-</template>
\ No newline at end of file
+</template>

--
Gitblit v1.9.3