From a0111e18d44d0c78e5479f6dfba7b80c29fd0ebf Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 13 八月 2026 13:33:59 +0800
Subject: [PATCH] 湟水峡 1.入库管理、出库台账添加产品大类和规格型号查询条件
---
src/views/inventoryManagement/receiptManagement/Record.vue | 56 ++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 36 insertions(+), 20 deletions(-)
diff --git a/src/views/inventoryManagement/receiptManagement/Record.vue b/src/views/inventoryManagement/receiptManagement/Record.vue
index cd103ea..0fd043a 100644
--- a/src/views/inventoryManagement/receiptManagement/Record.vue
+++ b/src/views/inventoryManagement/receiptManagement/Record.vue
@@ -15,6 +15,11 @@
style="width: 240px"
placeholder="璇疯緭鍏�"
clearable/>
+ <span class="search_title ml10">瑙勬牸鍨嬪彿锛�</span>
+ <el-input v-model="searchForm.model"
+ style="width: 240px"
+ placeholder="璇疯緭鍏�"
+ clearable/>
<span class="search_title ml10">鏉ユ簮锛�</span>
<el-select v-model="searchForm.recordType"
style="width: 240px"
@@ -115,10 +120,9 @@
const {proxy} = getCurrentInstance();
const props = defineProps({
- type: {
- type: String,
- required: true,
- default: '0'
+ productId: {
+ type: [String, Number],
+ default: ''
}
})
@@ -129,13 +133,14 @@
const stockRecordTypeOptions = ref([]);
const page = reactive({
current: 1,
- size: 100,
+ size: 10,
});
const total = ref(0);
const data = reactive({
searchForm: {
productName: "",
+ model: "",
timeStr: "",
recordType: "",
},
@@ -160,13 +165,15 @@
const getList = () => {
tableLoading.value = true;
- const params = {...page, type: props.type};
+ const params = {...page, topParentProductId: props.productId};
params.timeStr = searchForm.value.timeStr;
params.productName = searchForm.value.productName;
+ params.model = searchForm.value.model;
params.recordType = searchForm.value.recordType;
getStockInRecordListPage(params)
.then(res => {
tableData.value = res.data.records;
+ total.value = res.data.total || 0;
}).finally(() => {
tableLoading.value = false;
})
@@ -174,17 +181,20 @@
// 鑾峰彇鏉ユ簮绫诲瀷閫夐」
const fetchStockRecordTypeOptions = () => {
- if (props.type === '0') {
- findAllQualifiedStockInRecordTypeOptions()
- .then(res => {
- stockRecordTypeOptions.value = res.data;
- })
- return
- }
- findAllUnQualifiedStockInRecordTypeOptions()
- .then(res => {
- stockRecordTypeOptions.value = res.data;
- })
+ // 鍚屾椂鑾峰彇鍚堟牸鍜屼笉鍚堟牸鐨勬潵婧愮被鍨嬮�夐」
+ Promise.all([
+ findAllQualifiedStockInRecordTypeOptions(),
+ findAllUnQualifiedStockInRecordTypeOptions()
+ ]).then(([qualifiedRes, unQualifiedRes]) => {
+ const qualified = qualifiedRes.data || [];
+ const unQualified = unQualifiedRes.data || [];
+ // 鍚堝苟骞跺幓閲�
+ const allOptions = [...qualified, ...unQualified];
+ const uniqueOptions = allOptions.filter((item, index, self) =>
+ index === self.findIndex((t) => t.value === item.value)
+ );
+ stockRecordTypeOptions.value = uniqueOptions;
+ });
}
// 琛ㄦ牸閫夋嫨鏁版嵁
@@ -202,8 +212,7 @@
type: "warning",
})
.then(() => {
- // 鏍规嵁涓嶅悓鐨� tab 绫诲瀷璋冪敤涓嶅悓鐨勫鍑烘帴鍙�
- proxy.download("/stockInRecord/exportStockInRecord", {type: props.type}, props.type === '0' ? "鍚堟牸鍏ュ簱.xlsx" : "涓嶅悎鏍煎叆搴�.xlsx");
+ proxy.download("/stockInRecord/exportStockInRecord", { topParentProductId: props.productId }, "鍏ュ簱鍙拌处.xlsx");
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
@@ -244,7 +253,14 @@
});
</script>
-<style scoped lang="scss"></style>
+<style scoped lang="scss">
+.search_form {
+ flex-direction: column;
+ align-items: flex-start;
+ justify-content: flex-start;
+ gap: 10px;
+}
+</style>
--
Gitblit v1.9.3