Browse Source

HL-5833 装配报工bom信息添加导入功能

hella_online_20240911
陈薪名 3 months ago
parent
commit
e66f772693
  1. 4
      src/api/wms/rawMaterialConsumptionInfo/index.ts
  2. 24
      src/views/wms/productionManage/productreceiptAssemble/rawMaterialConsumptionInfo/index.vue

4
src/api/wms/rawMaterialConsumptionInfo/index.ts

@ -54,4 +54,8 @@ export const exportAssemblyMaterialUsage = async (params) => {
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/backflush-record-detailb/get-import-template-error' })
}

24
src/views/wms/productionManage/productreceiptAssemble/rawMaterialConsumptionInfo/index.vue

@ -33,6 +33,10 @@
</Table>
</ContentWrap>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/backflush-record-detailb/importError" :importTemplateData="importTemplateData"
@success="importSuccess" :updateIsDisable="true" :coverIsDisable="true" :mode="2" />
</template>
<script setup lang="ts">
@ -73,6 +77,7 @@ const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultImportBtn(null), //
defaultButtons.defaultExportBtn(null), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
@ -84,6 +89,8 @@ const HeadButttondata = [
const buttonBaseClick = (val, item) => {
if (val == 'export') { //
handleExport()
} else if (val == 'import') { //
handleImport()
} else if (val == 'refresh') { //
if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
@ -107,6 +114,22 @@ const searchFormClick = (searchData) => {
getList() //
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importSuccess = () => {
getList()
}
const handleExport = async () => {
try {
//
@ -124,5 +147,6 @@ const handleExport = async () => {
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await RawMaterialConsumptionInfoApi.importTemplate()
})
</script>

Loading…
Cancel
Save