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/dispatchLog/Record.vue | 62 ++++++++++++++++++++-----------
1 files changed, 40 insertions(+), 22 deletions(-)
diff --git a/src/views/inventoryManagement/dispatchLog/Record.vue b/src/views/inventoryManagement/dispatchLog/Record.vue
index 73792da..5602213 100644
--- a/src/views/inventoryManagement/dispatchLog/Record.vue
+++ b/src/views/inventoryManagement/dispatchLog/Record.vue
@@ -12,6 +12,16 @@
clearable
@change="handleQuery"
/>
+ <span class="search_title ml10">浜у搧澶х被锛�</span>
+ <el-input v-model="searchForm.productName"
+ 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"
@@ -112,9 +122,7 @@
delStockOut,
} from "@/api/inventoryManagement/stockOut.js";
import {
- findAllQualifiedStockRecordTypeOptions,
- findAllStockRecordTypeOptions,
- findAllUnqualifiedStockRecordTypeOptions
+ findAllQualifiedStockOutRecordTypeOptions, findAllUnQualifiedStockOutRecordTypeOptions,
} from "@/api/basicData/enum.js";
const userStore = useUserStore();
@@ -131,10 +139,9 @@
const total = ref(0);
const props = defineProps({
- type: {
- type: String,
- required: true,
- default: '0'
+ productId: {
+ type: [String, Number],
+ default: ''
}
})
@@ -146,6 +153,8 @@
const data = reactive({
searchForm: {
supplierName: "",
+ productName: "",
+ model: "",
timeStr: "",
recordType: "",
}
@@ -165,7 +174,7 @@
};
const getList = () => {
tableLoading.value = true;
- getStockOutPage({ ...searchForm.value, ...page, type: props.type })
+ getStockOutPage({ ...searchForm.value, ...page, topParentProductId: props.productId })
.then((res) => {
tableLoading.value = false;
tableData.value = res.data.records;
@@ -185,17 +194,20 @@
// 鑾峰彇鏉ユ簮绫诲瀷閫夐」
const fetchStockRecordTypeOptions = () => {
- if (props.type === '0') {
- findAllQualifiedStockRecordTypeOptions()
- .then(res => {
- stockRecordTypeOptions.value = res.data;
- })
- return
- }
- findAllUnqualifiedStockRecordTypeOptions()
- .then(res => {
- stockRecordTypeOptions.value = res.data;
- })
+ // 鍚屾椂鑾峰彇鍚堟牸鍜屼笉鍚堟牸鐨勬潵婧愮被鍨嬮�夐」
+ Promise.all([
+ findAllQualifiedStockOutRecordTypeOptions(),
+ findAllUnQualifiedStockOutRecordTypeOptions()
+ ]).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;
+ });
}
// 琛ㄦ牸閫夋嫨鏁版嵁
@@ -214,7 +226,7 @@
type: "warning",
})
.then(() => {
- proxy.download("/stockmanagement/export", {}, "鍑哄簱鍙拌处.xlsx");
+ proxy.download("/stockOutRecord/exportStockOutRecord", { topParentProductId: props.productId }, "鍑哄簱鍙拌处.xlsx");
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
@@ -407,7 +419,6 @@
<div class="print-page">
<div class="delivery-note">
<div class="header">
- <div class="company-name">榧庤瘹鐟炲疄涓氭湁闄愯矗浠诲叕鍙�</div>
<div class="document-title">闆跺敭鍙戣揣鍗�</div>
</div>
@@ -419,7 +430,7 @@
</div>
<div>
<span class="label">瀹㈡埛鍚嶇О锛�</span>
- <span class="value">${item.supplierName || '寮犵埍鏈�'}</span>
+ <span class="value">${item.supplierName}</span>
</div>
</div>
<div class="info-row">
@@ -542,6 +553,13 @@
</script>
<style scoped lang="scss">
+.search_form {
+ flex-direction: column;
+ align-items: flex-start;
+ justify-content: flex-start;
+ gap: 10px;
+}
+
.print-preview-dialog {
.el-dialog__body {
padding: 0;
--
Gitblit v1.9.3