Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
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
黄庭坚
jinfa-platform
Commits
a1a460a3
Commit
a1a460a3
authored
Feb 09, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 上传时按钮禁用
parent
605665bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
index.tsx
...terService/components/RefundModal/UploadVoucher/index.tsx
+8
-0
index.ts
...vice/components/RefundModal/UploadVoucher/schema/index.ts
+1
-0
No files found.
src/pages/afterService/components/RefundModal/UploadVoucher/index.tsx
View file @
a1a460a3
...
...
@@ -63,6 +63,7 @@ const UploadVoucher: React.FC<UploadVoucherProps> = ({
id
:
0
,
});
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
refundDisabled
,
setRefundDisabled
]
=
useState
(
false
);
// 获取对公账户信息
const
getSettleAccountsGetMemberAccountConfig
=
()
=>
{
...
...
@@ -91,6 +92,7 @@ const UploadVoucher: React.FC<UploadVoucherProps> = ({
message
.
warning
(
'图片大小超过200K'
);
return
Promise
.
reject
();
}
setRefundDisabled
(
true
);
};
const
handleUploadVoucherSubmit
=
values
=>
{
...
...
@@ -114,6 +116,10 @@ const UploadVoucher: React.FC<UploadVoucherProps> = ({
}
};
const
handleUploadChange
=
(
file
)
=>
{
setRefundDisabled
(
false
);
};
return
(
<
Spin
spinning=
{
loading
}
>
<
Wrap
>
...
...
@@ -125,6 +131,7 @@ const UploadVoucher: React.FC<UploadVoucherProps> = ({
}
}
expressionScope=
{
{
beforeUpload
:
beforeUploadVoucher
,
onUploadChange
:
handleUploadChange
,
}
}
actions=
{
uploadVoucherFormActions
}
schema=
{
uploadVoucherModalSchema
}
...
...
@@ -142,6 +149,7 @@ const UploadVoucher: React.FC<UploadVoucherProps> = ({
type=
"primary"
onClick=
{
()
=>
uploadVoucherFormActions
.
submit
()
}
loading=
{
submitLoading
}
disabled=
{
refundDisabled
}
>
退款
</
Button
>
...
...
src/pages/afterService/components/RefundModal/UploadVoucher/schema/index.ts
View file @
a1a460a3
...
...
@@ -47,6 +47,7 @@ export const uploadVoucherModalSchema: ISchema = {
prefix
:
'/returnManage/refundVoucher/'
,
},
beforeUpload
:
'{{beforeUpload}}'
,
onChange
:
'{{onUploadChange}}'
,
accept
:
'.png, .jpg, .jpeg'
,
},
'x-mega-props'
:
{
...
...
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