|
|
@ -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() |
|
|
|
}) |
|
|
|
</script> |
|
|
|