|
|
@ -28,9 +28,13 @@ |
|
|
|
:pagination="{ |
|
|
|
total: tableObject.total |
|
|
|
}" |
|
|
|
:selection="true" |
|
|
|
v-model:pageSize="tableObject.pageSize" |
|
|
|
v-model:currentPage="tableObject.currentPage" |
|
|
|
v-model:sort="tableObject.sort" |
|
|
|
:reserve-selection="true" |
|
|
|
row-key="id" |
|
|
|
@getSelectionRows="getSelectionRows" |
|
|
|
> |
|
|
|
<template #number="{ row }"> |
|
|
|
<el-button type="primary" link @click="openDetail(row, '单据号', row.number)"> |
|
|
@ -126,6 +130,7 @@ |
|
|
|
const HeadButttondata = [ |
|
|
|
defaultButtons.defaultImportBtn({hasPermi:'wms:supplier-mold-cost-main:import'}), // 导入 |
|
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:supplier-mold-cost-main:export'}), // 导出 |
|
|
|
defaultButtons.mainListSelectionOrderPubBtn(null), // 批量发布 |
|
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
|
defaultButtons.defaultSetBtn(null) // 设置 |
|
|
@ -165,7 +170,9 @@ const buttonBaseClick = (val, item) => { |
|
|
|
} else if (val == 'refresh') { |
|
|
|
// 刷新 |
|
|
|
getList() |
|
|
|
} else if (val == 'filtrate') { |
|
|
|
} else if (val=='mainOrderSelectionPub'){// 批量发布 |
|
|
|
handleSelectionPublish() |
|
|
|
}else if (val == 'filtrate') { |
|
|
|
// 筛选 |
|
|
|
} else { |
|
|
|
// 其他按钮 |
|
|
@ -382,7 +389,26 @@ const importSuccess = () => { |
|
|
|
exportLoading.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const currentPageSelectionList = ref([]) |
|
|
|
const getSelectionRows = (currentPage, currentPageSelectionRows) => { |
|
|
|
currentPageSelectionList.value = currentPageSelectionRows |
|
|
|
} |
|
|
|
// 批量发布 |
|
|
|
const handleSelectionPublish = async ()=>{ |
|
|
|
// 发布的二次确认 |
|
|
|
await message.confirm(t('ts.是否发布所选中数据?')) |
|
|
|
tableObject.loading = true |
|
|
|
let ids = currentPageSelectionList.value.map(item => item.id).join(',') |
|
|
|
await SuppliperMoldCostMainApi.batchPublish({ ids: ids }).then((res) => { |
|
|
|
message.success(res.message) |
|
|
|
tableObject.loading = false |
|
|
|
buttonBaseClick('refresh', null) |
|
|
|
}).catch((err) => { |
|
|
|
tableObject.loading = false |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
</script> |
|
|
|
|