Browse Source

线边盘点自定义模板

master_hella
bjang03 4 days ago
parent
commit
4826e48fc3
  1. 5
      src/api/wms/countJobMain/index.ts
  2. 26
      src/views/wms/countManage/count/countJobMain/index.vue

5
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 })

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

Loading…
Cancel
Save