zlwu 1 年之前
父節點
當前提交
14d86037b7
共有 1 個文件被更改,包括 10 次插入 和 4 次删除
  1. 10 4
      web/src/views/crm/quote/index.vue

+ 10 - 4
web/src/views/crm/quote/index.vue

@@ -1295,6 +1295,12 @@ const generateQuoteTemplate = (quote: QuoteVO): string => {
     return dict?.label || dictValue;
   };
 
+  // 辅助函数:在每个汉字之间添加空格
+  const addSpaceBetweenChars = (str: string): string => {
+    if (!str) return '';
+    return str.split('').join(' ');
+  };
+
   // 计算产品总金额
   const productTotal =
     quote.productList?.reduce((sum, item) => {
@@ -1355,14 +1361,14 @@ const generateQuoteTemplate = (quote: QuoteVO): string => {
             <div style="flex: 1; text-align: left;">供&nbsp;&nbsp;方:&nbsp;&nbsp;安庆市山峡化工有限公司</div>
           </div>
           <div style="display: flex; justify-content: space-between;">
-            <div style="flex: 1; text-align: left;">联系人:&nbsp;&nbsp;${quote.contactName || ''}</div>
-            <div style="flex: 1; text-align: left;">联系人:&nbsp;&nbsp;${quote.ownerUserName || ''} / ${(quote as any).ownerUserMobile || ''}</div>
+            <div style="flex: 1; text-align: left;">联系人:&nbsp;&nbsp;${addSpaceBetweenChars(quote.contactName || '')}</div>
+            <div style="flex: 1; text-align: left;">联系人:&nbsp;&nbsp;${addSpaceBetweenChars(quote.ownerUserName || '')} / ${(quote as any).ownerUserMobile || ''}</div>
           </div>
         </div>
       </div>
 
       <!-- 产品列表、备注、合计(整合为一个表格) -->
-      <table style="width: 100%; border-collapse: collapse; margin-bottom: 20px; border: 2px solid #000;">
+      <table style="width: 100%; border-collapse: collapse; margin-bottom: 20px; border: 1px solid #000;">
         <thead>
           <tr style="background-color: #fff;">
             <th style="padding: 8px; border: 1px solid #000; text-align: center; width: 5%; font-weight: normal;">序号</th>
@@ -1388,7 +1394,7 @@ const generateQuoteTemplate = (quote: QuoteVO): string => {
           <!-- 合计行 -->
           <tr>
             <td colspan="2" style="padding: 8px; border: 1px solid #000; background-color: #fff; text-align: center;"><strong>合计(元):</strong></td>
-            <td colspan="8" style="padding: 8px; border: 1px solid #000; text-align: right; font-size: 16px;">${formatNumber(productTotal)}</td>
+            <td colspan="8" style="padding: 8px; border: 1px solid #000; text-align: center; font-size: 16px;">${formatNumber(productTotal)}</td>
           </tr>
         </tbody>
       </table>