From 0f8771cce3b42c6857f738256cec3e0728f88353 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期一, 08 六月 2026 13:45:47 +0800
Subject: [PATCH] 入库审批增加含水量

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

diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index 0193f54..c560cb7 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -218,8 +218,8 @@
             </el-button>
             <el-button link
                        type="primary"
-                       @click="handleStockIn(scope.row)"
-                       :disabled="scope.row.approvalStatus !== 3 || scope.row.stockInStatus === '瀹屽叏鍏ュ簱'">鍏ュ簱
+                       :disabled="scope.row.approvalStatus !== 3 || scope.row.stockInStatus === '瀹屽叏鍏ュ簱'"
+                       @click="handleStockIn(scope.row)">鍏ュ簱
             </el-button>
             <el-button link
                        type="primary"
@@ -810,8 +810,8 @@
     getPurchaseTemplateList,
     delPurchaseTemplate,
     batchGeneratePurchaseInboundSteps,
+    manualStockIn,
   } from "@/api/procurementManagement/procurementLedger.js";
-  import { addSutockIn } from "@/api/inventoryManagement/stockIn.js";
   import useFormData from "@/hooks/useFormData.js";
   const FileList = defineAsyncComponent(() =>
     import("@/components/Dialog/FileList.vue")
@@ -845,12 +845,9 @@
   });
   const total = ref(0);
   const fileList = ref([]);
-  import useUserStore from "@/store/modules/user";
   import { modelList, productTreeList } from "@/api/basicData/product.js";
   import dayjs from "dayjs";
   import FileUpload from "@/components/AttachmentUpload/file/index.vue";
-
-  const userStore = useUserStore();
 
   // 璁㈠崟瀹℃壒鐘舵�佹樉绀烘枃鏈�
   const approvalStatusText = {
@@ -1407,18 +1404,16 @@
       stockInLoading.value = true;
       const params = {
         purchaseLedgerId: stockInForm.purchaseLedgerId,
-        purchaseContractNumber: stockInForm.purchaseContractNumber,
-        nickName: userStore.nickName,
         details: stockInForm.details.map(item => ({
           id: item.id,
-          inboundQuantity: item.inboundQuantity,
-          isContainsWater: item.isContainsWater,
-          waterContent: item.isContainsWater ? item.waterContent : 0,
-          actualInboundQuantity: item.actualInboundQuantity,
+          inboundQuantity: Number(item.inboundQuantity),
+          isContainsWater: !!item.isContainsWater,
+          waterContent: item.isContainsWater ? Number(item.waterContent || 0) : 0,
+          actualInboundQuantity: Number(item.actualInboundQuantity),
         })),
       };
 
-      const res = await addSutockIn(params);
+      const res = await manualStockIn(params);
       if (res.code === 200) {
         proxy.$modal.msgSuccess("鍏ュ簱鎴愬姛");
         stockInDialogVisible.value = false;
@@ -1927,8 +1922,8 @@
       proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
       return;
     }
-    const ids = selectedRows.value.map((item) => item.id);
-    
+    const ids = selectedRows.value.map(item => item.id);
+
     ElMessageBox.confirm("纭鎵归噺鐢熸垚鏁版嵁锛�", "鎵归噺鐢熸垚", {
       confirmButtonText: "纭",
       cancelButtonText: "鍙栨秷",
@@ -1937,7 +1932,7 @@
       .then(() => {
         proxy.$modal.loading("姝e湪鎵归噺鐢熸垚鏁版嵁锛岃绋嶅��...");
         batchGeneratePurchaseInboundSteps({ ids })
-          .then((res) => {
+          .then(res => {
             proxy.$modal.msgSuccess("鎵归噺鐢熸垚鎴愬姛");
             getList();
           })

--
Gitblit v1.9.3