From e00905e53ee5d91d9e488ecf5ece3e25b9889436 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 20 一月 2026 16:14:44 +0800
Subject: [PATCH] 湟水峡 1.采购模块不要项目名称 2.加一个有待回款登记的提示 3.回款登记、付款登记改成和销售订单价格关联,并且可以多个一起回款或付款 4.合同管理不要下载合同了,跟合同相关的字段可以去掉了 5.重构生产模块 6.测试流程并修改bug

---
 src/views/inventoryManagement/receiptManagement/components/formDiaProduct.vue |   88 +++++++++----------------------------------
 1 files changed, 19 insertions(+), 69 deletions(-)

diff --git a/src/views/inventoryManagement/receiptManagement/components/formDiaManual.vue b/src/views/inventoryManagement/receiptManagement/components/formDiaProduct.vue
similarity index 75%
rename from src/views/inventoryManagement/receiptManagement/components/formDiaManual.vue
rename to src/views/inventoryManagement/receiptManagement/components/formDiaProduct.vue
index 8a10912..6048e18 100644
--- a/src/views/inventoryManagement/receiptManagement/components/formDiaManual.vue
+++ b/src/views/inventoryManagement/receiptManagement/components/formDiaProduct.vue
@@ -31,23 +31,6 @@
             <el-input v-model="scope.row.unit" placeholder="璇疯緭鍏ュ崟浣�" />
           </template>
         </el-table-column>
-        <el-table-column label="渚涘簲鍟�" prop="supplierName" width="200">
-          <template #default="scope">
-            <el-input v-model="scope.row.supplierName" placeholder="璇疯緭鍏ヤ緵搴斿晢" />
-          </template>
-        </el-table-column>
-        <el-table-column label="鐗╁搧绫诲瀷" prop="itemType" width="140">
-          <template #default="scope">
-            <el-select v-model="scope.row.itemType" placeholder="璇烽�夋嫨鐗╁搧绫诲瀷" style="width: 100%">
-              <el-option
-                v-for="item in itemTypeOptions"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              />
-            </el-select>
-          </template>
-        </el-table-column>
         <el-table-column label="鍏ュ簱鏁伴噺" prop="inboundNum" width="150">
           <template #default="scope">
             <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.inboundNum" @change="() => calculateTotalPrice(scope.row)" />
@@ -65,44 +48,16 @@
             />
           </template>
         </el-table-column>
-        <el-table-column label="绋庣巼(%)" prop="taxRate" width="150">
+        <el-table-column label="鍗曚环(鍏�)" prop="unitPrice" width="150">
           <template #default="scope">
-            <el-select v-model="scope.row.taxRate" placeholder="璇烽�夋嫨绋庣巼" style="width: 100%" @change="() => calculateExclusivePrice(scope.row)">
-              <el-option
-                v-for="item in taxRateOptions"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value"
-              />
-            </el-select>
+            <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.unitPrice" @change="() => calculateTotalPrice(scope.row)" />
           </template>
         </el-table-column>
-        <el-table-column
-          label="鍚◣鍗曚环(鍏�)"
-          prop="taxInclusiveUnitPrice"
-          width="180"
-        >
-          <template #default="scope">
-            <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.taxInclusiveUnitPrice" @change="calculateTotalPrice(scope.row)" />
-          </template>
-        </el-table-column>
-        <el-table-column
-          label="鍚◣鎬讳环(鍏�)"
-          prop="taxInclusiveTotalPrice"
-          width="180"
-        >
-          <template #default="scope">
-            <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.taxInclusiveTotalPrice" @change="calculateExclusivePrice(scope.row)" />
-          </template>
-        </el-table-column>
-        <el-table-column
-          label="涓嶅惈绋庢�讳环(鍏�)"
-          prop="taxExclusiveTotalPrice"
-          width="180"
-        >
-          <template #default="scope">
-            <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="scope.row.taxExclusiveTotalPrice" />
-          </template>
+        <el-table-column 
+           label="鎬讳环(鍏�)" 
+           prop="totalPrice" 
+           width="150" 
+         >
         </el-table-column>
         <el-table-column label="鎿嶄綔" width="80" v-if="operationType === 'add'">
           <template #default="scope">
