diff --git a/src/api/wms/countJobMain/index.ts b/src/api/wms/countJobMain/index.ts index d851c3104..43e70a492 100644 --- a/src/api/wms/countJobMain/index.ts +++ b/src/api/wms/countJobMain/index.ts @@ -86,7 +86,10 @@ export const exportCountJobMain = async (params) => { export const importTemplate = () => { return request.download({ url: '/wms/count-job-main/get-import-template' }) } - +// 下载用户导入模板 +export const lineTypeImportTemplate = () => { + return request.download({ url: '/wms/count-job-main/get-lineTypeImport-template' }) +} // 关闭盘点任务主 export const closeCountJobMain = (id: number) => { return request.put({ url: '/wms/count-job-main/close?id=' + id }) diff --git a/src/views/wms/countManage/count/countJobMain/index.vue b/src/views/wms/countManage/count/countJobMain/index.vue index f7923ec53..cb744daa7 100644 --- a/src/views/wms/countManage/count/countJobMain/index.vue +++ b/src/views/wms/countManage/count/countJobMain/index.vue @@ -102,6 +102,7 @@ import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import * as PackageunitApi from '@/api/wms/packageunit' import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' +import {lineTypeImportTemplate} from "@/api/wms/countJobMain"; const { loadStart, loadDone } = usePageLoading() // 盘点任务主 defineOptions({ name: 'CountJobMain' }) @@ -238,15 +239,15 @@ const butttondata = (row, $index) => { link: true, //文本展现按钮 hasPermi: '' // wms:count-job-main:importCountJob }, - // { - // label: '线边盘点', - // name: 'lineTypeImport', - // hide: !(row.status==2&&row.lineType==true), - // type: 'success', - // color: '', - // link: true, //文本展现按钮 - // hasPermi: '' // wms:count-job-main:lineTypeImport - // }, + { + label: '线边盘点', + name: 'lineTypeImport', + hide: !(row.status==2&&row.lineType==true), + type: 'success', + color: '', + link: true, //文本展现按钮 + hasPermi: '' // wms:count-job-main:lineTypeImport + }, defaultButtons.mainListJobAbaBtn({ hide: isShowMainButton(row, ['2']) }), // 放弃 { label: '完成', @@ -297,11 +298,15 @@ const buttonTableClick = async (val, row) => { // 导入 importUrl.value = "/wms/count-job-main/import" importTitle.value = '导入' + importTemplateData.value.templateTitle = "盘点任务导入模板.xlsx" + importTemplateData.value.templateUrl = await CountJobMainApi.importTemplate() handleImport(row.id) } else if (val == 'lineTypeImport') { // 线边盘点 importUrl.value = "/wms/count-job-main/lineTypeImport" importTitle.value = '线边盘点' + importTemplateData.value.templateTitle = "线边盘点任务导入模板.xlsx" + importTemplateData.value.templateUrl = await CountJobMainApi.lineTypeImportTemplate() handleImport(row.id) } else if (val == 'done') { // 完成 @@ -405,7 +410,7 @@ const handleImport = (id: string) => { } // 导入附件弹窗所需的参数 -const importTemplateData = reactive({ +const importTemplateData = ref({ templateUrl: '', templateTitle: `【${route.meta.title}】导入模版.xlsx` }) @@ -427,6 +432,5 @@ const searchFormClick = (searchData) => { /** 初始化 **/ onMounted(async () => { getList() - importTemplateData.templateUrl = await CountJobMainApi.importTemplate() })