From 708283fa7be6f0657a326449b9ed1aaf2b3de1f4 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Wed, 21 Aug 2024 13:36:31 +0800 Subject: [PATCH] =?UTF-8?q?HL-5416=E4=B8=8A=E6=9E=B6=E7=AD=96=E7=95=A5?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=BC=E5=87=BA=E5=AF=BC=E5=85=A5=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../strategy/upShelfStrategy/index.vue | 61 +++++++++++++++++-- 1 file changed, 56 insertions(+), 5 deletions(-) diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/index.vue b/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/index.vue index 27be15c7c..f3ac86752 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/index.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/index.vue @@ -45,6 +45,16 @@ + + @@ -54,6 +64,8 @@ import { DICT_TYPE } from '@/utils/dict' import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as RuleApi from '@/api/wms/rule' import AddForm from './AddForm.vue' +import download from '@/utils/download' +import { formatDate } from '@/utils/formatTime' defineOptions({ name: 'SupplieDeliveryStrategy' }) const queryFormRef = ref() // 搜索的表单 @@ -111,11 +123,7 @@ const handleDelete = async (id: number) => { getList() } catch { } } -// 列表头部按钮 -const HeadButttondata = [ - defaultButtons.defaultAddBtn(null), // 新增 -] - +const route = useRoute() // 路由信息 // 头部按钮事件 @@ -143,6 +151,49 @@ const isShowMainButton = (row,val) => { } } +/** 导出按钮操作 */ +const exportLoading = ref(false) // 导出的加载中 +const handleExport = async () => { + console.log('queryParams',queryParams) + try { + // 导出的二次确认 + await message.exportConfirm() + // 发起导出 + exportLoading.value = true + const excelTitle = ref(route.meta.title) + const data = await SupplierdeliverRequestMainApi.exportSupplierdeliverRequestMain( + queryParams + ) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) + } catch { + } finally { + exportLoading.value = false + } +} +/** 导入 */ +const importFormRef = ref() +const handleImport = () => { + importFormRef.value.open() +} + +// 列表头部按钮 +const HeadButttondata = [ + defaultButtons.defaultAddBtn(null), // 新增 + // defaultButtons.defaultImportBtn({ hasPermi: 'wms:supplierdeliver-request-main:import' }), // 导入 + // defaultButtons.defaultExportBtn({ hasPermi: 'wms:supplierdeliver-request-main:export' }), // 导出 + +] +// 导入附件弹窗所需的参数 +const importTemplateData = reactive({ + templateUrl: '', + templateTitle: `【${route.meta.title}】导入模版.xlsx` +}) + + +// 导入成功之后 +const importSuccess = () => { + getList() +} // 列表-操作按钮 const butttondata = (row) => { return [