Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
Project
Project
Details
Activity
Releases
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
杨硕
template_vue
Commits
15243242
Commit
15243242
authored
Oct 14, 2023
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改条码生产
parent
31d784bf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
2 deletions
+30
-2
InventoryRecord.js
src/api/processMangement/InventoryRecord.js
+8
-0
barcodegeneration.js
src/api/production/barcodegeneration.js
+1
-1
index.vue
src/views/equipment/inventoryRecord/index.vue
+21
-1
No files found.
src/api/processMangement/InventoryRecord.js
View file @
15243242
...
@@ -34,3 +34,11 @@ export function exportInventoryRecord(params) {
...
@@ -34,3 +34,11 @@ export function exportInventoryRecord(params) {
responseType
:
'blob'
responseType
:
'blob'
})
})
}
}
// 测试导出数据
export
function
exportTest
(){
return
request
({
url
:
'/wbapply/exportTest'
,
method
:
'get'
,
responseType
:
'blob'
})
}
src/api/production/barcodegeneration.js
View file @
15243242
...
@@ -49,7 +49,7 @@ export function deleteLogical(id) {
...
@@ -49,7 +49,7 @@ export function deleteLogical(id) {
// 导出信息接口
// 导出信息接口
export
function
exporTable
(
params
)
{
export
function
exporTable
(
params
)
{
return
request
({
return
request
({
url
:
'/
ysjbcode/expor
t'
,
url
:
'/
wbapply/exportTes
t'
,
method
:
'get'
,
method
:
'get'
,
params
,
params
,
responseType
:
'blob'
responseType
:
'blob'
...
...
src/views/equipment/inventoryRecord/index.vue
View file @
15243242
...
@@ -225,7 +225,7 @@
...
@@ -225,7 +225,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
exportInventoryRecord
,
findSingleLogDetail
,
listLog
}
from
'@/api/processMangement/InventoryRecord'
import
{
exportInventoryRecord
,
exportTest
,
findSingleLogDetail
,
listLog
}
from
'@/api/processMangement/InventoryRecord'
import
BaseTable
from
'@/components/Table/BaseTable/index.vue'
import
BaseTable
from
'@/components/Table/BaseTable/index.vue'
import
{
BaseTableArgumentsTest
}
from
'@/components/Table/AllTableArguments/BaseTableArguments'
import
{
BaseTableArgumentsTest
}
from
'@/components/Table/AllTableArguments/BaseTableArguments'
import
{
getDictData
}
from
'@/api/equipment/application'
import
{
getDictData
}
from
'@/api/equipment/application'
...
@@ -458,6 +458,7 @@ export default {
...
@@ -458,6 +458,7 @@ export default {
}
}
this
.
getList
()
this
.
getList
()
this
.
getDict
()
this
.
getDict
()
// this.test()
},
},
mounted
()
{
mounted
()
{
this
.
$refs
.
autoGetFocusInput
.
focus
()
this
.
$refs
.
autoGetFocusInput
.
focus
()
...
@@ -594,6 +595,25 @@ export default {
...
@@ -594,6 +595,25 @@ export default {
}
}
this
.
openDetails
=
true
this
.
openDetails
=
true
},
},
test
(){
exportTest
().
then
(
response
=>
{
const
blob
=
new
Blob
([
response
])
const
downloadElement
=
document
.
createElement
(
'a'
)
// TODO: 创建下载的链接
const
href
=
window
.
URL
.
createObjectURL
(
blob
)
downloadElement
.
href
=
href
// TODO: 下载后文件名
downloadElement
.
download
=
'出入库记录'
+
'.xls'
document
.
body
.
appendChild
(
downloadElement
)
// TODO: 点击下载
downloadElement
.
click
()
// TODO: 下载完成移除元素
document
.
body
.
removeChild
(
downloadElement
)
// TODO: 释放掉blob对象
window
.
URL
.
revokeObjectURL
(
href
)
// this.download(response.msg);
})
},
handleExport
()
{
handleExport
()
{
const
obj
=
{
const
obj
=
{
page
:
this
.
queryParams
.
page
,
page
:
this
.
queryParams
.
page
,
...
...
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