zlwu 11 bulan lalu
induk
melakukan
fbd820420f
1 mengubah file dengan 15 tambahan dan 2 penghapusan
  1. 15 2
      web/src/views/crm/quote/index.vue

+ 15 - 2
web/src/views/crm/quote/index.vue

@@ -814,6 +814,8 @@ import ImagePreview from '@/components/ImagePreview/index.vue';
 import CustomerDetail from '@/views/crm/customer/detail.vue';
 import { getSupplierInfo, type SupplierInfoVO } from '@/api/crm/supplierInfo';
 import logoImg from '@/assets/images/logo.gif';
+import yzImg from '@/assets/images/yz.png';
+import ydImg from '@/assets/images/yd.png';
 import html2canvas from 'html2canvas';
 import jsPDF from 'jspdf';
 
@@ -1577,6 +1579,8 @@ const generateQuoteTemplate = (quote: QuoteVO, supplierInfo?: SupplierInfoVO): s
   const showLogo = supplierCode === 'SX';
   // 根据供应商编码决定标题
   const quoteTitle = supplierCode === 'SX' ? '山峡销售报价单' : `${supplierShortName || supplierName}销售报价单`;
+  // 根据供应商编码选择印章图片
+  const sealImg = supplierCode === 'SX' ? yzImg : supplierCode === 'YD' ? ydImg : null;
 
   // 构建产品明细表格行
   const productRows =
@@ -1612,7 +1616,9 @@ const generateQuoteTemplate = (quote: QuoteVO, supplierInfo?: SupplierInfoVO): s
       }
 
         <!-- 标题 -->
-        <h1 style="text-align: center; font-size: 28px; margin-bottom: 40px; font-weight: bold;">${quoteTitle}</h1>
+        <div style="text-align: center; margin-bottom: 40px;">
+          <h1 style="font-size: 28px; font-weight: bold; margin: 0;">${quoteTitle}</h1>
+        </div>
 
         <!-- 报价单基本信息 -->
         <div style="margin-bottom: 30px; font-size: 14px; line-height: 1.2; display: flex; justify-content: center;">
@@ -1645,7 +1651,14 @@ const generateQuoteTemplate = (quote: QuoteVO, supplierInfo?: SupplierInfoVO): s
               <th style="padding: 8px; border: 1px solid #000; text-align: center; width: 10%; font-weight: normal;">税额/元</th>
               <th style="padding: 8px; border: 1px solid #000; text-align: center; width: 10%; font-weight: normal;">含税总价/元</th>
               <th style="padding: 8px; border: 1px solid #000; text-align: center; width: 14%; font-weight: normal;">包装规格</th>
-              <th style="padding: 8px; border: 1px solid #000; text-align: center; width: 14%; font-weight: normal;">送货方式</th>
+              <th style="padding: 8px; border: 1px solid #000; text-align: center; width: 14%; font-weight: normal; position: relative;">
+                送货方式
+                ${
+                  sealImg
+                    ? `<img src="${sealImg}" alt="印章" style="position: absolute; left: 50%; top: calc(50% - 50px); transform: translate(-50%, -50%); width: 120px; height: 120px; z-index: 10; pointer-events: none; opacity: 0.9;" />`
+                    : ''
+                }
+              </th>
             </tr>
           </thead>
           <tbody>