|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<ContentWrap> |
|
|
|
<!-- 搜索工作栏 --> |
|
|
|
<Search :schema="Expectout.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|
|
|
<Search :schema="Expectout.allSchemas.searchSchema" @search="searchList" @reset="searchList" /> |
|
|
|
</ContentWrap> |
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
@ -16,7 +16,9 @@ |
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
|
<ContentWrap> |
|
|
|
<Table v-clientTable |
|
|
|
<Table ref="tableRef" |
|
|
|
:selection="true" |
|
|
|
v-clientTable |
|
|
|
:columns="tableColumns" |
|
|
|
:data="tableObject.tableList" |
|
|
|
:loading="tableObject.loading" |
|
|
@ -26,6 +28,8 @@ |
|
|
|
v-model:pageSize="tableObject.pageSize" |
|
|
|
v-model:currentPage="tableObject.currentPage" |
|
|
|
v-model:sort="tableObject.sort" |
|
|
|
@getSelectionRows="getSelectionRows" |
|
|
|
|
|
|
|
> |
|
|
|
<template #jobNumber="{row}"> |
|
|
|
<el-button type="primary" link @click="openDetail(row, '任务号', row.jobNumber)"> |
|
|
@ -96,6 +100,7 @@ const HeadButttondata = [ |
|
|
|
defaultButtons.defaultFreshBtn(null),//刷新 |
|
|
|
defaultButtons.defaultFilterBtn(null), //筛选 |
|
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
|
defaultButtons.mainLisSelectiontDeleteBtn(null), // 批量删除 |
|
|
|
// { |
|
|
|
// label: '自定义扩展按钮', |
|
|
|
// name: 'zdy', |
|
|
@ -122,17 +127,48 @@ const buttonBaseClick = (val, item) => { |
|
|
|
} else { |
|
|
|
getList() |
|
|
|
} |
|
|
|
} else if (val == 'selection_delete') { // 批量删除 |
|
|
|
handleSelectionDelete() |
|
|
|
} else if (val == 'filtrate') { // 筛选 |
|
|
|
} else { // 其他按钮 |
|
|
|
console.log('其他按钮', item) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const searchList = (model)=>{ |
|
|
|
selectionRows.value = [] |
|
|
|
setSearchParams(model) |
|
|
|
} |
|
|
|
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 |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
const handleSelectionDelete = async ()=>{ |
|
|
|
let rows:any = [] |
|
|
|
selectionRows.value.forEach(item=>{ |
|
|
|
rows = [...rows,...item.selectionRows.map(item1=>item1.id)] |
|
|
|
}) |
|
|
|
if(rows.length==0){ |
|
|
|
return |
|
|
|
} |
|
|
|
console.log('批量删除',rows) |
|
|
|
await ExpectoutApi.deleteExpectoutIds(rows.join(',')) |
|
|
|
getList() |
|
|
|
|
|
|
|
} |
|
|
|
// 列表-操作按钮 |
|
|
|
const butttondata = [ |
|
|
|
// defaultButtons.mainListEditBtn({hasPermi:'wms:expectout:update'}), // 编辑 |
|
|
|
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:expectout:delete'}), // 删除 |
|
|
|
defaultButtons.mainListDeleteBtn({hasPermi:'wms:expectout:deleteIds'}), // 批量删除 |
|
|
|
] |
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
|