Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-activity-center
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 445456f8
authored
Jan 03, 2023
by
李伟康
Committed by
chenwq
Jan 10, 2023
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
众筹订单增加导入
1 parent
a39a60a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
src/views/orderManage/index.vue
src/views/orderManage/index.vue
View file @
445456f
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
class=
"default-blue-btn"
class=
"default-blue-btn"
:size=
"size"
:size=
"size"
type=
"default"
type=
"default"
@
click=
"
importVisible = true
"
@
click=
"
visibleImportDialog(true)
"
>
导入
</el-button>
>
导入
</el-button>
<el-button
<el-button
class=
"default-blue-btn"
class=
"default-blue-btn"
...
@@ -501,6 +501,7 @@
...
@@ -501,6 +501,7 @@
class=
"upload-input"
class=
"upload-input"
accept=
".xlsx, .xls"
accept=
".xlsx, .xls"
@
change=
"e => handleXlsxChange(e)"
@
change=
"e => handleXlsxChange(e)"
ref=
"uploadInput"
/>
/>
</el-button>
</el-button>
<el-button
<el-button
...
@@ -1690,14 +1691,13 @@ export default {
...
@@ -1690,14 +1691,13 @@ export default {
},
},
handleXlsxChange
(
e
)
{
handleXlsxChange
(
e
)
{
console
.
log
(
e
)
let
[
file
]
=
e
.
srcElement
.
files
,
var
[
file
]
=
e
.
srcElement
.
files
reader
=
new
FileReader
()
if
(
!
file
)
return
if
(
!
file
)
return
this
.
$notify
({
this
.
$notify
({
title
:
'提示'
,
title
:
'提示'
,
message
:
'文件上传中,请稍后'
message
:
'文件上传中,请稍后'
})
})
var
reader
=
new
FileReader
()
// 默认1MB
// 默认1MB
this
.
file
.
fileName
=
file
.
name
this
.
file
.
fileName
=
file
.
name
reader
.
readAsDataURL
(
file
)
reader
.
readAsDataURL
(
file
)
...
@@ -1706,7 +1706,11 @@ export default {
...
@@ -1706,7 +1706,11 @@ export default {
const
arrBase64
=
imgFile
.
split
(
','
)
const
arrBase64
=
imgFile
.
split
(
','
)
const
splitStr
=
file
.
name
.
split
(
'.'
)
const
splitStr
=
file
.
name
.
split
(
'.'
)
this
.
file
.
fileType
=
splitStr
[
splitStr
.
length
-
1
]
+
'@'
+
arrBase64
[
1
]
this
.
file
.
fileType
=
splitStr
[
splitStr
.
length
-
1
]
+
'@'
+
arrBase64
[
1
]
console
.
log
(
el
)
this
.
$notify
({
title
:
'提示'
,
message
:
'图片上传成功'
,
type
:
'success'
})
}
}
},
},
...
@@ -1718,16 +1722,12 @@ export default {
...
@@ -1718,16 +1722,12 @@ export default {
if
(
fileType
)
this
.
$apis
.
orderManage
.
importCrowdFundingOrder
({
file
:
fileType
}).
then
(
res
=>
{
if
(
fileType
)
this
.
$apis
.
orderManage
.
importCrowdFundingOrder
({
file
:
fileType
}).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
if
(
res
)
{
if
(
res
)
{
this
.
importVisible
=
false
this
.
$notify
({
this
.
$notify
({
title
:
'提示'
,
title
:
'提示'
,
message
:
'订单导入成功'
,
message
:
'订单导入成功'
,
type
:
'success'
type
:
'success'
})
})
this
.
file
=
{
this
.
visibleImportDialog
()
fileName
:
''
,
fileType
:
''
}
this
.
searchForm
.
requestSource
!=
0
?
this
.
handleSearch
()
:
this
.
$refs
.
allOrderRef
.
refreshTable
(
false
)
this
.
searchForm
.
requestSource
!=
0
?
this
.
handleSearch
()
:
this
.
$refs
.
allOrderRef
.
refreshTable
(
false
)
}
}
})
})
...
@@ -1741,6 +1741,15 @@ export default {
...
@@ -1741,6 +1741,15 @@ export default {
alink
.
download
=
'订单导入模板.xlsx'
alink
.
download
=
'订单导入模板.xlsx'
alink
.
click
()
alink
.
click
()
alink
.
remove
()
alink
.
remove
()
},
visibleImportDialog
(
val
=
false
)
{
if
(
this
.
$refs
?.
uploadInput
)
this
.
$refs
.
uploadInput
.
value
=
null
this
.
file
=
{
fileName
:
''
,
fileType
:
''
}
this
.
importVisible
=
val
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment