zlwu hace 10 meses
padre
commit
8f9fcde6a2

+ 2 - 2
backend/ruoyi-admin/src/main/resources/application.yml

@@ -54,9 +54,9 @@ logging:
 user:
   password:
     # 密码最大错误次数
-    maxRetryCount: 5
+    maxRetryCount: 50
     # 密码锁定时间(默认10分钟)
-    lockTime: 10
+    lockTime: 1
 
 # Spring配置
 spring:

+ 1 - 1
mobile/src/pages/index/index.vue

@@ -5,7 +5,7 @@
             <!-- 学校logo和标题 -->
             <view class="school-banner-section">
                 <!-- <image class="school-logo" src="/static/logo-2.png" mode="aspectFit" /> -->
-                <text class="school-title">杭州第一技师学院智慧校园</text>
+                <text class="school-title">山峡化工CRM系统</text>
             </view>
 
             <!-- 用户信息区域 -->

+ 1 - 1
web/.env.production.backup

@@ -1,5 +1,5 @@
 # 页面标题
-VITE_APP_TITLE = 杭州第一技师学院智慧校园管理系统
+VITE_APP_TITLE = 山峡化工CRM系统
 
 # 生产环境配置
 VITE_APP_ENV = 'production'

+ 1 - 1
web/index.html

@@ -6,7 +6,7 @@
     <meta name="renderer" content="webkit" />
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
     <!-- <link rel="icon" href="/favicon.ico" /> -->
-    <title>杭州第一技师学院智慧校园管理系统</title>
+    <title>山峡化工CRM系统</title>
     <!--[if lt IE 11
       ]><script>
         window.location.href = '/html/ie.html';

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

@@ -149,7 +149,7 @@
         <el-table-column
           v-if="isColumnVisible('customerName')"
           label="客户名称"
-          align="center"
+          align="left"
           prop="customerName"
           min-width="180"
           show-overflow-tooltip
@@ -1603,6 +1603,65 @@ const generateQuoteTemplate = (quote: QuoteVO, supplierInfo?: SupplierInfoVO): s
     return str.split('').join(' ');
   };
 
+  // 辅助函数:将数字转换为人民币大写(适用于展示合计金额)
+  const numberToRMBUpper = (n: number | string): string => {
+    const num = Number(n) || 0;
+    if (num === 0) return '零元整';
+    const digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
+    const unitMajor = ['', '万', '亿'];
+    const unitMinor = ['', '拾', '佰', '仟'];
+    let head = num < 0 ? '负' : '';
+    let money = Math.abs(Math.round(num * 100));
+    const integer = Math.floor(money / 100);
+    const dec = money % 100;
+
+    let s = '';
+    // integer part
+    if (integer > 0) {
+      let intStr = '';
+      let unitPos = 0;
+      let temp = integer;
+      while (temp > 0) {
+        let section = temp % 10000;
+        let sectionStr = '';
+        let pos = 0;
+        // iterate only while there are digits in this section to avoid leading zeros
+        while (section > 0 && pos < 4) {
+          const v = section % 10;
+          if (v !== 0) {
+            sectionStr = digit[v] + (pos ? unitMinor[pos] : '') + sectionStr;
+          } else if (sectionStr && !sectionStr.startsWith('零')) {
+            sectionStr = '零' + sectionStr;
+          }
+          section = Math.floor(section / 10);
+          pos++;
+        }
+        if (sectionStr) {
+          const major = unitMajor[unitPos] || '';
+          intStr = sectionStr + major + intStr;
+        }
+        temp = Math.floor(temp / 10000);
+        unitPos++;
+      }
+      s += intStr.replace(/零+/g, '零').replace(/零$/, '');
+      s += '元';
+    } else {
+      s += '零元';
+    }
+
+    // decimal part
+    if (dec === 0) {
+      s += '整';
+    } else {
+      const jiao = Math.floor(dec / 10);
+      const fen = dec % 10;
+      if (jiao > 0) s += digit[jiao] + '角';
+      if (fen > 0) s += digit[fen] + '分';
+    }
+
+    return head + s;
+  };
+
   // 计算产品总金额
   const productTotal =
     quote.productList?.reduce((sum, item) => {
@@ -1653,13 +1712,13 @@ const generateQuoteTemplate = (quote: QuoteVO, supplierInfo?: SupplierInfoVO): s
   const productRows =
     quote.productList
       ?.map(
-        (product, index) => `
+      (product, index) => `
     <tr>
       <td style="padding: 8px; border: 1px solid #000; text-align: center;">${index + 1}</td>
       <td style="padding: 8px; border: 1px solid #000;">${product.productName || ''}</td>
       <td style="padding: 8px; border: 1px solid #000; text-align: center;">${product.model || ''}</td>
       <td style="padding: 8px; border: 1px solid #000; text-align: center;">${getDictLabel(product.unit)}</td>
-      <td style="padding: 8px; border: 1px solid #000; text-align: center;">${product.quantity || 0}</td>
+      <td style="padding: 8px; border: 1px solid #000; text-align: center;">${formatNumber(product.quantity, 2)}</td>
       <td style="padding: 8px; border: 1px solid #000; text-align: right;">${formatNumber(product.price)}</td>
       <td style="padding: 8px; border: 1px solid #000; text-align: right;">${formatNumber(product.taxAmount)}</td>
       <td style="padding: 8px; border: 1px solid #000; text-align: right;">${formatNumber(product.subtotal)}</td>
@@ -1739,7 +1798,9 @@ const generateQuoteTemplate = (quote: QuoteVO, supplierInfo?: SupplierInfoVO): s
             <!-- 合计行 -->
             <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: center; font-size: 16px;">${formatNumber(productTotal)}</td>
+              <td colspan="8" style="padding: 8px; border: 1px solid #000; text-align: center; font-size: 16px;">
+                ${numberToRMBUpper(productTotal)}(¥${formatNumber(productTotal)})
+              </td>
             </tr>
           </tbody>
         </table>