From fa4ea8dd99638f58da60ac283186113619cc7e6e Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 23 一月 2026 16:11:57 +0800
Subject: [PATCH] Merge branch 'dev_New' of http://114.132.189.42:9002/r/product-inventory-management into dev_New
---
src/views/inventoryManagement/stockManagement/New.vue | 33 +++++++++++++++++++++++++--------
1 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/src/views/inventoryManagement/stockManagement/New.vue b/src/views/inventoryManagement/stockManagement/New.vue
index 8243748..751c639 100644
--- a/src/views/inventoryManagement/stockManagement/New.vue
+++ b/src/views/inventoryManagement/stockManagement/New.vue
@@ -69,11 +69,18 @@
import {ref, computed, getCurrentInstance} from "vue";
import ProductSelectDialog from "@/views/basicData/product/ProductSelectDialog.vue";
import {createStockInventory} from "@/api/inventoryManagement/stockInventory.js";
+import {createStockUnInventory} from "@/api/inventoryManagement/stockUninventory.js";
const props = defineProps({
visible: {
type: Boolean,
required: true,
+ },
+
+ type: {
+ type: String,
+ required: true,
+ default: 'qualified',
},
});
@@ -119,7 +126,6 @@
const handleProductSelect = async (products) => {
if (products && products.length > 0) {
const product = products[0];
- console.log(product)
formState.value.productId = product.productId;
formState.value.productName = product.productName;
formState.value.productModelName = product.model;
@@ -143,13 +149,24 @@
proxy.$modal.msgError("璇烽�夋嫨瑙勬牸");
return;
}
- createStockInventory(formState.value).then(res => {
- // 鍏抽棴妯℃�佹
- isShow.value = false;
- // 鍛婄煡鐖剁粍浠跺凡瀹屾垚
- emit('completed');
- proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
- })
+ if (props.type === 'qualified') {
+ createStockInventory(formState.value).then(res => {
+ // 鍏抽棴妯℃�佹
+ isShow.value = false;
+ // 鍛婄煡鐖剁粍浠跺凡瀹屾垚
+ emit('completed');
+ proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+ })
+ } else {
+ createStockUnInventory(formState.value).then(res => {
+ // 鍏抽棴妯℃�佹
+ isShow.value = false;
+ // 鍛婄煡鐖剁粍浠跺凡瀹屾垚
+ emit('completed');
+ proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+ })
+ }
+
}
})
};
--
Gitblit v1.9.3