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
linweijiong
jinfa-platform
Commits
f057b1b1
Commit
f057b1b1
authored
Aug 23, 2021
by
alwayOnlie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
30769d21
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
6 deletions
+26
-6
Fromtable.tsx
src/pages/contract/manage/add/components/Fromtable.tsx
+16
-6
Fromtable.tsx
src/pages/contract/manage/editing/components/Fromtable.tsx
+10
-0
No files found.
src/pages/contract/manage/add/components/Fromtable.tsx
View file @
f057b1b1
...
...
@@ -83,7 +83,7 @@ const FormList = (props: any) => {
},
{
title
:
'付款金额'
,
dataIndex
:
'payAmount'
,
align
:
'left'
,
render
:
(
_
,
item
,
index
)
=>
render
:
(
text
,
item
,
index
)
=>
<
div
className=
{
styles
.
flex
}
>
<
span
>
¥
</
span
>
<
Input
...
...
@@ -91,7 +91,9 @@ const FormList = (props: any) => {
width
:
130
,
}
}
placeholder=
""
value=
{
Number
(
item
.
payAmount
).
toFixed
(
2
)
}
value=
{
text
}
onBlur=
{
(
e
)
=>
onblurkey
(
e
,
'payAmount'
,
index
)
}
onChange=
{
(
e
)
=>
onSelectChange
(
e
,
'payAmount'
,
index
)
}
/>
</
div
>
...
...
@@ -182,7 +184,16 @@ const FormList = (props: any) => {
setPlanList
(
List
)
setoptions
(
optionsData
)
};
const
onblurkey
=
(
e
,
name
,
idx
)
=>
{
let
item
=
[...
PlanList
];
console
.
log
(
item
[
idx
],
1231321
)
switch
(
name
)
{
case
'payAmount'
:
item
[
idx
].
payAmount
=
Number
(
item
[
idx
].
payAmount
).
toFixed
(
2
);
break
;
}
setPlanList
(
item
)
}
/* 选中设置值 */
const
onSelectChange
=
(
e
,
name
,
idx
)
=>
{
let
item
=
[...
PlanList
];
...
...
@@ -207,15 +218,14 @@ const FormList = (props: any) => {
break
;
case
'payAmount'
:
if
(
Price
!=
0
)
{
item
[
idx
].
payRatio
=
e
.
target
.
value
/
Price
*
100
;
item
[
idx
].
payRatio
=
Number
(
e
.
target
.
value
/
Price
*
100
).
toFixed
(
2
)
;
}
item
[
idx
].
payAmount
=
e
.
target
.
value
;
item
[
idx
].
payAmount
=
e
.
target
.
value
break
;
case
'payParam'
:
item
[
idx
].
payParam
=
e
;
break
;
}
console
.
log
(
item
[
idx
])
setPlanList
(
item
)
}
useEffect
(()
=>
{
...
...
src/pages/contract/manage/editing/components/Fromtable.tsx
View file @
f057b1b1
...
...
@@ -22,6 +22,15 @@ const FormList = (props: any) => {
const
[
PlanList
,
setPlanList
]
=
useState
<
any
>
([
]);
const
onblurkey
=
(
e
,
name
,
idx
)
=>
{
let
item
=
[...
PlanList
];
switch
(
name
)
{
case
'payAmount'
:
item
[
idx
].
payAmount
=
Number
(
item
[
idx
].
payAmount
).
toFixed
(
2
);
break
;
}
setPlanList
(
item
)
}
/* 显示模态框 */
const
tabcolumns
:
any
=
[
{
...
...
@@ -65,6 +74,7 @@ const FormList = (props: any) => {
// defaultValue={text}
value=
{
text
}
placeholder=
""
onBlur=
{
(
e
)
=>
onblurkey
(
e
,
'payAmount'
,
index
)
}
onChange=
{
(
e
)
=>
onSelectChange
(
e
,
'payRatio'
,
index
)
}
/>
<
span
>
%
</
span
>
...
...
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