|
@ -33,6 +33,10 @@ |
|
|
</Table> |
|
|
</Table> |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
|
|
|
<ImportForm ref="importFormRef" url="/wms/backflush-record-detailb/importError" :importTemplateData="importTemplateData" |
|
|
|
|
|
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" /> |
|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
@ -73,6 +77,7 @@ const { getList, setSearchParams } = tableMethods |
|
|
|
|
|
|
|
|
// 列表头部按钮 |
|
|
// 列表头部按钮 |
|
|
const HeadButttondata = [ |
|
|
const HeadButttondata = [ |
|
|
|
|
|
defaultButtons.defaultImportBtn(null), // 导入 |
|
|
defaultButtons.defaultExportBtn(null), // 导出 |
|
|
defaultButtons.defaultExportBtn(null), // 导出 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
@ -84,6 +89,8 @@ const HeadButttondata = [ |
|
|
const buttonBaseClick = (val, item) => { |
|
|
const buttonBaseClick = (val, item) => { |
|
|
if (val == 'export') { // 导出 |
|
|
if (val == 'export') { // 导出 |
|
|
handleExport() |
|
|
handleExport() |
|
|
|
|
|
} else if (val == 'import') { // 导入 |
|
|
|
|
|
handleImport() |
|
|
} else if (val == 'refresh') { // 刷新 |
|
|
} else if (val == 'refresh') { // 刷新 |
|
|
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { |
|
|
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) { |
|
|
searchFormClick({ |
|
|
searchFormClick({ |
|
@ -107,6 +114,22 @@ const searchFormClick = (searchData) => { |
|
|
getList() // 刷新当前列表 |
|
|
getList() // 刷新当前列表 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 导入附件弹窗所需的参数 |
|
|
|
|
|
const importTemplateData = reactive({ |
|
|
|
|
|
templateUrl: '', |
|
|
|
|
|
templateTitle: `【${route.meta.title}】导入模版.xlsx` |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
/** 导入 */ |
|
|
|
|
|
const importFormRef = ref() |
|
|
|
|
|
const handleImport = () => { |
|
|
|
|
|
importFormRef.value.open() |
|
|
|
|
|
} |
|
|
|
|
|
// 导入成功之后 |
|
|
|
|
|
const importSuccess = () => { |
|
|
|
|
|
getList() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const handleExport = async () => { |
|
|
const handleExport = async () => { |
|
|
try { |
|
|
try { |
|
|
// 导出的二次确认 |
|
|
// 导出的二次确认 |
|
@ -124,5 +147,6 @@ const handleExport = async () => { |
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|
getList() |
|
|
getList() |
|
|
|
|
|
importTemplateData.templateUrl = await RawMaterialConsumptionInfoApi.importTemplate() |
|
|
}) |
|
|
}) |
|
|
</script> |
|
|
</script> |
|
|