From 519211ac232866afe6b081ae4a97916ad5f1d7d2 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 27 一月 2026 17:58:57 +0800
Subject: [PATCH] fix: 排名样式修改

---
 src/views/inventoryManagement/stockManagement/Subtract.vue |   34 +++++++++++++++++++++++++---------
 1 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/src/views/inventoryManagement/stockManagement/Subtract.vue b/src/views/inventoryManagement/stockManagement/Subtract.vue
index 10fd763..a277a00 100644
--- a/src/views/inventoryManagement/stockManagement/Subtract.vue
+++ b/src/views/inventoryManagement/stockManagement/Subtract.vue
@@ -69,6 +69,7 @@
 import {ref, computed, getCurrentInstance} from "vue";
 import ProductSelectDialog from "@/views/basicData/product/ProductSelectDialog.vue";
 import {subtractStockInventory} from "@/api/inventoryManagement/stockInventory.js";
+import {subtractStockUnInventory} from "@/api/inventoryManagement/stockUninventory.js";
 
 const props = defineProps({
   visible: {
@@ -78,7 +79,12 @@
   record: {
     type: Object,
     default: () => {},
-  }
+  },
+  type: {
+    type: String,
+    required: true,
+    default: 'qualified',
+  },
 });
 
 const emit = defineEmits(['update:visible', 'completed']);
@@ -88,7 +94,7 @@
 })
 
 const maxQuality = computed(() => {
-  return props.record.qualitity ? props.record.qualitity :  0;
+  return props.record.unLockedQuantity ? props.record.unLockedQuantity :  0;
 })
 
 const initFormData = () => {
@@ -163,13 +169,23 @@
         proxy.$modal.msgError("璇烽�夋嫨瑙勬牸");
         return;
       }
-      subtractStockInventory(formState.value).then(res => {
-        // 鍏抽棴妯℃�佹
-        isShow.value = false;
-        // 鍛婄煡鐖剁粍浠跺凡瀹屾垚
-        emit('completed');
-        proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
-      })
+      if (props.type === 'qualified') {
+        subtractStockInventory(formState.value).then(res => {
+          // 鍏抽棴妯℃�佹
+          isShow.value = false;
+          // 鍛婄煡鐖剁粍浠跺凡瀹屾垚
+          emit('completed');
+          proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+        })
+      } else {
+        subtractStockUnInventory(formState.value).then(res => {
+          // 鍏抽棴妯℃�佹
+          isShow.value = false;
+          // 鍛婄煡鐖剁粍浠跺凡瀹屾垚
+          emit('completed');
+          proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+        })
+      }
     }
   })
 };

--
Gitblit v1.9.3