|
@ -16,7 +16,7 @@ |
|
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
<!-- 列表 --> |
|
|
<ContentWrap> |
|
|
<ContentWrap> |
|
|
<Table v-clientTable |
|
|
<Table v-clientTable ref="tableRef" :selection="true" |
|
|
:columns="tableColumns" |
|
|
:columns="tableColumns" |
|
|
:data="tableObject.tableList" |
|
|
:data="tableObject.tableList" |
|
|
:loading="tableObject.loading" |
|
|
:loading="tableObject.loading" |
|
@ -26,6 +26,7 @@ |
|
|
v-model:pageSize="tableObject.pageSize" |
|
|
v-model:pageSize="tableObject.pageSize" |
|
|
v-model:currentPage="tableObject.currentPage" |
|
|
v-model:currentPage="tableObject.currentPage" |
|
|
v-model:sort="tableObject.sort" |
|
|
v-model:sort="tableObject.sort" |
|
|
|
|
|
@getSelectionRows="getSelectionRows" |
|
|
> |
|
|
> |
|
|
<template #number="{row}"> |
|
|
<template #number="{row}"> |
|
|
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|
|
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|
@ -90,6 +91,7 @@ const { getList, setSearchParams } = tableMethods |
|
|
const HeadButttondata = [ |
|
|
const HeadButttondata = [ |
|
|
// defaultButtons.defaultAddBtn({hasPermi:'wms:package:create'}), // 新增 |
|
|
// defaultButtons.defaultAddBtn({hasPermi:'wms:package:create'}), // 新增 |
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:package:export'}), // 导出 |
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:package:export'}), // 导出 |
|
|
|
|
|
defaultButtons.mainLisSelectiontPointBtn(null), // 批量标签打印 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
@ -110,6 +112,8 @@ const buttonBaseClick = (val, item) => { |
|
|
getList() |
|
|
getList() |
|
|
} |
|
|
} |
|
|
} else if (val == 'filtrate') { // 筛选 |
|
|
} else if (val == 'filtrate') { // 筛选 |
|
|
|
|
|
} else if (val=='selection_point'){//批量打印 |
|
|
|
|
|
handleSelectionPoint() |
|
|
}else { // 其他按钮 |
|
|
}else { // 其他按钮 |
|
|
console.log('其他按钮', item) |
|
|
console.log('其他按钮', item) |
|
|
} |
|
|
} |
|
@ -186,6 +190,16 @@ const handlePoint = async (row) => { |
|
|
window.open(src.value+'&id='+row.id) |
|
|
window.open(src.value+'&id='+row.id) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const srcPoint = ref(BASE_URL + '/jmreport/view/953469704945139712?token=' + getAccessToken()) |
|
|
|
|
|
const handleSelectionPoint = async ()=>{ |
|
|
|
|
|
let rows:any = [] |
|
|
|
|
|
selectionRows.value.forEach(item=>{ |
|
|
|
|
|
rows = [...rows,...item.selectionRows.map(item1=>item1.id)] |
|
|
|
|
|
}) |
|
|
|
|
|
console.log('批量打印',rows.join(',')) |
|
|
|
|
|
window.open(srcPoint.value+'&relateNumber='+rows.join(',')) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 筛选提交 |
|
|
// 筛选提交 |
|
|
const searchFormClick = (searchData) => { |
|
|
const searchFormClick = (searchData) => { |
|
|
tableObject.params = { |
|
|
tableObject.params = { |
|
@ -196,6 +210,34 @@ const searchFormClick = (searchData) => { |
|
|
getList() // 刷新当前列表 |
|
|
getList() // 刷新当前列表 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
watch( |
|
|
|
|
|
() => tableObject.tableList, |
|
|
|
|
|
() => { |
|
|
|
|
|
const currentRows = selectionRows.value.find(item=>item.currentPage==tableObject.currentPage) |
|
|
|
|
|
if(currentRows){ |
|
|
|
|
|
nextTick(() => { |
|
|
|
|
|
currentRows.selectionRows.forEach(item=>{ |
|
|
|
|
|
tableRef.value.toggleRowSelection(item,true) |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
) |
|
|
|
|
|
const selectionRows = ref<any>([]) |
|
|
|
|
|
const tableRef = ref() |
|
|
|
|
|
const getSelectionRows = (currentPage,currentPageSelectionRows) => { |
|
|
|
|
|
console.log("getSelectionRows",currentPage,currentPageSelectionRows) |
|
|
|
|
|
const currentRows = selectionRows.value.find(item=>item.currentPage==currentPage) |
|
|
|
|
|
if(currentRows){ |
|
|
|
|
|
currentRows.selectionRows = currentPageSelectionRows |
|
|
|
|
|
}else{ |
|
|
|
|
|
selectionRows.value.push({ |
|
|
|
|
|
currentPage, |
|
|
|
|
|
selectionRows:currentPageSelectionRows |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
getList() |
|
|
getList() |
|
|