From b4ba6911c07b0d6636188ff524102b9ce921410d Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 14 Aug 2024 19:37:26 +0800 Subject: [PATCH] =?UTF-8?q?qms=E5=AF=BC=E5=87=BA=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=8D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/qms/inspectionJob/index.vue | 4 +++- src/views/qms/inspectionMethod/index.vue | 6 ++++-- src/views/qms/inspectionQ1/index.vue | 6 ++++-- src/views/qms/inspectionQ2/index.vue | 6 ++++-- src/views/qms/inspectionQ3/index.vue | 6 ++++-- src/views/qms/inspectionRecord/index.vue | 4 +++- src/views/qms/inspectionRecordFirst/index.vue | 9 ++++++--- src/views/qms/inspectionRequest/index.vue | 6 ++++-- 8 files changed, 32 insertions(+), 15 deletions(-) diff --git a/src/views/qms/inspectionJob/index.vue b/src/views/qms/inspectionJob/index.vue index 47f35526a..b8e167a86 100644 --- a/src/views/qms/inspectionJob/index.vue +++ b/src/views/qms/inspectionJob/index.vue @@ -122,6 +122,7 @@ import AddForm from './addForm.vue' import Detail from './detail.vue' import { getReportUrl } from '@/utils/systemParam' import { useUserStore } from '@/store/modules/user' +import { formatDate } from '@/utils/formatTime' // 采购订单 defineOptions({ name: 'inspectionJobMain' }) @@ -399,8 +400,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await InspectionJobMainApi.exportInspectionJobMain(tableObject.params) - download.excel(data, '检验任务.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/qms/inspectionMethod/index.vue b/src/views/qms/inspectionMethod/index.vue index 0fd66b4a8..4e3bb66ab 100644 --- a/src/views/qms/inspectionMethod/index.vue +++ b/src/views/qms/inspectionMethod/index.vue @@ -89,6 +89,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' +import { formatDate } from '@/utils/formatTime' defineOptions({ name: 'InspectionMethod' }) @@ -300,8 +301,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await InspectionMethodApi.exportInspectionMethod(tableObject.params) - download.excel(data, '检验方法.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -316,7 +318,7 @@ const handleImport = () => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: '检验方法导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 const importSuccess = () => { diff --git a/src/views/qms/inspectionQ1/index.vue b/src/views/qms/inspectionQ1/index.vue index 8e75df52d..2d2dbde68 100644 --- a/src/views/qms/inspectionQ1/index.vue +++ b/src/views/qms/inspectionQ1/index.vue @@ -79,6 +79,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import * as StdcostpriceApi from '@/api/wms/stdcostprice' +import { formatDate } from '@/utils/formatTime' import { useUserStore } from '@/store/modules/user' const userStore = useUserStore() @@ -315,8 +316,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await Q1Api.exportQ1(tableObject.params) - download.excel(data, 'Q1通知单.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -331,7 +333,7 @@ const handleImport = () => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: 'Q1通知单导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 const importSuccess = () => { diff --git a/src/views/qms/inspectionQ2/index.vue b/src/views/qms/inspectionQ2/index.vue index b82dd5bb1..fd8aa94b0 100644 --- a/src/views/qms/inspectionQ2/index.vue +++ b/src/views/qms/inspectionQ2/index.vue @@ -77,6 +77,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' +import { formatDate } from '@/utils/formatTime' import { useUserStore } from '@/store/modules/user' const userStore = useUserStore() @@ -310,8 +311,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await Q2Api.exportQ2(tableObject.params) - download.excel(data, 'Q2通知单.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -326,7 +328,7 @@ const handleImport = () => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: 'Q2通知单导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 const importSuccess = () => { diff --git a/src/views/qms/inspectionQ3/index.vue b/src/views/qms/inspectionQ3/index.vue index 885ee2dc0..abd156ce2 100644 --- a/src/views/qms/inspectionQ3/index.vue +++ b/src/views/qms/inspectionQ3/index.vue @@ -80,6 +80,7 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import * as ProductionlineitemApi from '@/api/wms/productionlineitem' import * as StdcostpriceApi from '@/api/wms/stdcostprice' +import { formatDate } from '@/utils/formatTime' import { useUserStore } from '@/store/modules/user' const userStore = useUserStore() @@ -335,8 +336,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await Q3Api.exportQ3(tableObject.params) - download.excel(data, 'Q3通知单.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -351,7 +353,7 @@ const handleImport = () => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: 'Q3通知单导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 const importSuccess = () => { diff --git a/src/views/qms/inspectionRecord/index.vue b/src/views/qms/inspectionRecord/index.vue index 75bc47e35..2af87c949 100644 --- a/src/views/qms/inspectionRecord/index.vue +++ b/src/views/qms/inspectionRecord/index.vue @@ -126,6 +126,7 @@ import AddForm from './addForm.vue' import Detail from './detail.vue' import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain' import { getReportUrl } from '@/utils/systemParam' +import { formatDate } from '@/utils/formatTime' import { InspectionJobMain, @@ -366,8 +367,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params) - download.excel(data, '检验记录.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/qms/inspectionRecordFirst/index.vue b/src/views/qms/inspectionRecordFirst/index.vue index f9c4c06bf..b3ee003d1 100644 --- a/src/views/qms/inspectionRecordFirst/index.vue +++ b/src/views/qms/inspectionRecordFirst/index.vue @@ -77,6 +77,7 @@ import AddForm from '../inspectionRecordFirst/addForm.vue' import Detail from './detail.vue' import { getReportUrl } from '@/utils/systemParam' +import { formatDate } from '@/utils/formatTime' import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data' @@ -184,7 +185,7 @@ const showQualityReport = ref(false) const qualityReport = ref('') const checkQualityReport = async (row) => { showQualityReport.value = true - qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}` + qualityReport.value = getReportUrl() + '/purchasereceiptReport?asnNumber=' + row.asnNumber } /** 添加/修改操作 */ const basicFormRef = ref() @@ -233,8 +234,9 @@ const handleMainExport = async (row: any) => { // 发起导出 exportLoading.value = true tableObject.params.number = row.number + const excelTitle = ref(route.meta.title) const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params) - download.excel(data, '首件检验记录.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -249,8 +251,9 @@ const handleMainExport = async (row: any) => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await InspectionRecordMainApi.exportFirstInspectionRecordMain(tableObject.params) - download.excel(data, '首件检验记录.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/qms/inspectionRequest/index.vue b/src/views/qms/inspectionRequest/index.vue index 5f7dc751d..a50c38cee 100644 --- a/src/views/qms/inspectionRequest/index.vue +++ b/src/views/qms/inspectionRequest/index.vue @@ -104,6 +104,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import ListTable from '@/components/ListTable/src/ListTable.vue' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' +import { formatDate } from '@/utils/formatTime' // import { InspectionJobPackage} from '../inspectionJob/inspectionJobMain.data' defineOptions({ name: 'inspectionMain' }) @@ -418,8 +419,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await InspectionMainApi.exportInspectionMain(tableObject.params) - download.excel(data, '检验申请.xlsx') + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false @@ -434,7 +436,7 @@ const handleImport = () => { // 导入附件弹窗所需的参数 const importTemplateData = reactive({ templateUrl: '', - templateTitle: '检验申请导入模版.xlsx' + templateTitle: `【${route.meta.title}】导入模版.xlsx` }) // 导入成功之后 const importSuccess = () => {