Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
merchant-manage-ui
Commits
f5bdc007
Commit
f5bdc007
authored
Apr 22, 2022
by
lxd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 文件上传
parent
13fcdac8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
12 deletions
+6
-12
data.js
src/pages/PaymentMange/ToExamine/data.js
+2
-2
index.jsx
src/pages/PaymentMange/ToExamine/index.jsx
+1
-8
upload.jsx
src/pages/PaymentMange/ToExamine/upload.jsx
+3
-2
No files found.
src/pages/PaymentMange/ToExamine/data.js
View file @
f5bdc007
...
@@ -12,12 +12,12 @@ export function renderModal() {
...
@@ -12,12 +12,12 @@ export function renderModal() {
];
];
}
}
export
function
detailsModal
()
{
export
function
detailsModal
(
filePath
)
{
return
[
return
[
<
Button
type
=
"
primary
"
key
=
"
cancel
"
onClick
=
{()
=>
this
.
handleCancel
()}
>
<
Button
type
=
"
primary
"
key
=
"
cancel
"
onClick
=
{()
=>
this
.
handleCancel
()}
>
取消
取消
<
/Button>
,
<
/Button>
,
<
Button
type
=
"
primary
"
onClick
=
{()
=>
this
.
handleDownload
()}
key
=
"
down
"
>
<
Button
type
=
"
primary
"
href
=
{
filePath
}
target
=
"
_blank
"
key
=
"
down
"
>
下载
下载
<
/Button>
,
<
/Button>
,
];
];
...
...
src/pages/PaymentMange/ToExamine/index.jsx
View file @
f5bdc007
...
@@ -42,13 +42,6 @@ class toExamine extends Component {
...
@@ -42,13 +42,6 @@ class toExamine extends Component {
});
});
};
};
handleDownload
=
()
=>
{
const
{
toExamineData
:
{
url
},
}
=
this
.
props
;
window
.
open
(
url
);
};
render
()
{
render
()
{
const
{
const
{
form
:
{
getFieldDecorator
},
form
:
{
getFieldDecorator
},
...
@@ -63,7 +56,7 @@ class toExamine extends Component {
...
@@ -63,7 +56,7 @@ class toExamine extends Component {
title=
{
status
===
1
?
'
上传发票
'
:
'
查看发票
'
}
title=
{
status
===
1
?
'
上传发票
'
:
'
查看发票
'
}
visible=
{
visible
}
visible=
{
visible
}
onCancel=
{
()
=>
this
.
handleCancel
()
}
onCancel=
{
()
=>
this
.
handleCancel
()
}
footer=
{
status
===
1
?
renderModal
.
call
(
this
)
:
detailsModal
.
call
(
this
)
}
footer=
{
status
===
1
?
renderModal
.
call
(
this
)
:
detailsModal
.
call
(
this
,
filePath
)
}
className=
{
styles
.
textArea
}
className=
{
styles
.
textArea
}
>
>
<
Form
className=
"login-form"
{
...
formItemLayout
}
>
<
Form
className=
"login-form"
{
...
formItemLayout
}
>
...
...
src/pages/PaymentMange/ToExamine/upload.jsx
View file @
f5bdc007
...
@@ -54,7 +54,8 @@ class PicturesWall extends React.Component {
...
@@ -54,7 +54,8 @@ class PicturesWall extends React.Component {
return
;
return
;
}
}
const
vm
=
this
;
const
vm
=
this
;
const
observable
=
qiniu
.
upload
(
file
,
null
,
token
);
const
name
=
file
.
name
+
file
.
uid
;
const
observable
=
qiniu
.
upload
(
file
,
file
.
name
,
token
);
const
observer
=
{
const
observer
=
{
next
()
{
next
()
{
// ...
// ...
...
@@ -65,7 +66,7 @@ class PicturesWall extends React.Component {
...
@@ -65,7 +66,7 @@ class PicturesWall extends React.Component {
},
},
complete
(
res
)
{
complete
(
res
)
{
const
comFile
=
file
;
const
comFile
=
file
;
const
url
=
`
${
qiniuHost
}
/
${
res
.
hash
}
`
;
const
url
=
`
${
qiniuHost
}
/
${
res
.
key
}
`
;
comFile
.
url
=
url
;
comFile
.
url
=
url
;
const
list
=
vm
.
state
.
fileList
;
const
list
=
vm
.
state
.
fileList
;
list
.
push
({
list
.
push
({
...
...
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