|
|
|
|
@ -86,7 +86,15 @@
|
|
|
|
|
:name="item.id.toString()"
|
|
|
|
|
/>
|
|
|
|
|
</el-tabs>
|
|
|
|
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
|
|
|
|
<el-table
|
|
|
|
|
v-loading="loading"
|
|
|
|
|
:data="list"
|
|
|
|
|
:stripe="true"
|
|
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
|
row-key="id"
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column width="30" :label="t('action.select')" type="selection" />
|
|
|
|
|
<el-table-column :label="t('ErpStock.Stock.code')" align="left" sortable prop="barCode" />
|
|
|
|
|
<el-table-column :label="t('ErpStock.Stock.name')" align="left" sortable prop="productName" />
|
|
|
|
|
<el-table-column :label="t('ErpStock.Stock.category')" align="center" prop="categoryName" />
|
|
|
|
|
@ -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<StockVO[]>([])
|
|
|
|
|
const handleSelectionChange = (rows: StockVO[]) => {
|
|
|
|
|
selectionList.value = rows
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 初始化 **/
|
|
|
|
|
onMounted(async () => {
|
|
|
|
|
queryParams.categoryId = 2
|
|
|
|
|
|