Browse Source

qms导出文件名修改

hella_online_20240815
zhang_li 3 months ago
parent
commit
8e302d9fcc
  1. 6
      src/views/qms/inspectionScheme/index.vue
  2. 6
      src/views/qms/inspectionTemplate/index.vue

6
src/views/qms/inspectionScheme/index.vue

@ -83,6 +83,7 @@ import AddForm from './addForm.vue'
import * as InspectionSchemeApi from '@/api/qms/inspectionScheme'
import ImportForm from '../../../components/ImportForm/src/ImportForm.vue'
import * as SampleCodeApi from '@/api/qms/sampleCode'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'InspectionScheme' })
@ -286,8 +287,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await InspectionSchemeApi.exportInspectionScheme(tableObject.params)
download.excel(data, '检验方案.xlsx')
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -311,7 +313,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '检验方案导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

6
src/views/qms/inspectionTemplate/index.vue

@ -85,6 +85,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import Detail from '@/components/Detail/src/Detail.vue'
import AddForm from './addForm.vue'
import * as InspectionProcessPageApi from '@/api/qms/inspectionTemplate'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'AgvLocationrelation' })
@ -156,8 +157,9 @@ const handleExport = async () => {
await message.exportConfirm()
//
exportLoading.value = true
const excelTitle = ref(route.meta.title)
const data = await InspectionProcessPageApi.exportInspectionTemplate(tableObject.params)
download.excel(data, '检验模板.xlsx')
download.excel(data, `${excelTitle.value}】【${formatDate(new Date())}】.xlsx`)
} catch {
} finally {
exportLoading.value = false
@ -283,7 +285,7 @@ const handleImport = () => {
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '检验方案导入模版.xlsx'
templateTitle: `${route.meta.title}】导入模版.xlsx`
})
//
const importSuccess = () => {

Loading…
Cancel
Save