From e1869c67a48da088650b0a1238ff718e5fc4138c Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期二, 29 九月 2026 09:15:21 +0800
Subject: [PATCH] refactor(data): 优化参数维护和报表数据显示格式

---
 src/views/procurementManagement/procurementLedger/index.vue |   62 ++++++++++++++++++++----------
 1 files changed, 41 insertions(+), 21 deletions(-)

diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index 7e1576b..e1fba68 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -104,18 +104,21 @@
                                type="index"
                                width="60" />
               <el-table-column label="浜у搧澶х被"
-                               prop="productCategory" />
+                               prop="productCategory"
+                               :formatter="emptySlash" />
               <el-table-column label="瑙勬牸鍨嬪彿"
-                               prop="specificationModel" />
+                               prop="specificationModel"
+                               :formatter="emptySlash" />
               <el-table-column label="鍗曚綅"
-                               prop="unit" />
+                               prop="unit"
+                               :formatter="emptySlash" />
               <el-table-column label="鍏ュ簱瀹℃牳鐘舵��"
                                prop="stockInApprovalStatus"
                                width="120">
                 <template #default="scope">
                   <el-tag :type="getStockInApprovalStatusType(scope.row.stockInApprovalStatus)"
                           size="small">
-                    {{ scope.row.stockInApprovalStatus || '--' }}
+                    {{ scope.row.stockInApprovalStatus || '/' }}
                   </el-tag>
                 </template>
               </el-table-column>
@@ -148,19 +151,23 @@
         <el-table-column label="閲囪喘鍚堝悓鍙�"
                          prop="purchaseContractNumber"
                          width="160"
-                         show-overflow-tooltip />
+                         show-overflow-tooltip
+                         :formatter="emptySlash" />
         <el-table-column label="閿�鍞悎鍚屽彿"
                          prop="salesContractNo"
                          width="160"
-                         show-overflow-tooltip />
+                         show-overflow-tooltip
+                         :formatter="emptySlash" />
         <el-table-column label="渚涘簲鍟嗗悕绉�"
                          prop="supplierName"
                          width="160"
-                         show-overflow-tooltip />
+                         show-overflow-tooltip
+                         :formatter="emptySlash" />
         <el-table-column label="椤圭洰鍚嶇О"
                          prop="projectName"
                          width="320"
-                         show-overflow-tooltip />
+                         show-overflow-tooltip
+                         :formatter="emptySlash" />
         <el-table-column label="瀹℃壒鐘舵��"
                          prop="approvalStatus"
                          width="100"
@@ -168,7 +175,7 @@
           <template #default="scope">
             <el-tag :type="getApprovalStatusType(scope.row.approvalStatus)"
                     size="small">
-              {{ approvalStatusText[scope.row.approvalStatus] || '鏈煡鐘舵��' }}
+              {{ approvalStatusText[scope.row.approvalStatus] || '/' }}
             </el-tag>
           </template>
         </el-table-column>
@@ -179,18 +186,20 @@
           <template #default="scope">
             <el-tag :type="getStockInStatusType(scope.row.stockInStatus)"
                     size="small">
-              {{ scope.row.stockInStatus || '--' }}
+              {{ scope.row.stockInStatus || '/' }}
             </el-tag>
           </template>
         </el-table-column>
         <el-table-column label="绛捐鏃ユ湡"
                          prop="executionDate"
                          width="100"
-                         show-overflow-tooltip />
+                         show-overflow-tooltip
+                         :formatter="emptySlash" />
         <el-table-column label="浠樻鏂瑰紡"
                          width="100"
                          prop="paymentMethod"
-                         show-overflow-tooltip />
+                         show-overflow-tooltip
+                         :formatter="emptySlash" />
         <el-table-column label="鍚堝悓閲戦(鍏�)"
                          prop="contractAmount"
                          width="200"
@@ -204,15 +213,18 @@
         <el-table-column label="褰曞叆浜�"
                          prop="recorderName"
                          width="120"
-                         show-overflow-tooltip />
+                         show-overflow-tooltip
+                         :formatter="emptySlash" />
         <el-table-column label="褰曞叆鏃ユ湡"
                          prop="entryDate"
                          width="100"
-                         show-overflow-tooltip />
+                         show-overflow-tooltip
+                         :formatter="emptySlash" />
         <el-table-column label="澶囨敞"
                          prop="remarks"
                          width="200"
-                         show-overflow-tooltip />
+                         show-overflow-tooltip
+                         :formatter="emptySlash" />
         <el-table-column fixed="right"
                          label="鎿嶄綔"
                          width="120"
@@ -411,12 +423,15 @@
                            type="index"
                            width="60" />
           <el-table-column label="浜у搧澶х被"
-                           prop="productCategory" />
+                           prop="productCategory"
+                           :formatter="emptySlash" />
           <el-table-column label="瑙勬牸鍨嬪彿"
-                           prop="specificationModel" />
+                           prop="specificationModel"
+                           :formatter="emptySlash" />
           <el-table-column label="鍗曚綅"
                            prop="unit"
-                           width="70" />
+                           width="70"
+                           :formatter="emptySlash" />
           <el-table-column label="鏁伴噺"
                            prop="quantity"
                            width="70" />
@@ -454,7 +469,7 @@
             <template #default="scope">
               <el-tag :type="getStockInApprovalStatusType(scope.row.stockInApprovalStatus)"
                       size="small">
-                {{ scope.row.stockInApprovalStatus || '--' }}
+                {{ scope.row.stockInApprovalStatus || '/' }}
               </el-tag>
             </template>
           </el-table-column>
@@ -1088,6 +1103,11 @@
   const formattedNumber = (row, column, cellValue) => {
     return parseFloat(cellValue).toFixed(2);
   };
+  // 绌哄瓧娈电粺涓�鏄剧ず "/"
+  const emptySlash = (row, column, cellValue) =>
+    cellValue === null || cellValue === undefined || cellValue === ""
+      ? "/"
+      : cellValue;
   // 鏌ヨ鍒楄〃
   /** 鎼滅储鎸夐挳鎿嶄綔 */
   const handleQuery = () => {
@@ -1275,10 +1295,10 @@
   };
   const formatMoney = value => {
     if (value === null || value === undefined || value === "") {
-      return "--";
+      return "/";
     }
     const num = Number(value);
-    return Number.isFinite(num) ? num.toFixed(2) : "--";
+    return Number.isFinite(num) ? num.toFixed(2) : "/";
   };
   // 瀛愯〃鍚堣鏂规硶
   const summarizeProTable = param => {

--
Gitblit v1.9.3