Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TF-MOM-WEB
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TFMOM
TF-MOM-WEB
Commits
eccf2fcf
Commit
eccf2fcf
authored
Sep 07, 2023
by
xioln
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购入库模版下载
parent
97d2e6b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
18 deletions
+34
-18
index.vue
...nents/components/PurchasingWarehousingNewOrEdit/index.vue
+34
-18
No files found.
applications/dee-mes/src/privateComponents/components/PurchasingWarehousingNewOrEdit/index.vue
View file @
eccf2fcf
...
...
@@ -38,6 +38,8 @@
import
{
post
,
del
,
get
}
from
'@/utils/http'
import
StorageDetails
from
'./component/storageDetailsCreateCom'
import
ImportFile
from
'./component/importFile'
import
{
downloadFile
}
from
'@/utils/http'
export
default
{
componentName
:
'采购入库申请创建编辑'
,
name
:
'PurchasingWarehousingNewOrEdit'
,
// name写在组件的最前方,自定义组件为必填
...
...
@@ -225,25 +227,39 @@ export default {
})
}
}
}
// {
// name: '模版下载',
// icon: '/icons/c-down.png',
// handler: {
// click: () => {
// this.$utils.downLoadFileUrl('/download/template/器材导入模板.xlsx', '器材导入模板.xlsx')
},
{
name
:
'模版下载'
,
icon
:
'/icons/c-down.png'
,
handler
:
{
click
:
()
=>
{
this
.
$refs
.
form
.
validate
((
isok
)
=>
{
if
(
isok
)
{
let
fileName
=
''
// 使用一个映射来将不同的billType映射到对应的文件名
const
billTypeToFileNameMap
=
{
'Material'
:
'器材导入模板.xlsx'
,
'AirEquipment'
:
'机载设备导入模板.xlsx'
,
'OutSource'
:
'外包产品导入模板.xlsx'
}
if
(
billTypeToFileNameMap
[
this
.
form
.
billType
])
{
fileName
=
billTypeToFileNameMap
[
this
.
form
.
billType
]
}
// this.$refs.form.validate((isok) => {
// if (isok) {
// // 校验通过
// // this.$utils.downLoadFileUrl('/download/template/器材导入模板.xlsx', '器材导入模板.xlsx')
// } else {
// this.$utils.showMessageWarning('请填写基本信息!')
// }
// })
// }
// }
// }
// 然后下载文件
if
(
fileName
)
{
downloadFile
(
`/download/template/
${
fileName
}
`
,
'get'
).
then
(
res
=>
{
this
.
$utils
.
downLoadFile
(
res
,
fileName
)
})
}
}
else
{
this
.
$utils
.
showMessageWarning
(
'请填写基本信息!'
)
}
})
}
}
}
],
topTools
:
[
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment