From b14930d7ac2ce362403ea28d0bae724161bc1f3c Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期二, 21 四月 2026 10:36:41 +0800
Subject: [PATCH] fix(采购台账): 修正金额显示小数位数及界面文本错误

---
 src/pages/procurementManagement/procurementLedger/index.vue |   19 ++++++++++++-------
 src/pages/procurementManagement/paymentLedger/index.vue     |   18 +++++++++---------
 src/pages/procurementManagement/procurementLedger/view.vue  |    8 ++++----
 src/utils/summarizeTable.js                                 |    8 ++++----
 4 files changed, 29 insertions(+), 24 deletions(-)

diff --git a/src/pages/procurementManagement/paymentLedger/index.vue b/src/pages/procurementManagement/paymentLedger/index.vue
index 8bd7c6e..760fd3f 100644
--- a/src/pages/procurementManagement/paymentLedger/index.vue
+++ b/src/pages/procurementManagement/paymentLedger/index.vue
@@ -1,7 +1,7 @@
 <template>
   <view class="sales-account">
     <!-- 浣跨敤閫氱敤椤甸潰澶撮儴缁勪欢 -->
-    <PageHeader title="渚涘簲鍟嗗線鏉�" @back="goBack" />
+    <PageHeader title="渚涘簲鍟嗕粯娆惧彴璐�" @back="goBack" />
     
     <!-- 鎼滅储鍖哄煙 -->
     <view class="search-section">
@@ -21,7 +21,7 @@
       </view>
     </view>
 
-    <!-- 渚涘簲鍟嗗垪琛� -->
+    <!-- 渚涘簲鍟嗗垪锟�?-->
     <view class="customer-list-container">
       <view class="customer-list" v-if="tableData.length > 0">
         <view 
@@ -59,7 +59,7 @@
         </view>
       </view>
       <view v-else class="no-data">
-        <text>鏆傛棤渚涘簲鍟嗘暟鎹�</text>
+        <text>鏆傛棤渚涘簲鍟嗕粯娆捐褰�</text>
       </view>
     </view>
   </view>
@@ -114,7 +114,7 @@
 };
 
 const formattedNumber = (value) => {
-  return parseFloat(value || 0).toFixed(2);
+  return parseFloat(value || 0).toFixed(3);
 };
 
 // 鏄剧ず鍔犺浇鎻愮ず
@@ -131,9 +131,9 @@
 };
 
 const rowClickMethod = (row) => {
-  // 浣跨敤 uni.setStorageSync 瀛樺偍渚涘簲鍟嗕俊鎭�
+  // 浣跨敤 uni.setStorageSync 瀛樺偍渚涘簲鍟咺D
   uni.setStorageSync('supplierId', row.supplierId);
-  // 璺宠浆鍒板洖娆捐褰曟槑缁嗛〉闈�
+  // 璺宠浆鍒颁粯娆捐褰曟槑缁嗛〉
   uni.navigateTo({
     url: '/pages/procurementManagement/paymentLedger/detail'
   });
@@ -147,9 +147,9 @@
 <style scoped lang="scss">
 @import '@/styles/procurement-common.scss';
 
-// 渚涘簲鍟嗗線鏉ョ壒鏈夋牱寮�
+// 渚涘簲鍟嗕粯娆惧彴璐︾壒鏈夋牱寮�
 .detail-value.danger {
-  color: #ff4757; // 涓庡叕鍏辨牱寮忎腑鐨� #ee0a24 涓嶅悓
+  color: #ff4757; // 涓庡叕鍏辨牱寮忎腑搴斾粯閲戦棰滆壊涓嶅悓
   font-weight: 500;
 }
-</style>
\ No newline at end of file
+</style>
diff --git a/src/pages/procurementManagement/procurementLedger/index.vue b/src/pages/procurementManagement/procurementLedger/index.vue
index 615a00d..9092d4e 100644
--- a/src/pages/procurementManagement/procurementLedger/index.vue
+++ b/src/pages/procurementManagement/procurementLedger/index.vue
@@ -3,7 +3,7 @@
     <!-- 浣跨敤閫氱敤椤甸潰澶撮儴缁勪欢 -->
     <PageHeader title="閲囪喘鍙拌处"
                 @back="goBack" />
-    <!-- 鎼滅储鍜岀瓫閫夊尯鍩� -->
+    <!-- 鎼滅储鍜岀瓫閫夊尯 -->
     <view class="search-section">
       <view class="search-bar">
         <view class="search-input">
@@ -63,7 +63,7 @@
             </view>
             <view class="detail-row">
               <text class="detail-label">鍚堝悓閲戦(鍏�)</text>
-              <text class="detail-value highlight">{{ item.contractAmount }}</text>
+              <text class="detail-value highlight">{{ formatNumber(item.contractAmount) }}</text>
             </view>
             <up-divider></up-divider>
             <view class="detail-info">
@@ -116,15 +116,15 @@
   } from "@/api/procurementManagement/procurementLedger";
   const userStore = useUserStore();
   const approvalStatusText = {
-    1: "寰呭鏍�",
+    1: "寰呭鎵�",
     2: "瀹℃壒涓�",
     3: "瀹℃壒閫氳繃",
     4: "瀹℃壒澶辫触",
   };
