From 5ae955a6e8445717bcabb55c944334f0944f3b49 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 01 四月 2026 10:55:15 +0800
Subject: [PATCH] fix: 库存管理合格库区分成品和其他成品
---
src/views/inventoryManagement/stockManagement/Qualified.vue | 34 +++++++++++++++++++++++++++++-----
1 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/src/views/inventoryManagement/stockManagement/Qualified.vue b/src/views/inventoryManagement/stockManagement/Qualified.vue
index bcdf9bd..eb91974 100644
--- a/src/views/inventoryManagement/stockManagement/Qualified.vue
+++ b/src/views/inventoryManagement/stockManagement/Qualified.vue
@@ -2,11 +2,16 @@
<div class="app-container">
<div class="search_form">
<div>
- <span class="search_title ml10">浜у搧澶х被锛�</span>
+ <span class="search_title ml10">浜у搧绫诲瀷锛�</span>
+ <el-radio-group v-model="productScope" class="qualified-product-scope" @change="onProductScopeChange">
+ <el-radio-button label="鎴愬搧">鎴愬搧</el-radio-button>
+ <el-radio-button label="鍏朵粬浜у搧">鍏朵粬浜у搧</el-radio-button>
+ </el-radio-group>
+ <!-- <span class="search_title ml10" style="margin-left: 20px">浜у搧澶х被锛�</span>
<el-input v-model="searchForm.productName"
style="width: 240px"
placeholder="璇疯緭鍏�"
- clearable/>
+ clearable/> -->
<span class="search_title ml10" style="margin-left: 20px">瑙勬牸鍨嬪彿锛�</span>
<el-input v-model="searchForm.model"
style="width: 240px"
@@ -87,7 +92,7 @@
<script setup>
import pagination from '@/components/PIMTable/Pagination.vue'
-import { ref, reactive, toRefs, onMounted, getCurrentInstance } from 'vue'
+import { ref, reactive, toRefs, onMounted, getCurrentInstance, defineAsyncComponent } from 'vue'
import {ElMessage, ElMessageBox} from "element-plus";
import { getStockInventoryListPage } from "@/api/inventoryManagement/stockInventory.js";
const NewStockInventory = defineAsyncComponent(() => import("@/views/inventoryManagement/stockManagement/New.vue"));
@@ -124,6 +129,21 @@
})
const { searchForm } = toRefs(data)
+// 鎴愬搧(2) / 鍏朵粬浜у搧(鍘熸潗鏂�1銆佸崐鎴愬搧3)锛屼笌浜у搧绫诲瀷瀛楀吀涓�鑷达紱鍒嗛〉鎺ュ彛闇�鏀寔 productType 鎴� productTypes
+const productScope = ref('鎴愬搧')
+
+const getProductScopeParams = () => {
+ if (productScope.value === '鎴愬搧') {
+ return { productType: 2 }
+ }
+ return { productTypes: '1,3' }
+}
+
+const onProductScopeChange = () => {
+ page.current = 1
+ getList()
+}
+
// 鏌ヨ鍒楄〃
/** 鎼滅储鎸夐挳鎿嶄綔 */
const handleQuery = () => {
@@ -137,7 +157,7 @@
}
const getList = () => {
tableLoading.value = true
- getStockInventoryListPage({ ...searchForm.value, ...page }).then(res => {
+ getStockInventoryListPage({ ...searchForm.value, ...page, ...getProductScopeParams() }).then(res => {
tableLoading.value = false
tableData.value = res.data.records
total.value = res.data.total
@@ -207,7 +227,7 @@
type: 'warning',
}
).then(() => {
- proxy.download("/stockInventory/exportStockInventory", {}, '鍚堟牸搴撳瓨淇℃伅.xlsx')
+ proxy.download("/stockInventory/exportStockInventory", { ...searchForm.value, ...getProductScopeParams() }, '鍚堟牸搴撳瓨淇℃伅.xlsx')
}).catch(() => {
proxy.$modal.msg("宸插彇娑�")
})
@@ -219,6 +239,10 @@
</script>
<style scoped lang="scss">
+.qualified-product-scope {
+ vertical-align: middle;
+}
+
:deep(.row-low-stock td) {
background-color: #fde2e2;
color: #c45656;
--
Gitblit v1.9.3