From ef0aecb46fedc89368326f31592dacecc7aaaed4 Mon Sep 17 00:00:00 2001
From: yaowanxin <3588231647@qq.com>
Date: 星期五, 23 一月 2026 15:24:39 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_New' into dev_New
---
src/views/inventoryManagement/receiptManagement/Record.vue | 50 ++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 44 insertions(+), 6 deletions(-)
diff --git a/src/views/inventoryManagement/receiptManagement/Record.vue b/src/views/inventoryManagement/receiptManagement/Record.vue
index ec64f17..a477547 100644
--- a/src/views/inventoryManagement/receiptManagement/Record.vue
+++ b/src/views/inventoryManagement/receiptManagement/Record.vue
@@ -15,6 +15,16 @@
style="width: 240px"
placeholder="璇疯緭鍏�"
clearable/>
+ <span class="search_title ml10">鏉ユ簮锛�</span>
+ <el-select v-model="searchForm.recordType"
+ style="width: 240px"
+ placeholder="璇烽�夋嫨"
+ clearable>
+ <el-option v-for="item in stockRecordTypeOptions"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"/>
+ </el-select>
<el-button type="primary"
@click="handleQuery"
style="margin-left: 10px">鎼滅储
@@ -66,6 +76,13 @@
<el-table-column label="鍏ュ簱浜�"
prop="createBy"
show-overflow-tooltip/>
+ <el-table-column label="鏉ユ簮"
+ prop="recordType"
+ show-overflow-tooltip>
+ <template #default="scope">
+ {{ getRecordType(scope.row.recordType) }}
+ </template>
+ </el-table-column>
</el-table>
<pagination v-show="total > 0"
:total="total"
@@ -85,13 +102,16 @@
toRefs,
onMounted,
getCurrentInstance,
- nextTick,
} from "vue";
import {ElMessageBox} from "element-plus";
import {
getStockInRecordListPage,
batchDeleteStockInRecords,
} from "@/api/inventoryManagement/stockInRecord.js";
+import {
+ findAllQualifiedStockRecordTypeOptions,
+ findAllUnqualifiedStockRecordTypeOptions
+} from "@/api/basicData/enum.js";
const {proxy} = getCurrentInstance();
@@ -106,8 +126,8 @@
const tableData = ref([]);
const selectedRows = ref([]);
const tableLoading = ref(false);
-const activeTab = ref("production"); // 褰撳墠婵�娲荤殑 tab
-
+// 鏉ユ簮绫诲瀷閫夐」
+const stockRecordTypeOptions = ref([]);
const page = reactive({
current: 1,
size: 100,
@@ -118,6 +138,7 @@
searchForm: {
productName: "",
timeStr: "",
+ recordType: "",
},
});
const {searchForm} = toRefs(data);
@@ -127,6 +148,10 @@
page.current = 1;
getList();
};
+
+const getRecordType = (recordType) => {
+ return stockRecordTypeOptions.value.find(item => item.value === recordType)?.label || ''
+}
const pageProductChange = obj => {
page.current = obj.page;
@@ -147,6 +172,21 @@
})
};
+// 鑾峰彇鏉ユ簮绫诲瀷閫夐」
+const fetchStockRecordTypeOptions = () => {
+ if (props.type === '0') {
+ findAllQualifiedStockRecordTypeOptions()
+ .then(res => {
+ stockRecordTypeOptions.value = res.data;
+ })
+ return
+ }
+ findAllUnqualifiedStockRecordTypeOptions()
+ .then(res => {
+ stockRecordTypeOptions.value = res.data;
+ })
+}
+
// 琛ㄦ牸閫夋嫨鏁版嵁
const handleSelectionChange = selection => {
selectedRows.value = selection.filter(item => item.id);
@@ -164,9 +204,6 @@
.then(() => {
// 鏍规嵁涓嶅悓鐨� tab 绫诲瀷璋冪敤涓嶅悓鐨勫鍑烘帴鍙�
let exportUrl = "/stockin/export";
- if (activeTab.value === "production") {
- exportUrl = "/stockin/exportOne";
- }
proxy.download(exportUrl, {}, "鍏ュ簱鍙拌处.xlsx");
})
.catch(() => {
@@ -204,6 +241,7 @@
onMounted(() => {
getList();
+ fetchStockRecordTypeOptions();
});
</script>
--
Gitblit v1.9.3