diff --git a/src/views/erp/stock/check/index.vue b/src/views/erp/stock/check/index.vue
index 2e458e7a..23b6a413 100644
--- a/src/views/erp/stock/check/index.vue
+++ b/src/views/erp/stock/check/index.vue
@@ -331,7 +331,12 @@ const handleExport = async () => {
await message.exportConfirm()
// 发起导出
exportLoading.value = true
- const data = await StockCheckApi.exportStockCheck(queryParams)
+ const ids = selectionList.value.map((item) => item.id).filter((v) => v != null)
+ const params = {
+ ...queryParams,
+ ids: ids.length ? ids.join(',') : undefined
+ }
+ const data = await StockCheckApi.exportStockCheck(params)
download.excel(data, t('ErpStock.Check.exportName'))
} catch {
} finally {
diff --git a/src/views/erp/stock/in/index.vue b/src/views/erp/stock/in/index.vue
index 07debe98..6ac7236f 100644
--- a/src/views/erp/stock/in/index.vue
+++ b/src/views/erp/stock/in/index.vue
@@ -380,7 +380,12 @@ const handleExport = async () => {
await message.exportConfirm()
// 发起导出
exportLoading.value = true
- const data = await StockInApi.exportStockIn(queryParams)
+ const ids = selectionList.value.map((item) => item.id).filter((v) => v != null)
+ const params = {
+ ...queryParams,
+ ids: ids.length ? ids.join(',') : undefined
+ }
+ const data = await StockInApi.exportStockIn(params)
download.excel(data, t('ErpStock.In.exportName'))
} catch {
} finally {
diff --git a/src/views/erp/stock/move/index.vue b/src/views/erp/stock/move/index.vue
index 964efa87..baa6c3a1 100644
--- a/src/views/erp/stock/move/index.vue
+++ b/src/views/erp/stock/move/index.vue
@@ -330,7 +330,12 @@ const handleExport = async () => {
await message.exportConfirm()
// 发起导出
exportLoading.value = true
- const data = await StockMoveApi.exportStockMove(queryParams)
+ const ids = selectionList.value.map((item) => item.id).filter((v) => v != null)
+ const params = {
+ ...queryParams,
+ ids: ids.length ? ids.join(',') : undefined
+ }
+ const data = await StockMoveApi.exportStockMove(params)
download.excel(data, t('ErpStock.Move.exportName'))
} catch {
} finally {
diff --git a/src/views/erp/stock/out/index.vue b/src/views/erp/stock/out/index.vue
index d026a730..e61719fa 100644
--- a/src/views/erp/stock/out/index.vue
+++ b/src/views/erp/stock/out/index.vue
@@ -384,7 +384,12 @@ const handleExport = async () => {
await message.exportConfirm()
// 发起导出
exportLoading.value = true
- const data = await StockOutApi.exportStockOut(queryParams)
+ const ids = selectionList.value.map((item) => item.id).filter((v) => v != null)
+ const params = {
+ ...queryParams,
+ ids: ids.length ? ids.join(',') : undefined
+ }
+ const data = await StockOutApi.exportStockOut(params)
download.excel(data, t('ErpStock.Out.exportName'))
} catch {
} finally {
diff --git a/src/views/erp/stock/record/index.vue b/src/views/erp/stock/record/index.vue
index 21c64d66..b6f9020e 100644
--- a/src/views/erp/stock/record/index.vue
+++ b/src/views/erp/stock/record/index.vue
@@ -112,7 +112,15 @@
-
+
+
@@ -249,7 +257,12 @@ const handleExport = async () => {
await message.exportConfirm()
// 发起导出
exportLoading.value = true
- const data = await StockRecordApi.exportStockRecord(queryParams)
+ const ids = selectionList.value.map((item) => item.id).filter((v) => v != null)
+ const params = {
+ ...queryParams,
+ ids: ids.length ? ids.join(',') : undefined
+ }
+ const data = await StockRecordApi.exportStockRecord(params)
download.excel(data, '产品库存明细.xls')
} catch {
} finally {
@@ -257,6 +270,12 @@ const handleExport = async () => {
}
}
+/** 选中操作 */
+const selectionList = ref([])
+const handleSelectionChange = (rows: StockRecordVO[]) => {
+ selectionList.value = rows
+}
+
/** 初始化 **/
onActivated(() => {
getList()
diff --git a/src/views/erp/stock/stock/index.vue b/src/views/erp/stock/stock/index.vue
index 4bc018c8..28980de6 100644
--- a/src/views/erp/stock/stock/index.vue
+++ b/src/views/erp/stock/stock/index.vue
@@ -86,7 +86,15 @@
:name="item.id.toString()"
/>
-
+
+
@@ -192,7 +200,12 @@ const handleExport = async () => {
await message.exportConfirm()
// 发起导出
exportLoading.value = true
- const data = await StockApi.exportStock(queryParams)
+ const ids = selectionList.value.map((item) => item.id).filter((v) => v != null)
+ const params = {
+ ...queryParams,
+ ids: ids.length ? ids.join(',') : undefined
+ }
+ const data = await StockApi.exportStock(params)
download.excel(data, t('ErpStock.Stock.exportName'))
} catch {
} finally {
@@ -200,6 +213,12 @@ const handleExport = async () => {
}
}
+/** 选中操作 */
+const selectionList = ref([])
+const handleSelectionChange = (rows: StockVO[]) => {
+ selectionList.value = rows
+}
+
/** 初始化 **/
onMounted(async () => {
queryParams.categoryId = 2
diff --git a/src/views/erp/stock/warehouse/index.vue b/src/views/erp/stock/warehouse/index.vue
index 71941d42..c4117df5 100644
--- a/src/views/erp/stock/warehouse/index.vue
+++ b/src/views/erp/stock/warehouse/index.vue
@@ -59,7 +59,15 @@
-
+
+