From e94be34b586911ab4d58dc825d93400c966cc351 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期五, 23 一月 2026 13:47:21 +0800
Subject: [PATCH] 仓储物流:入库出库列表增加来源
---
src/views/inventoryManagement/dispatchLog/Record.vue | 55 +++++++++++++++++----------
src/api/basicData/enum.js | 8 ++++
src/api/inventoryManagement/stockUninventory.js | 4 +-
src/views/inventoryManagement/stockManagement/index.vue | 1
src/views/inventoryManagement/stockManagement/Qualified.vue | 2
src/views/inventoryManagement/stockManagement/Unqualified.vue | 2
src/api/inventoryManagement/stockInventory.js | 4 +-
src/views/inventoryManagement/receiptManagement/Record.vue | 40 +++++++++++++++++---
8 files changed, 83 insertions(+), 33 deletions(-)
diff --git a/src/api/basicData/enum.js b/src/api/basicData/enum.js
new file mode 100644
index 0000000..75bdfff
--- /dev/null
+++ b/src/api/basicData/enum.js
@@ -0,0 +1,8 @@
+import request from "@/utils/request.js";
+
+export function findAllStockRecordTypeOptions() {
+ return request({
+ url: '/basic/enum/stockRecordType',
+ method: 'get'
+ })
+}
diff --git a/src/api/inventoryManagement/stockInventory.js b/src/api/inventoryManagement/stockInventory.js
index c677ebf..3454ce4 100644
--- a/src/api/inventoryManagement/stockInventory.js
+++ b/src/api/inventoryManagement/stockInventory.js
@@ -13,7 +13,7 @@
return request({
url: "/stockInventory/addstockInventory",
method: "post",
- params,
+ data: params,
});
};
@@ -22,6 +22,6 @@
return request({
url: "/stockInventory/subtractStockInventory",
method: "post",
- params,
+ data: params,
});
};
diff --git a/src/api/inventoryManagement/stockUninventory.js b/src/api/inventoryManagement/stockUninventory.js
index 608866e..bdde283 100644
--- a/src/api/inventoryManagement/stockUninventory.js
+++ b/src/api/inventoryManagement/stockUninventory.js
@@ -13,7 +13,7 @@
return request({
url: "/stockUninventory/addstockUninventory",
method: "post",
- params,
+ data: params,
});
};
@@ -22,6 +22,6 @@
return request({
url: "/stockUninventory/subtractstockUninventory",
method: "post",
- params,
+ data: params,
});
};
diff --git a/src/views/inventoryManagement/dispatchLog/Record.vue b/src/views/inventoryManagement/dispatchLog/Record.vue
index 4fb41f0..48f5c10 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-select v-model="searchForm.recordType"
+ style="width: 240px"
+ placeholder="璇烽�夋嫨"
+ clearable>
+ <el-option v-for="item in stockRecordTypeOptions"
+ :key="item.value"
+ :label="item.value"
+ :value="item.key"/>
+ </el-select>
<el-button type="primary" @click="handleQuery" style="margin-left: 10px"
>鎼滅储</el-button
>
@@ -71,6 +81,13 @@
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"
@@ -94,12 +111,15 @@
getStockOutPage,
delStockOut,
} from "@/api/inventoryManagement/stockOut.js";
+import {findAllStockRecordTypeOptions} from "@/api/basicData/enum.js";
const userStore = useUserStore();
const { proxy } = getCurrentInstance();
const tableData = ref([]);
const selectedRows = ref([]);
const tableLoading = ref(false);
+// 鏉ユ簮绫诲瀷閫夐」
+const stockRecordTypeOptions = ref([]);
const page = reactive({
current: 1,
size: 100,
@@ -123,26 +143,8 @@
searchForm: {
supplierName: "",
timeStr: "",
- },
- form: {
- supplierId: null,
- supplierName: '',
- productId: null,
- productName: '',
- userId: userStore.userId,
- nickName: '',
- model: '',
- productModelId: null,
- unit: '',
- productrecordId: null,
- taxInclusiveUnitPrice: '',
- taxInclusiveTotalPrice: '',
- taxRate: '',
- taxExclusiveTotalPrice: '',
- inboundTime: '',
- inboundBatch: '',
- inboundQuantity: ''
- },
+ recordType: "",
+ }
});
const { searchForm } = toRefs(data);
@@ -172,6 +174,18 @@
tableLoading.value = false;
});
};
+
+const getRecordType = (recordType) => {
+ return stockRecordTypeOptions.value.find(item => item.key === recordType)?.value || ''
+}
+
+// 鑾峰彇鏉ユ簮绫诲瀷閫夐」
+const fetchStockRecordTypeOptions = () => {
+ findAllStockRecordTypeOptions()
+ .then(res => {
+ stockRecordTypeOptions.value = res.data;
+ })
+}
// 琛ㄦ牸閫夋嫨鏁版嵁
const handleSelectionChange = (selection) => {
@@ -512,6 +526,7 @@
};
onMounted(() => {
getList();
+ fetchStockRecordTypeOptions();
});
</script>
diff --git a/src/views/inventoryManagement/receiptManagement/Record.vue b/src/views/inventoryManagement/receiptManagement/Record.vue
index ec64f17..3000a8e 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.value"
+ :value="item.key"/>
+ </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,13 @@
toRefs,
onMounted,
getCurrentInstance,
- nextTick,
} from "vue";
import {ElMessageBox} from "element-plus";
import {
getStockInRecordListPage,
batchDeleteStockInRecords,
} from "@/api/inventoryManagement/stockInRecord.js";
+import {findAllStockRecordTypeOptions} from "@/api/basicData/enum.js";
const {proxy} = getCurrentInstance();
@@ -106,8 +123,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 +135,7 @@
searchForm: {
productName: "",
timeStr: "",
+ recordType: "",
},
});
const {searchForm} = toRefs(data);
@@ -127,6 +145,10 @@
page.current = 1;
getList();
};
+
+const getRecordType = (recordType) => {
+ return stockRecordTypeOptions.value.find(item => item.key === recordType)?.value || ''
+}
const pageProductChange = obj => {
page.current = obj.page;
@@ -147,6 +169,14 @@
})
};
+// 鑾峰彇鏉ユ簮绫诲瀷閫夐」
+const fetchStockRecordTypeOptions = () => {
+ findAllStockRecordTypeOptions()
+ .then(res => {
+ stockRecordTypeOptions.value = res.data;
+ })
+}
+
// 琛ㄦ牸閫夋嫨鏁版嵁
const handleSelectionChange = selection => {
selectedRows.value = selection.filter(item => item.id);
@@ -164,9 +194,6 @@
.then(() => {
// 鏍规嵁涓嶅悓鐨� tab 绫诲瀷璋冪敤涓嶅悓鐨勫鍑烘帴鍙�
let exportUrl = "/stockin/export";
- if (activeTab.value === "production") {
- exportUrl = "/stockin/exportOne";
- }
proxy.download(exportUrl, {}, "鍏ュ簱鍙拌处.xlsx");
})
.catch(() => {
@@ -204,6 +231,7 @@
onMounted(() => {
getList();
+ fetchStockRecordTypeOptions();
});
</script>
diff --git a/src/views/inventoryManagement/stockManagement/Qualified.vue b/src/views/inventoryManagement/stockManagement/Qualified.vue
index 4092590..a701d0b 100644
--- a/src/views/inventoryManagement/stockManagement/Qualified.vue
+++ b/src/views/inventoryManagement/stockManagement/Qualified.vue
@@ -20,12 +20,12 @@
:row-class-name="tableRowClassName" height="calc(100vh - 18.5em)">
<el-table-column align="center" type="selection" width="55" />
<el-table-column align="center" label="搴忓彿" type="index" width="60" />
- <el-table-column label="鍏ュ簱鏃ユ湡" prop="createTime" show-overflow-tooltip />
<el-table-column label="浜у搧澶х被" prop="productName" show-overflow-tooltip />
<el-table-column label="瑙勬牸鍨嬪彿" prop="model" show-overflow-tooltip />
<el-table-column label="鍗曚綅" prop="unit" show-overflow-tooltip />
<el-table-column label="搴撳瓨鏁伴噺" prop="qualitity" show-overflow-tooltip />
<el-table-column label="搴撳瓨棰勮鏁伴噺" prop="warnNum" show-overflow-tooltip />
+ <el-table-column label="澶囨敞" prop="remark" show-overflow-tooltip />
<el-table-column label="鏈�杩戞洿鏂版椂闂�" prop="updateTime" show-overflow-tooltip />
<el-table-column fixed="right" label="鎿嶄綔" min-width="60" align="center">
<template #default="scope">
diff --git a/src/views/inventoryManagement/stockManagement/Unqualified.vue b/src/views/inventoryManagement/stockManagement/Unqualified.vue
index 500c31c..afc6700 100644
--- a/src/views/inventoryManagement/stockManagement/Unqualified.vue
+++ b/src/views/inventoryManagement/stockManagement/Unqualified.vue
@@ -20,12 +20,12 @@
:row-class-name="tableRowClassName" height="calc(100vh - 18.5em)">
<el-table-column align="center" type="selection" width="55" />
<el-table-column align="center" label="搴忓彿" type="index" width="60" />
- <el-table-column label="鍏ュ簱鏃ユ湡" prop="createTime" show-overflow-tooltip />
<el-table-column label="浜у搧澶х被" prop="productName" show-overflow-tooltip />
<el-table-column label="瑙勬牸鍨嬪彿" prop="model" show-overflow-tooltip />
<el-table-column label="鍗曚綅" prop="unit" show-overflow-tooltip />
<el-table-column label="搴撳瓨鏁伴噺" prop="qualitity" show-overflow-tooltip />
<el-table-column label="搴撳瓨棰勮鏁伴噺" prop="warnNum" show-overflow-tooltip />
+ <el-table-column label="澶囨敞" prop="remark" show-overflow-tooltip />
<el-table-column label="鏈�杩戞洿鏂版椂闂�" prop="updateTime" show-overflow-tooltip />
<el-table-column fixed="right" label="鎿嶄綔" min-width="60" align="center">
<template #default="scope">
diff --git a/src/views/inventoryManagement/stockManagement/index.vue b/src/views/inventoryManagement/stockManagement/index.vue
index 7b00e27..347de38 100644
--- a/src/views/inventoryManagement/stockManagement/index.vue
+++ b/src/views/inventoryManagement/stockManagement/index.vue
@@ -16,7 +16,6 @@
import UnqualifiedRecord from "@/views/inventoryManagement/stockManagement/Unqualified.vue";
const activeTab = ref('qualified')
-const type = ref(0)
const tabs = ref([
{
label: '鍚堟牸搴撳瓨',
--
Gitblit v1.9.3