diff --git a/src/views/wms/inStockBill/index.vue b/src/views/wms/inStockBill/index.vue index 152bbee..74db667 100644 --- a/src/views/wms/inStockBill/index.vue +++ b/src/views/wms/inStockBill/index.vue @@ -219,7 +219,7 @@
添加入库物料
- 选择物料 + 选择物料

已选择的物料:

@@ -353,11 +353,14 @@ const getProjectName = (projectId) => { const project = projectInfoList.value.find((item) => item.projectId === projectId); return project ? project.projectCode : projectId; }; +// 添加物料选择loading状态 +const productSelectLoading = ref(false); // 处理物料选择回调 const handleProductSelect = async (products) => { // 重置所有的物料 // selectedProducts.value = products; // 为每个物料添加批次号 + productSelectLoading.value = true; const timestamp = parseTime(new Date(), '{y}{m}{d}'); for (const material of products) { // 生成批次号:供应商代码 + 时间戳 @@ -372,6 +375,7 @@ const handleProductSelect = async (products) => { const res = await getWmsInventoryDetailbyProductId(material.productId); material.inventoryAmount = res.data?.inventoryAmount || 0; } + productSelectLoading.value = false; selectedProducts.value.push(...products); }; @@ -396,8 +400,6 @@ const inStockBillFormRef = ref(); const addFormRef = ref(); - - // 计算总价 const calculateTotalPrice = (material) => { if (material.unitPrice && material.inStockAmount) { diff --git a/src/views/wms/wmsBaseProduct/index.vue b/src/views/wms/wmsBaseProduct/index.vue index 196ee49..1726f3b 100644 --- a/src/views/wms/wmsBaseProduct/index.vue +++ b/src/views/wms/wmsBaseProduct/index.vue @@ -68,7 +68,7 @@ - +