@@ -124,8 +79,7 @@
 import { ref, reactive, toRefs, getCurrentInstance } from 'vue'
 import useUserStore from '@/store/modules/user'
 import {
-  addStockInCustom,
-  updateStockInCustom,
+	addStockInCustom, updateProduct
 } from "@/api/inventoryManagement/stockIn.js";
 
 const userStore = useUserStore()
@@ -199,9 +153,10 @@
     itemType: '',
     inboundNum: 0,
     inboundDate: '',
+    quantityStock: 0,
+    unitPrice: 0,
+    totalPrice: 0,
     taxRate: null,
-    taxInclusiveUnitPrice: 0,
-    taxInclusiveTotalPrice: 0,
     taxExclusiveTotalPrice: 0,
   });
 };
@@ -211,17 +166,18 @@
   productList.value.splice(index, 1);
 };
 
-// 璁$畻鍚◣鎬讳环锛堟牴鎹崟浠峰拰鏁伴噺锛�
+// 璁$畻鎬讳环锛堟牴鎹暟閲忋�佸崟浠峰拰鍚◣鍗曚环锛�
 const calculateTotalPrice = (row) => {
-  const unitPrice = Number(row.taxInclusiveUnitPrice || 0);
+  // 璁$畻鏅�氭�讳环锛歩nboundNum * unitPrice
   const quantity = Number(row.inboundNum || 0);
-  row.taxInclusiveTotalPrice = unitPrice * quantity;
+  const unitPrice = Number(row.unitPrice || 0);
+  row.totalPrice = quantity * unitPrice;
   calculateExclusivePrice(row);
 };
 
 // 璁$畻涓嶅惈绋庢�讳环锛堟牴鎹惈绋庢�讳环鍜岀◣鐜囷級
 const calculateExclusivePrice = (row) => {
-  const totalPrice = Number(row.taxInclusiveTotalPrice || 0);
+  const totalPrice = Number(row.totalPrice || 0);
   const taxRate = Number(row.taxRate || 0);
   row.taxExclusiveTotalPrice = totalPrice / (1 + taxRate / 100);
 };
@@ -240,10 +196,6 @@
       const product = productList.value[i];
       if (!product.productCategory || !product.specificationModel || !product.unit) {
         proxy.$modal.msgError(`绗�${i + 1}琛屼骇鍝佹暟鎹湭濉啓瀹屾暣锛堜骇鍝佸ぇ绫汇�佽鏍煎瀷鍙枫�佸崟浣嶄负蹇呭~锛塦)
-        return
-      }
-      if (!product.itemType) {
-        proxy.$modal.msgError(`绗�${i + 1}琛岃閫夋嫨鐗╁搧绫诲瀷`)
         return
       }
       if (!product.inboundDate) {
@@ -267,14 +219,13 @@
       itemType: product.itemType,
       inboundDate: formatDateTime(product.inboundDate, false),
       taxRate: Number(product.taxRate || 0),
-      taxInclusiveUnitPrice: Number(product.taxInclusiveUnitPrice || 0),
-      taxInclusiveTotalPrice: Number(product.taxInclusiveTotalPrice || 0),
       taxExclusiveTotalPrice: Number(product.taxExclusiveTotalPrice || 0),
+			unitPrice: Number(product.unitPrice || 0),
     }));
     loading.value = true
     if (operationType.value === 'edit') {
       const editPayload = payloadList[0]
-      await updateStockInCustom(editPayload)
+      await updateProduct(editPayload)
     } else {
       await addStockInCustom(payloadList)
     }
@@ -336,8 +287,7 @@
       inboundNum: Number(row?.inboundNum ?? row?.inboundQuantity ?? 0),
       inboundDate: row?.inboundDate ?? row?.createTime ?? '',
       taxRate: Number(row?.taxRate ?? 0),
-      taxInclusiveUnitPrice: Number(row?.taxInclusiveUnitPrice ?? 0),
-      taxInclusiveTotalPrice: Number(row?.taxInclusiveTotalPrice ?? 0),
+      unitPrice: Number(row?.unitPrice ?? 0),
       taxExclusiveTotalPrice: Number(row?.taxExclusiveTotalPrice ?? 0),
     }]
   }

--
Gitblit v1.9.3