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
82ccea90
Commit
82ccea90
authored
Dec 22, 2020
by
Bill
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of 10.0.0.22:lingxi/lingxi-business-paltform into dev
parents
780f4c11
45490e90
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
335 additions
and
49 deletions
+335
-49
index.tsx
...ges/afterService/components/ExchangeDeliverInfo/index.tsx
+26
-3
index.tsx
...es/afterService/components/ExchangeReceivedInfo/index.tsx
+27
-4
index.tsx
src/pages/afterService/components/FlowRecords/index.tsx
+3
-3
index.tsx
src/pages/afterService/components/ReturnAnalysis/index.tsx
+55
-22
index.tsx
src/pages/afterService/components/ReturnDetailInfo/index.tsx
+12
-2
index.tsx
...rvice/exchangeApplication/components/DetailInfo/index.tsx
+2
-0
index.tsx
...terService/exchangeManage/components/DetailInfo/index.tsx
+2
-0
index.tsx
...Service/returnApplication/components/DetailInfo/index.tsx
+2
-0
index.tsx
...pplication/returnPrSubmit/components/ReturnForm/index.tsx
+5
-2
index.ts
...tion/returnPrSubmit/components/ReturnForm/schema/index.ts
+0
-0
index.tsx
...afterService/returnManage/components/DetailInfo/index.tsx
+2
-0
index.tsx
src/pages/classAndProperty/attribute/index.tsx
+99
-2
index.tsx
src/pages/classAndProperty/class/index.tsx
+78
-4
index.tsx
src/pages/logistics/addLogistics/index.tsx
+22
-7
No files found.
src/pages/afterService/components/ExchangeDeliverInfo/index.tsx
View file @
82ccea90
...
@@ -14,6 +14,11 @@ import { EditableColumns } from '@/components/PolymericTable/interface';
...
@@ -14,6 +14,11 @@ import { EditableColumns } from '@/components/PolymericTable/interface';
import
PolymericTable
from
'@/components/PolymericTable'
;
import
PolymericTable
from
'@/components/PolymericTable'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
{
import
{
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_DELIVERY
,
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIVE
,
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIPT
,
}
from
'@/constants'
;
import
{
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER
,
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER
,
MAIL_INNER_STATUS_CONFIRMED_RECEIVING
,
MAIL_INNER_STATUS_CONFIRMED_RECEIVING
,
MAIL_INNER_STATUS_CONFIRMED_DELIVER
,
MAIL_INNER_STATUS_CONFIRMED_DELIVER
,
...
@@ -53,6 +58,11 @@ interface ExchangeDeliverInfoProps {
...
@@ -53,6 +58,11 @@ interface ExchangeDeliverInfoProps {
* 确认退货收货
* 确认退货收货
*/
*/
onConfirmExchangeReceive
?:
(
id
:
number
)
=>
Promise
<
any
>
;
onConfirmExchangeReceive
?:
(
id
:
number
)
=>
Promise
<
any
>
;
/**
* 换货申请单内部状态
*/
innerStatus
:
number
;
};
};
const
ExchangeDeliverInfo
:
React
.
FC
<
ExchangeDeliverInfoProps
>
=
({
const
ExchangeDeliverInfo
:
React
.
FC
<
ExchangeDeliverInfoProps
>
=
({
...
@@ -62,6 +72,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
...
@@ -62,6 +72,7 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
onConfirmExchangeBack
,
onConfirmExchangeBack
,
onConfirmExchangeDeliver
,
onConfirmExchangeDeliver
,
onConfirmExchangeReceive
,
onConfirmExchangeReceive
,
innerStatus
,
})
=>
{
})
=>
{
const
summaryColumns
:
EditableColumns
[]
=
[
const
summaryColumns
:
EditableColumns
[]
=
[
...
@@ -282,7 +293,11 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
...
@@ -282,7 +293,11 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
<
Badge
color=
{
'#6C9CEB'
}
text=
{
item
.
innerStatusName
}
/>
<
Badge
color=
{
'#6C9CEB'
}
text=
{
item
.
innerStatusName
}
/>
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
<
Descriptions
.
Item
>
{
item
.
innerStatus
===
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER
&&
(
{
(
!
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER
&&
innerStatus
===
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_DELIVERY
)
&&
(
<
a
<
a
style=
{
{
style=
{
{
textAlign
:
'right'
,
textAlign
:
'right'
,
...
@@ -293,7 +308,11 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
...
@@ -293,7 +308,11 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
确认换货发货
确认换货发货
</
a
>
</
a
>
)
}
)
}
{
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_DELIVER
&&
(
{
(
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_DELIVER
&&
innerStatus
===
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIVE
)
&&
(
<
a
<
a
style=
{
{
style=
{
{
textAlign
:
'right'
,
textAlign
:
'right'
,
...
@@ -304,7 +323,11 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
...
@@ -304,7 +323,11 @@ const ExchangeDeliverInfo: React.FC<ExchangeDeliverInfoProps> = ({
确认换货收货
确认换货收货
</
a
>
</
a
>
)
}
)
}
{
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_RECEIVING
&&
(
{
(
!
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_RECEIVING
&&
innerStatus
===
EXCHANGE_INNER_STATUS_UNCONFIRMED_REPLACE_RECEIPT
)
&&
(
<
a
<
a
style=
{
{
style=
{
{
textAlign
:
'right'
,
textAlign
:
'right'
,
...
...
src/pages/afterService/components/ExchangeReceivedInfo/index.tsx
View file @
82ccea90
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-
08 16:29:30
* @LastEditTime: 2020-12-
22 11:25:50
* @Description: 退货收货统计、退货发货明细
* @Description: 退货收货统计、退货发货明细
*/
*/
import
React
from
'react'
;
import
React
from
'react'
;
...
@@ -17,6 +17,11 @@ import { EditableColumns } from '@/components/PolymericTable/interface';
...
@@ -17,6 +17,11 @@ import { EditableColumns } from '@/components/PolymericTable/interface';
import
PolymericTable
from
'@/components/PolymericTable'
;
import
PolymericTable
from
'@/components/PolymericTable'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
{
import
{
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_DELIVERY
,
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_RECEIVE
,
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_RECEIPT
,
}
from
'@/constants'
;
import
{
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER
,
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER
,
MAIL_INNER_STATUS_CONFIRMED_DELIVER
,
MAIL_INNER_STATUS_CONFIRMED_DELIVER
,
MAIL_INNER_STATUS_CONFIRMED_RECEIVING
,
MAIL_INNER_STATUS_CONFIRMED_RECEIVING
,
...
@@ -56,6 +61,11 @@ interface ExchangeReceivedInfoProps {
...
@@ -56,6 +61,11 @@ interface ExchangeReceivedInfoProps {
* 确认退货收货
* 确认退货收货
*/
*/
onConfirmReturnReceive
?:
(
id
:
number
)
=>
Promise
<
any
>
;
onConfirmReturnReceive
?:
(
id
:
number
)
=>
Promise
<
any
>
;
/**
* 换货申请单内部状态
*/
innerStatus
:
number
;
};
};
const
ExchangeReceivedInfo
:
React
.
FC
<
ExchangeReceivedInfoProps
>
=
({
const
ExchangeReceivedInfo
:
React
.
FC
<
ExchangeReceivedInfoProps
>
=
({
...
@@ -65,6 +75,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
...
@@ -65,6 +75,7 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
onConfirmReturnBack
,
onConfirmReturnBack
,
onConfirmReturnDeliver
,
onConfirmReturnDeliver
,
onConfirmReturnReceive
,
onConfirmReturnReceive
,
innerStatus
,
})
=>
{
})
=>
{
const
summaryColumns
:
EditableColumns
[]
=
[
const
summaryColumns
:
EditableColumns
[]
=
[
...
@@ -292,7 +303,11 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
...
@@ -292,7 +303,11 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
<
Badge
color=
{
'#6C9CEB'
}
text=
{
item
.
innerStatusName
}
/>
<
Badge
color=
{
'#6C9CEB'
}
text=
{
item
.
innerStatusName
}
/>
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
<
Descriptions
.
Item
>
{
item
.
innerStatus
===
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER
&&
(
{
(
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER
&&
innerStatus
===
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_DELIVERY
)
&&
(
<
a
<
a
style=
{
{
style=
{
{
textAlign
:
'right'
,
textAlign
:
'right'
,
...
@@ -303,7 +318,11 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
...
@@ -303,7 +318,11 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
确认退货发货
确认退货发货
</
a
>
</
a
>
)
}
)
}
{
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_DELIVER
&&
(
{
(
!
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_DELIVER
&&
innerStatus
===
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_RECEIVE
)
&&
(
<
a
<
a
style=
{
{
style=
{
{
textAlign
:
'right'
,
textAlign
:
'right'
,
...
@@ -314,7 +333,11 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
...
@@ -314,7 +333,11 @@ const ExchangeReceivedInfo: React.FC<ExchangeReceivedInfoProps> = ({
确认退货收货
确认退货收货
</
a
>
</
a
>
)
}
)
}
{
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_RECEIVING
&&
(
{
(
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_RECEIVING
&&
innerStatus
===
EXCHANGE_INNER_STATUS_UNCONFIRMED_RETURN_RECEIPT
)
&&
(
<
a
<
a
style=
{
{
style=
{
{
textAlign
:
'right'
,
textAlign
:
'right'
,
...
...
src/pages/afterService/components/FlowRecords/index.tsx
View file @
82ccea90
...
@@ -92,7 +92,7 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({
...
@@ -92,7 +92,7 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({
dataIndex
:
'status'
,
dataIndex
:
'status'
,
align
:
'center'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
render
:
(
text
,
record
)
=>
(
<
StatusTag
type=
{
outerStatusMap
[
record
.
status
]
||
'default'
}
title=
{
text
}
/>
<
StatusTag
type=
{
outerStatusMap
[
record
.
status
Code
]
||
'default'
}
title=
{
text
}
/>
),
),
},
},
{
{
...
@@ -223,7 +223,7 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({
...
@@ -223,7 +223,7 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({
{
outerData
.
data
&&
outerData
.
data
.
length
>
0
?
(
{
outerData
.
data
&&
outerData
.
data
.
length
>
0
?
(
<
Tabs
.
TabPane
tab=
"外部流转记录"
key=
"1"
>
<
Tabs
.
TabPane
tab=
"外部流转记录"
key=
"1"
>
<
PolymericTable
<
PolymericTable
rowKey=
"
operateTime"
rowKey=
"
step"
dataSource=
{
outerData
.
data
}
dataSource=
{
outerData
.
data
}
columns=
{
outerColumns
}
columns=
{
outerColumns
}
loading=
{
outerLoading
}
loading=
{
outerLoading
}
...
@@ -238,7 +238,7 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({
...
@@ -238,7 +238,7 @@ const FlowRecords: React.FC<FlowRecordsProps> = ({
)
:
null
}
)
:
null
}
<
Tabs
.
TabPane
tab=
"内部流转记录"
key=
"2"
>
<
Tabs
.
TabPane
tab=
"内部流转记录"
key=
"2"
>
<
PolymericTable
<
PolymericTable
rowKey=
"
operateTime"
rowKey=
"
step"
dataSource=
{
innerData
.
data
}
dataSource=
{
innerData
.
data
}
columns=
{
innerColumns
}
columns=
{
innerColumns
}
loading=
{
innerLoading
}
loading=
{
innerLoading
}
...
...
src/pages/afterService/components/ReturnAnalysis/index.tsx
View file @
82ccea90
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Author: XieZhiXiong
* @Date: 2020-11-05 15:18:15
* @Date: 2020-11-05 15:18:15
* @LastEditors: XieZhiXiong
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-
09 11:35:12
* @LastEditTime: 2020-12-
22 13:34:38
* @Description: 退货收货统计、退货发货明细
* @Description: 退货收货统计、退货发货明细
*/
*/
import
React
from
'react'
;
import
React
from
'react'
;
...
@@ -17,6 +17,11 @@ import { EditableColumns } from '@/components/PolymericTable/interface';
...
@@ -17,6 +17,11 @@ import { EditableColumns } from '@/components/PolymericTable/interface';
import
PolymericTable
from
'@/components/PolymericTable'
;
import
PolymericTable
from
'@/components/PolymericTable'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
{
import
{
RETURN_INNER_STATUS_UNCONFIRMED_RETURN_DELIVERY
,
RETURN_INNER_STATUS_UNCONFIRMED_RETURN_RECEIVE
,
RETURN_INNER_STATUS_UNCONFIRMED_RETURN_RECEIPT
,
}
from
'@/constants'
;
import
{
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER
,
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER
,
MAIL_INNER_STATUS_CONFIRMED_DELIVER
,
MAIL_INNER_STATUS_CONFIRMED_DELIVER
,
MAIL_INNER_STATUS_CONFIRMED_RECEIVING
,
MAIL_INNER_STATUS_CONFIRMED_RECEIVING
,
...
@@ -55,6 +60,11 @@ interface ReturnInfoProps {
...
@@ -55,6 +60,11 @@ interface ReturnInfoProps {
* 确认退货收货
* 确认退货收货
*/
*/
onConfirmReturnReceive
?:
(
id
:
number
)
=>
Promise
<
any
>
;
onConfirmReturnReceive
?:
(
id
:
number
)
=>
Promise
<
any
>
;
/**
* 退货申请单内部状态
*/
innerStatus
:
number
;
};
};
const
ReturnInfo
:
React
.
FC
<
ReturnInfoProps
>
=
({
const
ReturnInfo
:
React
.
FC
<
ReturnInfoProps
>
=
({
...
@@ -64,6 +74,7 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
...
@@ -64,6 +74,7 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
onConfirmReturnBack
,
onConfirmReturnBack
,
onConfirmReturnDeliver
,
onConfirmReturnDeliver
,
onConfirmReturnReceive
,
onConfirmReturnReceive
,
innerStatus
,
})
=>
{
})
=>
{
const
summaryColumns
:
EditableColumns
[]
=
[
const
summaryColumns
:
EditableColumns
[]
=
[
...
@@ -132,8 +143,8 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
...
@@ -132,8 +143,8 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
const
detailedColumns
:
EditableColumns
[]
=
[
const
detailedColumns
:
EditableColumns
[]
=
[
{
{
title
:
'
批次号'
,
title
:
'
订单号'
,
dataIndex
:
'
batch'
,
dataIndex
:
'
orderNo'
,
render
:
(
text
,
record
)
=>
(
render
:
(
text
,
record
)
=>
(
<
EyePreview
<
EyePreview
url=
{
``
}
url=
{
``
}
...
@@ -143,38 +154,48 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
...
@@ -143,38 +154,48 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
),
),
},
},
{
{
title
:
'退货发货单号'
,
title
:
'商品ID'
,
dataIndex
:
'deliveryNo'
,
dataIndex
:
'productId'
,
align
:
'center'
,
},
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
title
:
'
发货时间'
,
title
:
'
品牌'
,
dataIndex
:
'
deliveryTime'
,
dataIndex
:
'
brand'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
title
:
'
物流单号'
,
title
:
'
单位'
,
dataIndex
:
'
logisticsOrderNo'
,
dataIndex
:
'
unit'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
title
:
'
物流公司'
,
title
:
'
退货数量'
,
dataIndex
:
'
logisticsName'
,
dataIndex
:
'
count'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
title
:
'退货
入库单号'
,
title
:
'退货
发货数量'
,
dataIndex
:
'
storageNo'
,
dataIndex
:
'
deliveryCount'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
title
:
'
入库时间'
,
title
:
'
退货入库数量'
,
dataIndex
:
'storage
Time'
,
dataIndex
:
'storage
Count'
,
align
:
'center'
,
align
:
'center'
,
},
},
{
{
title
:
'
内部状态'
,
title
:
'
差异数量'
,
dataIndex
:
'
innerStatusName'
,
dataIndex
:
'
differenceCount'
,
align
:
'center'
,
align
:
'center'
,
},
},
];
];
...
@@ -230,7 +251,7 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
...
@@ -230,7 +251,7 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
key=
"1"
key=
"1"
>
>
<
PolymericTable
<
PolymericTable
rowKey=
"id"
rowKey=
{
record
=>
Math
.
random
().
toFixed
(
16
).
slice
(
2
,
10
)
}
dataSource=
{
summary
}
dataSource=
{
summary
}
columns=
{
summaryColumns
}
columns=
{
summaryColumns
}
loading=
{
false
}
loading=
{
false
}
...
@@ -281,7 +302,11 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
...
@@ -281,7 +302,11 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
<
Badge
color=
{
'#6C9CEB'
}
text=
{
item
.
innerStatusName
}
/>
<
Badge
color=
{
'#6C9CEB'
}
text=
{
item
.
innerStatusName
}
/>
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
<
Descriptions
.
Item
>
{
item
.
innerStatus
===
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER
&&
(
{
(
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_UNCONFIRMED_DELIVER
&&
innerStatus
===
RETURN_INNER_STATUS_UNCONFIRMED_RETURN_DELIVERY
)
&&
(
<
a
<
a
style=
{
{
style=
{
{
textAlign
:
'right'
,
textAlign
:
'right'
,
...
@@ -292,7 +317,11 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
...
@@ -292,7 +317,11 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
确认退货发货
确认退货发货
</
a
>
</
a
>
)
}
)
}
{
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_DELIVER
&&
(
{
(
!
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_DELIVER
&&
innerStatus
===
RETURN_INNER_STATUS_UNCONFIRMED_RETURN_RECEIVE
)
&&
(
<
a
<
a
style=
{
{
style=
{
{
textAlign
:
'right'
,
textAlign
:
'right'
,
...
@@ -303,7 +332,11 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
...
@@ -303,7 +332,11 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
确认退货收货
确认退货收货
</
a
>
</
a
>
)
}
)
}
{
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_RECEIVING
&&
(
{
(
isPurchaser
&&
item
.
innerStatus
===
MAIL_INNER_STATUS_CONFIRMED_RECEIVING
&&
innerStatus
===
RETURN_INNER_STATUS_UNCONFIRMED_RETURN_RECEIPT
)
&&
(
<
a
<
a
style=
{
{
style=
{
{
textAlign
:
'right'
,
textAlign
:
'right'
,
...
@@ -321,7 +354,7 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
...
@@ -321,7 +354,7 @@ const ReturnInfo: React.FC<ReturnInfoProps> = ({
</
div
>
</
div
>
<
PolymericTable
<
PolymericTable
rowKey=
{
record
=>
`${record.orderNo}+${record.productId}`
}
rowKey=
{
record
=>
Math
.
random
().
toFixed
(
16
).
slice
(
2
,
10
)
}
dataSource=
{
item
.
detailList
}
dataSource=
{
item
.
detailList
}
columns=
{
detailedColumns
}
columns=
{
detailedColumns
}
loading=
{
false
}
loading=
{
false
}
...
...
src/pages/afterService/components/ReturnDetailInfo/index.tsx
View file @
82ccea90
...
@@ -18,6 +18,8 @@ import {
...
@@ -18,6 +18,8 @@ import {
PAY_CHANNEL_BALANCE
,
PAY_CHANNEL_BALANCE
,
PAY_CHANNEL_CREDIT
,
PAY_CHANNEL_CREDIT
,
PAY_CHANNEL_COD
,
PAY_CHANNEL_COD
,
RETURN_INNER_STATUS_TO_BE_REFUNDED
,
RETURN_INNER_STATUS_UNCONFIRMED_REFUNDED
,
}
from
'@/constants'
;
}
from
'@/constants'
;
import
Stamp
from
'../Stamp'
;
import
Stamp
from
'../Stamp'
;
import
CheckVoucherModal
from
'../CheckVoucherModal'
;
import
CheckVoucherModal
from
'../CheckVoucherModal'
;
...
@@ -51,6 +53,11 @@ interface ReturnDetailInfoProps {
...
@@ -51,6 +53,11 @@ interface ReturnDetailInfoProps {
* 是否是采购商
* 是否是采购商
*/
*/
isPurchaser
?:
boolean
;
isPurchaser
?:
boolean
;
/**
* 退货申请单内部状态
*/
innerStatus
:
number
;
};
};
const
ReturnDetailInfo
:
React
.
FC
<
ReturnDetailInfoProps
>
=
({
const
ReturnDetailInfo
:
React
.
FC
<
ReturnDetailInfoProps
>
=
({
...
@@ -58,6 +65,7 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
...
@@ -58,6 +65,7 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
onRefund
,
onRefund
,
onConfirm
,
onConfirm
,
isPurchaser
=
false
,
isPurchaser
=
false
,
innerStatus
,
})
=>
{
})
=>
{
const
[
visibleResult
,
setVisibleResult
]
=
useState
(
false
);
const
[
visibleResult
,
setVisibleResult
]
=
useState
(
false
);
const
[
notReceivedLoading
,
setNotReceivedLoading
]
=
useState
(
false
);
const
[
notReceivedLoading
,
setNotReceivedLoading
]
=
useState
(
false
);
...
@@ -255,7 +263,8 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
...
@@ -255,7 +263,8 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
<
div
className=
{
styles
[
'deliver-item-actions'
]
}
>
<
div
className=
{
styles
[
'deliver-item-actions'
]
}
>
{
{
!
isPurchaser
&&
(
!
isPurchaser
&&
innerStatus
===
RETURN_INNER_STATUS_TO_BE_REFUNDED
&&
(
item
.
outerStatus
===
REFUND_OUTER_STATUS_NOT_RECEIVED
||
item
.
outerStatus
===
REFUND_OUTER_STATUS_NOT_RECEIVED
||
item
.
innerStatus
===
REFUND_INNER_STATUS_NO_REFUND
||
item
.
innerStatus
===
REFUND_INNER_STATUS_NO_REFUND
||
item
.
innerStatus
===
REFUND_INNER_STATUS_REFUND_FAILED
item
.
innerStatus
===
REFUND_INNER_STATUS_REFUND_FAILED
...
@@ -272,7 +281,8 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
...
@@ -272,7 +281,8 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
{
item
.
channel
===
PAY_CHANNEL_OFFLINE
&&
(
{
item
.
channel
===
PAY_CHANNEL_OFFLINE
&&
(
<>
<>
{
{
isPurchaser
&&
(
isPurchaser
&&
innerStatus
===
RETURN_INNER_STATUS_UNCONFIRMED_REFUNDED
&&
(
item
.
outerStatus
===
REFUND_OUTER_STATUS_UNCONFIRMED_REFUND
||
item
.
outerStatus
===
REFUND_OUTER_STATUS_UNCONFIRMED_REFUND
||
item
.
outerStatus
===
REFUND_OUTER_STATUS_NOT_RECEIVED
item
.
outerStatus
===
REFUND_OUTER_STATUS_NOT_RECEIVED
)
&&
(
)
&&
(
...
...
src/pages/afterService/exchangeApplication/components/DetailInfo/index.tsx
View file @
82ccea90
...
@@ -352,6 +352,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
...
@@ -352,6 +352,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
onConfirmReturnDeliver=
{
handleReceivedConfirmReturnDeliver
}
onConfirmReturnDeliver=
{
handleReceivedConfirmReturnDeliver
}
onConfirmReturnBack=
{
handleConfirmReturnBack
}
onConfirmReturnBack=
{
handleConfirmReturnBack
}
isPurchaser=
{
true
}
isPurchaser=
{
true
}
innerStatus=
{
detailInfo
?.
innerStatus
}
/>
/>
</
Suspense
>
</
Suspense
>
</
Col
>
</
Col
>
...
@@ -364,6 +365,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
...
@@ -364,6 +365,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
detailed=
{
detailInfo
&&
detailInfo
.
replaceDeliveryGoodsList
?
detailInfo
.
replaceDeliveryGoodsList
:
[]
}
detailed=
{
detailInfo
&&
detailInfo
.
replaceDeliveryGoodsList
?
detailInfo
.
replaceDeliveryGoodsList
:
[]
}
onConfirmExchangeReceive=
{
handleConfirmExchangeReceive
}
onConfirmExchangeReceive=
{
handleConfirmExchangeReceive
}
isPurchaser=
{
true
}
isPurchaser=
{
true
}
innerStatus=
{
detailInfo
?.
innerStatus
}
/>
/>
</
Suspense
>
</
Suspense
>
</
Col
>
</
Col
>
...
...
src/pages/afterService/exchangeManage/components/DetailInfo/index.tsx
View file @
82ccea90
...
@@ -405,6 +405,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
...
@@ -405,6 +405,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
summary=
{
detailInfo
&&
detailInfo
.
returnStatisticsList
?
detailInfo
.
returnStatisticsList
:
[]
}
summary=
{
detailInfo
&&
detailInfo
.
returnStatisticsList
?
detailInfo
.
returnStatisticsList
:
[]
}
detailed=
{
detailInfo
&&
detailInfo
.
returnDeliveryGoodsList
?
detailInfo
.
returnDeliveryGoodsList
:
[]
}
detailed=
{
detailInfo
&&
detailInfo
.
returnDeliveryGoodsList
?
detailInfo
.
returnDeliveryGoodsList
:
[]
}
onConfirmReturnReceive=
{
handleReceivedConfirmReturnReceive
}
onConfirmReturnReceive=
{
handleReceivedConfirmReturnReceive
}
innerStatus=
{
detailInfo
?.
innerStatus
}
/>
/>
</
Suspense
>
</
Suspense
>
</
Col
>
</
Col
>
...
@@ -417,6 +418,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
...
@@ -417,6 +418,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
detailed=
{
detailInfo
&&
detailInfo
.
replaceDeliveryGoodsList
?
detailInfo
.
replaceDeliveryGoodsList
:
[]
}
detailed=
{
detailInfo
&&
detailInfo
.
replaceDeliveryGoodsList
?
detailInfo
.
replaceDeliveryGoodsList
:
[]
}
onConfirmExchangeDeliver=
{
handleConfirmExchangeDeliver
}
onConfirmExchangeDeliver=
{
handleConfirmExchangeDeliver
}
onConfirmExchangeBack=
{
handleConfirmExchangeBack
}
onConfirmExchangeBack=
{
handleConfirmExchangeBack
}
innerStatus=
{
detailInfo
?.
innerStatus
}
/>
/>
</
Suspense
>
</
Suspense
>
</
Col
>
</
Col
>
...
...
src/pages/afterService/returnApplication/components/DetailInfo/index.tsx
View file @
82ccea90
...
@@ -390,6 +390,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
...
@@ -390,6 +390,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
onConfirmReturnDeliver=
{
handleReceivedConfirmReturnDeliver
}
onConfirmReturnDeliver=
{
handleReceivedConfirmReturnDeliver
}
onConfirmReturnBack=
{
handleConfirmReturnBack
}
onConfirmReturnBack=
{
handleConfirmReturnBack
}
isPurchaser=
{
true
}
isPurchaser=
{
true
}
innerStatus=
{
detailInfo
?.
innerStatus
}
/>
/>
</
Suspense
>
</
Suspense
>
</
Col
>
</
Col
>
...
@@ -408,6 +409,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
...
@@ -408,6 +409,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<
ReturnDetailInfo
<
ReturnDetailInfo
dataSource=
{
detailInfo
&&
detailInfo
.
refundList
?
detailInfo
.
refundList
:
[]
}
dataSource=
{
detailInfo
&&
detailInfo
.
refundList
?
detailInfo
.
refundList
:
[]
}
onConfirm=
{
handleConfirm
}
onConfirm=
{
handleConfirm
}
innerStatus=
{
detailInfo
?.
innerStatus
}
isPurchaser
isPurchaser
/>
/>
</
Suspense
>
</
Suspense
>
...
...
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/index.tsx
View file @
82ccea90
...
@@ -7,7 +7,7 @@ import { history, Prompt } from 'umi';
...
@@ -7,7 +7,7 @@ import { history, Prompt } from 'umi';
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
SaveOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
SaveOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
createFormActions
,
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
GetAsReturnGoodsPageReturnedGoodsResponse
}
from
'@/services/AfterServiceApi'
;
import
{
GetAsReturnGoodsPageReturnedGoodsResponse
}
from
'@/services/AfterServiceApi'
;
import
{
normalizeFiledata
,
FileData
,
isJSONStr
}
from
'@/utils'
;
import
{
normalizeFiledata
,
FileData
,
isJSONStr
}
from
'@/utils'
;
...
@@ -497,7 +497,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
...
@@ -497,7 +497,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
};
};
const
handleReturnInfoSubmit
=
values
=>
{
const
handleReturnInfoSubmit
=
values
=>
{
const
{
getFieldValue
,
setFieldValue
}
=
addSchemaAction
;
const
{
getFieldValue
,
setFieldValue
,
setFieldState
}
=
addSchemaAction
;
const
{
index
}
=
orderInfo
;
const
{
index
}
=
orderInfo
;
const
newData
=
[...
getFieldValue
(
'returnGoodsList'
)];
const
newData
=
[...
getFieldValue
(
'returnGoodsList'
)];
newData
.
splice
(
index
,
1
,
{
newData
.
splice
(
index
,
1
,
{
...
@@ -511,6 +511,8 @@ const ReturnForm: React.FC<BillsFormProps> = ({
...
@@ -511,6 +511,8 @@ const ReturnForm: React.FC<BillsFormProps> = ({
},
},
});
});
setFieldValue
(
'returnGoodsList'
,
newData
);
setFieldValue
(
'returnGoodsList'
,
newData
);
addSchemaAction
.
clearErrors
(
`returnGoodsList.
${
index
}
.returnCount`
);
addSchemaAction
.
clearErrors
(
`returnGoodsList.
${
index
}
.refundAmount`
);
setVisibleReturnInfoDrawer
(
false
);
setVisibleReturnInfoDrawer
(
false
);
};
};
...
@@ -559,6 +561,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
...
@@ -559,6 +561,7 @@ const ReturnForm: React.FC<BillsFormProps> = ({
...
detailInfo
,
...
detailInfo
,
returnGoodsList
:
returnGoodsList
.
data
,
returnGoodsList
:
returnGoodsList
.
data
,
}
}
}
}
previewPlaceholder=
" "
expressionScope=
{
{
expressionScope=
{
{
TableAddButton
,
TableAddButton
,
OuterStatus
,
OuterStatus
,
...
...
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/schema/index.ts
View file @
82ccea90
src/pages/afterService/returnManage/components/DetailInfo/index.tsx
View file @
82ccea90
...
@@ -437,6 +437,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
...
@@ -437,6 +437,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
summary=
{
detailInfo
&&
detailInfo
.
returnStatisticsList
?
detailInfo
.
returnStatisticsList
:
[]
}
summary=
{
detailInfo
&&
detailInfo
.
returnStatisticsList
?
detailInfo
.
returnStatisticsList
:
[]
}
detailed=
{
detailInfo
&&
detailInfo
.
returnDeliveryGoodsList
?
detailInfo
.
returnDeliveryGoodsList
:
[]
}
detailed=
{
detailInfo
&&
detailInfo
.
returnDeliveryGoodsList
?
detailInfo
.
returnDeliveryGoodsList
:
[]
}
onConfirmReturnReceive=
{
handleReceivedConfirmReturnReceive
}
onConfirmReturnReceive=
{
handleReceivedConfirmReturnReceive
}
innerStatus=
{
detailInfo
?.
innerStatus
}
/>
/>
</
Suspense
>
</
Suspense
>
</
Col
>
</
Col
>
...
@@ -455,6 +456,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
...
@@ -455,6 +456,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<
ReturnDetailInfo
<
ReturnDetailInfo
dataSource=
{
detailInfo
&&
detailInfo
.
refundList
?
detailInfo
.
refundList
:
[]
}
dataSource=
{
detailInfo
&&
detailInfo
.
refundList
?
detailInfo
.
refundList
:
[]
}
onRefund=
{
handleRefund
}
onRefund=
{
handleRefund
}
innerStatus=
{
detailInfo
?.
innerStatus
}
/>
/>
</
Suspense
>
</
Suspense
>
</
Col
>
</
Col
>
...
...
src/pages/classAndProperty/attribute/index.tsx
View file @
82ccea90
import
React
,
{
ReactNode
,
useRef
,
useState
}
from
'react'
import
React
,
{
ReactNode
,
useRef
,
useState
}
from
'react'
import
{
history
}
from
'umi'
import
{
history
}
from
'umi'
import
{
Button
,
Popconfirm
,
Card
,
message
}
from
'antd'
import
{
Button
,
Popconfirm
,
Card
,
Modal
,
Tooltip
,
message
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
import
{
PlusOutlined
,
PlusOutlined
,
PlayCircleOutlined
,
PlayCircleOutlined
,
EyeOutlined
,
EyeOutlined
,
PauseCircleOutlined
PauseCircleOutlined
,
QuestionCircleOutlined
}
from
'@ant-design/icons'
}
from
'@ant-design/icons'
import
{
StandardTable
}
from
'god'
import
{
StandardTable
}
from
'god'
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
{
ColumnType
}
from
'antd/lib/table/interface'
...
@@ -15,6 +16,12 @@ import { PublicApi } from '@/services/api'
...
@@ -15,6 +16,12 @@ import { PublicApi } from '@/services/api'
const
Attribute
:
React
.
FC
<
{}
>
=
()
=>
{
const
Attribute
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
ref
=
useRef
<
any
>
({})
const
syncRef
=
useRef
<
any
>
({})
const
[
syncVisible
,
setSyncVisible
]
=
useState
<
boolean
>
(
false
)
const
[
selectRow
,
setSelectRow
]
=
useState
<
any
[]
>
([])
// 模态框选择的行数据
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([])
const
[
syncLoading
,
setSyncLoading
]
=
useState
<
boolean
>
(
false
)
const
fetchData
=
(
params
?:
any
)
=>
{
const
fetchData
=
(
params
?:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
@@ -24,6 +31,14 @@ const Attribute: React.FC<{}> = () => {
...
@@ -24,6 +31,14 @@ const Attribute: React.FC<{}> = () => {
})
})
}
}
const
fetchPlatformData
=
(
params
?:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getProductPlatformGetAttributeList
({
...
params
,
name
:
params
.
name
||
''
,
groupName
:
params
.
groupName
||
''
,
isEnable
:
true
}).
then
(
res
=>
{
resolve
(
res
.
data
)
})
})
}
const
columns
:
ColumnType
<
any
>
[]
=
[
const
columns
:
ColumnType
<
any
>
[]
=
[
{
{
title
:
'ID'
,
title
:
'ID'
,
...
@@ -118,6 +133,36 @@ const Attribute: React.FC<{}> = () => {
...
@@ -118,6 +133,36 @@ const Attribute: React.FC<{}> = () => {
console
.
log
(
'cancel'
)
console
.
log
(
'cancel'
)
}
}
const
syncAttribute
=
()
=>
{
setSyncVisible
(
true
)
}
const
rowSelection
:
any
=
{
type
:
'checkbox'
,
selectedRowKeys
:
selectedRowKeys
,
onChange
:
(
selectedRowKeys
:
any
,
selectedRows
:
any
)
=>
{
setSelectRow
(
selectedRows
)
setSelectedRowKeys
(
selectedRowKeys
)
}
};
const
handleAsyncOk
=
()
=>
{
setSyncLoading
(
true
)
if
(
selectedRowKeys
.
length
)
{
// @ts-ignore
PublicApi
.
postProductCustomerSyncAttribute
({
idList
:
selectedRowKeys
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
ref
.
current
.
reload
()
}
setSyncVisible
(
false
)
setSyncLoading
(
false
)
})
}
else
{
message
.
error
(
'请选择需要同步的属性'
)
setSyncLoading
(
false
)
}
}
return
(
return
(
<
PageHeaderWrapper
>
<
PageHeaderWrapper
>
<
Card
>
<
Card
>
...
@@ -168,10 +213,62 @@ const Attribute: React.FC<{}> = () => {
...
@@ -168,10 +213,62 @@ const Attribute: React.FC<{}> = () => {
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
history
.
push
(
'/memberCenter/commodityAbility/classAndProperty/attribute/add'
)
}
}
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
history
.
push
(
'/memberCenter/commodityAbility/classAndProperty/attribute/add'
)
}
}
>
新建
新建
</
Button
>
</
Button
>
<
span
>
<
Button
type=
"default"
style=
{
{
marginLeft
:
16
}
}
onClick=
{
syncAttribute
}
>
平台属性同步
</
Button
>
<
Tooltip
title=
"同步平台维护的属性,同步时按属性结构进行同步。"
>
<
QuestionCircleOutlined
/>
</
Tooltip
>
</
span
>
</>
</>
)
)
}
}
}
}
/>
/>
<
Modal
title=
"同步平台属性"
visible=
{
syncVisible
}
onOk=
{
handleAsyncOk
}
onCancel=
{
()
=>
setSyncVisible
(
false
)
}
okText=
"确认"
cancelText=
"取消"
width=
{
704
}
destroyOnClose=
{
true
}
confirmLoading=
{
syncLoading
}
>
<
StandardTable
columns=
{
columns
}
currentRef=
{
syncRef
}
tableProps=
{
{
rowKey
:
'id'
}
}
rowSelection=
{
rowSelection
}
fetchTableData=
{
(
params
:
any
)
=>
fetchPlatformData
(
params
)
}
formilyLayouts=
{
{
justify
:
'space-between'
}
}
formilyProps=
{
{
ctx
:
{
schema
:
{
type
:
'object'
,
properties
:
{
groupName
:
{
type
:
'string'
,
'x-component-props'
:
{
placeHolder
:
'属性组名称'
}
},
name
:
{
type
:
'string'
,
'x-component-props'
:
{
placeHolder
:
'属性名称'
},
'x-component'
:
'Search'
},
}
}
}
}
}
/>
</
Modal
>
</
Card
>
</
Card
>
</
PageHeaderWrapper
>
</
PageHeaderWrapper
>
)
)
...
...
src/pages/classAndProperty/class/index.tsx
View file @
82ccea90
...
@@ -4,6 +4,7 @@ import {
...
@@ -4,6 +4,7 @@ import {
LoadingOutlined
,
LoadingOutlined
,
PlusOutlined
,
PlusOutlined
,
LinkOutlined
,
LinkOutlined
,
QuestionCircleOutlined
,
}
from
'@ant-design/icons'
;
}
from
'@ant-design/icons'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
TabTree
,
{
useTreeActions
,
createTreeActions
}
from
'@/components/TabTree'
;
import
TabTree
,
{
useTreeActions
,
createTreeActions
}
from
'@/components/TabTree'
;
...
@@ -26,6 +27,7 @@ let flag = false; // 全局变量 用于控制表单编辑退出提示
...
@@ -26,6 +27,7 @@ let flag = false; // 全局变量 用于控制表单编辑退出提示
const
formActions
=
createFormActions
()
const
formActions
=
createFormActions
()
const
treeActions
=
createTreeActions
()
const
treeActions
=
createTreeActions
()
const
syncTreeActions
=
createTreeActions
()
const
fetchClassTreeData
=
async
(
params
?)
=>
{
// 商品品类树
const
fetchClassTreeData
=
async
(
params
?)
=>
{
// 商品品类树
const
res
=
await
PublicApi
.
getProductCustomerGetCustomerCategoryTree
()
const
res
=
await
PublicApi
.
getProductCustomerGetCustomerCategoryTree
()
...
@@ -38,12 +40,15 @@ const fetchPlatformTreeData = async (params?) => { // 平台后台树
...
@@ -38,12 +40,15 @@ const fetchPlatformTreeData = async (params?) => { // 平台后台树
}
}
const
ClassProperty
:
React
.
FC
<
{}
>
=
()
=>
{
const
ClassProperty
:
React
.
FC
<
{}
>
=
()
=>
{
const
[
syncVisible
,
setSyncVisible
]
=
useState
(
false
)
const
[
plateformVisible
,
setPlateformVisible
]
=
useState
(
false
)
const
[
plateformVisible
,
setPlateformVisible
]
=
useState
(
false
)
const
[
plateformSelectNode
,
setPlateformSelectNode
]
=
useState
<
any
>
()
const
[
plateformSelectNode
,
setPlateformSelectNode
]
=
useState
<
any
>
()
const
plateformTreeActions
=
useTreeActions
()
const
plateformTreeActions
=
useTreeActions
()
const
[
customPlateformExpandkeys
,
setCustomPlateformExpandkeys
]
=
useState
<
any
>
()
const
[
customPlateformExpandkeys
,
setCustomPlateformExpandkeys
]
=
useState
<
any
>
()
const
[
syncLoading
,
setSyncLoading
]
=
useState
<
boolean
>
(
false
)
/* 选择品类树 */
/* 选择品类树 */
const
{
const
{
treeStatus
,
treeStatus
,
...
@@ -75,8 +80,21 @@ const ClassProperty: React.FC<{}> = () => {
...
@@ -75,8 +80,21 @@ const ClassProperty: React.FC<{}> = () => {
fetchMenuData
:
fetchPlatformTreeData
,
fetchMenuData
:
fetchPlatformTreeData
,
})
})
/* 同步树 */
const
{
treeStatus
:
syncTreeStatus
,
setTreeStatus
:
setSyncTreeStatus
,
treeData
:
syncTreeData
,
nodeRecord
:
syncNodeRecord
,
setNodeRecord
:
setSyncNodeRecord
,
handleSelect
:
handleSyncSelect
,
getTreeMaps
:
getSyncTreeMaps
,
setTreeMaps
:
setSyncTreeMaps
,
}
=
useTreeTabs
({
treeActions
:
syncTreeActions
,
})
const
onFinish
=
(
values
)
=>
{
const
onFinish
=
(
values
)
=>
{
console
.
log
(
values
,
nodeRecord
)
const
editOrAdd
=
nodeRecord
&&
treeStatus
===
FormState
.
EDIT
const
editOrAdd
=
nodeRecord
&&
treeStatus
===
FormState
.
EDIT
const
params
=
editOrAdd
?
{
...
values
,
parentId
:
nodeRecord
.
parentId
}
:
{
const
params
=
editOrAdd
?
{
...
values
,
parentId
:
nodeRecord
.
parentId
}
:
{
...
values
,
...
values
,
...
@@ -127,7 +145,34 @@ const ClassProperty: React.FC<{}> = () => {
...
@@ -127,7 +145,34 @@ const ClassProperty: React.FC<{}> = () => {
flag
=
false
flag
=
false
}
}
// 关联平台品类input
// 同步平台品类
const
asyncClass
=
()
=>
{
setSyncVisible
(
true
)
}
const
handleSyncOk
=
()
=>
{
setSyncLoading
(
true
)
const
syncIds
=
syncTreeActions
.
getSelectKeys
()
if
(
syncIds
.
length
)
{
// @ts-ignore
PublicApi
.
postProductCustomerSyncCategory
({
idList
:
syncIds
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resetMenu
()
}
setSyncVisible
(
false
)
setSyncLoading
(
false
)
})
}
else
{
message
.
error
(
'请选择需要同步的品类'
)
setSyncLoading
(
false
)
}
}
const
handleSyncCancel
=
()
=>
{
setSyncVisible
(
false
)
}
const
connectCategory
=
<
div
className=
'connectBtn'
onClick=
{
handleConnectCategroyBtn
}
><
LinkOutlined
style=
{
{
marginRight
:
4
}
}
/>
关联
</
div
>
const
connectCategory
=
<
div
className=
'connectBtn'
onClick=
{
handleConnectCategroyBtn
}
><
LinkOutlined
style=
{
{
marginRight
:
4
}
}
/>
关联
</
div
>
return
<
PageHeaderWrapper
return
<
PageHeaderWrapper
...
@@ -137,7 +182,15 @@ const ClassProperty: React.FC<{}> = () => {
...
@@ -137,7 +182,15 @@ const ClassProperty: React.FC<{}> = () => {
<
Row
gutter=
{
[
36
,
36
]
}
>
<
Row
gutter=
{
[
36
,
36
]
}
>
<
Col
span=
{
8
}
>
<
Col
span=
{
8
}
>
<
Card
>
<
Card
>
<
h3
className=
"mb-30"
>
选择要编辑的项目
</
h3
>
<
p
style=
{
{
display
:
'flex'
,
justifyContent
:
'space-between'
}
}
>
<
h3
className=
"mb-30"
>
选择要编辑的品类
</
h3
>
<
p
>
<
Button
type=
"default"
onClick=
{
asyncClass
}
>
平台品类同步
</
Button
>
<
Tooltip
title=
"同步平台维护的品类,同步时按品类结构进行同步。"
>
<
QuestionCircleOutlined
/>
</
Tooltip
>
</
p
>
</
p
>
{
{
treeData
&&
treeData
.
length
>
0
treeData
&&
treeData
.
length
>
0
?
<
TabTree
?
<
TabTree
...
@@ -223,7 +276,28 @@ const ClassProperty: React.FC<{}> = () => {
...
@@ -223,7 +276,28 @@ const ClassProperty: React.FC<{}> = () => {
customExpandkeys=
{
customPlateformExpandkeys
}
customExpandkeys=
{
customPlateformExpandkeys
}
/
>
/
>
</
Modal
>
</
Modal
>
<
Modal
title=
"同步平台品类"
visible=
{
syncVisible
}
onOk=
{
handleSyncOk
}
onCancel=
{
handleSyncCancel
}
okText=
"平台品类同步"
cancelText=
"取消"
forceRender
getContainer=
'#root'
confirmLoading=
{
syncLoading
}
>
<
TabTree
fetchData
=
{
params
=
>
fetchPlatformTreeData(params)}
treeData=
{
plateformTreeData
}
handleSelect=
{
handleSyncSelect
}
actions=
{
syncTreeActions
}
customKey="id"
enableSearch
customExpandkeys=
{
customPlateformExpandkeys
}
checkable=
{
true
}
/
>
</
Modal
>
</
PageHeaderWrapper
>
</
PageHeaderWrapper
>
}
}
...
...
src/pages/logistics/addLogistics/index.tsx
View file @
82ccea90
...
@@ -186,8 +186,11 @@ const AddLogistics: React.FC<{}> = () => {
...
@@ -186,8 +186,11 @@ const AddLogistics: React.FC<{}> = () => {
relevanceOrderCode
:
res
.
data
.
orderNo
,
relevanceOrderCode
:
res
.
data
.
orderNo
,
voucherTime
:
res
.
data
.
transactionTime
,
voucherTime
:
res
.
data
.
transactionTime
,
externalState
:
res
.
data
.
state
,
externalState
:
res
.
data
.
state
,
shipmentOrderId
:
res
.
data
.
id
,
shipmentOrderId
:
res
.
data
.
relevanceInvoicesId
,
relevanceOrderId
:
res
.
data
.
relevanceInvoicesId
,
relevanceOrderId
:
res
.
data
.
id
,
receiverMemberId
:
res
.
data
.
supplyMembersId
,
receiverRoleId
:
res
.
data
.
supplyMembersRoleId
,
receiverMemberName
:
res
.
data
.
supplyMembersName
,
}
}
form
.
setFieldsValue
(
obj
);
form
.
setFieldsValue
(
obj
);
setQuery
({
...
obj
})
setQuery
({
...
obj
})
...
@@ -205,10 +208,13 @@ const AddLogistics: React.FC<{}> = () => {
...
@@ -205,10 +208,13 @@ const AddLogistics: React.FC<{}> = () => {
shipperFullAddress
:
res
.
data
.
deliveryAddress
,
shipperFullAddress
:
res
.
data
.
deliveryAddress
,
shipmentOrderCode
:
res
.
data
.
deliveryNo
,
shipmentOrderCode
:
res
.
data
.
deliveryNo
,
relevanceOrderCode
:
res
.
data
.
noticeNo
,
relevanceOrderCode
:
res
.
data
.
noticeNo
,
shipmentOrderId
:
res
.
data
.
deliveryI
d
,
shipmentOrderId
:
res
.
data
.
i
d
,
relevanceOrderId
:
res
.
data
.
i
d
,
relevanceOrderId
:
res
.
data
.
deliveryI
d
,
voucherTime
:
res
.
data
.
createTime
,
voucherTime
:
res
.
data
.
createTime
,
externalState
:
res
.
data
.
outerStatus
,
externalState
:
res
.
data
.
outerStatus
,
receiverMemberId
:
res
.
data
.
supplierMemberId
,
receiverRoleId
:
res
.
data
.
supplierRoleId
,
receiverMemberName
:
res
.
data
.
supplierName
,
}
}
form
.
setFieldsValue
(
obj
);
form
.
setFieldsValue
(
obj
);
setQuery
({
...
obj
})
setQuery
({
...
obj
})
...
@@ -227,6 +233,9 @@ const AddLogistics: React.FC<{}> = () => {
...
@@ -227,6 +233,9 @@ const AddLogistics: React.FC<{}> = () => {
relevanceOrderId
:
res
.
data
.
applyId
,
relevanceOrderId
:
res
.
data
.
applyId
,
externalState
:
res
.
data
.
state
,
externalState
:
res
.
data
.
state
,
digest
:
res
.
data
.
applyAbstract
,
digest
:
res
.
data
.
applyAbstract
,
receiverMemberId
:
res
.
data
.
receiveMemberId
,
receiverRoleId
:
res
.
data
.
receiveRoleId
,
receiverMemberName
:
res
.
data
.
receiveUserName
,
}
}
form
.
setFieldsValue
(
obj
);
form
.
setFieldsValue
(
obj
);
setQuery
({
...
obj
})
setQuery
({
...
obj
})
...
@@ -244,7 +253,10 @@ const AddLogistics: React.FC<{}> = () => {
...
@@ -244,7 +253,10 @@ const AddLogistics: React.FC<{}> = () => {
voucherTime
:
res
.
data
.
applyTime
,
voucherTime
:
res
.
data
.
applyTime
,
relevanceOrderId
:
res
.
data
.
applyId
,
relevanceOrderId
:
res
.
data
.
applyId
,
externalState
:
res
.
data
.
state
,
externalState
:
res
.
data
.
state
,
digest
:
res
.
data
.
applyAbstract
digest
:
res
.
data
.
applyAbstract
,
receiverMemberId
:
res
.
data
.
receiveMemberId
,
receiverRoleId
:
res
.
data
.
receiveRoleId
,
receiverMemberName
:
res
.
data
.
receiveUserName
,
}
}
form
.
setFieldsValue
(
obj
);
form
.
setFieldsValue
(
obj
);
setQuery
({
...
obj
})
setQuery
({
...
obj
})
...
@@ -262,7 +274,10 @@ const AddLogistics: React.FC<{}> = () => {
...
@@ -262,7 +274,10 @@ const AddLogistics: React.FC<{}> = () => {
relevanceOrderId
:
res
.
data
.
applyId
,
relevanceOrderId
:
res
.
data
.
applyId
,
voucherTime
:
res
.
data
.
applyTime
,
voucherTime
:
res
.
data
.
applyTime
,
externalState
:
res
.
data
.
state
,
externalState
:
res
.
data
.
state
,
digest
:
res
.
data
.
applyAbstract
digest
:
res
.
data
.
applyAbstract
,
receiverMemberId
:
res
.
data
.
receiveMemberId
,
receiverRoleId
:
res
.
data
.
receiveRoleId
,
receiverMemberName
:
res
.
data
.
receiveUserName
,
}
}
form
.
setFieldsValue
(
obj
);
form
.
setFieldsValue
(
obj
);
setQuery
({
...
obj
})
setQuery
({
...
obj
})
...
@@ -503,8 +518,8 @@ const AddLogistics: React.FC<{}> = () => {
...
@@ -503,8 +518,8 @@ const AddLogistics: React.FC<{}> = () => {
data
.
receiverAddressId
=
selectRow
.
receiverAddressId
;
data
.
receiverAddressId
=
selectRow
.
receiverAddressId
;
data
.
receiverFullAddress
=
selectRow
.
fullAddress
;
data
.
receiverFullAddress
=
selectRow
.
fullAddress
;
data
.
receiverMemberName
=
selectRow
.
memberName
;
data
.
receiverMemberName
=
selectRow
.
memberName
;
}
data
.
relevanceOrderId
=
selectRow
.
id
data
.
relevanceOrderId
=
selectRow
.
id
}
data
.
relevanceOrderCode
=
selectRow
.
orderNo
data
.
relevanceOrderCode
=
selectRow
.
orderNo
form
.
setFieldsValue
({
form
.
setFieldsValue
({
relevanceOrderCode
:
selectRow
.
orderNo
relevanceOrderCode
:
selectRow
.
orderNo
...
...
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