From 4d42d32474acd523b23c544596c62185af094d29 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 17 十二月 2025 15:41:29 +0800
Subject: [PATCH] 1.海川开心-仓储物流展示字段修改,及编辑修改

---
 src/views/inventoryManagement/receiptManagement/index.vue |   31 ++++++++++++++++++++++++++++---
 1 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/src/views/inventoryManagement/receiptManagement/index.vue b/src/views/inventoryManagement/receiptManagement/index.vue
index 52bb6ef..02d7a0b 100644
--- a/src/views/inventoryManagement/receiptManagement/index.vue
+++ b/src/views/inventoryManagement/receiptManagement/index.vue
@@ -43,7 +43,8 @@
             <el-table-column label="浜у搧澶х被" prop="productCategory" show-overflow-tooltip />
             <el-table-column label="瑙勬牸鍨嬪彿" prop="specificationModel" show-overflow-tooltip />
             <el-table-column label="鍗曚綅" prop="unit" width="70" show-overflow-tooltip />
-            <el-table-column label="鍏ュ簱鏁伴噺" prop="inboundNum" width="90" show-overflow-tooltip />
+						<el-table-column label="鍏ュ簱鏁伴噺" prop="inboundNum" width="100" show-overflow-tooltip />
+<!--						<el-table-column label="鍓╀綑搴撳瓨" prop="inboundNum0" show-overflow-tooltip />-->
 						<el-table-column label="鍗曚环(鍏�)" prop="unitPrice" width="150"></el-table-column>
 						<el-table-column label="鎬讳环(鍏�)" prop="totalPrice" width="150"></el-table-column>
 <!--            <el-table-column label="鍚◣鍗曚环" prop="taxInclusiveUnitPrice" width="100" show-overflow-tooltip />-->
@@ -105,7 +106,8 @@
            <el-table-column label="浜у搧澶х被" prop="productCategory" show-overflow-tooltip />
            <el-table-column label="瑙勬牸鍨嬪彿" prop="specificationModel" show-overflow-tooltip />
            <el-table-column label="鍗曚綅" prop="unit" width="70" show-overflow-tooltip />
-           <el-table-column label="鍏ュ簱鏁伴噺" prop="inboundNum" width="90" show-overflow-tooltip />
+					 <el-table-column label="鍏ュ簱鏁伴噺" prop="inboundNum" width="100" show-overflow-tooltip />
+<!--					 <el-table-column label="鍓╀綑搴撳瓨" prop="inboundNum0" show-overflow-tooltip />-->
 					 <el-table-column label="鍚◣鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" width="150"></el-table-column>
 					 <el-table-column label="鍚◣鎬讳环(鍏�)" prop="taxInclusiveTotalPrice" width="150"></el-table-column>
 <!--&lt;!&ndash;            <el-table-column label="鍚◣鍗曚环" prop="taxInclusiveUnitPrice" width="100" show-overflow-tooltip />&ndash;&gt;-->
@@ -168,7 +170,8 @@
             <el-table-column label="瑙勬牸鍨嬪彿" prop="specificationModel" show-overflow-tooltip />
             <el-table-column label="鍗曚綅" prop="unit" width="70" show-overflow-tooltip />
             <el-table-column label="鐗╁搧绫诲瀷" prop="itemType" show-overflow-tooltip />
-            <el-table-column label="鍏ュ簱鏁伴噺" prop="inboundNum" show-overflow-tooltip />
+						<el-table-column label="鍏ュ簱鏁伴噺" prop="inboundNum" width="100" show-overflow-tooltip />
+<!--						<el-table-column label="鍓╀綑搴撳瓨" prop="inboundNum0" show-overflow-tooltip />-->
 						<el-table-column label="鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" width="150"></el-table-column>
 						<el-table-column label="鎬讳环(鍏�)" prop="taxInclusiveTotalPrice" width="150"></el-table-column>
 <!--            <el-table-column label="鍚◣鍗曚环" prop="taxInclusiveUnitPrice" width="100" show-overflow-tooltip />-->
@@ -275,6 +278,26 @@
   apiCall.then(res => {
     tableLoading.value = false
     tableData.value = res.data.records
+    
+    // 鍓嶇璁$畻鎬讳环锛氭�讳环 = unitPrice * inboundNum
+    tableData.value = tableData.value.map(item => {
+      // 浣跨敤鍏ュ簱鏁伴噺璁$畻鎬讳环
+      const inboundNum = Number(item.inboundNum) || 0
+      const unitPrice = Number(item.unitPrice) || 0
+      const taxInclusiveUnitPrice = Number(item.taxInclusiveUnitPrice) || 0
+      
+      // 鏍规嵁鏍囩椤电被鍨嬭绠椾笉鍚岀殑鎬讳环
+      if (activeTab.value === 'production') {
+        // 鎴愬搧搴撳瓨锛氭�讳环 = unitPrice * 鍏ュ簱鏁伴噺
+        item.totalPrice = (unitPrice * inboundNum).toFixed(2)
+      } else {
+        // 鍘熸枡鍜屾潗鏂欏簱瀛橈細鍚◣鎬讳环 = taxInclusiveUnitPrice * 鍏ュ簱鏁伴噺
+        item.taxInclusiveTotalPrice = (taxInclusiveUnitPrice * inboundNum).toFixed(2)
+      }
+      
+      return item
+    })
+    
     total.value = res.data.total
   }).catch(() => {
     tableLoading.value = false
@@ -386,3 +409,5 @@
 
 <style scoped lang="scss"></style>
 
+
+

--
Gitblit v1.9.3