|
|
@ -17,7 +17,8 @@ |
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
|
<ContentWrap> |
|
|
|
<Table v-clientTable |
|
|
|
<Table ref="tableRef" v-clientTable |
|
|
|
:selection="true" |
|
|
|
:columns="tableColumns" |
|
|
|
:data="tableObject.tableList" |
|
|
|
:loading="tableObject.loading" |
|
|
@ -27,6 +28,7 @@ |
|
|
|
v-model:pageSize="tableObject.pageSize" |
|
|
|
v-model:currentPage="tableObject.currentPage" |
|
|
|
v-model:sort="tableObject.sort" |
|
|
|
@getSelectionRows="getSelectionRows" |
|
|
|
> |
|
|
|
<template #number="{row}"> |
|
|
|
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|
|
@ -54,6 +56,7 @@ |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
|
<Detail |
|
|
|
ref="detailRef" |
|
|
@ -161,6 +164,7 @@ const { getList, setSearchParams } = tableMethods |
|
|
|
// 列表头部按钮 |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:putaway-job-main:export'}), // 导出 |
|
|
|
defaultButtons.mainLisSelectiontPointBtn(null), // 批量标签打印 |
|
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
@ -186,12 +190,51 @@ const buttonBaseClick = (val, item) => { |
|
|
|
} else { |
|
|
|
getList() |
|
|
|
} |
|
|
|
} else if (val=='selection_point'){// 批量打印 |
|
|
|
handleSelectionPoint() |
|
|
|
} else if (val == 'filtrate') { // 筛选 |
|
|
|
} else { // 其他按钮 |
|
|
|
console.log('其他按钮', item) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
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 |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const handleSelectionPoint = async ()=>{ |
|
|
|
let rows:any = [] |
|
|
|
selectionRows.value.forEach(item=>{ |
|
|
|
rows = [...rows,...item.selectionRows.map(item1=>item1.packingNumber)] |
|
|
|
}) |
|
|
|
console.log('批量打印',rows.join(',')) |
|
|
|
|
|
|
|
// window.open(srcPoint.value+'&relateNumber='+rows.join(',')) |
|
|
|
} |
|
|
|
// 根据状态返回该按钮是否显示 |
|
|
|
const isShowMainButton = (row,val) => { |
|
|
|
if (val.indexOf(row.status) > -1) { |
|
|
@ -208,6 +251,7 @@ const butttondata = (row,$index) => { |
|
|
|
return [] |
|
|
|
} |
|
|
|
return [ |
|
|
|
defaultButtons.mainListDocumentPrintBtn(null), // 单据打印 |
|
|
|
// defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 |
|
|
|
defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchasereceipt-job-main:close'}), // 关闭 |
|
|
|
// defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 |
|
|
@ -225,9 +269,14 @@ const buttonTableClick = async (val, row) => { |
|
|
|
handleClose(row.masterId) |
|
|
|
} else if (val == 'mainJobAcc') { // 承接 |
|
|
|
console.log('列表-操作按钮事件-承接') |
|
|
|
} else if (val == 'documentPrint') { |
|
|
|
// 单据打印 |
|
|
|
handleDocumentPrint(row.masterId) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const handleDocumentPrint = async (id) => { |
|
|
|
alert('单据打印') |
|
|
|
} |
|
|
|
// 子包装数据 |
|
|
|
const detailParenPackingRef = ref() |
|
|
|
const { tableObject: packingDetatableData, tableMethods: packDetatableMethods } = useTable({ |
|
|
|