From 308e2cc3b78e6f8351e4f3fb0ad1ca191ae0db48 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期二, 02 六月 2026 17:45:13 +0800
Subject: [PATCH] fix: 更新入库的源单号不显示问题

---
 src/views/procurementManagement/procurementLedger/index.vue |   44 +++++++++++++++++++++++++++-----------------
 1 files changed, 27 insertions(+), 17 deletions(-)

diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index 1b6b268..c6d4c93 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -68,7 +68,7 @@
               <el-table-column label="鍙敤鏁伴噺" prop="availableQuality" />
               <el-table-column label="閫�璐ф暟閲�" prop="returnQuality" />
               <el-table-column label="绋庣巼(%)" prop="taxRate" />
-              <el-table-column label="鍚◣鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" :formatter="unitPriceFormatter" />
+              <el-table-column label="鍚◣鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" :formatter="formattedNumber" />
               <el-table-column label="鍚◣鎬讳环(鍏�)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber" />
               <el-table-column label="涓嶅惈绋庢�讳环(鍏�)" prop="taxExclusiveTotalPrice" :formatter="formattedNumber" />
             </el-table>
@@ -210,7 +210,7 @@
           <el-table-column label="鏁伴噺" prop="quantity" width="70" />
           <el-table-column label="搴撳瓨棰勮鏁伴噺" prop="warnNum" width="120" show-overflow-tooltip />
           <el-table-column label="绋庣巼(%)" prop="taxRate" width="80" />
-          <el-table-column label="鍚◣鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" :formatter="unitPriceFormatter" width="150" />
+          <el-table-column label="鍚◣鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" :formatter="formattedNumber" width="150" />
           <el-table-column label="鍚◣鎬讳环(鍏�)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber" width="150" />
           <el-table-column label="涓嶅惈绋庢�讳环(鍏�)" prop="taxExclusiveTotalPrice" :formatter="formattedNumber" width="150" />
           <el-table-column label="鏄惁璐ㄦ" prop="isChecked" width="150">
@@ -310,7 +310,7 @@
         <el-row :gutter="30">
           <el-col :span="12">
             <el-form-item label="鍚◣鍗曚环(鍏�)锛�" prop="taxInclusiveUnitPrice">
-              <el-input-number v-model="productForm.taxInclusiveUnitPrice" :precision="6" :step="0.1" :min="0" clearable
+              <el-input-number v-model="productForm.taxInclusiveUnitPrice" :precision="8" :step="0.1" :min="0" clearable
                 style="width: 100%" @change="mathNum" />
             </el-form-item>
           </el-col>
@@ -324,13 +324,13 @@
         <el-row :gutter="30">
           <el-col :span="12">
             <el-form-item label="鍚◣鎬讳环(鍏�)锛�" prop="taxInclusiveTotalPrice">
-              <el-input-number v-model="productForm.taxInclusiveTotalPrice" :precision="2" :step="0.1" :min="0"
+              <el-input-number v-model="productForm.taxInclusiveTotalPrice" :precision="8" :step="0.1" :min="0"
                 clearable style="width: 100%" @change="reverseMathNum('taxInclusiveTotalPrice')" />
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="涓嶅惈绋庢�讳环(鍏�)锛�" prop="taxExclusiveTotalPrice">
-              <el-input-number v-model="productForm.taxExclusiveTotalPrice" :precision="2" :step="0.1" :min="0"
+              <el-input-number v-model="productForm.taxExclusiveTotalPrice" :precision="8" :step="0.1" :min="0"
                 clearable style="width: 100%" @change="reverseMathNum('taxExclusiveTotalPrice')" />
             </el-form-item>
           </el-col>
@@ -771,10 +771,7 @@
 };
 
 const formattedNumber = (row, column, cellValue) => {
-  return parseFloat(cellValue).toFixed(2);
-};
-const unitPriceFormatter = (row, column, cellValue) => {
-  return parseFloat(cellValue).toFixed(6);
+  return parseFloat(cellValue).toFixed(8);
 };
 // 鏌ヨ鍒楄〃
 /** 鎼滅储鎸夐挳鎿嶄綔 */
@@ -896,6 +893,9 @@
     {
       ticketsNum: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
       futureTickets: { noDecimal: true }, // 涓嶄繚鐣欏皬鏁�
+      taxInclusiveUnitPrice: { decimalPlaces: 8 },
+      taxInclusiveTotalPrice: { decimalPlaces: 8 },
+      taxExclusiveTotalPrice: { decimalPlaces: 8 },
     }
   );
 };
@@ -959,15 +959,25 @@
 };
 // 涓昏〃鍚堣鏂规硶
 const summarizeMainTable = param => {
-  return proxy.summarizeTable(param, ["contractAmount"]);
+  return proxy.summarizeTable(param, ["contractAmount"], {
+    contractAmount: { decimalPlaces: 8 },
+  });
 };
 // 瀛愯〃鍚堣鏂规硶
 const summarizeProTable = param => {
-  return proxy.summarizeTable(param, [
-    "taxInclusiveUnitPrice",
-    "taxInclusiveTotalPrice",
-    "taxExclusiveTotalPrice",
-  ]);
+  return proxy.summarizeTable(
+    param,
+    [
+      "taxInclusiveUnitPrice",
+      "taxInclusiveTotalPrice",
+      "taxExclusiveTotalPrice",
+    ],
+    {
+      taxInclusiveUnitPrice: { decimalPlaces: 8 },
+      taxInclusiveTotalPrice: { decimalPlaces: 8 },
+      taxExclusiveTotalPrice: { decimalPlaces: 8 },
+    }
+  );
 };
 // 鎵撳紑寮规
 const openForm = async (type, row) => {
@@ -1479,7 +1489,7 @@
       productForm.value.taxInclusiveUnitPrice = (
         Number(productForm.value.taxInclusiveTotalPrice) /
         Number(productForm.value.quantity)
-      ).toFixed(6);
+      ).toFixed(2);
       // 纭繚缁撴灉涓嶄负璐熸暟
       if (Number(productForm.value.taxInclusiveUnitPrice) < 0) {
         productForm.value.taxInclusiveUnitPrice = "0";
@@ -1520,7 +1530,7 @@
       productForm.value.taxInclusiveUnitPrice = (
         Number(productForm.value.taxInclusiveTotalPrice) /
         Number(productForm.value.quantity)
-      ).toFixed(6);
+      ).toFixed(2);
       // 纭繚缁撴灉涓嶄负璐熸暟
       if (Number(productForm.value.taxInclusiveUnitPrice) < 0) {
         productForm.value.taxInclusiveUnitPrice = "0";

--
Gitblit v1.9.3