Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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-admin
Commits
93cdbde3
Commit
93cdbde3
authored
Feb 02, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 删除不必要的代码及优化展示
parent
d9b3f0b1
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
58 additions
and
130 deletions
+58
-130
index.tsx
...s/exchangeManage/components/ExchangeAddressInfo/index.tsx
+25
-5
index.ts
...angeManage/components/ExchangeAddressInfo/schema/index.ts
+12
-4
index.tsx
...s/exchangeManage/components/ExchangeDeliverInfo/index.tsx
+3
-83
index.tsx
.../exchangeManage/components/ExchangeReceivedInfo/index.tsx
+3
-33
detail.tsx
src/pages/exchangeManage/query/detail.tsx
+1
-0
constants.ts
src/pages/repairManage/constants.ts
+10
-5
detail.tsx
src/pages/repairManage/query/detail.tsx
+1
-0
index.tsx
src/pages/returnManage/components/DetailInfo/index.tsx
+1
-0
index.tsx
src/pages/returnManage/components/ReturnAnalysis/index.tsx
+1
-0
index.tsx
src/pages/returnManage/components/ReturnDetailInfo/index.tsx
+1
-0
No files found.
src/pages/exchangeManage/components/ExchangeAddressInfo/index.tsx
View file @
93cdbde3
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-06 09:54:04
* @LastEditors: XieZhiXiong
* @LastEditTime: 202
0-12-04 18:04:07
* @LastEditTime: 202
1-02-02 10:26:13
* @Description: 换货收货地址
*/
import
React
from
'react'
;
...
...
@@ -64,7 +64,7 @@ interface ExchangeAddressInfo {
},
// onSubmit
onSubmit
?
:
(
values
:
Values
)
=>
void
;
onSubmit
:
(
values
:
Values
)
=>
void
;
};
const
ExchangeAddressInfo
:
React
.
FC
<
ExchangeAddressInfo
>
=
({
...
...
@@ -125,6 +125,7 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
shippingAddress
:
shippingAddress
.
id
,
pickupAddress
:
shippingAddress
.
id
,
}
}
previewPlaceholder=
" "
expressionScope=
{
{
Address
,
ShippingAddress
,
...
...
@@ -136,7 +137,7 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
// 联动配送方式
onFieldValueChange$
(
'deliveryType'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
const
{
value
}
=
fieldState
;
switch
(
value
)
{
// 物流
...
...
@@ -172,10 +173,28 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
default
:
break
};
if
(
onSubmit
)
{
onSubmit
({
deliveryType
:
value
,
id
:
undefined
,
isDefault
:
undefined
,
sendAddress
:
undefined
,
sendUserName
:
undefined
,
sendUserTel
:
undefined
,
});
}
});
onFieldInputChange$
(
'deliveryType'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
}
=
fieldState
;
if
(
value
)
{
linkage
.
value
(
'*(shippingAddress,pickupAddress)'
,
undefined
);
}
});
onField
Value
Change$
(
'*(shippingAddress,pickupAddress)'
).
subscribe
(
fieldState
=>
{
const
{
name
,
value
,
originAsyncData
=
[]
}
=
fieldState
;
onField
Input
Change$
(
'*(shippingAddress,pickupAddress)'
).
subscribe
(
fieldState
=>
{
const
{
value
,
originAsyncData
=
[]
}
=
fieldState
;
const
deliveryTypeValue
=
getFieldValue
(
'deliveryType'
);
const
fullData
=
originAsyncData
.
find
(
item
=>
item
.
id
===
value
);
...
...
@@ -195,6 +214,7 @@ const ExchangeAddressInfo: React.FC<ExchangeAddressInfo> = ({
actions=
{
modalFormActions
}
schema=
{
schema
}
onSubmit=
{
handleSubmit
}
colon
/>
</
MellowCard
>
);
...
...
src/pages/exchangeManage/components/ExchangeAddressInfo/schema/index.ts
View file @
93cdbde3
...
...
@@ -2,11 +2,11 @@
* @Author: XieZhiXiong
* @Date: 2020-11-09 15:56:35
* @LastEditors: XieZhiXiong
* @LastEditTime: 202
0-11-25 15:19:36
* @LastEditTime: 202
1-01-21 14:14:26
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
UPLOAD_TYPE
,
DELIVERY_TYPE_ENUM
}
from
'@/constants'
;
import
{
DELIVERY_TYPE_ENUM
}
from
'@/constants'
;
export
const
schema
:
ISchema
=
{
type
:
'object'
,
...
...
@@ -15,7 +15,7 @@ export const schema: ISchema = {
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
labelCol
:
8
,
labelCol
:
6
,
wrapperCol
:
16
,
labelAlign
:
'left'
,
},
...
...
@@ -23,13 +23,19 @@ export const schema: ISchema = {
deliveryType
:
{
title
:
'配送方式'
,
type
:
'string'
,
default
:
1
,
enum
:
DELIVERY_TYPE_ENUM
,
'x-component-props'
:
{
placeholder
:
'请选择'
,
style
:
{
width
:
'80%'
,
},
},
'x-rules'
:
[
{
required
:
true
,
message
:
'请选择配送方式'
,
},
],
},
deliveryAddress
:
{
type
:
'object'
,
...
...
@@ -42,6 +48,7 @@ export const schema: ISchema = {
shippingAddress
:
{
type
:
'string'
,
title
:
'换货发货地址'
,
visible
:
false
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'请选择'
,
...
...
@@ -59,6 +66,7 @@ export const schema: ISchema = {
pickupAddress
:
{
type
:
'string'
,
title
:
'换货自提地址'
,
visible
:
false
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'请选择'
,
...
...
src/pages/exchangeManage/components/ExchangeDeliverInfo/index.tsx
View file @
93cdbde3
...
...
@@ -38,30 +38,12 @@ interface ExchangeDeliverInfoProps {
* 是否是采购商
*/
isPurchaser
?:
boolean
;
/**
* 确认退货回单
*/
onConfirmExchangeBack
?:
(
id
:
number
)
=>
void
;
/**
* 确认退货发货
*/
onConfirmExchangeDeliver
?:
(
id
:
number
)
=>
Promise
<
any
>
;
/**
* 确认退货收货
*/
onConfirmExchangeReceive
?:
(
id
:
number
)
=>
Promise
<
any
>
;
};
const
ExchangeDeliverInfo
:
React
.
FC
<
ExchangeDeliverInfoProps
>
=
({
summary
=
[],
detailed
=
[],
isPurchaser
=
false
,
onConfirmExchangeBack
,
onConfirmExchangeDeliver
,
onConfirmExchangeReceive
,
})
=>
{
const
summaryColumns
:
EditableColumns
[]
=
[
...
...
@@ -78,6 +60,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
ellipsis
:
true
,
},
{
title
:
'品类'
,
...
...
@@ -135,6 +118,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
ellipsis
:
true
,
},
{
title
:
'品类'
,
...
...
@@ -177,38 +161,6 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
};
const
handleConfirmExchangeDeliver
=
(
id
)
=>
{
if
(
onConfirmExchangeDeliver
)
{
confirm
({
title
:
'提示'
,
icon
:
<
ExclamationCircleOutlined
/>,
content
:
`是否确认换货发货?`
,
onOk
()
{
return
onConfirmExchangeDeliver
(
id
);
},
});
}
};
const
handleConfirmExchangeReceive
=
(
id
)
=>
{
if
(
onConfirmExchangeReceive
)
{
confirm
({
title
:
'提示'
,
icon
:
<
ExclamationCircleOutlined
/>,
content
:
`是否确认换货收货?`
,
onOk
()
{
return
onConfirmExchangeReceive
(
id
);
},
});
}
};
const
handleConfirmExchangeBack
=
(
id
)
=>
{
if
(
onConfirmExchangeBack
)
{
onConfirmExchangeBack
(
id
);
}
};
return
(
<
MellowCard
>
<
Tabs
defaultActiveKey=
"2"
>
...
...
@@ -268,39 +220,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
<
Badge
color=
{
'#6C9CEB'
}
text=
{
item
.
innerStatusName
}
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
{
item
.
innerStatus
===
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmExchangeDeliver
(
item
.
deliveryId
)
}
>
确认换货发货
</
a
>
)
}
{
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_DELIVER
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmExchangeReceive
(
item
.
deliveryId
)
}
>
确认换货收货
</
a
>
)
}
{
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_RECEIVING
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmExchangeBack
(
item
.
deliveryId
)
}
>
确认换货回单
</
a
>
)
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Col
>
...
...
src/pages/exchangeManage/components/ExchangeReceivedInfo/index.tsx
View file @
93cdbde3
...
...
@@ -79,6 +79,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
ellipsis
:
true
,
},
{
title
:
'品类'
,
...
...
@@ -136,6 +137,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
ellipsis
:
true
,
},
{
title
:
'品类'
,
...
...
@@ -276,39 +278,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
<
Badge
color=
{
'#6C9CEB'
}
text=
{
item
.
innerStatusName
}
/>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
{
item
.
innerStatus
===
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmReturnDeliver
(
item
.
deliveryId
)
}
>
确认退货发货
</
a
>
)
}
{
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_DELIVER
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmReturnReceive
(
item
.
deliveryId
)
}
>
确认退货收货
</
a
>
)
}
{
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_RECEIVING
&&
(
<
a
style=
{
{
textAlign
:
'right'
,
display
:
'block'
,
}
}
onClick=
{
()
=>
handleConfirmReturnBack
(
item
.
deliveryId
)
}
>
确认退货回单
</
a
>
)
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Col
>
...
...
src/pages/exchangeManage/query/detail.tsx
View file @
93cdbde3
...
...
@@ -121,6 +121,7 @@ const DetailInfo: React.FC = () => {
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
ellipsis
:
true
,
},
{
title
:
'品类'
,
...
...
src/pages/repairManage/constants.ts
View file @
93cdbde3
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-12-18 16:55:17
* @LastEditors: XieZhiXiong
* @LastEditTime: 202
0-12-18 16:55:17
* @LastEditTime: 202
1-02-02 10:27:36
* @Description:
*/
import
{
...
...
@@ -13,13 +13,15 @@ import {
REPAIR_OUTER_STATUS_FINISHED
,
REPAIR_INNER_STATUS_UNCOMMITTED
,
REPAIR_INNER_STATUS_COMMIT
TED
,
REPAIR_INNER_STATUS_COMMIT
_SUCCESS
,
REPAIR_INNER_STATUS_SUCCESS_1
,
REPAIR_INNER_STATUS_SUCCESS_2
,
REPAIR_INNER_STATUS_FAILED
,
REPAIR_INNER_STATUS_FAILED
_2
,
REPAIR_INNER_STATUS_CONFIRM_SUCCESS
,
REPAIR_INNER_STATUS_CONFIRM_FAILED
,
REPAIR_INNER_STATUS_FINISHED
,
REPAIR_INNER_STATUS_COMMIT_FAILED
,
REPAIR_INNER_STATUS_FAILED_1
,
}
from
'@/constants'
;
// 售后维修外部状态 StatusTag map
...
...
@@ -34,11 +36,13 @@ export const REPAIR_OUTER_STATUS_TAG_MAP = {
// 售后维修内部部状态 Badge map
export
const
REPAIR_INNER_STATUS_BADGE_MAP
=
{
[
REPAIR_INNER_STATUS_UNCOMMITTED
]:
'#669EDE'
,
[
REPAIR_INNER_STATUS_COMMIT
TED
]:
'#41CC9E'
,
[
REPAIR_INNER_STATUS_COMMIT
_SUCCESS
]:
'#41CC9E'
,
[
REPAIR_INNER_STATUS_SUCCESS_1
]:
'#41CC9E'
,
[
REPAIR_INNER_STATUS_SUCCESS_2
]:
'#41CC9E'
,
[
REPAIR_INNER_STATUS_FAILED
]:
'#EF6260'
,
[
REPAIR_INNER_STATUS_FAILED
_2
]:
'#EF6260'
,
[
REPAIR_INNER_STATUS_CONFIRM_SUCCESS
]:
'#6C9CEB'
,
[
REPAIR_INNER_STATUS_CONFIRM_FAILED
]:
'#EF6260'
,
[
REPAIR_INNER_STATUS_FINISHED
]:
'#41CC9E'
,
[
REPAIR_INNER_STATUS_COMMIT_FAILED
]:
'#EF6260'
,
[
REPAIR_INNER_STATUS_FAILED_1
]:
'#EF6260'
,
};
\ No newline at end of file
src/pages/repairManage/query/detail.tsx
View file @
93cdbde3
...
...
@@ -67,6 +67,7 @@ const DetailInfo: React.FC = () => {
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
ellipsis
:
true
,
},
{
title
:
'品类'
,
...
...
src/pages/returnManage/components/DetailInfo/index.tsx
View file @
93cdbde3
...
...
@@ -128,6 +128,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
ellipsis
:
true
,
},
{
title
:
'品类'
,
...
...
src/pages/returnManage/components/ReturnAnalysis/index.tsx
View file @
93cdbde3
...
...
@@ -87,6 +87,7 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
ellipsis
:
true
,
},
{
title
:
'品类'
,
...
...
src/pages/returnManage/components/ReturnDetailInfo/index.tsx
View file @
93cdbde3
...
...
@@ -110,6 +110,7 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
ellipsis
:
true
,
},
{
title
:
'品类'
,
...
...
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