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
bce4c404
Commit
bce4c404
authored
Jul 07, 2021
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 在线竞价 提交竞价按钮增加loading
parent
3372d94f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
index.tsx
...y/components/detail/components/bidDetailBtnItem/index.tsx
+5
-4
index.tsx
...agement/components/statusBox/detailBottomDrawer/index.tsx
+7
-2
No files found.
src/pages/transaction/purchaseAbility/components/detail/components/bidDetailBtnItem/index.tsx
View file @
bce4c404
...
...
@@ -12,11 +12,12 @@ interface BtnItemProps {
btnType
?:
number
,
active
?:
boolean
,
onOk
?:
()
=>
void
,
onCancle
?:
()
=>
void
onCancle
?:
()
=>
void
,
btnLoading
?:
boolean
}
const
BtnItem
:
React
.
FC
<
BtnItemProps
>
=
(
props
:
any
)
=>
{
const
{
btnType
,
active
,
detail
,
onOk
,
onCancle
}
=
props
;
const
{
btnType
,
active
,
detail
,
onOk
,
onCancle
,
btnLoading
}
=
props
;
const
_returnBtn
=
()
=>
{
if
(
btnType
===
1
)
{
return
(
...
...
@@ -43,7 +44,7 @@ const BtnItem: React.FC<BtnItemProps> = (props: any) => {
<
div
className=
{
styles
.
box
}
>
<
div
className=
{
styles
.
price
}
>
<
div
>
¥
{
priceFormat
(
detail
?.
sumPice
)
}
<
span
>
(含税)
</
span
></
div
>
第
{
detail
?.
peportPriceSum
}
次
第
{
detail
?.
peportPriceSum
}
次
</
div
>
<
div
className=
{
styles
.
time
}
>
<
span
>
{
formatTimeString
(
detail
?.
peportTime
,
'HH:mm:ss'
)
}
</
span
>
...
...
@@ -67,7 +68,7 @@ const BtnItem: React.FC<BtnItemProps> = (props: any) => {
<
Button
block
style=
{
{
backgroundColor
:
'#F4F5F7'
,
border
:
0
}
}
onClick=
{
onCancle
}
>
取消
</
Button
>
</
Col
>
<
Col
span=
{
12
}
>
<
Button
type=
"primary"
block
onClick=
{
onOk
}
disabled=
{
!
active
}
>
提交报价
</
Button
>
<
Button
type=
"primary"
block
onClick=
{
onOk
}
loading=
{
btnLoading
}
disabled=
{
!
active
}
>
提交报价
</
Button
>
</
Col
>
</
Row
>
</
div
>
...
...
src/pages/transaction/purchaseAbility/purchaseBid/readyBid/management/components/statusBox/detailBottomDrawer/index.tsx
View file @
bce4c404
...
...
@@ -24,6 +24,7 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
const
[
activeIndex
,
setActiveIndex
]
=
useState
<
any
>
(
''
);
const
[
dataSource
,
setDataSource
]
=
useState
<
any
>
(
materiels
);
const
[
dataSource2
,
setDataSource2
]
=
useState
<
any
>
(
materiels
);
const
[
btnLoading
,
setBtnLoading
]
=
useState
<
boolean
>
(
false
);
useEffect
(()
=>
{
if
(
visible
)
{
setDataSource
(
materiels
)
...
...
@@ -121,6 +122,9 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
}
const
bidOk
=
()
=>
{
if
(
btnLoading
){
return
;
}
const
_price
=
dataSource2
.
reduce
((
total
:
any
,
cur
:
any
)
=>
total
+
Number
(
cur
.
price
),
0
);
if
(
detail
?.
minLowPrice
&&
Number
(
detail
.
minLowPrice
)
-
_price
<
detail
.
minPrice
)
{
message
.
error
(
'当前报价金额不满足最小价差要求,请修改后再报价!'
);
...
...
@@ -137,11 +141,12 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
onlineId
:
detail
.
onlineId
,
materiels
:
_dataSource2
,
}
setBtnLoading
(
true
);
PublicApi
.
postPurchaseOnlineBiddingSubmitReportPrice
(
_params
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
onClose
&&
onClose
();
}
})
})
.
finally
(()
=>
setBtnLoading
(
false
))
}
return
(
...
...
@@ -158,7 +163,7 @@ const DetailBottomDrawer: React.FC<DetailBottomDrawerProps> = (props: any) => {
>
<
Row
gutter=
{
[
8
,
8
]
}
style=
{
{
marginBottom
:
'10px'
}
}
>
<
Col
span=
{
7
}
key=
{
'BtnItem_0'
}
onClick=
{
()
=>
{
chooseItem
()
}
}
>
<
BtnItem
btnType=
{
3
}
detail=
{
{
sumPice
:
_calcCurrentTotal
,
peportPriceSum
:
offerCount
+
1
}
}
active=
{
!
activeItem
}
onOk=
{
bidOk
}
onCancle=
{
onClose
}
/>
<
BtnItem
btnType=
{
3
}
detail=
{
{
sumPice
:
_calcCurrentTotal
,
peportPriceSum
:
offerCount
+
1
}
}
active=
{
!
activeItem
}
onOk=
{
bidOk
}
onCancle=
{
onClose
}
btnLoading=
{
btnLoading
}
/>
</
Col
>
{
awardProcess
?.
map
((
item
,
index
,
arr
)
=>
{
let
_ratio
=
0
;
...
...
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