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
shenshaokai
jinfa-platform
Commits
f53e4ff3
Commit
f53e4ff3
authored
Jul 10, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:
parent
9b8e7018
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
36 deletions
+58
-36
index.tsx
src/pages/procurement/components/bidParticulars/index.tsx
+3
-2
index.tsx
src/pages/procurement/components/descriptionsInfo/index.tsx
+55
-34
No files found.
src/pages/procurement/components/bidParticulars/index.tsx
View file @
f53e4ff3
...
...
@@ -120,7 +120,7 @@ const BidParticulars: React.FC<BidParticularsProps> = ({cardTitle}) => {
<
Table
columns=
{
tableColumn
}
expandable=
{
{
expandedRowRender
:
record
=>
<
p
style=
{
{
margin
:
0
}
}
>
{
record
.
description
||
<
Spin
size=
"small"
style=
{
{
margin
:
'15px auto'
,
width
:
'100%'
}
}
/>
}
</
p
>,
expandedRowRender
:
record
=>
<
p
style=
{
{
margin
:
0
}
}
>
{
record
?.
commodityId
?
(
record
.
description
||
<
Spin
size=
"small"
style=
{
{
margin
:
'15px auto'
,
width
:
'100%'
}
}
/>)
:
null
}
</
p
>,
rowExpandable
:
record
=>
record
.
name
!==
'Not Expandable'
,
expandIcon
:
({
expanded
,
onExpand
,
record
})
=>
expanded
?
(
...
...
@@ -131,7 +131,8 @@ const BidParticulars: React.FC<BidParticularsProps> = ({cardTitle}) => {
onExpand
:
(
expanded
,
record
)
=>
{
console
.
log
(
'通过商品Id 查询商品信息显示在嵌套中'
,
record
,
expanded
)
if
(
!
record
?.
commodityId
&&
expanded
)
{
return
message
.
error
(
'您没有关联商品'
)
// return message.error('您没有关联商品')
return
null
}
if
(
expanded
)
{
renderDescription
(
record
)
...
...
src/pages/procurement/components/descriptionsInfo/index.tsx
View file @
f53e4ff3
...
...
@@ -6,12 +6,13 @@ import { formatTimeString } from '@/utils'
import
style
from
'./index.less'
import
{
CaretDownOutlined
,
CaretUpOutlined
,
ExclamationCircleFilled
,
FileFilled
}
from
'@ant-design/icons'
;
import
{
Chart
,
Coordinate
,
Legend
,
View
,
}
from
'bizcharts'
;
import
Interval
from
'bizcharts/lib/geometry/Interval'
Chart
,
Interval
,
Coordinate
,
Legend
,
View
,
}
from
"bizcharts"
;
import
{
Annotation
}
from
'bizcharts/lib'
import
moment
from
'moment'
;
import
{
BidInStateTexts
,
BidOutStateTexts
,
PURCHASE_TYPE
,
TenderInStateTexts
,
TenderOutStateTexts
}
from
'@/constants/procurement'
;
...
...
@@ -357,7 +358,7 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
name
:
'createTime'
,
render
:
(
text
,
record
)
=>
<
Row
justify=
'space-between'
>
<
Col
style=
{
{
margin
:
"0 16px"
}
}
>
<
CircleChart
sumPrice=
{
sumPrice
}
alreadyPay=
{
alreadyPay
}
/>
<
CircleChart
data=
{
myData
}
content=
{
myContent
}
/>
</
Col
>
<
Col
>
<
div
><
span
className=
{
style
[
'card-list_title'
]
}
>
中标金额(含税):
</
span
></
div
>
...
...
@@ -377,7 +378,7 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
name
:
'winTenderAnnounceFile'
,
render
:
(
t
,
r
)
=>
(<
div
>
{
data
[
'winTenderAnnounceFile'
].
map
((
_item
,
_i
)
=>
<
p
><
a
key=
{
`announce${_i}`
}
target=
"_blank"
href=
{
_item
.
url
}
><
FileFilled
/>
{
_item
.
payNod
e
}
</
a
></
p
>)
data
[
'winTenderAnnounceFile'
].
map
((
_item
,
_i
)
=>
<
p
><
a
key=
{
`announce${_i}`
}
target=
"_blank"
href=
{
_item
.
url
}
><
FileFilled
/>
{
_item
.
nam
e
}
</
a
></
p
>)
}
</
div
>)
},
...
...
@@ -392,7 +393,7 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
name
:
'winTenderNoticeFile'
,
render
:
(
t
,
r
)
=>
(<
div
>
{
data
[
'winTenderNoticeFile'
].
map
((
_item
,
_i
)
=>
<
p
><
a
key=
{
`notice${_i}`
}
target=
"_blank"
href=
{
_item
.
url
}
><
FileFilled
/>
{
_item
.
payNod
e
}
</
a
></
p
>)
data
[
'winTenderNoticeFile'
].
map
((
_item
,
_i
)
=>
<
p
><
a
key=
{
`notice${_i}`
}
target=
"_blank"
href=
{
_item
.
url
}
><
FileFilled
/>
{
_item
.
nam
e
}
</
a
></
p
>)
}
</
div
>)
},
...
...
@@ -455,32 +456,52 @@ const DescriptionsInfo: React.FC<BasicInfoProps> = ({cardTitle, type}) => {
}
// 圆形环状金额显示
const
CircleChart
=
props
=>
{
const
{
sumPrice
=
100
,
alreadyPay
=
10
}
=
props
const
alreadyRate
:
any
=
(
alreadyPay
/
sumPrice
).
toFixed
(
2
)
const
discontentRate
:
any
=
1
-
alreadyRate
const
myData
:
any
=
[
{
type
:
'中标金额'
,
percent
:
Number
(
alreadyRate
)
},
{
type
:
'未中金额'
,
percent
:
Number
(
discontentRate
)
},
];
const
myContent
:
any
=
{
percent
:
`
${
alreadyRate
*
100
}
%`
,
};
const
userData
=
[
{
type
:
'总金额'
,
value
:
sumPrice
-
alreadyPay
,
percent
:
Math
.
round
((
sumPrice
-
alreadyPay
)
/
sumPrice
)
/
100.00
},
{
type
:
'已支付'
,
value
:
alreadyPay
,
percent
:
Math
.
round
(
alreadyPay
/
sumPrice
)
/
100.00
}
];
return
<
Chart
placeholder=
{
false
}
height=
{
64
}
width=
{
64
}
style=
{
{
position
:
"relative"
}
}
autoFit
>
<
Legend
visible=
{
false
}
/>
{
/* 绘制图形 */
}
<
View
data=
{
userData
}
>
<
Coordinate
type=
"theta"
innerRadius=
{
0.75
}
/>
<
Interval
position=
"percent"
adjust=
"stack"
color=
{
[
'type'
,
[
'#ffc400'
,
'#6c9ceb'
]]
}
tooltip=
{
false
}
/>
<
p
style=
{
{
position
:
"absolute"
,
top
:
"50%"
,
left
:
"50%"
,
transform
:
"translate(-50%, -50%)"
}
}
>
{
sumPrice
<=
0
?
"0%"
:
(
Math
.
round
(
alreadyPay
/
sumPrice
*
10000
)
/
100.00
)
+
"%"
}
</
p
>
</
View
>
</
Chart
>
const
CircleChart
=
({
data
=
[],
content
=
{},
intervalConfig
=
{}
}:
any
)
=>
{
return
(
<
Chart
placeholder=
{
false
}
height=
{
100
}
width=
{
100
}
style=
{
{
position
:
"relative"
}
}
autoFit
>
<
Legend
visible=
{
false
}
/>
{
/* 绘制图形 */
}
<
View
data=
{
data
}
scale=
{
{
percent
:
{
formatter
:
(
val
)
=>
{
return
(
val
*
100
).
toFixed
(
2
)
+
"%"
;
},
},
}
}
>
<
Coordinate
type=
"theta"
innerRadius=
{
0.5
}
/>
<
Interval
position=
"percent"
adjust=
"stack"
color=
{
[
'type'
,
[
'#6c9ceb'
,
'#ffc400'
]]
}
size=
{
16
}
{
...
intervalConfig
}
/>
<
Annotation
.
Text
position=
{
[
"50%"
,
"48%"
]
}
content=
{
content
.
percent
}
style=
{
{
lineHeight
:
240
,
fontSize
:
14
,
fill
:
"#000"
,
textAlign
:
"center"
,
}
}
/>
</
View
>
</
Chart
>
);
}
...
...
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