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
3067085a
Commit
3067085a
authored
May 13, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修改售后详情UI
parent
444b2467
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
607 additions
and
543 deletions
+607
-543
index.tsx
...ges/afterService/components/ExchangeAddressInfo/index.tsx
+50
-21
index.ts
...terService/components/ExchangeAddressInfo/schema/index.ts
+11
-16
index.less
...es/afterService/components/ExchangeDeliverInfo/index.less
+2
-1
index.tsx
...ges/afterService/components/ExchangeDeliverInfo/index.tsx
+144
-140
index.less
...s/afterService/components/ExchangeReceivedInfo/index.less
+2
-1
index.tsx
...es/afterService/components/ExchangeReceivedInfo/index.tsx
+144
-140
index.less
src/pages/afterService/components/FileList/index.less
+8
-0
index.tsx
src/pages/afterService/components/FileList/index.tsx
+23
-19
index.tsx
...pages/afterService/components/ReturnAddressInfo/index.tsx
+28
-60
index.less
src/pages/afterService/components/ReturnAnalysis/index.less
+2
-1
index.tsx
src/pages/afterService/components/ReturnAnalysis/index.tsx
+127
-132
index.less
src/pages/afterService/components/Score/index.less
+25
-0
index.tsx
src/pages/afterService/components/Score/index.tsx
+41
-12
No files found.
src/pages/afterService/components/ExchangeAddressInfo/index.tsx
View file @
3067085a
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 09:54:04
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
2-19 20:33:3
6
* @LastEditTime: 2021-0
5-13 16:09:5
6
* @Description: 换货收货地址
*/
import
React
,
{
useEffect
}
from
'react'
;
...
...
@@ -26,7 +26,48 @@ export interface Values {
sendAddress
:
string
|
undefined
,
sendUserName
:
string
|
undefined
,
sendUserTel
:
string
|
undefined
,
};
}
interface
AddressData
{
/**
* id
*/
id
?:
number
;
/**
* 配送方式
*/
deliveryType
?:
number
;
/**
* 收件人名字
*/
name
:
string
,
/**
* 收件人电话号码
*/
phone
:
string
,
/**
* 收件地址
*/
fullAddress
:
string
,
}
interface
AddressProps
{
value
:
AddressData
,
}
const
Address
:
React
.
FC
<
AddressProps
>
=
({
value
})
=>
(
<
div
>
<
p
>
{
value
.
name
||
''
}
/
{
value
.
phone
||
''
}
</
p
>
<
p
>
{
value
.
fullAddress
||
''
}
</
p
>
</
div
>
);
const
ShippingAddress
:
React
.
FC
<
AddressProps
>
=
({
value
})
=>
(
<
div
>
<
p
>
{
value
.
name
||
''
}
/
{
value
.
phone
||
''
}
</
p
>
<
p
>
{
value
.
fullAddress
||
''
}
</
p
>
</
div
>
);
interface
ExchangeAddressInfo
extends
MellowCardProps
{
/**
...
...
@@ -90,7 +131,7 @@ interface ExchangeAddressInfo extends MellowCardProps {
* 提交事件
*/
onFormSubmit
:
(
values
:
Values
)
=>
void
;
}
;
}
const
ExchangeAddressInfo
:
React
.
FC
<
ExchangeAddressInfo
>
=
({
isEdit
=
false
,
...
...
@@ -188,20 +229,6 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
});
};
const
Address
=
(
<
div
>
<
p
>
{
deliveryAddress
.
name
||
''
}
/
{
deliveryAddress
.
phone
||
''
}
</
p
>
<
p
>
{
deliveryAddress
.
fullAddress
||
''
}
</
p
>
</
div
>
);
const
ShippingAddress
=
(
<
div
>
<
p
>
{
shippingAddress
.
name
||
''
}
/
{
shippingAddress
.
phone
||
''
}
</
p
>
<
p
>
{
shippingAddress
.
fullAddress
||
''
}
</
p
>
</
div
>
);
return
(
<
MellowCard
title=
"换货收货地址"
...
...
@@ -212,12 +239,10 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
deliveryType
:
shippingAddress
.
deliveryType
,
shippingAddress
:
shippingAddress
.
id
,
pickupAddress
:
shippingAddress
.
id
,
deliveryAddress
,
shippingAddressShow
:
shippingAddress
,
}
}
previewPlaceholder=
" "
expressionScope=
{
{
Address
,
ShippingAddress
,
}
}
effects=
{
(
$
,
{
getFieldValue
})
=>
{
useAsyncSelect
(
'*(shippingAddress,pickupAddress)'
,
fetchShipperAddress
,
[
'label'
,
'value'
]);
...
...
@@ -285,6 +310,10 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
}
});
}
}
components=
{
{
Address
,
ShippingAddress
,
}
}
editable=
{
isEdit
}
actions=
{
modalFormActions
}
schema=
{
schema
}
...
...
src/pages/afterService/components/ExchangeAddressInfo/schema/index.ts
View file @
3067085a
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-09 15:56:35
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
1-21 14:14:26
* @LastEditTime: 2021-0
5-13 16:18:24
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
...
...
@@ -15,9 +15,10 @@ export const schema: ISchema = {
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
labelCol
:
6
,
wrapperCol
:
16
,
labelAlign
:
'left'
,
labelWidth
:
106
,
labelAlign
:
'left'
,
grid
:
true
,
full
:
true
},
properties
:
{
deliveryType
:
{
...
...
@@ -37,14 +38,6 @@ export const schema: ISchema = {
},
],
},
deliveryAddress
:
{
type
:
'object'
,
title
:
'换货收货地址'
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{Address}}'
,
},
},
shippingAddress
:
{
type
:
'string'
,
title
:
'换货发货地址'
,
...
...
@@ -81,14 +74,16 @@ export const schema: ISchema = {
},
],
},
deliveryAddress
:
{
type
:
'object'
,
title
:
'换货收货地址'
,
'x-component'
:
'Address'
,
},
shippingAddressShow
:
{
type
:
'object'
,
title
:
'换货发货地址'
,
visible
:
false
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{ShippingAddress}}'
,
},
'x-component'
:
'ShippingAddress'
,
},
},
},
...
...
src/pages/afterService/components/ExchangeDeliverInfo/index.less
View file @
3067085a
.detailedWrap {
padding: 25px 24px 9px;
margin: 16px 0;
background-color: #F
7F8FA
;
background-color: #F
AFBFC
;
}
\ No newline at end of file
src/pages/afterService/components/ExchangeDeliverInfo/index.tsx
View file @
3067085a
...
...
@@ -2,11 +2,18 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
1-28 10:28:06
* @LastEditTime: 2021-0
5-13 16:58:51
* @Description: 换货发货统计、换货发货明细
*/
import
React
,
{
useState
}
from
'react'
;
import
{
Row
,
Col
,
Descriptions
,
Badge
,
Radio
,
Modal
}
from
'antd'
;
import
{
Row
,
Col
,
Descriptions
,
Badge
,
Modal
,
Tabs
,
}
from
'antd'
;
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
{
Link
}
from
'umi'
;
import
{
SummaryData
,
Detailed
}
from
'./interface'
;
...
...
@@ -15,6 +22,7 @@ import { EditableColumns } from '@/components/PolymericTable/interface';
import
PolymericTable
from
'@/components/PolymericTable'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
ButtonSwitch
from
'@/components/ButtonSwitch'
;
import
DescProgress
from
'@/components/DescProgress'
;
import
{
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_DELIVERY
,
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIVE
,
...
...
@@ -28,6 +36,7 @@ import {
import
styles
from
'./index.less'
;
const
{
confirm
}
=
Modal
;
const
{
TabPane
}
=
Tabs
;
interface
ExchangeDeliverInfoProps
extends
MellowCardProps
{
/**
...
...
@@ -88,7 +97,6 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
isEdit
=
false
,
...
rest
})
=>
{
const
[
currentBatch
,
setCurrentBatch
]
=
useState
(
1
);
const
[
radioValue
,
setRadioValue
]
=
useState
<
(
'1'
|
'2'
)
>
(
'2'
);
const
summaryColumns
:
EditableColumns
[]
=
[
...
...
@@ -134,14 +142,23 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
align
:
'center'
,
},
{
title
:
'已换货发货'
,
title
:
'已换货发货
/未换货发货
'
,
dataIndex
:
'deliveryCount'
,
align
:
'center'
,
},
{
title
:
'未换货发货'
,
dataIndex
:
'unDeliveryCount'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<
DescProgress
descriptions=
{
[
{
title
:
'已换货发货:'
,
value
:
`¥${text}`
,
},
{
title
:
'未换货发货:'
,
value
:
`¥${record.unDeliveryCount}`
,
},
]
}
percent=
{
(
text
/
record
.
replaceCount
)
*
100
}
/>
),
},
{
title
:
'已换货收货'
,
...
...
@@ -214,10 +231,6 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
},
];
const
handleBatchChange
=
e
=>
{
setCurrentBatch
(
e
.
target
.
value
);
};
const
handleConfirmExchangeDeliver
=
(
id
)
=>
{
if
(
onConfirmExchangeDeliver
)
{
confirm
({
...
...
@@ -275,6 +288,9 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
value=
{
radioValue
}
/>
)
}
bodyStyle=
{
{
paddingTop
:
0
,
}
}
{
...
rest
}
>
{
radioValue
===
'1'
?
(
...
...
@@ -288,136 +304,124 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
)
:
null
}
{
radioValue
===
'2'
?
(
<>
<
Radio
.
Group
options=
{
detailed
.
map
(
item
=>
({
label
:
`第 ${item.batch} 批次`
,
value
:
item
.
batch
,
}))
}
defaultValue=
{
currentBatch
}
onChange=
{
handleBatchChange
}
optionType=
"button"
/>
{
detailed
.
map
(
item
=>
(
<
div
key=
{
item
.
batch
}
style=
{
{
display
:
item
.
batch
===
currentBatch
?
'block'
:
'none'
,
}
}
>
<
div
className=
{
styles
.
detailedWrap
}
>
<
Row
align=
"middle"
>
<
Col
span=
{
16
}
>
<
Descriptions
>
<
Descriptions
.
Item
label=
"换货发货单号"
>
{
!
isPurchaser
?
(
<
Link
to=
{
`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${item.deliveryNoId}`
}
>
{
item
.
deliveryNo
}
</
Link
>
)
:
(
item
.
deliveryNo
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"物流单号"
>
<
Link
to=
{
`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail?id=${item.logisticsId}`
}
>
{
item
.
logisticsOrderNo
}
</
Link
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"换货入库单号"
>
{
isPurchaser
?
(
<
Tabs
>
{
detailed
.
map
((
item
)
=>
(
<
TabPane
tab=
{
`第 ${item.batch} 批次`
}
key=
{
`${item.batch}`
}
>
<
div
className=
{
styles
.
detailedWrap
}
>
<
Row
align=
"middle"
>
<
Col
span=
{
16
}
>
<
Descriptions
>
<
Descriptions
.
Item
label=
"换货发货单号"
>
{
!
isPurchaser
?
(
<
Link
to=
{
`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${item.deliveryNoId}`
}
>
{
item
.
deliveryNo
}
</
Link
>
)
:
(
item
.
deliveryNo
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"物流单号"
>
<
Link
to=
{
`/memberCenter/
tranactionAbility/stockSellStorage/bills/detail?id=${item.storage
Id}`
}
to=
{
`/memberCenter/
logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail?id=${item.logistics
Id}`
}
>
{
item
.
storage
No
}
{
item
.
logisticsOrder
No
}
</
Link
>
)
:
(
item
.
storageNo
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"发货时间"
>
{
item
.
deliveryTime
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"物流公司"
>
{
item
.
logisticsName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"入库时间"
>
{
item
.
storageTime
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Col
>
<
Col
span=
{
8
}
>
<
Descriptions
column=
{
2
}
>
<
Descriptions
.
Item
label=
"内部状态"
>
<
Badge
color=
{
'#6C9CEB'
}
text=
{
item
.
innerStatusName
}
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
{
(
isEdit
&&
!
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER
&&
innerStatus
===
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_DELIVERY
)
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmExchangeDeliver
(
item
.
deliveryId
)
}
>
确认换货发货
</
a
>
)
}
{
(
isEdit
&&
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_DELIVER
&&
innerStatus
===
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIVE
)
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmExchangeReceive
(
item
.
deliveryId
)
}
>
确认换货收货
</
a
>
)
}
{
(
isEdit
&&
!
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_RECEIVING
&&
innerStatus
===
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIPT
)
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmExchangeBack
(
item
.
deliveryId
)
}
>
确认换货回单
</
a
>
)
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Col
>
</
Row
>
</
div
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"换货入库单号"
>
{
isPurchaser
?
(
<
Link
to=
{
`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${item.storageId}`
}
>
{
item
.
storageNo
}
</
Link
>
)
:
(
item
.
storageNo
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"发货时间"
>
{
item
.
deliveryTime
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"物流公司"
>
{
item
.
logisticsName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"入库时间"
>
{
item
.
storageTime
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Col
>
<
Col
span=
{
8
}
>
<
Descriptions
column=
{
2
}
>
<
Descriptions
.
Item
label=
"内部状态"
>
<
Badge
color=
{
'#6C9CEB'
}
text=
{
item
.
innerStatusName
}
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
{
(
isEdit
&&
!
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER
&&
innerStatus
===
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_DELIVERY
)
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmExchangeDeliver
(
item
.
deliveryId
)
}
>
确认换货发货
</
a
>
)
}
{
(
isEdit
&&
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_DELIVER
&&
innerStatus
===
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIVE
)
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmExchangeReceive
(
item
.
deliveryId
)
}
>
确认换货收货
</
a
>
)
}
{
(
isEdit
&&
!
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_RECEIVING
&&
innerStatus
===
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIPT
)
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmExchangeBack
(
item
.
deliveryId
)
}
>
确认换货回单
</
a
>
)
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Col
>
</
Row
>
</
div
>
<
PolymericTable
rowKey=
{
record
=>
`${record.orderNo}+${record.productId}`
}
dataSource=
{
item
.
detailList
}
columns=
{
detailedColumns
}
loading=
{
false
}
pagination=
{
null
}
/>
</
div
>
))
}
<
PolymericTable
rowKey=
{
record
=>
`${record.orderNo}+${record.productId}`
}
dataSource=
{
item
.
detailList
}
columns=
{
detailedColumns
}
loading=
{
false
}
pagination=
{
null
}
/>
</
TabPane
>
))
}
</
Tabs
>
</>
)
:
null
}
</
MellowCard
>
...
...
src/pages/afterService/components/ExchangeReceivedInfo/index.less
View file @
3067085a
.detailedWrap {
padding: 25px 24px 9px;
margin: 16px 0;
background-color: #F
7F8FA
;
background-color: #F
AFBFC
;
}
\ No newline at end of file
src/pages/afterService/components/ExchangeReceivedInfo/index.tsx
View file @
3067085a
...
...
@@ -2,11 +2,18 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
1-28 10:29:01
* @LastEditTime: 2021-0
5-13 16:46:19
* @Description: 换货收货统计、换货发货明细
*/
import
React
,
{
useState
}
from
'react'
;
import
{
Row
,
Col
,
Descriptions
,
Badge
,
Radio
,
Modal
}
from
'antd'
;
import
{
Row
,
Col
,
Descriptions
,
Badge
,
Modal
,
Tabs
,
}
from
'antd'
;
import
{
ExclamationCircleOutlined
,
}
from
'@ant-design/icons'
;
...
...
@@ -17,6 +24,7 @@ import { EditableColumns } from '@/components/PolymericTable/interface';
import
PolymericTable
from
'@/components/PolymericTable'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
ButtonSwitch
from
'@/components/ButtonSwitch'
;
import
DescProgress
from
'@/components/DescProgress'
;
import
{
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_DELIVERY
,
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_RECEIVE
,
...
...
@@ -30,6 +38,7 @@ import {
import
styles
from
'./index.less'
;
const
{
confirm
}
=
Modal
;
const
{
TabPane
}
=
Tabs
;
interface
ExchangeReceivedInfoProps
extends
MellowCardProps
{
/**
...
...
@@ -90,7 +99,6 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
isEdit
=
false
,
...
rest
})
=>
{
const
[
currentBatch
,
setCurrentBatch
]
=
useState
(
1
);
const
[
radioValue
,
setRadioValue
]
=
useState
<
(
'1'
|
'2'
)
>
(
'2'
);
const
summaryColumns
:
EditableColumns
[]
=
[
...
...
@@ -136,14 +144,23 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
align
:
'center'
,
},
{
title
:
'已退货发货'
,
title
:
'已退货发货
/未退货发货
'
,
dataIndex
:
'deliveryCount'
,
align
:
'center'
,
},
{
title
:
'未退货发货'
,
dataIndex
:
'unDeliveryCount'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<
DescProgress
descriptions=
{
[
{
title
:
'已退货发货:'
,
value
:
`¥${text}`
,
},
{
title
:
'未退货发货:'
,
value
:
`¥${record.unDeliveryCount}`
,
},
]
}
percent=
{
(
text
/
record
.
replaceCount
)
*
100
}
/>
),
},
{
title
:
'已退货收货'
,
...
...
@@ -216,10 +233,6 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
},
];
const
handleBatchChange
=
e
=>
{
setCurrentBatch
(
e
.
target
.
value
);
};
const
handleConfirmReturnDeliver
=
(
id
)
=>
{
if
(
onConfirmReturnDeliver
)
{
confirm
({
...
...
@@ -284,6 +297,9 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
value=
{
radioValue
}
/>
)
}
bodyStyle=
{
{
paddingTop
:
0
,
}
}
{
...
rest
}
>
{
radioValue
===
'1'
?
(
...
...
@@ -297,136 +313,124 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
)
:
null
}
{
radioValue
===
'2'
?
(
<>
<
Radio
.
Group
options=
{
detailed
.
map
(
item
=>
({
label
:
`第 ${item.batch} 批次`
,
value
:
item
.
batch
,
}))
}
defaultValue=
{
currentBatch
}
onChange=
{
handleBatchChange
}
optionType=
"button"
/>
{
detailed
.
map
(
item
=>
(
<
div
key=
{
item
.
batch
}
style=
{
{
display
:
item
.
batch
===
currentBatch
?
'block'
:
'none'
,
}
}
>
<
div
className=
{
styles
.
detailedWrap
}
>
<
Row
align=
"middle"
>
<
Col
span=
{
16
}
>
<
Descriptions
>
<
Descriptions
.
Item
label=
"退货发货单号"
>
{
isPurchaser
?
(
<
Link
to=
{
`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${item.deliveryNoId}`
}
>
{
item
.
deliveryNo
}
</
Link
>
)
:
(
item
.
deliveryNo
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"物流单号"
>
<
Link
to=
{
`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail?id=${item.logisticsId}`
}
>
{
item
.
logisticsOrderNo
}
</
Link
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"退货入库单号"
>
{
!
isPurchaser
?
(
<
Tabs
>
{
detailed
.
map
((
item
)
=>
(
<
TabPane
tab=
{
`第 ${item.batch} 批次`
}
key=
{
`${item.batch}`
}
>
<
div
className=
{
styles
.
detailedWrap
}
>
<
Row
align=
"middle"
>
<
Col
span=
{
16
}
>
<
Descriptions
>
<
Descriptions
.
Item
label=
"退货发货单号"
>
{
isPurchaser
?
(
<
Link
to=
{
`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${item.deliveryNoId}`
}
>
{
item
.
deliveryNo
}
</
Link
>
)
:
(
item
.
deliveryNo
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"物流单号"
>
<
Link
to=
{
`/memberCenter/
tranactionAbility/stockSellStorage/bills/detail?id=${item.storage
Id}`
}
to=
{
`/memberCenter/
logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail?id=${item.logistics
Id}`
}
>
{
item
.
storage
No
}
{
item
.
logisticsOrder
No
}
</
Link
>
)
:
(
item
.
storageNo
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"发货时间"
>
{
item
.
deliveryTime
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"物流公司"
>
{
item
.
logisticsName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"入库时间"
>
{
item
.
storageTime
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Col
>
<
Col
span=
{
8
}
>
<
Descriptions
column=
{
2
}
>
<
Descriptions
.
Item
label=
"内部状态"
>
<
Badge
color=
{
'#6C9CEB'
}
text=
{
item
.
innerStatusName
}
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
{
(
isEdit
&&
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER
&&
innerStatus
===
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_DELIVERY
)
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmReturnDeliver
(
item
.
deliveryId
)
}
>
确认退货发货
</
a
>
)
}
{
(
isEdit
&&
!
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_DELIVER
&&
innerStatus
===
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_RECEIVE
)
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmReturnReceive
(
item
.
deliveryId
)
}
>
确认退货收货
</
a
>
)
}
{
(
isEdit
&&
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_RECEIVING
&&
innerStatus
===
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_RECEIPT
)
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmReturnBack
(
item
.
deliveryId
)
}
>
确认退货回单
</
a
>
)
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Col
>
</
Row
>
</
div
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"退货入库单号"
>
{
!
isPurchaser
?
(
<
Link
to=
{
`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${item.storageId}`
}
>
{
item
.
storageNo
}
</
Link
>
)
:
(
item
.
storageNo
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"发货时间"
>
{
item
.
deliveryTime
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"物流公司"
>
{
item
.
logisticsName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"入库时间"
>
{
item
.
storageTime
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Col
>
<
Col
span=
{
8
}
>
<
Descriptions
column=
{
2
}
>
<
Descriptions
.
Item
label=
"内部状态"
>
<
Badge
color=
{
'#6C9CEB'
}
text=
{
item
.
innerStatusName
}
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
{
(
isEdit
&&
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER
&&
innerStatus
===
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_DELIVERY
)
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmReturnDeliver
(
item
.
deliveryId
)
}
>
确认退货发货
</
a
>
)
}
{
(
isEdit
&&
!
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_DELIVER
&&
innerStatus
===
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_RECEIVE
)
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmReturnReceive
(
item
.
deliveryId
)
}
>
确认退货收货
</
a
>
)
}
{
(
isEdit
&&
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_RECEIVING
&&
innerStatus
===
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_RECEIPT
)
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmReturnBack
(
item
.
deliveryId
)
}
>
确认退货回单
</
a
>
)
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Col
>
</
Row
>
</
div
>
<
PolymericTable
rowKey=
{
record
=>
`${record.orderNo}+${record.productId}`
}
dataSource=
{
item
.
detailList
}
columns=
{
detailedColumns
}
loading=
{
false
}
pagination=
{
null
}
/>
</
div
>
))
}
<
PolymericTable
rowKey=
{
record
=>
`${record.orderNo}+${record.productId}`
}
dataSource=
{
item
.
detailList
}
columns=
{
detailedColumns
}
loading=
{
false
}
pagination=
{
null
}
/>
</
TabPane
>
))
}
</
Tabs
>
</>
)
:
null
}
</
MellowCard
>
...
...
src/pages/afterService/components/FileList/index.less
View file @
3067085a
.file {
:global {
.ant-upload-list-item {
margin-top: 0;
}
}
}
\ No newline at end of file
src/pages/afterService/components/FileList/index.tsx
View file @
3067085a
...
...
@@ -2,16 +2,11 @@
* @Author: XieZhiXiong
* @Date: 2020-11-03 11:49:34
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-05-1
2 15:10:10
* @LastEditTime: 2021-05-1
3 15:38:46
* @Description: 附件列表
*/
import
React
from
'react'
;
import
{
Empty
}
from
'antd'
;
import
{
SchemaForm
,
SchemaMarkupField
as
Field
,
}
from
'@formily/antd'
;
import
{
Upload
,
FormMegaLayout
}
from
'@formily/antd-components'
;
import
{
Empty
,
Descriptions
,
Upload
}
from
'antd'
;
import
{
FileData
}
from
'@/utils'
;
import
MellowCard
,
{
MellowCardProps
}
from
'@/components/MellowCard'
;
import
styles
from
'./index.less'
;
...
...
@@ -33,18 +28,27 @@ const FileList: React.FC<FileListProps> = ({
{
...
rest
}
>
{
fileList
&&
fileList
.
length
?
(
<
SchemaForm
components=
{
{
Upload
}
}
value=
{
{
files
:
fileList
,
}
}
editable=
{
false
}
previewPlaceholder=
" "
>
<
FormMegaLayout
full
>
<
Field
name=
"files"
title=
"相关不良原因举证附件"
x
-
component=
"Upload"
/>
</
FormMegaLayout
>
</
SchemaForm
>
// <SchemaForm
// components=
{{
Upload
}}
// value=
{{
// files: fileList,
//
}}
// editable=
{
false
}
// previewPlaceholder=" "
// >
// <FormMegaLayout full>
// <Field name="files" title="相关不良原因举证附件" x-component="Upload" />
// </FormMegaLayout>
// </SchemaForm>
<
Descriptions
column=
{
1
}
>
<
Descriptions
.
Item
label=
"相关不良原因举证附件"
>
<
Upload
className=
{
styles
.
file
}
fileList=
{
fileList
}
disabled
/>
</
Descriptions
.
Item
>
</
Descriptions
>
)
:
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
)
}
...
...
src/pages/afterService/components/ReturnAddressInfo/index.tsx
View file @
3067085a
...
...
@@ -30,30 +30,40 @@ export interface Values {
};
interface
AddressData
{
value
:
{
/**
* 收件人名字
*/
name
:
string
,
/**
* 收件人电话号码
*/
phone
:
string
,
/**
* 收件地址
*/
fullAddress
:
string
,
}
/**
* id
*/
id
?:
number
;
/**
* 配送方式
*/
deliveryType
?:
number
;
/**
* 收件人名字
*/
name
:
string
,
/**
* 收件人电话号码
*/
phone
:
string
,
/**
* 收件地址
*/
fullAddress
:
string
,
}
interface
AddressProps
{
value
:
AddressData
,
}
const
Address
:
React
.
FC
<
Address
Data
>
=
({
value
})
=>
(
const
Address
:
React
.
FC
<
Address
Props
>
=
({
value
})
=>
(
<
div
>
<
p
>
{
value
.
name
||
''
}
/
{
value
.
phone
||
''
}
</
p
>
<
p
>
{
value
.
fullAddress
||
''
}
</
p
>
</
div
>
);
const
DeliveryAddress
:
React
.
FC
<
Address
Data
>
=
({
value
})
=>
(
const
DeliveryAddress
:
React
.
FC
<
Address
Props
>
=
({
value
})
=>
(
<
div
>
<
p
>
{
value
.
name
||
''
}
/
{
value
.
phone
||
''
}
</
p
>
<
p
>
{
value
.
fullAddress
||
''
}
</
p
>
...
...
@@ -69,54 +79,12 @@ interface ReturnAddressInfo extends MellowCardProps {
/**
* 退货收货地址
*/
deliveryAddress
:
{
/**
* id
*/
id
?:
number
;
/**
* 配送方式
*/
deliveryType
?:
number
;
/**
* 收件人姓名
*/
name
:
string
;
/**
* phone
*/
phone
:
string
;
/**
* 完整地址
*/
fullAddress
:
string
;
},
deliveryAddress
:
AddressData
,
/**
* 退货发货地址
*/
shippingAddress
:
{
/**
* id
*/
id
?:
number
;
/**
* 配送方式
*/
deliveryType
?:
number
;
/**
* 收件人姓名
*/
name
:
string
;
/**
* phone
*/
phone
:
string
;
/**
* 完整地址
*/
fullAddress
:
string
;
},
shippingAddress
:
AddressData
,
/**
* 表单提交事件
...
...
src/pages/afterService/components/ReturnAnalysis/index.less
View file @
3067085a
.detailedWrap {
padding: 25px 24px 9px;
margin: 16px 0;
background-color: #F
7F8FA
;
background-color: #F
AFBFC
;
}
\ No newline at end of file
src/pages/afterService/components/ReturnAnalysis/index.tsx
View file @
3067085a
...
...
@@ -6,7 +6,14 @@
* @Description: 退货收货统计、退货发货明细
*/
import
React
,
{
useState
}
from
'react'
;
import
{
Row
,
Col
,
Descriptions
,
Badge
,
Radio
,
Modal
}
from
'antd'
;
import
{
Row
,
Col
,
Descriptions
,
Badge
,
Modal
,
Tabs
,
}
from
'antd'
;
import
{
ExclamationCircleOutlined
,
}
from
'@ant-design/icons'
;
...
...
@@ -31,6 +38,8 @@ import {
import
styles
from
'./index.less'
;
const
{
confirm
}
=
Modal
;
const
{
TabPane
}
=
Tabs
;
interface
ReturnInfoProps
extends
MellowCardProps
{
/**
* 退货收货统计
...
...
@@ -90,7 +99,6 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
isEdit
=
false
,
...
rest
})
=>
{
const
[
currentBatch
,
setCurrentBatch
]
=
useState
(
1
);
const
[
radioValue
,
setRadioValue
]
=
useState
<
(
'1'
|
'2'
)
>
(
'2'
);
const
summaryColumns
:
EditableColumns
[]
=
[
...
...
@@ -225,10 +233,6 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
},
];
const
handleBatchChange
=
e
=>
{
setCurrentBatch
(
e
.
target
.
value
);
};
const
handleConfirmReturnDeliver
=
(
id
)
=>
{
if
(
onConfirmReturnDeliver
)
{
confirm
({
...
...
@@ -293,6 +297,9 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
value=
{
radioValue
}
/>
)
}
bodyStyle=
{
{
paddingTop
:
0
,
}
}
{
...
rest
}
>
{
radioValue
===
'1'
?
(
...
...
@@ -306,136 +313,124 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
)
:
null
}
{
radioValue
===
'2'
?
(
<>
<
Radio
.
Group
options=
{
detailed
.
map
(
item
=>
({
label
:
`第 ${item.batch} 批次`
,
value
:
item
.
batch
,
}))
}
defaultValue=
{
currentBatch
}
onChange=
{
handleBatchChange
}
optionType=
"button"
/>
{
detailed
.
map
(
item
=>
(
<
div
key=
{
item
.
batch
}
style=
{
{
display
:
item
.
batch
===
currentBatch
?
'block'
:
'none'
,
}
}
>
<
div
className=
{
styles
.
detailedWrap
}
>
<
Row
align=
"middle"
>
<
Col
span=
{
16
}
>
<
Descriptions
>
<
Descriptions
.
Item
label=
"退货发货单号"
>
{
isPurchaser
?
(
<
Tabs
>
{
detailed
.
map
((
item
)
=>
(
<
TabPane
tab=
{
`第 ${item.batch} 批次`
}
key=
{
`${item.batch}`
}
>
<
div
className=
{
styles
.
detailedWrap
}
>
<
Row
align=
"middle"
>
<
Col
span=
{
16
}
>
<
Descriptions
>
<
Descriptions
.
Item
label=
"退货发货单号"
>
{
isPurchaser
?
(
<
Link
to=
{
`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${item.deliveryNoId}`
}
>
{
item
.
deliveryNo
}
</
Link
>
)
:
(
item
.
deliveryNo
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"物流单号"
>
<
Link
to=
{
`/memberCenter/
tranactionAbility/stockSellStorage/bills/detail?id=${item.deliveryNo
Id}`
}
to=
{
`/memberCenter/
logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail?id=${item.logistics
Id}`
}
>
{
item
.
delivery
No
}
{
item
.
logisticsOrder
No
}
</
Link
>
)
:
(
item
.
deliveryNo
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"物流单号"
>
<
Link
to=
{
`/memberCenter/logisticsAbility/logisticsSubmit/orderSubmitSearchList/detail?id=${item.logisticsId}`
}
>
{
item
.
logisticsOrderNo
}
</
Link
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"退货入库单号"
>
{
!
isPurchaser
?
(
<
Link
to=
{
`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${item.storageId}`
}
>
{
item
.
storageNo
}
</
Link
>
)
:
(
item
.
storageNo
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"发货时间"
>
{
item
.
deliveryTime
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"物流公司"
>
{
item
.
logisticsName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"入库时间"
>
{
item
.
storageTime
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Col
>
<
Col
span=
{
8
}
>
<
Descriptions
column=
{
2
}
>
<
Descriptions
.
Item
label=
"内部状态"
>
<
Badge
color=
{
'#6C9CEB'
}
text=
{
item
.
innerStatusName
}
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
{
(
isEdit
&&
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER
&&
innerStatus
===
RETURN_INNER_STATUS_UNCONFIRMED_RETURN_DELIVERY
)
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmReturnDeliver
(
item
.
deliveryId
)
}
>
确认退货发货
</
a
>
)
}
{
(
isEdit
&&
!
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_DELIVER
&&
innerStatus
===
RETURN_INNER_STATUS_UNCONFIRMED_RETURN_RECEIVE
)
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmReturnReceive
(
item
.
deliveryId
)
}
>
确认退货收货
</
a
>
)
}
{
(
isEdit
&&
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_RECEIVING
&&
innerStatus
===
RETURN_INNER_STATUS_UNCONFIRMED_RETURN_RECEIPT
)
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmReturnBack
(
item
.
deliveryId
)
}
>
确认退货回单
</
a
>
)
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Col
>
</
Row
>
</
div
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"退货入库单号"
>
{
!
isPurchaser
?
(
<
Link
to=
{
`/memberCenter/tranactionAbility/stockSellStorage/bills/detail?id=${item.storageId}`
}
>
{
item
.
storageNo
}
</
Link
>
)
:
(
item
.
storageNo
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"发货时间"
>
{
item
.
deliveryTime
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"物流公司"
>
{
item
.
logisticsName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"入库时间"
>
{
item
.
storageTime
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Col
>
<
Col
span=
{
8
}
>
<
Descriptions
column=
{
2
}
>
<
Descriptions
.
Item
label=
"内部状态"
>
<
Badge
color=
{
'#6C9CEB'
}
text=
{
item
.
innerStatusName
}
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
{
(
isEdit
&&
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER
&&
innerStatus
===
RETURN_INNER_STATUS_UNCONFIRMED_RETURN_DELIVERY
)
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmReturnDeliver
(
item
.
deliveryId
)
}
>
确认退货发货
</
a
>
)
}
{
(
isEdit
&&
!
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_DELIVER
&&
innerStatus
===
RETURN_INNER_STATUS_UNCONFIRMED_RETURN_RECEIVE
)
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmReturnReceive
(
item
.
deliveryId
)
}
>
确认退货收货
</
a
>
)
}
{
(
isEdit
&&
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_RECEIVING
&&
innerStatus
===
RETURN_INNER_STATUS_UNCONFIRMED_RETURN_RECEIPT
)
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmReturnBack
(
item
.
deliveryId
)
}
>
确认退货回单
</
a
>
)
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Col
>
</
Row
>
</
div
>
<
PolymericTable
rowKey=
{
()
=>
Math
.
random
().
toFixed
(
16
).
slice
(
2
,
10
)
}
dataSource=
{
item
.
detailList
}
columns=
{
detailedColumns
}
loading=
{
false
}
pagination=
{
null
}
/>
</
div
>
))
}
<
PolymericTable
rowKey=
{
()
=>
Math
.
random
().
toFixed
(
16
).
slice
(
2
,
10
)
}
dataSource=
{
item
.
detailList
}
columns=
{
detailedColumns
}
loading=
{
false
}
pagination=
{
null
}
/>
</
TabPane
>
))
}
</
Tabs
>
</>
)
:
null
}
</
MellowCard
>
...
...
src/pages/afterService/components/Score/index.less
View file @
3067085a
@import '~antd/es/style/themes/default.less';
.evaluate {
.score {
position: absolute;
&-left {
padding-right: 90px;
}
&-right {
position: absolute;
top: -50%;
right: 0;
width: 80px;
flex-shrink: 0;
}
&-star {
font-size: @font-size-lg;
font-weight: 500;
}
}
}
\ No newline at end of file
src/pages/afterService/components/Score/index.tsx
View file @
3067085a
...
...
@@ -2,12 +2,14 @@
* @Author: XieZhiXiong
* @Date: 2020-11-03 14:12:34
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
2-20 14:28:19
* @LastEditTime: 2021-0
5-13 15:30:21
* @Description: 评价
*/
import
React
from
'react'
;
import
{
Row
,
Col
,
Descriptions
}
from
'antd'
;
import
MellowCard
,
{
MellowCardProps
}
from
'@/components/MellowCard'
;
import
{
Gauge
}
from
'@/components/Charts'
;
import
styles
from
'./index.less'
;
// 满分 5分
const
FULL_SCORE
=
5
;
...
...
@@ -47,19 +49,46 @@ const Score: React.FC<ScoreProps> = ({
return
(
<
MellowCard
title=
"售后评价"
className=
{
styles
.
evaluate
}
{
...
rest
}
>
<
Gauge
title=
{
`${score}分`
}
height=
{
170
}
percent=
{
+
(
score
/
FULL_SCORE
*
100
).
toFixed
(
2
)
}
formatter=
{
()
=>
''
}
formatContent=
{
(
val
)
=>
`${TITLE_MAP[score]}`
}
color=
{
COLOR_MAP
[
score
]
}
/>
<
p
style=
{
{
color
:
'#909399'
}
}
>
售后评价:
{
content
}
</
p
>
<
Row
gutter=
{
40
}
>
<
Col
span=
{
8
}
>
<
div
className=
{
styles
.
score
}
>
<
div
className=
{
styles
[
'score-left'
]
}
>
<
Descriptions
column=
{
1
}
>
<
Descriptions
.
Item
label=
"售后满意度"
>
<
span
className=
{
styles
[
'score-star'
]
}
>
{
`${score}分`
}
</
span
>
</
Descriptions
.
Item
>
</
Descriptions
>
</
div
>
<
div
className=
{
styles
[
'score-right'
]
}
>
<
Gauge
title=
""
height=
{
90
}
percent=
{
+
(
score
/
FULL_SCORE
*
100
).
toFixed
(
2
)
}
formatter=
{
()
=>
''
}
formatContent=
{
()
=>
''
}
color=
{
COLOR_MAP
[
score
]
}
strokeWidth=
{
5
}
/>
</
div
>
</
div
>
</
Col
>
<
Col
span=
{
16
}
>
<
Descriptions
column=
{
1
}
>
<
Descriptions
.
Item
label=
"售后评价"
>
{
content
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Col
>
</
Row
>
</
MellowCard
>
);
};
...
...
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