From 4826e48fc3f7224d2c59b9b3a8c52cba2b0bf4f7 Mon Sep 17 00:00:00 2001 From: bjang03 <259278618@qq.com> Date: Fri, 29 Nov 2024 14:34:26 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=BF=E8=BE=B9=E7=9B=98=E7=82=B9=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/countJobMain/index.ts | 5 +++- .../countManage/count/countJobMain/index.vue | 26 +++++++++++-------- 2 files changed, 19 insertions(+), 12 deletions(-) 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() })