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
858f14d9
Commit
858f14d9
authored
Nov 02, 2020
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 新增流转记录状态变更
parent
aea07993
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
133 additions
and
9 deletions
+133
-9
index.ts
src/constants/index.ts
+66
-0
index.tsx
src/pages/transaction/components/StatusColors/index.tsx
+5
-2
index.tsx
...pages/transaction/components/orderDetailSection/index.tsx
+1
-1
index.tsx
...ges/transaction/components/orderTransformRecord/index.tsx
+61
-6
No files found.
src/constants/index.ts
View file @
858f14d9
...
...
@@ -831,6 +831,72 @@ export const SaleOrderInsideWorkStateTexts = {
27
:
'待手工发货'
}
// 订单流转记录外部状态
export
const
OrderTransformOutWorkStateTexts
=
{
"-1"
:
'取消订单'
,
1
:
'待确认'
,
2
:
'待确认电子合同'
,
3
:
'待支付'
,
4
:
'待确认支付结果'
,
5
:
'待新增销售发货单'
,
6
:
'待新增物流单'
,
7
:
'待确认发货订单'
,
8
:
'待新增采购入库单'
,
9
:
'待确认收货订单'
,
10
:
'待确认收货订单'
,
11
:
'待确认回单'
,
12
:
'待归档'
,
13
:
'待归档'
,
14
:
'不接受订单'
,
15
:
'确认未到账'
,
16
:
'待新增采购入库单'
,
17
:
'手工确认发货'
}
// 采购订单流转记录内部状态
export
const
PurchaseOrderTransformInsideWorkStateTexts
=
{
"-1"
:
'取消订单'
,
1
:
'待提交审核'
,
2
:
'提交审核通过'
,
3
:
'审核通过'
,
4
:
'审核通过'
,
5
:
'审核通过'
,
6
:
'已确认电子合同'
,
7
:
'审核不通过'
,
8
:
'审核不通过'
,
9
:
'支付成功'
,
10
:
'支付失败'
,
11
:
'已审核采购入库单'
,
12
:
'已确认收货'
,
13
:
'订单归档完成'
,
14
:
'修改订单'
,
15
:
'手工收货'
}
// 销售订单流转记录内部状态
export
const
SaleOrderTransformInsideWorkStateTexts
=
{
"-1"
:
'取消订单'
,
1
:
'审核通过'
,
2
:
'审核通过'
,
3
:
'审核通过'
,
4
:
'接受订单'
,
5
:
'确认到账'
,
6
:
'已审核销售发货单'
,
7
:
'接受物流单'
,
8
:
'已确认发货'
,
9
:
'已确认回单'
,
10
:
'已归档'
,
11
:
'审核不通过'
,
12
:
'审核不通过'
,
13
:
'不接受订单'
,
14
:
'确认未到账'
,
15
:
'审核不通过'
,
16
:
'不接受物流单'
}
export
const
PayOutWorkStateTexts
=
{
1
:
'待支付'
,
2
:
'待确认支付结果'
,
...
...
src/pages/transaction/components/StatusColors/index.tsx
View file @
858f14d9
import
React
from
'react'
import
{
Tag
}
from
'antd'
import
{
PurchaseOrderInsideWorkStateTexts
,
PurchaseOrderOutWorkStateTexts
,
PurchaseOrderInsideWorkState
,
PurchaseOrderOutWorkState
,
SaleOrderInsideWorkState
,
SaleOrderInsideWorkStateTexts
,
PayOutWorkStateTexts
,
DeliverySideState
,
DeliverySideStateTexts
,
InquiryStateTexts
}
from
'@/constants'
import
{
PurchaseOrderInsideWorkStateTexts
,
PurchaseOrderOutWorkStateTexts
,
PurchaseOrderInsideWorkState
,
PurchaseOrderOutWorkState
,
SaleOrderInsideWorkState
,
SaleOrderInsideWorkStateTexts
,
PayOutWorkStateTexts
,
DeliverySideState
,
DeliverySideStateTexts
,
InquiryStateTexts
,
OrderTransformOutWorkStateTexts
,
PurchaseOrderTransformInsideWorkStateTexts
,
SaleOrderTransformInsideWorkStateTexts
}
from
'@/constants'
export
interface
IStatusColor
{
[
key
:
string
]:
{
...
...
@@ -12,7 +12,7 @@ export interface IStatusColor {
// 用于标签状态控制
export
interface
StatusColorsProps
{
status
:
number
,
type
:
'out'
|
'inside'
|
'saleInside'
|
'payOut'
|
'deliveInside'
|
'inquiry'
type
:
'out'
|
'inside'
|
'saleInside'
|
'payOut'
|
'deliveInside'
|
'inquiry'
|
'transformOut'
|
'transformInside'
|
'transformSaleInside'
}
export
enum
ORDER_EXAMINE_ENUM
{
...
...
@@ -94,6 +94,9 @@ const typeMaps = {
'payOut'
:
PayOutWorkStateTexts
,
'deliveInside'
:
DeliverySideStateTexts
,
'inquiry'
:
InquiryStateTexts
,
'transformOut'
:
OrderTransformOutWorkStateTexts
,
'transformInside'
:
PurchaseOrderTransformInsideWorkStateTexts
,
'transformSaleInside'
:
SaleOrderTransformInsideWorkStateTexts
}
// 订单内部状态显示
...
...
src/pages/transaction/components/orderDetailSection/index.tsx
View file @
858f14d9
...
...
@@ -34,7 +34,7 @@ const OrderDetailSection:React.FC<OrderDetailSectionProps> = ({formContext, type
{
type
===
'saleOrder'
?
<
OrderSaleRecord
/>
:
<
OrderDeleveRecord
/>
}
<
OrderTransformRecord
/>
<
OrderTransformRecord
type=
{
type
}
/>
</
div
>
)
}
...
...
src/pages/transaction/components/orderTransformRecord/index.tsx
View file @
858f14d9
...
...
@@ -5,7 +5,9 @@ import { formatTimeString } from '@/utils'
import
{
OrderDetailContext
}
from
'../../_public/order/context'
import
MellowCard
from
'@/components/MellowCard'
export
interface
OrderTransformRecordProps
{}
export
interface
OrderTransformRecordProps
{
type
:
'saleOrder'
|
'purchaseOrder'
}
const
outOrderCols
:
any
[]
=
[
{
...
...
@@ -26,7 +28,7 @@ const outOrderCols: any[] = [
dataIndex
:
'state'
,
align
:
'center'
,
key
:
'state'
,
render
:
text
=>
<
StatusColors
status=
{
text
}
type=
'
o
ut'
/>
render
:
text
=>
<
StatusColors
status=
{
text
}
type=
'
transformO
ut'
/>
// @todo 需传递工作流状态重新render
},
{
...
...
@@ -49,7 +51,60 @@ const outOrderCols: any[] = [
key
:
'auditOpinion'
,
},
]
const
sideOrderCols
:
any
[]
=
[
const
PurchaseSideOrderCols
:
any
[]
=
[
{
title
:
'流转记录'
,
dataIndex
:
'no'
,
align
:
'center'
,
key
:
'no'
,
render
:
(
_
,
__
,
index
:
number
)
=>
index
+
1
},
{
title
:
'操作人'
,
dataIndex
:
'roleName'
,
align
:
'center'
,
key
:
'roleName'
,
},
{
title
:
'部门'
,
dataIndex
:
'department'
,
align
:
'center'
,
key
:
'department'
,
},
{
title
:
'职位'
,
dataIndex
:
'position'
,
align
:
'center'
,
key
:
'position'
,
},
{
title
:
'状态'
,
dataIndex
:
'state'
,
align
:
'center'
,
key
:
'state'
,
render
:
text
=>
<
StatusColors
status=
{
text
}
type=
'transformInside'
/>
},
{
title
:
'操作'
,
dataIndex
:
'operation'
,
align
:
'center'
,
key
:
'operation'
,
},
{
title
:
'操作时间'
,
dataIndex
:
'operationTime'
,
align
:
'center'
,
key
:
'operationTime'
,
render
:
text
=>
formatTimeString
(
text
)
},
{
title
:
'审核意见'
,
dataIndex
:
'auditOpinion'
,
align
:
'center'
,
key
:
'auditOpinion'
,
},
]
const
SaleSideOrderCols
:
any
[]
=
[
{
title
:
'流转记录'
,
dataIndex
:
'no'
,
...
...
@@ -80,7 +135,7 @@ const sideOrderCols: any[] = [
dataIndex
:
'state'
,
align
:
'center'
,
key
:
'state'
,
render
:
text
=>
<
StatusColors
status=
{
text
}
type=
'
i
nside'
/>
render
:
text
=>
<
StatusColors
status=
{
text
}
type=
'
transformSaleI
nside'
/>
},
{
title
:
'操作'
,
...
...
@@ -103,7 +158,7 @@ const sideOrderCols: any[] = [
},
]
// 订单流转记录
const
OrderTransformRecord
:
React
.
FC
<
OrderTransformRecordProps
>
=
(
props
)
=>
{
const
OrderTransformRecord
:
React
.
FC
<
OrderTransformRecordProps
>
=
(
{
type
}
)
=>
{
const
{
data
}
=
useContext
(
OrderDetailContext
)
const
{
externalProcurementOrderLogResponses
,
interiorProcurementOrderLogResponses
}
=
data
return
(
...
...
@@ -119,7 +174,7 @@ const OrderTransformRecord:React.FC<OrderTransformRecordProps> = (props) => {
</
Tabs
.
TabPane
>
<
Tabs
.
TabPane
tab=
'内部订单流转记录'
key=
"2"
>
<
Table
columns=
{
s
ideOrderCols
}
columns=
{
type
===
'saleOrder'
?
SaleSideOrderCols
:
PurchaseS
ideOrderCols
}
dataSource=
{
interiorProcurementOrderLogResponses
}
pagination=
{
false
}
rowKey=
"id"
...
...
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