-  // 鑾峰彇瀹℃壒鐘舵�佹爣绛剧被鍨�
+  // 鑾峰彇瀹℃壒鐘舵�佹爣绛剧被锟�?
   const getApprovalStatusType = status => {
     const typeMap = {
-      1: "info", // 寰呭鏍� - 鐏拌壊
+      1: "info", // 寰呭鎵� - 鐏拌壊
       2: "warning", // 瀹℃壒涓� - 姗欒壊
       3: "success", // 瀹℃壒閫氳繃 - 缁胯壊
       4: "error", // 瀹℃壒澶辫触 - 绾㈣壊
@@ -136,6 +136,11 @@
 
   // 閲囪喘鍙拌处鏁版嵁
   const ledgerList = ref([]);
+
+  // 鏍煎紡鍖栭噾棰�
+  const formatNumber = value => {
+    return parseFloat(value || 0).toFixed(3);
+  };
 
   // 杩斿洖涓婁竴椤�
   const goBack = () => {
@@ -258,7 +263,7 @@
               });
             })
             .catch(error => {
-              // 瀵逛簬 request 灏佽杩斿洖鐨� '500' 鎴栧叾浠� code锛岄敊璇彁绀哄凡缁忓湪 request 閲� toast 杩囦簡锛岃繖閲屼笉鍐嶉噸澶嶈鐩�
+              // 瀵逛簬 request 灏佽杩斿洖鐨� '500' 鎴栧叾code锛岄敊璇彁绀哄凡缁忓湪 request 涓鐞嗕簡锛岃繖閲屼笉鍐嶉噸澶嶈鐩�
               if (error === "500" || typeof error === "number") {
                 return;
               }
@@ -290,5 +295,5 @@
 <style scoped lang="scss">
   @import "@/styles/procurement-common.scss";
 
-  // 閲囪喘鍙拌处鐗规湁鏍峰紡锛堝鏈夐渶瑕佸彲鍦ㄦ娣诲姞锛�
+  // 閲囪喘鍙拌处鐗规湁鏍峰紡锛堝 闇�瑕佸彲鍦ㄦ娣诲姞锛�
 </style>
diff --git a/src/pages/procurementManagement/procurementLedger/view.vue b/src/pages/procurementManagement/procurementLedger/view.vue
index 174b8ae..a70d530 100644
--- a/src/pages/procurementManagement/procurementLedger/view.vue
+++ b/src/pages/procurementManagement/procurementLedger/view.vue
@@ -8,7 +8,7 @@
       <view class="section-title">鍩烘湰淇℃伅</view>
       <view class="info-grid">
         <view class="info-item">
-          <text class="info-label">閲囪喘鍚堝悓鍙�</text>
+          <text class="info-label">閲囪喘鍚堝悓缂栧彿</text>
           <text class="info-value">{{ form.purchaseContractNumber }}</text>
         </view>
         <view class="info-item">
@@ -125,9 +125,9 @@
 // 缂栬緫鏁版嵁
 const editData = ref(null);
 
-// 杩斿洖涓婁竴椤�
+// 杩斿洖涓婁竴锟�?
 const goBack = () => {
-  // 娓呯悊鏈湴瀛樺偍鐨勬暟鎹�
+  // 娓呯悊鏈湴瀛樺偍鐨勭紪杈戞暟鎹�
   uni.removeStorageSync('editData');
   uni.navigateBack();
 };
@@ -144,7 +144,7 @@
 };
 
 onMounted(() => {
-  // 鑾峰彇缂栬緫鏁版嵁骞跺~鍏呰〃鍗�
+  // 鑾峰彇缂栬緫鏁版嵁骞跺~鍏呰〃鍗曟暟鎹�
   const editDataStr = uni.getStorageSync('editData');
   if (editDataStr) {
     try {
diff --git a/src/utils/summarizeTable.js b/src/utils/summarizeTable.js
index 1ad480d..3a90f25 100644
--- a/src/utils/summarizeTable.js
+++ b/src/utils/summarizeTable.js
@@ -26,9 +26,9 @@
           // 濡傛灉鎸囧畾浜嗕笉闇�瑕佷繚鐣欏皬鏁帮紝鍒欑洿鎺ヨ浆鎹负鏁存暟
           sums[index] = Math.round(sum).toString();
         } else {
-          // 榛樿淇濈暀涓や綅灏忔暟
+          // 榛樿淇濈暀涓変綅灏忔暟
           sums[index] = parseFloat(sum).toFixed(
-            specialFormat[prop]?.decimalPlaces ?? 2
+            specialFormat[prop]?.decimalPlaces ?? 3
           );
         }
       } else {
@@ -43,11 +43,11 @@
 // 涓嶅惈绋庢�讳环璁$畻
 const calculateTaxExclusiveTotalPrice = (taxInclusiveTotalPrice, taxRate) => {
   const taxRateDecimal = taxRate / 100;
-  return (taxInclusiveTotalPrice / (1 + taxRateDecimal)).toFixed(2);
+  return (taxInclusiveTotalPrice / (1 + taxRateDecimal)).toFixed(3);
 };
 // 鍚◣鎬讳环璁$畻
 const calculateTaxIncludeTotalPrice = (taxInclusiveUnitPrice, quantity) => {
-  return (taxInclusiveUnitPrice * quantity).toFixed(2);
+  return (taxInclusiveUnitPrice * quantity).toFixed(3);
 };
 // 瀵煎嚭鍑芥暟渚涘叾浠栨枃浠朵娇鐢�
 export {

--
Gitblit v1.9.3