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/components/formDia.vue |   28 +++++++++++++++-------------
 1 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/src/views/inventoryManagement/receiptManagement/components/formDia.vue b/src/views/inventoryManagement/receiptManagement/components/formDia.vue
index 6bb7b6c..3bd3390 100644
--- a/src/views/inventoryManagement/receiptManagement/components/formDia.vue
+++ b/src/views/inventoryManagement/receiptManagement/components/formDia.vue
@@ -46,15 +46,15 @@
           </template>
         </el-table-column>
         <el-table-column label="绋庣巼(%)" prop="taxRate" width="120" />
-        <el-table-column label="鍗曚环(鍏�)" prop="unitPrice" width="150">
+        <el-table-column label="鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" width="150">
 					<template #default="scope">
-						<el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.unitPrice" @change="() => calculateTotalPrice(scope.row)" />
+						<el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.taxInclusiveUnitPrice" @change="() => calculateTotalPrice(scope.row)" :disabled="operationType === 'edit'"/>
 					</template>
 				</el-table-column>
         <el-table-column
           label="鎬讳环(鍏�)"
 					:formatter="formattedNumber"
-          prop="totalPrice"
+          prop="taxInclusiveTotalPrice"
           width="150"
         >
         </el-table-column>
@@ -194,12 +194,12 @@
 // 璁$畻鎬讳环
 const calculateTotalPrice = (row) => {
   const quantityStock = Number(row?.quantityStock ?? 0);
-  const unitPrice = Number(row?.unitPrice ?? 0);
+  const taxInclusiveUnitPrice = Number(row?.taxInclusiveUnitPrice ?? 0);
   
-  if (Number.isFinite(quantityStock) && Number.isFinite(unitPrice)) {
-    row.totalPrice = quantityStock * unitPrice;
+  if (Number.isFinite(quantityStock) && Number.isFinite(taxInclusiveUnitPrice)) {
+    row.taxInclusiveTotalPrice = quantityStock * taxInclusiveUnitPrice;
   } else {
-    row.totalPrice = 0;
+    row.taxInclusiveTotalPrice = 0;
   }
 };
 
@@ -221,8 +221,8 @@
     productList.value = productRes.data.map(item => ({
       ...item,
       quantityStock: 0,
-      unitPrice: Number(item?.unitPrice ?? 0),
-      totalPrice: 0,
+      taxInclusiveUnitPrice: Number(item?.taxInclusiveUnitPrice ?? 0),
+      taxInclusiveTotalPrice: 0,
       originalQuantityStock: Number(item.quantityStock ?? item.inboundQuantity ?? 0),
     }))
   } catch (error) {
@@ -290,8 +290,8 @@
       details: selectedRows.value.map(product => ({
         id: product.id,
         inboundQuantity: Number(product.quantityStock),
-				unitPrice: Number(product.unitPrice),
-				totalPrice: Number(product.totalPrice)
+				taxInclusiveUnitPrice: Number(product.taxInclusiveUnitPrice),
+				taxInclusiveTotalPrice: Number(product.taxInclusiveTotalPrice)
       })),
     };
     loading.value = true
@@ -373,8 +373,8 @@
       productList.value = res.data.map(item => ({
         ...item,
         quantityStock: Number(item.quantityStock ?? item.inboundQuantity ?? row.inboundNum ?? 0),
-        unitPrice: Number(item?.unitPrice ?? 0),
-        totalPrice: Number(item?.quantityStock ?? 0) * Number(item?.unitPrice ?? 0),
+        taxInclusiveUnitPrice: Number(item?.taxInclusiveUnitPrice ?? 0),
+        taxInclusiveTotalPrice: Number(item?.quantityStock ?? 0) * Number(item?.taxInclusiveUnitPrice ?? 0),
         originalQuantityStock: Number(item.quantityStock ?? item.inboundQuantity ?? row.inboundNum ?? 0),
       }))
       selectedRows.value = productList.value
@@ -395,3 +395,5 @@
 
 <style scoped lang="scss"></style>
 
+
+

--
Gitblit v1.9.3