From 4fd0a0ccf35a239fe8c8f9385db2e8c4a0ad2f04 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期六, 25 四月 2026 15:24:40 +0800
Subject: [PATCH] fix: 添加二维码功能,可以直接扫码下载。
---
src/views/inventoryManagement/stockManagement/New.vue | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/views/inventoryManagement/stockManagement/New.vue b/src/views/inventoryManagement/stockManagement/New.vue
index 653e027..eebe313 100644
--- a/src/views/inventoryManagement/stockManagement/New.vue
+++ b/src/views/inventoryManagement/stockManagement/New.vue
@@ -99,9 +99,9 @@
</template>
<script setup>
-import {ref, computed, getCurrentInstance} from "vue";
+import {ref, computed, watch, getCurrentInstance} from "vue";
import ProductSelectDialog from "@/views/basicData/product/ProductSelectDialog.vue";
-import {createStockInventory} from "@/api/inventoryManagement/stockInventory.js";
+import {addStockInRecordOnly} from "@/api/inventoryManagement/stockInventory.js";
import {createStockUnInventory} from "@/api/inventoryManagement/stockUninventory.js";
const props = defineProps({
@@ -127,7 +127,7 @@
unit: "",
type: undefined,
qualitity: 0,
- batchNo: "",
+ batchNo: null,
warnNum: 0,
remark: '',
});
@@ -143,6 +143,13 @@
const showProductSelectDialog = ref(false);
+// 鎵瑰彿涓虹┖鏃惰浆涓� null
+watch(() => formState.value.batchNo, (val) => {
+ if (val === '') {
+ formState.value.batchNo = null;
+ }
+});
+
let { proxy } = getCurrentInstance()
const closeModal = () => {
@@ -155,7 +162,7 @@
unit: "",
type: undefined,
qualitity: 0,
- batchNo: "",
+ batchNo: null,
warnNum: 0,
remark: '',
};
@@ -190,7 +197,7 @@
return;
}
if (formState.value.type === 'qualified') {
- createStockInventory(formState.value).then(res => {
+ addStockInRecordOnly(formState.value).then(res => {
// 鍏抽棴妯℃�佹
isShow.value = false;
// 鍛婄煡鐖剁粍浠跺凡瀹屾垚
--
Gitblit v1.9.3