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 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
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>
--
Gitblit v1.9.3