From 3d4355d8791c7e990377c7a2abc5ce238e752e91 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 26 一月 2026 17:36:05 +0800
Subject: [PATCH] 进销存-升级 1.销售台账页面代码重构 2.发货台账页面联调 3.采购台账代码重构,采购模版添加修改和删除,逻辑完善 4.采购审批页面逻辑修改完善 5.采购台账、销售台账导入和下载模版修改
---
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